naccyde / rpms / iproute

Forked from rpms/iproute a year ago
Clone

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

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