Commit 11132fc21fb01ed63c621d852bc081a914d4f021 assumed that the value of 0 is 
never used in practice and thus used it to indicate "disabled", 
however that assumption has turned out to be wrong because ostree uses 
precisely that value as mtime in inodes, which in turn breaks existing 
workflows in this space (see the associated ticket).

Fix this by reverting the above commit (except leaving source_date_epoch 
initialized to 0, to prevent GCC warnings as mentioned in that commit).

As to why not just initialize source_date_epoch to -1: time_t happens to be a 
signed integer on most platforms but POSIX doesn't specify its signed-ness.

Add some accompanying tests too.

Fixes: #2679
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2756

-- Commit Summary --

  * Allow SOURCE_DATE_EPOCH=0 again

-- File Changes --

    M build/files.c (4)
    A tests/data/SPECS/source_date_epoch.spec (21)
    M tests/rpmbuild.at (42)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2756.patch
https://github.com/rpm-software-management/rpm/pull/2756.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2756
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to