Bug 237551 - dns/bind-tools conflicts with dns/bindXXX (with XXX != 914)
Summary: dns/bind-tools conflicts with dns/bindXXX (with XXX != 914)
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Mathieu Arnold
URL:
Keywords:
: 237552 237553 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-25 10:44 UTC by Helge Oldach
Modified: 2019-09-05 13:14 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helge Oldach 2019-04-25 10:44:00 UTC
ports r499757 made all BIND ports depending on dns/bind-tools. This will install the bind tools from the latest version (currently 9.14) even if BIND itself is a different release.

Unfortunately this creates a conflict: Since dns/bind-tools/Makefile slurps in dns/bind914/Makefile, we run into CONFLICTS for any case where the BIND version is /different/ from the one used in dns/bind-tools.

For example, currently I have updates pending for both dns/bind-tools (from 9.14.0 to 9.14.1) as well as dns/bind911 (from 9.11.6 to 9.11.6-P1). But an upgrade of dns/bind-tools (which is before upgrading dns/bind911 because of the a run-time dependency) fails because of this mismatch:


===>  bind-tools-9.14.1 conflicts with installed package(s):
      bind911-9.11.6P1

      They install files into the same place.
      You may want to stop build with Ctrl + C.
===>  License MPL20 accepted by the user
===>   bind-tools-9.14.1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by bind-tools-9.14.1 for building

===>  bind-tools-9.14.1 conflicts with installed package(s):
      bind911-9.11.6P1

      They will not build together.
      Please remove them first with pkg delete.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/dns/bind-tools
*** Error code 1

Stop.
make: stopped in /usr/ports/dns/bind-tools


The only way out is to deinstall dns/bind911 (which is a pain, as it potentially kills name resolution), then upgrade dns/bind-tools, and then reinstall dns/bind911.

Furthermore, the error message itself is odd: After firstly indicating a potential conflict (but perhaps still being able to build correctly) it bails out entirely pointing to the same conflict.

Unfortunately, ports r499757 made things worse (although I like the idea) and broke a working proper BIND upgrade.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2019-04-25 14:28:59 UTC
*** Bug 237552 has been marked as a duplicate of this bug. ***
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2019-04-25 14:29:11 UTC
*** Bug 237553 has been marked as a duplicate of this bug. ***
Comment 3 Mathieu Arnold freebsd_committer 2019-05-15 08:42:51 UTC
I admit, I did not imagine people were still building things manually or using tools that do not build the packages cleanly and then use pkg upgrade.

The correct solution, as you already saw is to remove the existing bind911 port (works for bidn912, 913, 914 too) and reinstall.
Comment 4 Helge Oldach 2019-05-15 12:11:55 UTC
(In reply to Mathieu Arnold from comment #3)
Excuse me, people are not supposed to build ports manually? What, if I may ask, is then the reason for lots of port's knobs that are not enabled by default and therefore are not in the packages available through pkg upgrade? Like, in this example, SQL-based DLZ for instance, or QUERYTRACE?

Specifically, BIND-9.11 is the long-term support version, so there is a good reason to deploy this one including adequate bind-tools, however that is broken as of now by ports r499757.

Note that this also breaks with other tools like portmaster or portupgrade - are you seriously suggesting that these should go away likewise?
Comment 5 Helge Oldach 2019-05-15 12:45:41 UTC
An easy way out would be to replace

MASTERDIR=      ${.CURDIR}/../../dns/bind914

with 

MASTERDIR?=      ${.CURDIR}/../../dns/bind914

This would allow people to use something like

.if ${.CURDIR:M*/dns/bind-tools}
MASTERDIR=      ${.CURDIR}/../../dns/bind911
.endif

in /etc/make.conf and re-enable non-disruptive upgrades (at the expense of using the 9.11 tools instead of the 9.14 ones).

Can we at least agree on this in order to work around the breakage done by ports r499757?
Comment 6 Helge Oldach 2019-05-16 10:33:39 UTC
(In reply to Helge Oldach from comment #5)
OK, after today's 9.14.2 update I just noticed that ports r500027 fixed it already by moving the CONFLICTS line of dns/bind914/Makefile to a more appropriate place.

This PR provides the answer to the question raised in the commit message of ports r500027.

Leave this PR as closed. Thanks!
Comment 7 rocky 2019-09-05 00:34:26 UTC
I'm sorry but this pr cannot be closed as the problem still exists.

Updating bind911 will not work as the bind-tools _demands_ a conflicting version - and as noted bind9.11 is the ESV, so should not need to be updated to the latest release.

If bind-tools is insisted on, then it MUST be capable of using the currently installed version of bind.

Using portupgrade:

Installing bind-tools-9.14.5...
pkg-static: bind-tools-9.14.5 conflicts with bind911-9.11.5_1 (installs files into the same place).  Problematic file: /usr/local/bin/arpaname
*** Error code 70

FWIW, I also highly disagree with the comment made that all tools should be built by automated tools. We have a ports system for a reason - long before packages - and it worked, and still works providing the structure for the automated tools. If a user wishes to build using ports then that should not be penalised by someone dictating otherwise - both systems can live together, and mindsets can be less rigid.
Comment 8 rocky 2019-09-05 01:08:44 UTC
(In reply to Helge Oldach from comment #5)
This workaround does not work - it gets caught in a circular dependency:

===>  Staging for bind911-9.11.10
===>   bind911-9.11.10 depends on package: bind-tools>0 - not found
===>  Staging for bind911-9.11.10
===>   bind911-9.11.10 depends on package: bind-tools>0 - not found
===>  Staging for bind911-9.11.10

So this is completely broken.
Comment 9 rocky 2019-09-05 01:15:40 UTC
(In reply to rocky from comment #8)
I should also point out that circular dependencies are the biggest no no's in the ports developer handbook :-)
Comment 10 rocky 2019-09-05 01:23:32 UTC
This gets even more broken than believable:

After trying unsuccessfully to obtain a working upgrade, I removed the run dependency of bind-tools from bind911, then ran make. This went ok, so went back to bind-tools, but it still wanted to install bind911 for some reason.

So I uninstalled bind911 and tried building bind-tools again. Big fail:

make install clean
===>  Installing for bind911-9.11.10
===>  Checking if bind911 is already installed
===>   Registering installation for bind911-9.11.10
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/arpaname:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/delv:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/dig:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/host:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/mdig:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/named-rrchecker:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/nslookup:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/bin/nsupdate:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/arpaname.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/delv.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/dig.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/host.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/mdig.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/named-rrchecker.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/nslookup.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man1/nsupdate.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-cds.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/%%PYTHON%%man/man8/dnssec-checkds.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/%%PYTHON%%man/man8/dnssec-coverage.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-dsfromkey.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-importkey.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-keyfromlabel.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-keygen.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/%%PYTHON%%man/man8/dnssec-keymgr.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-revoke.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-settime.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-signzone.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/dnssec-verify.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/named-journalprint.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/man/man8/nsec3hash.8.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-cds:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/%%PYTHON%%sbin/dnssec-checkds:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/%%PYTHON%%sbin/dnssec-coverage:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-dsfromkey:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-importkey:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-keyfromlabel:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-keygen:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/%%PYTHON%%sbin/dnssec-keymgr:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-revoke:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-settime:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-signzone:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/dnssec-verify:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/named-journalprint:No such file or directory
pkg-static: Unable to access file /usr/ports/dns/bind-tools/work/stage/usr/local/sbin/nsec3hash:No such file or directory
*** Error code 74

Stop.
make[1]: stopped in /usr/ports/dns/bind-tools
*** Error code 1

Stop.
make: stopped in /usr/ports/dns/bind-tools

Whatever this alleged improvement is needs to be resolved quickly so as to prevent breakage by first rolling back the change to a working state.
Comment 11 rocky 2019-09-05 02:16:16 UTC
(In reply to Mathieu Arnold from comment #3)
It should be pointed out that based on my efforts and reporting above that the solution provided by this comment (#3) obviously does not work.
Comment 12 Helge Oldach 2019-09-05 06:30:49 UTC
(In reply to rocky from comment #8)
Correct, the suggested workaround might indeed no longer work after ports r500027.
Comment 13 Helge Oldach 2019-09-05 06:34:40 UTC
(In reply to rocky from comment #10)
Maybe it will work OK if you use WRKDIRPREFIX=/usr/obj (for example) in /etc/make.conf. Your build currently seems to be taking place in the ports tree itself.
Comment 14 rocky 2019-09-05 12:55:53 UTC
(In reply to Helge Oldach from comment #13)
Would that be because that is how ports/ actually works?

And then why repurpose an area that is designated for something else and cause conflict elsewhere?

Why not stick to the methods and processes that have already been established for some time? If ain't broke, don't fix it. All well and good to build upon that, but no need to throw away what already works.

There should be no need to completely up end things to move forward with this in such a manner. Going forward in the way you suggest will continue to cause dramas such as this - and for an issue that should be a complete no brainer: the policies state that circular dependencies are unacceptable and this is exactly that.
Comment 15 Helge Oldach 2019-09-05 13:07:04 UTC
(In reply to rocky from comment #14)
Don't get me wrong please - I did not create this odd version dependency, in fact I raised this PR because this broke my landscape. I completely agree that this should work perfectly OK when manually building from ports. Actually I believe it's even a bad idea to use BIND tools from a new version with BIND server from an older version. Luckily BIND follows a defensive release approach, so chances are it will work reliably.

That said, my proposal to try WRKDIRPREFIX=/usr/obj was merely a suggestion that might help out in your case. But maybe it doesn't.
Comment 16 rocky 2019-09-05 13:14:19 UTC
(In reply to Helge Oldach from comment #15)
Sorry if I sounded offensive - these are frustrating times.

Actually your note of using different versions of tools to the actual bind installed is precisely what I cannot even fathom. Is there supposed to be some hidden feature I'm not aware of?