lvm2: disable readline and interactive shell

remove support of interactive mode in /sbin/lvm

Benefits:
- drop dependency on readline and ncurses (-700kb if there are no other users of these libs)
- shrink the lvm binary itself (-260k)

Drawback:
- lose interactive shell:
lvm> vgchange -ay
  4 logical volume(s) in volume group "vg0" now active
lvm>

"lvm <subcommand> --params" and "<subcommand> --params" entry points are still available

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
This commit is contained in:
Maxim Storchak
2025-09-25 12:38:21 +03:00
committed by Daniel Golle
parent f576054742
commit 2a1e7734ed
+4 -2
View File
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=LVM2
PKG_VERSION:=2.03.33
PKG_VERSION_DM:=1.02.207
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2 \
@@ -68,7 +68,7 @@ define Package/lvm2/default
SUBMENU:=Disc
TITLE:=The Linux Logical Volume Manager
URL:=https://sourceware.org/lvm2/
DEPENDS:=+libreadline +libncurses +libaio
DEPENDS:=+libaio
endef
define Package/lvm2
@@ -104,6 +104,8 @@ CONFIGURE_ARGS += \
--with-default-run-dir=/var/run/lvm \
--with-default-locking-dir=/var/lock/lvm \
--without-libnvme \
--disable-readline \
--disable-libedit \
--$(if $(findstring selinux,$(BUILD_VARIANT)),en,dis)able-selinux
ifneq ($(shell /bin/sh -c "echo -n 'X'"),X)