* update mkinitcpio to 35.2-1

This commit is contained in:
Alexander Baldeck 2023-04-21 20:32:39 +02:00
parent b391ecb6df
commit 18945d6890
4 changed files with 93 additions and 98 deletions

View File

@ -1,26 +0,0 @@
From eabdad3798b43fa5e9aacd0d0395a74154e56434 Mon Sep 17 00:00:00 2001
From: nl6720 <nl6720@gmail.com>
Date: Thu, 8 Dec 2022 10:51:49 +0200
Subject: [mkinitcpio] [PATCH 1/1] functions: fix overwriting of symlinks with
regular files
Use `cp --remove-destination` in `add_file` to remove the destination
file. Without this, if the destination file is an existing symlink, it
will be the link target that will get overwritten, not the symlink.
---
functions | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/functions b/functions
index 9939e25..3b3de05 100644
--- a/functions
+++ b/functions
@@ -650,7 +650,7 @@ add_file() {
fi
if [[ -z "$mode" ]]; then
add_dir "${dest%/*}"
- command cp -f --preserve=mode,ownership "$src" "${BUILDROOT}${dest}"
+ command cp --remove-destination --preserve=mode,ownership "$src" "${BUILDROOT}${dest}"
else
command install -Dm"$mode" "$src" "${BUILDROOT}${dest}"
fi

View File

@ -5,8 +5,8 @@
# Contributor: Thomas Bächler <thomas@archlinux.org>
pkgname=mkinitcpio
pkgver=34
pkgrel=2
pkgver=35.2
pkgrel=1
pkgdesc="Modular initramfs image creation utility"
arch=(any)
url='https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio'
@ -24,23 +24,19 @@ optdepends=('gzip: Use gzip compression for the initramfs image'
provides=('initramfs')
backup=('etc/mkinitcpio.conf')
source=("https://sources.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
'0001-functions-fix-overwriting-of-symlinks-with-regular-f.patch'
'mkinitcpio-powerpc-support.patch')
'mkinitcpio-archpower-support.patch')
install=mkinitcpio.install
sha512sums=('cf8ab66d4609911ca6a1d2af1bfcf320eed99d29657c0ccfeca2fdc8ea00cfb6575e55645424de13fcf37aa12a39ac7b43a330c716e73e9c16a75178738ebe70'
sha512sums=('9ca8544bc5de3d215bf94ecf9a3bfb9265c9ed9871357af4b597a37e94c6951935641c11558470aaa934e8fbe9bc1f875dfa9d0fe8734a97f90154c9cbabfdba'
'SKIP'
'a43e66101edc301ae893a25eee6caa83c56a790cbac1685697fb999008c8210e46ca49e0700242f8321731264084462641285954db55d3daa2c7e8b62d1cc66c'
'bc4966a026b59925499e94838afaa7c1a93575f3cd3ece0d251a0202844e581b472fb5f7fb8db8e7bfe9fced290751f751a2a86339f24c5677f12a4325ca1c7a')
b2sums=('06a6c6a0951b9b6161e2db01e2956d87da303b2ec029bdd183efed3b074b176a9f107e9a723fc6a7fa157ecd703d7627d8aaa0b9290022a09e30daa46784841c'
'2fef9bc69817f58a5525a64c1edfbcb955d35779b927be2f43d55e3f0ce79d578c65390c2a67be841bda99d34da6e208f4bf5ce030c61ea1f130d658f255777d')
b2sums=('e7d56ea1de8d21271d4e94a61563af9c5f33320a46ce9f006092bb70e2161be02791dfd75b14e9c9b5ad2fbb781617f04b4e49afa93a707785c23773c1a48664'
'SKIP'
'a2ed9e8ff4b6fab1d6f6c1dae4dcf890b4434cb31ebdfe73ea54fd4af499849e2b98e565915cc331bd97f15f21d9147ee0499cf75b516562bfd7f1793e838e99'
'0b56494853a18af112c9f8b05e8f6c2500bf146f5ae221d0452f37ee3a0b39d69b1183ee709d80e25ffc8392964d31458847fab5bb5fc01e69401dbbb184b41c')
'4b132f8954e0be73bad20c326102c882aa373e5b4cc9201a3af05f60952d44605466ea6a15b70b53ebd4503f1d0758ed46a32e18c4ffd9cadfb2696572ca70f5')
validpgpkeys=('ECCAC84C1BA08A6CC8E63FBBF22FB1D78A77AEAB' # Giancarlo Razzolini
'C100346676634E80C940FB9E9C02FF419FECBE16') # Morten Linderud
prepare() {
patch -Np1 -d "$pkgname-$pkgver" < '0001-functions-fix-overwriting-of-symlinks-with-regular-f.patch'
patch -Np1 -d "$pkgname-$pkgver" < 'mkinitcpio-powerpc-support.patch'
patch -Np1 -d "$pkgname-$pkgver" < 'mkinitcpio-archpower-support.patch'
}
check() {

View File

@ -0,0 +1,85 @@
diff -ruN mkinitcpio-35.2.orig/functions mkinitcpio-35.2/functions
--- mkinitcpio-35.2.orig/functions 2023-04-21 16:46:24.860545564 +0200
+++ mkinitcpio-35.2/functions 2023-04-21 16:53:01.539587928 +0200
@@ -149,6 +149,14 @@
printf '%s' "$kver"
}
+kver_powerpc() {
+ local kver
+
+ read -r kver _ < \
+ <(strings "$1" | grep '^Linux version [0-9]' | awk '{print $3}')
+ printf '%s' "$kver"
+}
+
detect_compression() {
local bytes
@@ -235,11 +243,17 @@
local arch
arch="$(uname -m)"
- if [[ $arch == @(i?86|x86_64) ]]; then
- kver="$(kver_x86 "$1")"
- else
+ case "$arch" in
+ i?86|x86_64)
+ kver="$(kver_x86 "$1")"
+ ;;
+ ppc*)
+ kver="$(kver_powerpc "$1")"
+ ;;
+ *)
kver="$(kver_generic "$1")"
- fi
+ ;;
+ esac
[[ "$kver" =~ $re ]] || return 1
@@ -893,7 +907,7 @@
ln -s "/run" "$buildroot/var/run"
case "$arch" in
- x86_64)
+ riscv64|ppc64*|x86_64)
ln -s "lib" "$buildroot/usr/lib64"
ln -s "usr/lib" "$buildroot/lib64"
;;
diff -ruN mkinitcpio-35.2.orig/man/lsinitcpio.1.adoc mkinitcpio-35.2/man/lsinitcpio.1.adoc
--- mkinitcpio-35.2.orig/man/lsinitcpio.1.adoc 2023-04-21 16:46:24.860545564 +0200
+++ mkinitcpio-35.2/man/lsinitcpio.1.adoc 2023-04-21 16:46:29.436073204 +0200
@@ -54,7 +54,7 @@
Bugs
----
Upon writing this manpage, there were no noticeable bugs present. Please visit
-<http://bugs.archlinux.org/> for an up to date list.
+<https://github.com/kth5/archpower/issues> for an up to date list.
See Also
--------
diff -ruN mkinitcpio-35.2.orig/man/mkinitcpio.8.adoc mkinitcpio-35.2/man/mkinitcpio.8.adoc
--- mkinitcpio-35.2.orig/man/mkinitcpio.8.adoc 2023-04-21 16:46:24.860545564 +0200
+++ mkinitcpio-35.2/man/mkinitcpio.8.adoc 2023-04-21 16:46:29.436073204 +0200
@@ -489,7 +489,7 @@
Bugs
----
Upon writing this manpage, there were no noticeable bugs present. Please visit
-<http://bugs.archlinux.org/> for an up to date list.
+<https://github.com/kth5/archpower/issues> for an up to date list.
Authors
-------
diff -ruN mkinitcpio-35.2.orig/mkinitcpio mkinitcpio-35.2/mkinitcpio
--- mkinitcpio-35.2.orig/mkinitcpio 2023-04-21 16:46:24.860545564 +0200
+++ mkinitcpio-35.2/mkinitcpio 2023-04-21 16:48:38.318767166 +0200
@@ -133,7 +133,7 @@
error "invalid kernel specified: '%s'" "$1"
arch="$(uname -m)"
- if [[ "$arch" != @(i?86|x86_64) ]]; then
+ if [[ "$arch" != @(i?86|x86_64|ppc|ppc64|ppc64le|riscv64) ]]; then
error "kernel version extraction from image not supported for '%s' architecture" "$arch"
error "there's a chance the generic version extractor may work with a valid uncompressed kernel image"
fi

View File

@ -1,60 +0,0 @@
diff -ruN mkinitcpio-29/functions mkinitcpio-29.ppc64le/functions
--- mkinitcpio-29/functions 2020-10-27 19:46:01.000000000 +0100
+++ mkinitcpio-29.ppc64le/functions 2020-11-27 09:44:04.814293021 +0100
@@ -150,6 +150,9 @@
read kver _ < \
<(dd if="$1" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null)
+ # very ugly hack but works
+ [[ -z $kver ]] && kver=$(strings "$1" | grep '^Linux version [0-9]' | awk '{print $3}')
+
[[ $kver =~ $re ]] || return 1
printf '%s' "$kver"
@@ -692,6 +695,10 @@
ln -s "lib" "$buildroot/usr/lib64"
ln -s "usr/lib" "$buildroot/lib64"
;;
+ ppc64*)
+ ln -s "lib" "$buildroot/usr/lib64"
+ ln -s "usr/lib" "$buildroot/lib64"
+ ;;
esac
# mkinitcpio version stamp
diff -ruN mkinitcpio-29/man/lsinitcpio.1.txt mkinitcpio-29.ppc64le/man/lsinitcpio.1.txt
--- mkinitcpio-29/man/lsinitcpio.1.txt 2020-10-27 19:46:01.000000000 +0100
+++ mkinitcpio-29.ppc64le/man/lsinitcpio.1.txt 2020-11-26 15:33:10.306691263 +0100
@@ -53,7 +53,7 @@
Bugs
----
Upon writing this manpage, there were no noticeable bugs present. Please visit
-<http://bugs.archlinux.org/> for an up to date list.
+<https://github.com/kth5/archpower/issues> for an up to date list.
See Also
--------
diff -ruN mkinitcpio-29/man/mkinitcpio.8.txt mkinitcpio-29.ppc64le/man/mkinitcpio.8.txt
--- mkinitcpio-29/man/mkinitcpio.8.txt 2020-10-27 19:46:01.000000000 +0100
+++ mkinitcpio-29.ppc64le/man/mkinitcpio.8.txt 2020-11-26 15:33:10.306691263 +0100
@@ -359,7 +359,7 @@
Bugs
----
Upon writing this manpage, there were no noticeable bugs present. Please visit
-<http://bugs.archlinux.org/> for an up to date list.
+<https://github.com/kth5/archpower/issues> for an up to date list.
Authors
-------
diff -ruN mkinitcpio-29/mkinitcpio mkinitcpio-29.ppc64le/mkinitcpio
--- mkinitcpio-29/mkinitcpio 2020-10-27 19:46:01.000000000 +0100
+++ mkinitcpio-29.ppc64le/mkinitcpio 2020-11-26 15:33:10.307691160 +0100
@@ -102,7 +102,7 @@
fi
arch=$(uname -m)
- if [[ $arch != @(i?86|x86_64) ]]; then
+ if [[ $arch != @(i?86|x86_64|ppc64le|ppc64|ppc) ]]; then
error "kernel version extraction from image not supported for \`%s' architecture" "$arch"
return 1
fi