summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorreplabrobin2015-06-09 08:32:00 +0100
committerreplabrobin2015-06-09 08:32:00 +0100
commit2627279cdc9b15dc251c6fb9d048a0c35ead427d (patch)
treeddb4d68569c90ad289ecb9256bae0f8dd3ed428b
downloadaur-2627279cdc9b15dc251c6fb9d048a0c35ead427d.tar.gz
Initial import
-rw-r--r--.SRCINFO39
-rw-r--r--0001-avoid-compound-conditional-leading-to-spurious-error.patch39
-rw-r--r--0002-remove-systemd.patch84
-rw-r--r--PKGBUILD49
-rw-r--r--mkinitcpio.install15
5 files changed, 226 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7f1b6e447a42
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,39 @@
+pkgbase = mkinitcpio-nosystemd
+ pkgdesc = Modular initramfs image creation utility
+ pkgver = 18
+ pkgrel = 2
+ url = https://projects.archlinux.org/mkinitcpio.git/
+ install = mkinitcpio.install
+ arch = any
+ license = GPL
+ makedepends = asciidoc
+ depends = awk
+ depends = mkinitcpio-busybox>=1.19.4-2
+ depends = kmod
+ depends = util-linux>=2.23
+ depends = libarchive
+ depends = coreutils
+ depends = bash
+ depends = findutils
+ depends = grep
+ depends = filesystem>=2011.10-1
+ depends = gzip
+ optdepends = xz: Use lzma or xz compression for the initramfs image
+ optdepends = bzip2: Use bzip2 compression for the initramfs image
+ optdepends = lzop: Use lzo compression for the initramfs image
+ optdepends = lz4: Use lz4 compression for the initramfs image
+ optdepends = mkinitcpio-nfs-utils: Support for root filesystem on NFS
+ provides = mkinitcpio=18-2
+ conflicts = mkinitcpio
+ backup = etc/mkinitcpio.conf
+ source = https://sources.archlinux.org/other/mkinitcpio/mkinitcpio-18.tar.gz
+ source = https://sources.archlinux.org/other/mkinitcpio/mkinitcpio-18.tar.gz.sig
+ source = 0001-avoid-compound-conditional-leading-to-spurious-error.patch
+ source = 0002-remove-systemd.patch
+ sha256sums = 187bdeeade08996010fbff480ccc91e47722d275c22fd6feb4a4b63061e9fc22
+ sha256sums = SKIP
+ sha256sums = f6a77a34a5d97b8c3f3aef21b97da0b5d6992244e28e9b3f71e83cbaa4473341
+ sha256sums = 4921518d130b73724645b3732ba471005b8755a89a219bb6396e3b082414bb78
+
+pkgname = mkinitcpio-nosystemd
+
diff --git a/0001-avoid-compound-conditional-leading-to-spurious-error.patch b/0001-avoid-compound-conditional-leading-to-spurious-error.patch
new file mode 100644
index 000000000000..c1371fd32477
--- /dev/null
+++ b/0001-avoid-compound-conditional-leading-to-spurious-error.patch
@@ -0,0 +1,39 @@
+From ea4c4154205372154457c794513ae46b61ea4e4c Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@archlinux.org>
+Date: Mon, 4 Aug 2014 08:31:37 -0400
+Subject: [mkinitcpio] [PATCH] avoid compound conditional leading to spurious
+ "errors"
+
+As seen:
+
+https://bbs.archlinux.org/viewtopic.php?id=185204
+https://bbs.archlinux.org/viewtopic.php?id=185265
+---
+ functions | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/functions b/functions
+index 20bbffe..362d07b 100644
+--- a/functions
++++ b/functions
+@@ -423,11 +423,15 @@ add_full_dir() {
+
+ for f in "$1"/*; do
+ if [[ -L $f ]]; then
+- [[ $f = $filter ]] && add_symlink "$f" "$(readlink "$f")"
++ if [[ $f = $filter ]]; then
++ add_symlink "$f" "$(readlink "$f")"
++ fi
+ elif [[ -d $f ]]; then
+ add_full_dir "$f"
+ elif [[ -f $f ]]; then
+- [[ $f = $filter ]] && add_file "$f"
++ if [[ $f = $filter ]]; then
++ add_file "$f"
++ fi
+ fi
+ done
+ fi
+--
+2.1.0
+
diff --git a/0002-remove-systemd.patch b/0002-remove-systemd.patch
new file mode 100644
index 000000000000..f9a989cd55f0
--- /dev/null
+++ b/0002-remove-systemd.patch
@@ -0,0 +1,84 @@
+diff -rc a/init_functions b/init_functions
+*** a/init_functions 2014-07-23 23:45:34.000000000 +0100
+--- b/init_functions 2015-04-29 14:50:18.676775467 +0100
+***************
+*** 239,258 ****
+ 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" '
+--- 239,248 ----
+ err "fatal error invoking fsck"
+ fi
+
+ fi
+ }
+
+! # TODO: this really needs to follow the sd's encode_devnode_name
+ # function more closely.
+ tag_to_udev_path() {
+ awk -v "tag=$1" -v "value=$2" '
+diff -rc a/Makefile b/Makefile
+*** a/Makefile 2014-07-23 23:45:34.000000000 +0100
+--- b/Makefile 2015-04-29 14:50:18.676775467 +0100
+***************
+*** 17,24 ****
+ /usr/share/man/man5 \
+ /usr/share/man/man1 \
+ /usr/share/mkinitcpio \
+- /usr/lib/systemd/system/shutdown.target.wants \
+- /usr/lib/tmpfiles.d
+
+ all: doc
+
+--- 17,22 ----
+***************
+*** 52,62 ****
+
+ 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
+
+--- 50,55 ----
+diff -rc a/PKGBUILD b/PKGBUILD
+*** a/PKGBUILD 2014-07-23 23:45:34.000000000 +0100
+--- b/PKGBUILD 2015-04-29 14:52:59.584129156 +0100
+***************
+*** 9,15 ****
+ conflicts=('mkinitcpio')
+ provides=("mkinitcpio=$pkgver")
+ depends=('mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive' 'coreutils'
+! 'awk' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'systemd' 'gzip')
+ makedepends=('asciidoc' 'git' 'sed')
+ optdepends=('xz: Use lzma or xz compression for the initramfs image'
+ 'bzip2: Use bzip2 compression for the initramfs image'
+--- 9,15 ----
+ conflicts=('mkinitcpio')
+ provides=("mkinitcpio=$pkgver")
+ depends=('mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive' 'coreutils'
+! 'awk' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'gzip')
+ makedepends=('asciidoc' 'git' 'sed')
+ optdepends=('xz: Use lzma or xz compression for the initramfs image'
+ 'bzip2: Use bzip2 compression for the initramfs image'
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..12afe536fb98
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# based on the PKGBUILD from core mkinitcpio by
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+# this pkg attempts to replace mkinitcpio with a version
+# that doesn't depend on systemd
+
+pkgname=mkinitcpio-nosystemd
+pkgver=18
+pkgrel=2
+pkgdesc="Modular initramfs image creation utility"
+arch=('any')
+url="https://projects.archlinux.org/mkinitcpio.git/"
+license=('GPL')
+depends=('awk' 'mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive'
+ 'coreutils' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'gzip')
+optdepends=('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'
+ 'lz4: Use lz4 compression for the initramfs image'
+ 'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
+makedepends=('asciidoc')
+provides=("mkinitcpio=${pkgver}-${pkgrel}")
+conflicts=('mkinitcpio')
+backup=('etc/mkinitcpio.conf')
+source=("https://sources.archlinux.org/other/${pkgname%-nosystemd}/${pkgname%-nosystemd}-$pkgver.tar.gz"{,.sig}
+ '0001-avoid-compound-conditional-leading-to-spurious-error.patch'
+ '0002-remove-systemd.patch'
+ )
+install=mkinitcpio.install
+sha256sums=('187bdeeade08996010fbff480ccc91e47722d275c22fd6feb4a4b63061e9fc22'
+ 'SKIP'
+ 'f6a77a34a5d97b8c3f3aef21b97da0b5d6992244e28e9b3f71e83cbaa4473341'
+ '4921518d130b73724645b3732ba471005b8755a89a219bb6396e3b082414bb78'
+ )
+
+prepare() {
+ #start removing systemd related stuff
+ local d=${srcdir}/${pkgname}-${pkgver}
+ [ ! -h "$d" ] && ln -s ${pkgname%-nosystemd}-${pkgver} "$d"
+ [ ! -d "$d" ] && echo "!!!!! cannot locate dir '$d'" && exit 666
+ rm -rf ${d}/install/sd-vconsole ${d}/install/sd-shutdown ${d}/systemd ${d}/tmpfiles
+ patch -d "$pkgname-$pkgver" -Np1 <0002-remove-systemd.patch
+ #end removing systemd related stuff
+ patch -d "$pkgname-$pkgver" -Np1 <0001-avoid-compound-conditional-leading-to-spurious-error.patch
+}
+
+package() {
+ make -C "${pkgname}-$pkgver" DESTDIR="$pkgdir" install
+}
diff --git a/mkinitcpio.install b/mkinitcpio.install
new file mode 100644
index 000000000000..8571ee7d3f2d
--- /dev/null
+++ b/mkinitcpio.install
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+post_upgrade() {
+ if [ "$(vercmp 0.9.0 "$2")" -eq 1 ]; then
+ printf '==> If your /usr is on a separate partition, you must add the "usr" hook\n'
+ printf ' to /etc/mkinitcpio.conf and regenerate your images before rebooting\n'
+ fi
+
+ if [ "$(vercmp 0.12.0 "$2")" -eq 1 ]; then
+ printf '==> The "block" hook has replaced several hooks:\n'
+ printf ' fw, sata, pata, scsi, virtio, mmc, usb\n'
+ printf ' Replace any and all of these in /etc/mkinitcpio.conf with a single\n'
+ printf ' instance of the "block" hook\n'
+ fi
+}