diff options
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | 60-linux-rt-lts.hook | 12 | ||||
-rw-r--r-- | 90-linux-rt-lts.hook | 11 | ||||
-rw-r--r-- | PKGBUILD | 107 | ||||
-rw-r--r-- | linux-rt-lts.install | 10 | ||||
-rw-r--r-- | linux-rt-lts.preset | 14 |
6 files changed, 50 insertions, 125 deletions
@@ -1,26 +1,27 @@ pkgbase = linux-rt-lts - pkgver = 4.19.72_rt26 + pkgver = 4.19.72.26 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/v4.x/linux-4.19.72.tar.xz source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.72.tar.sign source = https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-4.19.72-rt26.patch.xz source = https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-4.19.72-rt26.patch.sign + source = config source = 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch source = 0002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch - source = config - source = 60-linux-rt-lts.hook - source = 90-linux-rt-lts.hook - source = linux-rt-lts.preset validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E validpgpkeys = 8218F88849AAC522E94CF470A5E9288C4FA415FA @@ -31,23 +32,17 @@ pkgbase = linux-rt-lts sha256sums = SKIP sha256sums = 7e360014f510daf6ab886f272531f98d9ae5cb5a55973a9b636346ac45f841f6 sha256sums = SKIP + sha256sums = e5a6ac3346c359353b3a7491bb77637870328a4bf3f3d57bf434a29b72632600 sha256sums = 75aa8dd708ca5a0137fbf7cddc9cafefe6aac6b8e0638c06c156d412d05af4bc sha256sums = 67aed9742e4281df6f0bd18dc936ae79319fee3763737f158c0e87a6948d100d - sha256sums = e5a6ac3346c359353b3a7491bb77637870328a4bf3f3d57bf434a29b72632600 - sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21 - sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919 - sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65 pkgname = linux-rt-lts pkgdesc = The Linux-rt-lts kernel and modules - install = linux-rt-lts.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-lts.preset pkgname = linux-rt-lts-headers pkgdesc = Header files and scripts for building modules for Linux-rt-lts kernel diff --git a/60-linux-rt-lts.hook b/60-linux-rt-lts.hook deleted file mode 100644 index b33873c..0000000 --- a/60-linux-rt-lts.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-lts.hook b/90-linux-rt-lts.hook deleted file mode 100644 index be0d886..0000000 --- a/90-linux-rt-lts.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% @@ -6,29 +6,26 @@ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> -#pkgbase=linux # Build stock -ARCH kernel -pkgbase=linux-rt-lts # Build kernel with a different name _pkgver=4.19.72 -_rtpatchver=rt26 -pkgver=${_pkgver}_${_rtpatchver} +_rtpatchver=26 +pkgbase=linux-rt-lts +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/v4.x/linux-${_pkgver}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${_pkgver}.tar.sign" - "https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-${_pkgver}-${_rtpatchver}.patch.xz" - "https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-${_pkgver}-${_rtpatchver}.patch.sign" + "https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-${_pkgver}-rt${_rtpatchver}.patch.xz" + "https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-${_pkgver}-rt${_rtpatchver}.patch.sign" + config # the main kernel config file 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch 0002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch - 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 ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -42,27 +39,25 @@ sha256sums=('f9fcb6b3bd29115ac55fc154e300c3dce2044502732f6842ad6c25e6f9f51f6d' 'SKIP' '7e360014f510daf6ab886f272531f98d9ae5cb5a55973a9b636346ac45f841f6' 'SKIP' - '75aa8dd708ca5a0137fbf7cddc9cafefe6aac6b8e0638c06c156d412d05af4bc' - '67aed9742e4281df6f0bd18dc936ae79319fee3763737f158c0e87a6948d100d' 'e5a6ac3346c359353b3a7491bb77637870328a4bf3f3d57bf434a29b72632600' - 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' - '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' - 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65') + '75aa8dd708ca5a0137fbf7cddc9cafefe6aac6b8e0638c06c156d412d05af4bc' + '67aed9742e4281df6f0bd18dc936ae79319fee3763737f158c0e87a6948d100d') -_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-lts.install b/linux-rt-lts.install deleted file mode 100644 index 37ba374..0000000 --- a/linux-rt-lts.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-lts.preset b/linux-rt-lts.preset deleted file mode 100644 index 66709a8..0000000 --- a/linux-rt-lts.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" |