summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/linux-libre-vanilla/PKGBUILD66
-rw-r--r--libre/linux-libre-vanilla/linux-libre-vanilla-armv7h.install30
-rw-r--r--libre/linux-libre-vanilla/linux-libre-vanilla.install12
-rw-r--r--pcr/xtables-addons/PKGBUILD2
4 files changed, 69 insertions, 41 deletions
diff --git a/libre/linux-libre-vanilla/PKGBUILD b/libre/linux-libre-vanilla/PKGBUILD
index f647b389b..c9f1ffd2e 100644
--- a/libre/linux-libre-vanilla/PKGBUILD
+++ b/libre/linux-libre-vanilla/PKGBUILD
@@ -13,13 +13,26 @@
# Maintainer (arch32:linux): Andreas Baumann <mail@andreasbaumann.cc>
+# CAVEATS:
+# Provides linux-libre{,-docs,-headers} but not linux{,-docs,-headers}.
+# Otherwise, it is not possible to install along-side linux-libre,
+# because linux-libre conflicts and replaces any other package which provides linux.
+# Until we get this sorted out (eg: add linux-libre provision to linux-libre{,lts,...}),
+# the trade-off is that packages which require linux{,-docs,-headers}
+# will pull in linux-libre, even if linux-libre-vanilla is installed.
+# - linux-libre: extra/netfilter-fullconenat requires linux
+# pcr/xtables-addons required linux - changed to linux-libre
+# - linux-libre-headers: nothing requires linux-headers (but provided for completeness)
+# - linux-libre-docs: extra/systeroid requires linux-docs
+
+
pkgbase=linux-libre-vanilla
-pkgver=6.5.2
+pkgver=6.5.5
_minor_ver=$(sed 's|\([0-9]\+\.[0-9]\+\).*|\1|' <<<${pkgver}) # eg: 6.1
_upstream_minor_ver=${_minor_ver}-gnu # eg: 6.1-gnu
_upstream_ver=${pkgver}-gnu # eg: 6.1.5-gnu
_is_patch_release=$( [[ ${_upstream_minor_ver} != ${_upstream_ver} ]] ; echo $((!$?)) ; )
-pkgrel=1
+pkgrel=6
pkgdesc="Linux-libre (pristine upstream release)"
url=https://linux-libre.fsfla.org/
arch=(armv7h i686 x86_64)
@@ -28,7 +41,6 @@ makedepends=(
bc
cpio
gettext
- git
libelf
pahole
perl
@@ -42,7 +54,6 @@ makedepends=(
python-sphinx
texlive-latexextra
)
-makedepends=( ${makedepends[*]/git/} )
makedepends_armv7h=(uboot-tools vboot-utils dtc) # required by linux-libre-chromebook
options=('!strip')
_srcname=linux-${_minor_ver}
@@ -65,7 +76,7 @@ sha512sums=('45c8beef2e529df41f21819583ac8bdc37f6cf34434d94ae5ef08586b2d82721e3c
'SKIP'
'267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1'
'SKIP')
-(( _is_patch_release )) && sha512sums+=('219603fe8024b5f7308ce3f82c49fe437f4e5da665275575b1baa201ff38321aba77566df05fad1122efa0c30101b82cec31b3bd2ab868048af67e1f915d8f74'
+(( _is_patch_release )) && sha512sums+=('7c7c8db7b67b8130ea63e7a7fdad18588be591802c48befa2cdbfcf56baf0123b5046651e8d6927022ec3149100e4a80689c729ca26d6885a13169586b512b6b'
'SKIP')
sha512sums_armv7h=('47d16ffc94510d4a8773146a46cfb35aca8cfdae38d17283334cd62d92de36250fbec90e9892357033398ecc7d970127b1a41b703a8372972422ca4af7c90c70'
'f10af02f0cb2d31259d9633e1ba845f555f525789f750fc2ddc51bd18c5ff64fcdd242dae801623887f5ce5cdb5528bce890459f0fab9fd31a28868bb7f6bba5'
@@ -79,21 +90,18 @@ validpgpkeys=('474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva
'6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78') # David P.
+# reproducibility
export KBUILD_BUILD_HOST=parabola
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
+# per-arch KARCH
case "$CARCH" in
i686|x86_64) KARCH=x86;;
armv7h) KARCH=arm;;
esac
-_make() {
- test -s version
- make KERNELRELEASE="$(<version)" "$@"
-}
-
prepare() {
cd $_srcname
@@ -109,25 +117,23 @@ prepare() {
echo "Setting version..."
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
- sed -i 's|^-libre||' localversion.20-pkgname
- make defconfig
- make -s kernelrelease > version
- make mrproper
+ sed -i 's|^-libre||' localversion.20-pkgname # minimize diff
local src
declare -n per_arch_source=source_${CARCH}
for src in "${source[@]}" "${per_arch_source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
+ # *.zst n/a
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
echo "Setting config..."
- mv ../config{.$CARCH,}
+ mv ../config{.$CARCH,} # minimize diff
cp ../config .config
- _make olddefconfig
+ make olddefconfig
diff -u ../config .config || :
if [ "$CARCH" = "armv7h" ]; then
@@ -135,6 +141,7 @@ prepare() {
sed -i '2iexit 0' scripts/depmod.sh
fi
+ make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
@@ -142,9 +149,9 @@ build() {
[[ "$CARCH" == i686 ]] && export COMPRESSZST=(zstd -c -T0 --ultra -19 -)
cd $_srcname
- _make all
+ make all
[[ "$CARCH" =~ ^(armv7h|i686)$ ]] || # FIXME: sphinx-build returned an error at ./scripts/sphinx-pre-install line 317.
- _make htmldocs
+ make htmldocs
}
_package() {
@@ -158,18 +165,19 @@ _package() {
'wireless-regdb: to set the correct wireless channels of your country'
'linux-libre-firmware: firmware images needed for some devices'
)
+ optdepends=( "${optdepends[@]/linux/linux-libre}" ) # minimize diff
provides=(
- KSMBD-MODULE
- VIRTUALBOX-GUEST-MODULES
- WIREGUARD-MODULE
+ # KSMBD-MODULE # no parabola package requires this
+ # VIRTUALBOX-GUEST-MODULES # no parabola package requires this
+ # WIREGUARD-MODULE # no parabola package requires this
)
- provides+=("linux=${pkgver}" "LINUX-ABI_VERSION=${pkgver}")
+ provides=("linux-libre=${pkgver}")
replaces=(
- virtualbox-guest-modules-arch
- wireguard-arch
+ # virtualbox-guest-modules-arch # no such parabola package since 2021
+ # wireguard-arch # no such parabola package since 2020
)
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
- install=${pkgname}.install
+ if [[ "$CARCH" == armv7h ]] ; then install=${pkgname}-armv7h.install ; fi ; # BR #3520
cd $_srcname
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
@@ -177,13 +185,13 @@ _package() {
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
- install -Dm644 "$(_make -s image_name)" "$modulesdir/vmlinuz"
+ install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
- ZSTD_CLEVEL=19 _make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
+ ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
if [ "$CARCH" = "armv7h" ]; then
@@ -211,14 +219,13 @@ _package() {
# install mkinitcpio preset file
sed "${_subst}" ../linux.preset |
install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
-
- sed -i "${_subst}" ../${pkgname}.install
fi
}
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
depends=(pahole)
+ provides=("linux-libre-headers=${pkgver}")
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
@@ -311,6 +318,7 @@ _package-headers() {
_package-docs() {
pkgdesc="Documentation for the $pkgdesc kernel"
+ provides=("linux-libre-docs=${pkgver}")
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
diff --git a/libre/linux-libre-vanilla/linux-libre-vanilla-armv7h.install b/libre/linux-libre-vanilla/linux-libre-vanilla-armv7h.install
new file mode 100644
index 000000000..75fceb8c0
--- /dev/null
+++ b/libre/linux-libre-vanilla/linux-libre-vanilla-armv7h.install
@@ -0,0 +1,30 @@
+# armv7h mkinitcpio and install hooks do not manage the /boot dir properly (BR #3520)
+
+_pkgbase=linux-libre-vanilla
+_variant=${_pkgbase#linux-libre}
+_kernel_dest=boot/vmlinuz-${_pkgbase}
+
+_install()
+{
+ local pkgver=${1%-*}
+ local kver=${pkgver}-gnu-[0-9]${_variant}
+
+ [[ ! -f "${_kernel_dest}" ]] || ! echo "nothing to do" || return 0
+
+# mv ${kver} 2> /dev/null ${_kernel_dest} ||
+ mv ${kver} ${_kernel_dest} ||
+ cp usr/lib/modules/${kver}/vmlinuz ${_kernel_dest}
+}
+
+post_install() { _install $1 ; }
+
+post_upgrade() { _install $1 ; }
+
+post_remove()
+{
+ [[ -f boot/initramfs-${_pkgbase}.img ]] ||
+ [[ -f boot/vmlinuz-${_pkgbase} ]] || ! echo "nothing to do" || return 0
+
+ rm -f boot/initramfs-${_pkgbase}.img
+ rm -f boot/vmlinuz-${_pkgbase}
+}
diff --git a/libre/linux-libre-vanilla/linux-libre-vanilla.install b/libre/linux-libre-vanilla/linux-libre-vanilla.install
deleted file mode 100644
index c76e17aa3..000000000
--- a/libre/linux-libre-vanilla/linux-libre-vanilla.install
+++ /dev/null
@@ -1,12 +0,0 @@
-post_install() {
- if [[ "$CARCH" == armv7h ]]
- then cp usr/lib/modules/%KERNVER%/vmlinuz boot/vmlinuz-%PKGBASE%
- fi
-}
-
-post_remove() {
- if [[ "$CARCH" == armv7h ]]
- then rm -f boot/initramfs-%PKGBASE%.img
- rm -f boot/vmlinuz-%PKGBASE%
- fi
-}
diff --git a/pcr/xtables-addons/PKGBUILD b/pcr/xtables-addons/PKGBUILD
index 16efa9a36..f87ab1dc8 100644
--- a/pcr/xtables-addons/PKGBUILD
+++ b/pcr/xtables-addons/PKGBUILD
@@ -11,6 +11,8 @@ license=('GPL2')
url="https://${pkgname}.sourceforge.net/"
depends=('iptables' 'glibc' 'linux')
makedepends=('linux-api-headers' 'linux-headers' 'libtool' 'gcc' 'pkg-config')
+depends=( ${depends[@]/linux/linux-libre} ) # minimize diff
+makedepends=( ${makedepends[@]/linux/linux-libre} ) # minimize diff
source=("https://sourceforge.net/projects/${pkgname}/files/Xtables-addons//${pkgname}-${pkgver}.tar.xz")
sha256sums=('006f4e38bbf4b9a9069b90ca78c93b65800e9ebfd17332b713f1f80292420aaa')