Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 748093 - net-p2p/syncthing: RDEPEND on acct-user/syncthing, etc. should be a DEPEND
Summary: net-p2p/syncthing: RDEPEND on acct-user/syncthing, etc. should be a DEPEND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal minor
Assignee: Marek Szuba (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-12 16:53 UTC by Gary Wong
Modified: 2020-10-14 16:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against syncthing-1.10.0.ebuild (syncthing-depend-patch,584 bytes, patch)
2020-10-12 16:53 UTC, Gary Wong
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Wong 2020-10-12 16:53:00 UTC
Created attachment 664900 [details, diff]
Patch against syncthing-1.10.0.ebuild

net-p2p/syncthing lists two acct-*/* in RDEPEND, and needs the corresponding user/group in an fowners call in src_install().

The trouble is that EAPI 7 PMS Section 8 states only BDEPEND and DEPEND dependencies are guaranteed at src_install() time, and so it's possible to attempt src_install when the syncthing user and group do not exist.

For instance, trying to build a syncthing binpkg with:

    emerge -o --onlydeps-with-rdeps=n net-p2p/syncthing && emerge -B net-p2p/syncthing

fails in the final src_install().

The attached patch (moving acct-*/* from RDEPEND to DEPEND) resolves the problem.
Comment 1 Marek Szuba (RETIRED) archtester gentoo-dev 2020-10-14 16:34:43 UTC
You are half-right here. On the one hand, it is indeed correct that a package listed in RDEPEND is not guaranteed to be present at build time - thanks for having spotted this! On the other, removing from RDEPEND a package which very much IS used at run time - the OpenRC init script for syncthing uses this user to run the daemon - would be a rather bad idea.

Anyway this was fixed with commit bc8427ffe1279b73d2b86427cf2e820ee4cd62dc but I accidentally forgot to tag it with the bug number.