Debian Bug report logs - #824182
codeblocks: please make the build reproducible (timestamps)

version graph

Package: src:codeblocks; Maintainer for src:codeblocks is David Paleino <dapal@debian.org>;

Reported by: Fabian Wolff <fabi.wolff@arcor.de>

Date: Fri, 13 May 2016 12:57:01 UTC

Severity: wishlist

Tags: patch

Found in version codeblocks/13.12+dfsg-4

Fixed in version codeblocks/16.01+dfsg-1

Done: Vincent Cheng <vcheng@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://sourceforge.net/p/codeblocks/tickets/356/

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-builds@lists.alioth.debian.org, David Paleino <dapal@debian.org>:
Bug#824182; Package src:codeblocks. (Fri, 13 May 2016 12:57:05 GMT) (full text, mbox, link).


Acknowledgement sent to Fabian Wolff <fabi.wolff@arcor.de>:
New Bug report received and forwarded. Copy sent to reproducible-builds@lists.alioth.debian.org, David Paleino <dapal@debian.org>. (Fri, 13 May 2016 12:57:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Fabian Wolff <fabi.wolff@arcor.de>
To: submit@bugs.debian.org
Subject: codeblocks: please make the build reproducible (timestamps)
Date: Fri, 13 May 2016 14:55:05 +0200
[Message part 1 (text/plain, inline)]
Source: codeblocks
Version: 13.12+dfsg-4
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that codeblocks could not be built reproducibly.

The attached patch replaces the preprocessor macros __DATE__ and
__TIME__ with BUILD_DATE and BUILD_TIME, respectively, which can be
set deterministically using SOURCE_DATE_EPOCH [2] in debian/rules like
so:

--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,9 @@
 export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
 # Disable WXDEBUG checks, which wx3.0 defaults to enabling but were off by
 # default in wx2.8, to address issues such as #736368.
-export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
+export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG \
+	-DBUILD_DATE="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%Y-%m-%d`\\\"\"" \
+	-DBUILD_TIME="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%T`\\\"\""
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk

Regards,
Fabian Wolff

[1] https://wiki.debian.org/ReproducibleBuilds
[2] https://reproducible-builds.org/specs/source-date-epoch/
[codeblocks.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#824182; Package src:codeblocks. (Tue, 17 May 2016 17:00:10 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Tue, 17 May 2016 17:00:10 GMT) (full text, mbox, link).


Message #10 received at 824182@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: 824182@bugs.debian.org
Subject: Re: codeblocks: please make the build reproducible (timestamps)
Date: Tue, 17 May 2016 18:57:13 +0200
On Fri, 13 May 2016 14:55:05 +0200 Fabian Wolff <fabi.wolff@arcor.de> wrote:
> -export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
> +export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG \
> +	-DBUILD_DATE="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%Y-%m-%d`\\\"\"" \
> +	-DBUILD_TIME="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%T`\\\"\""

Hi Fabian,

Have you tested this patch? My understanding is that debhelper sets SOURCE_DATE_EPOCH but make(1) does not. In general, debian/rules is a plain Makefile and shouldn't assume higher-level tools set anything extra.

So this patch wouldn't work; you need to add a line:

export SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -SDate | date -f- +%s)

near the top of debian/rules.

Or you can wait until #824572 is fixed, which I just filed. Then your patch might work without needing to add the extra line above.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git




Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#824182; Package src:codeblocks. (Tue, 17 May 2016 17:06:04 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Tue, 17 May 2016 17:06:04 GMT) (full text, mbox, link).


Message #15 received at 824182@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: Fabian Wolff <fabi.wolff@arcor.de>, 824182@bugs.debian.org, Reproducible Builds discussion list <reproducible-builds@lists.alioth.debian.org>
Subject: Re: [Reproducible-builds] Bug#824182: codeblocks: please make the build reproducible (timestamps)
Date: Tue, 17 May 2016 19:01:49 +0200
(sorry for repost, making sure the right people see this)

Fabian Wolff:
> -export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
> +export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG \
> +	-DBUILD_DATE="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%Y-%m-%d`\\\"\"" \
> +	-DBUILD_TIME="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%T`\\\"\""

Hi Fabian,

Have you tested this patch? My understanding is that debhelper sets SOURCE_DATE_EPOCH but make(1) does not. In general, debian/rules is a plain Makefile and shouldn't assume higher-level tools set anything extra.

So this patch wouldn't work; you need to add a line:

export SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -SDate | date -f- +%s)

near the top of debian/rules.

Or you can wait until #824572 is fixed, which I just filed. Then your patch might work without needing to add the extra line above.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#824182; Package src:codeblocks. (Tue, 17 May 2016 17:09:04 GMT) (full text, mbox, link).


Acknowledgement sent to Mattia Rizzolo <mattia@debian.org>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Tue, 17 May 2016 17:09:04 GMT) (full text, mbox, link).


Message #20 received at 824182@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: Reproducible Builds discussion list <reproducible-builds@lists.alioth.debian.org>
Cc: Fabian Wolff <fabi.wolff@arcor.de>, 824182@bugs.debian.org
Subject: Re: [Reproducible-builds] Bug#824182: codeblocks: please make the build reproducible (timestamps)
Date: Tue, 17 May 2016 17:06:31 +0000
[Message part 1 (text/plain, inline)]
On Tue, May 17, 2016 at 07:01:49PM +0200, Ximin Luo wrote:
> export SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -SDate | date -f- +%s)

s/=/?=/ might be also nicer, IMHO.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#824182; Package src:codeblocks. (Tue, 17 May 2016 17:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Reproducible Builds discussion list <reproducible-builds@lists.alioth.debian.org>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Tue, 17 May 2016 17:21:04 GMT) (full text, mbox, link).


Message #25 received at 824182@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: Fabian Wolff <fabi.wolff@arcor.de>, 824182@bugs.debian.org, Reproducible Builds discussion list <reproducible-builds@lists.alioth.debian.org>
Subject: Re: [Reproducible-builds] Bug#824182: codeblocks: please make the build reproducible (timestamps)
Date: Tue, 17 May 2016 19:16:48 +0200
Ximin Luo:
> (sorry for repost, making sure the right people see this)
> 
> Fabian Wolff:
>> -export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
>> +export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG \
>> +	-DBUILD_DATE="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%Y-%m-%d`\\\"\"" \
>> +	-DBUILD_TIME="\"\\\"`date -u -d @$(SOURCE_DATE_EPOCH) +%T`\\\"\""
> 
> Hi Fabian,
> 
> Have you tested this patch? My understanding is that debhelper sets SOURCE_DATE_EPOCH but make(1) does not. In general, debian/rules is a plain Makefile and shouldn't assume higher-level tools set anything extra.
> 

On a second look, it seems everything in this particular debian/rules is done inside override_dh* rules, so it may be the case that dpkg-buildflags (who expands DEB_CPPFLAGS_MAINT_APPEND) will always see SOURCE_DATE_EPOCH.

So everything may be fine. If that's the case, sorry for the noise. (Then it would be nice to add a comment explaining this, for future readers.)

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git



Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#824182; Package src:codeblocks. (Tue, 17 May 2016 18:39:08 GMT) (full text, mbox, link).


Acknowledgement sent to Fabian Wolff <fabi.wolff@arcor.de>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Tue, 17 May 2016 18:39:08 GMT) (full text, mbox, link).


Message #30 received at 824182@bugs.debian.org (full text, mbox, reply):

From: Fabian Wolff <fabi.wolff@arcor.de>
To: Reproducible Builds discussion list <reproducible-builds@lists.alioth.debian.org>, Ximin Luo <infinity0@debian.org>, 824182@bugs.debian.org
Subject: Re: [Reproducible-builds] Bug#824182: codeblocks: please make the build reproducible (timestamps)
Date: Tue, 17 May 2016 20:37:37 +0200
> So everything may be fine. If that's the case, sorry for the noise. (Then it would be nice to add a comment explaining this, for future readers.)

No, I think you are right: If SOURCE_DATE_EPOCH is not set, then this
is not going to work. I have tested the patch, but apparently only in
an environment where SOURCE_DATE_EPOCH gets set before the build
starts.

[1] says that setting and exporting SOURCE_DATE_EPOCH in debian/rules
is "a last resort to be avoided where possible", but I guess that if
we export with ?=, it should be fine.

Thanks for pointing this out!

--
Fabian

[1] https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Setting_the_variable



Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#824182; Package src:codeblocks. (Tue, 17 May 2016 19:06:20 GMT) (full text, mbox, link).


Acknowledgement sent to Ximin Luo <infinity0@debian.org>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Tue, 17 May 2016 19:06:20 GMT) (full text, mbox, link).


Message #35 received at 824182@bugs.debian.org (full text, mbox, reply):

From: Ximin Luo <infinity0@debian.org>
To: Fabian Wolff <fabi.wolff@arcor.de>, Reproducible Builds discussion list <reproducible-builds@lists.alioth.debian.org>, 824182@bugs.debian.org
Subject: Re: [Reproducible-builds] Bug#824182: codeblocks: please make the build reproducible (timestamps)
Date: Tue, 17 May 2016 21:02:42 +0200
Fabian Wolff:
> [1] says that setting and exporting SOURCE_DATE_EPOCH in debian/rules
> is "a last resort to be avoided where possible", but I guess that if
> we export with ?=, it should be fine.
> 
> [..]
> 
> [1] https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Setting_the_variable
> 

Yes that's fine, I've edited the wording to clarify. Thanks for having a look!

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git



Set Bug forwarded-to-address to 'https://sourceforge.net/p/codeblocks/tickets/356/'. Request was from Vincent Cheng <vcheng@debian.org> to control@bugs.debian.org. (Fri, 20 May 2016 07:39:05 GMT) (full text, mbox, link).


Reply sent to Vincent Cheng <vcheng@debian.org>:
You have taken responsibility. (Tue, 24 May 2016 00:51:18 GMT) (full text, mbox, link).


Notification sent to Fabian Wolff <fabi.wolff@arcor.de>:
Bug acknowledged by developer. (Tue, 24 May 2016 00:51:19 GMT) (full text, mbox, link).


Message #42 received at 824182-close@bugs.debian.org (full text, mbox, reply):

From: Vincent Cheng <vcheng@debian.org>
To: 824182-close@bugs.debian.org
Subject: Bug#824182: fixed in codeblocks 16.01+dfsg-1
Date: Tue, 24 May 2016 00:48:41 +0000
Source: codeblocks
Source-Version: 16.01+dfsg-1

We believe that the bug you reported is fixed in the latest version of
codeblocks, 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 824182@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vincent Cheng <vcheng@debian.org> (supplier of updated codeblocks 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 ftpmaster@ftp-master.debian.org)


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

Format: 1.8
Date: Mon, 23 May 2016 17:39:02 PDT
Source: codeblocks
Binary: codeblocks codeblocks-common libcodeblocks0 codeblocks-dbg codeblocks-contrib codeblocks-dev libwxsmithlib0 libwxsmithlib-dev
Architecture: source all
Version: 16.01+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: David Paleino <dapal@debian.org>
Changed-By: Vincent Cheng <vcheng@debian.org>
Description: 
 codeblocks - Code::Blocks integrated development environment (IDE)
 codeblocks-common - common files for Code::Blocks IDE
 libcodeblocks0 - Code::Blocks shared library
 codeblocks-dbg - Code::Blocks debugging libraries
 codeblocks-contrib - contrib plugins for Code::Blocks IDE
 codeblocks-dev - Code::Blocks development files (SDK)
 libwxsmithlib0 - wxSmith shared library (Code::Blocks plugin for RAD GUI editing)
 libwxsmithlib-dev - wxSmith development files (Code::Blocks plugin for RAD GUI editin
Closes: 803436 813898 824182
Changes:
 codeblocks (16.01+dfsg-1) unstable; urgency=medium
 .
   * New upstream release. (Closes: #803436, #813898)
   * Add debian/patches/03-remove-fPIC-from-pkg-info.patch, thanks to Alexander
     GQ Gerasiov <gq@debian.org>.
   * Add debian/patches/04-reproducible_build.patch and d/rules changes to make
     build reproducible. (Closes: #824182)
   * Add debian/patches/05-fix-boost-system-1.60.patch to fix a FTBFS with
     boost1.60; imported from Ubuntu. Thanks to Gianfranco Costamagna.
   * Add build-depends on libboost-system-dev.
   * Actually bump debhelper compatibility level to 9.
   * Update debian/copyright. Most of the work done by Alexander, thanks!
   * Update watch file.
   * Standards-Version bump to 3.9.8.
     - Drop obsolete debian/menu files.
Checksums-Sha256: 
 7f27e465098e4af89d99baa10d440bc964b3e330e5deff14c70112cd25a221b9 2556 codeblocks_16.01+dfsg-1.dsc
 9bffc133bff4de31f61683fa5a01b9d3103503f461c9b2db95ffe1eff15c7311 19964879 codeblocks_16.01+dfsg.orig.tar.gz
 084606e5970c1f12908e1f6a858d27da46693b6d4297169d5e3dce7cecbd98e7 24768 codeblocks_16.01+dfsg-1.debian.tar.xz
 bad613b7d83247146b3b4b652484a07319a1a0f21ecfa6c04ef9f82bfab05515 3234270 codeblocks-common_16.01+dfsg-1_all.deb
Checksums-Sha1: 
 ef65a855f16795e7a6645db3c3aeddfe7cebaa30 2556 codeblocks_16.01+dfsg-1.dsc
 c91ecc3631f8cd7f45e6332e2254139d3da01d5f 19964879 codeblocks_16.01+dfsg.orig.tar.gz
 62cbf9d6a022f239cd5b9088dc9681c14506260d 24768 codeblocks_16.01+dfsg-1.debian.tar.xz
 dc24be7366c941842b0818efbea85f88de9d674b 3234270 codeblocks-common_16.01+dfsg-1_all.deb
Files: 
 ecd5e28374deda4f7c8d76cd06de4029 2556 x11 optional codeblocks_16.01+dfsg-1.dsc
 cc7d0b2c8a29e2da3dbb694deab08df9 19964879 x11 optional codeblocks_16.01+dfsg.orig.tar.gz
 c5cf5405029690295da382280303afcf 24768 x11 optional codeblocks_16.01+dfsg-1.debian.tar.xz
 7dfa2551e8f09c76b718766c09f45ae0 3234270 x11 optional codeblocks-common_16.01+dfsg-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXQ6KsAAoJEI7tzBuqHzL/SbMP/2PDNHcDntAHuLYw4Ivd3jmr
G5sjPOEJzEvbUzmMiPY4HDa1eKfP2y5fHjnvR6NxiWqs0iZ+BuqKlpJskNd70KjU
qjrWSp46TNksXDLsZCef72RlingYw9Og/A7MnBH9uYXsrsiFaXXPkD+aTtdlxI8h
xJVT/M7zKV4gVBxbnF7wbQLZ2ewCFaJPxGxdBHTgwjH6onyjLuOLOCMpk3CcQDLJ
MBTOBTkA0Hdx0RdwC1wlNxJ4iVcMcUoaQd1RXTzLCUOWj8BcZnCng4JV0SvZQNND
y5sUUvH85+sY3G1QwegGnIHAVeNKLVg4n2hn0IkbCG4pId6tY8e9wmzfqWiz1lmY
mmc01wdVHGmVx+r1Nvv7l1yTG/vytmBVw2vWAB5q4Zqd24+7x8j31vFSPVAGCVXM
XO3Wdyj6Z6oTRTwDPptIeR5EKFBW+4Jf7CpXUCXqW67Smzn40X/tVx3Q+81/wkb9
PL/lMen/kWKbsh7UO2rbzzxsZgi7yxtz1w1y2qcniLexQNF6SbnI38ad5IU1urJc
pvcdDTW/8iRHlDML99DqQg3K3MA/D/sBNmp8xJNdRbRpu6yJpi8O21m2Csb0ugSb
5fB5tgKG1dcqqmvF1nIx5lrJw4zmFvc+0ZQzjgo2UjaLV/DMra7GY1+1WL/uxsBv
yAQg/z9iFjkD74rVaazv
=Ga3Z
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 19 Jul 2016 07:39:33 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 13:57:06 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.