Message ID | 20250417025532.1363790-2-yi.zhao@windriver.com |
---|---|
State | New |
Headers | show |
Series | [1/7] python3-unittest-automake-output: fix version mismatch | expand |
On 17 Apr 2025, at 03:55, Yi Zhao via lists.openembedded.org <yi.zhao=eng.windriver.com@lists.openembedded.org> wrote: > > If autogen.sh is run outside of a git repo, the find-version function > always assumes that libgpg-error is a beta version and adds the suffix > '-unknown' to the version number. > > Befor the fix: > $ gpg-error --version > gpg-error (libgpg-error) 1.51-unknown > > After the fix: > $ gpg-error --version > gpg-error (libgpg-error) 1.51 This series implies that we’ll be carrying patches against a number of recipes forever. As re-running autoreconf on a tarball isn’t unheard of it would be good to try and resolve this upstream somehow. Please discuss with upstream the use-case here, maybe the find-version script could also write the version to a hidden file which goes into the tarball which could be used if the directory isn’t a git tree. Cheers, Ross
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/0001-autogen.sh-drop-unknown-suffix-from-version-number.patch b/meta/recipes-support/libgpg-error/libgpg-error/0001-autogen.sh-drop-unknown-suffix-from-version-number.patch new file mode 100644 index 0000000000..cc6c35884c --- /dev/null +++ b/meta/recipes-support/libgpg-error/libgpg-error/0001-autogen.sh-drop-unknown-suffix-from-version-number.patch @@ -0,0 +1,35 @@ +From 7358f4ff6c711bde1d83b9a38bbf349a23e0e243 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Tue, 15 Apr 2025 15:32:58 +0800 +Subject: [PATCH] autogen.sh: drop '-unknown' suffix from version number + +If autogen.sh is run outside of a git repo, the find-version function +always assumes that libgpg-error is a beta version and adds the suffix +'-unknown' to the version number. This should not work for users who use +tarball and re-run autoconf in build directory. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + autogen.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/autogen.sh b/autogen.sh +index 9f91297..daa2730 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -270,8 +270,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="" + cid="0000000" + rev="0000000" + rvd="0" +-- +2.34.1 + diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb index 741969beb0..9760b4d107 100644 --- a/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb +++ b/meta/recipes-support/libgpg-error/libgpg-error_1.51.bb @@ -17,6 +17,7 @@ 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://0001-autogen.sh-drop-unknown-suffix-from-version-number.patch \ file://run-ptest \ "
If autogen.sh is run outside of a git repo, the find-version function always assumes that libgpg-error is a beta version and adds the suffix '-unknown' to the version number. Befor the fix: $ gpg-error --version gpg-error (libgpg-error) 1.51-unknown After the fix: $ gpg-error --version gpg-error (libgpg-error) 1.51 Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- ...p-unknown-suffix-from-version-number.patch | 35 +++++++++++++++++++ .../libgpg-error/libgpg-error_1.51.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 meta/recipes-support/libgpg-error/libgpg-error/0001-autogen.sh-drop-unknown-suffix-from-version-number.patch