# Maintainer: graysky # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-rc pkgrel=1 _srcname=linux-5.16 _major=5.16 ### on initial release this is null otherwise it is the current stable subversion ### ie 1,2,3 corresponding $_major.1, $_major.3 etc _minor=10 _minorc=$((_minor+1)) ### on initial release this is just $_major _fullver=$_major.$_minor #_fullver=$_major _rcver=1 _rcpatch=patch-${_major}.${_minorc}-rc${_rcver} pkgver=${_major}.${_minorc}rc${_rcver} arch=(x86_64) license=(GPL2) url="https://www.kernel.org/" makedepends=( bc kmod libelf cpio perl tar xz ) options=('!strip') _modprobeddb= source=( https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/"$_rcpatch".{xz,sign} # https://lkml.org/lkml/2019/8/23/712 #"$_rcpatch.patch::https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/patch/?id=$_srcname.y&id2=v${_major}.${_minor}" https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_fullver.tar.{xz,sign} config # the main kernel config file 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch 0002-Bluetooth-btintel-Fix-bdaddress-comparison-with-garb.patch 0003-Bluetooth-Read-codec-capabilities-only-if-supported.patch 0004-Bluetooth-fix-deadlock-for-RFCOMM-sk-state-change.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) 'C7E7849466FE2358343588377258734B41C31549' # David Runge ) b2sums=('ef45618d83f7c8234af2edae8ae51239bc8ae3e1523e04e34d05be70d9216aa7240d398695e55818d84613695fe7ee0d804165968379183a07e550d083695333' 'SKIP' '6394d715c765e27aafa3ef7ba34fb17522eb14c5e004b8ab54eb31b55bcb782205d516cdef5f7204739890642289cd1f2ef8ac430a7ee63698ccf3b3d7b0b118' 'SKIP' 'b837c6c0d9b5e39047ebddececa28f7fbe078b8c6d8d95028cb6bf5265f7b754415e3eed779d5bce075b1163f9b5fdd28b06f2552abf99061a436e3665aa0c8a' '4531d063ee9a7c50e357a544041285965d0b2d03d1f22df06c58ef9341502e120ec712d418a403d153fae0cd3dccd31046891d7659459358176d6e29a72024f2' '33c8bc77c60c4fcc16740a95e49ec9fde853d04dceb8a47b1ae0ef4d14d05d453346efd9fb96579f28990c44664728937af79c52c8da8889a3502f2ade6eee11' 'a5e5a53119135c5e82c0de604b8ece29716ba6452305606f009a3c8c0c990f3ec6b44d9940afa30455eb64f1f281145dcd0f72b576a0ea4520d67504a5a5f501' 'cbf0456551864c4064193e34a7a9abdd633901063fd709549aa579090b26e486ced264d204bc19a9d099cd157e0ab9de728c43d28a8bbf2addf9f1f320b47507') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { # hacky work around for rc1 not getting extracted # https://bbs.archlinux.org/viewtopic.php?id=265115 if [[ ! -f "$srcdir/$_rcpatch" ]]; then xz -dc "$SRCDEST/$_rcpatch.xz" > "$_rcpatch" fi cd linux-${_fullver} msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname echo "Applying $_rcpatch..." patch -Np1 <"../$_rcpatch" local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = 0*.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done echo "Setting config..." cp ../config .config # disable CONFIG_DEBUG_INFO at build time otherwise memory usage blows up and # can easily overwhelm a system with 32 GB of memory using a tmpfs build. # introduced by FS#66260, see: # https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux&id=663b08666b269eeeeaafbafaee07fd03389ac8d7 scripts/config --disable CONFIG_DEBUG_INFO scripts/config --disable CONFIG_CGROUP_BPF scripts/config --disable CONFIG_BPF_LSM scripts/config --disable CONFIG_BPF_PRELOAD scripts/config --disable CONFIG_BPF_LIRC_MODE2 scripts/config --disable CONFIG_BPF_KPROBE_OVERRIDE if [[ -n "$_modprobeddb" ]]; then #msg "Running Steven Rostedt's make localmodconfig now" #sudo /usr/bin/modprobed-db recall #make localmodconfig msg "Running Steven Rostedt's make localmodconfig now" if [[ -f $HOME/.config/modprobed.db ]]; then _useit="$HOME/.config/modprobed.db" else _useit="../modprobed.db" fi make LSMOD="$_useit" localmodconfig fi make olddefconfig # make nconfig make -s kernelrelease > version echo "Prepared $pkgbase version $(