Skip to contentSkip to conversation

netplan: Depend on systemd if its in distro

PATCH In review Khem Raj 3 participants 6 messages May 16, 2020 – May 17, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 netplan: Depend on systemd if its in distro

it needs to link with libsystemd when using systemd as init system Fixes
Package libsystemd was not found in the pkg-config search path. Perhaps you should add the directory containing `libsystemd.pc' to the PKG_CONFIG_PATH environment variable

---
 meta-networking/recipes-connectivity/netplan/netplan_0.98.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +2 -1
index db029a4b8a..15c4968132 100644
@@ -18,7 +18,8 @@ SRC_URI = " \
         git://github.com/CanonicalLtd/netplan.git \
 "
 
-DEPENDS = "glib-2.0 libyaml"
+DEPENDS = "glib-2.0 libyaml ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
+
 RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid"
 
 inherit pkgconfig systemd
Signature · 1 line
2.26.2
author
#1 lore raw

PATCH 2/3 postfix: Upgrade to 3.4.10 and compile with -fcommon

Ensures it can build with gcc10

---
 meta-networking/recipes-daemons/postfix/postfix.inc           | 2 +-
 .../postfix/{postfix_3.4.8.bb => postfix_3.4.10.bb}           | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
 rename meta-networking/recipes-daemons/postfix/{postfix_3.4.8.bb => postfix_3.4.10.bb} (84%)
meta-networking/recipes-daemons/postfix/postfix.inc +1 -1
index 4b9940cc7a..a8d55a6c93 100644
@@ -61,7 +61,7 @@ export CCARGS-sasl_class-native = ""
 export AUXLIBS-sasl_class-native = ""
 
 # PCRE, TLS support default
-export CCARGS  = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}"
+export CCARGS  = "${CFLAGS} -fcommon -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}"
 export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
 export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
 
meta-networking/recipes-daemons/postfix/postfix_3.4.10.bb renamed from meta-networking/recipes-daemons/postfix/postfix_3.4.8.bb +1 -3
similarity index 84%
rename from meta-networking/recipes-daemons/postfix/postfix_3.4.8.bb
rename to meta-networking/recipes-daemons/postfix/postfix_3.4.10.bb
index 5d7f8bc9f9..d0ef708c50 100644
@@ -15,7 +15,5 @@ SRC_URI += "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${P
            file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \
            file://0001-Fixed-build-failure-with-glibc-2.30-due-to-dropped-R.patch \
            "
-SRC_URI[md5sum] = "6944b946887077a28e3dcb375ff53701"
-SRC_URI[sha256sum] = "8d5d429737e0c64514028a82fc006cbb273d2cb98dc40eb1dbbfe102f29a8943"
-
+SRC_URI[sha256sum] = "908a66fc38537a0047e8561e1bc0ef096c53357ffad16d2d728cd4fc8ae56654"
 UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz"
Signature · 1 line
2.26.2
author
#2 lore raw

PATCH 3/3 uim: Add patch to fix -fno-common link error

In reply to Khem Raj

This is unearthed by gcc10 like below

| /mnt/b/yoe/master/build/tmp/hosttools/ld: .libs/gcroots.o:(.bss+0x0): multiple definition of `GCROOTS_jmp_buf'; .libs/mark.o:(.bss+0x0): first defined here
| /mnt/b/yoe/master/build/tmp/hosttools/ld: .libs/mach_dep.o:(.bss+0x0): multiple definition of `GCROOTS_jmp_buf'; .libs/mark.o:(.bss+0x0): first defined here
| collect2: error: ld returned 1 exit status
---
 .../uim/uim/JMP_BUF_GC_jmp_buf.patch              | 15 +++++++++++++++
 meta-oe/recipes-support/uim/uim_1.8.8.bb          |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 meta-oe/recipes-support/uim/uim/JMP_BUF_GC_jmp_buf.patch
meta-oe/recipes-support/uim/uim/JMP_BUF_GC_jmp_buf.patch new file +15 -0
new file mode 100644
index 0000000000..adb9c4b06b
@@ -0,0 +1,15 @@
+Fix error pointed out by gcc10
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/sigscheme/libgcroots/include/private/gc_priv.h
++++ b/sigscheme/libgcroots/include/private/gc_priv.h
+@@ -2026,7 +2026,7 @@ void GC_err_puts(const char *s);
+ 
+ # if defined(NEED_FIND_LIMIT) || \
+      defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)
+-JMP_BUF GC_jmp_buf;
++extern JMP_BUF GC_jmp_buf;
+ 
+ /* Set up a handler for address faults which will longjmp to	*/
+ /* GC_jmp_buf;							*/
meta-oe/recipes-support/uim/uim_1.8.8.bb +1 -0
index 0366ad85ae..507a341445 100644
@@ -6,6 +6,7 @@ SECTION = "inputmethods"
 
 SRC_URI = "https://github.com/uim/uim/releases/download/${PV}/uim-${PV}.tar.bz2 \
     file://0001-Fix-to-set-libedit-path-from-configure-option-proper.patch \
+    file://JMP_BUF_GC_jmp_buf.patch \
 "
 SRC_URI_append_class-target = "\
     file://uim-module-manager.patch \
Signature · 1 line
2.26.2
#3 lore raw
In reply to Khem Raj
Quoted 7 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Khem Raj
Sent: den 16 maj 2020 18:26
To: [email protected]
Cc: Khem Raj <[email protected]>
Subject: [oe] [meta-networking][PATCH 1/3] netplan: Depend on systemd if its in distro

Change "its" to "it is".

Quoted 18 lines

it needs to link with libsystemd when using systemd as init system Fixes
Package libsystemd was not found in the pkg-config search path. Perhaps you should add the directory containing `libsystemd.pc' to the PKG_CONFIG_PATH environment variable

---
 meta-networking/recipes-connectivity/netplan/netplan_0.98.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +0 -0
index db029a4b8a..15c4968132 100644

meta-networking/recipes-connectivity/netplan/netplan_0.98.bb SRC_URI = " \ · line 21

Quoted 5 lines
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +1 -1
@@ -18,7 +18,8 @@ SRC_URI = " \
         git://github.com/CanonicalLtd/netplan.git \
 "
 
-DEPENDS = "glib-2.0 libyaml"
+DEPENDS = "glib-2.0 libyaml ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"

That can be simplified to:

DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"

Quoted 6 lines
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +1 -1
+
 RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid"
 
 inherit pkgconfig systemd
--

2.26.2

//Peter

author
#4 lore raw

Updated.

Quoted 48 lines · Peter Kjellerstedt
Quoted 8 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Khem Raj
Sent: den 16 maj 2020 18:26
To: [email protected]
Cc: Khem Raj <[email protected]>
Subject: [oe] [meta-networking][PATCH 1/3] netplan: Depend on systemd if its in distro

Change "its" to "it is".

Quoted 18 lines

it needs to link with libsystemd when using systemd as init system Fixes
Package libsystemd was not found in the pkg-config search path. Perhaps you should add the directory containing `libsystemd.pc' to the PKG_CONFIG_PATH environment variable

---
 meta-networking/recipes-connectivity/netplan/netplan_0.98.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +0 -0
index db029a4b8a..15c4968132 100644

meta-networking/recipes-connectivity/netplan/netplan_0.98.bb SRC_URI = " \ · line 21

Quoted 5 lines
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +1 -1
@@ -18,7 +18,8 @@ SRC_URI = " \
         git://github.com/CanonicalLtd/netplan.git \
 "
 
-DEPENDS = "glib-2.0 libyaml"
+DEPENDS = "glib-2.0 libyaml ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"

That can be simplified to:

DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"

Quoted 6 lines
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +1 -1
+
 RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid"
 
 inherit pkgconfig systemd
--

2.26.2

//Peter

Acked-by
#5 lore raw

It's needed in dunfell as well.

FWIW: the error message is complaining about glib.h, because it's calling pkg-config directly in Makefile and the libsystemd fails first

netplan-dbus: src/dbus.c

        $(CC) $(BUILDFLAGS) $(CFLAGS) -o $@ $^ `pkg-config --cflags --libs

libsystemd glib-2.0`

ERROR: netplan-0.98+gitAUTOINC+5d22e9d22c-r0 do_configure: Execution of '/jenkins/mjansa/build/nodistro/dunfell/BUILD/work/core2-32-oe-linux/netplan/0.98+gitAUTOINC+5d22e9d22c-r0/temp/run.do_configure.76533'
failed with exit code 1:
i686-oe-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse
-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/jenkins/mjansa/build/nodistro/dunfell/BUILD/work/core2-32-oe-linux/netplan/0.98+gitAUTOINC+5d22e9d22c-r0/recipe-sysroot
-std=c99 -D_XOPEN_SOURCE=500 -DSBINDIR=\"/usr/sbin\" -Wall -Werror -O2
-pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/jenkins/mjansa/build/nodistro/dunfell/BUILD/work/core2-32-oe-linux/netplan/0.98+gitAUTOINC+5d22e9d22c-r0=/usr/src/debug/netplan/0.98+gitAUTOINC+5d22e9d22c-r0

-fdebug-prefix-map=/jenkins/mjansa/build/nodistro/dunfell/BUILD/work/core2-32-oe-linux/netplan/0.98+gitAUTOINC+5d22e9d22c-r0=/usr/src/debug/netplan/0.98+gitAUTOINC+5d22e9d22c-r0

-fdebug-prefix-map=/jenkins/mjansa/build/nodistro/dunfell/BUILD/work/core2-32-oe-linux/netplan/0.98+gitAUTOINC+5d22e9d22c-r0/recipe-sysroot=

-fdebug-prefix-map=/jenkins/mjansa/build/nodistro/dunfell/BUILD/work/core2-32-oe-linux/netplan/0.98+gitAUTOINC+5d22e9d22c-r0/recipe-sysroot-native= -o netplan-dbus src/dbus.c pkg-config --cflags --libs libsystemd glib-2.0
Package libsystemd was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd' found
src/dbus.c:9:10: fatal error: glib.h: No such file or directory

    9 | #include <glib.h>
      |          ^~~~~~~~

compilation terminated.
Makefile:35: recipe for target 'netplan-dbus' failed
make: *** [netplan-dbus] Error 1
WARNING: exit code 1 from a shell command.

Quoted 60 lines · Khem Raj

Updated.

Quoted 8 lines · Peter Kjellerstedt
Quoted 8 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Khem Raj
Sent: den 16 maj 2020 18:26
To: [email protected]
Cc: Khem Raj <[email protected]>
Subject: [oe] [meta-networking][PATCH 1/3] netplan: Depend on systemd

if its in distro

Quoted 10 lines

Change "its" to "it is".

Quoted 7 lines

it needs to link with libsystemd when using systemd as init system Fixes
Package libsystemd was not found in the pkg-config search path. Perhaps you should add the directory containing `libsystemd.pc' to the PKG_CONFIG_PATH environment variable

Quoted 6 lines

Review

Quoted 6 lines
---
 meta-networking/recipes-connectivity/netplan/netplan_0.98.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

netplan_0.98.bb

Quoted 10 lines

meta-networking/recipes-connectivity/netplan/netplan_0.98.bb SRC_URI = " \ · line 21

Quoted 10 lines

b/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb index db029a4b8a..15c4968132 100644

meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +1 -1
@@ -18,7 +18,8 @@ SRC_URI = " \
         git://github.com/CanonicalLtd/netplan.git \
 "
 
-DEPENDS = "glib-2.0 libyaml"
+DEPENDS = "glib-2.0 libyaml

${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"

Quoted 4 lines

That can be simplified to:

DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES',

'systemd', d)}"

Quoted 3 lines

meta-networking/recipes-connectivity/netplan/netplan_0.98.bb SRC_URI = " \ · line 23

Quoted 3 lines
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +1 -0
+
 RDEPENDS_${PN} = "python3 python3-core python3-pyyaml

python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid"

Quoted 7 lines
Quoted 4 lines
meta-networking/recipes-connectivity/netplan/netplan_0.98.bb +0 -1
 inherit pkgconfig systemd
--

2.26.2

//Peter