[packages/util-linux] rel 2; fix lastlog2-import.service mv path, pin autodetected deps

arekm arekm at pld-linux.org
Sun Aug 23 11:40:35 CEST 2026


commit c67b16ab7e1e9d0b2341acbab75e5b75d835897e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Aug 23 03:40:23 2026 +0200

    rel 2; fix lastlog2-import.service mv path, pin autodetected deps

 util-linux-man-asciidoctor.patch | 11 +++++-
 util-linux.spec                  | 78 ++++++++++++++++++++++++++++++++++------
 2 files changed, 78 insertions(+), 11 deletions(-)
---
diff --git a/util-linux.spec b/util-linux.spec
index eee2fd2..89c1c6c 100644
--- a/util-linux.spec
+++ b/util-linux.spec
@@ -33,10 +33,10 @@ Summary(tr.UTF-8):	Temel sistem araçları
 Summary(uk.UTF-8):	Набір базових системних утиліт для Linux
 Name:		util-linux
 Version:	2.42.2
-Release:	1
+Release:	2
 License:	GPL v2+, GPL v3 (hwclock)
 Group:		Applications/System
-# https://github.com/karelzak/util-linux (GitHub backup)
+# https://github.com/util-linux/util-linux (GitHub backup)
 Source0:	https://www.kernel.org/pub/linux/utils/util-linux/v2.42/%{name}-%{version}.tar.xz
 # Source0-md5:	1d70131b70abda3dec3b37e282a20c96
 Source1:	%{name}-non-english-man-pages.tar.bz2
@@ -55,7 +55,7 @@ Patch1:		%{name}-fhs.patch
 Patch2:		%{name}-login-lastlog.patch
 Patch6:		%{name}-diet.patch
 Patch7:		%{name}-man-asciidoctor.patch
-URL:		https://github.com/karelzak/util-linux
+URL:		https://github.com/util-linux/util-linux
 BuildRequires:	audit-libs-devel >= 1.0.6
 BuildRequires:	autoconf >= 2.64
 BuildRequires:	automake >= 1:1.10
@@ -71,6 +71,8 @@ BuildRequires:	gtk-doc >= 1.10
 BuildRequires:	gtk-doc-automake >= 1.10
 %endif
 BuildRequires:	libcap-ng-devel
+# for more binary-file detection
+BuildRequires:	libmagic-devel
 %ifarch ppc ppc64
 # for lscpu
 BuildRequires:	librtas-devel
@@ -218,6 +220,7 @@ License:	GPL v2+
 Group:		Applications/System
 Requires(post,preun):	/sbin/chkconfig
 Requires(post,preun,postun):	systemd-units >= 38
+Requires:	awk
 Requires:	coreutils
 Requires:	rc-scripts >= 0.4.3.0
 Requires:	systemd-units >= 38
@@ -569,9 +572,9 @@ Requires(pre):	/usr/sbin/groupadd
 Requires(pre):	/usr/sbin/groupmod
 Requires(pre):	/usr/sbin/useradd
 Requires(pre):	/usr/sbin/usermod
-Requires(post,preun,postun):	systemd-units >= 38
+%{?with_systemd:Requires(post,preun,postun):	systemd-units >= 38}
 Requires:	libuuid%{?_isa} = %{version}-%{release}
-Requires:	systemd-units >= 38
+%{?with_systemd:Requires:	systemd-units >= 38}
 Provides:	group(uuidd)
 Provides:	user(uuidd)
 Conflicts:	libuuid < 1.40.5-0.1
@@ -723,7 +726,7 @@ Sprawdzanie i naprawa linuksowego systemu plików.
 %package -n libsmartcols
 Summary:	Library to handle tables and trees
 Summary(pl.UTF-8):	Biblioteka do obsługi tabelek i drzewek
-License:	LGPL v2+
+License:	LGPL v2.1+
 Group:		Libraries
 
 %description -n libsmartcols
@@ -735,7 +738,7 @@ Biblioteka do obsługi tabelek i drzewek.
 %package -n libsmartcols-devel
 Summary:	Header files for smartcols library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki smartcols
-License:	LGPL v2+
+License:	LGPL v2.1+
 Group:		Development/Libraries
 Requires:	libsmartcols%{?_isa} = %{version}-%{release}
 
@@ -748,7 +751,7 @@ Pliki nagłówkowe biblioteki smartcols.
 %package -n libsmartcols-static
 Summary:	Static version of smartcols library
 Summary(pl.UTF-8):	Statyczna wersja biblioteki smartcols
-License:	LGPL v2+
+License:	LGPL v2.1+
 Group:		Development/Libraries
 Requires:	libsmartcols-devel%{?_isa} = %{version}-%{release}
 
@@ -774,7 +777,9 @@ Dokumentacja API libsmartcols.
 %package -n lastlog2
 Summary:	Y2038 safe version of lastlog
 Summary(pl.UTF-8):	Wersja usługi lastlog bezpieczna pod kątem Y2038
+License:	BSD
 Group:		Libraries
+Requires(post,postun):	/sbin/ldconfig
 
 %description -n lastlog2
 The standard /var/log/lastlog implementation using lastlog.h from
@@ -829,6 +834,7 @@ lastlog2 próbuje rozwiązać te problemy:
 %package -n lastlog2-devel
 Summary:	Header files for lastlog2 library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki lastlog2
+License:	BSD
 Group:		Development/Libraries
 Requires:	lastlog2%{?_isa} = %{version}-%{release}
 
@@ -841,6 +847,7 @@ Pliki nagłówkowe biblioteki lastlog2.
 %package -n lastlog2-static
 Summary:	Static lastlog2 library
 Summary(pl.UTF-8):	Statyczna biblioteka lastlog2
+License:	BSD
 Group:		Development/Libraries
 Requires:	lastlog2-devel%{?_isa} = %{version}-%{release}
 
@@ -853,6 +860,7 @@ Statyczna biblioteka lastlog2.
 %package -n pam-pam_lastlog2
 Summary:	PAM module to display date of last login
 Summary(pl.UTF-8):	Moduł PAM do wyświetlania daty ostatniego logowania
+License:	BSD
 Group:		Base
 Requires:	lastlog2%{?_isa} = %{version}-%{release}
 
@@ -1050,6 +1058,7 @@ export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses -DHAVE_LSEEK64_PROTOTYPE
 	--with-selinux%{!?with_selinux:=no} \
 	--with-smack \
 	--with-readline \
+	--without-econf \
 	%{!?with_systemd:--without-systemd}
 
 %{__make} \
@@ -1141,6 +1150,10 @@ install -d $RPM_BUILD_ROOT/var/lib/lastlog
 :> $RPM_BUILD_ROOT/var/lib/lastlog/lastlog2.db
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblastlog2.la
 %{__rm} $RPM_BUILD_ROOT/%{_lib}/security/pam_lastlog2.la
+%if %{with systemd}
+# upstream assumes /usr merge, coreutils installs mv in /bin
+%{__sed} -i -e 's,%{_bindir}/mv,/bin/mv,' $RPM_BUILD_ROOT%{systemdunitdir}/lastlog2-import.service
+%endif
 %endif
 
 %if %{with initrd}
@@ -1163,6 +1176,17 @@ cp -a initrd/%{_lib}/lib*.a $RPM_BUILD_ROOT%{dietlibdir}
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with systemd}
+%post
+%systemd_post fstrim.service fstrim.timer
+
+%preun
+%systemd_preun fstrim.service fstrim.timer
+
+%postun
+%systemd_reload
+%endif
+
 %post -n blockdev
 /sbin/chkconfig --add blockdev
 %service blockdev restart
@@ -1197,11 +1221,22 @@ if [ "$(id -u libuuid 2>/dev/null)" = "222" ]; then
 fi
 %useradd -u 222 -r -d /var/lib/libuuid -s /bin/false -c "UUID generator helper daemon" -g uuidd uuidd
 
+%if %{with systemd}
+%post -n uuidd
+%systemd_post uuidd.service uuidd.socket
+
+%preun -n uuidd
+%systemd_preun uuidd.service uuidd.socket
+%endif
+
 %postun -n uuidd
 if [ "$1" = "0" ]; then
 	%userremove uuidd
 	%groupremove uuidd
 fi
+%if %{with systemd}
+%systemd_reload
+%endif
 
 %post	-n libfdisk -p /sbin/ldconfig
 %postun -n libfdisk -p /sbin/ldconfig
@@ -1212,8 +1247,24 @@ fi
 %post	-n libsmartcols -p /sbin/ldconfig
 %postun -n libsmartcols -p /sbin/ldconfig
 
-%post	-n lastlog2 -p /sbin/ldconfig
-%postun -n lastlog2 -p /sbin/ldconfig
+%if %{with lastlog2}
+%post -n lastlog2
+/sbin/ldconfig
+%if %{with systemd}
+%systemd_post lastlog2-import.service
+%endif
+
+%if %{with systemd}
+%preun -n lastlog2
+%systemd_preun lastlog2-import.service
+%endif
+
+%postun -n lastlog2
+/sbin/ldconfig
+%if %{with systemd}
+%systemd_reload
+%endif
+%endif
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
@@ -1728,6 +1779,7 @@ fi
 %lang(de) %{_mandir}/de/man1/lsclocks.1*
 %lang(pl) %{_mandir}/pl/man1/lsclocks.1*
 %lang(ro) %{_mandir}/ro/man1/lsclocks.1*
+%lang(sr) %{_mandir}/sr/man1/lsclocks.1*
 %lang(sv) %{_mandir}/sv/man1/lsclocks.1*
 %lang(uk) %{_mandir}/uk/man1/lsclocks.1*
 
@@ -2969,6 +3021,7 @@ fi
 %{_gtkdocdir}/libsmartcols
 %endif
 
+%if %{with lastlog2}
 %files -n lastlog2
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/lastlog2
@@ -3017,6 +3070,7 @@ fi
 %lang(ro) %{_mandir}/ro/man8/pam_lastlog2.8*
 %lang(sr) %{_mandir}/sr/man8/pam_lastlog2.8*
 %lang(sv) %{_mandir}/sv/man8/pam_lastlog2.8*
+%endif
 
 %if %{with initrd}
 %files initrd
@@ -3135,7 +3189,9 @@ fi
 %{bash_compdir}/rev
 %{bash_compdir}/rfkill
 %{bash_compdir}/rtcwake
+%if %{with su}
 %{bash_compdir}/runuser
+%endif
 %{bash_compdir}/script
 %{bash_compdir}/scriptlive
 %{bash_compdir}/scriptreplay
@@ -3145,7 +3201,9 @@ fi
 %{bash_compdir}/setsid
 %{bash_compdir}/setterm
 %{bash_compdir}/sfdisk
+%if %{with su}
 %{bash_compdir}/su
+%endif
 %{bash_compdir}/swaplabel
 %{bash_compdir}/swapoff
 %{bash_compdir}/swapon
diff --git a/util-linux-man-asciidoctor.patch b/util-linux-man-asciidoctor.patch
index e6f033e..1b772c2 100644
--- a/util-linux-man-asciidoctor.patch
+++ b/util-linux-man-asciidoctor.patch
@@ -1,5 +1,5 @@
 asciidoctor generates wrong filenames if command is not separated by exactly " - ".
-Also, fix command name in fr/chfn and sr/mkfs.cramfs man page.
+Also, fix mistyped command names, which land the page under the wrong file name.
 
 --- util-linux-2.38/po-man/sr.po.orig	2022-05-06 12:39:42.133120252 +0200
 +++ util-linux-2.38/po-man/sr.po	2022-05-06 22:30:15.634493835 +0200
@@ -12,6 +12,15 @@ Also, fix command name in fr/chfn and sr/mkfs.cramfs man page.
  
  #. type: Plain text
  #: ../misc-utils/cal.1.adoc:56
+@@ -23367,7 +23367,7 @@ msgstr "lsclocks(1)"
+ #. type: Plain text
+ #: ../misc-utils/lsclocks.1.adoc:13
+ msgid "lsclocks - display system clocks"
+-msgstr "lslocks - приказује сатове система"
++msgstr "lsclocks - приказује сатове система"
+ 
+ #. type: Plain text
+ #: ../misc-utils/lsclocks.1.adoc:17
 --- util-linux-2.39.1/po-man/uk.po.orig	2022-08-04 10:48:12.614128571 +0200
 +++ util-linux-2.39.1/po-man/uk.po	2022-08-20 18:19:04.794914158 +0200
 @@ -3620,7 +3620,7 @@ msgstr "fsck.cramfs(8)"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/util-linux.git/commitdiff/c67b16ab7e1e9d0b2341acbab75e5b75d835897e



More information about the pld-cvs-commit mailing list