naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

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

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