diff options
author | André Draszik <andre.draszik@jci.com> | 2019-02-05 02:32:35 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-12 14:04:31 +0000 |
commit | 6b82821f8ad4bdac2523a382a33559804531f36c (patch) | |
tree | 3b1f3d0ba316a2033eff897e32338834c7856ba6 /meta/recipes-core/util-linux | |
parent | c1a24f2421b48673527fafbca07eaefbe89f769c (diff) | |
download | poky-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.inc | 32 |
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 | ||
31 | PACKAGES =+ "util-linux-blkdiscard util-linux-sfdisk \ | 31 | PACKAGES =+ "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" |
40 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" | 40 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" |
41 | PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" | 41 | PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}" |
42 | 42 | ||
43 | python util_linux_binpackages () { | 43 | python 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 | ||
123 | FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard" | 123 | FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard" |
124 | FILES_util-linux-sfdisk = "${sbindir}/sfdisk" | 124 | FILES_util-linux-sfdisk = "${sbindir}/sfdisk" |
125 | FILES_util-linux-mount = "${base_bindir}/mount.${BPN}" | ||
126 | FILES_util-linux-mcookie = "${bindir}/mcookie" | 125 | FILES_util-linux-mcookie = "${bindir}/mcookie" |
127 | FILES_util-linux-umount = "${base_bindir}/umount.${BPN}" | ||
128 | FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}" | 126 | FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}" |
129 | FILES_util-linux-uuidgen = "${bindir}/uuidgen" | 127 | FILES_util-linux-uuidgen = "${bindir}/uuidgen" |
130 | FILES_util-linux-uuidd = "${sbindir}/uuidd" | 128 | FILES_util-linux-uuidd = "${sbindir}/uuidd" |
131 | FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}" | 129 | FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}" |
132 | FILES_util-linux-partx = "${sbindir}/partx" | 130 | FILES_util-linux-partx = "${sbindir}/partx" |
133 | FILES_util-linux-findfs = "${sbindir}/findfs" | 131 | FILES_util-linux-findfs = "${sbindir}/findfs" |
134 | FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}" | ||
135 | FILES_util-linux-runuser = "${sbindir}/runuser" | 132 | FILES_util-linux-runuser = "${sbindir}/runuser" |
136 | FILES_util-linux-prlimit = "${bindir}/prlimit" | 133 | FILES_util-linux-prlimit = "${bindir}/prlimit" |
137 | FILES_util-linux-ionice = "${bindir}/ionice.${BPN}" | 134 | FILES_util-linux-ionice = "${bindir}/ionice.${BPN}" |
138 | FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*" | 135 | FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*" |
139 | FILES_util-linux-su = "${base_bindir}/su.${BPN} ${sysconfdir}/pam.d/su-l" | 136 | FILES_util-linux-su = "${sysconfdir}/pam.d/su-l" |
140 | CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l" | 137 | CONFFILES_util-linux-su = "${sysconfdir}/pam.d/su-l" |
141 | 138 | ||
142 | FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ | 139 | FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ |
@@ -150,8 +147,6 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs" | |||
150 | FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs" | 147 | FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs" |
151 | FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs" | 148 | FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs" |
152 | 149 | ||
153 | FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}" | ||
154 | |||
155 | FILES_util-linux-unshare = "${bindir}/unshare.${BPN}" | 150 | FILES_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" | |||
161 | RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" | 156 | RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" |
162 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" | 157 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" |
163 | 158 | ||
164 | RRECOMMENDS_${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" | 159 | RRECOMMENDS_${PN} = "util-linux-blkdiscard util-linux-sfdisk util-linux-readprofile util-linux-mkfs util-linux-prlimit util-linux-ionice" |
165 | RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root" | 160 | RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root" |
161 | RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint" | ||
166 | 162 | ||
167 | RRECOMMENDS_${PN}_class-native = "" | 163 | RRECOMMENDS_${PN}_class-native = "" |
168 | RRECOMMENDS_${PN}_class-nativesdk = "" | 164 | RRECOMMENDS_${PN}_class-nativesdk = "" |
@@ -245,7 +241,6 @@ do_install_append_class-native () { | |||
245 | ALTERNATIVE_PRIORITY = "80" | 241 | ALTERNATIVE_PRIORITY = "80" |
246 | 242 | ||
247 | ALTERNATIVE_${PN} = " \ | 243 | ALTERNATIVE_${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" | |||
296 | ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" | 291 | ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" |
297 | ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" | 292 | ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" |
298 | 293 | ||
299 | ALTERNATIVE_util-linux-mount = "mount" | ||
300 | ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" | 294 | ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" |
301 | |||
302 | ALTERNATIVE_${PN}-su = "su" | ||
303 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" | 295 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" |
304 | |||
305 | ALTERNATIVE_util-linux-umount = "umount" | ||
306 | ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" | 296 | ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" |
307 | 297 | ||
308 | ALTERNATIVE_util-linux-readprofile = "readprofile" | 298 | ALTERNATIVE_util-linux-readprofile = "readprofile" |
@@ -320,12 +310,10 @@ ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" | |||
320 | ALTERNATIVE_util-linux-rfkill = "rfkill" | 310 | ALTERNATIVE_util-linux-rfkill = "rfkill" |
321 | ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" | 311 | ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" |
322 | 312 | ||
323 | ALTERNATIVE_util-linux-getopt = "getopt" | ||
324 | ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" | 313 | ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" |
325 | 314 | ||
326 | ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" | 315 | ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" |
327 | 316 | ||
328 | ALTERNATIVE_util-linux-mountpoint = "mountpoint" | ||
329 | ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" | 317 | ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" |
330 | 318 | ||
331 | ALTERNATIVE_util-linux-unshare = "unshare" | 319 | ALTERNATIVE_util-linux-unshare = "unshare" |