diff options
| author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2019-06-16 11:48:14 -0400 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-18 11:23:48 +0100 |
| commit | f1a582bd0be0fb887729731126d83c469446cf95 (patch) | |
| tree | f9a1cd3d2bc8fa849a25dd1c21ac44eae8b724ec /meta/recipes-core/util-linux | |
| parent | 1a6d32833e75c659071365b29c965ec337d97b5a (diff) | |
| download | poky-f1a582bd0be0fb887729731126d83c469446cf95.tar.gz | |
util-linux: add setpriv utility
Enable the setpriv utility for targets only. It will be used in
the run-ptest script for bash and perhaps other packages where
the ptest code is expected to run as a user.
setpriv uses libcap-ng which doesn't build natively so disable
it for native* builds. Also, busybox has a setpriv implementation
so ensure that setpriv adheres to the alternatives scheme.
(From OE-Core rev: 587ba5f4bef18e8260fe671bd2e303140369a5e5)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux')
| -rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 1d279a58aa..84c7012752 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
| @@ -20,7 +20,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=972a134f1e14b2b060e365df2fab0099 | |||
| 20 | 20 | ||
| 21 | #gtk-doc is not enabled as it requires xmlto which requires util-linux | 21 | #gtk-doc is not enabled as it requires xmlto which requires util-linux |
| 22 | inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest | 22 | inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest |
| 23 | DEPENDS = "zlib ncurses virtual/crypt" | 23 | DEPENDS = "libcap-ng ncurses virtual/crypt zlib" |
| 24 | 24 | ||
| 25 | MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" | 25 | MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" |
| 26 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ | 26 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ |
| @@ -102,6 +102,10 @@ EXTRA_OECONF = "\ | |||
| 102 | --libdir='${UTIL_LINUX_LIBDIR}' \ | 102 | --libdir='${UTIL_LINUX_LIBDIR}' \ |
| 103 | " | 103 | " |
| 104 | 104 | ||
| 105 | EXTRA_OECONF_append_class-target = " --enable-setpriv" | ||
| 106 | EXTRA_OECONF_append_class-native = " --without-cap-ng --disable-setpriv" | ||
| 107 | EXTRA_OECONF_append_class-nativesdk = " --without-cap-ng --disable-setpriv" | ||
| 108 | |||
| 105 | PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | 109 | PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
| 106 | # inherit manpages requires this to be present, however util-linux does not have | 110 | # inherit manpages requires this to be present, however util-linux does not have |
| 107 | # configuration options, and installs manpages always | 111 | # configuration options, and installs manpages always |
| @@ -109,8 +113,6 @@ PACKAGECONFIG[manpages] = "" | |||
| 109 | PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," | 113 | PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," |
| 110 | # Respect the systemd feature for uuidd | 114 | # Respect the systemd feature for uuidd |
| 111 | PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" | 115 | PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" |
| 112 | # Build setpriv requires libcap-ng | ||
| 113 | PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng," | ||
| 114 | # Build python bindings for libmount | 116 | # Build python bindings for libmount |
| 115 | PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3" | 117 | PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3" |
| 116 | # Readline support | 118 | # Readline support |
| @@ -248,6 +250,7 @@ ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" | |||
| 248 | ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" | 250 | ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" |
| 249 | ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" | 251 | ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" |
| 250 | ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" | 252 | ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" |
| 253 | ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv" | ||
| 251 | ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" | 254 | ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" |
| 252 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" | 255 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" |
| 253 | ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" | 256 | ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" |
| @@ -260,7 +263,10 @@ ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare" | |||
| 260 | ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" | 263 | ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" |
| 261 | ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" | 264 | ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" |
| 262 | 265 | ||
| 263 | ALTERNATIVE_${PN}-doc = "blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1" | 266 | ALTERNATIVE_${PN}-doc = "\ |
| 267 | blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \ | ||
| 268 | mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ | ||
| 269 | " | ||
| 264 | ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" | 270 | ALTERNATIVE_${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" |
| 265 | 271 | ||
| 266 | ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" | 272 | ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" |
| @@ -276,6 +282,7 @@ ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" | |||
| 276 | ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" | 282 | ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" |
| 277 | ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" | 283 | ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" |
| 278 | ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" | 284 | ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" |
| 285 | ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1" | ||
| 279 | ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" | 286 | ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" |
| 280 | ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" | 287 | ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" |
| 281 | ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" | 288 | ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" |
