diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 83 |
1 files changed, 38 insertions, 45 deletions
@@ -3,7 +3,7 @@ set -u pkgbase="linux-lts414" -pkgver="4.14.151" +pkgver="4.14.336" _srcname="linux-${pkgver%.*}" pkgrel='1' arch=('x86_64') @@ -16,36 +16,38 @@ source=( "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz" 'config' # the main kernel config file - '60-linux.hook' # pacman hook for depmod - '90-linux.hook' # pacman hook for initramfs regeneration - 'linux-lts.preset' # standard config files for mkinitcpio ramdisk + # disable USER_NS for non-root users by default '0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch' + # https://bugs.archlinux.org/task/56711 '0003-Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch' + # https://github.com/NixOS/nixpkgs/pull/61076 '0004-export_kernel_fpu_functions.patch' + # add modules.builtin.modinfo + '0005-898490c010b.patch' # https://pkgbuild.com/~bgyorgy/files/898490c010b.patch ) +if ! :; then + source+=("${source[0]/.xz/.sign}") + source+=("${source[1]/.xz/.sign}") # patch>=4.14.59 are not signed +fi validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds@linux-foundation.org> '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com> ) # https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc md5sums=('bacdb9ffdcd922aa069a5e1520160e24' - '44e1994a4768278db8fbe092765b8ee6' - '47faa1a906f5078933b1c076d163aacc' - 'ce6c81ad1ad1f8b333fd6077d47abdaf' - 'a85bfae59eb537b973c388ffadb281ff' - 'a329f9581060d555dc7358483de9760a' + 'c7ce7c564746338afcd1e4c8d8e52e89' + 'b482d22d72ba46de5db13584c889ab42' '53523555d234de3b2fde749096ba9948' '95204750f94a5f6d2d19e021736265d5' - 'f7d76cdef5cf4ac6a49115fc4f1f35d5') + 'f7d76cdef5cf4ac6a49115fc4f1f35d5' + 'b7e3c03892c1c45aa19e11aff82b388c') sha256sums=('f81d59477e90a130857ce18dc02f4fbe5725854911db1e7ba770c7cd350f96a7' - '1a7fd60f82c659ada834780a57517fe4f851111db2d3a6476cc6713c428076ad' - 'bbacdd59bd4ac2fbc52da13827e6fa39c144dc9ef1393c01c00e1ec974ae831f' - 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' - '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' - 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65' + 'c577893e1bbb8f5c36b7207f6d7f3165cd64c069d977d1b720c10e5917a821e7' + '1d1992babef5f1c35911dd6b3818b3684628fc21b97bc9975791892bccb50b20' '36b1118c8dedadc4851150ddd4eb07b1c58ac5bbf3022cc2501a27c2b476da98' 'b6c56ff2dffebe164941ac3428351e158c9c059e884057ecfc215eeea12e76eb' - 'caba7945805b1ade42e42d2f981ccdd8791c76f39166212f7970a78057582474') + 'caba7945805b1ade42e42d2f981ccdd8791c76f39166212f7970a78057582474' + '8efff55ae9dd776ff4ac109e736e8040858f441ae1900435bdeb9f366a53d68f') _kernelname=${pkgbase#linux} @@ -63,6 +65,7 @@ prepare() { cd "${_srcname}" # add upstream patch + test -s "${srcdir}/patch-${pkgver}" || (cd "${srcdir}"; xz -dkf "${srcdir}/patch-${pkgver}.xz") # temporary fix for file-5.40 https://bugs.archlinux.org/task/70261 patch -Nup1 -i "${srcdir}/patch-${pkgver}" set +u; msg2 "Complete: patch-${pkgver}"; set -u chmod +x tools/objtool/sync-check.sh # GNU patch doesn't support git-style file mode @@ -72,14 +75,17 @@ prepare() { # add latest fixes from stable queue, if needed # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git - # disable USER_NS for non-root users by default - patch -Nup1 -i ../0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch - - # https://bugs.archlinux.org/task/56711 - patch -Nup1 -i ../0003-Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch - - # https://github.com/NixOS/nixpkgs/pull/61076 - patch -Nup1 -i '../0004-export_kernel_fpu_functions.patch' + local _f + for _f in "${source[@]}"; do + _f="${_f%%::*}" + _f="${_f##*/}" + case "${_f}" in + *.patch) + set +u; msg2 "Patch ${_f}"; set +u + patch -Nup1 -i "${srcdir}/${_f}" + ;; + esac + done # Local or private patches shopt -s nullglob @@ -158,11 +164,10 @@ _package() { set -u pkgdesc="The ${pkgbase/linux/Linux} kernel and modules" #[ "${pkgbase}" = "linux" ] && groups=('base') - depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-firmware' 'kmod' 'initramfs') optdepends=('crda: to set the correct wireless channels of your country') - backup=("etc/mkinitcpio.d/${pkgbase}.preset") - install=linux-lts.install - provides=("linux=${pkgver}") + optdepends+=('linux-firmware-uncompressed: hardware support') + #provides=("linux=${pkgver}") # not permitted by order of Arch TU cd "${_srcname}" @@ -173,11 +178,13 @@ _package() { mkdir -p "${pkgdir}"/{boot,usr/lib/modules} make -j1 "${_makeopts[@]}" LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install - cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # systemd expects to find the kernel here to allow hibernation # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344 - ln -sr "${pkgdir}/boot/vmlinuz-${pkgbase}" "${pkgdir}/usr/lib/modules/${_kernver}/vmlinuz" + cp arch/x86/boot/bzImage "${pkgdir}/usr/lib/modules/${_kernver}/vmlinuz" + + # Used by mkinitcpio to name the kernel + echo "$pkgbase" | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_kernver}/pkgbase" # make room for external modules local _extramodules="extramodules-${_basekernel}${_kernelname:--lts}" @@ -202,27 +209,13 @@ _package() { s|%KERNVER%|${_kernver}|g s|%EXTRAMODULES%|${_extramodules}|g " - - # hack to allow specifying an initially nonexisting install file - sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg" - true && install=${install}.pkg - - # install mkinitcpio preset file - sed "${_subst}" ../linux-lts.preset | - install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - - # install pacman hooks - 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" set +u } _package-headers() { set -u pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" - provides=("linux-headers=${pkgver}") + #provides=("linux-headers=${pkgver}") # not permitted by order of Arch TU cd ${_srcname} local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build" |