diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 115 |
1 files changed, 50 insertions, 65 deletions
@@ -1,51 +1,37 @@ -# Maintainer: Joakim Hernberg <jbh@alchemy.lu> -# Contributor: David Runge <dvzrv@archlinux.org> +# Maintainer: David Runge <dvzrv@archlinux.org> +# Contributor: Joakim Hernberg <jbh@alchemy.lu> -_pkgver=4.19.106 -_rtpatchver=46 pkgbase=linux-rt-lts -pkgver=${_pkgver}.${_rtpatchver} +pkgver=5.15.73.52.realtime1 pkgrel=1 -arch=('x86_64') -url="https://wiki.linuxfoundation.org/realtime/start" -license=('GPL2') -makedepends=('bc' 'git' 'graphviz' 'imagemagick' 'inetutils' 'kmod' 'libelf' -'python-sphinx' 'python-sphinx_rtd_theme' 'xmlto') -options=('!strip') -_srcname=linux-${_pkgver} +pkgdesc='Linux RT LTS' +arch=(x86_64) +url="https://gitlab.archlinux.org/dvzrv/linux-rt-lts/-/commits/v$pkgver" +license=(GPL2) +makedepends=(bc git graphviz imagemagick kmod libelf pahole python-sphinx +python-sphinx_rtd_theme texlive-latexextra xmlto) +options=(!strip) 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}-rt${_rtpatchver}.patch.xz" - "https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-${_pkgver}-rt${_rtpatchver}.patch.sign" - 'config' - '0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch' + git+https://gitlab.archlinux.org/dvzrv/linux-rt-lts.git/#tag=v$pkgver?signed + config ) +sha512sums=('SKIP' + 'dbf2dc3e298ff0620e710226c7ae782675e6396db99f940c23b9310daf21084e5c6d72218a6b294a260575a66f31427d933f5bebdb450e4dd8e3c4f232833815') +b2sums=('SKIP' + '4f788c6c988a8ef2d65e091aad3e6cc41d50d4d2cd4e149cf2c70e474ce90174e51f23c9512f22217eb6ae0760d3af4140830268de2c2b44b7d576b41505b073') validpgpkeys=( - 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds - '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman - '8218F88849AAC522E94CF470A5E9288C4FA415FA' # Jan Alexander Steffens (heftig) - '64254695FFF0AA4466CC19E67B96E8162A8CF5D1' # Sebastian Andrzej Siewior - '5ED9A48FC54C0A22D1D0804CEBC26CDB5A56DE73' # Steven Rostedt - 'E644E2F1D45FA0B2EAA02F33109F098506FF0B14' # Thomas Gleixner + '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman <gregkh@linuxfoundation.org> + '5ED9A48FC54C0A22D1D0804CEBC26CDB5A56DE73' # Steven Rostedt (Der Hacker) <rostedt@goodmis.org> + 'C7E7849466FE2358343588377258734B41C31549' # David Runge <dvzrv@archlinux.org> + '991F6E3F0765CF6295888586139B09DA5BF0D338' # David Runge <dvzrv@archlinux.org> ) -sha256sums=('63c8bd76a9b282e18112f8ff9e3fd41e3d1df9f9b7248ea1a370b05a827e9cda' - 'SKIP' - '4b16c051cbf28c76a1b34d1b24ea4dcb9be28bdb640eab0c01f24b090e828a07' - 'SKIP' - '285708f83ef8aa4bc25643b2abd1a1aa7313f368d7221fa1c4bb6512b7a63236' - 'a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { - cd $_srcname - - # apply realtime patch - msg "applying patch-${_pkgver}-rt${_rtpatchver}.patch" - patch -Np1 -i "../patch-${_pkgver}-rt${_rtpatchver}.patch" + cd $pkgbase echo "Setting version..." scripts/setlocalversion --save-scmversion @@ -56,6 +42,8 @@ prepare() { for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" + # picking up the RT patch + src="${src//patch.xz/patch}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" @@ -64,24 +52,25 @@ prepare() { echo "Setting config..." cp ../config .config make olddefconfig -# make menuconfig # CLI menu for configuration + # make nconfig make -s kernelrelease > version - echo "Prepared %s version %s" "$pkgbase" "$(<version)" + echo "Prepared $pkgbase version $(<version)" } build() { - cd $_srcname - make bzImage modules htmldocs + cd $pkgbase + make htmldocs all } _package() { - pkgdesc="The ${pkgbase/linux/Linux} kernel and modules" - depends=(coreutils kmod initramfs) - optdepends=('crda: to set the correct wireless channels of your country' + pkgdesc="The $pkgdesc kernel and modules" + depends=(coreutils initramfs kmod) + optdepends=('wireless-regdb: to set the correct wireless channels of your country' 'linux-firmware: firmware images needed for some devices') + provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE KSMBD-MODULE) - cd $_srcname + cd $pkgbase local kernver="$(<version)" local modulesdir="$pkgdir/usr/lib/modules/$kernver" @@ -94,19 +83,18 @@ _package() { echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" echo "Installing modules..." - make INSTALL_MOD_PATH="$pkgdir/usr" modules_install + make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \ + DEPMOD=/doesnt/exist modules_install # Suppress depmod # remove build and source links rm "$modulesdir"/{source,build} - - echo "Fixing permissions..." - chmod -Rc u=rwX,go=rX "$pkgdir" } _package-headers() { - pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" + pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel" + depends=(pahole) - cd $_srcname + cd $pkgbase local builddir="$pkgdir/usr/lib/modules/$(<version)/build" echo "Installing build files..." @@ -116,14 +104,11 @@ _package-headers() { install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile cp -t "$builddir" -a scripts - # add objtool for external module building and enabled VALIDATION_STACK option + # required when STACK_VALIDATION is enabled install -Dt "$builddir/tools/objtool" tools/objtool/objtool - # add xfs and shmem for aufs building - mkdir -p "$builddir"/{fs/xfs,mm} - - # this is gone in v5.3 - mkdir "$builddir/.tmp_versions" + # required when DEBUG_INFO_BTF_MODULES is enabled + install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids echo "Installing headers..." cp -t "$builddir" -a include @@ -133,14 +118,17 @@ _package-headers() { install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h - # http://bugs.archlinux.org/task/13146 + # https://bugs.archlinux.org/task/13146 install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h - # http://bugs.archlinux.org/task/20402 + # https://bugs.archlinux.org/task/20402 install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h + # https://bugs.archlinux.org/task/71392 + install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h + echo "Installing KConfig files..." find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \; @@ -176,18 +164,18 @@ _package-headers() { esac done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0) + echo "Stripping vmlinux..." + strip -v $STRIP_STATIC "$builddir/vmlinux" + echo "Adding symlink..." mkdir -p "$pkgdir/usr/src" ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase" - - echo "Fixing permissions..." - chmod -Rc u=rwX,go=rX "$pkgdir" } _package-docs() { - pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel" + pkgdesc="Documentation for the $pkgdesc kernel" - cd $_srcname + cd $pkgbase local builddir="$pkgdir/usr/lib/modules/$(<version)/build" echo "Installing documentation..." @@ -201,9 +189,6 @@ _package-docs() { echo "Adding symlink..." mkdir -p "$pkgdir/usr/share/doc" ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase" - - echo "Fixing permissions..." - chmod -Rc u=rwX,go=rX "$pkgdir" } pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs") |