Re: [PATCH osinfo-db] Use SOURCE_DATE_EPOCH to make build reproducible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 24, 2017 at 9:50 AM, Chris Lamb <lamby@xxxxxxxxxx> wrote:
> [Adding rb-general@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx to CC]
>
> Hi Fabiano,
>
>> > using a fixed timestamp when the variable is set
>> > ---
>> >  Makefile | 6 +++++-
>> >  1 file changed, 5 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/Makefile b/Makefile
>> > index 48d2951..1846f7a 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -1,7 +1,11 @@
>> >
>> >  VPATH = .
>> >
>> > -TODAY = $(shell date +"%Y%m%d")
>> > +ifdef SOURCE_DATE_EPOCH
>> > +    TODAY = $(shell date --utc --date="@$(SOURCE_DATE_EPOCH)" +"%Y%m%d")
>> > +else
>> > +    TODAY = $(shell date +"%Y%m%d")
>> > +endif
>> >
>> >  OSINFO_DB_EXPORT = osinfo-db-export
>> >  OSINFO_DB_IMPORT = osinfo-db-import
>> > --
>> > 2.11.0
>> >
>> > _______________________________________________
>> > Libosinfo mailing list
>> > Libosinfo@xxxxxxxxxx
>> > https://www.redhat.com/mailman/listinfo/libosinfo
>>
>> Chris,
>>
>> Thanks for the patch. Would you mind adding some notes to the README
>> just to make as explicit as possible that someone who may be
>> interested can generate a build from a specific date using
>> SOURCE_DATE_EPOCH env var (and an example on how to do so)?
>
> Sure, please just append the following:
>
>    To build libosinfo reproduciblity, you should export
>    the SOURCE_DATE_EPOCH[0] environment variable to the
>    build system. For example:
>
>      $ export SOURCE_DATE_EPOCH="$(date +%s)"
>      $ ./configure [..]
>      $ make
>      […]
>
>    [0] https://reproducible-builds.org/specs/source-date-epoch/
>
> It seems more optimal to link to the specification rather than to
> duplicate a lot of the info (eg. should be in integer, etc. etc.)
> in every projects' documentation.

Thanks a lot!
I'll squash it to your patch and push it later Today.

It'll be part of the next release that will be done over the next weekend.


>
>
> Regards,
>
> --
>       ,''`.
>      : :'  :     Chris Lamb
>      `. `'`      lamby@xxxxxxxxxx / chris-lamb.co.uk
>        `-


Best Regards,
-- 
Fabiano Fidêncio

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux