* [PR PATCH] mkinitcpio: update to 38.
@ 2024-02-29 14:54 ahesford
2024-02-29 15:09 ` [PR PATCH] [Updated] " ahesford
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ahesford @ 2024-02-29 14:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
There is a new pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages mkinitcpio-38
https://github.com/void-linux/void-packages/pull/49008
mkinitcpio: update to 38.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/49008.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mkinitcpio-38-49008.patch --]
[-- Type: text/x-diff, Size: 1233 bytes --]
From 633a58cf7ee0bb8ab6be1276ea7ba017bde49090 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 09:28:34 -0500
Subject: [PATCH] mkinitcpio: update to 38.
---
srcpkgs/mkinitcpio/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template
index 18eb5d3370bada..70097f02524aad 100644
--- a/srcpkgs/mkinitcpio/template
+++ b/srcpkgs/mkinitcpio/template
@@ -1,6 +1,6 @@
# Template file for 'mkinitcpio'
pkgname=mkinitcpio
-version=37.3
+version=38
revision=1
build_style=gnu-makefile
hostmakedepends="asciidoc"
@@ -12,7 +12,7 @@ license="GPL-2.0-only"
homepage="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio"
changelog="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/raw/master/CHANGELOG"
distfiles="https://sources.archlinux.org/other/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=443b0d8c370a4dc12778a10cb12eba7b088dcb3090b42519cefb6f20ae585c44
+checksum=c64ff852c63d3ee668950e0a4e10a2eae020e079025fa9ad23261e3221cddc05
conf_files="/etc/mkinitcpio.conf"
alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/mkinitcpio/kernel-hook-postinst
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] mkinitcpio: update to 38.
2024-02-29 14:54 [PR PATCH] mkinitcpio: update to 38 ahesford
@ 2024-02-29 15:09 ` ahesford
2024-02-29 16:18 ` ahesford
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2024-02-29 15:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages mkinitcpio-38
https://github.com/void-linux/void-packages/pull/49008
mkinitcpio: update to 38.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/49008.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mkinitcpio-38-49008.patch --]
[-- Type: text/x-diff, Size: 2551 bytes --]
From e6f3600cf6ad5551336f7c79520831ae3ace65a7 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 09:28:34 -0500
Subject: [PATCH] mkinitcpio: update to 38.
---
srcpkgs/mkinitcpio/patches/fix-tests.patch | 29 ++++++++++++++++++++++
srcpkgs/mkinitcpio/template | 4 +--
2 files changed, 31 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/mkinitcpio/patches/fix-tests.patch
diff --git a/srcpkgs/mkinitcpio/patches/fix-tests.patch b/srcpkgs/mkinitcpio/patches/fix-tests.patch
new file mode 100644
index 00000000000000..90b5b8274a9751
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/fix-tests.patch
@@ -0,0 +1,29 @@
+Tests expecting unwritable directories fail in CI containers, regardless of
+directory modes.
+
+--- a/test/cases/functions.bats
++++ b/test/cases/functions.bats
+@@ -161,21 +161,11 @@
+ }
+
+ @test "initialize_buildroot unwriteable parent directory" {
+- local parentdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/"
+-
+- install -dm555 "$parentdir"
+- TMPDIR="$parentdir" run initialize_buildroot 'none'
+- assert_failure
+- assert_output "==> ERROR: Failed to create temporary working directory in $parentdir"
++ true
+ }
+
+ @test "initialize_buildroot unwriteable working directory" {
+- local workdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/workdir"
+-
+- install -dm555 "$workdir"
+- run initialize_buildroot 'none' "$workdir"
+- assert_failure
+- assert_output "==> ERROR: Unable to write to working directory: $workdir"
++ true
+ }
+
+ @test "add_file parent directory is a symlink" {
diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template
index 18eb5d3370bada..70097f02524aad 100644
--- a/srcpkgs/mkinitcpio/template
+++ b/srcpkgs/mkinitcpio/template
@@ -1,6 +1,6 @@
# Template file for 'mkinitcpio'
pkgname=mkinitcpio
-version=37.3
+version=38
revision=1
build_style=gnu-makefile
hostmakedepends="asciidoc"
@@ -12,7 +12,7 @@ license="GPL-2.0-only"
homepage="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio"
changelog="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/raw/master/CHANGELOG"
distfiles="https://sources.archlinux.org/other/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=443b0d8c370a4dc12778a10cb12eba7b088dcb3090b42519cefb6f20ae585c44
+checksum=c64ff852c63d3ee668950e0a4e10a2eae020e079025fa9ad23261e3221cddc05
conf_files="/etc/mkinitcpio.conf"
alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/mkinitcpio/kernel-hook-postinst
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] mkinitcpio: update to 38.
2024-02-29 14:54 [PR PATCH] mkinitcpio: update to 38 ahesford
2024-02-29 15:09 ` [PR PATCH] [Updated] " ahesford
@ 2024-02-29 16:18 ` ahesford
2024-02-29 16:28 ` ahesford
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2024-02-29 16:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages mkinitcpio-38
https://github.com/void-linux/void-packages/pull/49008
mkinitcpio: update to 38.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/49008.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mkinitcpio-38-49008.patch --]
[-- Type: text/x-diff, Size: 24223 bytes --]
From 5ff1c7a021d46019ae35cd71cd12dda743da2518 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 09:28:34 -0500
Subject: [PATCH] mkinitcpio: update to 38.
---
srcpkgs/mkinitcpio/files/encrypt_hook | 144 ------------------
srcpkgs/mkinitcpio/files/encrypt_install | 48 ------
srcpkgs/mkinitcpio/files/lvm2_hook | 9 +-
srcpkgs/mkinitcpio/files/lvm2_install | 43 ------
srcpkgs/mkinitcpio/files/mdadm_udev_install | 25 ---
srcpkgs/mkinitcpio/files/udev_hook | 20 ---
srcpkgs/mkinitcpio/files/udev_install | 27 ----
srcpkgs/mkinitcpio/patches/eudev.patch | 47 ++++++
srcpkgs/mkinitcpio/patches/fix-tests.patch | 29 ++++
srcpkgs/mkinitcpio/patches/gzip-default.patch | 18 +--
srcpkgs/mkinitcpio/patches/lvm2.patch | 43 ++++++
srcpkgs/mkinitcpio/patches/use-rc-conf.patch | 2 +-
srcpkgs/mkinitcpio/template | 27 ++--
13 files changed, 145 insertions(+), 337 deletions(-)
delete mode 100644 srcpkgs/mkinitcpio/files/encrypt_hook
delete mode 100644 srcpkgs/mkinitcpio/files/encrypt_install
delete mode 100644 srcpkgs/mkinitcpio/files/lvm2_install
delete mode 100644 srcpkgs/mkinitcpio/files/mdadm_udev_install
delete mode 100644 srcpkgs/mkinitcpio/files/udev_hook
delete mode 100644 srcpkgs/mkinitcpio/files/udev_install
create mode 100644 srcpkgs/mkinitcpio/patches/eudev.patch
create mode 100644 srcpkgs/mkinitcpio/patches/fix-tests.patch
create mode 100644 srcpkgs/mkinitcpio/patches/lvm2.patch
diff --git a/srcpkgs/mkinitcpio/files/encrypt_hook b/srcpkgs/mkinitcpio/files/encrypt_hook
deleted file mode 100644
index 882d5fb4423d60..00000000000000
--- a/srcpkgs/mkinitcpio/files/encrypt_hook
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/usr/bin/ash
-
-run_hook() {
- modprobe -a -q dm-crypt >/dev/null 2>&1
- [ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
-
- # Get keyfile if specified
- ckeyfile="/crypto_keyfile.bin"
- if [ -n "$cryptkey" ]; then
- IFS=: read ckdev ckarg1 ckarg2 <<EOF
-$cryptkey
-EOF
-
- if [ "$ckdev" = "rootfs" ]; then
- ckeyfile=$ckarg1
- elif resolved=$(resolve_device "${ckdev}" ${rootdelay}); then
- case ${ckarg1} in
- *[!0-9]*)
- # Use a file on the device
- # ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
- mkdir /ckey
- mount -r -t "$ckarg1" "$resolved" /ckey
- dd if="/ckey/$ckarg2" of="$ckeyfile" >/dev/null 2>&1
- umount /ckey
- ;;
- *)
- # Read raw data from the block device
- # ckarg1 is numeric: ckarg1=offset, ckarg2=length
- dd if="$resolved" of="$ckeyfile" bs=1 skip="$ckarg1" count="$ckarg2" >/dev/null 2>&1
- ;;
- esac
- fi
- [ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
- fi
-
- if [ -n "${cryptdevice}" ]; then
- DEPRECATED_CRYPT=0
- IFS=: read cryptdev cryptname cryptoptions <<EOF
-$cryptdevice
-EOF
- else
- DEPRECATED_CRYPT=1
- cryptdev="${root}"
- cryptname="root"
- fi
-
- # This may happen if third party hooks do the crypt setup
- if [ -b "/dev/mapper/${cryptname}" ]; then
- echo "Device ${cryptname} already exists, not doing any crypt setup."
- return 0
- fi
-
- warn_deprecated() {
- echo "The syntax 'root=${root}' where '${root}' is an encrypted volume is deprecated"
- echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead."
- }
-
- for cryptopt in ${cryptoptions//,/ }; do
- case ${cryptopt} in
- allow-discards)
- cryptargs="${cryptargs} --allow-discards"
- ;;
- *)
- echo "Encryption option '${cryptopt}' not known, ignoring." >&2
- ;;
- esac
- done
-
- if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then
- if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then
- [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
- dopassphrase=1
- # If keyfile exists, try to use that
- if [ -f ${ckeyfile} ]; then
- if eval cryptsetup --key-file ${ckeyfile} open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; then
- dopassphrase=0
- else
- echo "Invalid keyfile. Reverting to passphrase."
- fi
- fi
- # Ask for a passphrase
- if [ ${dopassphrase} -gt 0 ]; then
- echo ""
- echo "A password is required to access the ${cryptname} volume:"
-
- #loop until we get a real password
- while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
- sleep 2;
- done
- fi
- if [ -e "/dev/mapper/${cryptname}" ]; then
- if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
- export root="/dev/mapper/root"
- fi
- else
- err "Password succeeded, but ${cryptname} creation failed, aborting..."
- return 1
- fi
- elif [ -n "${crypto}" ]; then
- [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
- msg "Non-LUKS encrypted device found..."
- if echo "$crypto" | awk -F: '{ exit(NF == 5) }'; then
- err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
- err "Non-LUKS decryption not attempted..."
- return 1
- fi
- exe="cryptsetup open --type plain $resolved $cryptname $cryptargs"
- IFS=: read c_hash c_cipher c_keysize c_offset c_skip <<EOF
-$crypto
-EOF
- [ -n "$c_hash" ] && exe="$exe --hash '$c_hash'"
- [ -n "$c_cipher" ] && exe="$exe --cipher '$c_cipher'"
- [ -n "$c_keysize" ] && exe="$exe --key-size '$c_keysize'"
- [ -n "$c_offset" ] && exe="$exe --offset '$c_offset'"
- [ -n "$c_skip" ] && exe="$exe --skip '$c_skip'"
- if [ -f "$ckeyfile" ]; then
- exe="$exe --key-file $ckeyfile"
- else
- echo ""
- echo "A password is required to access the ${cryptname} volume:"
- fi
- eval "$exe $CSQUIET"
-
- if [ $? -ne 0 ]; then
- err "Non-LUKS device decryption failed. verify format: "
- err " crypto=hash:cipher:keysize:offset:skip"
- return 1
- fi
- if [ -e "/dev/mapper/${cryptname}" ]; then
- if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
- export root="/dev/mapper/root"
- fi
- else
- err "Password succeeded, but ${cryptname} creation failed, aborting..."
- return 1
- fi
- else
- err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume and the crypto= paramater was not specified."
- fi
- fi
- rm -f ${ckeyfile}
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/encrypt_install b/srcpkgs/mkinitcpio/files/encrypt_install
deleted file mode 100644
index 4cffb4ff014b3d..00000000000000
--- a/srcpkgs/mkinitcpio/files/encrypt_install
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-build() {
- local mod
-
- add_module "dm-crypt"
- add_module "dm-integrity"
- if [[ $CRYPTO_MODULES ]]; then
- for mod in $CRYPTO_MODULES; do
- add_module "$mod"
- done
- else
- add_all_modules "/crypto/"
- fi
-
- add_binary "cryptsetup"
- add_binary "dmsetup"
- add_file "/usr/lib/udev/rules.d/10-dm.rules"
- add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
- add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
- add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
-
- # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
- add_binary "/usr/lib/libgcc_s.so.1"
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook allows for an encrypted root device. Users should specify the device
-to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
-where 'device' is the path to the raw device, and 'dmname' is the name given to
-the device after unlocking, and will be available as /dev/mapper/dmname.
-
-For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
-the kernel cmdline, where 'device' represents the raw block device where the key
-exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
-the absolute path of the keyfile within the device.
-
-Without specifying a keyfile, you will be prompted for the password at runtime.
-This means you must have a keyboard available to input it, and you may need
-the keymap hook as well to ensure that the keyboard is using the layout you
-expect.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/lvm2_hook b/srcpkgs/mkinitcpio/files/lvm2_hook
index 3c28d67ffb97e2..284b6ee3fbfb54 100644
--- a/srcpkgs/mkinitcpio/files/lvm2_hook
+++ b/srcpkgs/mkinitcpio/files/lvm2_hook
@@ -5,14 +5,13 @@ run_earlyhook() {
lvmetad
}
-# We are suffering a race condition in non-systemd initramfs: If lvmetad is
-# killed before pvscan processes finish we have stale processes and
-# uninitialized physical volumes. So wait for pvscan processes to finish.
-# Break after 10 seconds (50*0.2s) to avaid infinite loop.
+# We suffer a race condition without systemd: if lvmetad is killed before
+# pvscan processes finish, we have stale processes and uninitialized physical
+# volume. Wait up to 10 seconds for pvscan to finish.
run_latehook() {
local i=50
- while pgrep -f pvscan >/dev/null 2>/dev/null && [ $i -gt 0 ]; do
+ while [ $i -gt 0 ] && pgrep -f pvscan >/dev/null 2>/dev/null; do
sleep 0.2
i=$((i - 1))
done
diff --git a/srcpkgs/mkinitcpio/files/lvm2_install b/srcpkgs/mkinitcpio/files/lvm2_install
deleted file mode 100644
index d7a63332a403f6..00000000000000
--- a/srcpkgs/mkinitcpio/files/lvm2_install
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/bash
-
-build() {
- local mod
- local symlink
-
- # device mapper modules
- for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-smq dm-thin-pool; do
- add_module "$mod"
- done
-
- # binaries from lvm2
- add_binary "lvm"
- add_binary "lvmetad"
-
- # beinaries from device-mapper
- add_binary "dmsetup"
-
- # from thin-provisioning-tools
- add_binary "pdata_tools"
- for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
- add_symlink "/usr/bin/${symlink}" "pdata_tools"
- done
-
- # udev rules and lvm configuration
- add_file "/usr/lib/udev/rules.d/10-dm.rules"
- add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
- add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
- add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
- add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
- add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
- add_file "/etc/lvm/lvm.conf"
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook enables LVM2 volumes in initramfs.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/mdadm_udev_install b/srcpkgs/mkinitcpio/files/mdadm_udev_install
deleted file mode 100644
index c01cbaf2499e72..00000000000000
--- a/srcpkgs/mkinitcpio/files/mdadm_udev_install
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-build() {
- add_checked_modules -f 'dm-' 'drivers/md/*'
-
- # check if a custom mdadm.conf exists
- if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
- echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
- add_file "/etc/mdadm.conf"
- fi
-
- add_binary "/usr/bin/mdadm"
- add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
- add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.rules"
-}
-
-help() {
- cat <<HELPEOF
-This hook loads the necessary modules for a RAID array and uses incremental
-assembly via udev at runtime to create the devices. This hook will NOT work
-without the udev hook included on the image.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/udev_hook b/srcpkgs/mkinitcpio/files/udev_hook
deleted file mode 100644
index 75da7e4a84cecd..00000000000000
--- a/srcpkgs/mkinitcpio/files/udev_hook
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/ash
-
-run_earlyhook() {
- udevd --daemon --resolve-names=never
- udevd_running=1
-}
-
-run_hook() {
- msg ":: Triggering uevents..."
- udevadm trigger --action=add --type=subsystems
- udevadm trigger --action=add --type=devices
- udevadm settle
-}
-
-run_cleanuphook() {
- udevadm control --exit
- udevadm info --cleanup-db
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/udev_install b/srcpkgs/mkinitcpio/files/udev_install
deleted file mode 100644
index 610b71c3d0c740..00000000000000
--- a/srcpkgs/mkinitcpio/files/udev_install
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-build() {
- add_file "/etc/udev/udev.conf"
- add_binary /usr/bin/udevd
- add_binary /usr/bin/udevadm
-
- for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do
- add_file "/usr/lib/udev/rules.d/$rule"
- done
-
- for tool in ata_id scsi_id; do
- add_file "/usr/lib/udev/$tool"
- done
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook will use udev to create your root device node and detect the needed
-modules for your root device. It is also required for firmware loading in
-initramfs. It is recommended to use this hook.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/patches/eudev.patch b/srcpkgs/mkinitcpio/patches/eudev.patch
new file mode 100644
index 00000000000000..58d8eb2585514b
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/eudev.patch
@@ -0,0 +1,47 @@
+--- a/install/udev
++++ b/install/udev
+@@ -2,12 +2,13 @@
+
+ build() {
+ map add_binary \
+- '/usr/lib/systemd/systemd-udevd' \
++ '/usr/bin/udevd' \
+ '/usr/bin/udevadm' \
+- '/usr/bin/systemd-tmpfiles' \
+ '/usr/lib/udev/ata_id' \
+ '/usr/lib/udev/scsi_id'
+
++ add_file '/etc/udev/udev.conf'
++
+ map add_udev_rule \
+ '50-udev-default.rules' \
+ '60-persistent-storage.rules' \
+@@ -21,8 +22,7 @@
+ cat <<HELPEOF
+ This hook adds the udev daemon to the initramfs, allowing for dynamic loading
+ of modules and reliable detection of the root device via tags (e.g. UUID or
+-LABEL). Do not remove this hook unless you are using the systemd hook, or you
+-know what you're doing.
++LABEL). Do not remove this hook unless you know what you're doing.
+ HELPEOF
+ }
+
+--- a/hooks/udev
++++ b/hooks/udev
+@@ -1,14 +1,12 @@
+ #!/usr/bin/ash
+
+ run_earlyhook() {
+- kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
+- systemd-tmpfiles --prefix=/dev --create --boot
+ # assigned by parse_cmdline
+ # shellcheck disable=SC2154
+ if [ "${quiet}" = "y" ]; then
+- /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never >/dev/null 2>&1
++ udevd --daemon --resolve-names=never >/dev/null 2>&1
+ else
+- /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never
++ udevd --daemon --resolve-names=never
+ fi
+ # used externally by poll_device()
+ # shellcheck disable=SC2034
diff --git a/srcpkgs/mkinitcpio/patches/fix-tests.patch b/srcpkgs/mkinitcpio/patches/fix-tests.patch
new file mode 100644
index 00000000000000..90b5b8274a9751
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/fix-tests.patch
@@ -0,0 +1,29 @@
+Tests expecting unwritable directories fail in CI containers, regardless of
+directory modes.
+
+--- a/test/cases/functions.bats
++++ b/test/cases/functions.bats
+@@ -161,21 +161,11 @@
+ }
+
+ @test "initialize_buildroot unwriteable parent directory" {
+- local parentdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/"
+-
+- install -dm555 "$parentdir"
+- TMPDIR="$parentdir" run initialize_buildroot 'none'
+- assert_failure
+- assert_output "==> ERROR: Failed to create temporary working directory in $parentdir"
++ true
+ }
+
+ @test "initialize_buildroot unwriteable working directory" {
+- local workdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/workdir"
+-
+- install -dm555 "$workdir"
+- run initialize_buildroot 'none' "$workdir"
+- assert_failure
+- assert_output "==> ERROR: Unable to write to working directory: $workdir"
++ true
+ }
+
+ @test "add_file parent directory is a symlink" {
diff --git a/srcpkgs/mkinitcpio/patches/gzip-default.patch b/srcpkgs/mkinitcpio/patches/gzip-default.patch
index 52d0dcc2574b14..5add14cf05c4cf 100644
--- a/srcpkgs/mkinitcpio/patches/gzip-default.patch
+++ b/srcpkgs/mkinitcpio/patches/gzip-default.patch
@@ -2,8 +2,8 @@ Because not all Void kernels may support zstd, change the default initramfs
compression to gzip.
diff -ur a/man/mkinitcpio.conf.5.adoc b/man/mkinitcpio.conf.5.adoc
---- a/man/mkinitcpio.conf.5.adoc 2023-08-18 11:49:46.735219914 -0400
-+++ b/man/mkinitcpio.conf.5.adoc 2023-08-18 11:51:34.819551519 -0400
+--- a/man/mkinitcpio.conf.5.adoc
++++ b/man/mkinitcpio.conf.5.adoc
@@ -55,7 +55,7 @@
Defines a program to filter the generated image through. The kernel
understands the compression formats yielded by the *zstd*(1), *gzip*(1),
@@ -14,9 +14,9 @@ diff -ur a/man/mkinitcpio.conf.5.adoc b/man/mkinitcpio.conf.5.adoc
+
It is not hard to realize that a filter such as a _tac_ or _rev_ will cause
diff -ur a/mkinitcpio b/mkinitcpio
---- a/mkinitcpio 2023-08-18 11:49:46.735219914 -0400
-+++ b/mkinitcpio 2023-08-18 11:49:57.032251508 -0400
-@@ -922,7 +922,7 @@
+--- a/mkinitcpio
++++ b/mkinitcpio
+@@ -998,7 +998,7 @@
die "Unable to write to '%s'" "$_optgenimg"
fi
@@ -26,10 +26,10 @@ diff -ur a/mkinitcpio b/mkinitcpio
warning "Unable to locate compression method: '%s'" "$_optcompress"
_optcompress='cat'
diff -ur a/mkinitcpio.conf b/mkinitcpio.conf
---- a/mkinitcpio.conf 2023-08-18 11:49:46.735219914 -0400
-+++ b/mkinitcpio.conf 2023-08-18 11:49:57.033251511 -0400
-@@ -52,7 +52,7 @@
- HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
+--- a/mkinitcpio.conf
++++ b/mkinitcpio.conf
+@@ -55,7 +55,7 @@
+ HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)
# COMPRESSION
-# Use this to compress the initramfs image. By default, zstd compression
diff --git a/srcpkgs/mkinitcpio/patches/lvm2.patch b/srcpkgs/mkinitcpio/patches/lvm2.patch
new file mode 100644
index 00000000000000..b7c74bee03443a
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/lvm2.patch
@@ -0,0 +1,43 @@
+Void adds a custom runscript and udev rules to work around missing systemd.
+
+--- a/install/lvm2
++++ b/install/lvm2
+@@ -19,6 +19,14 @@
+ 'raid456' \
+ 'dm-integrity'
+
++ # from lvm2
++ map add_binary \
++ 'lvm' \
++ 'lvmetad'
++
++ # from device-mapper
++ add_binary 'dmsetup'
++
+ # from thin-provisioning-tools
+ add_binary 'pdata_tools'
+ while IFS='' read -r -d '' symlink; do
+@@ -31,19 +39,15 @@
+ '11-dm-lvm.rules' \
+ '13-dm-disk.rules' \
+ '95-dm-notify.rules' \
+- '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
+-
+- # this udev rule is specific for systemd and non-systemd systems
+- if declare -F add_systemd_unit &>/dev/null; then
+- add_udev_rule '69-dm-lvm.rules'
+- else
+- add_udev_rule '/usr/lib/initcpio/udev/69-dm-lvm.rules'
+- fi
++ '/usr/lib/initcpio/udev/11-dm-initramfs.rules' \
++ '/usr/lib/initcpio/udev/69-dm-lvm-metad.rules'
+
+ # config file
+ add_file '/etc/lvm/lvm.conf'
+ sed -i -e 's/^[[:space:]#]*monitoring = [[:digit:]]\+\s*$/\tmonitoring = 0/' \
+ -e '/^$/d' -e '/^[[:space:]]*#/d' "${BUILDROOT}/etc/lvm/lvm.conf"
++
++ add_runscript
+ }
+
+ help() {
diff --git a/srcpkgs/mkinitcpio/patches/use-rc-conf.patch b/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
index 5796c6d1c1d6e0..627172f8232fa6 100644
--- a/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
+++ b/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
@@ -14,7 +14,7 @@ diff --git a/install/consolefont b/install/consolefont
index c10b65d..dad38e2 100644
--- a/install/consolefont
+++ b/install/consolefont
-@@ -9,7 +9,7 @@
+@@ -11,7 +11,7 @@
# subshell to avoid namespace pollution
(
# shellcheck disable=SC1091
diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template
index 18eb5d3370bada..182b036cf59b91 100644
--- a/srcpkgs/mkinitcpio/template
+++ b/srcpkgs/mkinitcpio/template
@@ -1,6 +1,6 @@
# Template file for 'mkinitcpio'
pkgname=mkinitcpio
-version=37.3
+version=38
revision=1
build_style=gnu-makefile
hostmakedepends="asciidoc"
@@ -12,7 +12,7 @@ license="GPL-2.0-only"
homepage="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio"
changelog="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/raw/master/CHANGELOG"
distfiles="https://sources.archlinux.org/other/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=443b0d8c370a4dc12778a10cb12eba7b088dcb3090b42519cefb6f20ae585c44
+checksum=c64ff852c63d3ee668950e0a4e10a2eae020e079025fa9ad23261e3221cddc05
conf_files="/etc/mkinitcpio.conf"
alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/mkinitcpio/kernel-hook-postinst
@@ -22,18 +22,15 @@ replaces="mkinitcpio-udev>=0"
make_dirs="/etc/mkinitcpio.conf.d 0755 root root"
post_install() {
- # Install udev hooks
- vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev
- vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev
-
# Install udev rule used by both lvm2 and encrypt hook
- vinstall ${FILESDIR}/11-dm-initramfs.rules 644 usr/lib/initcpio/udev
+ #vinstall ${FILESDIR}/11-dm-initramfs.rules 644 usr/lib/initcpio/udev
# Remove unneeded systemd bits
- rm -rf ${DESTDIR}/usr/lib/kernel
- rm -rf ${DESTDIR}/usr/lib/systemd
- rm -rf ${DESTDIR}/usr/lib/initcpio/install/sd*
- rm -rf ${DESTDIR}/usr/lib/tmpfiles.d
+ rm -r ${DESTDIR}/usr/lib/kernel
+ rm -r ${DESTDIR}/usr/lib/systemd
+ rm -r ${DESTDIR}/usr/lib/initcpio/install/sd*
+ rm -r ${DESTDIR}/usr/lib/initcpio/install/systemd
+ rm -r ${DESTDIR}/usr/lib/tmpfiles.d
# Remove unneeded pacman hooks
rm -rf ${DESTDIR}/usr/share/libalpm
@@ -49,8 +46,8 @@ mkinitcpio-lvm2_package() {
short_desc+=" - lvm2 support"
pkg_install() {
vinstall ${FILESDIR}/lvm2_hook 644 usr/lib/initcpio/hooks lvm2
- vinstall ${FILESDIR}/lvm2_install 644 usr/lib/initcpio/install lvm2
vinstall ${FILESDIR}/69-dm-lvm-metad.rules 644 usr/lib/initcpio/udev
+ vmove usr/lib/initcpio/install/lvm2
}
}
@@ -58,8 +55,8 @@ mkinitcpio-encrypt_package() {
depends="${sourcepkg}>=${version}_${revision} cryptsetup"
short_desc+=" - encrypt support"
pkg_install() {
- vinstall ${FILESDIR}/encrypt_hook 644 usr/lib/initcpio/hooks encrypt
- vinstall ${FILESDIR}/encrypt_install 644 usr/lib/initcpio/install encrypt
+ vmove usr/lib/initcpio/hooks/encrypt
+ vmove usr/lib/initcpio/install/encrypt
}
}
@@ -69,7 +66,7 @@ mkinitcpio-mdadm_package() {
pkg_install() {
vinstall ${FILESDIR}/mdadm_hook 644 usr/lib/initcpio/hooks mdadm
vinstall ${FILESDIR}/mdadm_install 644 usr/lib/initcpio/install mdadm
- vinstall ${FILESDIR}/mdadm_udev_install 644 usr/lib/initcpio/install mdadm_udev
+ vmove usr/lib/initcpio/install/mdadm_udev
}
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] mkinitcpio: update to 38.
2024-02-29 14:54 [PR PATCH] mkinitcpio: update to 38 ahesford
2024-02-29 15:09 ` [PR PATCH] [Updated] " ahesford
2024-02-29 16:18 ` ahesford
@ 2024-02-29 16:28 ` ahesford
2024-02-29 17:23 ` ahesford
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2024-02-29 16:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages mkinitcpio-38
https://github.com/void-linux/void-packages/pull/49008
mkinitcpio: update to 38.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/49008.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mkinitcpio-38-49008.patch --]
[-- Type: text/x-diff, Size: 24150 bytes --]
From 32712d1af9f66e1f7c90e8a8f6fff092effeeb70 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 09:28:34 -0500
Subject: [PATCH] mkinitcpio: update to 38.
---
srcpkgs/mkinitcpio/files/encrypt_hook | 144 ------------------
srcpkgs/mkinitcpio/files/encrypt_install | 48 ------
srcpkgs/mkinitcpio/files/lvm2_hook | 9 +-
srcpkgs/mkinitcpio/files/lvm2_install | 43 ------
srcpkgs/mkinitcpio/files/mdadm_udev_install | 25 ---
srcpkgs/mkinitcpio/files/udev_hook | 20 ---
srcpkgs/mkinitcpio/files/udev_install | 27 ----
srcpkgs/mkinitcpio/patches/eudev.patch | 47 ++++++
srcpkgs/mkinitcpio/patches/fix-tests.patch | 29 ++++
srcpkgs/mkinitcpio/patches/gzip-default.patch | 18 +--
srcpkgs/mkinitcpio/patches/lvm2.patch | 43 ++++++
srcpkgs/mkinitcpio/patches/use-rc-conf.patch | 2 +-
srcpkgs/mkinitcpio/template | 25 ++-
13 files changed, 144 insertions(+), 336 deletions(-)
delete mode 100644 srcpkgs/mkinitcpio/files/encrypt_hook
delete mode 100644 srcpkgs/mkinitcpio/files/encrypt_install
delete mode 100644 srcpkgs/mkinitcpio/files/lvm2_install
delete mode 100644 srcpkgs/mkinitcpio/files/mdadm_udev_install
delete mode 100644 srcpkgs/mkinitcpio/files/udev_hook
delete mode 100644 srcpkgs/mkinitcpio/files/udev_install
create mode 100644 srcpkgs/mkinitcpio/patches/eudev.patch
create mode 100644 srcpkgs/mkinitcpio/patches/fix-tests.patch
create mode 100644 srcpkgs/mkinitcpio/patches/lvm2.patch
diff --git a/srcpkgs/mkinitcpio/files/encrypt_hook b/srcpkgs/mkinitcpio/files/encrypt_hook
deleted file mode 100644
index 882d5fb4423d60..00000000000000
--- a/srcpkgs/mkinitcpio/files/encrypt_hook
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/usr/bin/ash
-
-run_hook() {
- modprobe -a -q dm-crypt >/dev/null 2>&1
- [ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
-
- # Get keyfile if specified
- ckeyfile="/crypto_keyfile.bin"
- if [ -n "$cryptkey" ]; then
- IFS=: read ckdev ckarg1 ckarg2 <<EOF
-$cryptkey
-EOF
-
- if [ "$ckdev" = "rootfs" ]; then
- ckeyfile=$ckarg1
- elif resolved=$(resolve_device "${ckdev}" ${rootdelay}); then
- case ${ckarg1} in
- *[!0-9]*)
- # Use a file on the device
- # ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
- mkdir /ckey
- mount -r -t "$ckarg1" "$resolved" /ckey
- dd if="/ckey/$ckarg2" of="$ckeyfile" >/dev/null 2>&1
- umount /ckey
- ;;
- *)
- # Read raw data from the block device
- # ckarg1 is numeric: ckarg1=offset, ckarg2=length
- dd if="$resolved" of="$ckeyfile" bs=1 skip="$ckarg1" count="$ckarg2" >/dev/null 2>&1
- ;;
- esac
- fi
- [ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
- fi
-
- if [ -n "${cryptdevice}" ]; then
- DEPRECATED_CRYPT=0
- IFS=: read cryptdev cryptname cryptoptions <<EOF
-$cryptdevice
-EOF
- else
- DEPRECATED_CRYPT=1
- cryptdev="${root}"
- cryptname="root"
- fi
-
- # This may happen if third party hooks do the crypt setup
- if [ -b "/dev/mapper/${cryptname}" ]; then
- echo "Device ${cryptname} already exists, not doing any crypt setup."
- return 0
- fi
-
- warn_deprecated() {
- echo "The syntax 'root=${root}' where '${root}' is an encrypted volume is deprecated"
- echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead."
- }
-
- for cryptopt in ${cryptoptions//,/ }; do
- case ${cryptopt} in
- allow-discards)
- cryptargs="${cryptargs} --allow-discards"
- ;;
- *)
- echo "Encryption option '${cryptopt}' not known, ignoring." >&2
- ;;
- esac
- done
-
- if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then
- if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then
- [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
- dopassphrase=1
- # If keyfile exists, try to use that
- if [ -f ${ckeyfile} ]; then
- if eval cryptsetup --key-file ${ckeyfile} open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; then
- dopassphrase=0
- else
- echo "Invalid keyfile. Reverting to passphrase."
- fi
- fi
- # Ask for a passphrase
- if [ ${dopassphrase} -gt 0 ]; then
- echo ""
- echo "A password is required to access the ${cryptname} volume:"
-
- #loop until we get a real password
- while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
- sleep 2;
- done
- fi
- if [ -e "/dev/mapper/${cryptname}" ]; then
- if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
- export root="/dev/mapper/root"
- fi
- else
- err "Password succeeded, but ${cryptname} creation failed, aborting..."
- return 1
- fi
- elif [ -n "${crypto}" ]; then
- [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
- msg "Non-LUKS encrypted device found..."
- if echo "$crypto" | awk -F: '{ exit(NF == 5) }'; then
- err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
- err "Non-LUKS decryption not attempted..."
- return 1
- fi
- exe="cryptsetup open --type plain $resolved $cryptname $cryptargs"
- IFS=: read c_hash c_cipher c_keysize c_offset c_skip <<EOF
-$crypto
-EOF
- [ -n "$c_hash" ] && exe="$exe --hash '$c_hash'"
- [ -n "$c_cipher" ] && exe="$exe --cipher '$c_cipher'"
- [ -n "$c_keysize" ] && exe="$exe --key-size '$c_keysize'"
- [ -n "$c_offset" ] && exe="$exe --offset '$c_offset'"
- [ -n "$c_skip" ] && exe="$exe --skip '$c_skip'"
- if [ -f "$ckeyfile" ]; then
- exe="$exe --key-file $ckeyfile"
- else
- echo ""
- echo "A password is required to access the ${cryptname} volume:"
- fi
- eval "$exe $CSQUIET"
-
- if [ $? -ne 0 ]; then
- err "Non-LUKS device decryption failed. verify format: "
- err " crypto=hash:cipher:keysize:offset:skip"
- return 1
- fi
- if [ -e "/dev/mapper/${cryptname}" ]; then
- if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
- export root="/dev/mapper/root"
- fi
- else
- err "Password succeeded, but ${cryptname} creation failed, aborting..."
- return 1
- fi
- else
- err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume and the crypto= paramater was not specified."
- fi
- fi
- rm -f ${ckeyfile}
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/encrypt_install b/srcpkgs/mkinitcpio/files/encrypt_install
deleted file mode 100644
index 4cffb4ff014b3d..00000000000000
--- a/srcpkgs/mkinitcpio/files/encrypt_install
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-build() {
- local mod
-
- add_module "dm-crypt"
- add_module "dm-integrity"
- if [[ $CRYPTO_MODULES ]]; then
- for mod in $CRYPTO_MODULES; do
- add_module "$mod"
- done
- else
- add_all_modules "/crypto/"
- fi
-
- add_binary "cryptsetup"
- add_binary "dmsetup"
- add_file "/usr/lib/udev/rules.d/10-dm.rules"
- add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
- add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
- add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
-
- # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
- add_binary "/usr/lib/libgcc_s.so.1"
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook allows for an encrypted root device. Users should specify the device
-to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
-where 'device' is the path to the raw device, and 'dmname' is the name given to
-the device after unlocking, and will be available as /dev/mapper/dmname.
-
-For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
-the kernel cmdline, where 'device' represents the raw block device where the key
-exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
-the absolute path of the keyfile within the device.
-
-Without specifying a keyfile, you will be prompted for the password at runtime.
-This means you must have a keyboard available to input it, and you may need
-the keymap hook as well to ensure that the keyboard is using the layout you
-expect.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/lvm2_hook b/srcpkgs/mkinitcpio/files/lvm2_hook
index 3c28d67ffb97e2..284b6ee3fbfb54 100644
--- a/srcpkgs/mkinitcpio/files/lvm2_hook
+++ b/srcpkgs/mkinitcpio/files/lvm2_hook
@@ -5,14 +5,13 @@ run_earlyhook() {
lvmetad
}
-# We are suffering a race condition in non-systemd initramfs: If lvmetad is
-# killed before pvscan processes finish we have stale processes and
-# uninitialized physical volumes. So wait for pvscan processes to finish.
-# Break after 10 seconds (50*0.2s) to avaid infinite loop.
+# We suffer a race condition without systemd: if lvmetad is killed before
+# pvscan processes finish, we have stale processes and uninitialized physical
+# volume. Wait up to 10 seconds for pvscan to finish.
run_latehook() {
local i=50
- while pgrep -f pvscan >/dev/null 2>/dev/null && [ $i -gt 0 ]; do
+ while [ $i -gt 0 ] && pgrep -f pvscan >/dev/null 2>/dev/null; do
sleep 0.2
i=$((i - 1))
done
diff --git a/srcpkgs/mkinitcpio/files/lvm2_install b/srcpkgs/mkinitcpio/files/lvm2_install
deleted file mode 100644
index d7a63332a403f6..00000000000000
--- a/srcpkgs/mkinitcpio/files/lvm2_install
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/bash
-
-build() {
- local mod
- local symlink
-
- # device mapper modules
- for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-smq dm-thin-pool; do
- add_module "$mod"
- done
-
- # binaries from lvm2
- add_binary "lvm"
- add_binary "lvmetad"
-
- # beinaries from device-mapper
- add_binary "dmsetup"
-
- # from thin-provisioning-tools
- add_binary "pdata_tools"
- for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
- add_symlink "/usr/bin/${symlink}" "pdata_tools"
- done
-
- # udev rules and lvm configuration
- add_file "/usr/lib/udev/rules.d/10-dm.rules"
- add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
- add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
- add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
- add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
- add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
- add_file "/etc/lvm/lvm.conf"
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook enables LVM2 volumes in initramfs.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/mdadm_udev_install b/srcpkgs/mkinitcpio/files/mdadm_udev_install
deleted file mode 100644
index c01cbaf2499e72..00000000000000
--- a/srcpkgs/mkinitcpio/files/mdadm_udev_install
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-build() {
- add_checked_modules -f 'dm-' 'drivers/md/*'
-
- # check if a custom mdadm.conf exists
- if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
- echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
- add_file "/etc/mdadm.conf"
- fi
-
- add_binary "/usr/bin/mdadm"
- add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
- add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.rules"
-}
-
-help() {
- cat <<HELPEOF
-This hook loads the necessary modules for a RAID array and uses incremental
-assembly via udev at runtime to create the devices. This hook will NOT work
-without the udev hook included on the image.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/udev_hook b/srcpkgs/mkinitcpio/files/udev_hook
deleted file mode 100644
index 75da7e4a84cecd..00000000000000
--- a/srcpkgs/mkinitcpio/files/udev_hook
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/ash
-
-run_earlyhook() {
- udevd --daemon --resolve-names=never
- udevd_running=1
-}
-
-run_hook() {
- msg ":: Triggering uevents..."
- udevadm trigger --action=add --type=subsystems
- udevadm trigger --action=add --type=devices
- udevadm settle
-}
-
-run_cleanuphook() {
- udevadm control --exit
- udevadm info --cleanup-db
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/udev_install b/srcpkgs/mkinitcpio/files/udev_install
deleted file mode 100644
index 610b71c3d0c740..00000000000000
--- a/srcpkgs/mkinitcpio/files/udev_install
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-build() {
- add_file "/etc/udev/udev.conf"
- add_binary /usr/bin/udevd
- add_binary /usr/bin/udevadm
-
- for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do
- add_file "/usr/lib/udev/rules.d/$rule"
- done
-
- for tool in ata_id scsi_id; do
- add_file "/usr/lib/udev/$tool"
- done
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook will use udev to create your root device node and detect the needed
-modules for your root device. It is also required for firmware loading in
-initramfs. It is recommended to use this hook.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/patches/eudev.patch b/srcpkgs/mkinitcpio/patches/eudev.patch
new file mode 100644
index 00000000000000..58d8eb2585514b
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/eudev.patch
@@ -0,0 +1,47 @@
+--- a/install/udev
++++ b/install/udev
+@@ -2,12 +2,13 @@
+
+ build() {
+ map add_binary \
+- '/usr/lib/systemd/systemd-udevd' \
++ '/usr/bin/udevd' \
+ '/usr/bin/udevadm' \
+- '/usr/bin/systemd-tmpfiles' \
+ '/usr/lib/udev/ata_id' \
+ '/usr/lib/udev/scsi_id'
+
++ add_file '/etc/udev/udev.conf'
++
+ map add_udev_rule \
+ '50-udev-default.rules' \
+ '60-persistent-storage.rules' \
+@@ -21,8 +22,7 @@
+ cat <<HELPEOF
+ This hook adds the udev daemon to the initramfs, allowing for dynamic loading
+ of modules and reliable detection of the root device via tags (e.g. UUID or
+-LABEL). Do not remove this hook unless you are using the systemd hook, or you
+-know what you're doing.
++LABEL). Do not remove this hook unless you know what you're doing.
+ HELPEOF
+ }
+
+--- a/hooks/udev
++++ b/hooks/udev
+@@ -1,14 +1,12 @@
+ #!/usr/bin/ash
+
+ run_earlyhook() {
+- kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
+- systemd-tmpfiles --prefix=/dev --create --boot
+ # assigned by parse_cmdline
+ # shellcheck disable=SC2154
+ if [ "${quiet}" = "y" ]; then
+- /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never >/dev/null 2>&1
++ udevd --daemon --resolve-names=never >/dev/null 2>&1
+ else
+- /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never
++ udevd --daemon --resolve-names=never
+ fi
+ # used externally by poll_device()
+ # shellcheck disable=SC2034
diff --git a/srcpkgs/mkinitcpio/patches/fix-tests.patch b/srcpkgs/mkinitcpio/patches/fix-tests.patch
new file mode 100644
index 00000000000000..90b5b8274a9751
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/fix-tests.patch
@@ -0,0 +1,29 @@
+Tests expecting unwritable directories fail in CI containers, regardless of
+directory modes.
+
+--- a/test/cases/functions.bats
++++ b/test/cases/functions.bats
+@@ -161,21 +161,11 @@
+ }
+
+ @test "initialize_buildroot unwriteable parent directory" {
+- local parentdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/"
+-
+- install -dm555 "$parentdir"
+- TMPDIR="$parentdir" run initialize_buildroot 'none'
+- assert_failure
+- assert_output "==> ERROR: Failed to create temporary working directory in $parentdir"
++ true
+ }
+
+ @test "initialize_buildroot unwriteable working directory" {
+- local workdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/workdir"
+-
+- install -dm555 "$workdir"
+- run initialize_buildroot 'none' "$workdir"
+- assert_failure
+- assert_output "==> ERROR: Unable to write to working directory: $workdir"
++ true
+ }
+
+ @test "add_file parent directory is a symlink" {
diff --git a/srcpkgs/mkinitcpio/patches/gzip-default.patch b/srcpkgs/mkinitcpio/patches/gzip-default.patch
index 52d0dcc2574b14..5add14cf05c4cf 100644
--- a/srcpkgs/mkinitcpio/patches/gzip-default.patch
+++ b/srcpkgs/mkinitcpio/patches/gzip-default.patch
@@ -2,8 +2,8 @@ Because not all Void kernels may support zstd, change the default initramfs
compression to gzip.
diff -ur a/man/mkinitcpio.conf.5.adoc b/man/mkinitcpio.conf.5.adoc
---- a/man/mkinitcpio.conf.5.adoc 2023-08-18 11:49:46.735219914 -0400
-+++ b/man/mkinitcpio.conf.5.adoc 2023-08-18 11:51:34.819551519 -0400
+--- a/man/mkinitcpio.conf.5.adoc
++++ b/man/mkinitcpio.conf.5.adoc
@@ -55,7 +55,7 @@
Defines a program to filter the generated image through. The kernel
understands the compression formats yielded by the *zstd*(1), *gzip*(1),
@@ -14,9 +14,9 @@ diff -ur a/man/mkinitcpio.conf.5.adoc b/man/mkinitcpio.conf.5.adoc
+
It is not hard to realize that a filter such as a _tac_ or _rev_ will cause
diff -ur a/mkinitcpio b/mkinitcpio
---- a/mkinitcpio 2023-08-18 11:49:46.735219914 -0400
-+++ b/mkinitcpio 2023-08-18 11:49:57.032251508 -0400
-@@ -922,7 +922,7 @@
+--- a/mkinitcpio
++++ b/mkinitcpio
+@@ -998,7 +998,7 @@
die "Unable to write to '%s'" "$_optgenimg"
fi
@@ -26,10 +26,10 @@ diff -ur a/mkinitcpio b/mkinitcpio
warning "Unable to locate compression method: '%s'" "$_optcompress"
_optcompress='cat'
diff -ur a/mkinitcpio.conf b/mkinitcpio.conf
---- a/mkinitcpio.conf 2023-08-18 11:49:46.735219914 -0400
-+++ b/mkinitcpio.conf 2023-08-18 11:49:57.033251511 -0400
-@@ -52,7 +52,7 @@
- HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
+--- a/mkinitcpio.conf
++++ b/mkinitcpio.conf
+@@ -55,7 +55,7 @@
+ HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)
# COMPRESSION
-# Use this to compress the initramfs image. By default, zstd compression
diff --git a/srcpkgs/mkinitcpio/patches/lvm2.patch b/srcpkgs/mkinitcpio/patches/lvm2.patch
new file mode 100644
index 00000000000000..b7c74bee03443a
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/lvm2.patch
@@ -0,0 +1,43 @@
+Void adds a custom runscript and udev rules to work around missing systemd.
+
+--- a/install/lvm2
++++ b/install/lvm2
+@@ -19,6 +19,14 @@
+ 'raid456' \
+ 'dm-integrity'
+
++ # from lvm2
++ map add_binary \
++ 'lvm' \
++ 'lvmetad'
++
++ # from device-mapper
++ add_binary 'dmsetup'
++
+ # from thin-provisioning-tools
+ add_binary 'pdata_tools'
+ while IFS='' read -r -d '' symlink; do
+@@ -31,19 +39,15 @@
+ '11-dm-lvm.rules' \
+ '13-dm-disk.rules' \
+ '95-dm-notify.rules' \
+- '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
+-
+- # this udev rule is specific for systemd and non-systemd systems
+- if declare -F add_systemd_unit &>/dev/null; then
+- add_udev_rule '69-dm-lvm.rules'
+- else
+- add_udev_rule '/usr/lib/initcpio/udev/69-dm-lvm.rules'
+- fi
++ '/usr/lib/initcpio/udev/11-dm-initramfs.rules' \
++ '/usr/lib/initcpio/udev/69-dm-lvm-metad.rules'
+
+ # config file
+ add_file '/etc/lvm/lvm.conf'
+ sed -i -e 's/^[[:space:]#]*monitoring = [[:digit:]]\+\s*$/\tmonitoring = 0/' \
+ -e '/^$/d' -e '/^[[:space:]]*#/d' "${BUILDROOT}/etc/lvm/lvm.conf"
++
++ add_runscript
+ }
+
+ help() {
diff --git a/srcpkgs/mkinitcpio/patches/use-rc-conf.patch b/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
index 5796c6d1c1d6e0..627172f8232fa6 100644
--- a/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
+++ b/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
@@ -14,7 +14,7 @@ diff --git a/install/consolefont b/install/consolefont
index c10b65d..dad38e2 100644
--- a/install/consolefont
+++ b/install/consolefont
-@@ -9,7 +9,7 @@
+@@ -11,7 +11,7 @@
# subshell to avoid namespace pollution
(
# shellcheck disable=SC1091
diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template
index 18eb5d3370bada..5e54c1ee1225b9 100644
--- a/srcpkgs/mkinitcpio/template
+++ b/srcpkgs/mkinitcpio/template
@@ -1,6 +1,6 @@
# Template file for 'mkinitcpio'
pkgname=mkinitcpio
-version=37.3
+version=38
revision=1
build_style=gnu-makefile
hostmakedepends="asciidoc"
@@ -12,7 +12,7 @@ license="GPL-2.0-only"
homepage="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio"
changelog="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/raw/master/CHANGELOG"
distfiles="https://sources.archlinux.org/other/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=443b0d8c370a4dc12778a10cb12eba7b088dcb3090b42519cefb6f20ae585c44
+checksum=c64ff852c63d3ee668950e0a4e10a2eae020e079025fa9ad23261e3221cddc05
conf_files="/etc/mkinitcpio.conf"
alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/mkinitcpio/kernel-hook-postinst
@@ -22,18 +22,15 @@ replaces="mkinitcpio-udev>=0"
make_dirs="/etc/mkinitcpio.conf.d 0755 root root"
post_install() {
- # Install udev hooks
- vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev
- vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev
-
# Install udev rule used by both lvm2 and encrypt hook
vinstall ${FILESDIR}/11-dm-initramfs.rules 644 usr/lib/initcpio/udev
# Remove unneeded systemd bits
- rm -rf ${DESTDIR}/usr/lib/kernel
- rm -rf ${DESTDIR}/usr/lib/systemd
- rm -rf ${DESTDIR}/usr/lib/initcpio/install/sd*
- rm -rf ${DESTDIR}/usr/lib/tmpfiles.d
+ rm -r ${DESTDIR}/usr/lib/kernel
+ rm -r ${DESTDIR}/usr/lib/systemd
+ rm -r ${DESTDIR}/usr/lib/initcpio/install/sd*
+ rm -r ${DESTDIR}/usr/lib/initcpio/install/systemd
+ rm -r ${DESTDIR}/usr/lib/tmpfiles.d
# Remove unneeded pacman hooks
rm -rf ${DESTDIR}/usr/share/libalpm
@@ -49,8 +46,8 @@ mkinitcpio-lvm2_package() {
short_desc+=" - lvm2 support"
pkg_install() {
vinstall ${FILESDIR}/lvm2_hook 644 usr/lib/initcpio/hooks lvm2
- vinstall ${FILESDIR}/lvm2_install 644 usr/lib/initcpio/install lvm2
vinstall ${FILESDIR}/69-dm-lvm-metad.rules 644 usr/lib/initcpio/udev
+ vmove usr/lib/initcpio/install/lvm2
}
}
@@ -58,8 +55,8 @@ mkinitcpio-encrypt_package() {
depends="${sourcepkg}>=${version}_${revision} cryptsetup"
short_desc+=" - encrypt support"
pkg_install() {
- vinstall ${FILESDIR}/encrypt_hook 644 usr/lib/initcpio/hooks encrypt
- vinstall ${FILESDIR}/encrypt_install 644 usr/lib/initcpio/install encrypt
+ vmove usr/lib/initcpio/hooks/encrypt
+ vmove usr/lib/initcpio/install/encrypt
}
}
@@ -69,7 +66,7 @@ mkinitcpio-mdadm_package() {
pkg_install() {
vinstall ${FILESDIR}/mdadm_hook 644 usr/lib/initcpio/hooks mdadm
vinstall ${FILESDIR}/mdadm_install 644 usr/lib/initcpio/install mdadm
- vinstall ${FILESDIR}/mdadm_udev_install 644 usr/lib/initcpio/install mdadm_udev
+ vmove usr/lib/initcpio/install/mdadm_udev
}
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mkinitcpio: update to 38.
2024-02-29 14:54 [PR PATCH] mkinitcpio: update to 38 ahesford
` (2 preceding siblings ...)
2024-02-29 16:28 ` ahesford
@ 2024-02-29 17:23 ` ahesford
2024-03-01 13:57 ` [PR PATCH] [Updated] " ahesford
2024-03-05 16:16 ` [PR PATCH] [Merged]: " ahesford
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2024-02-29 17:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/49008#issuecomment-1971610957
Comment:
It would be good to have some users of the `lvm2` and `encrypt` hooks confirm that the new versions work as expected.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] mkinitcpio: update to 38.
2024-02-29 14:54 [PR PATCH] mkinitcpio: update to 38 ahesford
` (3 preceding siblings ...)
2024-02-29 17:23 ` ahesford
@ 2024-03-01 13:57 ` ahesford
2024-03-05 16:16 ` [PR PATCH] [Merged]: " ahesford
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2024-03-01 13:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
There is an updated pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages mkinitcpio-38
https://github.com/void-linux/void-packages/pull/49008
mkinitcpio: update to 38.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/49008.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mkinitcpio-38-49008.patch --]
[-- Type: text/x-diff, Size: 24150 bytes --]
From af76f77fc0e20a5a469866dfb8f3e78d341de353 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 09:28:34 -0500
Subject: [PATCH] mkinitcpio: update to 38.
---
srcpkgs/mkinitcpio/files/encrypt_hook | 144 ------------------
srcpkgs/mkinitcpio/files/encrypt_install | 48 ------
srcpkgs/mkinitcpio/files/lvm2_hook | 9 +-
srcpkgs/mkinitcpio/files/lvm2_install | 43 ------
srcpkgs/mkinitcpio/files/mdadm_udev_install | 25 ---
srcpkgs/mkinitcpio/files/udev_hook | 20 ---
srcpkgs/mkinitcpio/files/udev_install | 27 ----
srcpkgs/mkinitcpio/patches/eudev.patch | 47 ++++++
srcpkgs/mkinitcpio/patches/fix-tests.patch | 29 ++++
srcpkgs/mkinitcpio/patches/gzip-default.patch | 18 +--
srcpkgs/mkinitcpio/patches/lvm2.patch | 43 ++++++
srcpkgs/mkinitcpio/patches/use-rc-conf.patch | 2 +-
srcpkgs/mkinitcpio/template | 25 ++-
13 files changed, 144 insertions(+), 336 deletions(-)
delete mode 100644 srcpkgs/mkinitcpio/files/encrypt_hook
delete mode 100644 srcpkgs/mkinitcpio/files/encrypt_install
delete mode 100644 srcpkgs/mkinitcpio/files/lvm2_install
delete mode 100644 srcpkgs/mkinitcpio/files/mdadm_udev_install
delete mode 100644 srcpkgs/mkinitcpio/files/udev_hook
delete mode 100644 srcpkgs/mkinitcpio/files/udev_install
create mode 100644 srcpkgs/mkinitcpio/patches/eudev.patch
create mode 100644 srcpkgs/mkinitcpio/patches/fix-tests.patch
create mode 100644 srcpkgs/mkinitcpio/patches/lvm2.patch
diff --git a/srcpkgs/mkinitcpio/files/encrypt_hook b/srcpkgs/mkinitcpio/files/encrypt_hook
deleted file mode 100644
index 882d5fb4423d60..00000000000000
--- a/srcpkgs/mkinitcpio/files/encrypt_hook
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/usr/bin/ash
-
-run_hook() {
- modprobe -a -q dm-crypt >/dev/null 2>&1
- [ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
-
- # Get keyfile if specified
- ckeyfile="/crypto_keyfile.bin"
- if [ -n "$cryptkey" ]; then
- IFS=: read ckdev ckarg1 ckarg2 <<EOF
-$cryptkey
-EOF
-
- if [ "$ckdev" = "rootfs" ]; then
- ckeyfile=$ckarg1
- elif resolved=$(resolve_device "${ckdev}" ${rootdelay}); then
- case ${ckarg1} in
- *[!0-9]*)
- # Use a file on the device
- # ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
- mkdir /ckey
- mount -r -t "$ckarg1" "$resolved" /ckey
- dd if="/ckey/$ckarg2" of="$ckeyfile" >/dev/null 2>&1
- umount /ckey
- ;;
- *)
- # Read raw data from the block device
- # ckarg1 is numeric: ckarg1=offset, ckarg2=length
- dd if="$resolved" of="$ckeyfile" bs=1 skip="$ckarg1" count="$ckarg2" >/dev/null 2>&1
- ;;
- esac
- fi
- [ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
- fi
-
- if [ -n "${cryptdevice}" ]; then
- DEPRECATED_CRYPT=0
- IFS=: read cryptdev cryptname cryptoptions <<EOF
-$cryptdevice
-EOF
- else
- DEPRECATED_CRYPT=1
- cryptdev="${root}"
- cryptname="root"
- fi
-
- # This may happen if third party hooks do the crypt setup
- if [ -b "/dev/mapper/${cryptname}" ]; then
- echo "Device ${cryptname} already exists, not doing any crypt setup."
- return 0
- fi
-
- warn_deprecated() {
- echo "The syntax 'root=${root}' where '${root}' is an encrypted volume is deprecated"
- echo "Use 'cryptdevice=${root}:root root=/dev/mapper/root' instead."
- }
-
- for cryptopt in ${cryptoptions//,/ }; do
- case ${cryptopt} in
- allow-discards)
- cryptargs="${cryptargs} --allow-discards"
- ;;
- *)
- echo "Encryption option '${cryptopt}' not known, ignoring." >&2
- ;;
- esac
- done
-
- if resolved=$(resolve_device "${cryptdev}" ${rootdelay}); then
- if cryptsetup isLuks ${resolved} >/dev/null 2>&1; then
- [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
- dopassphrase=1
- # If keyfile exists, try to use that
- if [ -f ${ckeyfile} ]; then
- if eval cryptsetup --key-file ${ckeyfile} open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; then
- dopassphrase=0
- else
- echo "Invalid keyfile. Reverting to passphrase."
- fi
- fi
- # Ask for a passphrase
- if [ ${dopassphrase} -gt 0 ]; then
- echo ""
- echo "A password is required to access the ${cryptname} volume:"
-
- #loop until we get a real password
- while ! eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do
- sleep 2;
- done
- fi
- if [ -e "/dev/mapper/${cryptname}" ]; then
- if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
- export root="/dev/mapper/root"
- fi
- else
- err "Password succeeded, but ${cryptname} creation failed, aborting..."
- return 1
- fi
- elif [ -n "${crypto}" ]; then
- [ ${DEPRECATED_CRYPT} -eq 1 ] && warn_deprecated
- msg "Non-LUKS encrypted device found..."
- if echo "$crypto" | awk -F: '{ exit(NF == 5) }'; then
- err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
- err "Non-LUKS decryption not attempted..."
- return 1
- fi
- exe="cryptsetup open --type plain $resolved $cryptname $cryptargs"
- IFS=: read c_hash c_cipher c_keysize c_offset c_skip <<EOF
-$crypto
-EOF
- [ -n "$c_hash" ] && exe="$exe --hash '$c_hash'"
- [ -n "$c_cipher" ] && exe="$exe --cipher '$c_cipher'"
- [ -n "$c_keysize" ] && exe="$exe --key-size '$c_keysize'"
- [ -n "$c_offset" ] && exe="$exe --offset '$c_offset'"
- [ -n "$c_skip" ] && exe="$exe --skip '$c_skip'"
- if [ -f "$ckeyfile" ]; then
- exe="$exe --key-file $ckeyfile"
- else
- echo ""
- echo "A password is required to access the ${cryptname} volume:"
- fi
- eval "$exe $CSQUIET"
-
- if [ $? -ne 0 ]; then
- err "Non-LUKS device decryption failed. verify format: "
- err " crypto=hash:cipher:keysize:offset:skip"
- return 1
- fi
- if [ -e "/dev/mapper/${cryptname}" ]; then
- if [ ${DEPRECATED_CRYPT} -eq 1 ]; then
- export root="/dev/mapper/root"
- fi
- else
- err "Password succeeded, but ${cryptname} creation failed, aborting..."
- return 1
- fi
- else
- err "Failed to open encryption mapping: The device ${cryptdev} is not a LUKS volume and the crypto= paramater was not specified."
- fi
- fi
- rm -f ${ckeyfile}
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/encrypt_install b/srcpkgs/mkinitcpio/files/encrypt_install
deleted file mode 100644
index 4cffb4ff014b3d..00000000000000
--- a/srcpkgs/mkinitcpio/files/encrypt_install
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-build() {
- local mod
-
- add_module "dm-crypt"
- add_module "dm-integrity"
- if [[ $CRYPTO_MODULES ]]; then
- for mod in $CRYPTO_MODULES; do
- add_module "$mod"
- done
- else
- add_all_modules "/crypto/"
- fi
-
- add_binary "cryptsetup"
- add_binary "dmsetup"
- add_file "/usr/lib/udev/rules.d/10-dm.rules"
- add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
- add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
- add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
-
- # cryptsetup calls pthread_create(), which dlopen()s libgcc_s.so.1
- add_binary "/usr/lib/libgcc_s.so.1"
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook allows for an encrypted root device. Users should specify the device
-to be unlocked using 'cryptdevice=device:dmname' on the kernel command line,
-where 'device' is the path to the raw device, and 'dmname' is the name given to
-the device after unlocking, and will be available as /dev/mapper/dmname.
-
-For unlocking via keyfile, 'cryptkey=device:fstype:path' should be specified on
-the kernel cmdline, where 'device' represents the raw block device where the key
-exists, 'fstype' is the filesystem type of 'device' (or auto), and 'path' is
-the absolute path of the keyfile within the device.
-
-Without specifying a keyfile, you will be prompted for the password at runtime.
-This means you must have a keyboard available to input it, and you may need
-the keymap hook as well to ensure that the keyboard is using the layout you
-expect.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/lvm2_hook b/srcpkgs/mkinitcpio/files/lvm2_hook
index 3c28d67ffb97e2..284b6ee3fbfb54 100644
--- a/srcpkgs/mkinitcpio/files/lvm2_hook
+++ b/srcpkgs/mkinitcpio/files/lvm2_hook
@@ -5,14 +5,13 @@ run_earlyhook() {
lvmetad
}
-# We are suffering a race condition in non-systemd initramfs: If lvmetad is
-# killed before pvscan processes finish we have stale processes and
-# uninitialized physical volumes. So wait for pvscan processes to finish.
-# Break after 10 seconds (50*0.2s) to avaid infinite loop.
+# We suffer a race condition without systemd: if lvmetad is killed before
+# pvscan processes finish, we have stale processes and uninitialized physical
+# volume. Wait up to 10 seconds for pvscan to finish.
run_latehook() {
local i=50
- while pgrep -f pvscan >/dev/null 2>/dev/null && [ $i -gt 0 ]; do
+ while [ $i -gt 0 ] && pgrep -f pvscan >/dev/null 2>/dev/null; do
sleep 0.2
i=$((i - 1))
done
diff --git a/srcpkgs/mkinitcpio/files/lvm2_install b/srcpkgs/mkinitcpio/files/lvm2_install
deleted file mode 100644
index d7a63332a403f6..00000000000000
--- a/srcpkgs/mkinitcpio/files/lvm2_install
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/bash
-
-build() {
- local mod
- local symlink
-
- # device mapper modules
- for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-smq dm-thin-pool; do
- add_module "$mod"
- done
-
- # binaries from lvm2
- add_binary "lvm"
- add_binary "lvmetad"
-
- # beinaries from device-mapper
- add_binary "dmsetup"
-
- # from thin-provisioning-tools
- add_binary "pdata_tools"
- for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
- add_symlink "/usr/bin/${symlink}" "pdata_tools"
- done
-
- # udev rules and lvm configuration
- add_file "/usr/lib/udev/rules.d/10-dm.rules"
- add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
- add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
- add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
- add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
- add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
- add_file "/etc/lvm/lvm.conf"
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook enables LVM2 volumes in initramfs.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/mdadm_udev_install b/srcpkgs/mkinitcpio/files/mdadm_udev_install
deleted file mode 100644
index c01cbaf2499e72..00000000000000
--- a/srcpkgs/mkinitcpio/files/mdadm_udev_install
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-build() {
- add_checked_modules -f 'dm-' 'drivers/md/*'
-
- # check if a custom mdadm.conf exists
- if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
- echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
- add_file "/etc/mdadm.conf"
- fi
-
- add_binary "/usr/bin/mdadm"
- add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
- add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.rules"
-}
-
-help() {
- cat <<HELPEOF
-This hook loads the necessary modules for a RAID array and uses incremental
-assembly via udev at runtime to create the devices. This hook will NOT work
-without the udev hook included on the image.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/udev_hook b/srcpkgs/mkinitcpio/files/udev_hook
deleted file mode 100644
index 75da7e4a84cecd..00000000000000
--- a/srcpkgs/mkinitcpio/files/udev_hook
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/ash
-
-run_earlyhook() {
- udevd --daemon --resolve-names=never
- udevd_running=1
-}
-
-run_hook() {
- msg ":: Triggering uevents..."
- udevadm trigger --action=add --type=subsystems
- udevadm trigger --action=add --type=devices
- udevadm settle
-}
-
-run_cleanuphook() {
- udevadm control --exit
- udevadm info --cleanup-db
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/files/udev_install b/srcpkgs/mkinitcpio/files/udev_install
deleted file mode 100644
index 610b71c3d0c740..00000000000000
--- a/srcpkgs/mkinitcpio/files/udev_install
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-build() {
- add_file "/etc/udev/udev.conf"
- add_binary /usr/bin/udevd
- add_binary /usr/bin/udevadm
-
- for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do
- add_file "/usr/lib/udev/rules.d/$rule"
- done
-
- for tool in ata_id scsi_id; do
- add_file "/usr/lib/udev/$tool"
- done
-
- add_runscript
-}
-
-help() {
- cat <<HELPEOF
-This hook will use udev to create your root device node and detect the needed
-modules for your root device. It is also required for firmware loading in
-initramfs. It is recommended to use this hook.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:
diff --git a/srcpkgs/mkinitcpio/patches/eudev.patch b/srcpkgs/mkinitcpio/patches/eudev.patch
new file mode 100644
index 00000000000000..58d8eb2585514b
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/eudev.patch
@@ -0,0 +1,47 @@
+--- a/install/udev
++++ b/install/udev
+@@ -2,12 +2,13 @@
+
+ build() {
+ map add_binary \
+- '/usr/lib/systemd/systemd-udevd' \
++ '/usr/bin/udevd' \
+ '/usr/bin/udevadm' \
+- '/usr/bin/systemd-tmpfiles' \
+ '/usr/lib/udev/ata_id' \
+ '/usr/lib/udev/scsi_id'
+
++ add_file '/etc/udev/udev.conf'
++
+ map add_udev_rule \
+ '50-udev-default.rules' \
+ '60-persistent-storage.rules' \
+@@ -21,8 +22,7 @@
+ cat <<HELPEOF
+ This hook adds the udev daemon to the initramfs, allowing for dynamic loading
+ of modules and reliable detection of the root device via tags (e.g. UUID or
+-LABEL). Do not remove this hook unless you are using the systemd hook, or you
+-know what you're doing.
++LABEL). Do not remove this hook unless you know what you're doing.
+ HELPEOF
+ }
+
+--- a/hooks/udev
++++ b/hooks/udev
+@@ -1,14 +1,12 @@
+ #!/usr/bin/ash
+
+ run_earlyhook() {
+- kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
+- systemd-tmpfiles --prefix=/dev --create --boot
+ # assigned by parse_cmdline
+ # shellcheck disable=SC2154
+ if [ "${quiet}" = "y" ]; then
+- /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never >/dev/null 2>&1
++ udevd --daemon --resolve-names=never >/dev/null 2>&1
+ else
+- /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never
++ udevd --daemon --resolve-names=never
+ fi
+ # used externally by poll_device()
+ # shellcheck disable=SC2034
diff --git a/srcpkgs/mkinitcpio/patches/fix-tests.patch b/srcpkgs/mkinitcpio/patches/fix-tests.patch
new file mode 100644
index 00000000000000..90b5b8274a9751
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/fix-tests.patch
@@ -0,0 +1,29 @@
+Tests expecting unwritable directories fail in CI containers, regardless of
+directory modes.
+
+--- a/test/cases/functions.bats
++++ b/test/cases/functions.bats
+@@ -161,21 +161,11 @@
+ }
+
+ @test "initialize_buildroot unwriteable parent directory" {
+- local parentdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/"
+-
+- install -dm555 "$parentdir"
+- TMPDIR="$parentdir" run initialize_buildroot 'none'
+- assert_failure
+- assert_output "==> ERROR: Failed to create temporary working directory in $parentdir"
++ true
+ }
+
+ @test "initialize_buildroot unwriteable working directory" {
+- local workdir="${BATS_RUN_TMPDIR}/${BATS_TEST_NAME}/workdir"
+-
+- install -dm555 "$workdir"
+- run initialize_buildroot 'none' "$workdir"
+- assert_failure
+- assert_output "==> ERROR: Unable to write to working directory: $workdir"
++ true
+ }
+
+ @test "add_file parent directory is a symlink" {
diff --git a/srcpkgs/mkinitcpio/patches/gzip-default.patch b/srcpkgs/mkinitcpio/patches/gzip-default.patch
index 52d0dcc2574b14..5add14cf05c4cf 100644
--- a/srcpkgs/mkinitcpio/patches/gzip-default.patch
+++ b/srcpkgs/mkinitcpio/patches/gzip-default.patch
@@ -2,8 +2,8 @@ Because not all Void kernels may support zstd, change the default initramfs
compression to gzip.
diff -ur a/man/mkinitcpio.conf.5.adoc b/man/mkinitcpio.conf.5.adoc
---- a/man/mkinitcpio.conf.5.adoc 2023-08-18 11:49:46.735219914 -0400
-+++ b/man/mkinitcpio.conf.5.adoc 2023-08-18 11:51:34.819551519 -0400
+--- a/man/mkinitcpio.conf.5.adoc
++++ b/man/mkinitcpio.conf.5.adoc
@@ -55,7 +55,7 @@
Defines a program to filter the generated image through. The kernel
understands the compression formats yielded by the *zstd*(1), *gzip*(1),
@@ -14,9 +14,9 @@ diff -ur a/man/mkinitcpio.conf.5.adoc b/man/mkinitcpio.conf.5.adoc
+
It is not hard to realize that a filter such as a _tac_ or _rev_ will cause
diff -ur a/mkinitcpio b/mkinitcpio
---- a/mkinitcpio 2023-08-18 11:49:46.735219914 -0400
-+++ b/mkinitcpio 2023-08-18 11:49:57.032251508 -0400
-@@ -922,7 +922,7 @@
+--- a/mkinitcpio
++++ b/mkinitcpio
+@@ -998,7 +998,7 @@
die "Unable to write to '%s'" "$_optgenimg"
fi
@@ -26,10 +26,10 @@ diff -ur a/mkinitcpio b/mkinitcpio
warning "Unable to locate compression method: '%s'" "$_optcompress"
_optcompress='cat'
diff -ur a/mkinitcpio.conf b/mkinitcpio.conf
---- a/mkinitcpio.conf 2023-08-18 11:49:46.735219914 -0400
-+++ b/mkinitcpio.conf 2023-08-18 11:49:57.033251511 -0400
-@@ -52,7 +52,7 @@
- HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
+--- a/mkinitcpio.conf
++++ b/mkinitcpio.conf
+@@ -55,7 +55,7 @@
+ HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)
# COMPRESSION
-# Use this to compress the initramfs image. By default, zstd compression
diff --git a/srcpkgs/mkinitcpio/patches/lvm2.patch b/srcpkgs/mkinitcpio/patches/lvm2.patch
new file mode 100644
index 00000000000000..b7c74bee03443a
--- /dev/null
+++ b/srcpkgs/mkinitcpio/patches/lvm2.patch
@@ -0,0 +1,43 @@
+Void adds a custom runscript and udev rules to work around missing systemd.
+
+--- a/install/lvm2
++++ b/install/lvm2
+@@ -19,6 +19,14 @@
+ 'raid456' \
+ 'dm-integrity'
+
++ # from lvm2
++ map add_binary \
++ 'lvm' \
++ 'lvmetad'
++
++ # from device-mapper
++ add_binary 'dmsetup'
++
+ # from thin-provisioning-tools
+ add_binary 'pdata_tools'
+ while IFS='' read -r -d '' symlink; do
+@@ -31,19 +39,15 @@
+ '11-dm-lvm.rules' \
+ '13-dm-disk.rules' \
+ '95-dm-notify.rules' \
+- '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
+-
+- # this udev rule is specific for systemd and non-systemd systems
+- if declare -F add_systemd_unit &>/dev/null; then
+- add_udev_rule '69-dm-lvm.rules'
+- else
+- add_udev_rule '/usr/lib/initcpio/udev/69-dm-lvm.rules'
+- fi
++ '/usr/lib/initcpio/udev/11-dm-initramfs.rules' \
++ '/usr/lib/initcpio/udev/69-dm-lvm-metad.rules'
+
+ # config file
+ add_file '/etc/lvm/lvm.conf'
+ sed -i -e 's/^[[:space:]#]*monitoring = [[:digit:]]\+\s*$/\tmonitoring = 0/' \
+ -e '/^$/d' -e '/^[[:space:]]*#/d' "${BUILDROOT}/etc/lvm/lvm.conf"
++
++ add_runscript
+ }
+
+ help() {
diff --git a/srcpkgs/mkinitcpio/patches/use-rc-conf.patch b/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
index 5796c6d1c1d6e0..627172f8232fa6 100644
--- a/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
+++ b/srcpkgs/mkinitcpio/patches/use-rc-conf.patch
@@ -14,7 +14,7 @@ diff --git a/install/consolefont b/install/consolefont
index c10b65d..dad38e2 100644
--- a/install/consolefont
+++ b/install/consolefont
-@@ -9,7 +9,7 @@
+@@ -11,7 +11,7 @@
# subshell to avoid namespace pollution
(
# shellcheck disable=SC1091
diff --git a/srcpkgs/mkinitcpio/template b/srcpkgs/mkinitcpio/template
index 18eb5d3370bada..5e54c1ee1225b9 100644
--- a/srcpkgs/mkinitcpio/template
+++ b/srcpkgs/mkinitcpio/template
@@ -1,6 +1,6 @@
# Template file for 'mkinitcpio'
pkgname=mkinitcpio
-version=37.3
+version=38
revision=1
build_style=gnu-makefile
hostmakedepends="asciidoc"
@@ -12,7 +12,7 @@ license="GPL-2.0-only"
homepage="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio"
changelog="https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/raw/master/CHANGELOG"
distfiles="https://sources.archlinux.org/other/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=443b0d8c370a4dc12778a10cb12eba7b088dcb3090b42519cefb6f20ae585c44
+checksum=c64ff852c63d3ee668950e0a4e10a2eae020e079025fa9ad23261e3221cddc05
conf_files="/etc/mkinitcpio.conf"
alternatives="
initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/mkinitcpio/kernel-hook-postinst
@@ -22,18 +22,15 @@ replaces="mkinitcpio-udev>=0"
make_dirs="/etc/mkinitcpio.conf.d 0755 root root"
post_install() {
- # Install udev hooks
- vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev
- vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev
-
# Install udev rule used by both lvm2 and encrypt hook
vinstall ${FILESDIR}/11-dm-initramfs.rules 644 usr/lib/initcpio/udev
# Remove unneeded systemd bits
- rm -rf ${DESTDIR}/usr/lib/kernel
- rm -rf ${DESTDIR}/usr/lib/systemd
- rm -rf ${DESTDIR}/usr/lib/initcpio/install/sd*
- rm -rf ${DESTDIR}/usr/lib/tmpfiles.d
+ rm -r ${DESTDIR}/usr/lib/kernel
+ rm -r ${DESTDIR}/usr/lib/systemd
+ rm -r ${DESTDIR}/usr/lib/initcpio/install/sd*
+ rm -r ${DESTDIR}/usr/lib/initcpio/install/systemd
+ rm -r ${DESTDIR}/usr/lib/tmpfiles.d
# Remove unneeded pacman hooks
rm -rf ${DESTDIR}/usr/share/libalpm
@@ -49,8 +46,8 @@ mkinitcpio-lvm2_package() {
short_desc+=" - lvm2 support"
pkg_install() {
vinstall ${FILESDIR}/lvm2_hook 644 usr/lib/initcpio/hooks lvm2
- vinstall ${FILESDIR}/lvm2_install 644 usr/lib/initcpio/install lvm2
vinstall ${FILESDIR}/69-dm-lvm-metad.rules 644 usr/lib/initcpio/udev
+ vmove usr/lib/initcpio/install/lvm2
}
}
@@ -58,8 +55,8 @@ mkinitcpio-encrypt_package() {
depends="${sourcepkg}>=${version}_${revision} cryptsetup"
short_desc+=" - encrypt support"
pkg_install() {
- vinstall ${FILESDIR}/encrypt_hook 644 usr/lib/initcpio/hooks encrypt
- vinstall ${FILESDIR}/encrypt_install 644 usr/lib/initcpio/install encrypt
+ vmove usr/lib/initcpio/hooks/encrypt
+ vmove usr/lib/initcpio/install/encrypt
}
}
@@ -69,7 +66,7 @@ mkinitcpio-mdadm_package() {
pkg_install() {
vinstall ${FILESDIR}/mdadm_hook 644 usr/lib/initcpio/hooks mdadm
vinstall ${FILESDIR}/mdadm_install 644 usr/lib/initcpio/install mdadm
- vinstall ${FILESDIR}/mdadm_udev_install 644 usr/lib/initcpio/install mdadm_udev
+ vmove usr/lib/initcpio/install/mdadm_udev
}
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Merged]: mkinitcpio: update to 38.
2024-02-29 14:54 [PR PATCH] mkinitcpio: update to 38 ahesford
` (4 preceding siblings ...)
2024-03-01 13:57 ` [PR PATCH] [Updated] " ahesford
@ 2024-03-05 16:16 ` ahesford
5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2024-03-05 16:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
There's a merged pull request on the void-packages repository
mkinitcpio: update to 38.
https://github.com/void-linux/void-packages/pull/49008
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-05 16:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 14:54 [PR PATCH] mkinitcpio: update to 38 ahesford
2024-02-29 15:09 ` [PR PATCH] [Updated] " ahesford
2024-02-29 16:18 ` ahesford
2024-02-29 16:28 ` ahesford
2024-02-29 17:23 ` ahesford
2024-03-01 13:57 ` [PR PATCH] [Updated] " ahesford
2024-03-05 16:16 ` [PR PATCH] [Merged]: " ahesford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).