fix runtime versions
v3 cover fix runtime versions
Add an inc file in meta/recipes-support/gnupg/ to modify autogen.sh, then gnupg and other recipes can include it to remove the unknown suffix in runtime versions.
Yi Zhao (6):
gnupg: drop -unknown suffix from version number libgpg-error:: drop -unknown suffix from version number
pinentry: drop -unknown suffix from version number
libgcrypt: drop -unknown suffix from version number
libassuan: drop -unknown suffix from version number
libksba: drop -unknown suffix from version number
.../gnupg/drop-unknown-suffix.inc | 29 +++++++++++++++++ ...h-fix-find-version-for-beta-checking.patch | 31 ------------------- meta/recipes-support/gnupg/gnupg_2.5.5.bb | 3 +- .../libassuan/libassuan_3.0.2.bb | 2 ++ .../libgcrypt/libgcrypt_1.11.1.bb | 2 ++ .../libgpg-error/libgpg-error_1.55.bb | 2 ++ meta/recipes-support/libksba/libksba_1.6.7.bb | 2 ++ .../pinentry/pinentry_1.3.1.bb | 2 ++ 8 files changed, 41 insertions(+), 32 deletions(-) create mode 100644 meta/recipes-support/gnupg/drop-unknown-suffix.inc delete mode 100644 meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch
Signature · 1 line
2.34.1
PATCH v3 1/6 gnupg: drop -unknown suffix from version number
For gnupg and related packages, if autogen.sh is run outside of a git repo, the find-version function always assumes that the package is a beta version and adds the suffix '-unknown' to the version number.
Add drop-unknow-suffix.inc file that can be included by gnupg and other recipes. This file is used to modify autogen.sh:
1. Replace beta=yes with beta=no.
2. Replace tmp="-unknown" with tmp=""
Also remove 0004-autogen.sh-fix-find-version-for-beta-checking.patch as it is no longer needed.
Befor the fix:
$ gpg --version gpg (GnuPG) 2.5.5-unknown
After the fix:
$ gpg --version gpg (GnuPG) 2.5.5
--- .../gnupg/drop-unknown-suffix.inc | 29 +++++++++++++++++ ...h-fix-find-version-for-beta-checking.patch | 31 ------------------- meta/recipes-support/gnupg/gnupg_2.5.5.bb | 3 +- 3 files changed, 31 insertions(+), 32 deletions(-) create mode 100644 meta/recipes-support/gnupg/drop-unknown-suffix.inc delete mode 100644 meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch
meta/recipes-support/gnupg/drop-unknown-suffix.inc new file +29 -0
@@ -0,0 +1,29 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +# +# This .inc file is used to remove unknown suffix in runtime version +# for gnupg and its related packages. +# +# In these packages, if autogen.sh is run outside of a git repo, +# the find-version function always assumes that the package is a +# beta version and adds the suffix '-unknown' to the version number. +# +# This .inc file modifies autogen.sh to: +# 1. Replace beta=yes with beta=no +# 2. Replace tmp="-unknown" with tmp="" +# + +do_configure:prepend() { + if [ -f ${S}/autogen.sh ]; then + sed -i \ + -e 's/^\([[:space:]]*\)beta=yes$/\1beta=no/' \ + -e 's/^\([[:space:]]*\)tmp="-unknown"$/\1tmp=""/' \ + ${S}/autogen.sh + else + bbwarn "autogen.sh not found in ${S}." + fi +}
meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 4d8cc1982273d571b4e80fe981878d0fa5884236 Mon Sep 17 00:00:00 2001 -From: Wenzong Fan <[email protected]> -Date: Wed, 16 Aug 2017 11:23:22 +0800 -Subject: [PATCH] autogen.sh: fix find-version for beta checking - -find-version always assumes that gnupg is beta if autogen.sh is run -out of git-repo. This doesn't work for users whom just take release -tarball and re-run autoconf in their local build dir. - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan <[email protected]> - -Rebase to 2.1.23 -Signed-off-by: Hongxu Jia <[email protected]> ---- - autogen.sh | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/autogen.sh b/autogen.sh -index 9f91297..116fb7f 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -270,7 +270,6 @@ if [ "$myhost" = "find-version" ]; then - rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null))) - else - ingit=no -- beta=yes - tmp="-unknown" - cid="0000000" - rev="0000000"
meta/recipes-support/gnupg/gnupg_2.5.5.bb +2 -1
@@ -13,10 +13,11 @@ DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt" inherit autotools gettext texinfo pkgconfig upstream-version-is-even +require drop-unknown-suffix.inc + UPSTREAM_CHECK_URI = "https://gnupg.org/ftp/gcrypt/gnupg/" SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0002-use-pkgconfig-instead-of-npth-config.patch \ - file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \ file://0001-Woverride-init-is-not-needed-with-gcc-9.patch \ " SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \
Signature · 1 line
2.34.1
PATCH v3 2/6 libgpg-error:: drop -unknown suffix from version number
In reply to Yi ZhaoInclude drop-unknown-suffix.inc to remove unknown suffix in runtime version.
Befor the fix:
$ gpg-error --version gpg-error (libgpg-error) 1.55-unknown
After the fix:
$ gpg-error --version gpg-error (libgpg-error) 1.55
--- meta/recipes-support/libgpg-error/libgpg-error_1.55.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-support/libgpg-error/libgpg-error_1.55.bb +2 -0
@@ -25,6 +25,8 @@ BINCONFIG = "${bindir}/gpg-error-config" inherit autotools binconfig-disabled pkgconfig gettext multilib_header multilib_script ptest +require recipes-support/gnupg/drop-unknown-suffix.inc + RDEPENDS:${PN}-ptest:append = " make bash" MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/gpgrt-config"
Signature · 1 line
2.34.1
PATCH v3 3/6 pinentry: drop -unknown suffix from version number
In reply to Yi ZhaoInclude drop-unknown-suffix.inc to remove unknown suffix in runtime version.
Befor the fix:
$ pinentry --version pinentry-curses (pinentry) 1.3.1-unknown
After the fix:
$ pinentry --version pinentry-curses (pinentry) 1.3.1
--- meta/recipes-support/pinentry/pinentry_1.3.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-support/pinentry/pinentry_1.3.1.bb +2 -0
@@ -20,6 +20,8 @@ SRC_URI[sha256sum] = "bc72ee27c7239007ab1896c3c2fae53b076e2c9bd2483dc2769a16902b inherit autotools pkgconfig +require recipes-support/gnupg/drop-unknown-suffix.inc + PACKAGECONFIG ??= "ncurses" PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
Signature · 1 line
2.34.1
PATCH v3 4/6 libgcrypt: drop -unknown suffix from version number
In reply to Yi ZhaoInclude drop-unknown-suffix.inc to remove unknown suffix in runtime version.
Befor the fix:
$ mpicalc --version mpicalc 2.0 libgcrypt 1.11.0-unknown
After the fix:
$ mpicalc --version mpicalc 2.0 libgcrypt 1.11.0
--- meta/recipes-support/libgcrypt/libgcrypt_1.11.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-support/libgcrypt/libgcrypt_1.11.1.bb +2 -0
@@ -32,6 +32,8 @@ BINCONFIG = "${bindir}/libgcrypt-config" inherit autotools texinfo binconfig-disabled pkgconfig ptest +require recipes-support/gnupg/drop-unknown-suffix.inc + EXTRA_OECONF = "--disable-asm" EXTRA_OEMAKE:class-target = "LIBTOOLFLAGS='--tag=CC'"
Signature · 1 line
2.34.1
PATCH v3 5/6 libassuan: drop -unknown suffix from version number
In reply to Yi ZhaoInclude drop-unknown-suffix.inc to remove unknown suffix from version in pc file.
Befor the fix:
$ cat /usr/lib/pkgconfig/libassuan.pc
[snip]
Name: libassuan
Description: IPC library for the GnuPG components
Requires.private: gpg-error
Version: 3.0.2-unknown
Cflags: -I${includedir}
[snip]After the fix:
$ cat /usr/lib/pkgconfig/libassuan.pc
[snip]
Name: libassuan
Description: IPC library for the GnuPG components
Requires.private: gpg-error
Version: 3.0.2
Cflags: -I${includedir}
[snip]--- meta/recipes-support/libassuan/libassuan_3.0.2.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-support/libassuan/libassuan_3.0.2.bb +2 -0
@@ -26,6 +26,8 @@ BINCONFIG = "${bindir}/libassuan-config" inherit autotools texinfo binconfig-disabled pkgconfig multilib_header +require recipes-support/gnupg/drop-unknown-suffix.inc + do_configure:prepend () { # Else these could be used in preference to those in aclocal-copy rm -f ${S}/m4/*.m4
Signature · 1 line
2.34.1
PATCH v3 6/6 libksba: drop -unknown suffix from version number
In reply to Yi ZhaoInclude drop-unknown-suffix.inc to remove unknown suffix from version in pc file.
Befor the fix:
$ cat /usr/lib/pkgconfig/ksba.pc
[snip]
Name: ksba
Description: X.509 and CMS support library
Requires: gpg-error
Version: 1.6.7-unknown
Cflags: -I${includedir}
[snip]After the fix:
$ cat /usr/lib/pkgconfig/ksba.pc
[snip]
Name: ksba
Description: X.509 and CMS support library
Requires: gpg-error
Version: 1.6.7
Cflags: -I${includedir}
[snip]--- meta/recipes-support/libksba/libksba_1.6.7.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-support/libksba/libksba_1.6.7.bb +2 -0
@@ -20,6 +20,8 @@ BINCONFIG = "${bindir}/ksba-config" inherit autotools binconfig-disabled pkgconfig texinfo +require recipes-support/gnupg/drop-unknown-suffix.inc + UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://ksba-add-pkgconfig-support.patch"
Signature · 1 line
2.34.1