Skip to contentSkip to conversation

util-linux: make blkdiscard a separate package

PATCH In review Stefan Agner 3 participants 4 messages Mar 28, 2017 – Mar 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 util-linux: make blkdiscard a separate package

From: Stefan Agner <[email protected]>

Busybox doesn't provide a similar tool so having it in a separate package allows to use it in addition to busybox without having to include all of util-linux.

Before it was part of the top level util-linux package. Now it is a separate package util-linux-blkdiscard but the top level package still RRECOMMENDS it so for most users nothing should change.

---
 meta/recipes-core/util-linux/util-linux.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +5 -3
index 63302a9..c07417f 100644
@@ -30,8 +30,8 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-swaponoff util-linux-losetup util-linux-umount \
              util-linux-mount util-linux-readprofile util-linux-uuidd \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs util-linux-fsck \
-             util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \
-             util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
+             util-linux-blkdiscard util-linux-blkid util-linux-mkfs util-linux-mcookie \
+             util-linux-reset util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
              util-linux-partx util-linux-hwclock util-linux-mountpoint \
              util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
@@ -112,6 +112,8 @@ FILES_util-linux-blkid = "${base_sbindir}/blkid*"
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
 RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 
+FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard"
+
 # reset calls 'tput'
 RDEPENDS_util-linux-reset += "ncurses"
 
@@ -120,7 +122,7 @@ RDEPENDS_util-linux-runuser += "libpam"
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk"
 RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
 
-RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit"
+RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit util-linux-blkdiscard"
 
 RRECOMMENDS_${PN}_class-native = ""
 RRECOMMENDS_${PN}_class-nativesdk = ""
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines · Stefan Agner
(quoted diff) +0 -0
@@ -30,8 +30,8 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk

util-linux-cfdisk util-linux-sfd

              util-linux-swaponoff util-linux-losetup util-linux-umount \
              util-linux-mount util-linux-readprofile util-linux-uuidd \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs

util-linux-fsck \
- util-linux-blkid util-linux-mkfs util-linux-mcookie
util-linux-reset \

(quoted diff) +1 -1
-             util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
+             util-linux-blkdiscard util-linux-blkid util-linux-mkfs
Quoted 7 lines

util-linux-mcookie \
+ util-linux-reset util-linux-lsblk util-linux-mkfs.cramfs
util-linux-fstrim \
util-linux-partx util-linux-hwclock util-linux-mountpoint \
util-linux-findfs util-linux-getopt util-linux-sulogin
util-linux-prlimit"

We're growing a lot of packages containing a single binary. Would it be sensible to group them into "file system tools", "process tools", etc?

Ross

#2 lore raw
Quoted 14 lines · Ross
Quoted 10 lines · Stefan Agner
meta/recipes-core/util-linux/util-linux.inc +2 -2
@@ -30,8 +30,8 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
 util-linux-swaponoff util-linux-losetup util-linux-umount \
 util-linux-mount util-linux-readprofile util-linux-uuidd \
 util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs util-linux-fsck \
-             util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \
-             util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
+             util-linux-blkdiscard util-linux-blkid util-linux-mkfs util-linux-mcookie \
+             util-linux-reset util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
 util-linux-partx util-linux-hwclock util-linux-mountpoint \

util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit"

We're growing a lot of packages containing a single binary. Would it be sensible to group them into "file system tools", "process tools", etc?

Not sure if such a high level grouping is helpful. Just because an image uses one fs utility, does not mean the others are used too. There might be some potential on a lower level (e.g. util-linux-mkfs.cramfs and util-linux-fsck.cramfs).

Is having lots of single binary packages an issue? I guess package management data adds some space overhead? In my case, I build a image without package metadata, so I guess there is no overhead for the final image (for the final image).

Best regards,

Stefan

#3 lore raw
Quoted 31 lines · Stefan Agner

On 2017-03-29 08:41, Burton, Ross wrote:

Quoted 10 lines · Stefan Agner
(quoted diff) +0 -0
@@ -30,8 +30,8 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk

util-linux-cfdisk util-linux-sfd

              util-linux-swaponoff util-linux-losetup util-linux-umount \
              util-linux-mount util-linux-readprofile util-linux-uuidd \
              util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs

util-linux-fsck \
- util-linux-blkid util-linux-mkfs util-linux-mcookie
util-linux-reset \

(quoted diff) +1 -1
-             util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
+             util-linux-blkdiscard util-linux-blkid util-linux-mkfs
Quoted 7 lines

util-linux-mcookie \
+ util-linux-reset util-linux-lsblk util-linux-mkfs.cramfs
util-linux-fstrim \
util-linux-partx util-linux-hwclock util-linux-mountpoint \
util-linux-findfs util-linux-getopt util-linux-sulogin
util-linux-prlimit"

We're growing a lot of packages containing a single binary. Would it be sensible to group them into "file system tools", "process tools", etc?

Not sure if such a high level grouping is helpful. Just because an image uses one fs utility, does not mean the others are used too. There might be some potential on a lower level (e.g. util-linux-mkfs.cramfs and util-linux-fsck.cramfs).

Quoted 5 lines

Is having lots of single binary packages an issue? I guess package management data adds some space overhead? In my case, I build a image without package metadata, so I guess there is no overhead for the final image (for the final image).

I have no hard data on this but we are struggling with oe-selftests taking too long (we're talking 4-10 hour runs and personally I think we should be running many more tests than we currently do).

The time it takes to boot an image and run the test won't be affected by this patch, but I'm guessing it does increase the packaging and rootfs generation time by a little bit. Multiply that by the number of images we build and add it to all the other "little bits" of time...

Would be nice to have some hard data on this though -- I don't really know if this is the place to optimize.

Jussi