Menu

#25 Override mtime with zip -X and SOURCE_DATE_EPOCH

Unstable (example)
open
nobody
5
2022-02-13
2019-05-14
No

This makes reproducible zip file creation a lot easier.
(the other common problem is non-deterministic recursion because it uses filesystem readdir order without sorting)

1 Attachments

Discussion

  • Mingye Wang

    Mingye Wang - 2020-01-25

    A revised patch with manpage updates is attached.

    Readdir seems a bit hard to fix generally, since it is used in a bit too many places. For Unix we can probably take the FreeBSD scandir() implementation and wrap a new readd() around it. Too keep the states we will need to make a struct around DIR instead so we know where the namelist is.

     
    • Mingye Wang

      Mingye Wang - 2020-01-25

      Got the scandir patch here. You will need to fill in the fallback implementation part.

       
      • Bernhard M. Wiedemann

        The 0002 patch does not apply cleanly on my 3.0 - Is there a git repo of your version somewhere?

        and then there are 2 problems:
        1) there is another closedir(d) in the first loop.
        2) the char *e; definition is still needed when you assign namelist[i]->d_name to it

        There is a scandir impl in
        https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/Win7Samples/begin/sdkdiff/scandir.cpp but licence is probably not suitable. There are some other ports around on the net as part of the various libcs.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.