[bug #48084] Avoid compiled-in timestamp for reproducible release builds

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #48084] Avoid compiled-in timestamp for reproducible release builds

Joerg Wunsch-6
URL:
  <http://savannah.nongnu.org/bugs/?48084>

                 Summary: Avoid compiled-in timestamp for reproducible release
builds
                 Project: AVR Downloader/UploaDEr
            Submitted by: None
            Submitted on: Thu 02 Jun 2016 02:05:08 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Ed Maste
        Originator Email: [hidden email]
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

While investigating avrdude for reproducible builds in FreeBSD I found that
the only nonreproducibility is the "Compiled on" string:

pig1# diffoscope 3be62d02dc27d0db269d88967fa790ffb64c25a6-build1/All/$P
3be62d02dc27d0db269d88967fa790ffb64c25a6-build2/All/$P
--- 3be62d02dc27d0db269d88967fa790ffb64c25a6-build1/All/avrdude-6.1_1.txz
+++ 3be62d02dc27d0db269d88967fa790ffb64c25a6-build2/All/avrdude-6.1_1.txz
├── avrdude-6.1_1.txz-content
│   ├── +MANIFEST
[...]
│   ├── /usr/local/bin/avrdude
│   │   ├── readelf --wide --hex-dump=.rodata {}
│   │   │ @@ -65,16 +65,16 @@
│   │   │    0x0044ba90 696c6564 206f6e20 25732061 74202573 iled on %s
at %s
│   │   │    0x0044baa0 0a257343 6f707972 69676874 20286329 .%sCopyright
(c)
│   │   │    0x0044bab0 20323030 302d3230 30352042 7269616e  2000-2005
Brian
│   │   │    0x0044bac0 20446561 6e2c2068 7474703a 2f2f7777  Dean,
http://ww
│   │   │    0x0044bad0 772e6264 6d696372 6f2e636f 6d2f0a25
w.bdmicro.com/.%
│   │   │    0x0044bae0 73436f70 79726967 68742028 63292032 sCopyright
(c) 2
│   │   │    0x0044baf0 3030372d 32303134 204a6f65 72672057 007-2014
Joerg W
│   │   │ -  0x0044bb00 756e7363 680a0a00 4d617920 32332032 unsch...May
23 2
│   │   │ -  0x0044bb10 30313600 30343a35 393a3430 00257353
016.04:59:40.%sS
│   │   │ +  0x0044bb00 756e7363 680a0a00 4d617920 32362032 unsch...May
26 2
│   │   │ +  0x0044bb10 30313600 32313a34 313a3139 00257353
016.21:41:19.%sS
│   │   │    0x0044bb20 79737465 6d207769 64652063 6f6e6669 ystem wide
confi
│   │   │    0x0044bb30 67757261 74696f6e 2066696c 65206973 guration
file is
│   │   │    0x0044bb40 20222573 220a0025 733a2065 72726f72  "%s"..%s:
error
│   │   │    0x0044bb50 20726561 64696e67 20737973 74656d20  reading
system
│   │   │    0x0044bb60 77696465 20636f6e 66696775 72617469 wide
configurati
│   │   │    0x0044bb70 6f6e2066 696c6520 22257322 0a002573 on file
"%s"..%s
│   │   │    0x0044bb80 55736572 20636f6e 66696775 72617469 User
configurati
│   │   ╵
│   ╵


Debian has a patch to just remove the timestamps:
http://sources.debian.net/src/avrdude/6.3-1/debian/patches/no-cpp-timestamps.patch/

Discussed with Joerg which resulted in this suggestion:
>
> Well, that timestamp is somehow meaningful for people who
> are actively participating in the development process, but
> I agree it's pointless for a released version.
>
> I'd like to come up with some kind of autoconf magic that
> drops the timestamp for releases, while retaining it for
> non-released software.

Filing here as an enhancement request.
Joerg suggested instead having some sort of autoconf switch to set a "release
build" mode




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?48084>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

[bug #48084] Avoid compiled-in timestamp for reproducible release builds

Joerg Wunsch-6
Follow-up Comment #1, bug #48084 (project avrdude):

OpenWrt/LEDE has the same problem [1]. avrdude is not reproducible.
How about using the SOURCE_DATE_EPOCH environment [2] ? If it's set, use the
time from it, if not use `date`.

[1]
https://tests.reproducible-builds.org/lede/dbd/packages/mips_24kc/packages/avrdude_6.3-1_mips_24kc.ipk.html

[2] https://reproducible-builds.org/specs/source-date-epoch/ 

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?48084>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

[bug #48084] Avoid compiled-in timestamp for reproducible release builds

Joerg Wunsch-6
Follow-up Comment #2, bug #48084 (project avrdude):

SOURCE_DATE_EPOCH provides a suitable workaround, but it means that we present
incorrect information to the user. IMO it's better to omit the "Compiled on"
string than to emit a hard-coded one.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?48084>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

[bug #48084] Avoid compiled-in timestamp for reproducible release builds

Joerg Wunsch-6
Update of bug #48084 (project avrdude):

                  Status:                    None => Fixed                  
             Assigned to:                    None => joerg_wunsch          
             Open/Closed:                    Open => Closed                
                 Release:                    None => 6.3                    

    _______________________________________________________

Follow-up Comment #3:

I removed the "compiled on/at" string now.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?48084>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev