From a19b93409bbcd096b22222866cd00bfa12a2ad9a Mon Sep 17 00:00:00 2001 From: Beginner <70857188+Beginner-Go@users.noreply.github.com> Date: Sun, 27 Feb 2022 01:35:53 +0800 Subject: [PATCH] util-linux: sync upstream (#8953) * util-linux: Add taskset This adds the taskset application from util Linux. It is already built, but not packaged yet. Signed-off-by: Hauke Mehrtens * util-linux: add lslocks This change adds the "lslocks" utility from util-linux. Signed-off-by: Roman Azarenko * util-linux: Do not build raw any more. The man page of the raw tool does not build because the disk-utils/raw.8 file is missing. It looks like it should be in the tar.xz file we download, but it is missing. We do not package the raw tool, so this is not a problem. This fixes the following build error: No rule to make target 'disk-utils/raw.8', needed by 'all-am'. Stop. Signed-off-by: Hauke Mehrtens * util-linux: Update to version 2.37.3 This release fixes two security mount(8) and umount(8) issues: CVE-2021-3996 Improper UID check in libmount allows an unprivileged user to unmount FUSE filesystems of users with similar UID. CVE-2021-3995 This issue is related to parsing the /proc/self/mountinfo file allows an unprivileged user to unmount other user's filesystems that are either world-writable themselves or mounted in a world-writable directory. Signed-off-by: Hauke Mehrtens * util-linux: package ipcs command Add a package for util-linux' ipcs command, to show information about System V inter-process communication facilities. Signed-off-by: Stijn Tintel Co-authored-by: Hauke Mehrtens Co-authored-by: Roman Azarenko Co-authored-by: Hauke Mehrtens Co-authored-by: Stijn Tintel --- package/utils/util-linux/Makefile | 54 +++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 74f3f1746..ce3cd171e 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.37 +PKG_VERSION:=2.37.3 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.37 -PKG_HASH:=bd07b7e98839e0359842110525a3032fdb8eaf3a90bedde3dd1652d32d15cce5 +PKG_HASH:=590c592e58cd6bf38519cb467af05ce6a1ab18040e3e3418f24bcfb2f55f9776 PKG_CPE_ID:=cpe:/a:kernel:util-linux PKG_LICENSE:=GPL-2.0-only @@ -265,6 +265,18 @@ define Package/hwclock/description hwclock is a tool for accessing the Hardware Clock endef +define Package/ipcs +$(call Package/util-linux/Default) + TITLE:=show information on IPC facilities +endef + +define Package/ipcs/description + ipcs shows information on the inter-process communication facilities for + which the calling process has read access. By default it shows information + about all three resources: shared memory segments, message queues, and + semaphore arrays. +endef + define Package/logger $(call Package/util-linux/Default) TITLE:=a shell command interface to the syslog system log module @@ -317,6 +329,16 @@ define Package/lscpu/description lscpu displays information about the CPU architecture endef +define Package/lslocks +$(call Package/util-linux/Default) + TITLE:=list local system locks + DEPENDS:= +libmount +libsmartcols +endef + +define Package/lslocks/description + lslocks lists information about all the currently held file locks in a Linux system +endef + define Package/more $(call Package/util-linux/Default) TITLE:=filter for paging through text one screenful at a time @@ -443,6 +465,15 @@ define Package/swap-utils/description contains: mkswap, swaplabel endef +define Package/taskset +$(call Package/util-linux/Default) + TITLE:=set or retrieve a process's CPU affinity +endef + +define Package/taskset/description + contains: taskset +endef + define Package/unshare $(call Package/util-linux/Default) TITLE:=unshare userspace tool @@ -523,6 +554,7 @@ CONFIGURE_ARGS += \ --disable-lslogins \ --disable-runuser \ --disable-chfn-chsh \ + --disable-raw \ --without-python \ --without-udev \ --without-readline \ @@ -670,6 +702,11 @@ define Package/hwclock/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hwclock $(1)/usr/sbin/ endef +define Package/ipcs/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ipcs $(1)/usr/bin/ +endef + define Package/logger/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/logger $(1)/usr/bin/util-linux-logger @@ -695,6 +732,11 @@ define Package/lscpu/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lscpu $(1)/usr/bin/ endef +define Package/lslocks/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lslocks $(1)/usr/bin/ +endef + define Package/more/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/more $(1)/usr/bin/ @@ -761,6 +803,11 @@ define Package/swap-utils/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swaplabel $(1)/usr/sbin/ endef +define Package/taskset/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/taskset $(1)/usr/bin/ +endef + define Package/unshare/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/unshare $(1)/usr/bin/ @@ -812,11 +859,13 @@ $(eval $(call BuildPackage,flock)) $(eval $(call BuildPackage,fstrim)) $(eval $(call BuildPackage,getopt)) $(eval $(call BuildPackage,hwclock)) +$(eval $(call BuildPackage,ipcs)) $(eval $(call BuildPackage,logger)) $(eval $(call BuildPackage,look)) $(eval $(call BuildPackage,losetup)) $(eval $(call BuildPackage,lsblk)) $(eval $(call BuildPackage,lscpu)) +$(eval $(call BuildPackage,lslocks)) $(eval $(call BuildPackage,more)) $(eval $(call BuildPackage,mcookie)) $(eval $(call BuildPackage,mount-utils)) @@ -829,6 +878,7 @@ $(eval $(call BuildPackage,script-utils)) $(eval $(call BuildPackage,setterm)) $(eval $(call BuildPackage,sfdisk)) $(eval $(call BuildPackage,swap-utils)) +$(eval $(call BuildPackage,taskset)) $(eval $(call BuildPackage,unshare)) $(eval $(call BuildPackage,uuidd)) $(eval $(call BuildPackage,uuidgen))