Sync from SUSE:SLFO:Main util-linux revision 1c5132a0808ee4676f2f94e27aef5375

This commit is contained in:
Adrian Schröter 2024-06-22 09:57:38 +02:00
parent 4884481c83
commit fbb8ad044b
12 changed files with 340 additions and 758 deletions

View File

@ -1,44 +0,0 @@
From 93ba7961779789217a1f814ce3110ff8c040c8c3 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Wed, 12 Jul 2023 15:48:27 +0200
Subject: [PATCH] Revert "libblkid: try LUKS2 first when probing"
References: https://github.com/util-linux/util-linux/pull/2373
mdadm superblocks before 1.1 are placed at the end of the device, which
means that the data contained inside the array starts at offset 0. For
LUKS inside MD, blkid falsely detects this as plain LUKS instead of a
linux_raid_member. This causes e.g. dracut to not assemble the array
during boot and system startup fails.
This reverts commit b8889c0a214aeb3dd47bf1ab280fe5534b64d2aa.
---
libblkid/src/superblocks/superblocks.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c
index fb0392707..c7789a15b 100644
--- a/libblkid/src/superblocks/superblocks.c
+++ b/libblkid/src/superblocks/superblocks.c
@@ -94,11 +94,6 @@ static int blkid_probe_set_usage(blkid_probe pr, int usage);
*/
static const struct blkid_idinfo *idinfos[] =
{
- /* In case the volume is locked with OPAL we are going to get
- * an I/O error when reading past the LUKS header, so try it
- * first. */
- &luks_idinfo,
-
/* RAIDs */
&linuxraid_idinfo,
&ddfraid_idinfo,
@@ -124,6 +119,7 @@ static const struct blkid_idinfo *idinfos[] =
&snapcow_idinfo,
&verity_hash_idinfo,
&integrity_idinfo,
+ &luks_idinfo,
&vmfs_volume_idinfo,
&ubi_idinfo,
&vdo_idinfo,
--
2.41.0

31
static_lib.patch Normal file
View File

@ -0,0 +1,31 @@
From: Stefan Schubert <schubi@suse.com>
From: Jan Engelhardt <jengelh@inai.de>
Date: 2024-04-15T13:34:15Z
[Original description: Added "Requires.private: libeconf" in order to
build with static libeconf.a.]
This patch addresses a build failure in libblkid-using programs when
one attempts to static-link the program:
$ g++ blkid_get_cache.cpp -static `pkg-config blkid --cflags --libs --static`
ld: libblkid.a(la-config.o): in function `blkid_read_config':
libblkid/src/config.c:160:(.text+0x150): undefined reference to `econf_readFile'
ld: libblkid/src/config.c:241:(.text+0x1a1): undefined reference to `econf_freeFile'
The patch is not upstreamable in this form, as the presence of the
Requires.private line needs to be conditionalized upon
``HAVE_LIBECONF`` (cf. meson.build/configure.ac).
[Description updated; --jengelh]
diff -ur org/libblkid/blkid.pc.in patch/libblkid/blkid.pc.in
--- org/libblkid/blkid.pc.in 2024-01-31 11:02:15.460811568 +0100
+++ patch/libblkid/blkid.pc.in 2024-04-15 15:19:34.288703597 +0200
@@ -6,5 +6,6 @@
Name: blkid
Description: Block device id library
Version: @LIBBLKID_VERSION@
+Requires.private: libeconf
Cflags: -I${includedir}/blkid
Libs: -L${libdir} -lblkid

View File

@ -1,36 +0,0 @@
From 4524f5d6b7d90684f2b205e472cd65a682d5fab5 Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
Date: Wed, 29 Nov 2023 11:36:23 -0600
Subject: [PATCH] tests: increase delay for waitpid test
References: bsc#1217651
In some test executions on s390x, the waitpid test fails because 1
gets printed before 2.
[ 557s] --- /home/abuild/rpmbuild/BUILD/util-linux-2.39.2/tests/expected/misc/waitpid-normal 2023-06-14 09:11:15.910887765 +0000
[ 557s] +++ /home/abuild/rpmbuild/BUILD/util-linux-2.39.2/tests/output/misc/waitpid-normal 2023-11-27 23:30:30.406675022 +0000
[ 557s] @@ -1,4 +1,4 @@
[ 557s] 3
[ 557s] -2
[ 557s] 1
[ 557s] +2
[ 557s] 4
Increase the time to print 1, so the test numbers are printed in
expected order.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
diff --git a/tests/ts/misc/waitpid b/tests/ts/misc/waitpid
index daed74fe0..904222c05 100755
--- a/tests/ts/misc/waitpid
+++ b/tests/ts/misc/waitpid
@@ -24,7 +24,7 @@ ts_check_test_command "$TS_CMD_WAITPID"
ts_init_subtest normal
-(sleep 0.2; echo 1 >> "$TS_OUTPUT") &
+(sleep 0.5; echo 1 >> "$TS_OUTPUT") &
BG1="$!"
(sleep 0.1; echo 2 >> "$TS_OUTPUT") &

5
tmpfiles.lastlog2.conf Normal file
View File

@ -0,0 +1,5 @@
# This file is for lastlog2/pam_lastlog2.
#
# See tmpfiles.d(5) for details
#
d /var/lib/lastlog 0755 - - -

View File

@ -1,357 +0,0 @@
From: Thorsten Kukuk <kukuk@suse.com>
Date: 2023-08-17 08:03:09+0000
References: https://github.com/util-linux/util-linux/pull/2100
diff --git a/configure.ac b/configure.ac
index d631b062d2..17d3ab703b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2491,6 +2491,7 @@ AS_IF([test "x$with_systemd" != xno], [
[*:yes],
AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Define if libsystemd is available])
AC_DEFINE([USE_SYSTEMD], [1], [Define if systemd support is wanted ])
+ AC_CHECK_DECLS([sd_session_get_username], [], [], [#include <systemd/sd-login.h>])
)
])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes])
diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am
index 07004d43ca..1542320422 100644
--- a/term-utils/Makemodule.am
+++ b/term-utils/Makemodule.am
@@ -98,6 +98,10 @@ dist_noinst_DATA += term-utils/wall.1.adoc
wall_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
wall_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
wall_LDADD = $(LDADD) libcommon.la
+if HAVE_SYSTEMD
+wall_LDADD += $(SYSTEMD_LIBS)
+wall_CFLAGS += $(SYSTEMD_CFLAGS)
+endif
if USE_TTY_GROUP
if MAKEINSTALL_DO_CHOWN
install-exec-hook-wall::
diff --git a/term-utils/wall.c b/term-utils/wall.c
index c601d3e5b7..313b1bdee5 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -61,6 +61,11 @@
#include <sys/types.h>
#include <grp.h>
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+# include <systemd/sd-login.h>
+# include <systemd/sd-daemon.h>
+#endif
+
#include "nls.h"
#include "xalloc.h"
#include "strutils.h"
@@ -246,6 +251,37 @@ int main(int argc, char **argv)
iov.iov_base = mbuf;
iov.iov_len = mbufsize;
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+ if (sd_booted() > 0) {
+ char **sessions_list;
+ int sessions;
+
+ sessions = sd_get_sessions(&sessions_list);
+ if (sessions < 0)
+ errx(EXIT_FAILURE, _("error getting sessions: %s"),
+ strerror(-sessions));
+
+ for (int i = 0; i < sessions; i++) {
+ char *name, *tty;
+ int r;
+
+ if ((r = sd_session_get_username(sessions_list[i], &name)) < 0)
+ errx(EXIT_FAILURE, _("get user name failed: %s"), strerror (-r));
+
+ if (!(group_buf && !is_gr_member(name, group_buf))) {
+ if (sd_session_get_tty(sessions_list[i], &tty) >= 0) {
+ if ((p = ttymsg(&iov, 1, tty, timeout)) != NULL)
+ warnx("%s", p);
+
+ free(tty);
+ }
+ }
+ free(name);
+ free(sessions_list[i]);
+ }
+ free(sessions_list);
+ } else {
+#endif
while((utmpptr = getutxent())) {
if (!utmpptr->ut_user[0])
continue;
@@ -269,6 +305,9 @@ int main(int argc, char **argv)
warnx("%s", p);
}
endutxent();
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+ }
+#endif
free(mbuf);
free_group_workspace(group_buf);
exit(EXIT_SUCCESS);
From e915e6baeba3cbce154336a4f1f24a8be93e85ae Mon Sep 17 00:00:00 2001
From: Thorsten Kukuk <kukuk@suse.com>
Date: Wed, 31 May 2023 08:57:01 +0200
Subject: [PATCH 2/3] agetty: use sd_get_sessions() for number of users (#2088)
---
term-utils/Makemodule.am | 4 ++++
term-utils/agetty.c | 28 ++++++++++++++++++++++------
2 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am
index 1542320422..b7037fb116 100644
--- a/term-utils/Makemodule.am
+++ b/term-utils/Makemodule.am
@@ -58,6 +58,10 @@ endif
if HAVE_ECONF
agetty_LDADD += -leconf
endif
+if HAVE_SYSTEMD
+agetty_LDADD += $(SYSTEMD_LIBS)
+agetty_CFLAGS = $(SYSTEMD_CFLAGS)
+endif
endif # BUILD_AGETTY
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index cf8725537b..6bc3e5b5a8 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -73,6 +73,11 @@
# endif
#endif
+#ifdef USE_SYSTEMD
+# include <systemd/sd-daemon.h>
+# include <systemd/sd-login.h>
+#endif
+
#ifdef __linux__
# include <sys/kd.h>
# define USE_SYSLOG
@@ -2864,12 +2869,23 @@ static void output_special_char(struct issue *ie,
case 'U':
{
int users = 0;
- struct utmpx *ut;
- setutxent();
- while ((ut = getutxent()))
- if (ut->ut_type == USER_PROCESS)
- users++;
- endutxent();
+#ifdef USE_SYSTEMD
+ if (sd_booted() > 0) {
+ users = sd_get_sessions(NULL);
+ if (users < 0)
+ users = 0;
+ } else {
+#endif
+ users = 0;
+ struct utmpx *ut;
+ setutxent();
+ while ((ut = getutxent()))
+ if (ut->ut_type == USER_PROCESS)
+ users++;
+ endutxent();
+#ifdef USE_SYSTEMD
+ }
+#endif
if (c == 'U')
fprintf(ie->output, P_("%d user", "%d users", users), users);
else
From 5c62c27001467f3ef0baaa66ae4e3bb80a0298a6 Mon Sep 17 00:00:00 2001
From: Thorsten Kukuk <kukuk@suse.com>
Date: Wed, 31 May 2023 09:00:09 +0200
Subject: [PATCH 3/3] write: query logind for list of users with tty (#2088)
---
term-utils/Makemodule.am | 4 ++
term-utils/write.c | 130 +++++++++++++++++++++++++++++++++++----
2 files changed, 123 insertions(+), 11 deletions(-)
diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am
index b7037fb116..1efe1c57e3 100644
--- a/term-utils/Makemodule.am
+++ b/term-utils/Makemodule.am
@@ -126,6 +126,10 @@ write_SOURCES = term-utils/write.c
write_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
write_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
write_LDADD = $(LDADD) libcommon.la
+if HAVE_SYSTEMD
+write_LDADD += $(SYSTEMD_LIBS)
+write_CFLAGS += $(SYSTEMD_CFLAGS)
+endif
if USE_TTY_GROUP
if MAKEINSTALL_DO_CHOWN
diff --git a/term-utils/write.c b/term-utils/write.c
index 8b86e9a9d5..8aa450d563 100644
--- a/term-utils/write.c
+++ b/term-utils/write.c
@@ -59,6 +59,11 @@
#include <unistd.h>
#include <utmpx.h>
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+# include <systemd/sd-login.h>
+# include <systemd/sd-daemon.h>
+#endif
+
#include "c.h"
#include "carefulputc.h"
#include "closestream.h"
@@ -131,19 +136,56 @@ static int check_utmp(const struct write_control *ctl)
{
struct utmpx *u;
int res = 1;
-
- utmpxname(_PATH_UTMP);
- setutxent();
-
- while ((u = getutxent())) {
- if (strncmp(ctl->dst_login, u->ut_user, sizeof(u->ut_user)) == 0 &&
- strncmp(ctl->dst_tty_name, u->ut_line, sizeof(u->ut_line)) == 0) {
- res = 0;
- break;
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+ if (sd_booted() > 0) {
+ char **sessions_list;
+ int sessions = sd_get_sessions(&sessions_list);
+ if (sessions < 0)
+ errx(EXIT_FAILURE, _("error getting sessions: %s"),
+ strerror(-sessions));
+
+ for (int i = 0; i < sessions; i++) {
+
+ char *name, *tty;
+ int r;
+
+ if ((r = sd_session_get_username(sessions_list[i], &name)) < 0)
+ errx(EXIT_FAILURE, _("get user name failed: %s"), strerror (-r));
+ if (sd_session_get_tty(sessions_list[i], &tty) < 0) {
+ free(name);
+ continue;
+ }
+
+ if (strcmp(ctl->dst_login, name) == 0 &&
+ strcmp(ctl->dst_tty_name, tty) == 0) {
+ free(name);
+ free(tty);
+ res = 0;
+ break;
+ }
+ free(name);
+ free(tty);
+ }
+ for (int i = 0; i < sessions; i++)
+ free(sessions_list[i]);
+ free(sessions_list);
+ } else {
+#endif
+ utmpxname(_PATH_UTMP);
+ setutxent();
+
+ while ((u = getutxent())) {
+ if (strncmp(ctl->dst_login, u->ut_user, sizeof(u->ut_user)) == 0 &&
+ strncmp(ctl->dst_tty_name, u->ut_line, sizeof(u->ut_line)) == 0) {
+ res = 0;
+ break;
+ }
}
- }
- endutxent();
+ endutxent();
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+ }
+#endif
return res;
}
@@ -163,6 +205,69 @@ static void search_utmp(struct write_control *ctl)
struct utmpx *u;
time_t best_atime = 0, tty_atime;
int num_ttys = 0, valid_ttys = 0, tty_writeable = 0, user_is_me = 0;
+
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+ if (sd_booted() > 0) {
+ char path[256];
+ char **sessions_list;
+ int sessions = sd_get_sessions(&sessions_list);
+ if (sessions < 0)
+ errx(EXIT_FAILURE, _("error getting sessions: %s"),
+ strerror(-sessions));
+
+ for (int i = 0; i < sessions; i++) {
+ char *name, *tty;
+ int r;
+
+ if ((r = sd_session_get_username(sessions_list[i], &name)) < 0)
+ errx(EXIT_FAILURE, _("get user name failed: %s"), strerror (-r));
+
+ if (strcmp(ctl->dst_login, name) != 0) {
+ free(name);
+ continue;
+ }
+
+ if (sd_session_get_tty(sessions_list[i], &tty) < 0) {
+ free(name);
+ continue;
+ }
+
+ num_ttys++;
+ snprintf(path, sizeof(path), "/dev/%s", tty);
+ if (check_tty(path, &tty_writeable, &tty_atime, 0)) {
+ /* bad term? skip */
+ free(name);
+ free(tty);
+ continue;
+ }
+ if (ctl->src_uid && !tty_writeable) {
+ /* skip ttys with msgs off */
+ free(name);
+ free(tty);
+ continue;
+ }
+ if (strcmp(tty, ctl->src_tty_name) == 0) {
+ user_is_me = 1;
+ free(name);
+ free(tty);
+ /* don't write to yourself */
+ continue;
+ }
+ valid_ttys++;
+ if (best_atime < tty_atime) {
+ best_atime = tty_atime;
+ free(ctl->dst_tty_path);
+ ctl->dst_tty_path = xstrdup(path);
+ ctl->dst_tty_name = ctl->dst_tty_path + 5;
+ }
+ free(name);
+ free(tty);
+ }
+ for (int i = 0; i < sessions; i++)
+ free(sessions_list[i]);
+ free(sessions_list);
+ } else {
+#endif
char path[sizeof(u->ut_line) + 6];
utmpxname(_PATH_UTMP);
@@ -197,6 +302,9 @@ static void search_utmp(struct write_control *ctl)
}
endutxent();
+#if defined(USE_SYSTEMD) && HAVE_DECL_SD_SESSION_GET_USERNAME == 1
+ }
+#endif
if (num_ttys == 0)
errx(EXIT_FAILURE, _("%s is not logged in"), ctl->dst_login);
if (valid_ttys == 0) {

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmVuLVMACgkQ5LcdXuw5
woTWRg/+KBoZc5EjgFEUQMGzblNyuqrvcFqCbhEcoaEEMtEKPrQGVZgwgs+SZcel
n0ygCOes7M/nNmAvn4dVM8sZRvEPKjdRFErmghNuWKfZLbE9szadNcnPunmzZ1Nc
Cd2E1R6bo0B5X3tZ4ISW3keAnWKlnRucPIrW2qZiWT36LfJT4s9vZ/dyAnJ3eAtQ
aFgUVMWRwDFYYr79iXq6Wq60bHbxw1HT+KrpoLEkjIXN+DmuSffVQfjmCpamT1UH
oGgUGDhrUFr8XRUC0q07n1CxxgirjlR+KeLDiNAXuzGTWK2naBYCtCwGJpxM5Dvd
cyKenmCC1Ie+cl9m3w7MfP7WgtoPogpttEiZ1lsLJcDEbeuAu1z+O/B52YwOi7O3
WLpe6bqW/dQsAljC6q2UMZrwnRjK7Zr5CwkTlV/o0DuCmAidcoXEZAcVQDvY1H6k
uYD9NFtQotS0ufOFH08AJxBYWVznbmiNG7NdGeMm/ysfe807fQYD25FYhP4/r4jt
k6qWnfDrt9OooFNx6e7s2cBZSkTmJzJ8nxGv0a4WgOhZ6hnLpx/Cv2RIpux5DeMq
wOuWuMDF9lOVWiv6iWiuy8shQ+hGF4+riFy8LfqJZf94wqZmp0tA8CHKFSDI99iC
ci4tz2MEpQqeVeEx1sd18DRjkXycs5Wmy7ZAUtqnR1rUxKbhVLo=
=4wcm
-----END PGP SIGNATURE-----

BIN
util-linux-2.39.3.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAmY4lxMACgkQ5LcdXuw5
woSckw//ZmoxCcjdDBv5LkAK0Yl5EMKZYzkvqswsp/Uwllgevb/FcCGwZ+F49RM3
H8F5Kj5CIJW9wh2UNWxaMm4MxcGd3eG2NEwgYh8RiXSS84zEL78yaIJLyFlPziMp
kZb0fpc2HpyCzDrvtlw6S5TGkUUx2uFqTQQG7GFd6TOlbPpGp4OpqY3adf85mwmr
NKy0XbYLo6sqGENz6Uklbf5Qhc19UEEc1jScOYNpkuCxhRQguxq3Jc6W8A8DQkjB
EWaw9Q1XYDV3Bnd40F0K+bo3CYB6z3pMM51NlsYxV0fKt/SoEvJw3S7u3VcbtJWn
S6xl6q/sMINDrMIpSL5PAAg5yoBNIIoWW7OxSh0nv6ctp9dmln0sKBtXNr09zTWT
q9mLUt7LwXB6LT3XI64262vF21bKq/hQO8IObsx8vfPSlp1SyGq7VqGh6QVbkjx6
2vA7ueV5jfIKiAlZAcXz6NHjwxcBqYq7wASeUEmYPgh5lb4HBOuOgatYBNAmQoxp
2t5AXPPhI/u95GRa4WntpgqlQm/1CKA9kHiezvO4P0lnpUluT24DXclMTcq4xaiN
ci+dzVF2EPRoPJgYy9crKNsr7dftVtvAVXIRk3UaTwDe1o7OK4vSykDc0PSNxsHQ
mMabBuFt17oweonotSOZ8z7blHnCVnzZWVxyIxC3Pw/0ChHFAkw=
=68JD
-----END PGP SIGNATURE-----

BIN
util-linux-2.40.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,276 +0,0 @@
From 8b36444f447949c3ab477f2c43b45a94c30ee7bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
Date: Sun, 21 May 2023 21:42:14 +0200
Subject: [PATCH 1/4] fadvise: (test) dynamically calculate expected test
values
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
tests/ts/fadvise/drop | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 7c7eee5dc..86c0d5b0a 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -16,7 +16,7 @@ ts_check_prog "sleep"
ts_cd "$TS_OUTDIR"
FILE="ddtest"
-BS=4k
+BS=4096
COUNT=8
FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
@@ -41,22 +41,22 @@ create_file() {
echo
create_file
- echo "offset: 8192"
- "$TS_CMD_FADVISE" -o 8192 "$FILE"
+ echo "offset: $(( 2 * $BS ))"
+ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE"
echo status: $?
"$TS_CMD_FINCORE" "$FILE"
echo
create_file
- echo "length: 16384"
- "$TS_CMD_FADVISE" -l 16384 "$FILE"
+ echo "length: $(( 4 * $BS ))"
+ "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE"
echo status: $?
"$TS_CMD_FINCORE" "$FILE"
echo
create_file
- echo "offset: 8192, length: 16384 fd: 42"
- "$TS_CMD_FADVISE" -o 8192 -l 16384 --fd 42 42<"$FILE"
+ echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42"
+ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE"
echo status: $?
"$TS_CMD_FINCORE" "$FILE"
echo
--
2.40.0
From e5009e773fc801eca887dd43b721cd1b1aa327be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
Date: Sun, 21 May 2023 21:43:38 +0200
Subject: [PATCH 2/4] fadvise: (tests) factor out calls to "fincore"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This will make it easier to pass argument later.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
tests/ts/fadvise/drop | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 86c0d5b0a..8869b7da4 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -28,37 +28,41 @@ create_file() {
dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null
}
+do_fincore() {
+ "$TS_CMD_FINCORE" "$FILE"
+}
+
{
create_file
- "$TS_CMD_FINCORE" "$FILE"
+ do_fincore
echo
create_file
echo "whole file"
"$TS_CMD_FADVISE" "$FILE"
echo status: $?
- "$TS_CMD_FINCORE" "$FILE"
+ do_fincore
echo
create_file
echo "offset: $(( 2 * $BS ))"
"$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE"
echo status: $?
- "$TS_CMD_FINCORE" "$FILE"
+ do_fincore
echo
create_file
echo "length: $(( 4 * $BS ))"
"$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE"
echo status: $?
- "$TS_CMD_FINCORE" "$FILE"
+ do_fincore
echo
create_file
echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42"
"$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE"
echo status: $?
- "$TS_CMD_FINCORE" "$FILE"
+ do_fincore
echo
rm "$FILE"
--
2.40.0
From 33980996d0b429fc59c40f8352633c0a21a0f96a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
Date: Sun, 21 May 2023 21:44:20 +0200
Subject: [PATCH 3/4] fadvise: (test) don't compare fincore page counts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
These depend on the machines pagesize and are therefore not a good
comparision.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
tests/expected/fadvise/drop | 20 ++++++++++----------
tests/ts/fadvise/drop | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop
index f2360b56f..25f23e050 100644
--- a/tests/expected/fadvise/drop
+++ b/tests/expected/fadvise/drop
@@ -1,23 +1,23 @@
- RES PAGES SIZE FILE
- 32K 8 32K ddtest
+ RES SIZE FILE
+ 32K 32K ddtest
whole file
status: 0
-RES PAGES SIZE FILE
- 0B 0 32K ddtest
+RES SIZE FILE
+ 0B 32K ddtest
offset: 8192
status: 0
-RES PAGES SIZE FILE
- 8K 2 32K ddtest
+RES SIZE FILE
+ 8K 32K ddtest
length: 16384
status: 0
- RES PAGES SIZE FILE
- 16K 4 32K ddtest
+ RES SIZE FILE
+ 16K 32K ddtest
offset: 8192, length: 16384 fd: 42
status: 0
- RES PAGES SIZE FILE
- 16K 4 32K ddtest
+ RES SIZE FILE
+ 16K 32K ddtest
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 8869b7da4..6c4298e87 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -29,7 +29,7 @@ create_file() {
}
do_fincore() {
- "$TS_CMD_FINCORE" "$FILE"
+ "$TS_CMD_FINCORE" -o RES,SIZE,FILE "$FILE"
}
{
--
2.40.0
From c0f31b79f5d1c665cdc057fb32f4d161d28aa5b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
Date: Sun, 21 May 2023 21:45:10 +0200
Subject: [PATCH 4/4] fadvise: (test) test with 64k blocks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This will allow the tests to also pass on systems with 64k pagesizes.
Closes #2249
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
---
tests/expected/fadvise/drop | 26 +++++++++++++-------------
tests/ts/fadvise/drop | 2 +-
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop
index 25f23e050..e7bb26b6e 100644
--- a/tests/expected/fadvise/drop
+++ b/tests/expected/fadvise/drop
@@ -1,23 +1,23 @@
- RES SIZE FILE
- 32K 32K ddtest
+ RES SIZE FILE
+ 512K 512K ddtest
whole file
status: 0
-RES SIZE FILE
- 0B 32K ddtest
+RES SIZE FILE
+ 0B 512K ddtest
-offset: 8192
+offset: 131072
status: 0
-RES SIZE FILE
- 8K 32K ddtest
+ RES SIZE FILE
+ 128K 512K ddtest
-length: 16384
+length: 262144
status: 0
- RES SIZE FILE
- 16K 32K ddtest
+ RES SIZE FILE
+ 256K 512K ddtest
-offset: 8192, length: 16384 fd: 42
+offset: 131072, length: 262144 fd: 42
status: 0
- RES SIZE FILE
- 16K 32K ddtest
+ RES SIZE FILE
+ 256K 512K ddtest
diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop
index 6c4298e87..45dcb9110 100755
--- a/tests/ts/fadvise/drop
+++ b/tests/ts/fadvise/drop
@@ -16,7 +16,7 @@ ts_check_prog "sleep"
ts_cd "$TS_OUTDIR"
FILE="ddtest"
-BS=4096
+BS=65536
COUNT=8
FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
--
2.40.0

View File

@ -1,3 +1,109 @@
-------------------------------------------------------------------
Wed May 8 14:06:51 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- Update to version 2.40.1
* agetty: don't overwrite TERM passed by the user
* fsck.minix: fix possible overrun
* libblkid: fix segfault when blkid.conf doesn't exist
* libfdisk: add initializer to geometry
* libmount: fix access check for utab in context
* libmount: fix umount --read-only
* lsns: fix netns use
- Drop skip-lsfd-tests-PR2888.patch, was a backport
-------------------------------------------------------------------
Mon May 6 17:09:08 UTC 2024 - Stanislav Brabec <sbrabec@suse.com>
- Don't delete binaries not common for all architectures. Create an
util-linux-extra subpackage instead, so users of third party
tools can use them. (bsc#1222285)
-------------------------------------------------------------------
Mon Apr 15 13:27:41 UTC 2024 - Stefan Schubert <schubi@suse.com>
- Added static_lib.patch to resolve build failure when using
libblkid.pc in --static mode
-------------------------------------------------------------------
Mon Apr 8 08:37:09 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- Add new lastlog2 sub-package (to solve migration problems due to
rpm %post/%postun ordering)
* Add pam-config calls to enable pam_lastlog2
* Add lastlog2.conf systemd-tmpfile to create database directory
-------------------------------------------------------------------
Sat Apr 6 19:53:02 UTC 2024 - Andreas Schwab <schwab@suse.de>
- Skip tests marked as ts_skip_qemu_user when running under qemu
- Mark racy lslocks test as known fail
-------------------------------------------------------------------
Fri Apr 5 15:55:44 UTC 2024 - Stanislav Brabec <sbrabec@suse.com>
- Re-enable lsfd tests using mkfds, as it is fixed now.
-------------------------------------------------------------------
Fri Apr 5 09:33:46 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- liblastlog2-devel:
* Obsolete/provide lastlog2-devel for migration
* Add header file to filelist
-------------------------------------------------------------------
Thu Apr 4 12:27:18 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- Update to release 2.40
* Add lastlog2
* agetty: Load autologin user from agetty.autologin credential
* agetty: use get_terminal_default_type()
* agetty: use sd_get_sessions() for number of users (#2088)
* blockdev: add support for BLKGETZONESZ
* cfdisk: ask y/n before wipe
* cfdisk: properly handle out-of-order partitions during resize
* chcpu: document limitations of -g
* chsh: use libeconf to read /etc/shells
* column: fix -l
* column: fix memory leak
* dmesg: fix FD leak
* dmesg: fix delta calculation
* dmesg: fix wrong size calculation
* dmesg: support reading kmsg format from file
* enosys: a new small command to make syscalls fail with ENOSYS
* exch: new command to atomically exchanges paths between two files
* fdisk: add support for partition resizing
* fdisk: remove usage of VLA
* fincore: add --output-all
* findmnt: add --list-columns
* findmnt: add -I, --dfi options for imitating the output of df -i
* findmnt: add inode-related columns for implementing "df -i" like output
* hexdump: add '--one-byte-hex' format option
* hwclock: add support for RTC_VL_READ/RTC_VL_CLR ioctls
* login: initialize noauth from login.noauth credential
* lsblk: add --filter
* lsblk: add --highlight
* lsblk: add --list-columns
* lsclocks: new command to show clocks
* lscpu: even more Arm part numbers
* mkfs.minix: handle 64bit time on 32bit system
* mkswap: implement --file
* mkswap: implement --offset
* mount: add --map-users and --map-groups convenience options
* nsenter: add option `-c` to join the cgroup of target process
* setarch: add riscv64/riscv32 support
* setpgid: new command to run a program in a new process group
* uuidd: add cont_clock persistence
* uuidgen: add option --count
* wall: query logind for list of users with tty (#2088)
* write: query logind for list of users with tty (#2088)
* libuuid: improved support for 64-bit time
- skip-lsfd-tests-PR2888.patch: skip some lsfd tests which OBS does
not support (https://github.com/util-linux/util-linux/issues/2822)
- use-logind-not-utmp.patch: removed, accepted upstream
- tests-increase-delay-for-waitpid-test.patch: removed, upstreamed
- 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch: reverted upstream
- util-linux-fix-tests-with-64k-pagesize.patch: was a backport
-------------------------------------------------------------------
Fri Feb 9 17:56:16 UTC 2024 - Stanislav Brabec <sbrabec@suse.com>

View File

@ -20,7 +20,7 @@
# Parts description:
# core: libraries, all binaries except those dependent on libsystemd
# systemd: binaries dependent on systemd, man pages (generator is dependent on ruby)
# systemd: binaries dependent on systemd or sqlite3, man pages (generator is dependent on ruby)
# python: Python bindings
%if "%{flavor}" == ""
@ -85,11 +85,11 @@ Group: Development/Languages/Python
%endif
# ulbuild == python
Version: 2.39.3
Version: 2.40.1
Release: 0
License: GPL-2.0-or-later
URL: https://www.kernel.org/pub/linux/utils/util-linux/
Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-%{version}.tar.xz
Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-%{version}.tar.xz
Source2: util-linux-login_defs-check.sh
Source3: util-linux-rpmlintrc
Source7: baselibs.conf
@ -102,16 +102,15 @@ Source13: %{_name}.keyring
Source14: runuser.pamd
Source15: runuser-l.pamd
Source16: su-l.pamd
Source17: tmpfiles.lastlog2.conf
Source51: blkid.conf
# PATCH-EXTEND-UPSTREAM: Let `su' handle /sbin and /usr/sbin in path
Patch0: make-sure-sbin-resp-usr-sbin-are-in-PATH.diff
Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch
Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
# PATCH-FIX-SUSE util-linux-bash-completion-su-chsh-l.patch bsc1172427 -- Fix "su -s" bash completion.
Patch3: util-linux-bash-completion-su-chsh-l.patch
Patch4: 0001-Revert-libblkid-try-LUKS2-first-when-probing.patch
Patch5: util-linux-fix-tests-with-64k-pagesize.patch
Patch6: use-logind-not-utmp.patch
Patch7: tests-increase-delay-for-waitpid-test.patch
Patch5: static_lib.patch
BuildRequires: audit-devel
BuildRequires: bc
BuildRequires: binutils-devel
@ -119,7 +118,7 @@ BuildRequires: fdupes
BuildRequires: file-devel
BuildRequires: gettext-devel
BuildRequires: libcap-ng-devel
BuildRequires: libeconf-devel
BuildRequires: libeconf-devel-static
BuildRequires: libselinux-devel
BuildRequires: libsepol-devel
BuildRequires: libtool
@ -132,7 +131,7 @@ BuildRequires: utempter-devel
%endif
BuildRequires: zlib-devel
Requires(post): permissions
Requires(verify):permissions
Requires(verify): permissions
# util-linux is part of VMInstall, but we can well build without it
# Helps shorten a cycle and eliminate a bootstrap issue
#!BuildIgnore: util-linux
@ -148,6 +147,7 @@ BuildRequires: libudev-devel
BuildRequires: socat
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: rubygem(asciidoctor)
Supplements: (util-linux and systemd)
# Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1
@ -224,6 +224,18 @@ mount program, the fdisk configuration tool, and more.
# Core packages #
#################
%if "%ulsubset" == "core"
%ifarch s390 s390x ia64 m68k sparc
%package -n util-linux-extra
Summary: A collection of basic system utilities - extra utilities
License: GPL-2.0-or-later
Group: System/Base
%description -n util-linux-extra
This package contains an util-linux tools that have no real use on a
particular platform. It contains programs that are not well usable for the
platform, but they can be required by scripts or third party tools.
%endif
%package -n libblkid1
Summary: Filesystem detection library
License: LGPL-2.1-or-later
@ -247,6 +259,7 @@ Summary: Development files for the filesystem detection library
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires: libblkid-devel = %{version}
Requires: libeconf-devel-static
%description -n libblkid-devel-static
Files needed to develop applications using the library for filesystem
@ -368,6 +381,40 @@ unique IDs (UUIDs).
%endif
# ulsubset == core
%if "%ulsubset" == "systemd"
%package -n lastlog2
Summary: Reports most recent login of users
License: BSD-2-Clause
Group: System/Base
Requires(pre): pam-config >= 2.4
Requires(post): pam-config >= 2.4
%description -n lastlog2
pam_lastlog2 and lastlog2 are Y2038 safe versions of the old lastlog utility. pam_lastlog2 collects all data in a sqlite3 database and lastlog2 formats and prints the contents. The username, port, and last login time will be printed.
%package -n liblastlog2-2
Summary: Library to report most recent login of users
License: BSD-2-Clause
Group: System/Libraries
%description -n liblastlog2-2
The liblastlog2 library provides various interfaces to read, write or modify the lastlog 2 database.
%package -n liblastlog2-devel
Summary: Development files for the lastlog2 library
License: BSD-2-Clause
Group: Development/Libraries/C and C++
Requires: liblastlog2-2 = %{version}
Provides: lastlog2-devel = %{version}-%{release}
Obsoletes: lastlog2-devel <= 1.3.1
%description -n liblastlog2-devel
Files to develop applications using the liblastlog2 library.
%endif
# ulsubset == systemd
####################
# Systemd packages #
####################
@ -377,7 +424,7 @@ Summary: Tools for writing to TTYs
License: BSD-3-Clause
Requires(pre): group(tty)
Requires(post): permissions
Requires(verify):permissions
Requires(verify): permissions
Provides: util-linux:%{_bindir}/mesg
Provides: util-linux:%{_bindir}/wall
Provides: util-linux:%{_bindir}/write
@ -450,7 +497,7 @@ configure_options+="--without-python "
# ulbuild == base
%if "%ulsubset" == "core"
configure_options+="--without-systemd "
configure_options+="--without-systemd --disable-liblastlog2"
%endif
# ulsubset == core
@ -577,6 +624,7 @@ chmod 755 %{buildroot}%{_sbindir}/flushb
# arch dependent
%if "%ulsubset" != "core"
%ifarch s390 s390x
rm -f %{buildroot}%{_sysconfdir}/fdprm
rm -f %{buildroot}%{_bindir}/setterm
@ -602,6 +650,8 @@ rm -f %{buildroot}%{_sbindir}/fdisk
rm -f %{buildroot}%{_mandir}/man8/fdisk.8*
%endif
# arch ia64 m68k
%endif
# ulsubset != core
# create list of setarch(8) symlinks
find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \
@ -618,6 +668,9 @@ mkdir -p %{buildroot}/run/uuidd
# create it for uuidd. See boo#1206690.
mkdir -p %{buildroot}%{_sharedstatedir}/libuuid/
touch %{buildroot}%{_sharedstatedir}/libuuid/clock.txt
# Install systemd-tmpfile for lastlog database
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 644 %{SOURCE17} %{buildroot}%{_tmpfilesdir}/lastlog2.conf
%endif
# ulsubset == systemd, ulbuild == base
@ -651,6 +704,12 @@ ln -sf /sbin/service %{buildroot}%{_sbindir}/rcfstrim
%endif
# ulsubset == core, ulbuild == base
%if "%ulsubset" == "systemd"
# No *.la packages
rm -r %{buildroot}%{_pam_moduledir}/*.la
%endif
# ulsubset == systemd
%endif
# ulbuild == base
@ -681,18 +740,8 @@ rm -r %{buildroot}{%{_bindir},%{_mandir},%{_datadir},%{_includedir},%{_libdir}/{
# mark some tests "known_fail"
#
%if 0%{?qemu_user_space_build}
export TS_OPT_fdisk_gpt_known_fail="yes"
export TS_OPT_fdisk_oddinput_known_fail="yes"
export TS_OPT_fdisk_sunlabel_known_fail="yes"
export TS_OPT_fincore_count_known_fail="yes"
export TS_OPT_libfdisk_gpt_known_fail="yes"
export TS_OPT_misc_flock_known_fail="yes"
export TS_OPT_misc_ionice_known_fail="yes"
export TS_OPT_misc_swaplabel_known_fail="yes"
export TS_OPT_kill_name_to_number_known_fail="yes"
export TS_OPT_kill_print_pid_known_fail="yes"
export TS_OPT_kill_queue_known_fail="yes"
export TS_OPT_uuid_uuidd_known_fail="yes"
# skip tests marked as ts_skip_qemu_user
export QEMU_USER=1
# unsupported syscall in script(1) ... might be fixed in qemu
export TS_OPT_script_known_fail="yes"
# may segfault on qemu-user-space
@ -702,10 +751,10 @@ export TS_OPT_misc_setarch_known_fail="yes"
# Succeeds in local build, fails in OBS.
export TS_OPT_hardlink_options_known_fail="yes"
export TS_OPT_lsfd_mkfds_rw_character_device_known_fail="yes"
export TS_OPT_lsfd_mkfds_symlink_known_fail="yes"
# This does not work with a chroot build: / is not a mountpoint
export TS_OPT_misc_mountpoint_known_fail="yes"
# This test appears to be racy
export TS_OPT_lslocks_lslocks_known_fail=yes
#
# hacks
export PATH="$PATH:/sbin:/usr/sbin"
@ -824,6 +873,23 @@ done
%postun
%service_del_postun fstrim.service fstrim.timer
%pre -n lastlog2
%service_add_pre lastlog2-import.service
%post -n lastlog2
%tmpfiles_create lastlog2.conf
%service_add_post lastlog2-import.service
%{_sbindir}/pam-config -a --lastlog2 --lastlog2-silent_if=gdm,gdm-password,lxdm,lightdm,mdm,sddm
%preun -n lastlog2
%service_del_preun lastlog2-import.service
%postun -n lastlog2
if [ "$1" -eq 0 ]; then
%{_sbindir}/pam-config -d --lastlog2
fi
%service_del_postun lastlog2-import.service
%pre -n uuidd
%if 0%{?suse_version} < 1330
@ -853,6 +919,10 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%post -n util-linux-tty-tools
%set_permissions %{_bindir}/wall %{_bindir}/write
%post -n liblastlog2-2 -p /sbin/ldconfig
%postun -n liblastlog2-2 -p /sbin/ldconfig
%endif
%dnl # ulsubset == systemd, pre & post
%dnl
@ -947,6 +1017,8 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_bindir}/colrm
%core %{_bindir}/column
%core %{_bindir}/dmesg
%core %{_bindir}/enosys
%core %{_bindir}/exch
%core %{_bindir}/fadvise
%core %{_bindir}/fallocate
%core %{_bindir}/fincore
@ -980,6 +1052,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%endif
# ul_extra_bin_sbin
%core %{_bindir}/lsclocks
%core %{_bindir}/lscpu
%core %{_bindir}/lsfd
%core %{_bindir}/lsipc
@ -1001,6 +1074,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_bindir}/scriptlive
%core %{_bindir}/scriptreplay
%core %{_bindir}/setarch
%core %{_bindir}/setpgid
%core %{_bindir}/setpriv
%core %{_bindir}/setsid
%core %{_bindir}/taskset
@ -1155,7 +1229,9 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_mandir}/man1/colrm.1.gz
%core %{_mandir}/man1/column.1.gz
%core %{_mandir}/man1/dmesg.1.gz
%core %{_mandir}/man1/enosys.1.gz
%core %{_mandir}/man1/eject.1.gz
%core %{_mandir}/man1/exch.1.gz
%core %{_mandir}/man1/fadvise.1.gz
%core %{_mandir}/man1/fallocate.1.gz
%core %{_mandir}/man1/fincore.1.gz
@ -1179,6 +1255,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_mandir}/man1/login.1.gz
%core %{_mandir}/man1/look.1.gz
%core %{_mandir}/man1/lscpu.1.gz
%core %{_mandir}/man1/lsclocks.1.gz
%core %{_mandir}/man1/lsfd.1.gz
%core %{_mandir}/man1/lsipc.1.gz
%core %{_mandir}/man1/lsirq.1.gz
@ -1199,6 +1276,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_mandir}/man1/script.1.gz
%core %{_mandir}/man1/scriptlive.1.gz
%core %{_mandir}/man1/scriptreplay.1.gz
%core %{_mandir}/man1/setpgid.1.gz
%core %{_mandir}/man1/setterm.1.gz
%core %{_mandir}/man1/taskset.1.gz
%core %{_mandir}/man1/ul.1.gz
@ -1214,6 +1292,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%core %{_mandir}/man1/waitpid.1.gz
%core %{_mandir}/man5/adjtime_config.5.gz
%core %{_mandir}/man5/fstab.5.gz
%core %{_mandir}/man5/scols-filter.5.gz
%core %{_mandir}/man5/terminal-colors.d.5.gz
%core %{_mandir}/man8/addpart.8.gz
%core %{_mandir}/man8/agetty.8.gz
@ -1342,6 +1421,8 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%exclude %{_datadir}/bash-completion/completions/delpart
%exclude %{_datadir}/bash-completion/completions/dmesg
%exclude %{_datadir}/bash-completion/completions/eject
%exclude %{_datadir}/bash-completion/completions/enosys
%exclude %{_datadir}/bash-completion/completions/exch
%exclude %{_datadir}/bash-completion/completions/fallocate
%exclude %{_datadir}/bash-completion/completions/fadvise
%exclude %{_datadir}/bash-completion/completions/fdformat
@ -1369,6 +1450,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%exclude %{_datadir}/bash-completion/completions/ldattach
%exclude %{_datadir}/bash-completion/completions/look
%exclude %{_datadir}/bash-completion/completions/losetup
%exclude %{_datadir}/bash-completion/completions/lsclocks
%exclude %{_datadir}/bash-completion/completions/lscpu
%exclude %{_datadir}/bash-completion/completions/lsipc
%exclude %{_datadir}/bash-completion/completions/lsirq
@ -1402,6 +1484,7 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%exclude %{_datadir}/bash-completion/completions/scriptlive
%exclude %{_datadir}/bash-completion/completions/scriptreplay
%exclude %{_datadir}/bash-completion/completions/setarch
%exclude %{_datadir}/bash-completion/completions/setpgid
%exclude %{_datadir}/bash-completion/completions/setpriv
%exclude %{_datadir}/bash-completion/completions/setsid
%exclude %{_datadir}/bash-completion/completions/setterm
@ -1499,6 +1582,56 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
# Core packages files #
#######################
%if "%ulsubset" == "core"
%ifarch s390 s390x ia64 m68k sparc
%files -n util-linux-extra
#
# Files not common for all architectures
%ifarch ia64 m68k
%if %{ul_extra_bin_sbin}
%core /sbin/fdisk
%endif
# ul_extra_bin_sbin
%core %{_sbindir}/fdisk
%core %{_mandir}/man8/fdisk.8.gz
%endif
# arch ia64 m68k
%ifarch %sparc ia64 m68k
%core %{_mandir}/man8/cfdisk.8.gz
%core %{_mandir}/man8/sfdisk.8.gz
%if %{ul_extra_bin_sbin}
%core /sbin/cfdisk
%core /sbin/sfdisk
%endif
# ul_extra_bin_sbin
%core %{_sbindir}/cfdisk
%core %{_sbindir}/sfdisk
%endif
# arch sparc ia64 m68k
%ifarch s390 s390x
%core %{_sbindir}/fdformat
%if %{ul_extra_bin_sbin}
%core /sbin/hwclock
%endif
# ul_extra_bin_sbin
%core %{_sbindir}/hwclock
%core %{_bindir}/setterm
%core %{_sbindir}/tunelp
%core %{_mandir}/man8/fdformat.8.gz
%core %{_mandir}/man8/hwclock.8.gz
%core %{_mandir}/man8/tunelp.8.gz
%endif
# arch s390
%endif
# arch s390 s390x ia64 m68k sparc
%files -n libblkid1
%{_libdir}/libblkid.so.1
%{_libdir}/libblkid.so.1.*
@ -1602,6 +1735,26 @@ rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || :
%{_datadir}/bash-completion/completions/write
%{_datadir}/bash-completion/completions/mesg
%files -n lastlog2
%{_bindir}/lastlog2
%{_pam_moduledir}/pam_lastlog2.so
%{_mandir}/man8/lastlog2.8.gz
%{_mandir}/man8/pam_lastlog2.8.gz
%{_unitdir}/lastlog2-import.service
%{_tmpfilesdir}/lastlog2.conf
%{_datadir}/bash-completion/completions/lastlog2
%files -n liblastlog2-2
%{_libdir}/liblastlog2.so.2
%{_libdir}/liblastlog2.so.2.*
%files -n liblastlog2-devel
%{_libdir}/liblastlog2.so
%dir %{_includedir}/liblastlog2
%{_includedir}/liblastlog2/lastlog2.h
%{_mandir}/man3/lastlog2.3.gz
%{_mandir}/man3/ll2_*
%endif
# ulsubset == systemd