Bug 244548 - archivers/gzip: address conflict with archivers/zutils
Summary: archivers/gzip: address conflict with archivers/zutils
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
Keywords: buildisok
Depends on:
Reported: 2020-03-02 02:10 UTC by John Hein
Modified: 2020-05-11 21:53 UTC (History)
1 user (show)

See Also:

[patch] fix gzip & zutils conflict (1.39 KB, patch)
2020-03-02 02:10 UTC, John Hein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2020-03-02 02:10:18 UTC
Created attachment 212086 [details]
[patch] fix gzip & zutils conflict

archivers/gzip and archivers/zutils install _some_ of the same files (e.g., bin/zgrep).

Installing gzip-1.10...
pkg-static: gzip-1.10 conflicts with zutils-1.8 (installs files into the same place).  Problematic file: /usr/local/bin/zcat

The attached patch addresses this by creating a ZUTILS option in archivers/gzip.  If ZUTILS is on, gzip will not install the conflicting files and have a run-time dependency on archivers/zutils.  If off, it will install those files and mark archivers/zutils as a conflicting port.

This (ZUTILS=on) allows archivers/gzip and archivers/zutils to both be installed.

The patch sets ZUTILS off by default, so there should be no change in the default package.  If we commit a change such that ZUTILS is on by default, PORTREVISION should be bumped since that would mean a package change to the default package.

There are some differences between the zutils version of the conflicting utilities.  For instance, the zutils version of zgrep supports -r (recursive grep), but the gzip version does not.  For that reason, I personally prefer the zutils version (and so I could see making ZUTILS=on be the default - not to mention, it allows users to install both packages), but that is not an exhaustive comparison.  Generally, my impression is that the differences are small.

QA testing:

 - poudriere testport WITH=ZUTILS & WITHOUT=ZUTILS - ok
 - portlint - ok
Comment 1 Automation User 2020-05-11 21:53:26 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/144532319