From 2abaf6eb96a5184981f2c45403db41816398f5b6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 17 Aug 2021 10:43:34 +0200 Subject: [PATCH] 2.37.2-1: upgrade --- .gitignore | 1 + hardlink-remove-pcre2posix.h-support.patch | 49 ----------------- login-fix-close_range-use.patch | 62 ---------------------- sources | 2 +- util-linux.spec | 16 +++--- 5 files changed, 8 insertions(+), 122 deletions(-) delete mode 100644 hardlink-remove-pcre2posix.h-support.patch delete mode 100644 login-fix-close_range-use.patch diff --git a/.gitignore b/.gitignore index ab82158..720d157 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ /util-linux-2.36.2.tar.xz /util-linux-2.37-rc2.tar.xz /util-linux-2.37.tar.xz +/util-linux-2.37.2.tar.xz diff --git a/hardlink-remove-pcre2posix.h-support.patch b/hardlink-remove-pcre2posix.h-support.patch deleted file mode 100644 index 5c2368b..0000000 --- a/hardlink-remove-pcre2posix.h-support.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up util-linux-2.37/configure.ac.kzak util-linux-2.37/configure.ac ---- util-linux-2.37/configure.ac.kzak 2021-06-01 09:50:39.898388178 +0200 -+++ util-linux-2.37/configure.ac 2021-07-14 17:57:45.927112572 +0200 -@@ -1452,14 +1452,6 @@ UL_REQUIRES_HAVE([setpriv], [linux_capab - UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library]) - AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes]) - --PKG_CHECK_MODULES([PCRE2_POSIX], [libpcre2-posix], -- [have_pcre2_posix=yes], -- [have_pcre2_posix=no]) --AS_IF([test "x$have_pcre2_posix" = xyes ], [ -- AC_DEFINE([HAVE_PCRE2_POSIX], [1], [Define if libpcre2-posix is available]) --]) --AM_CONDITIONAL([HAVE_PCRE2_POSIX], [test "x$have_pcre2_posix" = xyes]) -- - AC_ARG_ENABLE([hardlink], - AS_HELP_STRING([--disable-hardlink], [do not build hardlink]), - [], [UL_DEFAULT_ENABLE([hardlink], [check])] -diff -up util-linux-2.37/misc-utils/hardlink.c.kzak util-linux-2.37/misc-utils/hardlink.c ---- util-linux-2.37/misc-utils/hardlink.c.kzak 2021-05-24 13:39:52.714045529 +0200 -+++ util-linux-2.37/misc-utils/hardlink.c 2021-07-14 17:57:51.910085213 +0200 -@@ -44,14 +44,7 @@ - #include "monotonic.h" - #include "optutils.h" - --/* Use libpcre2posix if it's available */ --#ifdef HAVE_PCRE2_POSIX --# include --# undef REG_NOSUB --# define REG_NOSUB 0 /* we do want backreferences in PCRE mode */ --#else --# include /* regcomp(), regsearch() */ --#endif -+#include /* regcomp(), regsearch() */ - - #ifdef HAVE_SYS_XATTR_H - # include /* listxattr, getxattr */ -diff -up util-linux-2.37/misc-utils/Makemodule.am.kzak util-linux-2.37/misc-utils/Makemodule.am ---- util-linux-2.37/misc-utils/Makemodule.am.kzak 2021-05-24 13:39:52.714045529 +0200 -+++ util-linux-2.37/misc-utils/Makemodule.am 2021-07-14 17:57:51.910085213 +0200 -@@ -244,8 +244,4 @@ dist_noinst_DATA += misc-utils/hardlink. - hardlink_SOURCES = misc-utils/hardlink.c lib/monotonic.c - hardlink_LDADD = $(LDADD) libcommon.la $(REALTIME_LIBS) - hardlink_CFLAGS = $(AM_CFLAGS) --if HAVE_PCRE2_POSIX --hardlink_LDADD += $(PCRE2_POSIX_LIBS) --hardlink_CFLAGS += $(PCRE2_POSIX_CFLAGS) --endif - endif diff --git a/login-fix-close_range-use.patch b/login-fix-close_range-use.patch deleted file mode 100644 index 6972c61..0000000 --- a/login-fix-close_range-use.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b8d99a618baffb4fc03cda4c40e29778b6d77ad4 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 14 Jul 2021 17:25:57 +0200 -Subject: [PATCH] login: fix close_range() use - -This new syscall comes with three arguments (see kernel commit -278a5fbaed89dacd04e9d052f4594ffd0e0585de). Not sure why util-linux -assume only two. - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1981729 -Signed-off-by: Karel Zak ---- - include/fileutils.h | 4 ++-- - lib/fileutils.c | 2 +- - login-utils/login.c | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/fileutils.h b/include/fileutils.h -index ad54b952c..f86426b96 100644 ---- a/include/fileutils.h -+++ b/include/fileutils.h -@@ -82,9 +82,9 @@ static inline struct dirent *xreaddir(DIR *dp) - # if defined(SYS_close_range) - # include - # ifndef HAVE_CLOSE_RANGE --static inline int close_range(unsigned int first, unsigned int last) -+static inline int close_range(unsigned int first, unsigned int last, int flags) - { -- return syscall(SYS_close_range, first, last); -+ return syscall(SYS_close_range, first, last, flags); - } - # endif - # define HAVE_CLOSE_RANGE 1 -diff --git a/lib/fileutils.c b/lib/fileutils.c -index 846b718c9..a979b03ac 100644 ---- a/lib/fileutils.c -+++ b/lib/fileutils.c -@@ -189,7 +189,7 @@ int main(int argc, char *argv[]) - ignore_result( dup(STDIN_FILENO) ); - - # ifdef HAVE_CLOSE_RANGE -- close_range(STDERR_FILENO + 1, ~0U); -+ close_range(STDERR_FILENO + 1, ~0U, 0); - # else - ul_close_all_fds(STDERR_FILENO + 1, ~0U); - # endif -diff --git a/login-utils/login.c b/login-utils/login.c -index 48e3fa2e2..d926466d3 100644 ---- a/login-utils/login.c -+++ b/login-utils/login.c -@@ -1357,7 +1357,7 @@ static void initialize(int argc, char **argv, struct login_context *cxt) - #endif - } - #ifdef HAVE_CLOSE_RANGE -- close_range(STDERR_FILENO + 1, ~0U); -+ close_range(STDERR_FILENO + 1, ~0U, 0); - #else - ul_close_all_fds(STDERR_FILENO + 1, ~0U); - #endif --- -2.31.1 - diff --git a/sources b/sources index 249ef34..92733ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (util-linux-2.37.tar.xz) = 84cf1df46165f286caa1a1204b335dc1fc826a8e1d52a817c28eb80ef19734eccd6efdfb078e87ade9e4381a9102e59d4df83e9bb100e4c73aff2aa4bfb85615 +SHA512 (util-linux-2.37.2.tar.xz) = 38f0fe820445e3bfa79550e6581c230f98c7661566ccc4daa51c7208a5f972c61b4e57dfc86bed074fdbc7c40bc79f856be8f6a05a8860c1c0cecc4208e8b81d diff --git a/util-linux.spec b/util-linux.spec index f663829..7b57def 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: Collection of basic system utilities Name: util-linux -Version: 2.37 -Release: 6%{?dist} +Version: 2.37.2 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -97,14 +97,6 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch -### Upstream patches (remove ./autogen.sh call from build section when remove -### these patches) -### -# 1981729 - close_range() -Patch2: login-fix-close_range-use.patch -# Remove dependence on POSIX PCRE2 -Patch3: hardlink-remove-pcre2posix.h-support.patch - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -804,6 +796,7 @@ fi %{compldir}/dmesg %{compldir}/findmnt %{compldir}/flock +%{compldir}/hardlink %{compldir}/fsck %{compldir}/ionice %{compldir}/ipcmk @@ -953,6 +946,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Tue Aug 17 2021 Karel Zak - 2.37.2-1 +* upgrade to v2.37.2 + * Fri Jul 23 2021 Fedora Release Engineering - 2.37-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild