summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2019-02-05 02:32:35 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-12 14:04:31 +0000
commit6b82821f8ad4bdac2523a382a33559804531f36c (patch)
tree3b1f3d0ba316a2033eff897e32338834c7856ba6 /meta/recipes-core/util-linux
parentc1a24f2421b48673527fafbca07eaefbe89f769c (diff)
downloadpoky-6b82821f8ad4bdac2523a382a33559804531f36c.tar.gz
util-linux: one package per binary (pt 2: base_bindir)
Similar to the previous patch. Existing packages (and current dependency by main package): * mount <- RRECOMMENDS * umount <- RDEPENDS * mountpoint <- RRECOMMENDS * getopt * su <- RDEPENDS New packages: * dmesg * kill * more To avoid breaking existing users, all the new packages are added to the main package as RRECOMMENDS_${PN}, so they are pulled into existing images etc. The existing RDEPENDS_${PN} will need some further clean-up in the future, as it appears a bit random which packages the main package depends on vs. recommends. Existing packages that aren't in RDEPENDS / RRECOMMENDS haven't been added to RRECOMMENDS for that reason. [YOCTO #13058] (From OE-Core rev: aea97fe48de5e983b938718d861dceb9f0084339) Signed-off-by: André Draszik <andre.draszik@jci.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.inc32
1 files changed, 10 insertions, 22 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index a250db94aa..4359a1c3fb 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -29,16 +29,16 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz
29 " 29 "
30 30
31PACKAGES =+ "util-linux-blkdiscard util-linux-sfdisk \ 31PACKAGES =+ "util-linux-blkdiscard util-linux-sfdisk \
32 util-linux-swaponoff util-linux-umount \ 32 util-linux-swaponoff \
33 util-linux-mount util-linux-readprofile util-linux-uuidd \ 33 util-linux-readprofile util-linux-uuidd \
34 util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs \ 34 util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs \
35 util-linux-mkfs util-linux-mcookie util-linux-rfkill \ 35 util-linux-mkfs util-linux-mcookie util-linux-rfkill \
36 util-linux-lsblk util-linux-mkfs.cramfs \ 36 util-linux-lsblk util-linux-mkfs.cramfs \
37 util-linux-partx util-linux-mountpoint \ 37 util-linux-partx \
38 util-linux-findfs util-linux-getopt util-linux-prlimit \ 38 util-linux-findfs util-linux-prlimit \
39 util-linux-ionice util-linux-unshare" 39 util-linux-ionice util-linux-unshare"
40PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" 40PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
41PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" 41PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
42 42
43python util_linux_binpackages () { 43python util_linux_binpackages () {
44 def pkg_hook(f, pkg, file_regex, output_pattern, modulename): 44 def pkg_hook(f, pkg, file_regex, output_pattern, modulename):
@@ -47,7 +47,7 @@ python util_linux_binpackages () {
47 if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): 47 if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename):
48 d.setVar('ALTERNATIVE_' + pkg, modulename) 48 d.setVar('ALTERNATIVE_' + pkg, modulename)
49 49
50 for dir in [ '${base_sbindir}' ]: 50 for dir in [ '${base_sbindir}', '${base_bindir}' ]:
51 do_split_packages(d, root=dir, 51 do_split_packages(d, root=dir,
52 file_regex=r'(.*)', output_pattern='${PN}-%s', 52 file_regex=r'(.*)', output_pattern='${PN}-%s',
53 description='${PN} %s', 53 description='${PN} %s',
@@ -58,7 +58,7 @@ python util_linux_binpackages () {
58 # pointing to 58 # pointing to
59 extras = {} 59 extras = {}
60 dvar = d.getVar('PKGD') 60 dvar = d.getVar('PKGD')
61 for root in [ '${base_sbindir}' ]: 61 for root in [ '${base_sbindir}', '${base_bindir}' ]:
62 root = d.expand(root) 62 root = d.expand(root)
63 for walkroot, dirs, files in os.walk(dvar + root): 63 for walkroot, dirs, files in os.walk(dvar + root):
64 for f in files: 64 for f in files:
@@ -122,21 +122,18 @@ FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
122 122
123FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard" 123FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard"
124FILES_util-linux-sfdisk = "${sbindir}/sfdisk" 124FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
125FILES_util-linux-mount = "${base_bindir}/mount.${BPN}"
126FILES_util-linux-mcookie = "${bindir}/mcookie" 125FILES_util-linux-mcookie = "${bindir}/mcookie"
127FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
128FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}" 126FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
129FILES_util-linux-uuidgen = "${bindir}/uuidgen" 127FILES_util-linux-uuidgen = "${bindir}/uuidgen"
130FILES_util-linux-uuidd = "${sbindir}/uuidd" 128FILES_util-linux-uuidd = "${sbindir}/uuidd"
131FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}" 129FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}"
132FILES_util-linux-partx = "${sbindir}/partx" 130FILES_util-linux-partx = "${sbindir}/partx"
133FILES_util-linux-findfs = "${sbindir}/findfs" 131FILES_util-linux-findfs = "${sbindir}/findfs"
134FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
135FILES_util-linux-runuser = "${sbindir}/runuser" 132FILES_util-linux-runuser = "${sbindir}/runuser"
136FILES_util-linux-prlimit = "${bindir}/prlimit" 133FILES_util-linux-prlimit = "${bindir}/prlimit"
137FILES_util-linux-ionice = "${bindir}/ionice.${BPN}" 134FILES_util-linux-ionice = "${bindir}/ionice.${BPN}"
138FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*" 135FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*"
139FILES_util-linux-su = "${base_bindir}/su.${BPN} ${sysconfdir}/pam.d/su-l" 136FILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
140CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l" 137CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
141 138
142FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ 139FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
@@ -150,8 +147,6 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs"
150FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs" 147FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
151FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs" 148FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
152 149
153FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}"
154
155FILES_util-linux-unshare = "${bindir}/unshare.${BPN}" 150FILES_util-linux-unshare = "${bindir}/unshare.${BPN}"
156 151
157# Util-linux' blkid replaces the e2fsprogs one 152# Util-linux' blkid replaces the e2fsprogs one
@@ -161,8 +156,9 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
161RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" 156RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk"
162RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" 157RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}"
163 158
164RRECOMMENDS_${PN} = "util-linux-blkdiscard util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit util-linux-ionice" 159RRECOMMENDS_${PN} = "util-linux-blkdiscard util-linux-sfdisk util-linux-readprofile util-linux-mkfs util-linux-prlimit util-linux-ionice"
165RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root" 160RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root"
161RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint"
166 162
167RRECOMMENDS_${PN}_class-native = "" 163RRECOMMENDS_${PN}_class-native = ""
168RRECOMMENDS_${PN}_class-nativesdk = "" 164RRECOMMENDS_${PN}_class-nativesdk = ""
@@ -245,7 +241,6 @@ do_install_append_class-native () {
245ALTERNATIVE_PRIORITY = "80" 241ALTERNATIVE_PRIORITY = "80"
246 242
247ALTERNATIVE_${PN} = " \ 243ALTERNATIVE_${PN} = " \
248 dmesg kill more \
249 hexdump last lastb logger mesg renice wall \ 244 hexdump last lastb logger mesg renice wall \
250 setsid chrt flock utmpdump eject taskset fallocate \ 245 setsid chrt flock utmpdump eject taskset fallocate \
251 fsfreeze nsenter cal rev \ 246 fsfreeze nsenter cal rev \
@@ -296,13 +291,8 @@ ALTERNATIVE_util-linux-agetty = "getty"
296ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" 291ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
297ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" 292ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty"
298 293
299ALTERNATIVE_util-linux-mount = "mount"
300ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" 294ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount"
301
302ALTERNATIVE_${PN}-su = "su"
303ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" 295ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
304
305ALTERNATIVE_util-linux-umount = "umount"
306ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" 296ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
307 297
308ALTERNATIVE_util-linux-readprofile = "readprofile" 298ALTERNATIVE_util-linux-readprofile = "readprofile"
@@ -320,12 +310,10 @@ ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
320ALTERNATIVE_util-linux-rfkill = "rfkill" 310ALTERNATIVE_util-linux-rfkill = "rfkill"
321ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" 311ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill"
322 312
323ALTERNATIVE_util-linux-getopt = "getopt"
324ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" 313ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
325 314
326ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" 315ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
327 316
328ALTERNATIVE_util-linux-mountpoint = "mountpoint"
329ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" 317ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
330 318
331ALTERNATIVE_util-linux-unshare = "unshare" 319ALTERNATIVE_util-linux-unshare = "unshare"