New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to clamp mtime to SOURCE_DATE_EPOCH #1699
Conversation
in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Without this patch, openSUSE's scap-security-guide package had variations in /usr/share/xml/scap/ssg/content/ssg-opensuse-ds-1.2.xml for every build: ``` <ds:component id="scap_org.open-scap_comp_ssg-opensuse-oval.xml" timestamp="2 021-02-23T09:58:15"> ```
|
Can one of the admins verify this patch? |
1 similar comment
|
Can one of the admins verify this patch? |
|
related: ComplianceAsCode/content#6642 and then there is one more issue to solve about nondeterminism from filesystem readdir order. |
|
Okay, it seems to be important and not really user-facing trick. Maybe you would also fancy creating a test for it? |
|
@openscap-ci ok to test |
|
@jan-cerny I recall that I once tried to locate the list of environment variables, honored by the scanner, and failed. Do we have it somewhere? If not – I'll create an issue to make one. |
Since I don't know the codebase, I'm usually not good at that. For the test design, there would be 4 cases:
|
Shouldn't these 2 cases raise a warning (the first one until 2037)? |
I try to keep the code as simple as possible. The assumption is that invalid values never happen and values in the future are valid and do not break anything. The future will be past, soon. |
I think we don't have it. |
This test checks if the SOURCE_DATE_EPOCH is used in the oscap ds sds-compose command as a datastream component timestamp. Related to OpenSCAP#1699
Allow to clamp mtime to
SOURCE_DATE_EPOCHin order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Without this patch, openSUSE's
scap-security-guidepackage had variations in/usr/share/xml/scap/ssg/content/ssg-opensuse-ds-1.2.xmlfor every build:as it was created by
oscap ds sds-compose ...