Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 845189 - net-dns/getdns-1.7.0-r1 pkg_postinst uses absolute path and fails under custom ROOT= value
Summary: net-dns/getdns-1.7.0-r1 pkg_postinst uses absolute path and fails under custo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-17 16:54 UTC by ev
Modified: 2022-05-17 21:02 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ev 2022-05-17 16:54:23 UTC
Ebuild uses absolute path to set fcaps in pkg_postinst
Emerge fails when I install package with custom ROOT= value.

Responsible function in ebuild:
pkg_postinst() {
	if use stubby; then
		fcaps cap_net_bind_service=ei /usr/bin/stubby
		tmpfiles_process stubby.conf
	fi
}


Adding ${EROOT} to path fixed the issue for me. 
		fcaps cap_net_bind_service=ei "${EROOT}"/usr/bin/stubby


This is example of how I've fixed it in my private repo.
https://github.com/adippl/evgr/blob/master/net-dns/getdns/getdns-1.7.0-r1.ebuild
Comment 1 Larry the Git Cow gentoo-dev 2022-05-17 21:02:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a6cf77168bb06b19f761057e08e8c86c92ed6f6

commit 1a6cf77168bb06b19f761057e08e8c86c92ed6f6
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-05-17 21:01:47 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-05-17 21:02:37 +0000

    net-dns/getdns: pass relative path to fcaps
    
    Closes: https://bugs.gentoo.org/845189
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 net-dns/getdns/getdns-1.7.0-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)