All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Subject: [PATCH 08/30] libgpg-error: update 1.37 -> 1.38
Date: Fri, 26 Jun 2020 09:18:22 +0200	[thread overview]
Message-ID: <20200626071844.29134-8-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20200626071844.29134-1-alex.kanavin@gmail.com>

Drop the do_compile_prepend logic as upstream now
handles it correctly.

License-Update: copyright years
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...-compiling-into-a-separate-build-dir.patch |  43 ++++++
 .../0005-src-gen-lock-obj.sh-add-a-file.patch | 134 ++++++++++++++++++
 .../libgpg-error/libgpg-error_1.37.bb         |  72 ----------
 .../libgpg-error/libgpg-error_1.38.bb         |  42 ++++++
 4 files changed, 219 insertions(+), 72 deletions(-)
 create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch
 create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch
 delete mode 100644 meta/recipes-support/libgpg-error/libgpg-error_1.37.bb
 create mode 100644 meta/recipes-support/libgpg-error/libgpg-error_1.38.bb

diff --git a/meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch b/meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch
new file mode 100644
index 0000000000..20610bee5d
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch
@@ -0,0 +1,43 @@
+From 6efe006e99a7e739afbf7fe8937445c82630fc8f Mon Sep 17 00:00:00 2001
+From: David Michael <fedora.dm0@gmail.com>
+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.
+
+--
+
+Upstream-Status: Backport
+Signed-off-by: David Michael <fedora.dm0@gmail.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac    | 1 +
+ src/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index def8bba..8c0d845 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 2fb83c0..d773877 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/meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch b/meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch
new file mode 100644
index 0000000000..e6f6c09bac
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error/0005-src-gen-lock-obj.sh-add-a-file.patch
@@ -0,0 +1,134 @@
+From fcb414abb62223e66dba413d0ca86eab3ea5bbc3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Sun, 21 Jun 2020 13:54:47 +0000
+Subject: [PATCH] src-gen-lock-obj.sh: add a file
+
+This is erroneously missing from the tarball; it will show
+up in the next release tarball, as upstream has fixed the
+packaging in master.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/gen-lock-obj.sh | 112 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 112 insertions(+)
+ create mode 100755 src/gen-lock-obj.sh
+
+diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
+new file mode 100755
+index 0000000..13858cf
+--- /dev/null
++++ b/src/gen-lock-obj.sh
+@@ -0,0 +1,112 @@
++#! /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 <https://www.gnu.org/licenses/>.
++#
++
++#
++# 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.h>
++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 <<EOF
++## lock-obj-pub.$host.h
++## File created by gen-lock-obj.sh - DO NOT EDIT
++## To be included by mkheader into gpg-error.h
++
++typedef struct
++{
++  long _vers;
++  union {
++    volatile char _priv[$ac_mtx_size];
++    long _x_align;
++    long *_xp_align;
++  } u;
++} gpgrt_lock_t;
++
++EOF
++
++# FIXME: Support different alignment conditions of:
++#
++#     USE_16BYTE_ALIGNMENT
++#     USE_DOUBLE_FOR_ALIGNMENT
++#     USE_LONG_DOUBLE_FOR_ALIGNMENT
++#
++
++echo -n "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{"
++
++i=0
++while test "$i" -lt $ac_mtx_size; do
++    if test "$i" -ne 0 -a "$(( $i % 8 ))" -eq 0; then
++        echo ' \'
++        echo -n "                                    "
++    fi
++    echo -n '0'
++    if test "$i" -lt $(($ac_mtx_size - 1)); then
++        echo -n ','
++    fi
++    i=$(( i + 1 ))
++done
++
++cat <<'EOF'
++}}}
++##
++## Local Variables:
++## mode: c
++## buffer-read-only: t
++## End:
++##
++EOF
++
++exit 0
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.37.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.37.bb
deleted file mode 100644
index b9a2b01c20..0000000000
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.37.bb
+++ /dev/null
@@ -1,72 +0,0 @@
-SUMMARY = "Small library that defines common error values for all GnuPG components"
-HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://src/gpg-error.h.in;beginline=2;endline=18;md5=cd91e3ad1265a0c268efad541a39345e \
-                    file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7"
-
-
-SECTION = "libs"
-
-UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
-SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
-           file://pkgconfig.patch \
-           file://0001-Do-not-fail-when-testing-config-scripts.patch \
-           "
-
-SRC_URI[md5sum] = "729f22d917494fdc4b54fce5aa6547c7"
-SRC_URI[sha256sum] = "b32d6ff72a73cf79797f7f2d039e95e9c6f92f0c1450215410840ab62aea9763"
-
-BINCONFIG = "${bindir}/gpg-error-config"
-
-inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script
-
-MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
-
-CPPFLAGS += "-P"
-do_compile_prepend() {
-	TARGET_FILE=linux-gnu
-	if [ ${TARGET_OS} = "mingw32" ]; then
-		# There are no arch specific syscfg files for mingw32
-		TARGET_FILE=
-	elif [ ${TARGET_ARCH} = "arc" ]; then
-		# ARC syscfg file is automatically aliased to i686-pc-linux-gnu
-		TARGET_FILE=
-	elif [ ${TARGET_OS} != "linux" ]; then
-		TARGET_FILE=${TARGET_OS}
-	fi
-
-	case ${TARGET_ARCH} in
-	  aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
-	  arm)	      TUPLE=arm-unknown-linux-gnueabi ;;
-	  armeb)      TUPLE=arm-unknown-linux-gnueabi ;;
-	  i586|i686)  TUPLE=i686-unknown-linux-gnu;;
-	  mips64*)    TUPLE=mips64el-unknown-linux-gnuabi64 ;;
-	  mips*el)    TUPLE=mipsel-unknown-linux-gnu ;;
-	  mips*)      TUPLE=mips-unknown-linux-gnu ;;
-	  x86_64)     TUPLE=x86_64-unknown-linux-gnu ;;
-	  ppc)        TUPLE=powerpc-unknown-linux-gnu ;;
-	  ppc64)      TUPLE=powerpc64-unknown-linux-gnu ;;
-	  ppc64le)    TUPLE=powerpc64le-unknown-linux-gnu ;;
-	  *)          TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
-	esac
-
-	if [ -n "$TARGET_FILE" ]; then
-		cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
-			${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
-	fi
-}
-
-do_install_append() {
-	# we don't have common lisp in OE
-	rm -rf "${D}${datadir}/common-lisp/"
-	oe_multilib_header gpg-error.h gpgrt.h
-}
-
-FILES_${PN}-dev += "${bindir}/gpg-error"
-FILES_${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.38.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.38.bb
new file mode 100644
index 0000000000..9a3ec9b5bd
--- /dev/null
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.38.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Small library that defines common error values for all GnuPG components"
+HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://src/gpg-error.h.in;beginline=2;endline=18;md5=d82591bc81561f617da71e00ff4a9d79 \
+                    file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7 \
+                    "
+
+
+SECTION = "libs"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+           file://pkgconfig.patch \
+           file://0001-Do-not-fail-when-testing-config-scripts.patch \
+           file://0003-build-Fix-cross-compiling-into-a-separate-build-dir.patch \
+           file://0005-src-gen-lock-obj.sh-add-a-file.patch \
+           "
+
+SRC_URI[sha256sum] = "d8988275aa69d7149f931c10442e9e34c0242674249e171592b430ff7b3afd02"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
+
+CPPFLAGS += "-P"
+
+do_install_append() {
+	# we don't have common lisp in OE
+	rm -rf "${D}${datadir}/common-lisp/"
+	oe_multilib_header gpg-error.h gpgrt.h
+}
+
+FILES_${PN}-dev += "${bindir}/gpg-error"
+FILES_${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.27.0


  parent reply	other threads:[~2020-06-26  7:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26  7:18 [PATCH 01/30] dnf: upgrade 4.2.21 -> 4.2.23 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 02/30] meson: upgrade 0.54.2 -> 0.54.3 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 03/30] libdnf: update 0.47.0 -> 0.48.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 04/30] ffmpeg: disable altivec on ppc by default Alexander Kanavin
2020-06-26  7:18 ` [PATCH 05/30] dropbear: update 2019.78 -> 2020.79 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 06/30] elfutils: upgrade 0.179 -> 0.180 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 07/30] gnu-config: update to latest revision Alexander Kanavin
2020-06-26  7:18 ` Alexander Kanavin [this message]
2020-06-26  7:18 ` [PATCH 09/30] perl: update 5.30.2 -> 5.32.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 10/30] gst-examples: upstream releases are even numbered Alexander Kanavin
2020-06-26  7:18 ` [PATCH 11/30] bison: upgrade 3.6.3 -> 3.6.4 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 12/30] python3-cython: upgrade 0.29.19 -> 0.29.20 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 13/30] stress-ng: upgrade 0.11.12 -> 0.11.14 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 14/30] piglit: upgrade to latest revision Alexander Kanavin
2020-06-26  7:18 ` [PATCH 15/30] linux-firmware: upgrade 20200519 -> 20200619 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 16/30] systemtap: upgrade 4.2 -> 4.3 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 17/30] alsa-lib: upgrade 1.2.2 -> 1.2.3.1 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 18/30] alsa-topology-conf: upgrade 1.2.2 -> 1.2.3 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 19/30] alsa-ucm-conf: " Alexander Kanavin
2020-06-26  7:18 ` [PATCH 20/30] alsa-utils: " Alexander Kanavin
2020-06-26  7:18 ` [PATCH 21/30] puzzles: upgrade to latest revision Alexander Kanavin
2020-06-26  7:18 ` [PATCH 22/30] diffoscope: upgrade 147 -> 148 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 23/30] libcheck: upgrade 0.14.0 -> 0.15.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 24/30] rsync: update 3.1.3 -> 3.2.1 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 25/30] sudo: upgrade 1.9.0 -> 1.9.1 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 26/30] python3-numpy: update 1.18.5 -> 1.19.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 27/30] mesa: update 20.0.7 -> 20.1.2 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 28/30] go-binary-native: fix upstream version check Alexander Kanavin
2020-06-26  7:18 ` [PATCH 29/30] Revert "python3-setuptools: patch entrypoints for faster initialization" Alexander Kanavin
2020-06-30 14:13   ` [OE-core] " Trevor Gamblin
2020-06-26  7:18 ` [PATCH 30/30] python3-setuptools: upgrade 47.1.1 -> 47.3.1 Alexander Kanavin
2020-06-26  7:32 ` ✗ patchtest: failure for "dnf: upgrade 4.2.21 -> 4.2.23..." and 29 more Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200626071844.29134-8-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.