commit:     86818b8f1ac822ed2c3b51325476dc13b5281886
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 29 04:47:21 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 29 05:42:06 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86818b8f

net-misc/ifenslave: EAPI 8, update Debian sources from 17->21

Noticed a -Wformat-security issue when testing linux-headers reverse
dependencies and ended up spending far too much time on hunting down
the last version of this in Debian.

Thanks to Kangie for digging up the needed files! It turns out that
the Debian patches tarball in this final release (22 isn't useful as it's
a transition package, so 21 is the last one) contains *solely* this
-Wformat-security fix, but oh well.

While here, fix a <stdint.h> issue for musl too.

Closes: https://bugs.gentoo.org/713714
Thanks-to: Matt Jolly <kangie <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ifenslave/Manifest                        |  1 +
 .../ifenslave/files/ifenslave-1.1.0-stdint.patch   | 26 +++++++++
 net-misc/ifenslave/ifenslave-1.1.0-r7.ebuild       | 65 ++++++++++++++++++++++
 3 files changed, 92 insertions(+)

diff --git a/net-misc/ifenslave/Manifest b/net-misc/ifenslave/Manifest
index 75acf3cb07cb..6f8f80c92032 100644
--- a/net-misc/ifenslave/Manifest
+++ b/net-misc/ifenslave/Manifest
@@ -1,2 +1,3 @@
 DIST ifenslave-2.6_1.1.0-17.debian.tar.gz 9406 BLAKE2B 
2d4fbaa39b58538eb193dc75b2b271fd56a1adfd9aa3b0321f39bf505bee5c95973cab969f227c272dafc8fe389204dc62fc1d8ecc0e9b29f41d94805405a1d4
 SHA512 
90773620e15883f39f3bf3039133385d21d597f2051b81d98f96a2d7b9d7f69bf8f00bab0ffa2ad0fde5b2f4b83cac683b24925f26b6f014c0fa06f6d1023de5
+DIST ifenslave-2.6_1.1.0-21.debian.tar.gz 12428 BLAKE2B 
597d927aced3a3c07bfebde0f84a3e6a0590da453dcc6d5be933f0166d245609948006f2799ae04e313f2537c22f4e99d212378ae5ba1cf2b0de2350ae0b22b5
 SHA512 
dc01840f1b469e0b0b18fdfd41c9ffbfb2753721881fe8b31e672cd00daef1a7a7e1c411944c96c887483dae40589b94109cbed03443136f21342a7010ad81ca
 DIST ifenslave-2.6_1.1.0.orig.tar.gz 8002 BLAKE2B 
573eb446b390d044d636aceeb8e022ebf8792a1c4fc50cf7903aef647b38052ddc05dff53539c2c760867a09fc04fd29469137499cfa2b73da1a5b1c3fc1c05c
 SHA512 
65d9b632e88c63dc4c2bae752a4561cc7f315278b301c906c6f023934d6af8cdb894d06e1582d831bf0ac88f8d27751115b4f2e8bea6cbb89a705e4bc04068c7

diff --git a/net-misc/ifenslave/files/ifenslave-1.1.0-stdint.patch 
b/net-misc/ifenslave/files/ifenslave-1.1.0-stdint.patch
new file mode 100644
index 000000000000..f923f96b03bd
--- /dev/null
+++ b/net-misc/ifenslave/files/ifenslave-1.1.0-stdint.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/713714
+--- a/ifenslave.c
++++ b/ifenslave.c
+@@ -148,6 +148,7 @@ static const char *help_msg =
+ "\n";
+ 
+ #include <unistd.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+@@ -164,10 +165,10 @@ static const char *help_msg =
+ #include <linux/if_bonding.h>
+ #include <linux/sockios.h>
+ 
+-typedef unsigned long long u64;       /* hack, so we may include kernel's 
ethtool.h */
+-typedef __uint32_t u32;               /* ditto */
+-typedef __uint16_t u16;               /* ditto */
+-typedef __uint8_t u8;         /* ditto */
++typedef uint64_t u64; /* hack, so we may include kernel's ethtool.h */
++typedef uint32_t u32;         /* ditto */
++typedef uint16_t u16;         /* ditto */
++typedef uint8_t u8;           /* ditto */
+ #include <linux/ethtool.h>
+ 
+ struct option longopts[] = {

diff --git a/net-misc/ifenslave/ifenslave-1.1.0-r7.ebuild 
b/net-misc/ifenslave/ifenslave-1.1.0-r7.ebuild
new file mode 100644
index 000000000000..fcf354c448fe
--- /dev/null
+++ b/net-misc/ifenslave/ifenslave-1.1.0-r7.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# This is NOT an error, Debian's 2.x is a rewrite using ifupdown instead.
+MY_PN="ifenslave-2.6"
+DEBIAN_PV="21"
+DEBIANPKG_TARBALL="${MY_PN}_${PV}.orig.tar.gz"
+DEBIANPKG_PATCH="${MY_PN}_${PV}-${DEBIAN_PV}.debian.tar.gz"
+DEBIANPKG_BASE="https://archive.debian.org/debian/pool/main/${MY_PN:0:1}/${MY_PN}";
+
+inherit toolchain-funcs linux-info
+
+DESCRIPTION="Attach and detach slave interfaces to a bonding device"
+HOMEPAGE="https://sf.net/projects/bonding/";
+SRC_URI="
+       
https://archive.debian.org/debian/pool/main/${MY_PN:0:1}/${MY_PN}/${DEBIANPKG_TARBALL}
+       
https://wlglam.fsmg.org.nz/pub/raspbian/raspbian/pool/main/${MY_PN:0:1}/${MY_PN}/${DEBIANPKG_PATCH}
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~sparc ~x86"
+
+DEPEND=">=sys-kernel/linux-headers-2.4.22"
+
+CONFIG_CHECK="~BONDING"
+WARNING_BONDING="CONFIG_BONDING is required to get bond devices in the kernel"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.1.0-stdint.patch
+)
+
+src_prepare() {
+       eapply $(sed -e 's:^:../debian/patches/:' ../debian/patches/series || 
die)
+       default
+}
+
+src_configure() {
+       tc-export CC
+}
+
+src_compile() {
+       emake ifenslave
+}
+
+src_install() {
+       into /
+       dosbin ifenslave
+
+       # there really is no better documentation than the sourcecode :-)
+       dodoc ifenslave.c
+
+       doman "${WORKDIR}"/debian/ifenslave.8
+}
+
+pkg_preinst() {
+       if [[ -f /etc/modules.d/bond ]] || [[ -f /etc/modprobe.d/bond ]]; then
+               elog "You may want to remove /etc/modules.d/bond and/or 
/etc/modprobe.d/bond"
+               elog "because it likely causes some deprecation warnings like:"
+               elog "Loading kernel module for a network device with 
CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev-bond0 instead"
+               elog "It may also cause unexpected behaviour."
+       fi
+}

Reply via email to