Dave Reisner <[email protected]> on Wed, 2012/09/26 11:37:
> On Wed, Sep 26, 2012 at 04:54:04PM +0200, Christian Hesse wrote:
> > Hello everybody,
> > 
> > I have just installed pacman-git v4.0.3.402.g2abe1f1-1. Everything works
> > just fine except one thing: package signing does not work though it is
> > requested in makepkg.conf with BUILDENV=(... sign). Giving --sign to
> > makepkg works, however. What is wrong with the BUILDENV array in
> > makepkg.conf?
> 
> This isn't git specific -- signing behaves the same way in 4.0.3. You
> need to specify your key shorthash, e.g. GPGKEY=F56C0C53 in makepkg.conf
> as well. The setting is just below the 'PACKAGER' variable in the
> default shipped config.

I have tried with my mail address as well as the shorthash, both do not
work. No problem with pacman 4.0.3.

Just took a look at the source code... create_signature() at line 1806 returns
without any action if SIGNPKG does not equal to "y". But SIGNPKG is only set
to "y" with --sign, no matter what check_buildenv returns.

The attached patch fixes this for me.
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}
diff --git a/makepkg b/makepkg
index f2abd81..aecdbc8 100755
--- a/makepkg
+++ b/makepkg
@@ -2782,6 +2782,7 @@ fi
 
 # check if gpg signature is to be created and if signing key is valid
 if { [[ -z $SIGNPKG ]] && check_buildenv "sign" "y"; } || [[ $SIGNPKG == 'y' ]]; then
+	SIGNPKG="y"
 	if ! gpg --list-key ${GPGKEY} &>/dev/null; then
 		if [[ ! -z $GPGKEY ]]; then
 			error "$(gettext "The key %s does not exist in your keyring.")" "${GPGKEY}"


Reply via email to