Skip to contentSkip to conversation

inetutils: fix build with glibc-2.28

PATCH New Martin Jansa 1 participant 6 messages Aug 16, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 inetutils: fix build with glibc-2.28

* fixes:
../../inetutils-1.9.4/src/uucpd.c:236: error: undefined reference to 'crypt' ../../inetutils-1.9.4/src/rexecd.c:378: error: undefined reference to 'crypt'

---
 .../recipes-connectivity/inetutils/inetutils_1.9.4.bb           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb +1 -1
index 190cd5f142..a27dbae2e6 100644
@@ -4,7 +4,7 @@ rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
 talkd, telnet, telnetd, tftp, tftpd, and uucpd."
 HOMEPAGE = "http://www.gnu.org/software/inetutils"
 SECTION = "net"
-DEPENDS = "ncurses netbase readline"
+DEPENDS = "ncurses netbase readline virtual/crypt"
 
 LICENSE = "GPLv3"
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/6 pure-ftpd: fix build with glibc-2.28

* fixes:
../../pure-ftpd-1.0.42/src/pure-pw.c:243: error: undefined reference to 'crypt' ../../pure-ftpd-1.0.42/src/pure-pw.c:257: error: undefined reference to 'crypt' ../../pure-ftpd-1.0.42/src/pure-pw.c:272: error: undefined reference to 'crypt' ../../pure-ftpd-1.0.42/src/pure-pw.c:282: error: undefined reference to 'crypt'
collect2: error: ld returned 1 exit status

---
 meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb +1 -1
index c1f1504055..e5c5616460 100644
@@ -5,7 +5,7 @@ SECTION = "net"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=90352fb2bfe17f4261687a0d6e09f489"
 
-DEPENDS = "libcap"
+DEPENDS = "libcap virtual/crypt"
 
 
 SRC_URI = "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${PV}.tar.gz \
Signature · 1 line
2.17.1
#2 lore raw

PATCH 3/6 netkit-rsh: fix build with glibc-2.28

In reply to Martin Jansa

* fixes:
rexecd.c:79:10: fatal error: crypt.h: No such file or directory
...
ld: error: cannot find -lcrypt

---
 meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb +1 -1
index 3990f7b527..f08256d31e 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "netkit-rsh includes the rsh daemon and client."
 SECTION = "net"
 HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
 LICENSE = "BSD-4-Clause"
-DEPENDS = "xinetd libgcrypt"
+DEPENDS = "xinetd libgcrypt virtual/crypt"
 
 LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606"
 
Signature · 1 line
2.17.1
#3 lore raw

PATCH 4/6 uw-imap: fix build with glibc-2.28

In reply to Martin Jansa

* fixes:
ld: error: cannot find -lcrypt osdep.c:136: error: undefined reference to 'crypt' osdep.c:118: error: undefined reference to 'crypt'
collect2: error: ld returned 1 exit status

---
 meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/uw-imap/uw-imap_2007f.bb +1 -1
index 91003f6e93..4c055e54ca 100644
@@ -4,7 +4,7 @@ SECTION = "devel"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a6a4ddbb7cd2999f6827ee143f6fcd97"
 
-DEPENDS = "openssl"
+DEPENDS = "openssl virtual/crypt"
 
 SRC_URI = "https://fossies.org/linux/misc/old/imap-${PV}.tar.gz \
            file://quote_cctype.patch \
Signature · 1 line
2.17.1
#4 lore raw

PATCH 5/6 cfengine: remove cf-consumer.service cf-redis-server.service

In reply to Martin Jansa

* they were removed from 3.12.0 release, see:
https://github.com/cfengine/core/commit/8001b89c098c723f0b93b311da443e2197026d88
https://github.com/cfengine/core/commit/d8426c42c02edcfddcf785e34ac452a785b9ad3d
* fixes:
ERROR: SYSTEMD_SERVICE_cfengine value cf-consumer.service does not exist

---
 meta-oe/recipes-extended/cfengine/cfengine_3.12.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-extended/cfengine/cfengine_3.12.0.bb +2 -2
index aa33a97a4d..9d0123d8bd 100644
@@ -27,8 +27,8 @@ inherit autotools systemd
 export EXPLICIT_VERSION="${PV}"
 
 SYSTEMD_SERVICE_${PN} = "cfengine3.service cf-apache.service cf-hub.service cf-postgres.service \
-                         cf-runalerts.service cf-consumer.service cf-execd.service \
-                         cf-monitord.service  cf-redis-server.service  cf-serverd.service \
+                         cf-runalerts.service cf-execd.service \
+                         cf-monitord.service  cf-serverd.service \
 "
 SYSTEMD_AUTO_ENABLE_${PN} = "disable"
 
Signature · 1 line
2.17.1
#5 lore raw

PATCH 6/6 kernel-selftest: fix various issues

In reply to Martin Jansa

* respect PACKAGECONFIG when setting TEST_LIST
* call the sed in remove_clang_related only when bpf PACKAGECONFIG is
enabled and if ${S}/tools/testing/selftests/bpf/Makefile doesn't exist
then show more useful error message than:
sed: can't read kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/Makefile: No such file or directory
because kernels older than 4.10 don't have bpf selftest which was
added in:
https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d
* disable ldflags QA errors, the selftests Makefile explicitly overrides
LDFLAGS to empty:
https://github.com/torvalds/linux/blob/5aa5bd14c5f8660c64ceedf14a549781be47e53d/tools/testing/selftests/Makefile#L46
and the vm/Makefile doesn't respect LDFLAGS anyway:
https://github.com/torvalds/linux/blob/5aa5bd14c5f8660c64ceedf14a549781be47e53d/tools/testing/selftests/vm/Makefile#L17
so it was causing a lot of errors:
ERROR: kernel-selftest-1.0-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/thuge-gen' No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/thuge-gen'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/transhuge-stress'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/transhuge-stress'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/userfaultfd'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/userfaultfd'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/hugepage-shm'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/hugepage-shm'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/on-fault-limit'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/on-fault-limit'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/hugepage-mmap'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/hugepage-mmap'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/compaction_test'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/compaction_test'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/mlock2-tests'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/mlock2-tests'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/map_hugetlb'
No GNU_HASH in the elf binary: 'kernel-selftest/1.0-r0/packages-split/kernel-selftest/usr/kernel-selftest/vm/map_hugetlb' [ldflags]
* fix the formatting and useless append
* add dependency on rsync-native as it's used during do_install:

  | make: Entering directory 'kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/vm'
  | rsync -a  run_vmtests  compaction_test hugepage-mmap hugepage-shm map_hugetlb mlock2-tests on-fault-limit thuge-gen transhuge-stress userfaultfd kernel-selftest/1.0-r0/image/usr/kernel-selftest/vm/
  | /bin/sh: 1: rsync: not found
  | ../lib.mk:24: recipe for target 'install' failed
---
 .../kernel-selftest/kernel-selftest.bb        | 29 ++++++++++++-------
 1 file changed, 18 insertions(+), 11 deletions(-)
meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb +18 -11
index 27d98a3049..34a869d1fe 100644
@@ -2,14 +2,19 @@ SUMMARY = "Kernel selftest for Linux"
 DESCRIPTION = "Kernel selftest for Linux"
 LICENSE = "GPLv2"
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7 \
-"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+DEPENDS = "rsync-native"
 
 # for musl libc
 SRC_URI_libc-musl += "file://userfaultfd.patch \
                       file://0001-bpf-test_progs.c-add-support-for-musllibc.patch \
 "
 
+# now we just test bpf and vm
+# we will append other kernel selftest in the future
+# bpf was added in 4.10 with: https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d
+# if you have older kernel than that you need to remove it from PACKAGECONFIG
 PACKAGECONFIG ??= "bpf vm"
 
 PACKAGECONFIG[bpf] = ",,elfutils libcap libcap-ng rsync-native,"
@@ -23,10 +28,8 @@ do_populate_lic[depends] += "virtual/kernel:do_patch"
 
 S = "${WORKDIR}/${BP}"
 
-# now we just test bpf and vm
-# we will append other kernel selftest in the future
-TEST_LIST = "bpf \
-             vm \
+TEST_LIST = " \
+    ${@bb.utils.filter('PACKAGECONFIG', 'bpf vm', d)} \
 "
 
 EXTRA_OEMAKE = '\
@@ -35,12 +38,9 @@ EXTRA_OEMAKE = '\
     CC="${CC}" \
     AR="${AR}" \
     LD="${LD}" \
+    DESTDIR="${D}" \
 '
 
-EXTRA_OEMAKE += "\
-    'DESTDIR=${D}' \
-"
-
 KERNEL_SELFTEST_SRC ?= "Makefile \
                         include \
                         tools \
@@ -95,10 +95,17 @@ python copy_kselftest_source_from_kernel() {
 }
 
 remove_clang_related() {
-	sed -i -e '/test_pkt_access/d' -e '/test_pkt_md_access/d' ${S}/tools/testing/selftests/bpf/Makefile
+    if ${@bb.utils.contains('PACKAGECONFIG','bpf','true','false',d)} ; then
+        test -f ${S}/tools/testing/selftests/bpf/Makefile && \
+            sed -i -e '/test_pkt_access/d' -e '/test_pkt_md_access/d' ${S}/tools/testing/selftests/bpf/Makefile || \
+            bberror "Your kernel is probably older than 4.10 and doesn't have tools/testing/selftests/bpf/Makefile file from https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d, disable bpf PACKAGECONFIG"
+    fi
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 INHIBIT_PACKAGE_DEBUG_SPLIT="1"
 FILES_${PN} += "/usr/kernel-selftest"
+
+# tools/testing/selftests/vm/Makefile doesn't respect LDFLAGS and tools/testing/selftests/Makefile explicitly overrides to empty
+INSANE_SKIP_${PN} += "ldflags"
Signature · 1 line
2.17.1