summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2019-02-05 02:32:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-12 14:04:31 +0000
commitd11cbdf149cbfd273e76796a2444d4b9423c9ab0 (patch)
treed57484477f30bc6b5b7ca9a6e549937caac9742b
parent9ecdf9067503aa7576665fd83c9d132328af70dd (diff)
downloadpoky-d11cbdf149cbfd273e76796a2444d4b9423c9ab0.tar.gz
util-linux: one package per binary (pt 4: bindir)
Similar to the previous patch. Existing packages (and current dependency by main package): * ionice <- RRECOMMENDS * lsblk <- RDEPENDS * lscpu * mcookie * prlimit <- RRECOMMENDS * unshare * uuidgen New packages: * too many to list 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. Nevertheless, all existing packages have been added to RRECOMMENDS this time, even if they weren't in RDEPENDS / RRECOMMENDS before. Unfortunately, we need to add explicit ALTERNATIVE_LINK_NAME[] for a few cases, as previously they were implied using defaults by being specified in ALTERNATIVE_${PN}. We can't easily automate that using do_split_packages(), so we simply add them explicitly. [YOCTO #13058] (From OE-Core rev: 7b66185c447453640f26e2563e85b6422a3e6118) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc43
1 files changed, 17 insertions, 26 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 3b0598b708..5bc179e50b 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -28,12 +28,7 @@ MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
28SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ 28SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \
29 " 29 "
30 30
31PACKAGES =+ "util-linux-swaponoff \ 31PACKAGES =+ "util-linux-swaponoff"
32 util-linux-uuidgen util-linux-lscpu \
33 util-linux-mcookie \
34 util-linux-lsblk \
35 util-linux-prlimit \
36 util-linux-ionice util-linux-unshare"
37PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" 32PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
38 33
39python util_linux_binpackages () { 34python util_linux_binpackages () {
@@ -54,7 +49,7 @@ python util_linux_binpackages () {
54 description='${PN} %s', 49 description='${PN} %s',
55 hook=pkg_hook, extra_depends='', prepend=True) 50 hook=pkg_hook, extra_depends='', prepend=True)
56 51
57 for dir in [ '${sbindir}' ]: 52 for dir in [ '${sbindir}', '${bindir}' ]:
58 do_split_packages(d, root=dir, 53 do_split_packages(d, root=dir,
59 file_regex=r'(.*)', output_pattern='${PN}-%s', 54 file_regex=r'(.*)', output_pattern='${PN}-%s',
60 description='${PN} %s', 55 description='${PN} %s',
@@ -65,7 +60,7 @@ python util_linux_binpackages () {
65 # pointing to 60 # pointing to
66 extras = {} 61 extras = {}
67 dvar = d.getVar('PKGD') 62 dvar = d.getVar('PKGD')
68 for root in [ '${base_sbindir}', '${base_bindir}', '${sbindir}' ]: 63 for root in [ '${base_sbindir}', '${base_bindir}', '${sbindir}', '${bindir}' ]:
69 root = d.expand(root) 64 root = d.expand(root)
70 for walkroot, dirs, files in os.walk(dvar + root): 65 for walkroot, dirs, files in os.walk(dvar + root):
71 for f in files: 66 for f in files:
@@ -127,21 +122,12 @@ FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
127 122
128FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" 123FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
129 124
130FILES_util-linux-mcookie = "${bindir}/mcookie"
131FILES_util-linux-uuidgen = "${bindir}/uuidgen"
132FILES_util-linux-prlimit = "${bindir}/prlimit"
133FILES_util-linux-ionice = "${bindir}/ionice.${BPN}"
134FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*" 125FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*"
135FILES_util-linux-su = "${sysconfdir}/pam.d/su-l" 126FILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
136CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l" 127CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l"
137
138FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ 128FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
139 ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ 129 ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
140 ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" 130 ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
141FILES_util-linux-lsblk = "${bindir}/lsblk"
142FILES_util-linux-lscpu = "${bindir}/lscpu"
143
144FILES_util-linux-unshare = "${bindir}/unshare.${BPN}"
145 131
146# Util-linux' blkid replaces the e2fsprogs one 132# Util-linux' blkid replaces the e2fsprogs one
147RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" 133RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
@@ -150,7 +136,6 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
150RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" 136RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk"
151RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" 137RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}"
152 138
153RRECOMMENDS_${PN} = "util-linux-prlimit util-linux-ionice"
154RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root" 139RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root"
155RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint" 140RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint"
156 141
@@ -234,12 +219,6 @@ do_install_append_class-native () {
234 219
235ALTERNATIVE_PRIORITY = "80" 220ALTERNATIVE_PRIORITY = "80"
236 221
237ALTERNATIVE_${PN} = " \
238 hexdump last lastb logger mesg renice wall \
239 setsid chrt flock utmpdump eject taskset fallocate \
240 nsenter cal rev \
241"
242
243ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" 222ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
244ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" 223ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
245ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" 224ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
@@ -247,9 +226,23 @@ ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
247ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" 226ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
248ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" 227ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
249ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal" 228ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal"
229ALTERNATIVE_LINK_NAME[chrt] = "${bindir}/chrt"
250ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" 230ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
251ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate" 231ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate"
232ALTERNATIVE_LINK_NAME[flock] = "${bindir}/flock"
233ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump"
234ALTERNATIVE_${PN}-last = "last lastb"
235ALTERNATIVE_LINK_NAME[last] = "${bindir}/last"
236ALTERNATIVE_LINK_NAME[lastb] = "${bindir}/lastb"
237ALTERNATIVE_LINK_NAME[logger] = "${bindir}/logger"
238ALTERNATIVE_LINK_NAME[mesg] = "${bindir}/mesg"
239ALTERNATIVE_LINK_NAME[nsenter] = "${bindir}/nsenter"
240ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice"
252ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" 241ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev"
242ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid"
243ALTERNATIVE_LINK_NAME[taskset] = "${bindir}/taskset"
244ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump"
245ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall"
253ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze" 246ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze"
254ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" 247ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
255 248
@@ -308,10 +301,8 @@ ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
308 301
309ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" 302ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
310 303
311ALTERNATIVE_util-linux-unshare = "unshare"
312ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare" 304ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare"
313 305
314ALTERNATIVE_util-linux-ionice = "ionice"
315ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice" 306ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice"
316 307
317ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" 308ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"