diff mbox series

openssh: shrinking to a new PACKAGECONFIG line to set systemd readiness notification support

Message ID 20231201140947.792594-1-xiangyu.chen@eng.windriver.com
State Under Review
Headers show
Series openssh: shrinking to a new PACKAGECONFIG line to set systemd readiness notification support | expand

Commit Message

Xiangyu Chen Dec. 1, 2023, 2:09 p.m. UTC
From: Xiangyu Chen <xiangyu.chen@windriver.com>

Using PACKAGECONFIG line to set the patch of systemd readiness notification
support, it can make the .bb file more clearly.

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
---
 meta/recipes-connectivity/openssh/openssh_9.5p1.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Khem Raj Dec. 1, 2023, 6:53 p.m. UTC | #1
On Fri, Dec 1, 2023 at 6:14 AM Xiangyu Chen
<xiangyu.chen@eng.windriver.com> wrote:
>
> From: Xiangyu Chen <xiangyu.chen@windriver.com>
>
> Using PACKAGECONFIG line to set the patch of systemd readiness notification
> support, it can make the .bb file more clearly.
>
> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
> ---
>  meta/recipes-connectivity/openssh/openssh_9.5p1.bb | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
> index bbb8fb091a..2c1c821ea9 100644
> --- a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
> +++ b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
> @@ -53,13 +53,13 @@ SYSTEMD_PACKAGES = "${PN}-sshd"
>  SYSTEMD_SERVICE:${PN}-sshd = "sshd.socket sshd.service"
>
>  inherit autotools-brokensep ptest pkgconfig
> -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
>
> -PACKAGECONFIG ??= ""
> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"

This makes sense if someone would like to disable systemd support when
using systemd init system
which does not seem very likely. Is there anything else other than
cleanup that you are targeting with it ?
If so, I think the status quo is better.

>  PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5"
>  PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns"
>  PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
>  PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat"
> +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
>
>  EXTRA_AUTORECONF += "--exclude=aclocal"
>
> @@ -71,7 +71,6 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
>                  --sysconfdir=${sysconfdir}/ssh \
>                  --with-xauth=${bindir}/xauth \
>                  --disable-strip \
> -                ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)} \
>                  "
>
>  # musl doesn't implement wtmp/utmp and logwtmp
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#191666): https://lists.openembedded.org/g/openembedded-core/message/191666
> Mute This Topic: https://lists.openembedded.org/mt/102915607/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Xiangyu Chen Dec. 4, 2023, 7:07 a.m. UTC | #2
On 12/2/23 02:53, Khem Raj wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Fri, Dec 1, 2023 at 6:14 AM Xiangyu Chen
> <xiangyu.chen@eng.windriver.com> wrote:
>> From: Xiangyu Chen <xiangyu.chen@windriver.com>
>>
>> Using PACKAGECONFIG line to set the patch of systemd readiness notification
>> support, it can make the .bb file more clearly.
>>
>> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
>> ---
>>   meta/recipes-connectivity/openssh/openssh_9.5p1.bb | 5 ++---
>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
>> index bbb8fb091a..2c1c821ea9 100644
>> --- a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
>> +++ b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
>> @@ -53,13 +53,13 @@ SYSTEMD_PACKAGES = "${PN}-sshd"
>>   SYSTEMD_SERVICE:${PN}-sshd = "sshd.socket sshd.service"
>>
>>   inherit autotools-brokensep ptest pkgconfig
>> -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
>>
>> -PACKAGECONFIG ??= ""
>> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
> This makes sense if someone would like to disable systemd support when
> using systemd init system
> which does not seem very likely. Is there anything else other than
> cleanup that you are targeting with it ?

Ah, yes, this commit apply other thread's comment (oe-core maillist 
#190593), due to that

thread was filtered to another mail folder, when I read that comment, 
the patch has already applied

to the master branch, so I create this commit to make a cleanup.

> If so, I think the status quo is better.
>
>>   PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5"
>>   PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns"
>>   PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
>>   PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat"
>> +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
>>
>>   EXTRA_AUTORECONF += "--exclude=aclocal"
>>
>> @@ -71,7 +71,6 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
>>                   --sysconfdir=${sysconfdir}/ssh \
>>                   --with-xauth=${bindir}/xauth \
>>                   --disable-strip \
>> -                ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)} \
>>                   "
>>
>>   # musl doesn't implement wtmp/utmp and logwtmp
>> --
>> 2.25.1
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#191666): https://lists.openembedded.org/g/openembedded-core/message/191666
>> Mute This Topic: https://lists.openembedded.org/mt/102915607/1997914
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Peter Kjellerstedt Dec. 6, 2023, 9:56 p.m. UTC | #3
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Xiangyu Chen
> Sent: den 4 december 2023 08:07
> To: Khem Raj <raj.khem@gmail.com>
> Cc: quaresma.jose@gmail.com; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH] openssh: shrinking to a new PACKAGECONFIG line to set systemd readiness notification support
> 
> On 12/2/23 02:53, Khem Raj wrote:
> > CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and know the content is safe.
> >
> > On Fri, Dec 1, 2023 at 6:14 AM Xiangyu Chen <xiangyu.chen@eng.windriver.com> wrote:
> >> From: Xiangyu Chen <xiangyu.chen@windriver.com>
> >>
> >> Using PACKAGECONFIG line to set the patch of systemd readiness notification
> >> support, it can make the .bb file more clearly.
> >>
> >> Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
> >> ---
> >>   meta/recipes-connectivity/openssh/openssh_9.5p1.bb | 5 ++---
> >>   1 file changed, 2 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
> >> index bbb8fb091a..2c1c821ea9 100644
> >> --- a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
> >> +++ b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
> >> @@ -53,13 +53,13 @@ SYSTEMD_PACKAGES = "${PN}-sshd"
> >>   SYSTEMD_SERVICE:${PN}-sshd = "sshd.socket sshd.service"
> >>
> >>   inherit autotools-brokensep ptest pkgconfig
> >> -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
> >>
> >> -PACKAGECONFIG ??= ""
> >> +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
> > This makes sense if someone would like to disable systemd support when
> > using systemd init system
> > which does not seem very likely. Is there anything else other than
> > cleanup that you are targeting with it ?
> 
> Ah, yes, this commit apply other thread's comment (oe-core maillist
> #190593), due to that
> 
> thread was filtered to another mail folder, when I read that comment,
> the patch has already applied
> 
> to the master branch, so I create this commit to make a cleanup.
> 
> > If so, I think the status quo is better.

I disagree. This looks exactly like a cleanup I would like to see 
happen if I saw a recipe with those spread out configurations that 
can be simplified to a single PACKAGECONFIG.

The commit subject is a bit odd though. I would change it to 
something like:

systemd: Simplify configuration of systemd support

> >>   PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5"
> >>   PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns"
> >>   PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
> >>   PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat"
> >> +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
> >>
> >>   EXTRA_AUTORECONF += "--exclude=aclocal"
> >>
> >> @@ -71,7 +71,6 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
> >>                   --sysconfdir=${sysconfdir}/ssh \
> >>                   --with-xauth=${bindir}/xauth \
> >>                   --disable-strip \
> >> -                ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)} \
> >>                   "
> >>
> >>   # musl doesn't implement wtmp/utmp and logwtmp
> >> --
> >> 2.25.1

//Peter
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
index bbb8fb091a..2c1c821ea9 100644
--- a/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_9.5p1.bb
@@ -53,13 +53,13 @@  SYSTEMD_PACKAGES = "${PN}-sshd"
 SYSTEMD_SERVICE:${PN}-sshd = "sshd.socket sshd.service"
 
 inherit autotools-brokensep ptest pkgconfig
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5"
 PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns"
 PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
 PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
 
 EXTRA_AUTORECONF += "--exclude=aclocal"
 
@@ -71,7 +71,6 @@  EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
                 --sysconfdir=${sysconfdir}/ssh \
                 --with-xauth=${bindir}/xauth \
                 --disable-strip \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)} \
                 "
 
 # musl doesn't implement wtmp/utmp and logwtmp