[Bug 209908] sysutils/u-boot-rpi: build relies on GNU date when SOURCE_DATE_EPOCH is set in environment

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 31 17:16:32 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209908

            Bug ID: 209908
           Summary: sysutils/u-boot-rpi: build relies on GNU date when
                    SOURCE_DATE_EPOCH is set in environment
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ian at FreeBSD.org
          Reporter: emaste at freebsd.org
          Assignee: ian at FreeBSD.org
             Flags: maintainer-feedback?(ian at FreeBSD.org)

The SOURCE_DATE_EPOCH[1] environment variable can be used as part of a strategy
for reproducible ports builds[2].

Building sysutils/u-boot-rpi without the coreutils package (which provides GNU
date installed as gdate) fails with:

  CHK     include/generated/timestamp_autogenerated.h
Makefile:1317: recipe for target 'include/generated/timestamp_autogenerated.h'
failed
gmake[1]: *** [include/generated/timestamp_autogenerated.h] Error 42
gmake[1]: Leaving directory
'/wrkdirs/usr/ports/sysutils/u-boot-rpi/work/u-boot-2016.01'
*** Error code 1

The Makefile notes that GNU date is required if using SOURCE_DATE_EPOCH:

# The SOURCE_DATE_EPOCH mechanism requires a date that behaves like GNU date.  
# The BSD date on the other hand behaves different and would produce errors    
# with the misused '-d' switch.  Respect that and search a working date with   
# well known pre- and suffixes for the GNU variant of date.
define filechk_timestamp.h
        (if test -n "$${SOURCE_DATE_EPOCH}"; then \
...

The ReproducibleBuilds wiki describes a technique[3] for supporting BSD date,
summarized here:

13:11 < mapreri> date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || 
                 date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || 
                 date -u "+$DATE_FMT"


[1] https://reproducible-builds.org/specs/source-date-epoch/
[2] https://reproducible-builds.org/
[3]
https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list