[arch-commits] Commit in mkinitcpio/repos (5 files)
Giancarlo Razzolini
grazzolini at archlinux.org
Mon Feb 24 19:58:07 UTC 2020
Date: Monday, February 24, 2020 @ 19:58:07
Author: grazzolini
Revision: 376158
archrelease: copy trunk to testing-any
Added:
mkinitcpio/repos/testing-any/
mkinitcpio/repos/testing-any/0001-mkinitcpio-remove-preset-pacsave.patch
(from rev 376157, mkinitcpio/trunk/0001-mkinitcpio-remove-preset-pacsave.patch)
mkinitcpio/repos/testing-any/0002-mkinitcpio-fix-builtin.patch
(from rev 376157, mkinitcpio/trunk/0002-mkinitcpio-fix-builtin.patch)
mkinitcpio/repos/testing-any/PKGBUILD
(from rev 376157, mkinitcpio/trunk/PKGBUILD)
mkinitcpio/repos/testing-any/mkinitcpio.install
(from rev 376157, mkinitcpio/trunk/mkinitcpio.install)
---------------------------------------------+
0001-mkinitcpio-remove-preset-pacsave.patch | 59 ++++++++++++++++++++++++++
0002-mkinitcpio-fix-builtin.patch | 29 ++++++++++++
PKGBUILD | 48 +++++++++++++++++++++
mkinitcpio.install | 15 ++++++
4 files changed, 151 insertions(+)
Copied: mkinitcpio/repos/testing-any/0001-mkinitcpio-remove-preset-pacsave.patch (from rev 376157, mkinitcpio/trunk/0001-mkinitcpio-remove-preset-pacsave.patch)
===================================================================
--- testing-any/0001-mkinitcpio-remove-preset-pacsave.patch (rev 0)
+++ testing-any/0001-mkinitcpio-remove-preset-pacsave.patch 2020-02-24 19:58:07 UTC (rev 376158)
@@ -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
Copied: mkinitcpio/repos/testing-any/0002-mkinitcpio-fix-builtin.patch (from rev 376157, mkinitcpio/trunk/0002-mkinitcpio-fix-builtin.patch)
===================================================================
--- testing-any/0002-mkinitcpio-fix-builtin.patch (rev 0)
+++ testing-any/0002-mkinitcpio-fix-builtin.patch 2020-02-24 19:58:07 UTC (rev 376158)
@@ -0,0 +1,29 @@
+From 30dbfc2770cb49cb3babfb750205b126d7d88791 Mon Sep 17 00:00:00 2001
+From: Morten Linderud <morten at linderud.pw>
+Date: Thu, 20 Feb 2020 09:44:29 +0100
+Subject: [PATCH] [functions] Ignore modinfo built-in modules
+
+modinfo have started reporting filenames as "(builtin)" on built-in
+modules. Ignore these and continue with other modules.
+
+Fixes: https://bugs.archlinux.org/task/65564
+Introduced in: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=e7e2cb61fa9f1db3429d91ef6accff549500d268
+
+Signed-off-by: Morten Linderud <morten at linderud.pw>
+---
+ functions | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/functions b/functions
+index f407c82..1c72b56 100644
+--- a/functions
++++ b/functions
+@@ -371,7 +371,7 @@ add_module() {
+ target=${1%.ko*} target=${target//-/_}
+
+ # skip expensive stuff if this module has already been added
+- (( _addedmodules["$target"] == 1 )) && return
++ (( _addedmodules["$target"] > 0 )) && return
+
+ while IFS=':= ' read -r -d '' field value; do
+ case "$field" in
Copied: mkinitcpio/repos/testing-any/PKGBUILD (from rev 376157, mkinitcpio/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD (rev 0)
+++ testing-any/PKGBUILD 2020-02-24 19:58:07 UTC (rev 376158)
@@ -0,0 +1,48 @@
+# Maintainer: Giancarlo Razzolini <grazzolini at archlinux.org>
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=mkinitcpio
+pkgver=27
+pkgrel=3
+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' 'diffutils' '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')
+provides=('initramfs')
+backup=('etc/mkinitcpio.conf')
+source=("https://sources.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
+ "0001-mkinitcpio-remove-preset-pacsave.patch"
+ "0002-mkinitcpio-fix-builtin.patch")
+install=mkinitcpio.install
+sha256sums=('e6bff1cb78b677538eb9aace900b715fd59de8fc210b74fb9d899dfaa32bc354'
+ 'SKIP'
+ '845569fa760f70c868ecb3dc8ae9667287970526dddaf403fdafcb716e8b3d51'
+ 'd097f3df15ba9fefd3771f9f784e1c31c8d5ff1d9d6885a46fc6b5188e419796')
+validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53' # Dave Reisner
+ '86CFFCA918CF3AF47147588051E8B148A9999C34' # Evangelos Foutras
+ 'ECCAC84C1BA08A6CC8E63FBBF22FB1D78A77AEAB') # Giancarlo Razzolini
+
+prepare() {
+ cd $pkgname-$pkgver
+ # Apply 0001-mkinitcpio-remove-preset-pacsave.patch
+ patch -Np1 < $srcdir/0001-mkinitcpio-remove-preset-pacsave.patch
+
+ # Apply 0002-mkinitcpio-fix-builtin.patch
+ patch -Np1 < $srcdir/0002-mkinitcpio-fix-builtin.patch
+}
+
+check() {
+ make -C "$pkgname-$pkgver" check
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+}
Copied: mkinitcpio/repos/testing-any/mkinitcpio.install (from rev 376157, mkinitcpio/trunk/mkinitcpio.install)
===================================================================
--- testing-any/mkinitcpio.install (rev 0)
+++ testing-any/mkinitcpio.install 2020-02-24 19:58:07 UTC (rev 376158)
@@ -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
+}
More information about the arch-commits
mailing list