#67727 closed defect (fixed)

zeek, zeek-devel @6.0.0: Image error: /opt/local/etc/zeek/networks.cfg already exists and does not belong to a registered port

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: zeek, zeek-devel

Description

zeek and zeek-devel @6.0.0 fail to activate on all buildbot workers:

Error: Failed to activate zeek: Image error: /opt/local/etc/zeek/networks.cfg already exists and does not belong to a registered port.  Unable to activate port zeek. Use 'port -f activate zeek' to force the activation.

I think this problem was introduced with the 6.0.0 update of zeek in [aad2bf728fc23c9c07d2a5a736e2f4b4915cd667/macports-ports] and of zeek-devel in [654d9f1a50c51cf30124a59b699ffcebc3d09378/macports-ports].

Change History (5)

comment:1 Changed 16 months ago by Schamschula (Marius Schamschula)

Yes, I’m aware of this. I spent the better part of a day trying to figure out how these files (there are three .cfg files) got there. They are not part of the MacPorts package, and I couldn’t find anything in main.log to indicate that they were installed in the destroot or install phases.

Last edited 16 months ago by Schamschula (Marius Schamschula) (previous) (diff)

comment:2 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Well you can see in the post-activate block removed by [aad2bf728fc23c9c07d2a5a736e2f4b4915cd667/macports-ports] how the files previously got there. And now the port wants to claim those files as its own, which conflicts with the previous unclaimed files.

Is the user still expected to edit these files (node.cfg, networks.cfg, zeekctl.cfg)? If yes, the port should not own the files; it should install sample config files and copy them to the non-sample names if they don't already exist (in other words, reinstate the deleted post-activate block; see wiki:PortfileRecipes#configfiles).

If the user is not expected to edit these files anymore, then all you need is a pre-activate block to delete the old unregistered files.

comment:3 Changed 15 months ago by Schamschula (Marius Schamschula)

Unfortunately, that wasn't the case.

All previous updates worked with that block, but the update to @6.0.0 broke that functionality and prevented the update.

That's why I removed the block in the first place.

I will look and see if I can modify it.

comment:4 Changed 15 months ago by Schamschula (Marius Schamschula)

On further research, I remembered what happened: The new version creates these files in ${prefix}/etc/zeek/.

The best workaround is to remove them in post-destroot, and reinstate the post-activate block.

comment:5 Changed 15 months ago by Marius Schamschula <mschamschula@…>

Resolution: fixed
Status: assignedclosed

In d17f8a0f5ac30990f6e0fafb5c5eaa61e07b8924/macports-ports (master):

zeek: fix cfg files

Closes: #67727

Note: See TracTickets for help on using tickets.