Skip to content
Snippets Groups Projects
Commit e7395b0b authored by Philip Müller's avatar Philip Müller
Browse files

[pkg-upd] 27-1.2

- add updated manjaro.patch
parents
No related branches found
No related tags found
Loading
PKGBUILD 0 → 100644
# Maintainer: Philip Müller <philm@manjaro.org>
# Arch Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Arch Maintainer: Dave Reisner <dreisner@archlinux.org>
# Arch Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgname=mkinitcpio
pkgver=27
pkgrel=1.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' '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}
manjaro.patch)
install=mkinitcpio.install
sha256sums=('e6bff1cb78b677538eb9aace900b715fd59de8fc210b74fb9d899dfaa32bc354'
'SKIP'
'f6a619c2dfc5a6bdd4596d9b4d9f7fdcce3ee0244390161cab51ef646b7317f8')
validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53' # Dave Reisner
'86CFFCA918CF3AF47147588051E8B148A9999C34' # Evangelos Foutras
'ECCAC84C1BA08A6CC8E63FBBF22FB1D78A77AEAB') # Giancarlo Razzolini
check() {
make -C "$pkgname-$pkgver" check
}
prepare() {
cd "$pkgname-$pkgver"
patch -p1 -i ../manjaro.patch
cd ..
}
package() {
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
}
diff -Npur mkinitcpio.orig/libalpm/scripts/mkinitcpio-install mkinitcpio/libalpm/scripts/mkinitcpio-install
--- mkinitcpio.orig/libalpm/scripts/mkinitcpio-install 2019-11-06 14:30:35.281230000 +0100
+++ mkinitcpio/libalpm/scripts/mkinitcpio-install 2019-11-06 23:26:33.871483000 +0100
@@ -15,20 +15,32 @@ while read -r line; do
continue
fi
+ if ! read -r kernelbase > /dev/null 2>&1 < "${line%/vmlinuz}/kernelbase"; then
+ # this kernel has no kernelbase, use pkgbase
+ kernelbase="${pkgbase}"
+ fi
+
preset="/etc/mkinitcpio.d/${pkgbase}.preset"
+
+ # sed expression for following substitutions
+ _subst="
+ s|%PKGBASE%|${pkgbase}|g
+ s|%KERNELBASE%|${kernelbase}|g
+ "
+
if [[ ! -e $preset ]]; then
if [[ -e $preset.pacsave ]]; then
# move the pacsave to the template
mv "${preset}.pacsave" "$preset"
else
# create the preset from the template
- sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preset \
+ sed "${_subst}" /usr/share/mkinitcpio/hook.preset \
| install -Dm644 /dev/stdin "$preset"
fi
fi
# always install the kernel
- install -Dm644 "${line}" "/boot/vmlinuz-${pkgbase}"
+ install -Dm644 "${line}" "/boot/vmlinuz-${kernelbase}"
# compound args for each kernel
args+=(-p "${pkgbase}")
diff -Npur mkinitcpio.orig/libalpm/scripts/mkinitcpio-remove mkinitcpio/libalpm/scripts/mkinitcpio-remove
--- mkinitcpio.orig/libalpm/scripts/mkinitcpio-remove 2019-11-06 14:30:35.281230000 +0100
+++ mkinitcpio/libalpm/scripts/mkinitcpio-remove 2019-11-06 23:29:06.769764587 +0100
@@ -14,11 +14,17 @@ while read -r line; do
continue
fi
+ if ! read -r kernelbase > /dev/null 2>&1 < "${line%/vmlinuz}/kernelbase"; then
+ # this kernel has no kernelbase, use pkgbase
+ kernelbase="${pkgbase}"
+ fi
+
# remove the actual kernel and images for the package being removed
- kernel="/boot/vmlinuz-${pkgbase}"
+ kernel="/boot/vmlinuz-${kernelbase}"
preset="/etc/mkinitcpio.d/${pkgbase}.preset"
- initramfs="/boot/initramfs-${pkgbase}.img"
- fallback_initramfs="/boot/initramfs-${pkgbase}-fallback.img"
+ initramfs="/boot/initramfs-${kernelbase}.img"
+ fallback_initramfs="/boot/initramfs-${kernelbase}-fallback.img"
+
if [[ -e $kernel ]]; then
# remove the installed kernel
rm $kernel
diff -Npur mkinitcpio.orig/mkinitcpio.d/example.preset mkinitcpio/mkinitcpio.d/example.preset
--- mkinitcpio.orig/mkinitcpio.d/example.preset 2019-11-06 14:30:35.281230000 +0100
+++ mkinitcpio/mkinitcpio.d/example.preset 2019-11-06 14:51:52.615469341 +0100
@@ -6,20 +6,20 @@ PRESETS=('default' 'fallback')
# ALL_kver is used if presetname_kver is not set
# The kver can be specified as an explicit kernel version or
# as the path to an kernel image.
-ALL_kver='/boot/vmlinuz-linux'
-ALL_config='/etc/mkinitcpio.conf'
+ALL_config="/etc/mkinitcpio.conf"
+ALL_kver="/boot/vmlinuz-5.3-x86_64"
# presetname_kver - the kernel version (omit if ALL_kver should be used)
# presetname_config - the configuration file (omit if ALL_config should be used)
# presetname_image - the filename of generated image
# presetname_options - any extra options
-#default_kver="3.0-ARCH"
+#default_kver="5.3.8-3-MANJARO"
#default_config="/etc/mkinitcpio.conf"
-default_image="/tmp/initramfs-linux.img"
-default_options=""
+default_image="/boot/initramfs-5.3-x86_64.img"
+#default_options=""
-#fallback_kver="3.0-ARCH"
+#fallback_kver="5.3.8-3-MANJARO"
#fallback_config="/etc/mkinitcpio.conf"
-fallback_image="/tmp/initramfs-linux-fallback.img"
+fallback_image="/boot/initramfs-5.3-x86_64-fallback.img"
fallback_options="-S autodetect"
diff -Npur mkinitcpio.orig/mkinitcpio.d/hook.preset mkinitcpio/mkinitcpio.d/hook.preset
--- mkinitcpio.orig/mkinitcpio.d/hook.preset 2019-11-06 14:30:35.281230000 +0100
+++ mkinitcpio/mkinitcpio.d/hook.preset 2019-11-06 15:51:22.742669018 +0100
@@ -1,14 +1,14 @@
# mkinitcpio preset file for the '%PKGBASE%' package
ALL_config="/etc/mkinitcpio.conf"
-ALL_kver="/boot/vmlinuz-%PKGBASE%"
+ALL_kver="/boot/vmlinuz-%KERNELBASE%"
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
-default_image="/boot/initramfs-%PKGBASE%.img"
+default_image="/boot/initramfs-%KERNELBASE%.img"
#default_options=""
#fallback_config="/etc/mkinitcpio.conf"
-fallback_image="/boot/initramfs-%PKGBASE%-fallback.img"
+fallback_image="/boot/initramfs-%KERNELBASE%-fallback.img"
fallback_options="-S autodetect"
#!/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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment