summaryrefslogtreecommitdiff
path: root/kernels/linux-libre-xtreme/PKGBUILD
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2019-11-06 13:53:15 -0300
committerDavid P <megver83@parabola.nu>2019-11-06 13:53:15 -0300
commite614d12c5df52b471bc52a7128a4128f1060847e (patch)
tree4b8bc4fc2e0937931ab09510bb25f2e52ec38dc5 /kernels/linux-libre-xtreme/PKGBUILD
parentb24f8a8f091c73ce546c8cc60f6bca003693c9f7 (diff)
downloadabslibre-e614d12c5df52b471bc52a7128a4128f1060847e.tar.gz
abslibre-e614d12c5df52b471bc52a7128a4128f1060847e.tar.bz2
abslibre-e614d12c5df52b471bc52a7128a4128f1060847e.zip
updpkg: kernels/linux-libre-xtreme 5.3.8_gnu-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'kernels/linux-libre-xtreme/PKGBUILD')
-rw-r--r--kernels/linux-libre-xtreme/PKGBUILD102
1 files changed, 39 insertions, 63 deletions
diff --git a/kernels/linux-libre-xtreme/PKGBUILD b/kernels/linux-libre-xtreme/PKGBUILD
index e180d4a4c..7ba3c6be1 100644
--- a/kernels/linux-libre-xtreme/PKGBUILD
+++ b/kernels/linux-libre-xtreme/PKGBUILD
@@ -4,27 +4,25 @@
# Based on linux package
+_replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix
+_replacesoldkernels=() # '%' gets replaced with kernel suffix
+_replacesoldmodules=() # '%' gets replaced with kernel suffix
+
pkgbase=linux-libre-xtreme
_srcbasever=5.3-gnu
-_srcver=5.3.7-gnu
-_hardenedver=a
-
-_replacesarchkernel=('linux%') # '%' gets replaced with _kernelname
-_replacesoldkernels=() # '%' gets replaced with _kernelname
-_replacesoldmodules=() # '%' gets replaced with _kernelname
-
+_srcver=5.3.8-gnu
_srcname=linux-${_srcbasever%-*}
-_archpkgver=${_srcver%-*}
+_hardenedver=${_srcver%-*}.a
pkgver=${_srcver//-/_}
pkgrel=1
-rcnver=5.3.6
-rcnrel=armv7-x12
-arch=(i686 x86_64 armv7h)
+rcnver=5.3.7
+rcnrel=armv7-x13
url='https://wiki.parabola.nu/Xtreme'
+arch=(i686 x86_64 armv7h)
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
)
options=('!strip')
_archpatches=(
@@ -35,12 +33,10 @@ _archpatches=(
source=(
"https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcbasever/linux-libre-$_srcbasever.tar.xz"{,.sign}
"https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcver/patch-$_srcbasever-$_srcver.xz"{,.sign}
- "https://github.com/anthraxx/linux-hardened/releases/download/${_srcver%-*}.${_hardenedver}/linux-hardened-${_srcver%-*}.${_hardenedver}.patch"{,.sig}
+ "https://github.com/anthraxx/linux-hardened/releases/download/${_hardenedver}/linux-hardened-${_hardenedver}.patch"{,.sig}
"https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig}
config.i686 config.x86_64 config.armv7h # the main kernel config files
- 60-linux.hook # pacman hook for depmod
- 90-linux.hook # pacman hook for initramfs regeneration
- linux.preset # standard config files for mkinitcpio ramdisk
+ linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk
# maintain the TTY over USB disconnects
# http://www.coreboot.org/EHCI_Gadget_Debug
@@ -79,9 +75,9 @@ validpgpkeys=(
)
sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b7967a8988bd9e36d4e728cc573a36e6eac056dbcab2f9aa742f18cbb4fb3164f'
'SKIP'
- '22064d7cf6da426eff98b3fd72a52e6dc1349f1c5f53755041b487335fa8ff61fc1083440af38ef631056301d30d827c5c203566d1f720b9a65505e9c2cd3ee8'
+ 'eca168c4c460bf8d8fbf322e1aa9c6b509f205c7597142967648c09402de95c8438ae302b4920c8f120192b1a54286f0fb860955c66414f3a3c376e41f246391'
'SKIP'
- '821d851394863022ee5ed84c4737d319284bf95eb04dc7e05020a3f528daebac65712bb263f55e7933c89b3ffe43a467397c62bbdab566b874778f239a81b72d'
+ 'bfb66281d772b24741471e93ea265a9b6a15081fe2a2c1cd6bde9eef34b2943bcbe42f7908cb7335b97a92c189a8fceff2aa7b753c08447a913928f343eeb336'
'SKIP'
'13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3'
'SKIP'
@@ -90,16 +86,14 @@ sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b796
'267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1'
'SKIP'
'e8faa7fd50830a6ea7f3a6e193b7c51beb92fc5ffd4fc4813b48cb09e12c11a2d9f13aeb8533eb44de04fb65ae25e89b18aa2883191bd0a8f518797416765cac'
- '924523b003144ada1cd783242d637b765acc0c591bebd42762522a36c2900e923659e8f360801c9d559bd96495e9987e190fa0a1d020198a621dce15d4a03797'
+ '08e3e3bbe05b50c03023d9eb3cee7ea6fe9466d81afc458d21448a4edd73089574f9efa03ffc8b66167ed2c761fad21d85ef35dfc6bc1488eafa85236fe541ea'
'e95afb5fad75b8d2fe31dc042c07b3b784f36e678cdb91ad7a5df79660c94cd74ad42ffd7ba5747db829eb5647fb56afa89bfda6022025e6c26b0dc0ebd5c4a0'
- '6b57a66b870b2f525e2dedd8f224b89474fd4ec6ea18484b0a67a1a2b9a4fc95d025cac181504406ea42a35d6c1b184c0d4e38c92815022935fc55746c69c7c1'
- '2718b58dbbb15063bacb2bde6489e5b3c59afac4c0e0435b97fe720d42c711b6bcba926f67a8687878bd51373c9cf3adb1915a11666d79ccb220bf36e0788ab7'
- '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
+ 'aca591b5a2e838754e3c5fd2c0e50098ad54c2d0f990de5bf9cff8608e881daf0e37132294ed1a0e0a7b9e1c194c0b89f95da001d94febdb25a01c409060e3ac'
'02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168'
'5c48b0092ab6a31453e27e6345347fd2d066e1c306c4c8a9144260bf37d0d13879b5cfe688906a06627d39a40a37e229e5300a479b2c9159e93e05ea7adc6b0a'
'b07d84cac1c784f5652a4681efd54ef89ce9cb0778bd2a633709b7150f9fb59db978dc290b92bcb69b8d211471c22a0be2a81a129318cd7efff601a3c591483c')
-sha512sums_armv7h=('078f8dfaabccb2a51c3440ed67a438bad1a83d35ccbcf06cb2d6f7d3c7e140b96c116926a0c503ffc31f849834bc22350467c1f0a48f60815c0d2882e9e01b93'
+sha512sums_armv7h=('f465d4229c82280040dbbe4f24a99bf0318298659218e66e1c05645d5921f01c74517eb9a4401928d6b1a221d2c09e360d270b08b0285864a8eaac022796ce0a'
'SKIP'
'9724026836feefa67acb9644acf3ee89d465734af50b6637b8232b705c6259035d485cd1a1f0f08d189921eb75ad095b3e1f7f7e5e0e52302352c453f03ac820'
'41f9f7d58bb29311e09dd58105d173fb2e2a955c0e7d632bc8788c2f0a803a45281dfd2be1712d6ec93b58b9f440f3f8398f234bd7ded1c49b1c33b328478203'
@@ -111,16 +105,19 @@ sha512sums_armv7h=('078f8dfaabccb2a51c3440ed67a438bad1a83d35ccbcf06cb2d6f7d3c7e1
'c1191d35ef8ce8ffaa817e952916dfe5fff45758c13394bb3fc7eba7376fd2cdc94ef32a2a54d431d8258da10fa7ce2284b092b6871e9b357b71ac0144a655b8'
'e8e73026ac02645b5914ac97bfada4c94f48e490331a28960ee5939feb18dc5630831748cdd210b27d91590322cf564d3265feee9a8246a373cc117cd520c10d')
-_kernelname=${pkgbase#linux-libre}
-_replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}")
-_replacesoldkernels=("${_replacesoldkernels[@]/\%/${_kernelname}}")
-_replacesoldmodules=("${_replacesoldmodules[@]/\%/${_kernelname}}")
+_replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}")
+_replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}")
+_replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}")
case "$CARCH" in
i686|x86_64) KARCH=x86;;
armv7h) KARCH=arm;;
esac
+export KBUILD_BUILD_HOST=parabola
+export KBUILD_BUILD_USER=$pkgbase
+export KBUILD_BUILD_TIMESTAMP="@${SOURCE_DATE_EPOCH:-$(date +%s)}"
+
prepare() {
cd $_srcname
@@ -136,7 +133,7 @@ prepare() {
msg2 "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
- echo "$_kernelname" > localversion.20-pkgname
+ echo "${pkgbase#linux-libre}" > localversion.20-pkgname
if [ "$CARCH" = "armv7h" ]; then
local src_armv7h
@@ -150,7 +147,7 @@ prepare() {
fi
if [ "$CARCH" = "x86_64" ]; then
- patch -Np1 < ../linux-hardened-${_srcver%-*}.${_hardenedver}.patch
+ patch -Np1 < ../linux-hardened-${_hardenedver}.patch
else
local src
for src in "${_archpatches[@]}"; do
@@ -174,25 +171,23 @@ build() {
cd $_srcname
if [ "$CARCH" = "armv7h" ]; then
make zImage modules htmldocs dtbs
- elif [ "$CARCH" = "x86_64" ] || [ "$CARCH" = "i686" ]; then
+ else
make bzImage modules htmldocs
fi
}
_package() {
- pkgdesc="The ${pkgbase^} kernel and modules with a handful of security features [AppArmor, SMACK, TOMOYO, SELinux, YAMA, Linux-hardened]"
- ! [ "$CARCH" = x86_64 ] && pkgdesc="${pkgdesc/, Linux-hardened}"
+ pkgdesc="The ${pkgbase^} kernel and modules with all LSMs enabled, using AppArmor by default"
+ [ "$CARCH" = x86_64 ] && pkgdesc+=" and Linux-hardened patchset"
depends=(coreutils kmod initramfs)
optdepends=('crda: to set the correct wireless channels of your country'
'linux-libre-firmware: firmware images needed for some devices'
'apparmor: to configure and enable mandatory access control for programs'
'tomoyo-tools: to manage tomoyo userspace tools')
optdepends_x86_64=('usbctl: deny_new_usb control')
- provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}" "LINUX-ABI_VERSION=${_srcver%%-*}")
+ provides=("${_replacesarchkernel[@]/%/=${_srcver%%-*}}" "LINUX-ABI_VERSION=${_srcver%%-*}")
conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}")
- backup=("etc/mkinitcpio.d/$pkgbase.preset")
- install=linux.install
cd $_srcname
local kernver="$(<version)"
@@ -205,7 +200,6 @@ _package() {
# 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"
@@ -216,32 +210,14 @@ _package() {
# remove build and source links
rm "$modulesdir"/{source,build}
- msg2 "Installing hooks..."
- # sed expression for following substitutions
+ # armv7h presets only work with ALL_kver=$kernver
if [ "$CARCH" = "armv7h" ]; then
- local subst="
- s|/boot/vmlinuz-%PKGBASE%|$kernver|g
- s|%PKGBASE%|$pkgbase|g
- s|%KERNVER%|$kernver|g
- "
- else
- local subst="
- s|%PKGBASE%|$pkgbase|g
- s|%KERNVER%|$kernver|g
- "
- fi
+ backup=("etc/mkinitcpio.d/$pkgbase.preset")
- # 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 "Installing mkinitcpio preset..."
+ sed "s|%PKGBASE%|$pkgbase|g;s|%KERNVER%|$kernver|g" ../linux-armv7h.preset \
+ | install -Dm644 /dev/stdin "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
+ fi
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
@@ -249,7 +225,7 @@ _package() {
_package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase^} kernel"
- provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}")
+ provides=("${_replacesarchkernel[@]/%/-headers=${_srcver%%-*}}")
conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}")
@@ -351,7 +327,7 @@ _package-headers() {
_package-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase^} kernel"
- provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}")
+ provides=("${_replacesarchkernel[@]/%/-docs=${_srcver%%-*}}")
conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")
replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}")