Bug#1068789: nsis: build fails if version number has buildX or ubuntuX suffix

2024-04-12 Thread Thomas Gaugler
Thanks for making me aware of the issue.

I’d like to fix this issue for other Debian derivatives such as Linux Mint as 
well.

Would the following change work for you?

VER_REVISION=$(shell echo $(firstword $(subst +, ,$(word 
3,$(VERSION_DECOMPOSED | sed 's/[^0-9]//g')

Are there any other suffixes beside build and lowercase $(dpkg-vendor --query 
Vendor) followed by the revision number?




Bug#1068789: nsis: build fails if version number has buildX or ubuntuX suffix

2024-04-10 Thread Michael Hudson-Doyle
Package: nsis
Version: build fails if version number has buildX or ubuntuX suffix
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
X-Debbugs-Cc: michael.hud...@ubuntu.com

Dear Maintainer,

In Ubuntu we don't do binNMUs, we build sourceful changes with buildX
appended to the version number. This breaks with the current code in
d/rules which passes the whole version number to scons.

The attached patch is not very clean but it does fix the build for me:

  * d/rules: strip off ubuntuX, buildX from package version before feeding it
to scons as VERSION.

Thanks for considering it!

Cheers,
mwh

-- System Information:
Debian Release: trixie/sid
  APT prefers mantic-updates
  APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 
'mantic'), (100, 'mantic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-27-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_NZ.UTF-8:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru nsis-3.09/debian/control nsis-3.09/debian/control
--- nsis-3.09/debian/control2024-04-01 20:02:28.0 +1300
+++ nsis-3.09/debian/control2024-04-11 14:22:37.0 +1200
@@ -1,6 +1,5 @@
 Source: nsis
-Maintainer: Ubuntu Developers 
-XSBC-Original-Maintainer: Thomas Gaugler 
+Maintainer: Thomas Gaugler 
 Section: devel
 Priority: optional
 Build-Depends: docbook-xsl-ns,
diff -Nru nsis-3.09/debian/rules nsis-3.09/debian/rules
--- nsis-3.09/debian/rules  2024-03-02 21:11:24.0 +1300
+++ nsis-3.09/debian/rules  2024-04-11 14:22:12.0 +1200
@@ -11,7 +11,8 @@
 # Enable hardening
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
-VERSION=$(DEB_VERSION)
+VERSION=$(shell echo $(DEB_VERSION) | sed -Ee s/\(build\|ubuntu\)[0-9]+//)
+
 PREFIX=/usr
 DATADIR=$(PREFIX)/share/nsis
 DOCDIR=$(PREFIX)/share/doc/nsis