Date: Tuesday, October 29, 2019 @ 15:13:18 Author: heftig Revision: 365999
5.3.7.b-3: Changes for new kmod and mkinitcpio hooks Modified: linux-hardened/trunk/PKGBUILD Deleted: linux-hardened/trunk/60-linux.hook linux-hardened/trunk/90-linux.hook linux-hardened/trunk/linux.install linux-hardened/trunk/linux.preset ---------------+ 60-linux.hook | 11 ---------- 90-linux.hook | 11 ---------- PKGBUILD | 61 +++++++++++--------------------------------------------- linux.install | 12 ----------- linux.preset | 14 ------------ 5 files changed, 13 insertions(+), 96 deletions(-) Deleted: 60-linux.hook =================================================================== --- 60-linux.hook 2019-10-29 15:13:11 UTC (rev 365998) +++ 60-linux.hook 2019-10-29 15:13:18 UTC (rev 365999) @@ -1,11 +0,0 @@ -[Trigger] -Type = File -Operation = Install -Operation = Upgrade -Operation = Remove -Target = usr/lib/modules/%KERNVER%/* - -[Action] -Description = Updating %PKGBASE% module dependencies... -When = PostTransaction -Exec = /usr/bin/depmod %KERNVER% Deleted: 90-linux.hook =================================================================== --- 90-linux.hook 2019-10-29 15:13:11 UTC (rev 365998) +++ 90-linux.hook 2019-10-29 15:13:18 UTC (rev 365999) @@ -1,11 +0,0 @@ -[Trigger] -Type = File -Operation = Install -Operation = Upgrade -Target = usr/lib/modules/%KERNVER%/vmlinuz -Target = usr/lib/initcpio/* - -[Action] -Description = Updating %PKGBASE% initcpios... -When = PostTransaction -Exec = /usr/bin/mkinitcpio -p %PKGBASE% Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-10-29 15:13:11 UTC (rev 365998) +++ PKGBUILD 2019-10-29 15:13:18 UTC (rev 365999) @@ -1,30 +1,21 @@ # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> -# Contributor: Daniel Micay <[email protected]> -# Contributor: Tobias Powalowski <[email protected]> -# Contributor: Thomas Baechler <[email protected]> pkgbase=linux-hardened -_pkgver=5.3.7 -_hardenedver=b -pkgver=${_pkgver}.${_hardenedver} -pkgrel=2 +pkgver=5.3.7.b +pkgrel=3 url='https://github.com/anthraxx/linux-hardened' -arch=('x86_64') -license=('GPL2') +arch=(x86_64) +license=(GPL2) makedepends=( - xmlto kmod inetutils bc libelf python-sphinx python-sphinx_rtd_theme - graphviz imagemagick + xmlto kmod inetutils bc libelf + python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) -replaces=('linux-grsec') options=('!strip') -_srcname=linux-${_pkgver} +_srcname=linux-${pkgver%.*} source=( - https://www.kernel.org/pub/linux/kernel/v${_pkgver%%.*}.x/${_srcname}.tar.{xz,sign} + https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign} https://github.com/anthraxx/${pkgbase}/releases/download/${pkgver}/${pkgbase}-${pkgver}.patch{,.sig} 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 ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -32,18 +23,13 @@ '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A' # Daniel Micay 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) +# https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc sha256sums=('c6c9714e21531c825c306b107bc6f6c7bfa2d5270a14bad170f8de5a73d34802' 'SKIP' '0dd90897d1857bf7b3f373c86174056a447774930c419fbc27db599da30dd51e' 'SKIP' - '514512ab1ffbb69367e20787b4ae7cc3a4df903aa6e8eb0a2c7e6ed4356c43c4' - '452b8d4d71e1565ca91b1bebb280693549222ef51c47ba8964e411b2d461699c' - 'c043f3033bb781e2688794a59f6d1f7ed49ef9b13eb77ff9a425df33a244a636' - 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65') + '514512ab1ffbb69367e20787b4ae7cc3a4df903aa6e8eb0a2c7e6ed4356c43c4') -_kernelname=${pkgbase#linux} -: ${_kernelname:=-ARCH} - export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="@${SOURCE_DATE_EPOCH:-$(date +%s)}" @@ -52,10 +38,10 @@ cd $_srcname msg2 "Setting version..." - sed -e "/^EXTRAVERSION =/s/=.*/= .${_hardenedver}/" -i Makefile + sed -e "/^EXTRAVERSION =/s/=.*/= .${pkgver##*.}/" -i Makefile scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel - echo "$_kernelname" > localversion.20-pkgname + echo "${pkgbase#linux}" > localversion.20-pkgname local src for src in "${source[@]}"; do @@ -85,8 +71,7 @@ optdepends=('crda: to set the correct wireless channels of your country' 'linux-firmware: firmware images needed for some devices' 'usbctl: deny_new_usb control') - backup=("etc/mkinitcpio.d/$pkgbase.preset") - install=linux.install + replaces=('linux-grsec') cd $_srcname local kernver="$(<version)" @@ -96,7 +81,6 @@ # systemd expects to find the kernel here to allow hibernation # https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344 install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz" - install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-$pkgbase" # Used by mkinitcpio to name the kernel echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" @@ -107,25 +91,6 @@ # remove build and source links rm "$modulesdir"/{source,build} - msg2 "Installing hooks..." - # sed expression for following substitutions - local subst=" - s|%PKGBASE%|$pkgbase|g - s|%KERNVER%|$kernver|g - " - - # hack to allow specifying an initially nonexisting install file - sed "$subst" "$startdir/$install" > "$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" } Deleted: linux.install =================================================================== --- linux.install 2019-10-29 15:13:11 UTC (rev 365998) +++ linux.install 2019-10-29 15:13:18 UTC (rev 365999) @@ -1,12 +0,0 @@ -post_upgrade() { - if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then - echo "WARNING: /boot appears to be a separate partition but is not mounted." - fi -} - -post_remove() { - rm -f boot/initramfs-%PKGBASE%.img - rm -f boot/initramfs-%PKGBASE%-fallback.img -} - -# vim:set ft=sh ts=8 sts=2 sw=2 et: Deleted: linux.preset =================================================================== --- linux.preset 2019-10-29 15:13:11 UTC (rev 365998) +++ linux.preset 2019-10-29 15:13:18 UTC (rev 365999) @@ -1,14 +0,0 @@ -# mkinitcpio preset file for the '%PKGBASE%' package - -ALL_config="/etc/mkinitcpio.conf" -ALL_kver="/boot/vmlinuz-%PKGBASE%" - -PRESETS=('default' 'fallback') - -#default_config="/etc/mkinitcpio.conf" -default_image="/boot/initramfs-%PKGBASE%.img" -#default_options="" - -#fallback_config="/etc/mkinitcpio.conf" -fallback_image="/boot/initramfs-%PKGBASE%-fallback.img" -fallback_options="-S autodetect"
