naccyde / rpms / iproute

Forked from rpms/iproute 8 months ago
Clone

Blame SOURCES/0003-configure-fix-parsing-issue-with-more-than-one-value.patch

7570e2
From 7d7655d0cc66288959b41f36ee1c52043cd86b79 Mon Sep 17 00:00:00 2001
7570e2
Message-Id: <7d7655d0cc66288959b41f36ee1c52043cd86b79.1637749821.git.aclaudi@redhat.com>
7570e2
In-Reply-To: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
7570e2
References: <cef782ca658d695c5ca2d174ba1f89cba6bd84e5.1637749821.git.aclaudi@redhat.com>
7570e2
From: Andrea Claudi <aclaudi@redhat.com>
7570e2
Date: Wed, 24 Nov 2021 11:28:08 +0100
7570e2
Subject: [PATCH] configure: fix parsing issue with more than one value per
7570e2
 option
7570e2
7570e2
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2009355
7570e2
Upstream Status: iproute2.git commit c330d097
7570e2
7570e2
commit c330d0979440a1dec4a436fd742bb6e28d195526
7570e2
Author: Andrea Claudi <aclaudi@redhat.com>
7570e2
Date:   Thu Oct 14 10:50:51 2021 +0200
7570e2
7570e2
    configure: fix parsing issue with more than one value per option
7570e2
7570e2
    With commit a9c3d70d902a ("configure: add options ability") users are no
7570e2
    more able to provide wrong command lines like:
7570e2
7570e2
    $ ./configure --include_dir foo bar
7570e2
7570e2
    The script simply bails out when user provides more than one value for a
7570e2
    single option. However, in doing so, it breaks backward compatibility with
7570e2
    some packaging system, which expects unknown options to be ignored.
7570e2
7570e2
    Commit a3272b93725a ("configure: restore backward compatibility") fix this
7570e2
    issue, but makes it possible again for users to provide wrong command lines
7570e2
    such as the one above.
7570e2
7570e2
    This fixes the issue simply ignoring autoconf-like options such as
7570e2
    '--opt=value'.
7570e2
7570e2
    Fixes: a3272b93725a ("configure: restore backward compatibility")
7570e2
    Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
7570e2
    Acked-by: Phil Sutter <phil@nwl.cc>
7570e2
    Signed-off-by: David Ahern <dsahern@kernel.org>
7570e2
---
7570e2
 configure | 4 +++-
7570e2
 1 file changed, 3 insertions(+), 1 deletion(-)
7570e2
7570e2
diff --git a/configure b/configure
7570e2
index 0f304206..9ec19a5b 100755
7570e2
--- a/configure
7570e2
+++ b/configure
7570e2
@@ -517,10 +517,12 @@ else
7570e2
 				shift 2 ;;
7570e2
 			-h | --help)
7570e2
 				usage 0 ;;
7570e2
+			--*)
7570e2
+				shift ;;
7570e2
 			"")
7570e2
 				break ;;
7570e2
 			*)
7570e2
-				shift 1 ;;
7570e2
+				usage 1 ;;
7570e2
 		esac
7570e2
 	done
7570e2
 fi
7570e2
-- 
7570e2
2.31.1
7570e2