jobcore/mkinitcpio/001-remove-systemd-and-kept-gzip-as-default.patch
2022-03-20 14:19:37 +02:00

95 lines
4.1 KiB
Diff

diff -Nuar -uar a/Makefile b/Makefile
--- a/Makefile 2021-02-17 13:37:31.000000000 +1100
+++ b/Makefile 2021-03-05 08:44:25.142475386 +1100
@@ -17,7 +17,6 @@
/usr/share/man/man5 \
/usr/share/man/man1 \
/usr/share/mkinitcpio \
- /usr/lib/systemd/system/shutdown.target.wants \
/usr/lib/tmpfiles.d \
/usr/share/libalpm/hooks \
/usr/share/libalpm/scripts
@@ -57,10 +56,6 @@
cp -at $(DESTDIR)/usr/lib/initcpio hooks install
install -m644 -t $(DESTDIR)/usr/share/mkinitcpio mkinitcpio.d/*
- install -m644 systemd/mkinitcpio-generate-shutdown-ramfs.service \
- $(DESTDIR)/usr/lib/systemd/system/mkinitcpio-generate-shutdown-ramfs.service
- ln -s ../mkinitcpio-generate-shutdown-ramfs.service \
- $(DESTDIR)/usr/lib/systemd/system/shutdown.target.wants/mkinitcpio-generate-shutdown-ramfs.service
install -m644 tmpfiles/mkinitcpio.conf $(DESTDIR)/usr/lib/tmpfiles.d/mkinitcpio.conf
install -m755 50-mkinitcpio.install $(DESTDIR)/usr/lib/kernel/install.d/50-mkinitcpio.install
diff -Nuar -uar a/PKGBUILD b/PKGBUILD
--- a/PKGBUILD 2021-02-17 13:37:31.000000000 +1100
+++ b/PKGBUILD 2021-03-05 08:45:18.792474234 +1100
@@ -9,9 +9,9 @@
conflicts=('mkinitcpio')
provides=("mkinitcpio=$pkgver" "initramfs")
depends=('mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive' 'coreutils'
- 'awk' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'systemd' 'zstd')
+ 'awk' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'gzip')
makedepends=('asciidoc' 'git' 'sed')
-optdepends=('gzip: Use gzip compression for the initramfs image'
+optdepends=('zstd: Use zstd compression for the initramfs image'
'xz: Use lzma or xz compression for the initramfs image'
'bzip2: Use bzip2 compression for the initramfs image'
'lzop: Use lzo compression for the initramfs image'
diff -Nuar -uar a/init_functions b/init_functions
--- a/init_functions 2021-02-17 13:37:31.000000000 +1100
+++ b/init_functions 2021-03-05 08:46:37.065805895 +1100
@@ -298,21 +298,9 @@
elif bitfield_has_bit "$fsckret" 128; then
err "fatal error invoking fsck"
fi
-
- # ensure that root is going to be mounted rw. Otherwise, systemd
- # might fsck the device again. Annoy the user so that they fix this.
- if [ "${rwopt:-ro}" != 'rw' ]; then
- echo "********************** WARNING **********************"
- echo "* *"
- echo "* The root device is not configured to be mounted *"
- echo "* read-write! It may be fsck'd again later. *"
- echo "* *"
- echo "*****************************************************"
- fi
fi
}
-# TODO: this really needs to follow the logic of systemd's encode_devnode_name
# function more closely.
tag_to_udev_path() {
awk -v "tag=$1" -v "value=$2" '
diff -Nuar -uar a/mkinitcpio b/mkinitcpio
--- a/mkinitcpio 2021-02-17 13:37:31.000000000 +1100
+++ b/mkinitcpio 2021-03-05 08:47:46.865804396 +1100
@@ -508,7 +508,7 @@
die 'Unable to write to %s' "$_optgenimg"
fi
- _optcompress=${_optcompress:-${COMPRESSION:-zstd}}
+ _optcompress=${_optcompress:-${COMPRESSION:-gzip}}
if ! type -P "$_optcompress" >/dev/null; then
warning "Unable to locate compression method: %s" "$_optcompress"
_optcompress=cat
diff -Nuar -uar a/mkinitcpio.conf b/mkinitcpio.conf
--- a/mkinitcpio.conf 2021-02-17 13:37:31.000000000 +1100
+++ b/mkinitcpio.conf 2021-03-05 08:48:30.139136824 +1100
@@ -52,15 +52,15 @@
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)
# COMPRESSION
-# Use this to compress the initramfs image. By default, zstd compression
+# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
-#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
+#COMPRESSION="zstd"
# COMPRESSION_OPTIONS
# Additional options for the compressor