# 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=2 _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 ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) 'C7E7849466FE2358343588377258734B41C31549' # David Runge ) b2sums=('de28a790288a265e1268cad5fc8e2e9491511e6cf8d566dcbbfb9d047659e359a498522265ee4e47fe1e380b5706260543bcbe47f011faf82d4932db743fb9be' 'SKIP' '6f07d9da86101ab72eadd53a9f58a4740037608a006fc622a923d4dd9578ce62cc9959711dca2e953e3fb68286f55fb14be04a4a00fc49a33c2c28bd5944532f' 'SKIP' '3c6ff0fd8713cf5f0f0f939e45826bc83a7c4458665ae59094d83c416ae536fd8ed3370dec813d1b442ce727459150a0ef04a001cadb2c5ef7d3e2b01d5849da' '8c06f840512d90c2339066677f1c64c07d1d9b7cd9a7d653fa7be1f806b0c66cb26892db662ef95cb6c27c996aef03566454699cfaa8d620dcb90c1f8f8d8276' '863763c1880921c15f4d931194004461c1cb2bf195bb55ae04777694c15c01542e30d8f221d908b4fbb6a57e7b36e3260a97d67a109af3baeb53d6a85b671dd9') 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 $(