Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/
Date: Sat, 28 May 2022 02:52:35
Message-Id: 1653706340.5ccf7bd5334ae6f3d5577b638ef793a295d4e0f0.sam@gentoo
1 commit: 5ccf7bd5334ae6f3d5577b638ef793a295d4e0f0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 28 02:38:50 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat May 28 02:52:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ccf7bd5
7
8 sys-apps/iproute2: add 5.18.0
9
10 Moves /sbin/ss -> /bin/ss with a compatibility symlink in /sbin.
11
12 Closes: https://bugs.gentoo.org/547264
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 sys-apps/iproute2/Manifest | 1 +
16 ...iproute2-9999.ebuild => iproute2-5.18.0.ebuild} | 47 ++++++++++++----------
17 sys-apps/iproute2/iproute2-9999.ebuild | 36 +++++++++--------
18 3 files changed, 47 insertions(+), 37 deletions(-)
19
20 diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
21 index 084ec52881b4..2b683e35def6 100644
22 --- a/sys-apps/iproute2/Manifest
23 +++ b/sys-apps/iproute2/Manifest
24 @@ -1,2 +1,3 @@
25 DIST iproute2-5.15.0.tar.xz 858068 BLAKE2B bca20ac53e1b2b3ae06186f655ad5073a0e691ed7b3aab25c4fbc118847b72a8a522175732cd22d8ec27480d1ab142319e80a5c3628434bec21260e585e1591d SHA512 e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22
26 DIST iproute2-5.17.0.tar.xz 870908 BLAKE2B 4310829ebbde7fd21ecc28856deddabfa93f26bf7937b3ef3c0e05e4e0bf925a9b167334efaefe3e275d196e7370a290679739ae8d8397dc6511f4da25dfd459 SHA512 fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d
27 +DIST iproute2-5.18.0.tar.xz 880456 BLAKE2B 21b15d84b07199d4ddd12cbf14d94806a073f4eda659958a8459ef2ca8becbef8638dac2550cc53893cd147888b6a3b738256dac074307b37ebec8dbb460e600 SHA512 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068
28
29 diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-5.18.0.ebuild
30 similarity index 79%
31 copy from sys-apps/iproute2/iproute2-9999.ebuild
32 copy to sys-apps/iproute2/iproute2-5.18.0.ebuild
33 index 11dfd239d1a7..b2d044b4661d 100644
34 --- a/sys-apps/iproute2/iproute2-9999.ebuild
35 +++ b/sys-apps/iproute2/iproute2-5.18.0.ebuild
36 @@ -3,14 +3,14 @@
37
38 EAPI=7
39
40 -inherit toolchain-funcs
41 +inherit eapi8-dosym edo toolchain-funcs
42
43 -if [[ ${PV} == "9999" ]] ; then
44 +if [[ ${PV} == 9999 ]] ; then
45 EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
46 inherit git-r3
47 else
48 SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
49 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
50 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
51 fi
52
53 DESCRIPTION="kernel routing and traffic control utilities"
54 @@ -18,7 +18,7 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
55
56 LICENSE="GPL-2"
57 SLOT="0"
58 -IUSE="atm berkdb bpf caps elf +iptables libbsd minimal selinux"
59 +IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nis selinux"
60
61 # We could make libmnl optional, but it's tiny, so eh
62 RDEPEND="
63 @@ -31,9 +31,10 @@ RDEPEND="
64 elf? ( virtual/libelf:= )
65 iptables? ( >=net-firewall/iptables-1.4.20:= )
66 libbsd? ( dev-libs/libbsd )
67 + nis? ( net-libs/libnsl:= )
68 selinux? ( sys-libs/libselinux )
69 "
70 -# We require newer linux-headers for ipset support #549948 and some defines #553876
71 +# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
72 DEPEND="
73 ${RDEPEND}
74 >=sys-kernel/linux-headers-3.16
75 @@ -52,17 +53,12 @@ PATCHES=(
76 "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
77 )
78
79 -doecho() {
80 - echo "${@}"
81 - "${@}" || die
82 -}
83 -
84 src_prepare() {
85 default
86
87 # Fix version if necessary
88 local versionfile="include/version.h"
89 - if [[ "${PV}" != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
90 + if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
91 einfo "Fixing version string"
92 sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
93 -i ${versionfile} || die
94 @@ -91,18 +87,25 @@ src_prepare() {
95 src_configure() {
96 tc-export AR CC PKG_CONFIG
97
98 - # This sure is ugly. Should probably move into toolchain-funcs at some point.
99 + # This sure is ugly. Should probably move into toolchain-funcs at some point.
100 local setns
101 pushd "${T}" >/dev/null || die
102 - printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
103 - ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
104 - echo 'int main(){return 0;}' > test.c
105 - ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
106 + printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
107 + if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
108 + setns=y
109 + else
110 + setns=n
111 + fi
112 +
113 + echo 'int main(){return 0;}' > test.c || die
114 + if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
115 + sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
116 + fi
117 popd >/dev/null || die
118
119 # run "configure" script first which will create "config.mk"...
120 # Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
121 - doecho ./configure --libbpf_force $(usex bpf on off)
122 + edo ./configure --libbpf_force $(usex bpf on off)
123
124 # ...now switch on/off requested features via USE flags
125 # this is only useful if the test did not set other things, per bug #643722
126 @@ -116,6 +119,7 @@ src_configure() {
127 HAVE_CAP := $(usex caps y n)
128 HAVE_MNL := $(usex minimal n y)
129 HAVE_ELF := $(usex elf y n)
130 + HAVE_RPC := $(usex nis y n)
131 HAVE_SELINUX := $(usex selinux y n)
132 IP_CONFIG_SETNS := ${setns}
133 # Use correct iptables dir, bug #144265, bug #293709
134 @@ -153,10 +157,11 @@ src_install() {
135 dolib.a lib/libnetlink.a
136 insinto /usr/include
137 doins include/libnetlink.h
138 - # This local header pulls in a lot of linux headers it
139 - # doesn't directly need. Delete this header that requires
140 - # linux-headers-3.8 until that goes stable. # bug #467716
141 - sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die
142 +
143 + # Can remove compatibility symlink in a year: 2023-05-28.
144 + # bug #547264
145 + mv "${ED}"/sbin/ss "${ED}"/bin/ss || die
146 + dosym8 -r /bin/ss /sbin/ss
147
148 if use berkdb ; then
149 keepdir /var/lib/arpd
150
151 diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild
152 index 11dfd239d1a7..d7b7a0f564af 100644
153 --- a/sys-apps/iproute2/iproute2-9999.ebuild
154 +++ b/sys-apps/iproute2/iproute2-9999.ebuild
155 @@ -3,14 +3,14 @@
156
157 EAPI=7
158
159 -inherit toolchain-funcs
160 +inherit edo toolchain-funcs
161
162 -if [[ ${PV} == "9999" ]] ; then
163 +if [[ ${PV} == 9999 ]] ; then
164 EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
165 inherit git-r3
166 else
167 SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
168 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
169 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
170 fi
171
172 DESCRIPTION="kernel routing and traffic control utilities"
173 @@ -18,7 +18,7 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
174
175 LICENSE="GPL-2"
176 SLOT="0"
177 -IUSE="atm berkdb bpf caps elf +iptables libbsd minimal selinux"
178 +IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nis selinux"
179
180 # We could make libmnl optional, but it's tiny, so eh
181 RDEPEND="
182 @@ -31,9 +31,10 @@ RDEPEND="
183 elf? ( virtual/libelf:= )
184 iptables? ( >=net-firewall/iptables-1.4.20:= )
185 libbsd? ( dev-libs/libbsd )
186 + nis? ( net-libs/libnsl:= )
187 selinux? ( sys-libs/libselinux )
188 "
189 -# We require newer linux-headers for ipset support #549948 and some defines #553876
190 +# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
191 DEPEND="
192 ${RDEPEND}
193 >=sys-kernel/linux-headers-3.16
194 @@ -52,11 +53,6 @@ PATCHES=(
195 "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
196 )
197
198 -doecho() {
199 - echo "${@}"
200 - "${@}" || die
201 -}
202 -
203 src_prepare() {
204 default
205
206 @@ -91,18 +87,25 @@ src_prepare() {
207 src_configure() {
208 tc-export AR CC PKG_CONFIG
209
210 - # This sure is ugly. Should probably move into toolchain-funcs at some point.
211 + # This sure is ugly. Should probably move into toolchain-funcs at some point.
212 local setns
213 pushd "${T}" >/dev/null || die
214 - printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
215 - ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
216 - echo 'int main(){return 0;}' > test.c
217 - ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
218 + printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
219 + if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
220 + setns=y
221 + else
222 + setns=n
223 + fi
224 +
225 + echo 'int main(){return 0;}' > test.c || die
226 + if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
227 + sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
228 + fi
229 popd >/dev/null || die
230
231 # run "configure" script first which will create "config.mk"...
232 # Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
233 - doecho ./configure --libbpf_force $(usex bpf on off)
234 + edo ./configure --libbpf_force $(usex bpf on off)
235
236 # ...now switch on/off requested features via USE flags
237 # this is only useful if the test did not set other things, per bug #643722
238 @@ -116,6 +119,7 @@ src_configure() {
239 HAVE_CAP := $(usex caps y n)
240 HAVE_MNL := $(usex minimal n y)
241 HAVE_ELF := $(usex elf y n)
242 + HAVE_RPC := $(usex nis y n)
243 HAVE_SELINUX := $(usex selinux y n)
244 IP_CONFIG_SETNS := ${setns}
245 # Use correct iptables dir, bug #144265, bug #293709