Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 512790 - sys-apps/systemd should move the fcaps call to bottom of pkg_postinst
Summary: sys-apps/systemd should move the fcaps call to bottom of pkg_postinst
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-09 00:05 UTC by Steev Klimaszewski (RETIRED)
Modified: 2015-09-07 18:15 UTC (History)
1 user (show)

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 Steev Klimaszewski (RETIRED) gentoo-dev 2014-06-09 00:05:03 UTC
While building systemd in an ARM cross chroot, postinst for systemd dies because of the fcaps call like so:

 * Setting caps 'cap_dac_override,cap_sys_ptrace=ep' on file '/usr/bin/systemd-detect-virt' failed:
 * warning - unable to get process capabilities (old libcap?)
 * unable to manipulate CAP_SETFCAP - try a newer libcap?: Invalid argument
 * ERROR: sys-apps/systemd-213::gentoo failed (postinst phase):
 *   could not set caps
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_postinst
 *   environment, line 5011:  Called fcaps 'cap_dac_override,cap_sys_ptrace=ep' 'usr/bin/systemd-detect-virt'
 *   environment, line 2821:  Called die
 * The specific snippet of code:
 *                               die "could not set caps"

This isn't a huge deal, since systemd-detect-virt won't be run on that system, however it also means that the rest of postinst didn't get run, so migrate_locale, migrate_net_name_slot and the mtab section (the important ones imo) don't get run.

libcap is 2.22-r2 which appears to be the latest stable as well as the latest in the tree, and the host system is running a 3.14.5 kernel.  

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2014-06-09 03:48:35 UTC
This seems like a problem in the fcaps function. I think that it should not call die when invoked from pkg_postinst.
Comment 2 Mike Gilbert gentoo-dev 2014-06-09 03:52:41 UTC
Or rather, as a utility function, it would be nice if it would not call die at all and leave it up to the ebuild.
Comment 3 Pacho Ramos gentoo-dev 2015-09-07 18:15:31 UTC
Looks like eclass is no longer used (for example with 225)