Bug 248843 - sysutils/beats6: Hardlinks between usr/local/share and var/db
Summary: sysutils/beats6: Hardlinks between usr/local/share and var/db
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-elastic (Nobody)
Depends on:
Reported: 2020-08-23 08:38 UTC by Eirik Oeverby
Modified: 2020-10-09 21:33 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Eirik Oeverby 2020-08-23 08:38:07 UTC
The port is creating hardlinks in stagedir which pollutes the package, making it impossible to install on systems where /usr/local/share and /var/db are on different filesystems (which will be a lot of systems).

Example file:
stage# find . -name Filebeat-Postgresql-slowlogs.json|xargs ls -i
313585 ./usr/local/share/beats/filebeat/module/postgresql/_meta/kibana/6/dashboard/Filebeat-Postgresql-slowlogs.json
313585 ./var/db/beats/filebeat/kibana/6/dashboard/Filebeat-Postgresql-slowlogs.json

The COPYTREE_SHARE macro uses cpio -l, which creates links instead of actually copying files.

Note: This probably also applies to sysutils/beats7
Comment 1 Juraj Lutter 2020-08-23 08:47:12 UTC
Thanks for the report, I will take care of it. Currently also beats7 is scheduled for update (final tests are pending), so I will look also on it.
Comment 2 Juraj Lutter 2020-08-23 09:23:46 UTC
beats7 does not install anything under /var/db/beats.

I'm also investigating why beats6 need(ed) kibana files under /var/db/beats.
Comment 3 iron.udjin 2020-09-14 09:42:00 UTC
I've got the same problem with hardlink:

===>  Installing for beats6-6.8.12
===>  Checking if beats6 is already installed
===>   Registering installation for beats6-6.8.12
Installing beats6-6.8.12...
pkg-static: Fail to create hardlink: /var/db/beats/filebeat/kibana/5/dashboard/.pkgtemp.0d3f2380-fa78-11e6-ae9b-81e5311e8cab.json.C1FvaODKD1bT:Cross-device link
*** Error code 70

Previous version of beats6 installs fine.
Comment 4 Eirik Oeverby 2020-10-09 21:33:45 UTC
Any progress on beats6?