commit: 5ccf7bd5334ae6f3d5577b638ef793a295d4e0f0 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat May 28 02:38:50 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat May 28 02:52:20 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ccf7bd5
sys-apps/iproute2: add 5.18.0 Moves /sbin/ss -> /bin/ss with a compatibility symlink in /sbin. Closes: https://bugs.gentoo.org/547264 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-apps/iproute2/Manifest | 1 + ...iproute2-9999.ebuild => iproute2-5.18.0.ebuild} | 47 ++++++++++++---------- sys-apps/iproute2/iproute2-9999.ebuild | 36 +++++++++-------- 3 files changed, 47 insertions(+), 37 deletions(-) diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest index 084ec52881b4..2b683e35def6 100644 --- a/sys-apps/iproute2/Manifest +++ b/sys-apps/iproute2/Manifest @@ -1,2 +1,3 @@ DIST iproute2-5.15.0.tar.xz 858068 BLAKE2B bca20ac53e1b2b3ae06186f655ad5073a0e691ed7b3aab25c4fbc118847b72a8a522175732cd22d8ec27480d1ab142319e80a5c3628434bec21260e585e1591d SHA512 e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22 DIST iproute2-5.17.0.tar.xz 870908 BLAKE2B 4310829ebbde7fd21ecc28856deddabfa93f26bf7937b3ef3c0e05e4e0bf925a9b167334efaefe3e275d196e7370a290679739ae8d8397dc6511f4da25dfd459 SHA512 fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d +DIST iproute2-5.18.0.tar.xz 880456 BLAKE2B 21b15d84b07199d4ddd12cbf14d94806a073f4eda659958a8459ef2ca8becbef8638dac2550cc53893cd147888b6a3b738256dac074307b37ebec8dbb460e600 SHA512 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068 diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-5.18.0.ebuild similarity index 79% copy from sys-apps/iproute2/iproute2-9999.ebuild copy to sys-apps/iproute2/iproute2-5.18.0.ebuild index 11dfd239d1a7..b2d044b4661d 100644 --- a/sys-apps/iproute2/iproute2-9999.ebuild +++ b/sys-apps/iproute2/iproute2-5.18.0.ebuild @@ -3,14 +3,14 @@ EAPI=7 -inherit toolchain-funcs +inherit eapi8-dosym edo toolchain-funcs -if [[ ${PV} == "9999" ]] ; then +if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git" inherit git-r3 else SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi DESCRIPTION="kernel routing and traffic control utilities" @@ -18,7 +18,7 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2" LICENSE="GPL-2" SLOT="0" -IUSE="atm berkdb bpf caps elf +iptables libbsd minimal selinux" +IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nis selinux" # We could make libmnl optional, but it's tiny, so eh RDEPEND=" @@ -31,9 +31,10 @@ RDEPEND=" elf? ( virtual/libelf:= ) iptables? ( >=net-firewall/iptables-1.4.20:= ) libbsd? ( dev-libs/libbsd ) + nis? ( net-libs/libnsl:= ) selinux? ( sys-libs/libselinux ) " -# We require newer linux-headers for ipset support #549948 and some defines #553876 +# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876) DEPEND=" ${RDEPEND} >=sys-kernel/linux-headers-3.16 @@ -52,17 +53,12 @@ PATCHES=( "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch ) -doecho() { - echo "${@}" - "${@}" || die -} - src_prepare() { default # Fix version if necessary local versionfile="include/version.h" - if [[ "${PV}" != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then + if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then einfo "Fixing version string" sed "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \ -i ${versionfile} || die @@ -91,18 +87,25 @@ src_prepare() { src_configure() { tc-export AR CC PKG_CONFIG - # This sure is ugly. Should probably move into toolchain-funcs at some point. + # This sure is ugly. Should probably move into toolchain-funcs at some point. local setns pushd "${T}" >/dev/null || die - printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c - ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n - echo 'int main(){return 0;}' > test.c - ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile + printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die + if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then + setns=y + else + setns=n + fi + + echo 'int main(){return 0;}' > test.c || die + if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then + sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die + fi popd >/dev/null || die # run "configure" script first which will create "config.mk"... # Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242) - doecho ./configure --libbpf_force $(usex bpf on off) + edo ./configure --libbpf_force $(usex bpf on off) # ...now switch on/off requested features via USE flags # this is only useful if the test did not set other things, per bug #643722 @@ -116,6 +119,7 @@ src_configure() { HAVE_CAP := $(usex caps y n) HAVE_MNL := $(usex minimal n y) HAVE_ELF := $(usex elf y n) + HAVE_RPC := $(usex nis y n) HAVE_SELINUX := $(usex selinux y n) IP_CONFIG_SETNS := ${setns} # Use correct iptables dir, bug #144265, bug #293709 @@ -153,10 +157,11 @@ src_install() { dolib.a lib/libnetlink.a insinto /usr/include doins include/libnetlink.h - # This local header pulls in a lot of linux headers it - # doesn't directly need. Delete this header that requires - # linux-headers-3.8 until that goes stable. # bug #467716 - sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || die + + # Can remove compatibility symlink in a year: 2023-05-28. + # bug #547264 + mv "${ED}"/sbin/ss "${ED}"/bin/ss || die + dosym8 -r /bin/ss /sbin/ss if use berkdb ; then keepdir /var/lib/arpd diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild index 11dfd239d1a7..d7b7a0f564af 100644 --- a/sys-apps/iproute2/iproute2-9999.ebuild +++ b/sys-apps/iproute2/iproute2-9999.ebuild @@ -3,14 +3,14 @@ EAPI=7 -inherit toolchain-funcs +inherit edo toolchain-funcs -if [[ ${PV} == "9999" ]] ; then +if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git" inherit git-r3 else SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi DESCRIPTION="kernel routing and traffic control utilities" @@ -18,7 +18,7 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2" LICENSE="GPL-2" SLOT="0" -IUSE="atm berkdb bpf caps elf +iptables libbsd minimal selinux" +IUSE="atm berkdb bpf caps elf +iptables libbsd minimal nis selinux" # We could make libmnl optional, but it's tiny, so eh RDEPEND=" @@ -31,9 +31,10 @@ RDEPEND=" elf? ( virtual/libelf:= ) iptables? ( >=net-firewall/iptables-1.4.20:= ) libbsd? ( dev-libs/libbsd ) + nis? ( net-libs/libnsl:= ) selinux? ( sys-libs/libselinux ) " -# We require newer linux-headers for ipset support #549948 and some defines #553876 +# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876) DEPEND=" ${RDEPEND} >=sys-kernel/linux-headers-3.16 @@ -52,11 +53,6 @@ PATCHES=( "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch ) -doecho() { - echo "${@}" - "${@}" || die -} - src_prepare() { default @@ -91,18 +87,25 @@ src_prepare() { src_configure() { tc-export AR CC PKG_CONFIG - # This sure is ugly. Should probably move into toolchain-funcs at some point. + # This sure is ugly. Should probably move into toolchain-funcs at some point. local setns pushd "${T}" >/dev/null || die - printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c - ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n - echo 'int main(){return 0;}' > test.c - ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile + printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die + if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then + setns=y + else + setns=n + fi + + echo 'int main(){return 0;}' > test.c || die + if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then + sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die + fi popd >/dev/null || die # run "configure" script first which will create "config.mk"... # Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242) - doecho ./configure --libbpf_force $(usex bpf on off) + edo ./configure --libbpf_force $(usex bpf on off) # ...now switch on/off requested features via USE flags # this is only useful if the test did not set other things, per bug #643722 @@ -116,6 +119,7 @@ src_configure() { HAVE_CAP := $(usex caps y n) HAVE_MNL := $(usex minimal n y) HAVE_ELF := $(usex elf y n) + HAVE_RPC := $(usex nis y n) HAVE_SELINUX := $(usex selinux y n) IP_CONFIG_SETNS := ${setns} # Use correct iptables dir, bug #144265, bug #293709