Bug 263187 - unzip doesn't know infozip's -D option
Summary: unzip doesn't know infozip's -D option
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-09 18:21 UTC by Bernhard Rosenkränzer
Modified: 2022-10-25 10:30 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkränzer 2022-04-09 18:21:22 UTC
unzip doesn't support the -D option present in info-zip (for which it wants to be a drop-in replacement).
This breaks e.g. trying to build Android sources.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2022-04-10 20:38:56 UTC
It does not aim to be a drop-in replacement for all options supported by other tools. From the man page:

     The unzip utility aims to be sufficiently compatible with other
     implementations to serve as a drop-in replacement in the context of the
     ports(7) system.  No attempt has been made to replicate functionality
     which is not required for that purpose.

That said I think there's a general willingness to improve compatibility. Would you please describe the purpose of the -D option?
Comment 2 Alex Kozlov freebsd_committer freebsd_triage 2022-10-25 10:30:21 UTC
I assume it is:

-D skip restoration of timestamps for extracted items. Normally, unzip tries to restore all meta-information for extracted items that are supplied in the Zip archive (and do not require privileges or impose a security risk). By specifying -D, unzip is told to suppress restoration of timestamps for directories explicitly created from Zip archive entries.
-DD forces suppression of timestamp restoration for all extracted entries (files and directories). This option results in setting the timestamps for all extracted entries to the current time.


Should be trivial to implement.