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 |
10 changed files with 83 additions and 163 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -101,3 +101,8 @@
|
|||
/util-linux-2.40.4.tar.xz
|
||||
/util-linux-2.41.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.42.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,29 +0,0 @@
|
|||
From 4d2fc6b99db2f17a2562548af63454134ee910ec Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Tue, 24 Jun 2025 11:14:29 +0200
|
||||
Subject: [PATCH] ldattach: add ifndef BOTHER
|
||||
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
(cherry picked from commit 5405c3e09057db82ed397e61443effa9614dbc4a)
|
||||
---
|
||||
sys-utils/ldattach.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c
|
||||
index e06047c71..25903b4eb 100644
|
||||
--- a/sys-utils/ldattach.c
|
||||
+++ b/sys-utils/ldattach.c
|
||||
@@ -241,7 +241,9 @@ static int my_cfsetspeed(struct termios *ts, int speed)
|
||||
* checks for speed and supports Bxxx bit rates only)...
|
||||
*/
|
||||
#if _HAVE_STRUCT_TERMIOS_C_ISPEED
|
||||
-# define BOTHER 0010000 /* non standard rate */
|
||||
+# ifndef BOTHER
|
||||
+# define BOTHER 0010000 /* non standard rate */
|
||||
+# endif
|
||||
dbg("using non-standard speeds");
|
||||
ts->c_ospeed = ts->c_ispeed = speed;
|
||||
ts->c_cflag &= ~CBAUD;
|
||||
--
|
||||
2.49.0
|
||||
|
||||
|
|
@ -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.1.tar.xz) = 12cf37ab2d62d0378b16a40e0194ef7131ef1ad06737cca3f169cfc04b9da08a4233076c819b30705e8fb2c3b8d91a1d83aac4f036ce58b9cf5928f545e511a2
|
||||
SHA512 (util-linux-2.42.2.tar.xz) = 7415add0be2930654e322830808dde03ff6d511bd357f0679e6b6287a13ca79fe58ce4ac05edef86b76fb381b3a36ca2da9d3c31b5dc0a1d889c203156a57277
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#%PAM-1.0
|
||||
auth required pam_env.so
|
||||
auth sufficient pam_rootok.so
|
||||
# Uncomment the following line to implicitly trust users in the "wheel" group.
|
||||
#auth sufficient pam_wheel.so trust use_uid
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
### Header
|
||||
Summary: Collection of basic system utilities
|
||||
Name: util-linux
|
||||
Version: 2.41.1
|
||||
Version: 2.42.2
|
||||
# -p -e rc1
|
||||
Release: %autorelease -b7
|
||||
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
|
||||
URL: https://en.wikipedia.org/wiki/Util-linux
|
||||
|
||||
|
|
@ -44,7 +44,8 @@ BuildRequires: librtas-devel
|
|||
#BuildRequires: autoconf
|
||||
#BuildRequires: automake
|
||||
#BuildRequires: libtool
|
||||
#BuildRequires: bison
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
|
||||
### Sources
|
||||
Source0: https://www.kernel.org/pub/linux/utils/util-linux/v%{upstream_major}/util-linux-%{upstream_version}.tar.xz
|
||||
|
|
@ -102,20 +103,9 @@ Provides: /usr/sbin/runuser
|
|||
Provides: /usr/sbin/sfdisk
|
||||
%endif
|
||||
|
||||
### Ready for upstream?
|
||||
###
|
||||
# 151635 - makeing /var/log/lastlog
|
||||
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
|
||||
|
||||
# Upstream
|
||||
Patch3: 0001-ldattach-add-ifndef-BOTHER.patch
|
||||
### Fedora specific patches
|
||||
Patch0: 0000-login-use-O_CREAT-on-lastlog.patch
|
||||
Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch
|
||||
|
||||
%description
|
||||
The util-linux package contains a large variety of low-level system
|
||||
|
|
@ -398,7 +388,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps}
|
|||
# And a dirs that the makefiles don't create
|
||||
install -d %{buildroot}%{_rundir}/uuidd
|
||||
install -d %{buildroot}%{_sharedstatedir}/libuuid
|
||||
install -d %{buildroot}%{_sharedstatedir}/liblastlog
|
||||
install -d %{buildroot}%{_sharedstatedir}/lastlog
|
||||
|
||||
# /etc/adjtime
|
||||
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/adjtime
|
||||
|
|
@ -563,6 +553,7 @@ fi
|
|||
%{_bindir}/colcrt
|
||||
%{_bindir}/colrm
|
||||
%{_bindir}/column
|
||||
%{_bindir}/copyfilerange
|
||||
%{_bindir}/coresched
|
||||
%{_bindir}/eject
|
||||
%{_bindir}/enosys
|
||||
|
|
@ -570,6 +561,7 @@ fi
|
|||
%{_bindir}/fallocate
|
||||
%{_bindir}/fincore
|
||||
%{_bindir}/fadvise
|
||||
%{_bindir}/getino
|
||||
%{_bindir}/getopt
|
||||
%{_bindir}/hexdump
|
||||
%{_bindir}/irqtop
|
||||
|
|
@ -619,6 +611,7 @@ fi
|
|||
%{_mandir}/man1/colcrt.1*
|
||||
%{_mandir}/man1/colrm.1*
|
||||
%{_mandir}/man1/column.1*
|
||||
%{_mandir}/man1/copyfilerange.1*
|
||||
%{_mandir}/man1/coresched.1.*
|
||||
%{_mandir}/man1/eject.1*
|
||||
%{_mandir}/man1/enosys.1*
|
||||
|
|
@ -626,6 +619,7 @@ fi
|
|||
%{_mandir}/man1/fadvise.1*
|
||||
%{_mandir}/man1/fallocate.1*
|
||||
%{_mandir}/man1/fincore.1*
|
||||
%{_mandir}/man1/getino.1*
|
||||
%{_mandir}/man1/getopt.1*
|
||||
%{_mandir}/man1/hexdump.1*
|
||||
%{_mandir}/man1/irqtop.1*
|
||||
|
|
@ -727,17 +721,22 @@ fi
|
|||
%{_sbindir}/zramctl
|
||||
|
||||
%{compldir}/addpart
|
||||
%{compldir}/bits
|
||||
%{compldir}/blkdiscard
|
||||
%{compldir}/blkpr
|
||||
%{compldir}/blkzone
|
||||
%{compldir}/cal
|
||||
%{compldir}/chcpu
|
||||
%{compldir}/chfn
|
||||
%{compldir}/chmem
|
||||
%{compldir}/choom
|
||||
%{compldir}/chsh
|
||||
%{compldir}/col
|
||||
%{compldir}/colcrt
|
||||
%{compldir}/colrm
|
||||
%{compldir}/column
|
||||
%{compldir}/copyfilerange
|
||||
%{compldir}/coresched
|
||||
%{compldir}/ctrlaltdel
|
||||
%{compldir}/delpart
|
||||
%{compldir}/eject
|
||||
|
|
@ -752,6 +751,7 @@ fi
|
|||
%{compldir}/fsck.minix
|
||||
%{compldir}/fsfreeze
|
||||
%{compldir}/fstrim
|
||||
%{compldir}/getino
|
||||
%{compldir}/getopt
|
||||
%{compldir}/hexdump
|
||||
%{compldir}/irqtop
|
||||
|
|
@ -764,6 +764,7 @@ fi
|
|||
%{compldir}/lsblk
|
||||
%{compldir}/lscpu
|
||||
%{compldir}/lsclocks
|
||||
%{compldir}/lsfd
|
||||
%{compldir}/lsipc
|
||||
%{compldir}/lsirq
|
||||
%{compldir}/lslocks
|
||||
|
|
@ -970,7 +971,7 @@ fi
|
|||
|
||||
%files -n liblastlog2
|
||||
%license Documentation/licenses/COPYING.BSD-2-Clause
|
||||
%dir %{_sharedstatedir}/liblastlog
|
||||
%dir %{_sharedstatedir}/lastlog
|
||||
%{_libdir}/liblastlog2.so.*
|
||||
%{_pam_moduledir}/pam_lastlog2.so
|
||||
%{_tmpfilesdir}/lastlog2-tmpfiles.conf
|
||||
|
|
@ -984,10 +985,12 @@ fi
|
|||
%{_libdir}/pkgconfig/lastlog2.pc
|
||||
%{_mandir}/man3/lastlog2.3.*
|
||||
%{_mandir}/man3/ll2_import_lastlog.3*
|
||||
%{_mandir}/man3/ll2_new_context.3*
|
||||
%{_mandir}/man3/ll2_read_all.3*
|
||||
%{_mandir}/man3/ll2_read_entry.3*
|
||||
%{_mandir}/man3/ll2_remove_entry.3*
|
||||
%{_mandir}/man3/ll2_rename_user.3*
|
||||
%{_mandir}/man3/ll2_unref_context.3*
|
||||
%{_mandir}/man3/ll2_update_login_time.3*
|
||||
%{_mandir}/man3/ll2_write_entry.3*
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue