Re: [Reproducible-builds] [Debian Wiki] Update of "ReproducibleBuilds/TimestampsProposal" by BenBoeckel

2015-09-17 Thread Jérémy Bobbio
Daniel Kahn Gillmor:
> Wiki page:
> > -   EXECUTE_PROCESS(COMMAND "date" "-u" "-d @${SOURCE_DATE_EPOCH}" 
> > "+%d/%m/%Y" OUTPUT_VARIABLE BUILD_DATE)
> […]
> Is there a reason above that this example code to translate from
> SOURCE_DATE_EPOCH to a build date doesn't produce ISO-8601-compliant
> date strings in the BUILD_DATE variable?

I assume it's because it was initially in a piece of software that used
the above format. I'd say feel free to replace by a ISO-8601 format
string if you feel it matters.

-- 
Lunar.''`. 
lu...@debian.org: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   


signature.asc
Description: Digital signature
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Re: [Reproducible-builds] [Debian Wiki] Update of "ReproducibleBuilds/TimestampsProposal" by BenBoeckel

2015-09-16 Thread Daniel Kahn Gillmor
On Wed 2015-09-16 21:19:59 -0400, Debian Wiki wrote:
> Dear Wiki user,
>
> You have subscribed to a wiki page or wiki category on "Debian Wiki" for 
> change notification.
>
> The "ReproducibleBuilds/TimestampsProposal" page has been changed by 
> BenBoeckel:
> https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal?action=diff=44=45
>
> Comment:
> CMake: update example to use lower-case command names, use 
> $ENV{SOURCE_DATE_EPOCH}, fix argument quoting, strip trailing whitespace, and 
> formatting cleanup so it is easier to read
>
>   
>   {{{
>   if (DEFINED ENV{SOURCE_DATE_EPOCH})
> -   EXECUTE_PROCESS(COMMAND "date" "-u" "-d @${SOURCE_DATE_EPOCH}" 
> "+%d/%m/%Y" OUTPUT_VARIABLE BUILD_DATE)
> +   execute_process(
> + COMMAND "date" "-u" "-d" "@$ENV{SOURCE_DATE_EPOCH}" "+%d/%m/%Y"
> + OUTPUT_VARIABLE BUILD_DATE
> + OUTPUT_STRIP_TRAILING_WHITESPACE)
> - else()
> + else ()
> -   EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE BUILD_DATE)
> +   execute_process(
> + COMMAND "date" "+%d/%m/%Y"
> + OUTPUT_VARIABLE BUILD_DATE
> + OUTPUT_STRIP_TRAILING_WHITESPACE)
> - endif()
> + endif ()
>   }}}
>   
>   ''The above will work only with GNU date. See POSIX shell example on how to 
> support BSD date.''

Is there a reason above that this example code to translate from
SOURCE_DATE_EPOCH to a build date doesn't produce ISO-8601-compliant
date strings in the BUILD_DATE variable?

I'm happy to replace "+%d/%m/%Y" with "+%Y-%m-%d", but i don't know much
about cmake and don't want to get in an edit war about this.

fwiw, "%d/%m/%Y" may look sane to most people around the world, but it
has the following disadvantages over ISO-8601:

 0) lexicographically-sorted dates are not chronologically-sorted

 1) the US typically uses "+%m/%d/%Y" (which is insane, granted) which
means that 06/09/2015 is easily interpretable as June 9th as well as
September 6th.

--dkg

___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds