new file mode 100644
@@ -0,0 +1,35 @@
+From 211fd00a631da3e907e3a78890bfd1cf3bbe069e 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 pinentry 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 e6efe33..6acff4d 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -269,8 +269,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=""
+ rev="0000000"
+ rvd="0"
+ fi
+--
+2.34.1
+
@@ -14,6 +14,7 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
file://libassuan_pkgconf.patch \
file://gpg-error_pkconf.patch \
+ file://0001-autogen.sh-drop-unknown-suffix-from-version-number.patch \
"
SRC_URI[sha256sum] = "bc72ee27c7239007ab1896c3c2fae53b076e2c9bd2483dc2769a16902bce8c04"
If autogen.sh is run outside of a git repo, the find-version function always assumes that pinentry is a beta version and adds the suffix '-unknown' to the version number. Befor the fix: $ pinentry --version pinentry-curses (pinentry) 1.3.1-unknown After the fix: $ pinentry --version pinentry-curses (pinentry) 1.3.1 Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- ...p-unknown-suffix-from-version-number.patch | 35 +++++++++++++++++++ .../pinentry/pinentry_1.3.1.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 meta/recipes-support/pinentry/pinentry-1.3.1/0001-autogen.sh-drop-unknown-suffix-from-version-number.patch