# Maintainer: graysky # Contributor: Jan Alexander Steffens (heftig) pkgbase=linux-rc pkgrel=2 _srcname=linux-5.17 _major=5.17 ### on initial release this is null otherwise it is the current stable subversion ### ie 1,2,3 corresponding $_major.1, $_major.3 etc _minor=5 _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 0002-random-treat-bootloader-trust-toggle-the-same-way-as.patch 0003-tick-Detect-and-fix-jiffies-update-stall.patch 0004-tick-rcu-Remove-obsolete-rcu_needs_cpu-parameters.patch 0005-tick-rcu-Stop-allowing-RCU_SOFTIRQ-in-idle.patch 0006-lib-irq_poll-Declare-IRQ_POLL-softirq-vector-as-ksof.patch 0007-NFSv4.1-provide-mount-option-to-toggle-trunking-disc.patch 0008-Revert-ASoC-Intel-sof_es8336-Add-a-quirk-for-Huawei-.patch::https://raw.githubusercontent.com/sirlucjan/kernel-patches/master/5.17/revert-5.17-patches/0001-Revert-ASoC-Intel-sof_es8336-Add-a-quirk-for-Huawei-.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) 'C7E7849466FE2358343588377258734B41C31549' # David Runge ) b2sums=('16ae7c49d2d4ed0535b7643f0c5477e161716e42ab6e500f6a3c1bece9c8d262807fa5e5514490cfe57ef18cbf06ef1cb086954a3e8ede0ee3b0defc173b7de5' 'SKIP' '253dff70d1f41a8d7483d98dfc374ef11367e7a07db0584787742b5a929458c3a52c81373622aa34f0421af3e4e270ba7f187e0421b3b124db43248f5ac04a36' 'SKIP' '3d1e2c1dff1e828c655b449962fb47c49fdf77d58c65c8af41ee8c56fbb2d8fdb7d0b963c775b26ac4022c6e0f9c8d19c11bc1e0e358580396520e9261bc8eeb' 'e226fb1f498a739a9a65cf8bb542978b0573ba7630e82516d2393dcdcdd42910adc7107d6174eed349a513643092a737acf552c19d27f896f4f771de3d1e00f1' '2b892907b904240f3cd1c3d75d168e4b6de7d1d31342de754f63a78fa1d33a9217ee4b98d13ddf8eea713710289258ce7639a90af9411283044ca218157fd2ca' '29b4c2928352779050b3414905cb0dd9f8fdaba6cddd765e20d6b33dc8f2d9f22f60299202a75174a4e2a36502500cafacd70b02df946a5e5e19bd3601f75846' '6d54cf6d55d036f15870fd0531dbab2d6dc84c47ac92240c991b76f8c441f283257d612c6ce41f60a190f87cec10c04b28fefba58656d6fced34fb8011e35aa5' 'fbc9290ef523e85a292f9c369396229e708ccabb5785a4422bac5eb43a24e2be6a6dec7799b3639d911437b48b76c5f3d857d6d61ec944d50a88c0d7145cf3da' 'cc2b7c3327d4050c3ce09b80b2a148ca8c31dc8ba11d2da39274b746ecf648fd3b902673c7a84ea611e85f9cc329d6f39b04e040acfd1c3c3ef3da1c2b6422a8' '847d2bad98c5473aa4cc955618ffd84fabf805c6290fb7d4afd7c41a7dfb685ec22b1370ed5e31923bad4f1fb7ee435e588a55ab805cbeea5ac86dd33519fdb8' '7cfc7e80ba1a6131ca0224292869cf40cdec6d3946aff3e33ab8f1fca48b9a2958c006b32df83ecd45c585e953bdd81cc9bd0863090ed7cb60689a9e09d49d70') 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 $(