1 |
commit: 9bed110cfca15256b3850d2318527a6590e64253 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 2 09:16:03 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 2 09:17:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bed110c |
7 |
|
8 |
sys-apps/iproute2: Bump to version 5.15.0 |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
sys-apps/iproute2/Manifest | 1 + |
13 |
sys-apps/iproute2/iproute2-5.15.0.ebuild | 175 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 176 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest |
17 |
index 144ab4b2b34..12ee5aa99f1 100644 |
18 |
--- a/sys-apps/iproute2/Manifest |
19 |
+++ b/sys-apps/iproute2/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST iproute2-5.13.0.tar.xz 845236 BLAKE2B e1c148e2a720236163e7f4d46aa38d244a02ae36ad86571c5606d54c9ccfd8d0363e2fb793d48cf39aae322b3c36b9f8a43eaf570dbdb8243092926cef3d2786 SHA512 a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d |
22 |
DIST iproute2-5.14.0.tar.xz 853572 BLAKE2B 52544021798f2cb716a57998d98dadc2441142b02d38c7e274bc17a6e5f994bdb5bd3ebf0b896bfd7e327a44f00f92c2af8e67367cdc0aac70769d563082f543 SHA512 e2b9b0a2c3e6fc4c67cb50b0a9bf710e749648b83369a49bf905edd7e519d76c50c2cc818bb63cc605c409c66075d4d371f2371796e5f7a8f9d04101b80ef75c |
23 |
+DIST iproute2-5.15.0.tar.xz 858068 BLAKE2B bca20ac53e1b2b3ae06186f655ad5073a0e691ed7b3aab25c4fbc118847b72a8a522175732cd22d8ec27480d1ab142319e80a5c3628434bec21260e585e1591d SHA512 e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22 |
24 |
|
25 |
diff --git a/sys-apps/iproute2/iproute2-5.15.0.ebuild b/sys-apps/iproute2/iproute2-5.15.0.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..367b3541cbf |
28 |
--- /dev/null |
29 |
+++ b/sys-apps/iproute2/iproute2-5.15.0.ebuild |
30 |
@@ -0,0 +1,175 @@ |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit toolchain-funcs flag-o-matic multilib |
37 |
+ |
38 |
+if [[ ${PV} == "9999" ]] ; then |
39 |
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git" |
40 |
+ inherit git-r3 |
41 |
+else |
42 |
+ SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz" |
43 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
44 |
+fi |
45 |
+ |
46 |
+DESCRIPTION="kernel routing and traffic control utilities" |
47 |
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2" |
48 |
+ |
49 |
+LICENSE="GPL-2" |
50 |
+SLOT="0" |
51 |
+IUSE="atm berkdb bpf caps elf +iptables ipv6 libbsd minimal selinux" |
52 |
+ |
53 |
+# We could make libmnl optional, but it's tiny, so eh |
54 |
+RDEPEND=" |
55 |
+ !net-misc/arpd |
56 |
+ !minimal? ( net-libs/libmnl:= ) |
57 |
+ atm? ( net-dialup/linux-atm ) |
58 |
+ berkdb? ( sys-libs/db:= ) |
59 |
+ bpf? ( dev-libs/libbpf:= ) |
60 |
+ caps? ( sys-libs/libcap ) |
61 |
+ elf? ( virtual/libelf:= ) |
62 |
+ iptables? ( >=net-firewall/iptables-1.4.20:= ) |
63 |
+ libbsd? ( dev-libs/libbsd ) |
64 |
+ selinux? ( sys-libs/libselinux ) |
65 |
+" |
66 |
+# We require newer linux-headers for ipset support #549948 and some defines #553876 |
67 |
+DEPEND=" |
68 |
+ ${RDEPEND} |
69 |
+ >=sys-kernel/linux-headers-3.16 |
70 |
+" |
71 |
+BDEPEND=" |
72 |
+ app-arch/xz-utils |
73 |
+ >=sys-devel/bison-2.4 |
74 |
+ sys-devel/flex |
75 |
+ virtual/pkgconfig |
76 |
+" |
77 |
+ |
78 |
+PATCHES=( |
79 |
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907 |
80 |
+ "${FILESDIR}"/${PN}-5.12.0-configure-nomagic.patch # bug 643722 |
81 |
+ #"${FILESDIR}"/${PN}-5.1.0-portability.patch |
82 |
+ "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch |
83 |
+) |
84 |
+ |
85 |
+doecho() { |
86 |
+ echo "${@}" |
87 |
+ "${@}" || die |
88 |
+} |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ if ! use ipv6 ; then |
92 |
+ PATCHES+=( |
93 |
+ "${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849 |
94 |
+ ) |
95 |
+ fi |
96 |
+ |
97 |
+ default |
98 |
+ |
99 |
+ # Fix version if necessary |
100 |
+ local versionfile="include/version.h" |
101 |
+ if [[ "${PV}" != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then |
102 |
+ einfo "Fixing version string" |
103 |
+ sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \ |
104 |
+ -i ${versionfile} || die |
105 |
+ fi |
106 |
+ |
107 |
+ # echo -n is not POSIX compliant |
108 |
+ sed 's@echo -n@printf@' -i configure || die |
109 |
+ |
110 |
+ sed -i \ |
111 |
+ -e '/^CC :\?=/d' \ |
112 |
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \ |
113 |
+ -e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \ |
114 |
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ |
115 |
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \ |
116 |
+ Makefile || die |
117 |
+ |
118 |
+ # build against system headers |
119 |
+ rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc |
120 |
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die |
121 |
+ |
122 |
+ if use minimal ; then |
123 |
+ sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die |
124 |
+ fi |
125 |
+} |
126 |
+ |
127 |
+src_configure() { |
128 |
+ tc-export AR CC PKG_CONFIG |
129 |
+ |
130 |
+ # This sure is ugly. Should probably move into toolchain-funcs at some point. |
131 |
+ local setns |
132 |
+ pushd "${T}" >/dev/null |
133 |
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c |
134 |
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n |
135 |
+ echo 'int main(){return 0;}' > test.c |
136 |
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile |
137 |
+ popd >/dev/null |
138 |
+ |
139 |
+ # run "configure" script first which will create "config.mk"... |
140 |
+ # Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242) |
141 |
+ doecho ./configure --libbpf_force $(usex bpf on off) |
142 |
+ |
143 |
+ # ...now switch on/off requested features via USE flags |
144 |
+ # this is only useful if the test did not set other things, per bug #643722 |
145 |
+ cat <<-EOF >> config.mk |
146 |
+ TC_CONFIG_ATM := $(usex atm y n) |
147 |
+ TC_CONFIG_XT := $(usex iptables y n) |
148 |
+ TC_CONFIG_NO_XT := $(usex iptables n y) |
149 |
+ # We've locked in recent enough kernel headers #549948 |
150 |
+ TC_CONFIG_IPSET := y |
151 |
+ HAVE_BERKELEY_DB := $(usex berkdb y n) |
152 |
+ HAVE_CAP := $(usex caps y n) |
153 |
+ HAVE_MNL := $(usex minimal n y) |
154 |
+ HAVE_ELF := $(usex elf y n) |
155 |
+ HAVE_SELINUX := $(usex selinux y n) |
156 |
+ IP_CONFIG_SETNS := ${setns} |
157 |
+ # Use correct iptables dir, #144265 #293709 |
158 |
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir) |
159 |
+ HAVE_LIBBSD := $(usex libbsd y n) |
160 |
+ EOF |
161 |
+} |
162 |
+ |
163 |
+src_compile() { |
164 |
+ emake V=1 NETNS_RUN_DIR=/run/netns |
165 |
+} |
166 |
+ |
167 |
+src_install() { |
168 |
+ if use minimal ; then |
169 |
+ into / |
170 |
+ dosbin tc/tc |
171 |
+ dobin ip/ip |
172 |
+ return 0 |
173 |
+ fi |
174 |
+ |
175 |
+ emake \ |
176 |
+ DESTDIR="${D}" \ |
177 |
+ PREFIX="${EPREFIX}/usr" \ |
178 |
+ LIBDIR="${EPREFIX}"/$(get_libdir) \ |
179 |
+ SBINDIR="${EPREFIX}"/sbin \ |
180 |
+ CONFDIR="${EPREFIX}"/etc/iproute2 \ |
181 |
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \ |
182 |
+ MANDIR="${EPREFIX}"/usr/share/man \ |
183 |
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \ |
184 |
+ install |
185 |
+ |
186 |
+ dodir /bin |
187 |
+ mv "${ED}"/{s,}bin/ip || die #330115 |
188 |
+ |
189 |
+ dolib.a lib/libnetlink.a |
190 |
+ insinto /usr/include |
191 |
+ doins include/libnetlink.h |
192 |
+ # This local header pulls in a lot of linux headers it |
193 |
+ # doesn't directly need. Delete this header that requires |
194 |
+ # linux-headers-3.8 until that goes stable. #467716 |
195 |
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die |
196 |
+ |
197 |
+ if use berkdb ; then |
198 |
+ keepdir /var/lib/arpd |
199 |
+ # bug 47482, arpd doesn't need to be in /sbin |
200 |
+ dodir /usr/bin |
201 |
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die |
202 |
+ elif [[ -d "${ED}"/var/lib/arpd ]]; then |
203 |
+ rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die |
204 |
+ fi |
205 |
+} |