Skip to content

guix: SOURCE_DATE_EPOCH is already set in some environments #29935

@laanwj

Description

@laanwj

The environment variable SOURCE_DATE_EPOCH allows overriding the date that will be used inside the archives for guix-built binaries. This is an intentional feature, as documented in contrib/guix/README.md:

  • SOURCE_DATE_EPOCH

    Override the reference UNIX timestamp used for bit-for-bit reproducibility,
    the variable name conforms to [standard][r12e/source-date-epoch].

    (defaults to the output of $(git log --format=%at -1))

However, some environments, as apparently Nix, set SOURCE_DATE_EPOCH by default. This can be extremely confusing, as it results in mismatches. i see three options:

  • Show a big red warning when the Guix build scripts are called with an existing SOURCE_DATE_EPOCH. Most likely it's not what the user wanted, but they can continue if they wanted.
  • Disallow overriding SOURCE_DATE_EPOCH - unset it at start.
  • Rename our SOURCE_DATE_EPOCH to something non-standard that doesn't conflict with Nix.

The first one has my preference.

See bitcoin-core/guix.sigs#1201 which prompted this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions