# Maintainer: graysky # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-rc pkgrel=1 _srcname=linux-5.18 _major=5.18 ### on initial release this is null otherwise it is the current stable subversion ### ie 1,2,3 corresponding $_major.1, $_major.3 etc _minor=3 _minorc=$((_minor+1)) ### on initial release this is just $_major [[ -z $_minor ]] && _fullver=$_major || _fullver=$_major.$_minor #_fullver=$_major.$_minor _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 ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) 'C7E7849466FE2358343588377258734B41C31549' # David Runge ) b2sums=('52c63f606d3c7ea3afb1b5e44f32c2135650310a18a48ea882e3838b066c4236ae85ac3905c6da96cc2c6d6968f96db16862da06891295fd94f88e090dfef301' 'SKIP' '141cc47585905cab087910ece010c69b9f5985484df58f08da99558e51cd3707ea8ea6b12a2f6eb75a208a178724b66eb61166611ec933333b15965bc4382033' 'SKIP' 'c7d8a6dbf653bb294a81f6522d692fa783806fce1bd9185f1fb52c694dabd5f32972e6a7a5d03a1cfd35825e90963fdac5bdaf2ed75daa8b85ed00a1b07d2d9c' 'e226fb1f498a739a9a65cf8bb542978b0573ba7630e82516d2393dcdcdd42910adc7107d6174eed349a513643092a737acf552c19d27f896f4f771de3d1e00f1') 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 msg2 "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 msg2 "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 diff -u ../config .config || : # make nconfig make -s kernelrelease > version msg2 "Prepared $pkgbase version $(