Bug 278787

Summary: Mk/Uses/zip.mk: Add switch for (bsd)tar
Product: Ports & Packages Reporter: Daniel Engberg <diizzy>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: arrowd, bofh, ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for Mk/Uses/zip.mk none

Description Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 14:42:31 UTC
Created attachment 250461 [details]
Patch for Mk/Uses/zip.mk

Teach zip helper about (bsd)tar for consistency and remove the need to define EXTRACT_SUFX
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2024-05-05 14:45:20 UTC
What are use cases for this?
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 14:52:00 UTC
It would be nice for  consistency in cases like these: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278745

I've actually submitted a bunch of patches recently to reduce I/O for a bunch of ports, a rough estimate would be around 2-3Gbyte or so in total if applied.
Comment 3 Gleb Popov freebsd_committer freebsd_triage 2024-05-05 14:54:19 UTC
I mean, the port shouldn't really care if we're using bsdtar or not? Why have a special USES argument for this?
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 14:56:43 UTC
It doesn't but its nice for consistency to be able to use the same syntax such as in EXTRACT_AFTER_ARGS irregardless of typo of archive whenever possible (I'm aware the some archives needs unzip/infozip).

Another use-case, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278779
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2024-05-05 15:01:01 UTC
Can't we just automatically switch to bsdtar whenever possible inside zip.mk, without requiring a port to specify :bsdtar argument? If I understand it correctly, it is just a matter of testing OSVERSION or even .if exists() ?
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 15:13:46 UTC
From what I recall it's a POLA issue as bsdtar doesn't share the same syntax as unzip and/or infozip?
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2024-06-05 20:06:24 UTC
Friendly ping on how to proceed
Comment 8 Mathieu Arnold freebsd_committer freebsd_triage 2024-06-06 05:33:14 UTC
I don't think it is a good idea.
The framework does not have to include every possible knob for every possible usage.
You can already use bsdtar to extract a zip file, and you figured out how to do it by yourself, this is enough.