Skip to content

Commit

Permalink
Merge pull request #1566 from hadfl/gnupg
Browse files Browse the repository at this point in the history
gnupg: fix running autoreconf
  • Loading branch information
citrus-it authored Jan 3, 2025
2 parents 41d9152 + 317b161 commit a5560c9
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 29 deletions.
1 change: 1 addition & 0 deletions build/gnupg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ PATH+=":$DEPROOT$PREFIX/bin"

download_source $PROG $PROG $VER
patch_source
run_autoreconf -fi
build
install_execattr
run_testsuite check
Expand Down
44 changes: 44 additions & 0 deletions build/gnupg/patches/002-avoid-beta-warning.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Patch from:
https://sources.debian.org/patches/gnupg2/2.4.5-3/debian-packaging/avoid-beta-warning.patch/

Not suitable for upstream

From: Debian GnuPG Maintainers <[email protected]>
Date: Tue, 14 Apr 2015 10:02:31 -0400
Subject: avoid-beta-warning

avoid self-describing as a beta

Using autoreconf against the source as distributed in tarball form
invariably results in a package that thinks it's a "beta" package,
which produces the "THIS IS A DEVELOPMENT VERSION" warning string.

since we use dh_autoreconf, i need this patch to avoid producing
builds that announce themselves as DEVELOPMENT VERSIONs.

See discussion at:

http://lists.gnupg.org/pipermail/gnupg-devel/2014-November/029065.html
diff -wpruN --no-dereference '--exclude=*.orig' a~/autogen.sh a/autogen.sh
--- a~/autogen.sh 1970-01-01 00:00:00
+++ a/autogen.sh 1970-01-01 00:00:00
@@ -221,7 +221,7 @@ if [ "$myhost" = "find-version" ]; then
esac

beta=no
- if [ -e .git ]; then
+ if false; then
ingit=yes
tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
tmp=$(echo "$tmp" | sed s/^"$package"//)
@@ -237,8 +237,8 @@ if [ "$myhost" = "find-version" ]; then
rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
else
ingit=no
- beta=yes
- tmp="-unknown"
+ beta=no
+ tmp=""
rev="0000000"
rvd="0"
fi
30 changes: 10 additions & 20 deletions build/gnupg/patches/gcc14.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
unfortunately we need to patch configure instead of acinclude.m4
as running autoconf will lead to gnupg being flagged as dev release

./gpg --version
gpg (GnuPG) 2.4.7-unknown
libgcrypt 1.11.0
NOTE: THIS IS A DEVELOPMENT VERSION!
It is only intended for test purposes and should NOT be
used in a production environment or with production keys!

diff -wpruN --no-dereference '--exclude=*.orig' a~/configure a/configure
--- a~/configure 1970-01-01 00:00:00
+++ a/configure 1970-01-01 00:00:00
@@ -14096,7 +14096,8 @@ rm -f core conftest.err conftest.$ac_obj
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-main () {
+#include <stdlib.h>
+int main (void) {
diff -wpruN --no-dereference '--exclude=*.orig' a~/acinclude.m4 a/acinclude.m4
--- a~/acinclude.m4 1970-01-01 00:00:00
+++ a/acinclude.m4 1970-01-01 00:00:00
@@ -84,7 +84,8 @@ AC_DEFUN([GNUPG_CHECK_ENDIAN],
not big endian
#endif]])], gnupg_cv_c_endian=big, gnupg_cv_c_endian=little)])
if test "$gnupg_cv_c_endian" = unknown; then
- AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
+ int main (void) {
/* Are we little or big endian? From Harbison&Steele. */
union
{
20 changes: 11 additions & 9 deletions build/gnupg/patches/no-html-doc.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
see comment in gcc14.patch

diff -wpruN --no-dereference '--exclude=*.orig' a~/doc/Makefile.in a/doc/Makefile.in
--- a~/doc/Makefile.in 1970-01-01 00:00:00
+++ a/doc/Makefile.in 1970-01-01 00:00:00
@@ -538,11 +538,11 @@ myhtmlman_pages = \
diff -wpruN --no-dereference '--exclude=*.orig' a~/doc/Makefile.am a/doc/Makefile.am
--- a~/doc/Makefile.am 1970-01-01 00:00:00
+++ a/doc/Makefile.am 1970-01-01 00:00:00
@@ -95,7 +95,7 @@ myhtmlman_pages = \
gpg-wks-server.1.html \
dirmngr-client.1.html gpg-card.1.html gpg-check-pattern.1.html

-man_MANS = $(myman_pages) gnupg.7 gnupg.7.html
+man_MANS = $(myman_pages) gnupg.7

watchgnupg_SOURCE = gnupg.texi

@@ -103,7 +103,7 @@ watchgnupg_SOURCE = gnupg.texi
CLEANFILES = yat2m mkdefsinc defs.inc

DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
- $(myman_pages) gnupg.7 gnupg.7.html $(myhtmlman_pages)
+ $(myman_pages) gnupg.7

all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -1260,7 +1260,7 @@ yat2m-stamp: $(myman_sources) defs.inc
yat2m: yat2m.c
$(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
@@ -152,7 +152,7 @@ yat2m-stamp: $(myman_sources) defs.inc

yat2m-stamp: $(YAT2M)

Expand Down
1 change: 1 addition & 0 deletions build/gnupg/patches/series
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
002-avoid-beta-warning.patch
thread_cputime.patch
no-html-doc.patch
gcc14.patch

0 comments on commit a5560c9

Please sign in to comment.