Return-Path: X-Greylist: delayed 502 seconds by postgrey-1.34 at layers.openembedded.org; Mon, 07 Mar 2016 10:50:45 UTC Received: from smtp24.services.sfr.fr (smtp24.services.sfr.fr [93.17.128.82]) by mail.openembedded.org (Postfix) with ESMTP id D29036057A for ; Mon, 7 Mar 2016 10:50:45 +0000 (UTC) Received: from filter.sfr.fr (localhost [111.250.196.5]) by msfrf2411.sfr.fr (SMTP Server) with ESMTP id 66425700009A for ; Mon, 7 Mar 2016 11:42:24 +0100 (CET) Authentication-Results: sfrmc.priv.atos.fr; dkim=none (no signature); dkim-adsp=none (no policy) header.from=herve.jourdain@neuf.fr Received: from nb-hjo (111-250-196-5.dynamic.hinet.net [111.250.196.5]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by msfrf2411.sfr.fr (SMTP Server) with ESMTP id F32377000086 for ; Mon, 7 Mar 2016 11:42:22 +0100 (CET) X-SFR-UUID: 20160307104222995.F32377000086@msfrf2411.sfr.fr Received: from nbhjo by nb-hjo (PGP Universal service); Mon, 07 Mar 2016 11:42:21 +0100 X-PGP-Universal: processed; by nb-hjo on Mon, 07 Mar 2016 11:42:21 +0100 From: Herve Jourdain To: openembedded-core@lists.openembedded.org References: <004901d1785c$fb27d0f0$f17772d0$@neuf.fr> In-Reply-To: <004901d1785c$fb27d0f0$f17772d0$@neuf.fr> Date: Mon, 7 Mar 2016 11:42:17 +0100 Message-ID: <005801d1785e$07915900$16b40b00$@neuf.fr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQHP4Vmgxw9eN8fN6lAZp6kcg4zXAZ9Q+RCA Subject: [systemd][PATCH] some dependencies in systemd seem not to be taken into account in systemd_229.bb X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 10:50:46 -0000 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0059_01D17866.69572090" Content-Language: fr ------=_NextPart_000_0059_01D17866.69572090 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Systemd: - RESOLVED depends on GCRYPT, so GCRYPT should be enabled if RESOLVED is enabled - ${PN}-binfmt should be added to SYSTEMD_PACKAGES only if binfmt is enabled Without this patch, build fails when gcrypt is not in PACKAGECONFIG, but resolved is, or when binfmt is not in PACKAGECONFIG. Signed-off-by: Herve Jourdain > --- diff --git a/meta/recipes-core/systemd/systemd_229.bb b/meta/recipes-core/systemd/systemd_229.bb index 16af0ac..6523e0a 100644 --- a/meta/recipes-core/systemd/systemd_229.bb +++ b/meta/recipes-core/systemd/systemd_229.bb @@ -97,11 +97,13 @@ PACKAGECONFIG_remove_libc-musl = "smack" PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" # Sign the journal for anti-tampering -PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt are NOT part of PACKAGECONFIG - done in EXTRA_OECONF +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,,libgcrypt" PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup" PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd" PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils" -PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" +# RESOLVED depends on GCRYPT, so enable gcrypt any time resolved is in PACKAGECONFIG +PACKAGECONFIG[resolved] = "--enable-resolved --enable-gcrypt,--disable-resolved,libgcrypt" PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd" PACKAGECONFIG[machined] = "--enable-machined,--disable-machined" PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight" @@ -180,6 +182,9 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ --with-firmware-path=/lib/firmware \ --with-testdir=${PTEST_PATH} \ " +# RESOLVED depends on GCRYPT, so disable gcrypt only if resolved and gcrypt are NOT part of PACKAGECONFIG +EXTRA_OECONF += "${@bb.utils.contains_any('PACKAGECONFIG', 'resolved gcrypt', '', '--disable-gcrypt', d)} " + # per the systemd README, define VALGRIND=1 to run under valgrind CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)} " @@ -196,6 +201,10 @@ do_configure_prepend() { else cp -r ${S}/units ${S}/units.pre_sed fi + if [ ${@bb.utils.contains('PACKAGECONFIG ', 'resolved', 'true', 'false', d)} -a \ + ! ${@bb.utils.contains('PACKAGECONFIG ', 'gcrypt', 'true', 'false', d)} ]; then + PACKAGECONFIG_append = "gcrypt" + fi } do_install() { @@ -298,8 +307,10 @@ PACKAGES =+ "\ ${PN}-extra-utils \ " -SYSTEMD_PACKAGES = "${PN}-binfmt" -SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" +#SYSTEMD_PACKAGES = "${PN}-binfmt" +#SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" +SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} " +SYSTEMD_SERVICE_${PN}-binfmt = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', 'systemd-binfmt.service', '', d)} " USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)} " ------=_NextPart_000_0059_01D17866.69572090 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Systemd: - RESOLVED depends on = GCRYPT, so GCRYPT should be enabled if RESOLVED is = enabled

          =        - ${PN}-binfmt should be added to = SYSTEMD_PACKAGES only if binfmt is enabled

Without this patch, build fails = when gcrypt is not in PACKAGECONFIG, but resolved is, or when binfmt is = not in PACKAGECONFIG.

 

Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>

---

diff --git a/meta/recipes-core/systemd/systemd_229.bb = b/meta/recipes-core/systemd/systemd_229.bb

index 16af0ac..6523e0a = 100644

--- = a/meta/recipes-core/systemd/systemd_229.bb

+++ = b/meta/recipes-core/systemd/systemd_229.bb

@@ -97,11 +97,13 @@ = PACKAGECONFIG_remove_libc-musl =3D = "smack"

 

 PACKAGECONFIG[journal-upload] =3D = "--enable-libcurl,--disable-libcurl,curl"

=

# Sign the journal for = anti-tampering

-PACKAGECONFIG[gcrypt] =3D = "--enable-gcrypt,--disable-gcrypt,libgcrypt"<= /p>

+# RESOLVED depends on = GCRYPT, so disable gcrypt only if resolved and gcrypt are NOT part of = PACKAGECONFIG - done in EXTRA_OECONF

+PACKAGECONFIG[gcrypt] =3D = "--enable-gcrypt,,libgcrypt"

PACKAGECONFIG[cryptsetup] =3D = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"

PACKAGECONFIG[microhttpd] =3D = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"

PACKAGECONFIG[elfutils] =3D = "--enable-elfutils,--disable-elfutils,elfutils"

<= p class=3DMsoNormal>-PACKAGECONFIG[resolved] =3D = "--enable-resolved,--disable-resolved"

+# RESOLVED depends on GCRYPT, so = enable gcrypt any time resolved is in = PACKAGECONFIG

+PACKAGECONFIG[resolved] =3D "--enable-resolved = --enable-gcrypt,--disable-resolved,libgcrypt"

<= p class=3DMsoNormal>PACKAGECONFIG[networkd] =3D = "--enable-networkd,--disable-networkd"

PACKAGECONFIG[machined] =3D = "--enable-machined,--disable-machined"

PACKAGECONFIG[backlight] =3D = "--enable-backlight,--disable-backlight"

<= p class=3DMsoNormal>@@ -180,6 +182,9 @@ EXTRA_OECONF = =3D " --with-rootprefix=3D${rootprefix} \

          =         = --with-firmware-path=3D/lib/firmware \

       =            --with-= testdir=3D${PTEST_PATH} \

          =       "

+# RESOLVED depends on GCRYPT, so = disable gcrypt only if resolved and gcrypt are NOT part of = PACKAGECONFIG

+EXTRA_OECONF +=3D "${@bb.utils.contains_any('P= ACKAGECONFIG', 'resolved gcrypt', '', '--disable-gcrypt', = d)}"

+

# per the systemd README, define VALGRIND=3D1 to run under = valgrind

CFLAGS .=3D "${@bb.utils.contains('PACKAGECONFIG', = 'valgrind', ' -DVALGRIND=3D1', '', d)}"

 

@@ -196,6 +201,10 @@ = do_configure_prepend() {

          =     else

          =             &= nbsp;      cp -r ${S}/units = ${S}/units.pre_sed

          =     fi

+          = ;   if [ ${@bb.utils.contain= s('PACKAGECONFIG', 'resolved', 'true', 'false', d)} -a = \

+         ! ${@bb.utils.contain= s('PACKAGECONFIG', 'gcrypt', 'true', 'false', d)} ]; = then

+          = ;            =      PACKAGECONFIG_append =3D = "gcrypt"

+          = ;   fi

}

 

 do_install() {

@@ -298,8 +307,10 @@ PACKAGES =3D+ = "\

     ${PN}-extra-utils = \

"

 

-SYSTEMD_PACKAGES =3D = "${PN}-binfmt"

-SYSTEMD_SERVICE_${PN}-binfmt =3D = "systemd-binfmt.service"

+#SYSTEMD_PACKAGES =3D = "${PN}-binfmt"

+#SYSTEMD_SERVICE_${PN}-binfmt =3D = "systemd-binfmt.service"

+SYSTEMD_PACKAGES =3D "${@bb.utils.contains('PACKAGECONFIG', = 'binfmt', '${PN}-binfmt', '', d)}"

+SYSTEMD_SERVICE_${PN}-binfmt =3D = "${@bb.utils.contains('PACKAGECONFIG'= , 'binfmt', 'systemd-binfmt.service', '', = d)}"

 

 USERADD_PACKAGES =3D = "${PN}"

USERADD_PARAM_${PN} +=3D "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', = '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', = d)}"

------=_NextPart_000_0059_01D17866.69572090--