summaryrefslogtreecommitdiff
path: root/nonsystemd/mkinitcpio
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2019-11-13 20:17:25 -0300
committerDavid P <megver83@parabola.nu>2019-11-13 20:17:25 -0300
commitf84891547628082a14e5390bc38fd8298c1165a4 (patch)
tree0ef9582de6524cb03c25afc36cb668f3e71e5439 /nonsystemd/mkinitcpio
parenta7fdeca48bebaa59984b67c024c42e0e00257656 (diff)
downloadabslibre-f84891547628082a14e5390bc38fd8298c1165a4.tar.gz
abslibre-f84891547628082a14e5390bc38fd8298c1165a4.tar.bz2
abslibre-f84891547628082a14e5390bc38fd8298c1165a4.zip
updpkg: nonsystemd/mkinitcpio 27-2.nonsystemd1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/mkinitcpio')
-rw-r--r--nonsystemd/mkinitcpio/0001-mkinitcpio-remove-preset-pacsave.patch59
-rw-r--r--nonsystemd/mkinitcpio/PKGBUILD17
2 files changed, 70 insertions, 6 deletions
diff --git a/nonsystemd/mkinitcpio/0001-mkinitcpio-remove-preset-pacsave.patch b/nonsystemd/mkinitcpio/0001-mkinitcpio-remove-preset-pacsave.patch
new file mode 100644
index 000000000..e2f7efc30
--- /dev/null
+++ b/nonsystemd/mkinitcpio/0001-mkinitcpio-remove-preset-pacsave.patch
@@ -0,0 +1,59 @@
+diff --git a/libalpm/scripts/mkinitcpio-remove b/libalpm/scripts/mkinitcpio-remove
+index 86838e4..17b4b31 100644
+--- a/libalpm/scripts/mkinitcpio-remove
++++ b/libalpm/scripts/mkinitcpio-remove
+@@ -2,6 +2,20 @@
+
+ package=0
+
++process_preset() {
++ if [[ -n "${pkgbase}" && -e $preset ]]; then
++ if ! cmp $preset > /dev/null 2>&1 <(sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preset); then
++ if [[ ! -e $preset.pacsave ]]; then
++ # save the preset as pacsave
++ mv $preset $preset.pacsave && return 0
++ fi
++ else
++ # remove the preset
++ rm $preset && return 0
++ fi
++ fi
++}
++
+ while read -r line; do
+ if [[ $line != */vmlinuz ]]; then
+ # triggers when it's a change to usr/lib/initcpio/*
+@@ -23,17 +37,25 @@ while read -r line; do
+ # remove the installed kernel
+ rm $kernel
+ fi
+- if [[ -e $preset ]]; then
+- # remove the preset
+- rm $preset
++
++ process_preset "${pkgbase}" $preset
++
++ if [[ -e $initramfs ]]; then
++ # remove the main image
++ rm $initramfs
+ fi
+- if [[ -e $initramfs && -e $fallback_initramfs ]]; then
+- # remove the images
+- rm $initramfs $fallback_initramfs
++ if [[ -e $fallback_initramfs ]]; then
++ # remove the fallback image
++ rm $fallback_initramfs
+ fi
+ done
+
+ if (( package )) && compgen -G /etc/mkinitcpio.d/"*.preset" > /dev/null; then
+- # remove all presets
+- rm /etc/mkinitcpio.d/*.preset
++ shopt -s nullglob
++ for preset in /etc/mkinitcpio.d/*.preset; do
++ pkgbase=${preset##*/}
++ pkgbase=${pkgbase%.preset}
++ process_preset "${pkgbase}" $preset
++ done
++ shopt -u nullglob
+ fi
diff --git a/nonsystemd/mkinitcpio/PKGBUILD b/nonsystemd/mkinitcpio/PKGBUILD
index 6de343cee..b54addc30 100644
--- a/nonsystemd/mkinitcpio/PKGBUILD
+++ b/nonsystemd/mkinitcpio/PKGBUILD
@@ -4,15 +4,15 @@
pkgname=mkinitcpio
pkgver=27
-pkgrel=1
+pkgrel=2
pkgrel+=.nonsystemd1
pkgdesc="Modular initramfs image creation utility"
arch=('any')
url="https://projects.archlinux.org/mkinitcpio.git/"
license=('GPL')
makedepends=('asciidoc')
-depends=('awk' 'mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive'
- 'coreutils' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'gzip' 'udev')
+depends=('awk' 'mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive' 'coreutils'
+ 'bash' 'diffutils' 'findutils' 'grep' 'filesystem>=2011.10-1' 'gzip' 'udev')
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'
@@ -21,17 +21,22 @@ optdepends=('xz: Use lzma or xz compression for the initramfs image'
provides=('initramfs')
backup=('etc/mkinitcpio.conf')
source=("https://sources.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
- nosystemd.patch)
+ nosystemd.patch
+ "0001-mkinitcpio-remove-preset-pacsave.patch")
install=mkinitcpio.install
sha256sums=('e6bff1cb78b677538eb9aace900b715fd59de8fc210b74fb9d899dfaa32bc354'
'SKIP'
- 'c4afeb6b3300c4d50c3f01233705b542f59d6e95a7670f7efde097ea209ef5bd')
+ 'c4afeb6b3300c4d50c3f01233705b542f59d6e95a7670f7efde097ea209ef5bd'
+ '845569fa760f70c868ecb3dc8ae9667287970526dddaf403fdafcb716e8b3d51')
validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53' # Dave Reisner
'86CFFCA918CF3AF47147588051E8B148A9999C34' # Evangelos Foutras
'ECCAC84C1BA08A6CC8E63FBBF22FB1D78A77AEAB') # Giancarlo Razzolini
prepare(){
- cd "$pkgname-$pkgver"
+ cd $pkgname-$pkgver
+ # Apply 0001-mkinitcpio-remove-preset-pacsave.patch
+ patch -Np1 < $srcdir/0001-mkinitcpio-remove-preset-pacsave.patch
+
rm -rf install/sd-*
patch -Np1 -i $srcdir/nosystemd.patch
}