sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Ismael Luceno (ca01ef7fae2d097b211f9c77cb37bca1f30ebab3)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (ca01ef7fae2d097b211f9c77cb37bca1f30ebab3)
- Date: Tue, 29 Mar 2022 21:31:23 +0000
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
ChangeLog |
3
kernels/dracut/DETAILS |
41 ++++++++++
kernels/dracut/HISTORY |
4
kernels/dracut/PRE_BUILD |
3
kernels/dracut/patches/0001-Wrap-__GLIBC_PREREQ-usage-with-__GLIBC__.patch |
36 ++++++++
5 files changed, 87 insertions(+)
New commits:
commit ca01ef7fae2d097b211f9c77cb37bca1f30ebab3
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
dracut: new spell, Initramfs generator
diff --git a/ChangeLog b/ChangeLog
index 483dc94..4deb326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2022-03-29 Ismael Luceno <ismael AT sourcemage.org>
+ * kernels/dracut: new spell, Initramfs generator
+
2022-03-24 Treeve Jelbert <treeve AT sourcemage.org>
* lxqt/FUNCTIONS: fix typo
diff --git a/kernels/dracut/DETAILS b/kernels/dracut/DETAILS
new file mode 100755
index 0000000..4986c72
--- /dev/null
+++ b/kernels/dracut/DETAILS
@@ -0,0 +1,41 @@
+ SPELL=dracut
+ VERSION=056
+ SOURCE="$SPELL-$VERSION.tar.xz"
+
SOURCE_URL[0]=https://mirrors.edge.kernel.org/pub/linux/utils/boot/$SPELL/$SOURCE
+
SOURCE_HASH=sha512:19268763e128984d20cab766bbdf2de12fe534ce2562fc688203099ef9b4cf83d0ccd2129499c70cdc6dd4ad53f0ffc2f3378eff5b8a15fda27c23b20f903df2
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+
WEB_SITE="https://mirrors.edge.kernel.org/pub/linux/utils/boot/dracut/dracut.html"
+ LICENSE[0]="GPL"
+ ENTERED=20220329
+ KEYWORDS=""
+ SHORT="Initramfs generator"
+cat << EOF
+Dracut builds a bootable initramfs. The initramfs responsible for mounting
+the root filesystem and starting the main init system.
+
+Many Linux distributions ship a single, generic kernel image that is intended
+to boot as wide a variety of hardware as possible. The device drivers for
+this generic kernel image are included as loadable modules, as it is not
+possible to statically compile them all into the one kernel without making it
+too large to boot from computers with limited memory or from lower-capacity
+media like floppy disks.
+
+This then raises the problem of detecting and loading the modules necessary
+to mount the root file system at boot time (or, for that matter, deducing
+where or what the root file system is).
+
+To further complicate matters, the root file system may be on a software RAID
+volume, LVM, NFS (on diskless workstations), or on an encrypted partition.
All
+of these require special preparations to mount.
+
+Another complication is kernel support for hibernation, which suspends
+the computer to disk by dumping an image of the entire system to a swap
+partition or a regular file, then powering off. On next boot, this image
+has to be made accessible before it can be loaded back into memory.
+
+To avoid having to hardcode handling for so many special cases into the
kernel,
+an initial boot stage with a temporary root file system -now dubbed early
+user space- is used. This root file system would contain user-space helpers
+that would do the hardware detection, module loading and device discovery
+necessary to get the real root file system mounted.
+EOF
diff --git a/kernels/dracut/HISTORY b/kernels/dracut/HISTORY
new file mode 100644
index 0000000..2463a8e
--- /dev/null
+++ b/kernels/dracut/HISTORY
@@ -0,0 +1,4 @@
+2022-03-29 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS, PRE_BUILD,
+ patches/0001-Wrap-__GLIBC_PREREQ-usage-with-__GLIBC__.patch:
+ spell created
diff --git a/kernels/dracut/PRE_BUILD b/kernels/dracut/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/kernels/dracut/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git
a/kernels/dracut/patches/0001-Wrap-__GLIBC_PREREQ-usage-with-__GLIBC__.patch
b/kernels/dracut/patches/0001-Wrap-__GLIBC_PREREQ-usage-with-__GLIBC__.patch
new file mode 100644
index 0000000..0db0238
--- /dev/null
+++
b/kernels/dracut/patches/0001-Wrap-__GLIBC_PREREQ-usage-with-__GLIBC__.patch
@@ -0,0 +1,36 @@
+From b2e028fe24259a3c87c3a8361edd3bc4cd87a42a Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Tue, 29 Mar 2022 18:26:14 +0200
+Subject: [PATCH] Wrap __GLIBC_PREREQ usage with __GLIBC__
+
+Fixes build against musl 1.2.2+; earlier versions don't implement it but
+there's no way to know it's presence other than an autoconf-style test.
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ src/install/util.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/install/util.c b/src/install/util.c
+index 5721de89ea68..57d0624f129d 100644
+--- a/src/install/util.c
++++ b/src/install/util.c
+@@ -27,6 +27,7 @@
+
+ #include "util.h"
+
++#ifdef __GLIBC__
+ #if __GLIBC_PREREQ(2, 30) == 0
+ #include <sys/syscall.h>
+ #ifndef SYS_gettid
+@@ -35,6 +36,7 @@
+
+ #define gettid() ((pid_t) syscall(SYS_gettid))
+ #endif /*__GLIBC_PREREQ */
++#endif /* __GLIBC__ */
+
+ size_t page_size(void)
+ {
+--
+2.35.1
+
- [SM-Commit] GIT changes to master grimoire by Ismael Luceno (ca01ef7fae2d097b211f9c77cb37bca1f30ebab3), Ismael Luceno, 03/29/2022
Archive powered by MHonArc 2.6.24.