1 |
commit: a0f6c8a85d86246d1f459d01bf1aa20803774bb3 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 28 03:31:38 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 28 03:32:06 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0f6c8a8 |
7 |
|
8 |
sys-apps/iproute2: fix automagic deps; fix merged /usr install |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
...te2-5.18.0.ebuild => iproute2-5.18.0-r1.ebuild} | 52 ++++++++++++++++++---- |
13 |
sys-apps/iproute2/iproute2-9999.ebuild | 52 ++++++++++++++++++---- |
14 |
sys-apps/iproute2/metadata.xml | 1 + |
15 |
3 files changed, 89 insertions(+), 16 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/iproute2/iproute2-5.18.0.ebuild b/sys-apps/iproute2/iproute2-5.18.0-r1.ebuild |
18 |
similarity index 79% |
19 |
rename from sys-apps/iproute2/iproute2-5.18.0.ebuild |
20 |
rename to sys-apps/iproute2/iproute2-5.18.0-r1.ebuild |
21 |
index b2d044b4661d..c0e45a9ec79e 100644 |
22 |
--- a/sys-apps/iproute2/iproute2-5.18.0.ebuild |
23 |
+++ b/sys-apps/iproute2/iproute2-5.18.0-r1.ebuild |
24 |
@@ -18,7 +18,7 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2" |
25 |
|
26 |
LICENSE="GPL-2" |
27 |
SLOT="0" |
28 |
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nis selinux" |
29 |
+IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr" |
30 |
|
31 |
# We could make libmnl optional, but it's tiny, so eh |
32 |
RDEPEND=" |
33 |
@@ -31,7 +31,7 @@ RDEPEND=" |
34 |
elf? ( virtual/libelf:= ) |
35 |
iptables? ( >=net-firewall/iptables-1.4.20:= ) |
36 |
libbsd? ( dev-libs/libbsd ) |
37 |
- nis? ( net-libs/libnsl:= ) |
38 |
+ nfs? ( net-libs/libtirpc:= ) |
39 |
selinux? ( sys-libs/libselinux ) |
40 |
" |
41 |
# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876) |
42 |
@@ -107,8 +107,42 @@ src_configure() { |
43 |
# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242) |
44 |
edo ./configure --libbpf_force $(usex bpf on off) |
45 |
|
46 |
- # ...now switch on/off requested features via USE flags |
47 |
+ # Remove the definitions made by configure and allow them to be overridden |
48 |
+ # by USE flags below. |
49 |
+ # We have to do the cheesy only-sed-if-disabled because otherwise |
50 |
+ # the *_FLAGS etc stuff found by configure will be used but result |
51 |
+ # in a broken build. |
52 |
+ if ! use berkdb ; then |
53 |
+ sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die |
54 |
+ fi |
55 |
+ |
56 |
+ if ! use caps ; then |
57 |
+ sed -i -e '/HAVE_CAP/d' config.mk || die |
58 |
+ fi |
59 |
+ |
60 |
+ if use minimal ; then |
61 |
+ sed -i -e '/HAVE_MNL/d' config.mk || die |
62 |
+ fi |
63 |
+ |
64 |
+ if ! use elf ; then |
65 |
+ sed -i -e '/HAVE_ELF/d' config.mk || die |
66 |
+ fi |
67 |
+ |
68 |
+ if ! use nfs ; then |
69 |
+ sed -i -e '/HAVE_RPC/d' config.mk || die |
70 |
+ fi |
71 |
+ |
72 |
+ if ! use selinux ; then |
73 |
+ sed -i -e '/HAVE_SELINUX/d' config.mk || die |
74 |
+ fi |
75 |
+ |
76 |
+ if ! use libbsd ; then |
77 |
+ sed -i -e '/HAVE_LIBBSD/d' config.mk || die |
78 |
+ fi |
79 |
+ |
80 |
+ # ...Now switch on/off requested features via USE flags |
81 |
# this is only useful if the test did not set other things, per bug #643722 |
82 |
+ # Keep in sync with ifs above, or refactor to be unified. |
83 |
cat <<-EOF >> config.mk |
84 |
TC_CONFIG_ATM := $(usex atm y n) |
85 |
TC_CONFIG_XT := $(usex iptables y n) |
86 |
@@ -119,7 +153,7 @@ src_configure() { |
87 |
HAVE_CAP := $(usex caps y n) |
88 |
HAVE_MNL := $(usex minimal n y) |
89 |
HAVE_ELF := $(usex elf y n) |
90 |
- HAVE_RPC := $(usex nis y n) |
91 |
+ HAVE_RPC := $(usex nfs y n) |
92 |
HAVE_SELINUX := $(usex selinux y n) |
93 |
IP_CONFIG_SETNS := ${setns} |
94 |
# Use correct iptables dir, bug #144265, bug #293709 |
95 |
@@ -158,10 +192,12 @@ src_install() { |
96 |
insinto /usr/include |
97 |
doins include/libnetlink.h |
98 |
|
99 |
- # Can remove compatibility symlink in a year: 2023-05-28. |
100 |
- # bug #547264 |
101 |
- mv "${ED}"/sbin/ss "${ED}"/bin/ss || die |
102 |
- dosym8 -r /bin/ss /sbin/ss |
103 |
+ if use split-usr ; then |
104 |
+ # Can remove compatibility symlink in a year: 2023-05-28. |
105 |
+ # bug #547264 |
106 |
+ mv "${ED}"/sbin/ss "${ED}"/bin/ss || die |
107 |
+ dosym8 -r /bin/ss /sbin/ss |
108 |
+ fi |
109 |
|
110 |
if use berkdb ; then |
111 |
keepdir /var/lib/arpd |
112 |
|
113 |
diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild |
114 |
index b2d044b4661d..c0e45a9ec79e 100644 |
115 |
--- a/sys-apps/iproute2/iproute2-9999.ebuild |
116 |
+++ b/sys-apps/iproute2/iproute2-9999.ebuild |
117 |
@@ -18,7 +18,7 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2" |
118 |
|
119 |
LICENSE="GPL-2" |
120 |
SLOT="0" |
121 |
-IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nis selinux" |
122 |
+IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nfs selinux split-usr" |
123 |
|
124 |
# We could make libmnl optional, but it's tiny, so eh |
125 |
RDEPEND=" |
126 |
@@ -31,7 +31,7 @@ RDEPEND=" |
127 |
elf? ( virtual/libelf:= ) |
128 |
iptables? ( >=net-firewall/iptables-1.4.20:= ) |
129 |
libbsd? ( dev-libs/libbsd ) |
130 |
- nis? ( net-libs/libnsl:= ) |
131 |
+ nfs? ( net-libs/libtirpc:= ) |
132 |
selinux? ( sys-libs/libselinux ) |
133 |
" |
134 |
# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876) |
135 |
@@ -107,8 +107,42 @@ src_configure() { |
136 |
# Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242) |
137 |
edo ./configure --libbpf_force $(usex bpf on off) |
138 |
|
139 |
- # ...now switch on/off requested features via USE flags |
140 |
+ # Remove the definitions made by configure and allow them to be overridden |
141 |
+ # by USE flags below. |
142 |
+ # We have to do the cheesy only-sed-if-disabled because otherwise |
143 |
+ # the *_FLAGS etc stuff found by configure will be used but result |
144 |
+ # in a broken build. |
145 |
+ if ! use berkdb ; then |
146 |
+ sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die |
147 |
+ fi |
148 |
+ |
149 |
+ if ! use caps ; then |
150 |
+ sed -i -e '/HAVE_CAP/d' config.mk || die |
151 |
+ fi |
152 |
+ |
153 |
+ if use minimal ; then |
154 |
+ sed -i -e '/HAVE_MNL/d' config.mk || die |
155 |
+ fi |
156 |
+ |
157 |
+ if ! use elf ; then |
158 |
+ sed -i -e '/HAVE_ELF/d' config.mk || die |
159 |
+ fi |
160 |
+ |
161 |
+ if ! use nfs ; then |
162 |
+ sed -i -e '/HAVE_RPC/d' config.mk || die |
163 |
+ fi |
164 |
+ |
165 |
+ if ! use selinux ; then |
166 |
+ sed -i -e '/HAVE_SELINUX/d' config.mk || die |
167 |
+ fi |
168 |
+ |
169 |
+ if ! use libbsd ; then |
170 |
+ sed -i -e '/HAVE_LIBBSD/d' config.mk || die |
171 |
+ fi |
172 |
+ |
173 |
+ # ...Now switch on/off requested features via USE flags |
174 |
# this is only useful if the test did not set other things, per bug #643722 |
175 |
+ # Keep in sync with ifs above, or refactor to be unified. |
176 |
cat <<-EOF >> config.mk |
177 |
TC_CONFIG_ATM := $(usex atm y n) |
178 |
TC_CONFIG_XT := $(usex iptables y n) |
179 |
@@ -119,7 +153,7 @@ src_configure() { |
180 |
HAVE_CAP := $(usex caps y n) |
181 |
HAVE_MNL := $(usex minimal n y) |
182 |
HAVE_ELF := $(usex elf y n) |
183 |
- HAVE_RPC := $(usex nis y n) |
184 |
+ HAVE_RPC := $(usex nfs y n) |
185 |
HAVE_SELINUX := $(usex selinux y n) |
186 |
IP_CONFIG_SETNS := ${setns} |
187 |
# Use correct iptables dir, bug #144265, bug #293709 |
188 |
@@ -158,10 +192,12 @@ src_install() { |
189 |
insinto /usr/include |
190 |
doins include/libnetlink.h |
191 |
|
192 |
- # Can remove compatibility symlink in a year: 2023-05-28. |
193 |
- # bug #547264 |
194 |
- mv "${ED}"/sbin/ss "${ED}"/bin/ss || die |
195 |
- dosym8 -r /bin/ss /sbin/ss |
196 |
+ if use split-usr ; then |
197 |
+ # Can remove compatibility symlink in a year: 2023-05-28. |
198 |
+ # bug #547264 |
199 |
+ mv "${ED}"/sbin/ss "${ED}"/bin/ss || die |
200 |
+ dosym8 -r /bin/ss /sbin/ss |
201 |
+ fi |
202 |
|
203 |
if use berkdb ; then |
204 |
keepdir /var/lib/arpd |
205 |
|
206 |
diff --git a/sys-apps/iproute2/metadata.xml b/sys-apps/iproute2/metadata.xml |
207 |
index ab92eca64ca4..10e4c7acb786 100644 |
208 |
--- a/sys-apps/iproute2/metadata.xml |
209 |
+++ b/sys-apps/iproute2/metadata.xml |
210 |
@@ -12,6 +12,7 @@ |
211 |
<flag name="iptables">include support for iptables filtering</flag> |
212 |
<flag name="libbsd">Use <pkg>dev-libs/libbsd</pkg> instead of internal funcs</flag> |
213 |
<flag name="minimal">only install ip and tc programs, without eBPF support</flag> |
214 |
+ <flag name="nfs">Support RPC lookups via <pkg>net-libs/libtirpc</pkg> in ss</flag> |
215 |
</use> |
216 |
<upstream> |
217 |
<remote-id type="cpe">cpe:/a:iproute2_project:iproute2</remote-id> |