gnupg/gnupg.patch

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
parent 107
2f8ffdf7658b
child 373
b8e8f9dbbfd3
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

michael@30 1 Index: agent/genkey.c
michael@286 2 --- agent/genkey.c.orig 2009-06-29 08:20:15 +0200
michael@286 3 +++ agent/genkey.c 2009-09-06 22:59:18 +0200
michael@286 4 @@ -190,11 +190,9 @@
michael@30 5 return gpg_error (GPG_ERR_INV_PASSPHRASE);
michael@30 6
michael@30 7 desc = xtryasprintf
michael@30 8 - ( ngettext ("Warning: You have entered an insecure passphrase.%%0A"
michael@30 9 + ( "Warning: You have entered an insecure passphrase.%%0A"
michael@30 10 "A passphrase should be at least %u character long.",
michael@30 11 - "Warning: You have entered an insecure passphrase.%%0A"
michael@30 12 - "A passphrase should be at least %u characters long.",
michael@30 13 - minlen), minlen );
michael@30 14 + minlen);
michael@30 15 if (!desc)
michael@30 16 return gpg_error_from_syserror ();
michael@30 17 err = take_this_one_anyway (ctrl, desc);
michael@30 18 Index: configure
michael@286 19 --- configure.orig 2009-09-04 18:09:14 +0200
michael@286 20 +++ configure 2009-09-06 23:05:29 +0200
michael@286 21 @@ -7992,13 +7992,13 @@
michael@30 22 # Check wether it is necessary to link against libdl.
michael@30 23 #
michael@30 24 gnupg_dlopen_save_libs="$LIBS"
michael@30 25 -LIBS=""
michael@286 26 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
michael@286 27 $as_echo_n "checking for library containing dlopen... " >&6; }
michael@286 28 if test "${ac_cv_search_dlopen+set}" = set; then :
michael@286 29 $as_echo_n "(cached) " >&6
michael@30 30 else
michael@30 31 ac_func_search_save_LIBS=$LIBS
michael@30 32 + LIBS=""
michael@286 33 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
michael@286 34 /* end confdefs.h. */
michael@286 35
michael@286 36 Index: g10/seckey-cert.c
michael@107 37 --- g10/seckey-cert.c.orig 2008-03-18 17:46:32.000000000 +0100
michael@107 38 +++ g10/seckey-cert.c 2009-02-18 21:25:25.508715635 +0100
michael@107 39 @@ -209,6 +209,11 @@
michael@107 40 csum += checksum (buffer, ndata);
michael@107 41 gcry_mpi_release (sk->skey[i]);
michael@107 42
michael@107 43 + if (sk->protect.algo==CIPHER_ALGO_IDEA) {
michael@107 44 + buffer[0] = 0;
michael@107 45 + buffer[1] = 0;
michael@107 46 + }
michael@107 47 +
michael@107 48 err = gcry_mpi_scan( &sk->skey[i], GCRYMPI_FMT_PGP,
michael@107 49 buffer, ndata, &ndata );
michael@107 50 xfree (buffer);

mercurial