Re: CVS commit: src/distrib/common

2015-11-25 Thread Pierre Pronchery
On 11/25/15 08:54, Martin Husemann wrote:
> On Wed, Nov 25, 2015 at 01:30:37AM +, Christos Zoulas wrote:
>> In article 
>> ,
>> Masao Uebayashi   wrote:
>>> bapt@freebsd taught me that FreeBSD uses ((the newest timestamp in the
>>> source files) + 1sec) in places where appropriate for reproducible
>>> build.  It might have been about Ports, but idea is it.
>>
>> That's a nice way to do it. How do they compute that?
> 
> I disagree - it needs to be set manually (and documented in the release
> notes). The above could be the rule how releng manually sets it though.

The automatic approach is great because we don't want reproducible
builds only for releases. It can be documented for releases regardless.

-- 
khorben



Re: CVS commit: src/distrib/common

2015-11-25 Thread Martin Husemann
On Wed, Nov 25, 2015 at 11:17:27AM +0100, Pierre Pronchery wrote:
> The automatic approach is great because we don't want reproducible
> builds only for releases. It can be documented for releases regardless.

The automatic aproach relies on local file times in your source tree.
I don't see how that can usefully work if you want to reproduce a build
on a different machine later.

Having a tool to calculate the timestamp and invoking

 ./build.sh -V MKREPROTIME=$( $tooldir/bin/latest-plus-one-sec . )

is fine, of course (even better if $MKREPROTIME goes into BUILDINFO).
Then when trying to reproduce that build you grep the timestamp from
/etc/release and do

 ./build.sh -V MKREPROTIME=1448447287

and you don't have to play games with your filetimes.

The easiest way for freebsd (using subversion) is to check for
the timestamp of the latest subversion change on the current branch and use
that. However, that is not good for folks doing local MKREPRO builds.

Anyway, my point is: the information needs to be explicitly passed on
the build.sh command line. Calculating it automatically internaly is not
good.

Generating it (sensibly) for the command line optionally automatically of
course is fine.

Martin


Re: CVS commit: src/distrib/common

2015-11-25 Thread Joerg Sonnenberger
On Wed, Nov 25, 2015 at 11:32:58AM +0100, Martin Husemann wrote:
> On Wed, Nov 25, 2015 at 11:17:27AM +0100, Pierre Pronchery wrote:
> > The automatic approach is great because we don't want reproducible
> > builds only for releases. It can be documented for releases regardless.
> 
> The automatic aproach relies on local file times in your source tree.
> I don't see how that can usefully work if you want to reproduce a build
> on a different machine later.

Especially since the time stamps will be different for "cvs up" vs
"fresh cvs co".

Joerg


Re: CVS commit: src/distrib/common

2015-11-25 Thread Pierre Pronchery
On 11/25/15 12:00, Joerg Sonnenberger wrote:
> On Wed, Nov 25, 2015 at 11:32:58AM +0100, Martin Husemann wrote:
>> On Wed, Nov 25, 2015 at 11:17:27AM +0100, Pierre Pronchery wrote:
>>> The automatic approach is great because we don't want reproducible
>>> builds only for releases. It can be documented for releases regardless.
>>
>> The automatic aproach relies on local file times in your source tree.
>> I don't see how that can usefully work if you want to reproduce a build
>> on a different machine later.
> 
> Especially since the time stamps will be different for "cvs up" vs
> "fresh cvs co".

Yes that's right; and same thing with Git.

-- 
khorben