# Maintainer: graysky # Contributor: Tobias Powalowski # Contributor: Thomas Baechler pkgbase=linux-rc pkgrel=1 _srcname=linux-4.18 _stable=4.18.4 _patchver=4.18.5 _rcver=1 pkgver=${_patchver}rc${_rcver} _rcpatch=patch-${_patchver}-rc${_rcver} arch=('x86_64') url="https://www.kernel.org/" license=('GPL2') makedepends=('kmod' 'inetutils' 'bc' 'libelf') options=('!strip') source=( https://www.kernel.org/pub/linux/kernel/v4.x/linux-$_stable.tar.{xz,sign} https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/$_rcpatch.{xz,sign} config # the main kernel config file 60-linux.hook # pacman hook for depmod 90-linux.hook # pacman hook for initramfs regeneration linux.preset # standard config files for mkinitcpio ramdisk 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch 0002-Increase-timeout-in-lspcon_wait_mode.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) sha256sums=('12dbc87b5bdb7c47980fefea06911ea43b9ef226747e17e879428e6d4d8ba842' 'SKIP' 'df64d750516fb613d7e70d391244173861d6e667923148e8126c24071f0577ea' 'SKIP' 'bb700544d499a92dab141a218cc1eac62fdff0b67682748cb827035269c02a55' 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65' '30449a2f7f18eae3bb62e956595c0b8a584d6b998ed7539bde995d6df45c7c4e' 'fddc020ad516100fabc0aa16538d81d5156de377c7a0fbd2dc23b284b9e36cbe') _kernelname=${pkgbase#linux} prepare() { cd linux-$_stable msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "$_kernelname" > localversion.20-pkgname local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue msg2 "Applying patch $src..." patch -Np1 < "../$src" done msg2 "Setting config..." cp ../config .config msg2 "Applying rc patches..." # add upstream patch # ONLY comment out for initial rc (ie 4.10 --> 4.10.1rc1) -- needed for all others #patch -p1 -i "$srcdir/patch-${_stable}" # add rc patch patch -p1 -i "$srcdir/$_rcpatch" # get kernel version make prepare # load configuration # Configure the kernel. Replace the line below with one of your choice. #make nconfig # new CLI menu for configuration # rewrite configuration yes "" | make config >/dev/null make -s kernelrelease > ../version msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" } build() { cd linux-$_stable make bzImage modules } _package() { pkgdesc="The release candidate kernel and modules" [[ $pkgbase = linux ]] && groups=(base) depends=(coreutils linux-firmware kmod mkinitcpio) optdepends=('crda: to set the correct wireless channels of your country') backup=("etc/mkinitcpio.d/$pkgbase.preset") install=linux.install local kernver="$( "$startdir/$install.pkg" true && install=$install.pkg # fill in mkinitcpio preset and pacman hooks sed "$subst" ../linux.preset | install -Dm644 /dev/stdin \ "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset" sed "$subst" ../60-linux.hook | install -Dm644 /dev/stdin \ "$pkgdir/usr/share/libalpm/hooks/60-$pkgbase.hook" sed "$subst" ../90-linux.hook | install -Dm644 /dev/stdin \ "$pkgdir/usr/share/libalpm/hooks/90-$pkgbase.hook" msg2 "Fixing permissions..." chmod -Rc u=rwX,go=rX "$pkgdir" } _package-headers() { pkgdesc="Header files and scripts for building modules for the linux-rc kernel" local builddir="$pkgdir/usr/lib/modules/$(