summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2020-02-13 10:00:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-14 13:07:23 +0000
commit3070342f0ec68b44e191298d7c9357e9a9eada9a (patch)
tree41e22091b0ab3f888fe8a2c6ba184f97b9022729 /meta/recipes-extended
parente2fa65d1acd4d27c5506602a4ad90318f04966d4 (diff)
downloadpoky-3070342f0ec68b44e191298d7c9357e9a9eada9a.tar.gz
iputils: Fix systemd and ipv6 detection
When systemd is enabled, ensure iputils detects it correctly. Split out IPv6 only features based on ipv6 enabled in DISTRO_FEATURES. (From OE-Core rev: e742e5f711d46b1664cc5bec2f788dc0e020ccaa) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch28
-rw-r--r--meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch46
-rw-r--r--meta/recipes-extended/iputils/iputils_s20190709.bb23
3 files changed, 91 insertions, 6 deletions
diff --git a/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch b/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
new file mode 100644
index 0000000000..03a3f5602d
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
@@ -0,0 +1,28 @@
1From c1f1527eb30d4a5feebf9a0757582bbf7fe3eae9 Mon Sep 17 00:00:00 2001
2From: Andrea Stevanato <andrea.stevanato.95@hotmail.it>
3Date: Tue, 5 Nov 2019 19:08:30 +0000
4Subject: [PATCH] ninfod: fix systemd Documentation url error
5
6systemd[1]: /usr/lib/systemd/system/ninfod.service:3: Invalid URL, ignoring: ninfod(8)
7
8Upstream-Status: Backport [https://github.com/iputils/iputils/commit/c1f1527eb30d4a5feebf9a0757582bbf7fe3eae9]
9Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
10---
11 systemd/ninfod.service.in | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/systemd/ninfod.service.in b/systemd/ninfod.service.in
15index 5ab69ca00e96..8e79fcd9238e 100644
16--- a/systemd/ninfod.service.in
17+++ b/systemd/ninfod.service.in
18@@ -1,6 +1,6 @@
19 [Unit]
20 Description=Respond to IPv6 Node Information Queries
21-Documentation=ninfod(8)
22+Documentation=man:ninfod(8)
23 Requires=network.target
24 After=network.target
25
26--
272.17.1
28
diff --git a/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
new file mode 100644
index 0000000000..d7367caf78
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
@@ -0,0 +1,46 @@
1From 6e51d529988cfc0bb357751fd767e9f1478e2b81 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Thu, 13 Feb 2020 06:08:45 +0000
4Subject: [PATCH] rarpd: rdisc: Drop PrivateUsers
5
6Neither rarpd nor rdisc can gain the necessary capabilities with
7PrivateUsers enabled.
8
9Upstream-Status: Pending
10Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
11---
12 systemd/rarpd.service.in | 1 -
13 systemd/rdisc.service.in | 3 ++-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/systemd/rarpd.service.in b/systemd/rarpd.service.in
17index e600c10c93e6..f5d7621a7ce8 100644
18--- a/systemd/rarpd.service.in
19+++ b/systemd/rarpd.service.in
20@@ -12,7 +12,6 @@ AmbientCapabilities=CAP_NET_RAW
21 DynamicUser=yes
22 PrivateTmp=yes
23 PrivateDevices=yes
24-PrivateUsers=yes
25 ProtectSystem=strict
26 ProtectHome=yes
27 ProtectControlGroups=yes
28diff --git a/systemd/rdisc.service.in b/systemd/rdisc.service.in
29index 4e2a1ec9d0e5..a71b87d36b37 100644
30--- a/systemd/rdisc.service.in
31+++ b/systemd/rdisc.service.in
32@@ -8,9 +8,10 @@ After=network.target
33 EnvironmentFile=-/etc/sysconfig/rdisc
34 ExecStart=@sbindir@/rdisc -f -t $OPTIONS $SEND_ADDRESS $RECEIVE_ADDRESS
35
36+CapabilityBoundingSet=CAP_NET_RAW
37 AmbientCapabilities=CAP_NET_RAW
38 PrivateTmp=yes
39-PrivateUsers=yes
40+DynamicUser=yes
41 ProtectSystem=strict
42 ProtectHome=yes
43 ProtectControlGroups=yes
44--
452.17.1
46
diff --git a/meta/recipes-extended/iputils/iputils_s20190709.bb b/meta/recipes-extended/iputils/iputils_s20190709.bb
index e0d2ae160e..2aed6b56ca 100644
--- a/meta/recipes-extended/iputils/iputils_s20190709.bb
+++ b/meta/recipes-extended/iputils/iputils_s20190709.bb
@@ -12,6 +12,8 @@ DEPENDS = "gnutls"
12 12
13SRC_URI = "git://github.com/iputils/iputils \ 13SRC_URI = "git://github.com/iputils/iputils \
14 file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \ 14 file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \
15 file://0001-ninfod-fix-systemd-Documentation-url-error.patch \
16 file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \
15 " 17 "
16SRCREV = "13e00847176aa23683d68fce1d17ffb523510946" 18SRCREV = "13e00847176aa23683d68fce1d17ffb523510946"
17 19
@@ -23,16 +25,20 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)"
23# breaks the version order. 25# breaks the version order.
24CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214" 26CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214"
25 27
26PACKAGECONFIG ??= "libcap libgcrypt rarpd traceroute6" 28PACKAGECONFIG ??= "libcap libgcrypt rarpd \
29 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ninfod traceroute6', '', d)} \
30 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
27PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap" 31PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap"
28PACKAGECONFIG[libgcrypt] = "-DUSE_CRYPTO=gcrypt, -DUSE_CRYPTO=none, libgcrypt" 32PACKAGECONFIG[libgcrypt] = "-DUSE_CRYPTO=gcrypt, -DUSE_CRYPTO=none, libgcrypt"
29PACKAGECONFIG[libidn] = "-DUSE_IDN=true, -DUSE_IDN=false, libidn2" 33PACKAGECONFIG[libidn] = "-DUSE_IDN=true, -DUSE_IDN=false, libidn2"
30PACKAGECONFIG[gettext] = "-DUSE_GETTEXT=true, -DUSE_GETTEXT=false, gettext" 34PACKAGECONFIG[gettext] = "-DUSE_GETTEXT=true, -DUSE_GETTEXT=false, gettext"
35PACKAGECONFIG[ninfod] = "-DBUILD_NINFOD=true,-DBUILD_NINFOD=false,"
31PACKAGECONFIG[rarpd] = "-DBUILD_RARPD=true,-DBUILD_RARPD=false," 36PACKAGECONFIG[rarpd] = "-DBUILD_RARPD=true,-DBUILD_RARPD=false,"
37PACKAGECONFIG[systemd] = "-Dsystemdunitdir=${systemd_unitdir}/system,,systemd"
32PACKAGECONFIG[traceroute6] = "-DBUILD_TRACEROUTE6=true,-DBUILD_TRACEROUTE6=false," 38PACKAGECONFIG[traceroute6] = "-DBUILD_TRACEROUTE6=true,-DBUILD_TRACEROUTE6=false,"
33PACKAGECONFIG[docs] = "-DBUILD_HTML_MANS=true -DBUILD_MANS=true,-DBUILD_HTML_MANS=false -DBUILD_MANS=false, libxslt" 39PACKAGECONFIG[docs] = "-DBUILD_HTML_MANS=true -DBUILD_MANS=true,-DBUILD_HTML_MANS=false -DBUILD_MANS=false, libxslt"
34 40
35inherit meson update-alternatives 41inherit meson systemd update-alternatives
36 42
37# Have to disable setcap/suid as its not deterministic 43# Have to disable setcap/suid as its not deterministic
38EXTRA_OEMESON += "--prefix=${root_prefix}/ -DNO_SETCAP_OR_SUID=true" 44EXTRA_OEMESON += "--prefix=${root_prefix}/ -DNO_SETCAP_OR_SUID=true"
@@ -42,12 +48,12 @@ ALTERNATIVE_PRIORITY = "100"
42ALTERNATIVE_${PN}-ping = "ping" 48ALTERNATIVE_${PN}-ping = "ping"
43ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" 49ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
44 50
45SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff ${PN}-tftpd ${PN}-rarpd ${PN}-rdisc ${PN}-ninfod" 51SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff ${PN}-tftpd ${PN}-rdisc \
52 ${@bb.utils.contains('PACKAGECONFIG', 'rarpd', '${PN}-rarpd', '', d)} \
53 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-traceroute6 ${PN}-ninfod', '', d)}"
46PACKAGES += "${SPLITPKGS}" 54PACKAGES += "${SPLITPKGS}"
47 55
48ALLOW_EMPTY_${PN} = "1" 56ALLOW_EMPTY_${PN} = "1"
49ALLOW_EMPTY_${PN}-rarpd = "1"
50ALLOW_EMPTY_${PN}-traceroute6 = "1"
51RDEPENDS_${PN} += "${SPLITPKGS}" 57RDEPENDS_${PN} += "${SPLITPKGS}"
52 58
53FILES_${PN} = "" 59FILES_${PN} = ""
@@ -57,6 +63,11 @@ FILES_${PN}-tracepath = "${base_bindir}/tracepath"
57FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" 63FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
58FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" 64FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
59FILES_${PN}-tftpd = "${base_bindir}/tftpd" 65FILES_${PN}-tftpd = "${base_bindir}/tftpd"
60FILES_${PN}-rarpd = "${base_sbindir}/rarpd" 66FILES_${PN}-rarpd = "${base_sbindir}/rarpd ${systemd_unitdir}/system/rarpd@.service"
61FILES_${PN}-rdisc = "${base_sbindir}/rdisc" 67FILES_${PN}-rdisc = "${base_sbindir}/rdisc"
62FILES_${PN}-ninfod = "${base_sbindir}/ninfod ${sysconfdir}/init.d/ninfod.sh" 68FILES_${PN}-ninfod = "${base_sbindir}/ninfod ${sysconfdir}/init.d/ninfod.sh"
69
70SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '${PN}-ninfod', '', d)} \
71 ${PN}-rdisc"
72SYSTEMD_SERVICE_${PN}-ninfod = "ninfod.service"
73SYSTEMD_SERVICE_${PN}-rdisc = "rdisc.service"