summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/fido-libz10
-rw-r--r--debian/patches/initrd-not-initramfs.patch79
-rw-r--r--debian/patches/microcode11
-rw-r--r--debian/patches/nm-path25
-rw-r--r--debian/patches/rpc-user40
-rw-r--r--debian/patches/series7
-rw-r--r--debian/patches/udevsettle10
-rw-r--r--debian/patches/vconsole12
8 files changed, 194 insertions, 0 deletions
diff --git a/debian/patches/fido-libz b/debian/patches/fido-libz
new file mode 100644
index 0000000..64017f1
--- /dev/null
+++ b/debian/patches/fido-libz
@@ -0,0 +1,10 @@
+--- a/modules.d/91fido2/module-setup.sh
++++ b/modules.d/91fido2/module-setup.sh
+@@ -21,6 +21,7 @@
+ # Install required libraries.
+ _arch=${DRACUT_ARCH:-$(uname -m)}
+ inst_libdir_file \
++ {"tls/$_arch/",tls/,"$_arch/",}"libz.so.*" \
+ {"tls/$_arch/",tls/,"$_arch/",}"libfido2.so.*" \
+ {"tls/$_arch/",tls/,"$_arch/",}"libz.so.*" \
+ {"tls/$_arch/",tls/,"$_arch/",}"libcryptsetup.so.*" \
diff --git a/debian/patches/initrd-not-initramfs.patch b/debian/patches/initrd-not-initramfs.patch
new file mode 100644
index 0000000..bcfbf39
--- /dev/null
+++ b/debian/patches/initrd-not-initramfs.patch
@@ -0,0 +1,79 @@
+--- a/man/dracut.8.asc
++++ b/man/dracut.8.asc
+@@ -24,7 +24,7 @@
+ _/boot/<machine-id>/<kernel-version>/initrd_,
+ _/boot/efi/<machine-id>/<kernel-version>/initrd_,
+ _/lib/modules/<kernel-version>/initrd_ or
+-_/boot/initramfs-<kernel-version>.img_.
++_/boot/initrd.img-<kernel-version>_.
+
+ dracut creates an initial image used by the kernel for preloading the block
+ device modules (such as IDE, SCSI or RAID) which are needed to access the root
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -1154,7 +1154,7 @@
+ elif [[ -f "$dracutsysrootdir"/lib/modules/${kernel}/initrd ]]; then
+ outfile="$dracutsysrootdir/lib/modules/${kernel}/initrd"
+ elif [[ -e $dracutsysrootdir/boot/vmlinuz-${kernel} ]]; then
+- outfile="$dracutsysrootdir/boot/initramfs-${kernel}.img"
++ outfile="$dracutsysrootdir/boot/initrd.img-${kernel}"
+ elif [[ -z $dracutsysrootdir ]] \
+ && [[ $MACHINE_ID ]] \
+ && mountpoint -q /efi; then
+@@ -1164,7 +1164,7 @@
+ && mountpoint -q /boot/efi; then
+ outfile="/boot/efi/${MACHINE_ID}/${kernel}/initrd"
+ else
+- outfile="$dracutsysrootdir/boot/initramfs-${kernel}.img"
++ outfile="$dracutsysrootdir/boot/initrd.img-${kernel}"
+ fi
+ fi
+ fi
+--- a/man/dracut.usage.asc
++++ b/man/dracut.usage.asc
+@@ -10,7 +10,7 @@
+ _/boot/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
+ _/boot/efi/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
+ _/lib/modules/_++<kernel-version>++_/initrd_ or
+-_/boot/initramfs-_++<kernel-version>++_.img_ and contains the kernel modules of
++_/boot/initrd.img-_++<kernel-version>++_ and contains the kernel modules of
+ the currently active kernel with version _++<kernel-version>++_.
+
+ If the initramfs image already exists, dracut will display an error message, and
+--- a/man/lsinitrd.1.asc
++++ b/man/lsinitrd.1.asc
+@@ -22,7 +22,7 @@
+ _/boot/<machine-id>/<kernel-version>/initrd_,
+ _/boot/efi/<machine-id>/<kernel-version>/initrd_,
+ _/lib/modules/<kernel-version>/initrd_ or
+-_/boot/initramfs-<kernel-version>.img_.
++_/boot/initrd.img-<kernel-version>_.
+
+ OPTIONS
+ -------
+--- a/lsinitrd.sh
++++ b/lsinitrd.sh
+@@ -134,8 +134,8 @@
+ image="/lib/modules/${KERNEL_VERSION}/initrd"
+ elif [[ -f /lib/modules/${KERNEL_VERSION}/initramfs.img ]]; then
+ image="/lib/modules/${KERNEL_VERSION}/initramfs.img"
+- elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
+- image="/boot/initramfs-${KERNEL_VERSION}.img"
++ elif [[ -f /boot/initrd.img-${KERNEL_VERSION} ]]; then
++ image="/boot/initrd.img-${KERNEL_VERSION}"
+ elif [[ $MACHINE_ID ]] \
+ && mountpoint -q /efi; then
+ image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
+--- a/dracut-initramfs-restore.sh
++++ b/dracut-initramfs-restore.sh
+@@ -39,8 +39,8 @@
+ IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
+ elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
+ IMG="/lib/modules/${KERNEL_VERSION}/initrd"
+-elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
+- IMG="/boot/initramfs-${KERNEL_VERSION}.img"
++elif [[ -f /boot/initrd.img-${KERNEL_VERSION} ]]; then
++ IMG="/boot/initrd.img-${KERNEL_VERSION}"
+ elif mountpoint -q /efi; then
+ IMG="/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
+ elif mountpoint -q /boot/efi; then
diff --git a/debian/patches/microcode b/debian/patches/microcode
new file mode 100644
index 0000000..4e2fcfc
--- /dev/null
+++ b/debian/patches/microcode
@@ -0,0 +1,11 @@
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -2144,7 +2144,7 @@
+ if [[ $hostonly ]]; then
+ _src=$(get_ucode_file)
+ [[ $_src ]] || break
+- [[ -r $_fwdir/$_fw/$_src ]] || _src="${_src}.early"
++ [[ -r $_fwdir/$_fw/$_src ]] || _src="${_src}.initramfs"
+ [[ -r $_fwdir/$_fw/$_src ]] || break
+ fi
+
diff --git a/debian/patches/nm-path b/debian/patches/nm-path
new file mode 100644
index 0000000..802da28
--- /dev/null
+++ b/debian/patches/nm-path
@@ -0,0 +1,25 @@
+--- a/modules.d/35network-manager/module-setup.sh
++++ b/modules.d/35network-manager/module-setup.sh
+@@ -30,8 +30,8 @@
+ inst_multiple ip sed grep
+
+ inst NetworkManager
+- inst_multiple -o /usr/{lib,libexec}/nm-initrd-generator
+- inst_multiple -o /usr/{lib,libexec}/nm-daemon-helper
++ inst_multiple -o /usr/{lib,libexec}{,/NetworkManager}/nm-initrd-generator
++ inst_multiple -o /usr/{lib,libexec}{,/NetworkManager}/nm-daemon-helper
+ inst_multiple -o teamd dhclient
+ inst_hook cmdline 99 "$moddir/nm-config.sh"
+ if dracut_module_included "systemd"; then
+--- a/modules.d/35network-manager/nm-lib.sh
++++ b/modules.d/35network-manager/nm-lib.sh
+@@ -10,6 +10,9 @@
+ elif [ -x /usr/lib/nm-initrd-generator ]; then
+ # shellcheck disable=SC2046
+ /usr/lib/nm-initrd-generator -- $(getcmdline)
++ elif [ -x /usr/lib/NetworkManager/nm-initrd-generator ]; then
++ # shellcheck disable=SC2046
++ /usr/lib/NetworkManager/nm-initrd-generator -- $(getcmdline)
+ else
+ warn "nm-initrd-generator not found"
+ fi
diff --git a/debian/patches/rpc-user b/debian/patches/rpc-user
new file mode 100644
index 0000000..8656109
--- /dev/null
+++ b/debian/patches/rpc-user
@@ -0,0 +1,40 @@
+--- a/modules.d/95nfs/nfs-start-rpc.sh
++++ b/modules.d/95nfs/nfs-start-rpc.sh
+@@ -9,7 +9,7 @@
+ command -v portmap > /dev/null && [ -z "$(pidof portmap)" ] && portmap
+ if command -v rpcbind > /dev/null && [ -z "$(pidof rpcbind)" ]; then
+ mkdir -p /run/rpcbind
+- chown rpc:rpc /run/rpcbind
++ chown _rpc:root /run/rpcbind
+ rpcbind
+ fi
+
+--- a/modules.d/95nfs/parse-nfsroot.sh
++++ b/modules.d/95nfs/parse-nfsroot.sh
+@@ -124,5 +124,5 @@
+ echo '[ -e $NEWROOT/proc ]' > "$hookdir"/initqueue/finished/nfsroot.sh
+
+ mkdir -p /var/lib/rpcbind
+-chown rpc:rpc /var/lib/rpcbind
++chown _rpc:root /var/lib/rpcbind
+ chmod 770 /var/lib/rpcbind
+--- a/modules.d/95nfs/module-setup.sh
++++ b/modules.d/95nfs/module-setup.sh
+@@ -125,14 +125,14 @@
+
+ # Rather than copy the passwd file in, just set a user for rpcbind
+ # We'll save the state and restart the daemon from the root anyway
+- grep -E '^nfsnobody:|^rpc:|^rpcuser:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd"
++ grep -E '^nfsnobody:|^_rpc:|^rpcuser:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd"
+ grep -E '^nogroup:|^rpc:|^nobody:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group"
+
+ # rpc user needs to be able to write to this directory to save the warmstart
+ # file
+ chmod 770 "$initdir/var/lib/rpcbind"
+- grep -q '^rpc:' "$dracutsysrootdir"/etc/passwd \
+- && grep -q '^rpc:' "$dracutsysrootdir"/etc/group
++ grep -q '^_rpc:' "$dracutsysrootdir"/etc/passwd \
++ && grep -q '^root:' "$dracutsysrootdir"/etc/group
+
+ dracut_need_initqueue
+ }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..291266d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+rpc-user
+udevsettle
+nm-path
+fido-libz
+vconsole
+microcode
+initrd-not-initramfs.patch
diff --git a/debian/patches/udevsettle b/debian/patches/udevsettle
new file mode 100644
index 0000000..4b1c592
--- /dev/null
+++ b/debian/patches/udevsettle
@@ -0,0 +1,10 @@
+--- a/modules.d/99base/init.sh
++++ b/modules.d/99base/init.sh
+@@ -155,6 +155,7 @@
+ # then the rest
+ udevadm trigger --type=subsystems --action=add > /dev/null 2>&1
+ udevadm trigger --type=devices --action=add > /dev/null 2>&1
++udevadm settle
+
+ make_trace_mem "hook initqueue" '1:shortmem' '2+:mem' '3+:slab'
+ getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"
diff --git a/debian/patches/vconsole b/debian/patches/vconsole
new file mode 100644
index 0000000..5729bd4
--- /dev/null
+++ b/debian/patches/vconsole
@@ -0,0 +1,12 @@
+--- a/modules.d/00systemd/module-setup.sh
++++ b/modules.d/00systemd/module-setup.sh
+@@ -245,7 +245,8 @@
+ systemd-ask-password-console.service \
+ systemd-ask-password-plymouth.service; do
+ [[ -f "$systemdsystemunitdir"/$i ]] || continue
+- $SYSTEMCTL -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
++ # $SYSTEMCTL -q --root "$initdir" add-wants "$i" systemd-vconsole-setup.service
++ true
+ done
+
+ mkdir -p "$initdir/etc/systemd"