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