Patchwork [4/4] msmtp: add link to ${libdir}/sendmail

login
register
mail settings
Submitter Kang Kai
Date Nov. 21, 2012, 9:38 a.m.
Message ID <bbf45c7739e8d08864c771446b487a5169e1f488.1353490311.git.kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/39385/
State New
Headers show

Comments

Kang Kai - Nov. 21, 2012, 9:38 a.m.
LSB tests check file ${libdir}/sendmail, and the file was created by
package lsbsetup. Because lsbsetup is dropped, create the link in msmtp.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/recipes-extended/msmtp/msmtp_1.4.24.bb |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
Otavio Salvador - Nov. 21, 2012, 11:28 a.m.
On Wed, Nov 21, 2012 at 7:38 AM, Kang Kai <kai.kang@windriver.com> wrote:
> LSB tests check file ${libdir}/sendmail, and the file was created by
> package lsbsetup. Because lsbsetup is dropped, create the link in msmtp.
>
> Signed-off-by: Kang Kai <kai.kang@windriver.com>

I think it is wrong. You should to use alternatives for it.
Richard Purdie - Nov. 21, 2012, 5:34 p.m.
On Wed, 2012-11-21 at 09:28 -0200, Otavio Salvador wrote:
> On Wed, Nov 21, 2012 at 7:38 AM, Kang Kai <kai.kang@windriver.com> wrote:
> > LSB tests check file ${libdir}/sendmail, and the file was created by
> > package lsbsetup. Because lsbsetup is dropped, create the link in msmtp.
> >
> > Signed-off-by: Kang Kai <kai.kang@windriver.com>
> 
> I think it is wrong. You should to use alternatives for it.

Not necessarily, its not a file conflict problem, it just needs to exist
at all...

Cheers,

Richard
Otavio Salvador - Nov. 21, 2012, 5:37 p.m.
On Wed, Nov 21, 2012 at 3:34 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2012-11-21 at 09:28 -0200, Otavio Salvador wrote:
>> On Wed, Nov 21, 2012 at 7:38 AM, Kang Kai <kai.kang@windriver.com> wrote:
>> > LSB tests check file ${libdir}/sendmail, and the file was created by
>> > package lsbsetup. Because lsbsetup is dropped, create the link in msmtp.
>> >
>> > Signed-off-by: Kang Kai <kai.kang@windriver.com>
>>
>> I think it is wrong. You should to use alternatives for it.
>
> Not necessarily, its not a file conflict problem, it just needs to exist
> at all...

What if I want to use another smtp and still be lsb compliance?
Richard Purdie - Nov. 21, 2012, 8:56 p.m.
On Wed, 2012-11-21 at 15:37 -0200, Otavio Salvador wrote:
> On Wed, Nov 21, 2012 at 3:34 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Wed, 2012-11-21 at 09:28 -0200, Otavio Salvador wrote:
> >> On Wed, Nov 21, 2012 at 7:38 AM, Kang Kai <kai.kang@windriver.com> wrote:
> >> > LSB tests check file ${libdir}/sendmail, and the file was created by
> >> > package lsbsetup. Because lsbsetup is dropped, create the link in msmtp.
> >> >
> >> > Signed-off-by: Kang Kai <kai.kang@windriver.com>
> >>
> >> I think it is wrong. You should to use alternatives for it.
> >
> > Not necessarily, its not a file conflict problem, it just needs to exist
> > at all...
> 
> What if I want to use another smtp and still be lsb compliance?

The issue is we already have the "sendmail" bindir entry under update
alternatives control so this means adding an alternative of the
alternative which I think is getting convoluted. Ideally this symlink
just needs to exist which ever smtp is installed.

So I think the better answer may be to move the link to the lsbtest
suite, or some kind of lsb-collateral package.

Cheers,

Richard
Otavio Salvador - Nov. 21, 2012, 8:57 p.m.
On Wed, Nov 21, 2012 at 6:56 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2012-11-21 at 15:37 -0200, Otavio Salvador wrote:
>> On Wed, Nov 21, 2012 at 3:34 PM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Wed, 2012-11-21 at 09:28 -0200, Otavio Salvador wrote:
>> >> On Wed, Nov 21, 2012 at 7:38 AM, Kang Kai <kai.kang@windriver.com> wrote:
>> >> > LSB tests check file ${libdir}/sendmail, and the file was created by
>> >> > package lsbsetup. Because lsbsetup is dropped, create the link in msmtp.
>> >> >
>> >> > Signed-off-by: Kang Kai <kai.kang@windriver.com>
>> >>
>> >> I think it is wrong. You should to use alternatives for it.
>> >
>> > Not necessarily, its not a file conflict problem, it just needs to exist
>> > at all...
>>
>> What if I want to use another smtp and still be lsb compliance?
>
> The issue is we already have the "sendmail" bindir entry under update
> alternatives control so this means adding an alternative of the
> alternative which I think is getting convoluted. Ideally this symlink
> just needs to exist which ever smtp is installed.
>
> So I think the better answer may be to move the link to the lsbtest
> suite, or some kind of lsb-collateral package.

This is a nicer solution indeed as this allow for reuse of same
solution among other packages.
Kang Kai - Nov. 22, 2012, 2:25 a.m.
On 2012?11?22? 04:57, Otavio Salvador wrote:
> On Wed, Nov 21, 2012 at 6:56 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org>  wrote:
>> On Wed, 2012-11-21 at 15:37 -0200, Otavio Salvador wrote:
>>> On Wed, Nov 21, 2012 at 3:34 PM, Richard Purdie
>>> <richard.purdie@linuxfoundation.org>  wrote:
>>>> On Wed, 2012-11-21 at 09:28 -0200, Otavio Salvador wrote:
>>>>> On Wed, Nov 21, 2012 at 7:38 AM, Kang Kai<kai.kang@windriver.com>  wrote:
>>>>>> LSB tests check file ${libdir}/sendmail, and the file was created by
>>>>>> package lsbsetup. Because lsbsetup is dropped, create the link in msmtp.
>>>>>>
>>>>>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>>>>> I think it is wrong. You should to use alternatives for it.
>>>> Not necessarily, its not a file conflict problem, it just needs to exist
>>>> at all...
>>> What if I want to use another smtp and still be lsb compliance?
>> The issue is we already have the "sendmail" bindir entry under update
>> alternatives control so this means adding an alternative of the
>> alternative which I think is getting convoluted. Ideally this symlink
>> just needs to exist which ever smtp is installed.
>>
>> So I think the better answer may be to move the link to the lsbtest
>> suite, or some kind of lsb-collateral package.

I will move the links to package lsb.

Thanks,
Kai


> This is a nicer solution indeed as this allow for reuse of same
> solution among other packages.
>

Patch

diff --git a/meta/recipes-extended/msmtp/msmtp_1.4.24.bb b/meta/recipes-extended/msmtp/msmtp_1.4.24.bb
index 13de167..5a290a4 100644
--- a/meta/recipes-extended/msmtp/msmtp_1.4.24.bb
+++ b/meta/recipes-extended/msmtp/msmtp_1.4.24.bb
@@ -5,7 +5,7 @@  SECTION = "console/network"
 
 LICENSE = "GPLv3"
 DEPENDS = "zlib gnutls"
-PR = "r4"
+PR = "r5"
 
 
 #COPYING or Licence
@@ -25,3 +25,10 @@  ALTERNATIVE_${PN} = "sendmail"
 ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
 ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
 ALTERNATIVE_PRIORITY = "100"
+
+do_install_append_linuxstdbase() {
+	install -d ${D}${libdir}/
+	ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
+}
+
+FILES_${PN}_append_linuxstdbase += "${libdir}/sendmail"