iproute-5.18.0-1.el9
* Wed Jun 15 2022 Andrea Claudi <aclaudi@redhat.com> - 5.18.0-1.el9 - New version 5.18.0 [2074608] Resolves: rhbz#2074608 Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
This commit is contained in:
parent
0a77a9bd00
commit
4bf0a09879
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@
|
||||
/iproute2-5.10.0.tar.xz
|
||||
/iproute2-5.13.0.tar.xz
|
||||
/iproute2-5.15.0.tar.xz
|
||||
/iproute2-5.18.0.tar.xz
|
||||
|
@ -1,74 +0,0 @@
|
||||
From cef782ca658d695c5ca2d174ba1f89cba6bd84e5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Wed, 24 Nov 2021 11:28:08 +0100
|
||||
Subject: [PATCH] configure: fix parsing issue on include_dir option
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
|
||||
Upstream Status: iproute2.git commit 1d819dcc
|
||||
|
||||
commit 1d819dcc741e25958190e31f8186c940713fa0a8
|
||||
Author: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Thu Oct 14 10:50:49 2021 +0200
|
||||
|
||||
configure: fix parsing issue on include_dir option
|
||||
|
||||
configure is stuck in an endless loop if '--include_dir' option is used
|
||||
without a value:
|
||||
|
||||
$ ./configure --include_dir
|
||||
./configure: line 506: shift: 2: shift count out of range
|
||||
./configure: line 506: shift: 2: shift count out of range
|
||||
[...]
|
||||
|
||||
Fix it splitting 'shift 2' into two consecutive shifts, and making the
|
||||
second one conditional to the number of remaining arguments.
|
||||
|
||||
A check is also provided after the while loop to verify the include dir
|
||||
exists; this avoid to produce an erroneous configuration.
|
||||
|
||||
Fixes: a9c3d70d902a ("configure: add options ability")
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Acked-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: David Ahern <dsahern@kernel.org>
|
||||
---
|
||||
configure | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 7f4f3bd9..ea9051ab 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -485,7 +485,7 @@ usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTIONS]
|
||||
- --include_dir Path to iproute2 include dir
|
||||
+ --include_dir <dir> Path to iproute2 include dir
|
||||
--libbpf_dir Path to libbpf DESTDIR
|
||||
--libbpf_force Enable/disable libbpf by force. Available options:
|
||||
on: require link against libbpf, quit config if no libbpf support
|
||||
@@ -502,8 +502,9 @@ else
|
||||
while true; do
|
||||
case "$1" in
|
||||
--include_dir)
|
||||
- INCLUDE=$2
|
||||
- shift 2 ;;
|
||||
+ shift
|
||||
+ INCLUDE="$1"
|
||||
+ [ "$#" -gt 0 ] && shift ;;
|
||||
--libbpf_dir)
|
||||
LIBBPF_DIR="$2"
|
||||
shift 2 ;;
|
||||
@@ -523,6 +524,8 @@ else
|
||||
done
|
||||
fi
|
||||
|
||||
+[ -d "$INCLUDE" ] || usage 1
|
||||
+
|
||||
echo "# Generated config based on" $INCLUDE >$CONFIG
|
||||
quiet_config >> $CONFIG
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,79 +0,0 @@
|
||||
From c82a4d170e04b84aa0a630ed8142ec4220efaff9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c82a4d170e04b84aa0a630ed8142ec4220efaff9.1637749821.git.aclaudi@redhat.com>
|
||||
In-Reply-To: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
References: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Wed, 24 Nov 2021 11:28:08 +0100
|
||||
Subject: [PATCH] configure: fix parsing issue on libbpf_dir option
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
|
||||
Upstream Status: iproute2.git commit 48c379bc
|
||||
|
||||
commit 48c379bc2afd43b3246f68ed46475f5318b1218f
|
||||
Author: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Thu Oct 14 10:50:50 2021 +0200
|
||||
|
||||
configure: fix parsing issue on libbpf_dir option
|
||||
|
||||
configure is stuck in an endless loop if '--libbpf_dir' option is used
|
||||
without a value:
|
||||
|
||||
$ ./configure --libbpf_dir
|
||||
./configure: line 515: shift: 2: shift count out of range
|
||||
./configure: line 515: shift: 2: shift count out of range
|
||||
[...]
|
||||
|
||||
Fix it splitting 'shift 2' into two consecutive shifts, and making the
|
||||
second one conditional to the number of remaining arguments.
|
||||
|
||||
A check is also provided after the while loop to verify the libbpf dir
|
||||
exists; also, as LIBBPF_DIR does not have a default value, configure bails
|
||||
out if the user does not specify a value after --libbpf_dir, thus avoiding
|
||||
to produce an erroneous configuration.
|
||||
|
||||
Fixes: 7ae2585b865a ("configure: convert LIBBPF environment variables to command-line options")
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Acked-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: David Ahern <dsahern@kernel.org>
|
||||
---
|
||||
configure | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ea9051ab..0f304206 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -486,7 +486,7 @@ usage()
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTIONS]
|
||||
--include_dir <dir> Path to iproute2 include dir
|
||||
- --libbpf_dir Path to libbpf DESTDIR
|
||||
+ --libbpf_dir <dir> Path to libbpf DESTDIR
|
||||
--libbpf_force Enable/disable libbpf by force. Available options:
|
||||
on: require link against libbpf, quit config if no libbpf support
|
||||
off: disable libbpf probing
|
||||
@@ -506,8 +506,9 @@ else
|
||||
INCLUDE="$1"
|
||||
[ "$#" -gt 0 ] && shift ;;
|
||||
--libbpf_dir)
|
||||
- LIBBPF_DIR="$2"
|
||||
- shift 2 ;;
|
||||
+ shift
|
||||
+ LIBBPF_DIR="$1"
|
||||
+ [ "$#" -gt 0 ] && shift ;;
|
||||
--libbpf_force)
|
||||
if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then
|
||||
usage 1
|
||||
@@ -525,6 +526,9 @@ else
|
||||
fi
|
||||
|
||||
[ -d "$INCLUDE" ] || usage 1
|
||||
+if [ "${LIBBPF_DIR-unused}" != "unused" ]; then
|
||||
+ [ -d "$LIBBPF_DIR" ] || usage 1
|
||||
+fi
|
||||
|
||||
echo "# Generated config based on" $INCLUDE >$CONFIG
|
||||
quiet_config >> $CONFIG
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,63 +0,0 @@
|
||||
From 7d7655d0cc66288959b41f36ee1c52043cd86b79 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <7d7655d0cc66288959b41f36ee1c52043cd86b79.1637749821.git.aclaudi@redhat.com>
|
||||
In-Reply-To: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
References: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Wed, 24 Nov 2021 11:28:08 +0100
|
||||
Subject: [PATCH] configure: fix parsing issue with more than one value per
|
||||
option
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
|
||||
Upstream Status: iproute2.git commit c330d097
|
||||
|
||||
commit c330d0979440a1dec4a436fd742bb6e28d195526
|
||||
Author: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Thu Oct 14 10:50:51 2021 +0200
|
||||
|
||||
configure: fix parsing issue with more than one value per option
|
||||
|
||||
With commit a9c3d70d902a ("configure: add options ability") users are no
|
||||
more able to provide wrong command lines like:
|
||||
|
||||
$ ./configure --include_dir foo bar
|
||||
|
||||
The script simply bails out when user provides more than one value for a
|
||||
single option. However, in doing so, it breaks backward compatibility with
|
||||
some packaging system, which expects unknown options to be ignored.
|
||||
|
||||
Commit a3272b93725a ("configure: restore backward compatibility") fix this
|
||||
issue, but makes it possible again for users to provide wrong command lines
|
||||
such as the one above.
|
||||
|
||||
This fixes the issue simply ignoring autoconf-like options such as
|
||||
'--opt=value'.
|
||||
|
||||
Fixes: a3272b93725a ("configure: restore backward compatibility")
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Acked-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: David Ahern <dsahern@kernel.org>
|
||||
---
|
||||
configure | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 0f304206..9ec19a5b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -517,10 +517,12 @@ else
|
||||
shift 2 ;;
|
||||
-h | --help)
|
||||
usage 0 ;;
|
||||
+ --*)
|
||||
+ shift ;;
|
||||
"")
|
||||
break ;;
|
||||
*)
|
||||
- shift 1 ;;
|
||||
+ usage 1 ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,114 +0,0 @@
|
||||
From 825f5869248638159d30aff05b5d81246dc8a208 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <825f5869248638159d30aff05b5d81246dc8a208.1637749821.git.aclaudi@redhat.com>
|
||||
In-Reply-To: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
References: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Wed, 24 Nov 2021 11:28:08 +0100
|
||||
Subject: [PATCH] configure: simplify options parsing
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
|
||||
Upstream Status: iproute2.git commit 99245d17
|
||||
|
||||
commit 99245d1741a85e4397973782578d4a78673eb348
|
||||
Author: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Thu Oct 14 10:50:52 2021 +0200
|
||||
|
||||
configure: simplify options parsing
|
||||
|
||||
This commit simplifies options parsing moving all the code not related to
|
||||
parsing out of the case statement.
|
||||
|
||||
- The conditional shift after the assignments is moved right after the
|
||||
case, reducing code duplication.
|
||||
- The semantic checks on the LIBBPF_FORCE value is moved after the loop
|
||||
like we already did for INCLUDE and LIBBPF_DIR.
|
||||
- Finally, the loop condition is changed to check remaining arguments, thus
|
||||
making it possible to get rid of the null string case break.
|
||||
|
||||
As a bonus, now the help message states that on or off should follow
|
||||
--libbpf_force
|
||||
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Acked-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: David Ahern <dsahern@kernel.org>
|
||||
---
|
||||
configure | 37 ++++++++++++++++++-------------------
|
||||
1 file changed, 18 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 9ec19a5b..26e06eb8 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -485,12 +485,12 @@ usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTIONS]
|
||||
- --include_dir <dir> Path to iproute2 include dir
|
||||
- --libbpf_dir <dir> Path to libbpf DESTDIR
|
||||
- --libbpf_force Enable/disable libbpf by force. Available options:
|
||||
- on: require link against libbpf, quit config if no libbpf support
|
||||
- off: disable libbpf probing
|
||||
- -h | --help Show this usage info
|
||||
+ --include_dir <dir> Path to iproute2 include dir
|
||||
+ --libbpf_dir <dir> Path to libbpf DESTDIR
|
||||
+ --libbpf_force <on|off> Enable/disable libbpf by force. Available options:
|
||||
+ on: require link against libbpf, quit config if no libbpf support
|
||||
+ off: disable libbpf probing
|
||||
+ -h | --help Show this usage info
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
@@ -499,31 +499,25 @@ EOF
|
||||
if [ $# -eq 1 ] && [ "$(echo $1 | cut -c 1)" != '-' ]; then
|
||||
INCLUDE="$1"
|
||||
else
|
||||
- while true; do
|
||||
+ while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--include_dir)
|
||||
shift
|
||||
- INCLUDE="$1"
|
||||
- [ "$#" -gt 0 ] && shift ;;
|
||||
+ INCLUDE="$1" ;;
|
||||
--libbpf_dir)
|
||||
shift
|
||||
- LIBBPF_DIR="$1"
|
||||
- [ "$#" -gt 0 ] && shift ;;
|
||||
+ LIBBPF_DIR="$1" ;;
|
||||
--libbpf_force)
|
||||
- if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then
|
||||
- usage 1
|
||||
- fi
|
||||
- LIBBPF_FORCE=$2
|
||||
- shift 2 ;;
|
||||
+ shift
|
||||
+ LIBBPF_FORCE="$1" ;;
|
||||
-h | --help)
|
||||
usage 0 ;;
|
||||
--*)
|
||||
- shift ;;
|
||||
- "")
|
||||
- break ;;
|
||||
+ ;;
|
||||
*)
|
||||
usage 1 ;;
|
||||
esac
|
||||
+ [ "$#" -gt 0 ] && shift
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -531,6 +525,11 @@ fi
|
||||
if [ "${LIBBPF_DIR-unused}" != "unused" ]; then
|
||||
[ -d "$LIBBPF_DIR" ] || usage 1
|
||||
fi
|
||||
+if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then
|
||||
+ if [ "$LIBBPF_FORCE" != 'on' ] && [ "$LIBBPF_FORCE" != 'off' ]; then
|
||||
+ usage 1
|
||||
+ fi
|
||||
+fi
|
||||
|
||||
echo "# Generated config based on" $INCLUDE >$CONFIG
|
||||
quiet_config >> $CONFIG
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 03bc25c8afdcb8fb69543ec9a7f5f0d7cb176dd6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <03bc25c8afdcb8fb69543ec9a7f5f0d7cb176dd6.1637749821.git.aclaudi@redhat.com>
|
||||
In-Reply-To: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
References: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Wed, 24 Nov 2021 11:28:08 +0100
|
||||
Subject: [PATCH] configure: support --param=value style
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
|
||||
Upstream Status: iproute2.git commit 4b8bca5f
|
||||
|
||||
commit 4b8bca5f9e3e6f210b1036166dc98801e76d8ee5
|
||||
Author: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Thu Oct 14 10:50:53 2021 +0200
|
||||
|
||||
configure: support --param=value style
|
||||
|
||||
This commit makes it possible to specify values for configure params
|
||||
using the common autotools configure syntax '--param=value'.
|
||||
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Acked-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: David Ahern <dsahern@kernel.org>
|
||||
---
|
||||
configure | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 26e06eb8..9a2645d9 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -504,12 +504,18 @@ else
|
||||
--include_dir)
|
||||
shift
|
||||
INCLUDE="$1" ;;
|
||||
+ --include_dir=*)
|
||||
+ INCLUDE="${1#*=}" ;;
|
||||
--libbpf_dir)
|
||||
shift
|
||||
LIBBPF_DIR="$1" ;;
|
||||
+ --libbpf_dir=*)
|
||||
+ LIBBPF_DIR="${1#*=}" ;;
|
||||
--libbpf_force)
|
||||
shift
|
||||
LIBBPF_FORCE="$1" ;;
|
||||
+ --libbpf_force=*)
|
||||
+ LIBBPF_FORCE="${1#*=}" ;;
|
||||
-h | --help)
|
||||
usage 0 ;;
|
||||
--*)
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,72 +0,0 @@
|
||||
From a975d2b983bee77423ffbb29803403e0c3cba5bc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a975d2b983bee77423ffbb29803403e0c3cba5bc.1637749821.git.aclaudi@redhat.com>
|
||||
In-Reply-To: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
References: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Wed, 24 Nov 2021 11:28:08 +0100
|
||||
Subject: [PATCH] configure: add the --prefix option
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
|
||||
Upstream Status: iproute2.git commit 0ee1950b
|
||||
|
||||
commit 0ee1950b5c38986ea896606810231f5f9d761a00
|
||||
Author: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Thu Oct 14 10:50:54 2021 +0200
|
||||
|
||||
configure: add the --prefix option
|
||||
|
||||
This commit add the '--prefix' option to the iproute2 configure script.
|
||||
|
||||
This mimics the '--prefix' option that autotools configure provides, and
|
||||
will be used later to allow users or packagers to set the lib directory.
|
||||
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Acked-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: David Ahern <dsahern@kernel.org>
|
||||
---
|
||||
configure | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 9a2645d9..05e23eff 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -3,6 +3,7 @@
|
||||
# This is not an autoconf generated configure
|
||||
|
||||
INCLUDE="$PWD/include"
|
||||
+PREFIX="/usr"
|
||||
|
||||
# Output file which is input to Makefile
|
||||
CONFIG=config.mk
|
||||
@@ -490,6 +491,7 @@ Usage: $0 [OPTIONS]
|
||||
--libbpf_force <on|off> Enable/disable libbpf by force. Available options:
|
||||
on: require link against libbpf, quit config if no libbpf support
|
||||
off: disable libbpf probing
|
||||
+ --prefix <dir> Path prefix of the lib files to install
|
||||
-h | --help Show this usage info
|
||||
EOF
|
||||
exit $1
|
||||
@@ -516,6 +518,11 @@ else
|
||||
LIBBPF_FORCE="$1" ;;
|
||||
--libbpf_force=*)
|
||||
LIBBPF_FORCE="${1#*=}" ;;
|
||||
+ --prefix)
|
||||
+ shift
|
||||
+ PREFIX="$1" ;;
|
||||
+ --prefix=*)
|
||||
+ PREFIX="${1#*=}" ;;
|
||||
-h | --help)
|
||||
usage 0 ;;
|
||||
--*)
|
||||
@@ -536,6 +543,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then
|
||||
usage 1
|
||||
fi
|
||||
fi
|
||||
+[ -z "$PREFIX" ] && usage 1
|
||||
|
||||
echo "# Generated config based on" $INCLUDE >$CONFIG
|
||||
quiet_config >> $CONFIG
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,151 +0,0 @@
|
||||
From 935d2e39c8341178adbfcf7ae037b9f64dbc2d6e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <935d2e39c8341178adbfcf7ae037b9f64dbc2d6e.1637749821.git.aclaudi@redhat.com>
|
||||
In-Reply-To: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
References: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Wed, 24 Nov 2021 11:28:09 +0100
|
||||
Subject: [PATCH] configure: add the --libdir option
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
|
||||
Upstream Status: iproute2.git commit cee0cf84
|
||||
|
||||
commit cee0cf84bd32c8d9215f0c155187ad99d52a69b1
|
||||
Author: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Thu Oct 14 10:50:55 2021 +0200
|
||||
|
||||
configure: add the --libdir option
|
||||
|
||||
This commit allows users/packagers to choose a lib directory to store
|
||||
iproute2 lib files.
|
||||
|
||||
At the moment iproute2 ship lib files in /usr/lib and offers no way to
|
||||
modify this setting. However, according to the FHS, distros may choose
|
||||
"one or more variants of the /lib directory on systems which support
|
||||
more than one binary format" (e.g. /usr/lib64 on Fedora).
|
||||
|
||||
As Luca states in commit a3272b93725a ("configure: restore backward
|
||||
compatibility"), packaging systems may assume that 'configure' is from
|
||||
autotools, and try to pass it some parameters.
|
||||
|
||||
Allowing the '--libdir=/path/to/libdir' syntax, we can use this to our
|
||||
advantage, and let the lib directory to be chosen by the distro
|
||||
packaging system.
|
||||
|
||||
Note that LIBDIR uses "\${prefix}/lib" as default value because autoconf
|
||||
allows this to be expanded to the --prefix value at configure runtime.
|
||||
"\${prefix}" is replaced with the PREFIX value in check_lib_dir().
|
||||
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Acked-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: David Ahern <dsahern@kernel.org>
|
||||
---
|
||||
Makefile | 7 ++++---
|
||||
configure | 18 ++++++++++++++++++
|
||||
2 files changed, 22 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 5bc11477..45655ca4 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Top level Makefile for iproute2
|
||||
|
||||
+-include config.mk
|
||||
+
|
||||
ifeq ("$(origin V)", "command line")
|
||||
VERBOSE = $(V)
|
||||
endif
|
||||
@@ -13,7 +15,6 @@ MAKEFLAGS += --no-print-directory
|
||||
endif
|
||||
|
||||
PREFIX?=/usr
|
||||
-LIBDIR?=$(PREFIX)/lib
|
||||
SBINDIR?=/sbin
|
||||
CONFDIR?=/etc/iproute2
|
||||
NETNS_RUN_DIR?=/var/run/netns
|
||||
@@ -60,7 +61,7 @@ SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa
|
||||
LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
|
||||
LDLIBS += $(LIBNETLINK)
|
||||
|
||||
-all: config
|
||||
+all: config.mk
|
||||
@set -e; \
|
||||
for i in $(SUBDIRS); \
|
||||
do echo; echo $$i; $(MAKE) -C $$i; done
|
||||
@@ -80,7 +81,7 @@ help:
|
||||
@echo "Make Arguments:"
|
||||
@echo " V=[0|1] - set build verbosity level"
|
||||
|
||||
-config:
|
||||
+config.mk:
|
||||
@if [ ! -f config.mk -o configure -nt config.mk ]; then \
|
||||
sh configure $(KERNEL_INCLUDE); \
|
||||
fi
|
||||
diff --git a/configure b/configure
|
||||
index 05e23eff..8ddff43c 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
INCLUDE="$PWD/include"
|
||||
PREFIX="/usr"
|
||||
+LIBDIR="\${prefix}/lib"
|
||||
|
||||
# Output file which is input to Makefile
|
||||
CONFIG=config.mk
|
||||
@@ -149,6 +150,15 @@ EOF
|
||||
rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest
|
||||
}
|
||||
|
||||
+check_lib_dir()
|
||||
+{
|
||||
+ LIBDIR=$(echo $LIBDIR | sed "s|\${prefix}|$PREFIX|")
|
||||
+
|
||||
+ echo -n "lib directory: "
|
||||
+ echo "$LIBDIR"
|
||||
+ echo "LIBDIR:=$LIBDIR" >> $CONFIG
|
||||
+}
|
||||
+
|
||||
check_ipt()
|
||||
{
|
||||
if ! grep TC_CONFIG_XT $CONFIG > /dev/null; then
|
||||
@@ -487,6 +497,7 @@ usage()
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTIONS]
|
||||
--include_dir <dir> Path to iproute2 include dir
|
||||
+ --libdir <dir> Path to iproute2 lib dir
|
||||
--libbpf_dir <dir> Path to libbpf DESTDIR
|
||||
--libbpf_force <on|off> Enable/disable libbpf by force. Available options:
|
||||
on: require link against libbpf, quit config if no libbpf support
|
||||
@@ -508,6 +519,11 @@ else
|
||||
INCLUDE="$1" ;;
|
||||
--include_dir=*)
|
||||
INCLUDE="${1#*=}" ;;
|
||||
+ --libdir)
|
||||
+ shift
|
||||
+ LIBDIR="$1" ;;
|
||||
+ --libdir=*)
|
||||
+ LIBDIR="${1#*=}" ;;
|
||||
--libbpf_dir)
|
||||
shift
|
||||
LIBBPF_DIR="$1" ;;
|
||||
@@ -544,6 +560,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then
|
||||
fi
|
||||
fi
|
||||
[ -z "$PREFIX" ] && usage 1
|
||||
+[ -z "$LIBDIR" ] && usage 1
|
||||
|
||||
echo "# Generated config based on" $INCLUDE >$CONFIG
|
||||
quiet_config >> $CONFIG
|
||||
@@ -568,6 +585,7 @@ if ! grep -q TC_CONFIG_NO_XT $CONFIG; then
|
||||
fi
|
||||
|
||||
echo
|
||||
+check_lib_dir
|
||||
if ! grep -q TC_CONFIG_NO_XT $CONFIG; then
|
||||
echo -n "iptables modules directory: "
|
||||
check_ipt_lib_dir
|
||||
--
|
||||
2.31.1
|
||||
|
15
iproute.spec
15
iproute.spec
@ -1,20 +1,13 @@
|
||||
Summary: Advanced IP routing and network device configuration tools
|
||||
Name: iproute
|
||||
Version: 5.15.0
|
||||
Release: 2%{?dist}%{?buildid}
|
||||
Version: 5.18.0
|
||||
Release: 1%{?dist}%{?buildid}
|
||||
%if 0%{?rhel}
|
||||
Group: Applications/System
|
||||
%endif
|
||||
URL: https://kernel.org/pub/linux/utils/net/%{name}2/
|
||||
Source0: https://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz
|
||||
Source1: rt_dsfield.deprecated
|
||||
Patch0: 0001-configure-fix-parsing-issue-on-include_dir-option.patch
|
||||
Patch1: 0002-configure-fix-parsing-issue-on-libbpf_dir-option.patch
|
||||
Patch2: 0003-configure-fix-parsing-issue-with-more-than-one-value.patch
|
||||
Patch3: 0004-configure-simplify-options-parsing.patch
|
||||
Patch4: 0005-configure-support-param-value-style.patch
|
||||
Patch5: 0006-configure-add-the-prefix-option.patch
|
||||
Patch6: 0007-configure-add-the-libdir-option.patch
|
||||
|
||||
License: GPLv2+ and Public Domain
|
||||
BuildRequires: bison
|
||||
@ -120,6 +113,7 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield
|
||||
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/iproute2/*
|
||||
%{_sbindir}/*
|
||||
%exclude %{_sbindir}/tc
|
||||
%exclude %{_sbindir}/routel
|
||||
%{_datadir}/bash-completion/completions/devlink
|
||||
|
||||
%files tc
|
||||
@ -146,6 +140,9 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield
|
||||
%{_includedir}/iproute2/bpf_elf.h
|
||||
|
||||
%changelog
|
||||
* Wed Jun 15 2022 Andrea Claudi <aclaudi@redhat.com> - 5.18.0-1.el9
|
||||
- New version 5.18.0 [2074608]
|
||||
|
||||
* Thu Nov 25 2021 Andrea Claudi <aclaudi@redhat.com> - 5.15.0-2.el9
|
||||
- Fix gating.yaml [2009355]
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
# tc initialization script (sh)
|
||||
|
||||
if [ -z "$TC_LIB_DIR" ]; then
|
||||
export TC_LIB_DIR=/usr/lib64/tc
|
||||
fi
|
1
sources
1
sources
@ -1,3 +1,4 @@
|
||||
SHA512 (iproute2-5.10.0.tar.xz) = a468eefa797898b6de452212aa432c0a931434defacae5fb4335754c1292c5d86a8c8dbf3017f90cec266d71a2a17ae469aac17e1a85a5cbddc70814313e4c13
|
||||
SHA512 (iproute2-5.13.0.tar.xz) = a3286639fb303a7c3c553cb5df0a7336c4c67e53eb05e872d2776b771dbfa36ffdf2df140f570275db6785c882992f469f8eb34a5b506aac876216df7dde245d
|
||||
SHA512 (iproute2-5.15.0.tar.xz) = e94918fa10e523224b965c7cb5303a101745e89c90d149d2d9876a002b2a894b1c689c519dc22168f3d334c3ee0810c59ec43223baab3d5f4c56f017d6281f22
|
||||
SHA512 (iproute2-5.18.0.tar.xz) = 7b43c89741a8ffe8fd529ac4ee19c8eab7dce2f064de494c160c75456ffb960fb5f1e78c868ab98360dafde28d5e2c4d58177135b6d380e80e06eba9e3eaf068
|
||||
|
Loading…
Reference in New Issue
Block a user