Your message dated Thu, 16 Nov 2017 21:08:02 +0000
with message-id <e1efroe-00096e...@fasolo.debian.org>
and subject line Bug#881884: fixed in cc65 2.16-2
has caused the Debian Bug report #881884,
regarding cc65: Override the "Git N/A" in version string with Debian version
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
881884: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881884
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: cc65
Version: 2.16-1
Severity: wishlist
Tags: patch

The build embeds the git hash of the source checkout, if it finds one,
into the version string. It makes sense for upstream to see from which
commit it was built, not so much in package building where it's "Git
N/A" if git wasn't used for maintaining the package.

The attached patch changes it to embed the Debian package version
instead to look like:

  % bin/cc65 --version
  cc65 V2.16 - Debian 2.16-1

The embedded patch to src/Makefile and src/common/version.c should be
upstreamable later since it doesn't change the behaviour if the new
variable PKG_VERSION isn't defined during build.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cc65 depends on:
ii  libc6  2.24-17

cc65 recommends no packages.

cc65 suggests no packages.

-- no debconf information
diff --git a/debian/patches/package-version b/debian/patches/package-version
new file mode 100644
index 0000000..10a35be
--- /dev/null
+++ b/debian/patches/package-version
@@ -0,0 +1,47 @@
+Description: Allow overriding git hash in version string with package version
+ When compiling cc65, it will place the git hash of the checked out commit in
+ the version string which isn't useful when building a distribution package
+ since there either won't be an upstream git hash if there is one at all. Make
+ it so that if the variable PKG_VERSION is defined when building, its contents
+ will be placed into the version string instead of the git hash.
+Author: Andreas Bombe <a...@debian.org>
+Last-Update: 2017-11-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: cc65work/src/Makefile
+===================================================================
+--- cc65work.orig/src/Makefile 2017-11-16 01:54:30.795532327 +0100
++++ cc65work/src/Makefile      2017-11-16 02:21:19.661770273 +0100
+@@ -62,11 +62,16 @@
+   endif
+ endif
+ 
++ifdef PKG_VERSION
++  $(info PKG_VERSION: $(PKG_VERSION))
++  DEF_PKGVER := -DPKG_VERSION="$(PKG_VERSION)"
++endif
++
+ CFLAGS += -MMD -MP -O -I common \
+           -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \
+           -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) 
-DCL65_TGT=$(CL65_TGT) \
+           -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) 
-DLD65_CFG=$(LD65_CFG) \
+-          -DGIT_SHA=$(GIT_SHA)
++          -DGIT_SHA=$(GIT_SHA) $(DEF_PKGVER)
+ 
+ LDLIBS += -lm
+ 
+Index: cc65work/src/common/version.c
+===================================================================
+--- cc65work.orig/src/common/version.c 2017-11-16 01:54:30.815532304 +0100
++++ cc65work/src/common/version.c      2017-11-16 02:07:10.974699766 +0100
+@@ -61,7 +61,9 @@
+ /* Returns the version number as a string in a static buffer */
+ {
+     static char Buf[60];
+-#if defined(GIT_SHA)
++#if defined(PKG_VERSION)
++    xsnprintf (Buf, sizeof (Buf), "%u.%u - %s", VER_MAJOR, VER_MINOR, 
STRINGIZE (PKG_VERSION));
++#elif defined(GIT_SHA)
+     xsnprintf (Buf, sizeof (Buf), "%u.%u - Git %s", VER_MAJOR, VER_MINOR, 
STRINGIZE (GIT_SHA));
+ #else
+     xsnprintf (Buf, sizeof (Buf), "%u.%u", VER_MAJOR, VER_MINOR);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b124d3e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+package-version
diff --git a/debian/rules b/debian/rules
index 33e2c66..e7dd4d7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,8 +4,11 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/vendor.mk
+
 override_dh_auto_build:
-       dh_auto_build -- prefix=/usr
+       dh_auto_build -- prefix=/usr PKG_VERSION="$(DEB_VENDOR) $(DEB_VERSION)"
        $(MAKE) -C doc html
 
 override_dh_auto_install:

--- End Message ---
--- Begin Message ---
Source: cc65
Source-Version: 2.16-2

We believe that the bug you reported is fixed in the latest version of
cc65, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 881...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Laszlo Boszormenyi (GCS) <g...@debian.org> (supplier of updated cc65 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 16 Nov 2017 19:11:14 +0000
Source: cc65
Binary: cc65 cc65-doc
Architecture: source amd64 all
Version: 2.16-2
Distribution: unstable
Urgency: low
Maintainer: Laszlo Boszormenyi (GCS) <g...@debian.org>
Changed-By: Laszlo Boszormenyi (GCS) <g...@debian.org>
Description:
 cc65       - complete cross development package for 65(C)02 systems
 cc65-doc   - cc65 documentation
Closes: 881874 881884
Changes:
 cc65 (2.16-2) unstable; urgency=low
 .
   * Let cc65 suggests cc65-doc and not vice versa (closes: #881874).
 .
   [ Andreas Bombe <a...@debian.org> ]
   * Override the "Git N/A" in version string with Debian version
     (closes: #881884).
Checksums-Sha1:
 9f7e964737700c6a355c1818c506713563b947e7 1739 cc65_2.16-2.dsc
 b2e93a323e2b23ecffdd45e6018077c8acfde8c6 3072 cc65_2.16-2.debian.tar.xz
 7621f59cb5e32fcdb157217fdb826d9e5a82fb95 1065040 cc65-dbgsym_2.16-2_amd64.deb
 9a1ea0db61d74e335fcd7f20096b7383d5bd19a7 204384 cc65-doc_2.16-2_all.deb
 f17714c10d63f50d6fd6402bb058c2311a0171e6 6815 cc65_2.16-2_amd64.buildinfo
 73246b9e79e37aace0fb56b87b634e54720bd8d8 1937736 cc65_2.16-2_amd64.deb
Checksums-Sha256:
 e93ae74124dbac56c14695d372b3ffe2d0cbf0cf33baf534fa0f08277688e63d 1739 
cc65_2.16-2.dsc
 66c94dccfcd91f41776eb7ace8f312839092eb306e361a772cf72644f6be11ca 3072 
cc65_2.16-2.debian.tar.xz
 f473351fa26db65554be5563b1420a83e91cd019e30aa5a166ba8b11fafc4353 1065040 
cc65-dbgsym_2.16-2_amd64.deb
 c2fe6df0a213299395809990e77ac631c4cd5bca3df8302ea064b2c8b20c3a33 204384 
cc65-doc_2.16-2_all.deb
 360b19a69a86f794b01028759cad6265cca08f452a0ed686137efdb80ad9fb9a 6815 
cc65_2.16-2_amd64.buildinfo
 98d8097e1c3607e8104263c8c7c4644f2aa3e6b11cc41a649de2ae22d15c924b 1937736 
cc65_2.16-2_amd64.deb
Files:
 fac2db5f7a0c58330ea7444e5242492d 1739 otherosfs optional cc65_2.16-2.dsc
 6fea463778179df37c58a0f81edad135 3072 otherosfs optional 
cc65_2.16-2.debian.tar.xz
 1769e2586965de91afc578538ab4cb02 1065040 debug optional 
cc65-dbgsym_2.16-2_amd64.deb
 0519676ad8d89ea93f6778d1f42273e1 204384 doc optional cc65-doc_2.16-2_all.deb
 68091805c975026eef29b0e8d051487c 6815 otherosfs optional 
cc65_2.16-2_amd64.buildinfo
 5e7bd71fe1af5fb3b60ddc58c64ba430 1937736 otherosfs optional 
cc65_2.16-2_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEfYh9yLp7u6e4NeO63OMQ54ZMyL8FAloN6/UACgkQ3OMQ54ZM
yL8uVRAAnUZ9kNeYxKbmwZ5+lNmWgJXs0e//4AWltQ9Q6du/1fVPhVF85VwZ8quk
UDEpx/c4Nj/LvHjZe1YrqMakWPpj9KcWMmPfOp9yiTW8vLzDL+jyavb5GVxPp5GF
4e9WBMdDz9ZXUVl/BWfnYifGdRTmixgo87SvIJ2e5wmwtkw8F8EhGad6eC3sWDbA
5f74dgQXosQJ0fbGQ3C0XpIjG78EP9QMJ3dNLDtXbF7ZPhu+HVUS1hSwxXF9UXEL
a6j4wQJnp3X53PhiMNNCRz2c0rKhV+EWZ5KScJwlPnBrbys01K43kwfVoLorXXHR
aNO5JJAUx/zNVHZh9PGns8junkp8lIfLWwCR5HN/NdsYVsh3PXmUSLC23ZJp/w8N
mvTzTjDKH39SVgz35F64kc3Mdvy455hSSneCsP7Ov7VFzo0CUN8T0p5TlGNAHLGg
FzdjUl4OLXbmv64X/HCA6ZYZ7UDSEeM4ZQrfIHo/iZg0cXeEJpZzIMyVDWVHPYnX
B1BWn5BDbN5xvgKJ1yYuUjfGSBG9wqXjqSvM6SOzvO4Hz25+YyexhLXWZl6pv8id
AqryV7EFik/+yooRl9rDoyfvxa7+xcoTiyBNfQOdpwB3g5LkZSI92aD3TXeDY3Rs
sVTGS0kJ4HFMMYpWjIcY0r8dmLDAa36pyyMZ+x6NmoIZhfTk+ls=
=l+8A
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to