From f76bd2c6c1b94792112d311ac53662d3d9b6821d Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 11 Oct 2020 22:22:04 -0400 Subject: makepkg: fix signing of source packages In commit c6b04c04653ba9933fe978829148312e412a9ea7 the signing stage was moved out of fakeroot, and thus into the main control flow instead of create_{,src}package While the function for signing binary packages has logic to build and gpg-sign multiple filenames, the source package never got this special treatment. This would be fine, except it uses the standard variables to set define the filename... like ${fullver}, which is usually set beforehand, but in this case is not. We don't define fullver globally as it's an internal implementation detail, except by sheer coincidence if PKGVERFUNC is false due to improperly guarded code. Result: source packages didn't end up signed. Instead, we raised a logic error: ==> WARNING: Failed to sign package file somepackage-.src.tar.gz. ==> ERROR: An unknown error has occurred. Exiting... Instead, let's just build the version inline, since we only use it once. Reported-by: GaKu999 Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 3ed12eab..9fe2d2e7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1360,7 +1360,7 @@ if (( SOURCEONLY )); then if [[ $SIGNPKG = 'y' ]]; then msg "$(gettext "Signing package...")" - create_signature "$SRCPKGDEST/${pkgbase}-${fullver}${SRCEXT}" + create_signature "$SRCPKGDEST/${pkgbase}-$(get_full_version)${SRCEXT}" fi msg "$(gettext "Source package created: %s")" "$pkgbase ($(date +%c))" -- cgit v1.2.3-24-g4f1b