Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4689efd541 | ||
|
|
83269f896e | ||
|
|
81358f5edd |
4 changed files with 97 additions and 13 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -103,6 +103,5 @@
|
|||
/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
|
||||
/util-linux-2.41.4.tar.xz
|
||||
/util-linux-2.41.5.tar.xz
|
||||
|
|
|
|||
89
0002-libmount-disable-EROFS-backing-file-support.patch
Normal file
89
0002-libmount-disable-EROFS-backing-file-support.patch
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
From 93a62761843ff76187bd542fe717fa0c9b8f73a7 Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Tue, 24 Jun 2025 10:56:58 +0200
|
||||
Subject: 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 ee3eadb05..e1d06a61e 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.51.1
|
||||
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (util-linux-2.42.2.tar.xz) = 7415add0be2930654e322830808dde03ff6d511bd357f0679e6b6287a13ca79fe58ce4ac05edef86b76fb381b3a36ca2da9d3c31b5dc0a1d889c203156a57277
|
||||
SHA512 (util-linux-2.41.5.tar.xz) = 25e7e79e0f0a4711a15c16db05357755536cf4dc9c0ee28447d95f9bfc135f23075d434e107269a65148a8c16b37755e913aacbaec03a3bdce171a9e0a46bfe8
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
### Header
|
||||
Summary: Collection of basic system utilities
|
||||
Name: util-linux
|
||||
Version: 2.42.2
|
||||
Version: 2.41.5
|
||||
# -p -e rc1
|
||||
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
|
||||
|
|
@ -107,6 +107,10 @@ Provides: /usr/sbin/sfdisk
|
|||
Patch0: 0000-login-use-O_CREAT-on-lastlog.patch
|
||||
Patch1: 0001-login-add-run-motd.d-to-the-hardcoded-MOTD_FILE.patch
|
||||
|
||||
### Temporary dracut workaround
|
||||
Patch2: 0002-libmount-disable-EROFS-backing-file-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
|
||||
|
|
@ -553,7 +557,6 @@ fi
|
|||
%{_bindir}/colcrt
|
||||
%{_bindir}/colrm
|
||||
%{_bindir}/column
|
||||
%{_bindir}/copyfilerange
|
||||
%{_bindir}/coresched
|
||||
%{_bindir}/eject
|
||||
%{_bindir}/enosys
|
||||
|
|
@ -561,7 +564,6 @@ fi
|
|||
%{_bindir}/fallocate
|
||||
%{_bindir}/fincore
|
||||
%{_bindir}/fadvise
|
||||
%{_bindir}/getino
|
||||
%{_bindir}/getopt
|
||||
%{_bindir}/hexdump
|
||||
%{_bindir}/irqtop
|
||||
|
|
@ -611,7 +613,6 @@ 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*
|
||||
|
|
@ -619,7 +620,6 @@ 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*
|
||||
|
|
@ -735,7 +735,6 @@ fi
|
|||
%{compldir}/colcrt
|
||||
%{compldir}/colrm
|
||||
%{compldir}/column
|
||||
%{compldir}/copyfilerange
|
||||
%{compldir}/coresched
|
||||
%{compldir}/ctrlaltdel
|
||||
%{compldir}/delpart
|
||||
|
|
@ -751,7 +750,6 @@ fi
|
|||
%{compldir}/fsck.minix
|
||||
%{compldir}/fsfreeze
|
||||
%{compldir}/fstrim
|
||||
%{compldir}/getino
|
||||
%{compldir}/getopt
|
||||
%{compldir}/hexdump
|
||||
%{compldir}/irqtop
|
||||
|
|
@ -985,12 +983,10 @@ 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