new file mode 100644
@@ -0,0 +1,35 @@
+From ecf05e7794edd56c6ff1cd7b14154e647dd0d787 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 libassuan 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 0b08e8b..0c5e425 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -284,8 +284,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
+
@@ -18,6 +18,7 @@ DEPENDS = "libgpg-error"
UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
file://libassuan-add-pkgconfig-support.patch \
+ file://0001-autogen.sh-drop-unknown-suffix-from-version-number.patch \
"
SRC_URI[sha256sum] = "d2931cdad266e633510f9970e1a2f346055e351bb19f9b78912475b8074c36f6"
If autogen.sh is run outside of a git repo, the find-version function always assumes that libassuan is a beta version and adds the suffix '-unknown' to the version number. 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] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- ...p-unknown-suffix-from-version-number.patch | 35 +++++++++++++++++++ .../libassuan/libassuan_3.0.2.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 meta/recipes-support/libassuan/libassuan/0001-autogen.sh-drop-unknown-suffix-from-version-number.patch