diff options
author | David Runge | 2019-11-01 14:50:22 +0100 |
---|---|---|
committer | David Runge | 2019-11-01 14:50:22 +0100 |
commit | c2be5751ca7ab12d04d3dc9b43488737876dc3d9 (patch) | |
tree | d916fe5ba87dd3bc2d7b5df8a1e207d75974c34d | |
parent | adb0dfa25e6061c3ab1e0daff567c9e3cc7ffe96 (diff) | |
download | aur-c2be5751ca7ab12d04d3dc9b43488737876dc3d9.tar.gz |
PKGBUILD: Aligning with vanilla kernel package script. Removing hooks, install and preset file (mkinitcpio is now taking care of this itself on the basis of a pkgbase file).
Adding python-sphinx to makedepends for html docs. Switching to a pkgver scheme, in which the patch number gets concatenated to the kernel version without any prefix.
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | 60-linux-rt.hook | 12 | ||||
-rw-r--r-- | 90-linux-rt.hook | 11 | ||||
-rw-r--r-- | PKGBUILD | 103 | ||||
-rw-r--r-- | linux-rt.install | 10 | ||||
-rw-r--r-- | linux-rt.preset | 14 |
6 files changed, 46 insertions, 121 deletions
@@ -1,14 +1,18 @@ pkgbase = linux-rt - pkgver = 5.2.21_rt13 + pkgver = 5.2.21.13 pkgrel = 1 url = https://wiki.linuxfoundation.org/realtime/start arch = x86_64 license = GPL2 makedepends = bc makedepends = git + makedepends = graphviz + makedepends = imagemagick makedepends = inetutils makedepends = kmod makedepends = libelf + makedepends = python-sphinx + makedepends = python-sphinx_rtd_theme makedepends = xmlto options = !strip source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.2.21.tar.xz @@ -16,9 +20,6 @@ pkgbase = linux-rt source = https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-5.2.21-rt13.patch.xz source = https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-5.2.21-rt13.patch.sign source = config - source = 60-linux-rt.hook - source = 90-linux-rt.hook - source = linux-rt.preset source = 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch source = 0002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 @@ -32,22 +33,16 @@ pkgbase = linux-rt sha256sums = 3251dd8f97d5117fe76d29d7eade1725a36bded072488a4e6618c51920462610 sha256sums = SKIP sha256sums = e3b9c915ed10bdf0ce3652b9c356b54127bb74c9bc10d5dc4fb8d67bf7677e27 - sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21 - sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919 - sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65 sha256sums = 75aa8dd708ca5a0137fbf7cddc9cafefe6aac6b8e0638c06c156d412d05af4bc sha256sums = 187fa8d9a6c5777a8930dcecfafdd9d6e9095d4bf96ec060e756fb7c6a88b74d pkgname = linux-rt pkgdesc = The Linux-rt kernel and modules - install = linux-rt.install depends = coreutils - depends = linux-firmware depends = kmod - depends = mkinitcpio + depends = initramfs optdepends = crda: to set the correct wireless channels of your country optdepends = linux-firmware: firmware images needed for some devices - backup = etc/mkinitcpio.d/linux-rt.preset pkgname = linux-rt-headers pkgdesc = Header files and scripts for building modules for Linux-rt kernel diff --git a/60-linux-rt.hook b/60-linux-rt.hook deleted file mode 100644 index b33873c854fb..000000000000 --- a/60-linux-rt.hook +++ /dev/null @@ -1,12 +0,0 @@ -[Trigger] -Type = File -Operation = Install -Operation = Upgrade -Operation = Remove -Target = usr/lib/modules/%KERNVER%/* -Target = usr/lib/modules/%EXTRAMODULES%/* - -[Action] -Description = Updating %PKGBASE% module dependencies... -When = PostTransaction -Exec = /usr/bin/depmod %KERNVER% diff --git a/90-linux-rt.hook b/90-linux-rt.hook deleted file mode 100644 index be0d886539f4..000000000000 --- a/90-linux-rt.hook +++ /dev/null @@ -1,11 +0,0 @@ -[Trigger] -Type = File -Operation = Install -Operation = Upgrade -Target = boot/vmlinuz-%PKGBASE% -Target = usr/lib/initcpio/* - -[Action] -Description = Updating %PKGBASE% initcpios... -When = PostTransaction -Exec = /usr/bin/mkinitcpio -p %PKGBASE% @@ -1,32 +1,29 @@ # Maintainer: Joakim Hernberg <jbh@alchemy.lu> -# Contributor: David Runge <dave@sleepmap.de> +# Contributor: David Runge <dvzrv@archlinux.org> # Contributor: Ray Rashif <schiv@archlinux.org> # Contributor: timbosa <tinny_tim@dodo.com.au> # Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> -#pkgbase=linux # Build stock -ARCH kernel -pkgbase=linux-rt # Build kernel with a different name +pkgbase=linux-rt _pkgver=5.2.21 -_rtpatchver=rt13 -pkgver="${_pkgver}_${_rtpatchver}" +_rtpatchver=13 +pkgver="${_pkgver}.${_rtpatchver}" pkgrel=1 arch=('x86_64') url="https://wiki.linuxfoundation.org/realtime/start" license=('GPL2') -makedepends=('bc' 'git' 'inetutils' 'kmod' 'libelf' 'xmlto') +makedepends=('bc' 'git' 'graphviz' 'imagemagick' 'inetutils' 'kmod' 'libelf' +'python-sphinx' 'python-sphinx_rtd_theme' 'xmlto') options=('!strip') _srcname=linux-${_pkgver} source=( "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_pkgver}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_pkgver}.tar.sign" - "https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-${_pkgver}-${_rtpatchver}.patch.xz" - "https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-${_pkgver}-${_rtpatchver}.patch.sign" + "https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-${_pkgver}-rt${_rtpatchver}.patch.xz" + "https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-${_pkgver}-rt${_rtpatchver}.patch.sign" config # the main kernel config file - 60-${pkgbase}.hook # pacman hook for depmod - 90-${pkgbase}.hook # pacman hook for initramfs regeneration - ${pkgbase}.preset # standard config files for mkinitcpio ramdisk 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch 0002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch ) @@ -43,26 +40,24 @@ sha256sums=('9a8ee3ff75dabffa76141c8dc7529dfbb3ca07888a3708a13f15b412268b3538' '3251dd8f97d5117fe76d29d7eade1725a36bded072488a4e6618c51920462610' 'SKIP' 'e3b9c915ed10bdf0ce3652b9c356b54127bb74c9bc10d5dc4fb8d67bf7677e27' - 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' - '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' - 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65' '75aa8dd708ca5a0137fbf7cddc9cafefe6aac6b8e0638c06c156d412d05af4bc' '187fa8d9a6c5777a8930dcecfafdd9d6e9095d4bf96ec060e756fb7c6a88b74d') -_kernelname=${pkgbase#linux} -: ${_kernelname:=-ARCH} +export KBUILD_BUILD_HOST=archlinux +export KBUILD_BUILD_USER=$pkgbase +export KBUILD_BUILD_TIMESTAMP="@${SOURCE_DATE_EPOCH:-$(date +%s)}" prepare() { cd $_srcname # apply realtime patch - msg "applying patch-${_pkgver}-${_rtpatchver}.patch" - patch -Np1 -i ../patch-${_pkgver}-${_rtpatchver}.patch + msg "applying patch-${_pkgver}-rt${_rtpatchver}.patch" + patch -Np1 -i "../patch-${_pkgver}-rt${_rtpatchver}.patch" msg2 "Setting version..." 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 @@ -78,68 +73,39 @@ prepare() { make olddefconfig # make menuconfig # CLI menu for configuration - make -s kernelrelease > ../version - msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" + make -s kernelrelease > version + msg2 "Prepared %s version %s" "$pkgbase" "$(<version)" } build() { cd $_srcname - make bzImage modules + make bzImage modules htmldocs } _package() { pkgdesc="The ${pkgbase/linux/Linux} kernel and modules" - [[ $pkgbase = linux ]] && groups=(base) - depends=(coreutils linux-firmware kmod mkinitcpio) + depends=(coreutils kmod initramfs) optdepends=('crda: to set the correct wireless channels of your country' 'linux-firmware: firmware images needed for some devices') - backup=("etc/mkinitcpio.d/$pkgbase.preset") - install=${pkgbase}.install + cd $_srcname local kernver="$(<version)" local modulesdir="$pkgdir/usr/lib/modules/$kernver" - cd $_srcname - msg2 "Installing boot image..." # 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" msg2 "Installing modules..." make INSTALL_MOD_PATH="$pkgdir/usr" modules_install - # a place for external modules, - # with version file for building modules and running depmod from hook - local extramodules="extramodules$_kernelname" - local extradir="$pkgdir/usr/lib/modules/$extramodules" - install -Dt "$extradir" -m644 ../version - ln -sr "$extradir" "$modulesdir/extramodules" - # 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 - s|%EXTRAMODULES%|$extramodules|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" ../${pkgbase}.preset | install -Dm644 /dev/stdin \ - "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset" - sed "$subst" ../60-${pkgbase}.hook | install -Dm644 /dev/stdin \ - "$pkgdir/usr/share/libalpm/hooks/60-$pkgbase.hook" - sed "$subst" ../90-${pkgbase}.hook | install -Dm644 /dev/stdin \ - "$pkgdir/usr/share/libalpm/hooks/90-$pkgbase.hook" - msg2 "Fixing permissions..." chmod -Rc u=rwX,go=rX "$pkgdir" } @@ -147,12 +113,12 @@ _package() { _package-headers() { pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" - local builddir="$pkgdir/usr/lib/modules/$(<version)/build" - cd $_srcname + local builddir="$pkgdir/usr/lib/modules/$(<version)/build" msg2 "Installing build files..." - install -Dt "$builddir" -m644 Makefile .config Module.symvers System.map vmlinux + install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \ + localversion.* version vmlinux install -Dt "$builddir/kernel" -m644 kernel/Makefile install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile cp -t "$builddir" -a scripts @@ -163,7 +129,7 @@ _package-headers() { # add xfs and shmem for aufs building mkdir -p "$builddir"/{fs/xfs,mm} - # ??? + # this is gone in v5.3 mkdir "$builddir/.tmp_versions" msg2 "Installing headers..." @@ -219,7 +185,7 @@ _package-headers() { msg2 "Adding symlink..." mkdir -p "$pkgdir/usr/src" - ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase-$pkgver" + ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase" msg2 "Fixing permissions..." chmod -Rc u=rwX,go=rX "$pkgdir" @@ -228,14 +194,25 @@ _package-headers() { _package-docs() { pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel" - local builddir="$pkgdir/usr/lib/modules/$(<version)/build" - cd $_srcname + local builddir="$pkgdir/usr/lib/modules/$(<version)/build" msg2 "Installing documentation..." mkdir -p "$builddir" cp -t "$builddir" -a Documentation + msg2 "Removing doctrees..." + rm -r "$builddir/Documentation/output/.doctrees" + + msg2 "Moving HTML docs..." + local src dst + while read -rd '' src; do + dst="$builddir/Documentation/${src#$builddir/Documentation/output/}" + mkdir -p "${dst%/*}" + mv "$src" "$dst" + rmdir -p --ignore-fail-on-non-empty "${src%/*}" + done < <(find "$builddir/Documentation/output" -type f -print0) + msg2 "Adding symlink..." mkdir -p "$pkgdir/usr/share/doc" ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase" diff --git a/linux-rt.install b/linux-rt.install deleted file mode 100644 index 37ba37494605..000000000000 --- a/linux-rt.install +++ /dev/null @@ -1,10 +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 -} diff --git a/linux-rt.preset b/linux-rt.preset deleted file mode 100644 index 66709a8c1537..000000000000 --- a/linux-rt.preset +++ /dev/null @@ -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" |