apk: update to latest HEAD 2024-05-18
[openwrt/openwrt.git] / package / utils / util-linux / Makefile
index e61e501762d99992d094b1368210627195dbf2e9..ec6925f0ea9c0dcfa62a6386b7bc959a28c204ee 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=util-linux
-PKG_VERSION:=2.34
+PKG_VERSION:=2.39.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.34
-PKG_HASH:=743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5
+PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.39
+PKG_HASH:=7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f
 PKG_CPE_ID:=cpe:/a:kernel:util-linux
 
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=    COPYING                                 \
                        libblkid/COPYING                        \
                        libmount/COPYING                        \
@@ -25,14 +25,10 @@ PKG_LICENSE_FILES:= COPYING                                 \
                        libuuid/COPYING                         \
                        Documentation/licenses/COPYING.BSD-3
 
-PKG_BUILD_PARALLEL:=1
-
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
-DISABLE_NLS:=--disable-nls
-
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/meson.mk
 
 define Package/util-linux/Default
   SECTION:=utils
@@ -126,6 +122,7 @@ define Package/blkdiscard
 $(call Package/util-linux/Default)
   TITLE:=discard sectors on a device
   SUBMENU=Disc
+  DEPENDS:=libblkid
 endef
 
 define Package/blkdiscard/description
@@ -177,6 +174,17 @@ define Package/cfdisk/description
  cfdisk is a curses-based program for partitioning any hard disk drive
 endef
 
+define Package/colrm
+$(call Package/util-linux/Default)
+  TITLE:=colrm removes selected columns from a file
+  DEPENDS:=
+endef
+
+define Package/colrm/description
+ colrm removes selected columns from a file. Input is taken from
+ standard input. Output is sent to standard output.
+endef
+
 define Package/dmesg
 $(call Package/util-linux/Default)
   TITLE:=print or control the kernel ring buffer
@@ -264,9 +272,22 @@ 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
+  ALTERNATIVES:=200:/usr/bin/logger:/usr/bin/util-linux-logger
 endef
 
 define Package/logger/description
@@ -315,6 +336,26 @@ 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/lsns
+$(call Package/util-linux/Default)
+  TITLE:=list system namespaces
+  DEPENDS:= +libblkid +libmount +libsmartcols
+endef
+
+define Package/lsns/description
+ lsns lists information about all namespaces and their processes
+endef
+
 define Package/more
 $(call Package/util-linux/Default)
   TITLE:=filter for paging through text one screenful at a time
@@ -385,6 +426,17 @@ define Package/rename/description
  expression in their name by replacement
 endef
 
+define Package/rev
+$(call Package/util-linux/Default)
+  TITLE:=Reverse lines characterwise
+endef
+
+define Package/rev/description
+ rev utility copies the specified files to the standard output, reversing the
+ order of characters in every line. If no files are specified, the standard
+ input is read.
+endef
+
 define Package/partx-utils
 $(call Package/util-linux/Default)
   TITLE:=inform kernel about the presence and numbering of on-disk partitions
@@ -441,6 +493,16 @@ 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
+  ALTERNATIVES:=200:/usr/bin/taskset:/usr/bin/util-linux-taskset
+endef
+
+define Package/taskset/description
+ contains: taskset
+endef
+
 define Package/unshare
 $(call Package/util-linux/Default)
   TITLE:=unshare userspace tool
@@ -509,18 +571,61 @@ define Package/wipefs/description
  libblkid.
 endef
 
-CONFIGURE_ARGS += \
-       --disable-use-tty-group         \
-       --disable-rpath                 \
-       --disable-tls                   \
-       --disable-sulogin               \
-       --disable-makeinstall-chown     \
-       --without-python                \
-       --without-udev                  \
-       --without-readline              \
-       --with-ncursesw
-
-TARGET_CFLAGS += $(FPIC) -std=gnu99
+MESON_ARGS += \
+       -Dsystemd=disabled \
+       -Dtinfo=disabled \
+       -Dcryptsetup=disabled \
+       -Dlibutil=disabled \
+       -Dlibutempter=disabled \
+       -Dlibpcre2-posix=disabled \
+       -Dlibuser=disabled \
+       -Duse-tty-group=false \
+       -Duse-tls=false \
+       -Dbuild-python=disabled \
+       -Dbuild-zramctl=disabled \
+       -Dbuild-fsck=disabled \
+       -Dbuild-wipefs=disabled \
+       -Dbuild-fallocate=disabled \
+       -Dbuild-setpriv=disabled \
+       -Dbuild-hardlink=disabled \
+       -Dbuild-cramfs=disabled \
+       -Dbuild-bfs=disabled \
+       -Dbuild-minix=disabled \
+       -Dbuild-fdformat=disabled \
+       -Dbuild-lslogins=disabled \
+       -Dbuild-wdctl=disabled \
+       -Dbuild-cal=disabled \
+       -Dbuild-switch_root=disabled \
+       -Dbuild-pivot_root=disabled \
+       -Dbuild-lsmem=disabled \
+       -Dbuild-lsirq=disabled \
+       -Dbuild-irqtop=disabled \
+       -Dbuild-chmem=disabled \
+       -Dbuild-ipcrm=disabled \
+       -Dbuild-rfkill=disabled \
+       -Dbuild-tunelp=disabled \
+       -Dbuild-kill=disabled \
+       -Dbuild-last=disabled \
+       -Dbuild-utmpdump=disabled \
+       -Dbuild-line=disabled \
+       -Dbuild-mesg=disabled \
+       -Dbuild-raw=disabled \
+       -Dbuild-vipw=disabled \
+       -Dbuild-newgrp=disabled \
+       -Dbuild-chfn-chsh=disabled \
+       -Dbuild-login=disabled \
+       -Dbuild-nologin=disabled \
+       -Dbuild-sulogin=disabled \
+       -Dbuild-su=disabled \
+       -Dbuild-runuser=disabled \
+       -Dbuild-ul=disabled \
+       -Dbuild-pg=disabled \
+       -Dbuild-write=disabled \
+       -Dbuild-bash-completion=disabled \
+       -Dbuild-pylibmount=disabled \
+       -Dreadline=disabled \
+       -Dmagic=disabled \
+       -Dncursesw=enabled
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
@@ -542,43 +647,37 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols
 
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib
-
-       $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
-       $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
-       $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
-       $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
-       $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so* $(1)/usr/lib
 endef
 
 
 define Package/libfdisk/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so.* $(1)/usr/lib/
 endef
 
 define Package/libblkid/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
 endef
 
 define Package/libmount/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so.* $(1)/usr/lib/
 endef
 
 define Package/libsmartcols/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so.* $(1)/usr/lib/
 endef
 
 define Package/libuuid/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
 endef
 
 define Package/agetty/install
@@ -611,6 +710,11 @@ define Package/cfdisk/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cfdisk $(1)/usr/sbin/
 endef
 
+define Package/colrm/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/colrm $(1)/usr/bin/
+endef
+
 define Package/dmesg/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmesg $(1)/usr/bin/
@@ -651,9 +755,14 @@ 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/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/logger $(1)/usr/bin/util-linux-logger
 endef
 
 define Package/look/install
@@ -676,6 +785,16 @@ 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/lsns/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsns $(1)/usr/bin/
+endef
+
 define Package/more/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/more $(1)/usr/bin/
@@ -713,6 +832,11 @@ define Package/rename/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rename $(1)/usr/bin/
 endef
 
+define Package/rev/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rev $(1)/usr/bin/
+endef
+
 define Package/partx-utils/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partx $(1)/usr/sbin/
@@ -742,6 +866,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/util-linux-taskset
+endef
+
 define Package/unshare/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/unshare $(1)/usr/bin/
@@ -772,17 +901,20 @@ define Package/wipefs/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/wipefs $(1)/usr/sbin/
 endef
 
+# these lines need to be ordered by dependency because of ABI versioning
+$(eval $(call BuildPackage,libuuid))
 $(eval $(call BuildPackage,libblkid))
 $(eval $(call BuildPackage,libfdisk))
+
 $(eval $(call BuildPackage,libmount))
 $(eval $(call BuildPackage,libsmartcols))
-$(eval $(call BuildPackage,libuuid))
 $(eval $(call BuildPackage,agetty))
 $(eval $(call BuildPackage,blkdiscard))
 $(eval $(call BuildPackage,blkid))
 $(eval $(call BuildPackage,blockdev))
 $(eval $(call BuildPackage,cal))
 $(eval $(call BuildPackage,cfdisk))
+$(eval $(call BuildPackage,colrm))
 $(eval $(call BuildPackage,dmesg))
 $(eval $(call BuildPackage,eject))
 $(eval $(call BuildPackage,fdisk))
@@ -791,11 +923,14 @@ $(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,lsns))
 $(eval $(call BuildPackage,more))
 $(eval $(call BuildPackage,mcookie))
 $(eval $(call BuildPackage,mount-utils))
@@ -803,11 +938,13 @@ $(eval $(call BuildPackage,namei))
 $(eval $(call BuildPackage,nsenter))
 $(eval $(call BuildPackage,prlimit))
 $(eval $(call BuildPackage,rename))
+$(eval $(call BuildPackage,rev))
 $(eval $(call BuildPackage,partx-utils))
 $(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))