# HG changeset patch # User Bernhard M. Wiedemann # Date 1502609999 -7200 # Sun Aug 13 09:39:59 2017 +0200 # Node ID a98e00eed893f62dd8349fc2894abca3aff4b33a # Parent 41ce01b7d413b3654211da0147857e7d6a1495de Facilitate reproducible builds by allowing to externally hold constant the build date and time. See https://reproducible-builds.org/specs/source-date-epoch/ Backport asap. diff -r 41ce01b7d413 -r a98e00eed893 NEWS --- a/NEWS Sun Aug 13 09:39:56 2017 +0200 +++ b/NEWS Sun Aug 13 09:39:59 2017 +0200 @@ -48,6 +48,12 @@ https://github.com/akrzemi1/Optional where only "optional.hpp" is needed. +- The environment variable SOURCE_DATE_EPOCH overrides the build + timestamp as recorded by the signatures. See + https://reproducible-builds.org/specs/source-date-epoch/ + for details. + + * Version 4.2 "Compressor Road" diff -r 41ce01b7d413 -r a98e00eed893 src/DefaultSig.pm --- a/src/DefaultSig.pm Sun Aug 13 09:39:56 2017 +0200 +++ b/src/DefaultSig.pm Sun Aug 13 09:39:59 2017 +0200 @@ -109,9 +109,10 @@ sub update_date_and_time { my $self = shift; + my $now = $ENV{SOURCE_DATE_EPOCH} || time; my ($second, $minute, $hour, $day_of_month, $month, $year, - $day_of_week) = $self->is_using_gmt() ? gmtime : localtime; + $day_of_week) = $self->is_using_gmt() ? gmtime($now) : localtime($now); $self->{DATE} = $self->format_date($day_of_month, $month, $year + 1900, $day_of_week, $self->weekdays->[$day_of_week], .scm'>
path: root/tests/profiles.scm
AgeCommit message (Expand)Author
2023-10-28profiles: Hooks honor the #:system parameter of ‘profile-derivation’....Fixes <https://issues.guix.gnu.org/65225>. * guix/profiles.scm (info-dir-file, package-cache-file) (info-dir-file, ghc-package-cache-file, ca-certificate-bundle) (emacs-subdirs, gdk-pixbuf-loaders-cache-file, glib-schemas) (gtk-icon-themes, gtk-im-modules, linux-module-database) (xdg-desktop-database, xdg-mime-database, fonts-dir-file) (manual-database, manual-database/optional): Add optional #:system parameter and pass it to ‘gexp->derivation’. (profile-derivation): Pass HOOK a second parameter, SYSTEM. * gnu/bootloader.scm (efi-bootloader-profile)[efi-bootloader-profile-hook]: Add optional #:system parameter and pass it to ‘gexp->derivation’. * guix/channels.scm (package-cache-file): Likewise. * tests/profiles.scm ("profile-derivation, #:system, and hooks"): New test. Reported-by: Tobias Geerinckx-Rice <me@tobias.gr> Ludovic Courtès