fstrim: disable in Busybox, enable in util-linux

fstrim from util-linux gives more options, e.g. -a to trim all drives,
we also don't need fstrim in initramfs.

Thanks to koenkooi for the idea.
This commit is contained in:
kszaq 2018-01-04 19:19:44 +01:00
parent eba7740131
commit e6b4fa074b
4 changed files with 21 additions and 9 deletions

View File

@ -596,7 +596,7 @@ CONFIG_FEATURE_GPT_LABEL=y
# CONFIG_FREERAMDISK is not set
# CONFIG_FSCK_MINIX is not set
# CONFIG_FSFREEZE is not set
CONFIG_FSTRIM=y
# CONFIG_FSTRIM is not set
# CONFIG_GETOPT is not set
# CONFIG_FEATURE_GETOPT_LONG is not set
# CONFIG_HEXDUMP is not set

View File

@ -596,7 +596,7 @@ CONFIG_FLOCK=y
# CONFIG_FREERAMDISK is not set
# CONFIG_FSCK_MINIX is not set
# CONFIG_FSFREEZE is not set
CONFIG_FSTRIM=y
# CONFIG_FSTRIM is not set
CONFIG_GETOPT=y
CONFIG_FEATURE_GETOPT_LONG=y
CONFIG_HEXDUMP=y

View File

@ -68,6 +68,7 @@ PKG_CONFIGURE_OPTS_TARGET="$UTILLINUX_CONFIG_DEFAULT \
--enable-libsmartcols \
--enable-losetup \
--enable-fsck \
--enable-fstrim \
--enable-blkid"
if [ "$SWAP_SUPPORT" = "yes" ]; then

View File

@ -1,7 +1,8 @@
diff -Naur a/configure.ac b/configure.ac
--- a/configure.ac 2017-10-03 08:53:23.956354391 -0700
+++ b/configure.ac 2017-10-09 16:39:14.213671977 -0700
@@ -1156,7 +1156,11 @@
diff --git a/configure.ac b/configure.ac
index 1899ec3..e4be942 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1156,7 +1156,11 @@ AS_IF([test "x$build_uuidd" = xyes || test "x$enable_libuuid_force_uuidd" == xye
AM_CONDITIONAL([BUILD_UUIDD], [test "x$build_uuidd" = xyes])
@ -14,7 +15,7 @@ diff -Naur a/configure.ac b/configure.ac
UL_REQUIRES_BUILD([uuidgen], [libuuid])
AM_CONDITIONAL([BUILD_UUIDGEN], [test "x$build_uuidgen" = xyes])
@@ -1165,7 +1169,11 @@
@@ -1165,7 +1169,11 @@ UL_REQUIRES_BUILD([uuidparse], [libuuid])
UL_REQUIRES_BUILD([uuidparse], [libsmartcols])
AM_CONDITIONAL([BUILD_UUIDPARSE], [test "x$build_uuidparse" = xyes])
@ -27,7 +28,7 @@ diff -Naur a/configure.ac b/configure.ac
UL_REQUIRES_BUILD([blkid], [libblkid])
AM_CONDITIONAL([BUILD_BLKID], [test "x$build_blkid" = xyes])
@@ -1403,7 +1411,11 @@
@@ -1403,20 +1411,32 @@ UL_REQUIRES_HAVE([hwclock], [io, linuxdummy], [ioperm iopl function or Linux])
AM_CONDITIONAL([BUILD_HWCLOCK], [test "x$build_hwclock" = xyes])
@ -40,7 +41,17 @@ diff -Naur a/configure.ac b/configure.ac
AM_CONDITIONAL([BUILD_MKFS], [test "x$build_mkfs" = xyes])
UL_BUILD_INIT([isosize], [yes])
@@ -1416,7 +1428,11 @@
AM_CONDITIONAL([BUILD_ISOSIZE], [test "x$build_isosize" = xyes])
-UL_BUILD_INIT([fstrim], [check])
+AC_ARG_ENABLE([fstrim],
+ AS_HELP_STRING([--disable-fstrim], [do not build fstrim(8)]),
+ [], [UL_DEFAULT_ENABLE([fstrim], [check])]
+)
+UL_BUILD_INIT([fstrim])
UL_REQUIRES_LINUX([fstrim])
UL_REQUIRES_BUILD([fstrim], [libmount])
AM_CONDITIONAL([BUILD_FSTRIM], [test "x$build_fstrim" = xyes])