From 389decab7b9bcba307e52709b00741a19405f02b Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Wed, 2 Feb 2022 16:07:46 -0500 Subject: [PATCH 3/5] macros: drop %{_pesign_args} Effectively reverts 30b488682a92c524bb9c0d450c34e9abc0b56de9 Also, make our argument parser fail on extra arguments to make it easier to debug when this kind of thing happens again. Signed-off-by: Robbie Harwood --- src/macros.pesign | 1 - src/pesign-rpmbuild-helper.in | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/macros.pesign b/src/macros.pesign index 519a8a3..34af57c 100644 --- a/src/macros.pesign +++ b/src/macros.pesign @@ -27,7 +27,6 @@ %{_libexecdir}/pesign/pesign-rpmbuild-helper \\\ "%{_target_cpu}" \\\ "%{_pesign}" \\\ - "%{_pesign_args}" \\\ "%{_pesign_client}" \\\ %{?__pesign_client_token:--client-token %{__pesign_client_token}} \\\ %{?__pesign_client_cert:--client-cert %{__pesign_client_cert}} \\\ diff --git a/src/pesign-rpmbuild-helper.in b/src/pesign-rpmbuild-helper.in index 27b8261..0a845d2 100644 --- a/src/pesign-rpmbuild-helper.in +++ b/src/pesign-rpmbuild-helper.in @@ -133,6 +133,11 @@ main() { sign=-s shift fi + if [[ $# -ge 1 ]] ; then + echo "$# extra unparsed arguments!">>/dev/stderr + echo "Cowardly refusing to run">>/dev/stderr + exit 1 + fi if [[ -z "${target_cpu}" ]] ; then target_cpu="$(uname -m)" -- 2.34.1