naccyde / rpms / iproute

Forked from rpms/iproute 8 months ago
Clone

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

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