Browse Source

Replace patches with the fixes upstream

Christoph Biedl 1 year ago
parent
commit
9185b4389a

+ 18 - 17
debian/patches/02_no_hyphen_in_manpages.patch

@@ -1,21 +1,11 @@
-Description: Patch hyphens in manpages.
- Patched all the manpages in order to avoid usual hyphen->minus confusion.
- Also fixed a typo.
-Author: David Martínez Moreno <ender@debian.org>
-Forwarded: no
-Last-Update: 2014-01-12
+Subject: Avoid hyphen vs minus issues
+Origin: aoetools-36-7-gf2d2325 <https://github.com/OpenAoE/aoetools/commit/aoetools-36-7-gf2d2325>
+Upstream-Author: Ed Cashin <ed.cashin@acm.org>
+Date: Mon Jan 9 20:52:50 2017 -0500
+
+    ender@debian.org submitted these changes to the man pages, so
+    that dashes would not by transformed into hyphens.
 
---- a/aoecfg.8
-+++ b/aoecfg.8
-@@ -3,7 +3,7 @@
- aoecfg \- manipulate AoE configuration strings
- .SH SYNOPSIS
- .B aoecfg
--[-c \fIcmd\fR] [-s \fIcfgstr\fR] [-t \fItimeout\fR] [\fIshelf slot\fR] [\fInetif\fR]
-+[\-c \fIcmd\fR] [\-s \fIcfgstr\fR] [\-t \fItimeout\fR] [\fIshelf slot\fR] [\fInetif\fR]
- .fi
- .SH DESCRIPTION
- .IR Aoecfg (8)
 --- a/aoe-mkdevs.8
 +++ b/aoe-mkdevs.8
 @@ -52,13 +52,13 @@
@@ -52,6 +42,17 @@ Last-Update: 2014-01-12
  10
  nai:~# 
  .fi
+--- a/aoecfg.8
++++ b/aoecfg.8
+@@ -3,7 +3,7 @@
+ aoecfg \- manipulate AoE configuration strings
+ .SH SYNOPSIS
+ .B aoecfg
+-[-c \fIcmd\fR] [-s \fIcfgstr\fR] [-t \fItimeout\fR] [\fIshelf slot\fR] [\fInetif\fR]
++[\-c \fIcmd\fR] [\-s \fIcfgstr\fR] [\-t \fItimeout\fR] [\fIshelf slot\fR] [\fInetif\fR]
+ .fi
+ .SH DESCRIPTION
+ .IR Aoecfg (8)
 --- a/aoeping.8
 +++ b/aoeping.8
 @@ -67,9 +67,9 @@

+ 7 - 2
debian/patches/fix-typos.patch

@@ -1,5 +1,10 @@
-Subject: Fix typos found by lintian
-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Subject: Biedl fixes typos in documentation
+Origin: aoetools-36-8-g9066acb <https://github.com/OpenAoE/aoetools/commit/aoetools-36-8-g9066acb>
+Upstream-Author: Ed Cashin <ed.cashin@acm.org>
+Date: Mon Jan 9 20:55:34 2017 -0500
+
+    Christoph Biedl, the debian package maintainer for aoetools,
+    provides these typo corrections.
 
 --- a/aoecfg.8
 +++ b/aoecfg.8

+ 67 - 0
debian/patches/cherry-pick/1621687045.aoetools-36-11-g4a3ee18.aoe-sancheck-refine-interface-probing.patch

@@ -0,0 +1,67 @@
+Subject: Aoe-sancheck: Refine interface probing
+Origin: aoetools-36-11-g4a3ee18 <https://github.com/OpenAoE/aoetools/commit/aoetools-36-11-g4a3ee18>
+Upstream-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: Sat May 22 14:37:25 2021 +0200
+
+    There are two issues in the ethlist function in aoe-sancheck.c:
+
+    First it skips all network interfaces that do not start with "eth". This
+    is a problem these days where people use different naming schemes like the
+    so-called predictable interface names as mandated by udev/systemd.
+
+    Second it only probes for interfaces with an interface number of up
+    to 15. At least in current Linux, that number can take huge values and
+    those interfaces will be ignored completely.
+
+    About the first: Probe all interfaces (but lo) that support the ARP
+    protocol, assuming that is a fair indicator for ethernet support.
+
+    About the second, use the if_nameindex function to get a list of all
+    interfaces currently known to the kernel and operate on that one.
+
+--- a/aoe-sancheck.c
++++ b/aoe-sancheck.c
+@@ -501,23 +501,38 @@
+ int
+ ethlist(char **ifs, int nifs)
+ {
+-	int i, s, n;
++	int s, n;
+ 	struct ifreq ifr;
++	struct if_nameindex *if_ni, *i;
+ 
+ 	s = socket(AF_INET, SOCK_STREAM, 0);
+ 	if (s < 0)
+ 		return 0;
++
++	if_ni = if_nameindex();
++	if (if_ni == NULL)
++		return 0;
++
+ 	n = 0;
+-	for (i=0; i<nifs; i++) {
++	for (i = if_ni; ! (i->if_index == 0 && i->if_name == NULL); i++) {
+ 		memset(&ifr, 0, sizeof ifr);
+-		ifr.ifr_ifindex = i;
+-		if (ioctl(s, SIOCGIFNAME, &ifr) < 0)
++		ifr.ifr_ifindex = i->if_index;
++		strcpy(ifr.ifr_name, i->if_name);
++		// get interface flags
++		if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0)
++			continue;
++		// only use interfaces that use arp protocol
++		if (ifr.ifr_flags & IFF_NOARP)
+ 			continue;
+-		if (strncmp(ifr.ifr_name, "eth", 3))
++		// skip loopback interfaces
++		if (ifr.ifr_flags & IFF_LOOPBACK)
+ 			continue;
++		if (n == nifs)
++			break;
+ 		inserteth(ifs, nifs, ifr.ifr_name);
+ 		n++;
+ 	}
++	if_freenameindex(if_ni);
+ 	close(s);
+ 	return n;
+ }

+ 4 - 10
debian/patches/for-upstream/0002-aoe-sancheck-Raise-the-number-of-interfaces-to-probe.patch

@@ -1,13 +1,7 @@
-From c80b1bedbbcb068aab8fe66d68be433dc3a6c333 Mon Sep 17 00:00:00 2001
-From: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Date: Sat, 22 May 2021 14:54:41 +0200
-Subject: [PATCH 2/2] aoe-sancheck: Raise the number of interfaces to probe to
- 32, and document the limit
-
----
- aoe-sancheck.8 | 2 ++
- aoe-sancheck.c | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
+Subject: Aoe-sancheck: Raise the number of interfaces to probe to 32, and document the limit
+Origin: aoetools-36-12-gc80b1be <https://github.com/OpenAoE/aoetools/commit/aoetools-36-12-gc80b1be>
+Upstream-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: Sat May 22 14:54:41 2021 +0200
 
 --- a/aoe-sancheck.8
 +++ b/aoe-sancheck.8

+ 0 - 70
debian/patches/for-upstream/0001-aoe-sancheck-Refine-interface-probing.patch

@@ -1,70 +0,0 @@
-From 4a3ee184e6e76aead8e55c412be3c9c924e76e24 Mon Sep 17 00:00:00 2001
-From: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
-Date: Sat, 22 May 2021 14:37:25 +0200
-Subject: [PATCH 1/2] aoe-sancheck: Refine interface probing
-
-There are two issues in the ethlist function in aoe-sancheck.c:
-
-First it skips all network interfaces that do not start with "eth". This
-is a problem these days where people use different naming schemes like the
-so-called predictable interface names as mandated by udev/systemd.
-
-Second it only probes for interfaces with an interface number of up
-to 15. At least in current Linux, that number can take huge values and
-those interfaces will be ignored completely.
-
-About the first: Probe all interfaces (but lo) that support the ARP
-protocol, assuming that is a fair indicator for ethernet support.
-
-About the second, use the if_nameindex function to get a list of all
-interfaces currently known to the kernel and operate on that one.
----
- aoe-sancheck.c | 25 ++++++++++++++++++++-----
- 1 file changed, 20 insertions(+), 5 deletions(-)
-
---- a/aoe-sancheck.c
-+++ b/aoe-sancheck.c
-@@ -501,23 +501,38 @@
- int
- ethlist(char **ifs, int nifs)
- {
--	int i, s, n;
-+	int s, n;
- 	struct ifreq ifr;
-+	struct if_nameindex *if_ni, *i;
- 
- 	s = socket(AF_INET, SOCK_STREAM, 0);
- 	if (s < 0)
- 		return 0;
-+
-+	if_ni = if_nameindex();
-+	if (if_ni == NULL)
-+		return 0;
-+
- 	n = 0;
--	for (i=0; i<nifs; i++) {
-+	for (i = if_ni; ! (i->if_index == 0 && i->if_name == NULL); i++) {
- 		memset(&ifr, 0, sizeof ifr);
--		ifr.ifr_ifindex = i;
--		if (ioctl(s, SIOCGIFNAME, &ifr) < 0)
-+		ifr.ifr_ifindex = i->if_index;
-+		strcpy(ifr.ifr_name, i->if_name);
-+		// get interface flags
-+		if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0)
-+			continue;
-+		// only use interfaces that use arp protocol
-+		if (ifr.ifr_flags & IFF_NOARP)
- 			continue;
--		if (strncmp(ifr.ifr_name, "eth", 3))
-+		// skip loopback interfaces
-+		if (ifr.ifr_flags & IFF_LOOPBACK)
- 			continue;
-+		if (n == nifs)
-+			break;
- 		inserteth(ifs, nifs, ifr.ifr_name);
- 		n++;
- 	}
-+	if_freenameindex(if_ni);
- 	close(s);
- 	return n;
- }

+ 4 - 5
debian/patches/series

@@ -1,13 +1,12 @@
 
 # cherry-picked commits. Keep in upstream's chronological order
 cherry-pick/1434503415.aoetools-36-2-ge50247f.check-amount-of-data-read-from-network-before-using-it.patch
+cherry-pick/1484013170.aoetools-36-7-gf2d2325.avoid-hyphen-vs-minus-issues.patch
+cherry-pick/1484013334.aoetools-36-8-g9066acb.biedl-fixes-typos-in-documentation.patch
+cherry-pick/1621687045.aoetools-36-11-g4a3ee18.aoe-sancheck-refine-interface-probing.patch
+cherry-pick/1621688081.aoetools-36-12-gc80b1be.aoe-sancheck-raise-the-number-of-interfaces-to-probe-to-32-and-document-the-limit.patch
 
 # patches for upstream
-for-upstream/0001-aoe-sancheck-Refine-interface-probing.patch
-for-upstream/0002-aoe-sancheck-Raise-the-number-of-interfaces-to-probe.patch
-
 01_no_bashisms.patch
-02_no_hyphen_in_manpages.patch
 03_enable_hardened_build.patch
 04_support_slash_run_slash_udev.patch
-fix-typos.patch