Compare commits
19 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0317f94b5 | ||
|
|
9213a0ec8f | ||
|
|
d3c879ee06 | ||
|
|
e20697608b | ||
|
|
62e94b8fcb | ||
|
|
49c5ecdbfb | ||
|
|
ad160404f2 | ||
|
|
f891325268 | ||
|
|
da7125e4bb | ||
|
|
196be3f2a1 | ||
|
|
47417a6e2e | ||
|
|
4737f2d702 | ||
|
|
06dbf9bb28 | ||
|
|
4bac19fd38 | ||
|
|
df438c4170 | ||
| ab6d50b588 | |||
|
|
9c226720cb | ||
|
|
7ef16d92f7 | ||
|
|
ba1905c6c7 |
9 changed files with 75 additions and 132 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -101,6 +101,8 @@
|
||||||
/util-linux-2.40.4.tar.xz
|
/util-linux-2.40.4.tar.xz
|
||||||
/util-linux-2.41.tar.xz
|
/util-linux-2.41.tar.xz
|
||||||
/util-linux-2.41.1.tar.xz
|
/util-linux-2.41.1.tar.xz
|
||||||
|
/util-linux-2.41.2.tar.xz
|
||||||
/util-linux-2.41.3.tar.xz
|
/util-linux-2.41.3.tar.xz
|
||||||
/util-linux-2.41.4.tar.xz
|
/util-linux-2.42.tar.xz
|
||||||
/util-linux-2.41.5.tar.xz
|
/util-linux-2.42.1.tar.xz
|
||||||
|
/util-linux-2.42.2.tar.xz
|
||||||
|
|
|
||||||
27
0000-login-use-O_CREAT-on-lastlog.patch
Normal file
27
0000-login-use-O_CREAT-on-lastlog.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
From a2357184ff3dc3beb001fcb12e1e4c0dcf8d0dbd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 2 Dec 2025 16:15:44 +0100
|
||||||
|
Subject: login: use O_CREAT on lastlog
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=151635
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
login-utils/login.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/login-utils/login.c b/login-utils/login.c
|
||||||
|
index 321f9d6ce..edc69fd9a 100644
|
||||||
|
--- a/login-utils/login.c
|
||||||
|
+++ b/login-utils/login.c
|
||||||
|
@@ -682,7 +682,7 @@ static void log_lastlog(struct login_context *cxt)
|
||||||
|
sa.sa_handler = SIG_IGN;
|
||||||
|
sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
|
||||||
|
|
||||||
|
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
|
||||||
|
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
|
||||||
|
if (fd < 0)
|
||||||
|
goto done;
|
||||||
|
offset = cxt->pwd->pw_uid * sizeof(ll);
|
||||||
|
--
|
||||||
|
2.51.1
|
||||||
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
From 3b1b56c00b34e1d00349349a8a91d0add72ce97b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karel Zak <kzak@redhat.com>
|
|
||||||
Date: Tue, 24 Jun 2025 10:56:58 +0200
|
|
||||||
Subject: [PATCH] libmount: disable EROFS backing file support
|
|
||||||
|
|
||||||
Let's temporarily use the old reliable loop devices rather than directly
|
|
||||||
mounting EROFS images. It seems some tools need to adapt to the change.
|
|
||||||
See https://github.com/dracut-ng/dracut-ng/issues/1384
|
|
||||||
|
|
||||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
||||||
---
|
|
||||||
libmount/src/context_mount.c | 35 -----------------------------------
|
|
||||||
libmount/src/hook_loopdev.c | 7 -------
|
|
||||||
2 files changed, 42 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
|
|
||||||
index fbb200708..4d6d53194 100644
|
|
||||||
--- a/libmount/src/context_mount.c
|
|
||||||
+++ b/libmount/src/context_mount.c
|
|
||||||
@@ -961,24 +961,6 @@ int mnt_context_finalize_mount(struct libmnt_context *cxt)
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int is_erofs_regfile(struct libmnt_context *cxt)
|
|
||||||
-{
|
|
||||||
- const char *type = mnt_fs_get_fstype(cxt->fs);
|
|
||||||
- const char *src = mnt_fs_get_srcpath(cxt->fs);
|
|
||||||
- unsigned long flags = 0;
|
|
||||||
- struct stat st;
|
|
||||||
-
|
|
||||||
- if (!type || strcmp(type, "erofs") != 0)
|
|
||||||
- return 0;
|
|
||||||
- if (mnt_context_get_user_mflags(cxt, &flags))
|
|
||||||
- return 0;
|
|
||||||
- if (flags & (MNT_MS_LOOP | MNT_MS_OFFSET | MNT_MS_SIZELIMIT))
|
|
||||||
- return 0; /* it's already loopdev */
|
|
||||||
- if (!src || stat(src, &st) != 0 || !S_ISREG(st.st_mode))
|
|
||||||
- return 0;
|
|
||||||
- return 1;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
/**
|
|
||||||
* mnt_context_mount:
|
|
||||||
* @cxt: mount context
|
|
||||||
@@ -1083,23 +1065,6 @@ again:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- /*
|
|
||||||
- * Try mount EROFS image again with loop device.
|
|
||||||
- * See hook_loopdev.c:is_loopdev_required() for more details.
|
|
||||||
- */
|
|
||||||
- if (rc && mnt_context_get_syscall_errno(cxt) == ENOTBLK
|
|
||||||
- && is_erofs_regfile(cxt)) {
|
|
||||||
- struct libmnt_optlist *ol = mnt_context_get_optlist(cxt);
|
|
||||||
-
|
|
||||||
- mnt_context_reset_status(cxt);
|
|
||||||
- DBG(CXT, ul_debugobj(cxt, "enabling loop= for EROFS"));
|
|
||||||
- mnt_optlist_append_flags(ol, MNT_MS_LOOP, cxt->map_userspace);
|
|
||||||
-
|
|
||||||
- rc = mnt_context_call_hooks(cxt, MNT_STAGE_PREP_SOURCE);
|
|
||||||
- if (!rc)
|
|
||||||
- goto again;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
if (rc == 0)
|
|
||||||
rc = mnt_context_call_hooks(cxt, MNT_STAGE_POST);
|
|
||||||
|
|
||||||
diff --git a/libmount/src/hook_loopdev.c b/libmount/src/hook_loopdev.c
|
|
||||||
index 444d69d6f..29e181fe8 100644
|
|
||||||
--- a/libmount/src/hook_loopdev.c
|
|
||||||
+++ b/libmount/src/hook_loopdev.c
|
|
||||||
@@ -468,13 +468,6 @@ static int is_loopdev_required(struct libmnt_context *cxt, struct libmnt_optlist
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* The EROFS kernel driver can be compiled with EROFS_FS_BACKED_BY_FILE,
|
|
||||||
- * allowing for the mounting of a regular file as a filesystem without
|
|
||||||
- * a loop device.
|
|
||||||
- */
|
|
||||||
- if (type && strcmp(type, "erofs") == 0)
|
|
||||||
- return 0;
|
|
||||||
-
|
|
||||||
/* Note that there is no restriction (on kernel side) that would
|
|
||||||
* prevent a regular file as a mount(2) source argument. A filesystem
|
|
||||||
* that is able to mount regular files could be implemented. For this
|
|
||||||
--
|
|
||||||
2.49.0
|
|
||||||
|
|
||||||
27
0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch
Normal file
27
0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 617a887a6ec7e433f6a9f4c60592ed38b12b9f18 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 2 Dec 2025 16:17:55 +0100
|
||||||
|
Subject: login: add /run/motd.d` to the hardcoded MOTD_FILE
|
||||||
|
|
||||||
|
Addresses: https://github.com/coreos/console-login-helper-messages/issues/60
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
include/pathnames.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/include/pathnames.h b/include/pathnames.h
|
||||||
|
index 34ba11ca3..c91a077e1 100644
|
||||||
|
--- a/include/pathnames.h
|
||||||
|
+++ b/include/pathnames.h
|
||||||
|
@@ -41,7 +41,7 @@
|
||||||
|
#ifndef _PATH_MAILDIR
|
||||||
|
# define _PATH_MAILDIR "/var/spool/mail"
|
||||||
|
#endif
|
||||||
|
-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd"
|
||||||
|
+#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d"
|
||||||
|
#ifndef _PATH_NOLOGIN
|
||||||
|
# define _PATH_NOLOGIN "/etc/nologin"
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.51.1
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/include/pathnames.h b/include/pathnames.h
|
|
||||||
index 3845d4c33..fac3a0783 100644
|
|
||||||
--- a/include/pathnames.h
|
|
||||||
+++ b/include/pathnames.h
|
|
||||||
@@ -41,7 +41,7 @@
|
|
||||||
#ifndef _PATH_MAILDIR
|
|
||||||
# define _PATH_MAILDIR "/var/spool/mail"
|
|
||||||
#endif
|
|
||||||
-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd"
|
|
||||||
+#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d"
|
|
||||||
#ifndef _PATH_NOLOGIN
|
|
||||||
# define _PATH_NOLOGIN "/etc/nologin"
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
diff -up util-linux-2.36/login-utils/login.c.kzak util-linux-2.36/login-utils/login.c
|
|
||||||
--- util-linux-2.36/login-utils/login.c.kzak 2020-07-23 14:13:26.777030764 +0200
|
|
||||||
+++ util-linux-2.36/login-utils/login.c 2020-07-23 14:11:22.793686983 +0200
|
|
||||||
@@ -585,7 +585,7 @@ static void log_lastlog(struct login_con
|
|
||||||
sa.sa_handler = SIG_IGN;
|
|
||||||
sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
|
|
||||||
|
|
||||||
- fd = open(_PATH_LASTLOG, O_RDWR, 0);
|
|
||||||
+ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
|
|
||||||
if (fd < 0)
|
|
||||||
goto done;
|
|
||||||
offset = cxt->pwd->pw_uid * sizeof(ll);
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (util-linux-2.41.5.tar.xz) = 25e7e79e0f0a4711a15c16db05357755536cf4dc9c0ee28447d95f9bfc135f23075d434e107269a65148a8c16b37755e913aacbaec03a3bdce171a9e0a46bfe8
|
SHA512 (util-linux-2.42.2.tar.xz) = 7415add0be2930654e322830808dde03ff6d511bd357f0679e6b6287a13ca79fe58ce4ac05edef86b76fb381b3a36ca2da9d3c31b5dc0a1d889c203156a57277
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#%PAM-1.0
|
#%PAM-1.0
|
||||||
|
auth required pam_env.so
|
||||||
auth sufficient pam_rootok.so
|
auth sufficient pam_rootok.so
|
||||||
# Uncomment the following line to implicitly trust users in the "wheel" group.
|
# Uncomment the following line to implicitly trust users in the "wheel" group.
|
||||||
#auth sufficient pam_wheel.so trust use_uid
|
#auth sufficient pam_wheel.so trust use_uid
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
### Header
|
### Header
|
||||||
Summary: Collection of basic system utilities
|
Summary: Collection of basic system utilities
|
||||||
Name: util-linux
|
Name: util-linux
|
||||||
Version: 2.41.5
|
Version: 2.42.2
|
||||||
# -p -e rc1
|
# -p -e rc1
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain
|
License: GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND LicenseRef-Fedora-Public-Domain
|
||||||
|
|
@ -103,17 +103,9 @@ Provides: /usr/sbin/runuser
|
||||||
Provides: /usr/sbin/sfdisk
|
Provides: /usr/sbin/sfdisk
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
### Ready for upstream?
|
### Fedora specific patches
|
||||||
###
|
Patch0: 0000-login-use-O_CREAT-on-lastlog.patch
|
||||||
# 151635 - makeing /var/log/lastlog
|
Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch
|
||||||
Patch0: login-lastlog-create.patch
|
|
||||||
# Add `/run/motd.d` to the hardcoded MOTD_FILE
|
|
||||||
# https://github.com/coreos/console-login-helper-messages/issues/60
|
|
||||||
Patch1: login-default-motd-file.patch
|
|
||||||
|
|
||||||
# https://github.com/dracut-ng/dracut-ng/issues/1384
|
|
||||||
# 2367956 - EROFS vs. the latest util-linux and kernel
|
|
||||||
Patch2: 0001-libmount-disable-EROFS-backing-file-support.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The util-linux package contains a large variety of low-level system
|
The util-linux package contains a large variety of low-level system
|
||||||
|
|
@ -561,6 +553,7 @@ fi
|
||||||
%{_bindir}/colcrt
|
%{_bindir}/colcrt
|
||||||
%{_bindir}/colrm
|
%{_bindir}/colrm
|
||||||
%{_bindir}/column
|
%{_bindir}/column
|
||||||
|
%{_bindir}/copyfilerange
|
||||||
%{_bindir}/coresched
|
%{_bindir}/coresched
|
||||||
%{_bindir}/eject
|
%{_bindir}/eject
|
||||||
%{_bindir}/enosys
|
%{_bindir}/enosys
|
||||||
|
|
@ -568,6 +561,7 @@ fi
|
||||||
%{_bindir}/fallocate
|
%{_bindir}/fallocate
|
||||||
%{_bindir}/fincore
|
%{_bindir}/fincore
|
||||||
%{_bindir}/fadvise
|
%{_bindir}/fadvise
|
||||||
|
%{_bindir}/getino
|
||||||
%{_bindir}/getopt
|
%{_bindir}/getopt
|
||||||
%{_bindir}/hexdump
|
%{_bindir}/hexdump
|
||||||
%{_bindir}/irqtop
|
%{_bindir}/irqtop
|
||||||
|
|
@ -617,6 +611,7 @@ fi
|
||||||
%{_mandir}/man1/colcrt.1*
|
%{_mandir}/man1/colcrt.1*
|
||||||
%{_mandir}/man1/colrm.1*
|
%{_mandir}/man1/colrm.1*
|
||||||
%{_mandir}/man1/column.1*
|
%{_mandir}/man1/column.1*
|
||||||
|
%{_mandir}/man1/copyfilerange.1*
|
||||||
%{_mandir}/man1/coresched.1.*
|
%{_mandir}/man1/coresched.1.*
|
||||||
%{_mandir}/man1/eject.1*
|
%{_mandir}/man1/eject.1*
|
||||||
%{_mandir}/man1/enosys.1*
|
%{_mandir}/man1/enosys.1*
|
||||||
|
|
@ -624,6 +619,7 @@ fi
|
||||||
%{_mandir}/man1/fadvise.1*
|
%{_mandir}/man1/fadvise.1*
|
||||||
%{_mandir}/man1/fallocate.1*
|
%{_mandir}/man1/fallocate.1*
|
||||||
%{_mandir}/man1/fincore.1*
|
%{_mandir}/man1/fincore.1*
|
||||||
|
%{_mandir}/man1/getino.1*
|
||||||
%{_mandir}/man1/getopt.1*
|
%{_mandir}/man1/getopt.1*
|
||||||
%{_mandir}/man1/hexdump.1*
|
%{_mandir}/man1/hexdump.1*
|
||||||
%{_mandir}/man1/irqtop.1*
|
%{_mandir}/man1/irqtop.1*
|
||||||
|
|
@ -725,20 +721,21 @@ fi
|
||||||
%{_sbindir}/zramctl
|
%{_sbindir}/zramctl
|
||||||
|
|
||||||
%{compldir}/addpart
|
%{compldir}/addpart
|
||||||
%{compldir}/blkdiscard
|
|
||||||
%{compldir}/blkzone
|
|
||||||
%{compldir}/bits
|
%{compldir}/bits
|
||||||
|
%{compldir}/blkdiscard
|
||||||
%{compldir}/blkpr
|
%{compldir}/blkpr
|
||||||
|
%{compldir}/blkzone
|
||||||
%{compldir}/cal
|
%{compldir}/cal
|
||||||
%{compldir}/chcpu
|
%{compldir}/chcpu
|
||||||
%{compldir}/chfn
|
%{compldir}/chfn
|
||||||
%{compldir}/chmem
|
%{compldir}/chmem
|
||||||
|
%{compldir}/choom
|
||||||
%{compldir}/chsh
|
%{compldir}/chsh
|
||||||
%{compldir}/col
|
%{compldir}/col
|
||||||
%{compldir}/choom
|
|
||||||
%{compldir}/colcrt
|
%{compldir}/colcrt
|
||||||
%{compldir}/colrm
|
%{compldir}/colrm
|
||||||
%{compldir}/column
|
%{compldir}/column
|
||||||
|
%{compldir}/copyfilerange
|
||||||
%{compldir}/coresched
|
%{compldir}/coresched
|
||||||
%{compldir}/ctrlaltdel
|
%{compldir}/ctrlaltdel
|
||||||
%{compldir}/delpart
|
%{compldir}/delpart
|
||||||
|
|
@ -754,6 +751,7 @@ fi
|
||||||
%{compldir}/fsck.minix
|
%{compldir}/fsck.minix
|
||||||
%{compldir}/fsfreeze
|
%{compldir}/fsfreeze
|
||||||
%{compldir}/fstrim
|
%{compldir}/fstrim
|
||||||
|
%{compldir}/getino
|
||||||
%{compldir}/getopt
|
%{compldir}/getopt
|
||||||
%{compldir}/hexdump
|
%{compldir}/hexdump
|
||||||
%{compldir}/irqtop
|
%{compldir}/irqtop
|
||||||
|
|
@ -987,10 +985,12 @@ fi
|
||||||
%{_libdir}/pkgconfig/lastlog2.pc
|
%{_libdir}/pkgconfig/lastlog2.pc
|
||||||
%{_mandir}/man3/lastlog2.3.*
|
%{_mandir}/man3/lastlog2.3.*
|
||||||
%{_mandir}/man3/ll2_import_lastlog.3*
|
%{_mandir}/man3/ll2_import_lastlog.3*
|
||||||
|
%{_mandir}/man3/ll2_new_context.3*
|
||||||
%{_mandir}/man3/ll2_read_all.3*
|
%{_mandir}/man3/ll2_read_all.3*
|
||||||
%{_mandir}/man3/ll2_read_entry.3*
|
%{_mandir}/man3/ll2_read_entry.3*
|
||||||
%{_mandir}/man3/ll2_remove_entry.3*
|
%{_mandir}/man3/ll2_remove_entry.3*
|
||||||
%{_mandir}/man3/ll2_rename_user.3*
|
%{_mandir}/man3/ll2_rename_user.3*
|
||||||
|
%{_mandir}/man3/ll2_unref_context.3*
|
||||||
%{_mandir}/man3/ll2_update_login_time.3*
|
%{_mandir}/man3/ll2_update_login_time.3*
|
||||||
%{_mandir}/man3/ll2_write_entry.3*
|
%{_mandir}/man3/ll2_write_entry.3*
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue