From 317b1614670f0820f465261b16539b67a1c72d08 Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Fri, 3 Jan 2025 14:07:57 +0000 Subject: [PATCH] gnupg: fix running autoreconf --- build/gnupg/build.sh | 1 + .../patches/002-avoid-beta-warning.patch | 44 +++++++++++++++++++ build/gnupg/patches/gcc14.patch | 30 +++++-------- build/gnupg/patches/no-html-doc.patch | 20 +++++---- build/gnupg/patches/series | 1 + 5 files changed, 67 insertions(+), 29 deletions(-) create mode 100644 build/gnupg/patches/002-avoid-beta-warning.patch diff --git a/build/gnupg/build.sh b/build/gnupg/build.sh index 7fe67ef3c..69aba673c 100755 --- a/build/gnupg/build.sh +++ b/build/gnupg/build.sh @@ -136,6 +136,7 @@ PATH+=":$DEPROOT$PREFIX/bin" download_source $PROG $PROG $VER patch_source +run_autoreconf -fi build install_execattr run_testsuite check diff --git a/build/gnupg/patches/002-avoid-beta-warning.patch b/build/gnupg/patches/002-avoid-beta-warning.patch new file mode 100644 index 000000000..9faa6da74 --- /dev/null +++ b/build/gnupg/patches/002-avoid-beta-warning.patch @@ -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 +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 diff --git a/build/gnupg/patches/gcc14.patch b/build/gnupg/patches/gcc14.patch index 0d59c9dd6..47a0abed1 100644 --- a/build/gnupg/patches/gcc14.patch +++ b/build/gnupg/patches/gcc14.patch @@ -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 -+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 ++ int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union { diff --git a/build/gnupg/patches/no-html-doc.patch b/build/gnupg/patches/no-html-doc.patch index 4497aa98d..73255483c 100644 --- a/build/gnupg/patches/no-html-doc.patch +++ b/build/gnupg/patches/no-html-doc.patch @@ -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) diff --git a/build/gnupg/patches/series b/build/gnupg/patches/series index bad30a44a..a4bdfabb2 100644 --- a/build/gnupg/patches/series +++ b/build/gnupg/patches/series @@ -1,3 +1,4 @@ +002-avoid-beta-warning.patch thread_cputime.patch no-html-doc.patch gcc14.patch