Commit 63571dca authored by Xuetian Weng's avatar Xuetian Weng

update mkinitcpio 24 and rebase our microcode patch

parent 88382697
From 5bba09cb1c661627fde76b977cfe9f937b1264a3 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Fri, 6 Oct 2017 08:15:43 -0400
Subject: [mkinitcpio] [PATCH] Restore addition of modules from config file
Broken by c5ad00c2.
ref: https://bugs.archlinux.org/task/55870
---
functions | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/functions b/functions
index 1486f2f..ba95e80 100644
--- a/functions
+++ b/functions
@@ -627,9 +627,18 @@ parse_config() {
map add_file "${FILES[@]}"
tee "$BUILDROOT/buildconfig" < "$1" | {
+ # When MODULES is not an array (but instead implicitly converted at
+ # startup), sourcing the config causes the string value of MODULES
+ # to be assigned as MODULES[0]. Avoid this by explicitly unsetting
+ # MODULES before re-sourcing the config.
+ unset MODULES
+
. /dev/stdin
- for mod in "${modules[@]%\?}"; do
+ # arrayize MODULES if necessary.
+ [[ ${MODULES@a} != *a* ]] && read -ra MODULES <<<"${MODULES//-/_}"
+
+ for mod in "${MODULES[@]%\?}"; do
mod=${mod//-/_}
# only add real modules (2 == builtin)
(( _addedmodules["$mod"] == 1 )) && add+=("$mod")
--
2.14.2
pkgname=mkinitcpio
pkgver=19
pkgrel=3
pkgver=24
pkgrel=1
pkgdesc="Modular initramfs image creation utility"
arch=('x86_64')
url="http://www.archlinux.org/"
arch=('any')
url="https://projects.archlinux.org/mkinitcpio.git/"
license=('GPL')
depends=('awk' 'mkinitcpio-busybox' 'kmod' 'util-linux' 'libarchive'
'coreutils' 'bash' 'findutils' 'grep' 'filesystem' 'gzip' 'systemd')
......@@ -16,16 +16,26 @@ optdepends=('xz: Use lzma or xz compression for the initramfs image'
backup=('etc/mkinitcpio.conf')
install=mkinitcpio.install
source=("https://sources.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"
"microcode.patch::https://github.com/wengxt/mkinitcpio/commit/b948a50f03f9c243bb392a8f96f40b41c1e09a93.patch")
sha256sums=('7170e7a3d1b9ed21b0961941a327886febe80e62e2dfee6b88359ed72d0da620'
'f3b0eacc41940840904da7a56755b4641da622c4f93983a3a04131a81d4cbdc2')
"microcode.patch::https://github.com/wengxt/mkinitcpio/commit/bb1cc272b23f520f512ec3eb17c87063a84ce854.patch"
0001-Restore-addition-of-modules-from-config-file.patch)
sha256sums=('ec0ecbc518c14ecacf5a8ece2f068fe86fcaf3aed09ee6b82737e773e5d7d02b'
'1d6d689b45f3bbe75c53cccc344edd36d8ebd16bcada16e879000c7c8892a798'
'd4cbbf7b05f5dcaf23139469376ff6c29e948ce77a8c51ad4867413b4bddc4db')
validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53' # Dave Reisner
'86CFFCA918CF3AF47147588051E8B148A9999C34') # Evangelos Foutras
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 -i ../microcode.patch
patch -Np1 <"$srcdir"/0001-Restore-addition-of-modules-from-config-file.patch
sed -i 's/HOOKS="base udev autodetect modconf block filesystems keyboard fsck"/HOOKS="base udev autodetect resume keymap modconf block filesystems keyboard fsck microcode"/g' mkinitcpio.conf
}
check() {
make -C "$pkgname-$pkgver" check
}
package() {
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment