From 79310839e23136450bca4c71b6ddd49475e3e0ef Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Mon, 15 Jun 2020 19:00:37 +0200 Subject: Bump libgpg-error to v1.38 Signed-off-by: Thomas Deutschmann --- gkbuilds/libgpg-error.gkbuild | 9 +- .../1.37/libgpg-error-1.36-gpg-error-config.patch | 38 ------- .../libgpg-error-1.37-remove_broken_check.patch | 22 ---- .../1.38/libgpg-error-1.36-gpg-error-config.patch | 38 +++++++ .../libgpg-error-1.37-remove_broken_check.patch | 22 ++++ ...cross-compiling-into-a-separate-build-dir.patch | 41 +++++++ ...8-002-On-cross-build-detect-hosts-objdump.patch | 54 ++++++++++ ...1.38-003-Fix-command-line-to-make-src-dir.patch | 26 +++++ .../libgpg-error-1.38-004-add-missing-file.patch | 118 +++++++++++++++++++++ 9 files changed, 306 insertions(+), 62 deletions(-) delete mode 100644 patches/libgpg-error/1.37/libgpg-error-1.36-gpg-error-config.patch delete mode 100644 patches/libgpg-error/1.37/libgpg-error-1.37-remove_broken_check.patch create mode 100644 patches/libgpg-error/1.38/libgpg-error-1.36-gpg-error-config.patch create mode 100644 patches/libgpg-error/1.38/libgpg-error-1.37-remove_broken_check.patch create mode 100644 patches/libgpg-error/1.38/libgpg-error-1.38-001-fix-cross-compiling-into-a-separate-build-dir.patch create mode 100644 patches/libgpg-error/1.38/libgpg-error-1.38-002-On-cross-build-detect-hosts-objdump.patch create mode 100644 patches/libgpg-error/1.38/libgpg-error-1.38-003-Fix-command-line-to-make-src-dir.patch create mode 100644 patches/libgpg-error/1.38/libgpg-error-1.38-004-add-missing-file.patch diff --git a/gkbuilds/libgpg-error.gkbuild b/gkbuilds/libgpg-error.gkbuild index 7b74bb9a..1e42881c 100644 --- a/gkbuilds/libgpg-error.gkbuild +++ b/gkbuilds/libgpg-error.gkbuild @@ -2,6 +2,13 @@ # Distributed under the terms of the GNU General Public License v2 src_prepare() { + # gen-lock-obj.sh is missing in 1.38 release tarball + # and patch can't add non-existing files + echo "dummy" > "${S}"/src/gen-lock-obj.sh || die + chmod 0755 "${S}"/src/gen-lock-obj.sh || die + + default + if [[ ! -f "${S}/src/syscfg/lock-obj-pub.${CHOST}.h" ]] then print_warning 3 "CHOST '${CHOST}' not known by ${P} -- workaround for bug 584052 needed ..." @@ -40,8 +47,6 @@ src_prepare() { print_warning 3 "CHOST set to '${CHOST_KNOWN}'!" fi fi - - default } src_configure() { diff --git a/patches/libgpg-error/1.37/libgpg-error-1.36-gpg-error-config.patch b/patches/libgpg-error/1.37/libgpg-error-1.36-gpg-error-config.patch deleted file mode 100644 index e94d57e6..00000000 --- a/patches/libgpg-error/1.37/libgpg-error-1.36-gpg-error-config.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index e46b240..4606c31 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -531,16 +531,6 @@ fi - GPG_ERROR_CONFIG_HOST="$host" - - case "$includedir" in -- /usr/include|/include) ;; -- '${prefix}/include') -- if test "$prefix" != / -a "$prefix" != /usr; then -- if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then -- GPG_ERROR_CONFIG_CFLAGS="-I$includedir" -- else -- GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS" -- fi -- fi -- ;; - *) - if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then - GPG_ERROR_CONFIG_CFLAGS="-I$includedir" -@@ -550,16 +540,6 @@ case "$includedir" in - ;; - esac - case "$libdir" in -- /usr/lib|/usr/lib64|/lib|/lib64) ;; -- '${exec_prefix}/lib') -- if test "$exec_prefix" = "NONE"; then -- if test "$prefix" != / -a "$prefix" != /usr; then -- GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" -- fi -- elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then -- GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" -- fi -- ;; - *) GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" ;; - esac - diff --git a/patches/libgpg-error/1.37/libgpg-error-1.37-remove_broken_check.patch b/patches/libgpg-error/1.37/libgpg-error-1.37-remove_broken_check.patch deleted file mode 100644 index 2919a9d7..00000000 --- a/patches/libgpg-error/1.37/libgpg-error-1.37-remove_broken_check.patch +++ /dev/null @@ -1,22 +0,0 @@ -This breaks our multilib builds: - - Confirm gpg-error-config works... no - *** Please report to with gpg-error-config-test.log - ---- libgpg-error-1.37/src/Makefile.am -+++ libgpg-error-1.37/src/Makefile.am -@@ -338,14 +338,6 @@ - cp gpg-error.h gpgrt.h - - gpg-error-config: gpgrt-config gpg-error-config-old -- @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)" -- @if ./gpg-error-config-test.sh --old-new; then \ -- echo "good"; \ -- else \ -- echo "no"; \ -- echo "*** Please report to with gpg-error-config-test.log"; \ -- exit 1; \ -- fi - cp gpg-error-config-old $@ - - install-data-local: diff --git a/patches/libgpg-error/1.38/libgpg-error-1.36-gpg-error-config.patch b/patches/libgpg-error/1.38/libgpg-error-1.36-gpg-error-config.patch new file mode 100644 index 00000000..e94d57e6 --- /dev/null +++ b/patches/libgpg-error/1.38/libgpg-error-1.36-gpg-error-config.patch @@ -0,0 +1,38 @@ +diff --git a/configure.ac b/configure.ac +index e46b240..4606c31 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -531,16 +531,6 @@ fi + GPG_ERROR_CONFIG_HOST="$host" + + case "$includedir" in +- /usr/include|/include) ;; +- '${prefix}/include') +- if test "$prefix" != / -a "$prefix" != /usr; then +- if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then +- GPG_ERROR_CONFIG_CFLAGS="-I$includedir" +- else +- GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS" +- fi +- fi +- ;; + *) + if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then + GPG_ERROR_CONFIG_CFLAGS="-I$includedir" +@@ -550,16 +540,6 @@ case "$includedir" in + ;; + esac + case "$libdir" in +- /usr/lib|/usr/lib64|/lib|/lib64) ;; +- '${exec_prefix}/lib') +- if test "$exec_prefix" = "NONE"; then +- if test "$prefix" != / -a "$prefix" != /usr; then +- GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" +- fi +- elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then +- GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" +- fi +- ;; + *) GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" ;; + esac + diff --git a/patches/libgpg-error/1.38/libgpg-error-1.37-remove_broken_check.patch b/patches/libgpg-error/1.38/libgpg-error-1.37-remove_broken_check.patch new file mode 100644 index 00000000..2919a9d7 --- /dev/null +++ b/patches/libgpg-error/1.38/libgpg-error-1.37-remove_broken_check.patch @@ -0,0 +1,22 @@ +This breaks our multilib builds: + + Confirm gpg-error-config works... no + *** Please report to with gpg-error-config-test.log + +--- libgpg-error-1.37/src/Makefile.am ++++ libgpg-error-1.37/src/Makefile.am +@@ -338,14 +338,6 @@ + cp gpg-error.h gpgrt.h + + gpg-error-config: gpgrt-config gpg-error-config-old +- @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)" +- @if ./gpg-error-config-test.sh --old-new; then \ +- echo "good"; \ +- else \ +- echo "no"; \ +- echo "*** Please report to with gpg-error-config-test.log"; \ +- exit 1; \ +- fi + cp gpg-error-config-old $@ + + install-data-local: diff --git a/patches/libgpg-error/1.38/libgpg-error-1.38-001-fix-cross-compiling-into-a-separate-build-dir.patch b/patches/libgpg-error/1.38/libgpg-error-1.38-001-fix-cross-compiling-into-a-separate-build-dir.patch new file mode 100644 index 00000000..8f40bbc5 --- /dev/null +++ b/patches/libgpg-error/1.38/libgpg-error-1.38-001-fix-cross-compiling-into-a-separate-build-dir.patch @@ -0,0 +1,41 @@ +From 013720333c6ec1d38791689bc49ba039d98e16b3 Mon Sep 17 00:00:00 2001 +From: David Michael +Date: Mon, 1 Jun 2020 10:24:53 -0400 +Subject: [PATCH] build: Fix cross-compiling into a separate build dir. + +* configure.ac: Create the src directory before writing into it. +* src/Makefile.am (EXTRA_DIST): Add gen-lock-obj.sh. + +-- + +Signed-off-by: David Michael +--- + configure.ac | 1 + + src/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 6bd634b..1dd6489 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -598,6 +598,7 @@ if test x$cross_compiling = xyes; then + case $host in + *-*-linux*) + lock_obj_h_generated=yes ++ mkdir src + LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \ + CC=$CC OBJDUMP=$host_alias-objdump \ + ac_ext=$ac_ext ac_objext=$ac_objext \ +diff --git a/src/Makefile.am b/src/Makefile.am +index 7e36d69..b2bffd2 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -102,7 +102,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ + gpg-error.vers gpg-error.def.in \ + versioninfo.rc.in gpg-error.w32-manifest.in \ + gpg-error-config-test.sh gpg-error.pc.in \ +- $(lock_obj_pub) ++ gen-lock-obj.sh $(lock_obj_pub) + + BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \ + code-to-errno.h code-from-errno.h \ diff --git a/patches/libgpg-error/1.38/libgpg-error-1.38-002-On-cross-build-detect-hosts-objdump.patch b/patches/libgpg-error/1.38/libgpg-error-1.38-002-On-cross-build-detect-hosts-objdump.patch new file mode 100644 index 00000000..2f5bd67f --- /dev/null +++ b/patches/libgpg-error/1.38/libgpg-error-1.38-002-On-cross-build-detect-hosts-objdump.patch @@ -0,0 +1,54 @@ +From ce97528fa3dcc58d86e18d4d8820f210a624f63d Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Thu, 11 Jun 2020 10:19:15 +0900 +Subject: [PATCH] build: On cross build, detect host's objdump. + +* configure.ac [*-*-linux*] (CROSS_HOST_OBJDUMP): New. + +-- + +To support widely, we could also use objdump configured for multiple +archs which supports host's format (instead of $host_alias-objdump), +like objdump in binutils-multiarch of Debian, but it's not that easy +to maintain the code to determine format name from $host_alias. + +Or we could use eu-size in elfutils. + +GnuPG-bug-id: 4973 +Signed-off-by: NIIBE Yutaka +--- + configure.ac | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1dd6489..d5fa4b0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -597,14 +597,19 @@ fi + if test x$cross_compiling = xyes; then + case $host in + *-*-linux*) +- lock_obj_h_generated=yes +- mkdir src +- LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \ +- CC=$CC OBJDUMP=$host_alias-objdump \ +- ac_ext=$ac_ext ac_objext=$ac_objext \ +- AWK=$AWK $srcdir/src/gen-lock-obj.sh \ +- >src/lock-obj-pub.native.h +- AC_MSG_NOTICE([generated src/lock-obj-pub.native.h]) ++ AC_CHECK_PROG(CROSS_HOST_OBJDUMP, [$host_alias-objdump], [yes]) ++ if test "$CROSS_HOST_OBJDUMP" = "yes" ; then ++ lock_obj_h_generated=yes ++ if test ! -d src; mkdir src; fi ++ LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \ ++ CC=$CC OBJDUMP=$host_alias-objdump \ ++ ac_ext=$ac_ext ac_objext=$ac_objext \ ++ AWK=$AWK $srcdir/src/gen-lock-obj.sh \ ++ >src/lock-obj-pub.native.h ++ AC_MSG_NOTICE([generated src/lock-obj-pub.native.h using $host_alias-objdump and $AWK]) ++ else ++ force_use_syscfg=yes ++ fi + ;; + *) + force_use_syscfg=yes diff --git a/patches/libgpg-error/1.38/libgpg-error-1.38-003-Fix-command-line-to-make-src-dir.patch b/patches/libgpg-error/1.38/libgpg-error-1.38-003-Fix-command-line-to-make-src-dir.patch new file mode 100644 index 00000000..5fc7f15d --- /dev/null +++ b/patches/libgpg-error/1.38/libgpg-error-1.38-003-Fix-command-line-to-make-src-dir.patch @@ -0,0 +1,26 @@ +From 159e394920f6be822d771fe003498de4d93b07c3 Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Fri, 12 Jun 2020 08:59:01 +0900 +Subject: [PATCH] build: Fix command-line to make 'src 'dir. + +* configure.ac: Mistake, then, fix it. + +Fixes-commit: ce97528fa3dcc58d86e18d4d8820f210a624f63d +Signed-off-by: NIIBE Yutaka +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d5fa4b0..80d24db 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -600,7 +600,7 @@ if test x$cross_compiling = xyes; then + AC_CHECK_PROG(CROSS_HOST_OBJDUMP, [$host_alias-objdump], [yes]) + if test "$CROSS_HOST_OBJDUMP" = "yes" ; then + lock_obj_h_generated=yes +- if test ! -d src; mkdir src; fi ++ if test ! -d src; then mkdir src; fi + LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \ + CC=$CC OBJDUMP=$host_alias-objdump \ + ac_ext=$ac_ext ac_objext=$ac_objext \ diff --git a/patches/libgpg-error/1.38/libgpg-error-1.38-004-add-missing-file.patch b/patches/libgpg-error/1.38/libgpg-error-1.38-004-add-missing-file.patch new file mode 100644 index 00000000..36e9af10 --- /dev/null +++ b/patches/libgpg-error/1.38/libgpg-error-1.38-004-add-missing-file.patch @@ -0,0 +1,118 @@ +diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh +index 421376d..13858cf 100755 +--- a/src/gen-lock-obj.sh ++++ b/src/gen-lock-obj.sh +@@ -1 +1,112 @@ +-dummy ++#! /bin/sh ++# ++# gen-lock-obj.sh - Build tool to construct the lock object. ++# ++# Copyright (C) 2020 g10 Code GmbH ++# ++# This file is part of libgpg-error. ++# ++# libgpg-error is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public License ++# as published by the Free Software Foundation; either version 2.1 of ++# the License, or (at your option) any later version. ++# ++# libgpg-error is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this program; if not, see . ++# ++ ++# ++# Following variables should be defined to invoke this script ++# ++# CC ++# OBJDUMP ++# AWK ++# ac_ext ++# ac_object ++# host ++# LOCK_ABI_VERSION ++# ++# An example: ++# ++# LOCK_ABI_VERSION=1 host=x86_64-pc-linux-gnu host_alias=x86_64-linux-gnu \ ++# CC=$host_alias-gcc OBJDUMP=$host_alias-objdump ac_ext=c ac_objext=o \ ++# AWK=gawk ./gen-lock-obj.sh ++# ++ ++AWK_VERSION_OUTPUT=$($AWK 'BEGIN { print PROCINFO["version"] }') ++if test -n "$AWK_VERSION_OUTPUT"; then ++ # It's GNU awk, which supports PROCINFO. ++ AWK_OPTION=--non-decimal-data ++fi ++ ++cat <<'EOF' >conftest.$ac_ext ++#include ++pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; ++EOF ++ ++if $CC -c conftest.$ac_ext; then : ++ ac_mtx_size=$($OBJDUMP -j .bss -t conftest.$ac_objext \ ++ | $AWK $AWK_OPTION ' ++/mtx$/ { mtx_size = int("0x" $5) } ++END { print mtx_size }') ++else ++ echo "Can't determine mutex size" ++ exit 1 ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++cat <