added core/mkinitcpio

This commit is contained in:
Kevin Mihelich 2017-09-10 00:47:13 +00:00
parent 83398801f9
commit d8e2176812
4 changed files with 119 additions and 0 deletions

View file

@ -0,0 +1,31 @@
From 504340f5d19ab301768b8db5199d3d71f2abbfcb Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Mon, 21 Aug 2017 21:33:22 -0400
Subject: [PATCH 1/2] make ldd parsing compatible with upstream glibc changes
https://sourceware.org/git/?p=glibc.git;a=commit;h=eedca9772e99c72ab4c3c34e43cc764250aa3e3c
---
functions | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/functions b/functions
index 4afc902..7288c44 100644
--- a/functions
+++ b/functions
@@ -587,10 +587,10 @@ add_binary() {
! lddout=$(ldd "$binary" 2>/dev/null) && return 0
# resolve sodeps
- regex='(/.+) \(0x[a-fA-F0-9]+\)'
- while read line; do
+ regex='^(|.+ )(/.+) \(0x[a-fA-F0-9]+\)'
+ while read -r line; do
if [[ $line =~ $regex ]]; then
- sodep=${BASH_REMATCH[1]}
+ sodep=${BASH_REMATCH[2]}
elif [[ $line = *'not found' ]]; then
error "binary dependency \`%s' not found for \`%s'" "${line%% *}" "$1"
(( ++_builderrors ))
--
2.14.1

View file

@ -0,0 +1,27 @@
From ed0624ab614aeac7a0d64dae4ae0dd3b4a4d895d Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Tue, 14 Mar 2017 10:50:26 -0400
Subject: [PATCH 2/2] avoid erroring when a builtin-module can't be found
This is harmless fallout from 5249350, which tries harder to re-add
aliases of builtins.
---
functions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/functions b/functions
index 7288c44..8130b63 100644
--- a/functions
+++ b/functions
@@ -390,7 +390,7 @@ add_module() {
done < <(modinfo -b "$_optmoduleroot" -k "$KERNELVERSION" -0 "$target" 2>/dev/null)
if (( !found )); then
- (( ign_errors )) && return 0
+ (( ign_errors || _addedmodules["$target"] )) && return 0
error "module not found: \`%s'" "$target"
return 1
fi
--
2.14.1

46
core/mkinitcpio/PKGBUILD Normal file
View file

@ -0,0 +1,46 @@
# $Id$
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Thomas Bächler <thomas@archlinux.org>
# ALARMM: Kevin Mihelich <kevin@archlinuxarm.org>
# - backport patch to fix finding modules/built-ins
pkgname=mkinitcpio
pkgver=23
pkgrel=2.1
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' 'systemd')
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')
backup=('etc/mkinitcpio.conf')
source=("https://sources.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
'0001-make-ldd-parsing-compatible-with-upstream-glibc-chan.patch'
'0002-avoid-erroring-when-a-builtin-module-can-t-be-found.patch')
install=mkinitcpio.install
sha256sums=('80f12a07f0dceef81dfe87200f099bd2149e0990391dda6defebaa5697f8a35a'
'SKIP'
'2cd9cfc5a88d32e03be12c788f4ee892405e900e1ba00ec95b8ae00a84e9df14'
'f3d58896195012a8def7a7651a6bffb49968438fe92d10bae891450c7091cbcf')
validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53' # Dave Reisner
'86CFFCA918CF3AF47147588051E8B148A9999C34') # Evangelos Foutras
prepare() {
cd "$pkgname-$pkgver"
patch -p1 -i ../0001-make-ldd-parsing-compatible-with-upstream-glibc-chan.patch
patch -p1 -i ../0002-avoid-erroring-when-a-builtin-module-can-t-be-found.patch
}
check() {
make -C "$pkgname-$pkgver" check
}
package() {
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
}

View file

@ -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
}