naccyde / rpms / iproute

Forked from rpms/iproute 7 months ago
Clone

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

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