From 1dd45b1f53cc76c1f3cb14ac5eb6bdfca3efc6c0 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 1 Aug 2022 20:19:37 +0200 Subject: GNUtoo: Add WIP linux-next-tests package The idea of this package is to simplify testing for people working on very simple kernel patches that don't need a lot of testing. The idea is that once the patche(s) to send upstream are ready (they compile fine, the commit message looks OK, ./scripts/checkpatch.pl doesn't report any problematic issues anymore, etc), this PKGBUILD would be modified or forked to add the patches to test. Once built, the resulting packages could be installed on the target machine without having to do any other changes to the system. Signed-off-by: Denis 'GNUtoo' Carikli --- ~GNUtoo/linux-next-tests/PKGBUILD | 279 + ~GNUtoo/linux-next-tests/config.armv7h | 10569 +++++++++++++++++++++++ ~GNUtoo/linux-next-tests/config.i686 | 11279 +++++++++++++++++++++++++ ~GNUtoo/linux-next-tests/config.x86_64 | 11049 ++++++++++++++++++++++++ ~GNUtoo/linux-next-tests/linux-armv7h.preset | 11 + 5 files changed, 33187 insertions(+) create mode 100644 ~GNUtoo/linux-next-tests/PKGBUILD create mode 100644 ~GNUtoo/linux-next-tests/config.armv7h create mode 100644 ~GNUtoo/linux-next-tests/config.i686 create mode 100644 ~GNUtoo/linux-next-tests/config.x86_64 create mode 100644 ~GNUtoo/linux-next-tests/linux-armv7h.preset diff --git a/~GNUtoo/linux-next-tests/PKGBUILD b/~GNUtoo/linux-next-tests/PKGBUILD new file mode 100644 index 000000000..9bb9ec208 --- /dev/null +++ b/~GNUtoo/linux-next-tests/PKGBUILD @@ -0,0 +1,279 @@ +# Contributor: David P. +# Contributor: André Silva +# Contributor: Márcio Silva +# Contributor: fauno +# Contributor: Sorin-Mihai Vârgolici +# Contributor: Michał Masłowski +# Contributor: Luke R. +# Contributor: Andreas Grapentin +# Maintainers: Parabola hackers + +# 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-next-tests +pkgver=20220408 +pkgrel=1 +pkgdesc='Deblobbed linux-next for testing patches (for upstreaming work)' +arch=(i686 x86_64 armv7h) +license=(GPL2) +makedepends=( + bc libelf pahole cpio perl tar xz + xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra +) +makedepends=( ${makedepends[*]/git/} ) +options=('!strip') +_srcname=linux-next +source=( + "git+https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git" + config.i686 config.x86_64 config.armv7h # the main kernel config files + linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk +) + +sha512sums=('SKIP' + 'b1f013835dcf521dcadb58ed22f271f7f01b3b15403924bd0076eb9ef4e8aa31f98b1b99d47ae726f8e981b3da44f1c484ce14e2030e31a67ad7c8eea55848d9' + '5a955a795f9f49d8617897300d3d03c431b1a6fa2bc9ed4106606617e4f16b28f94906498b13c24fd5c186c76a685e5f877013093184ae80435e7b86f52e8755' + '47d16ffc94510d4a8773146a46cfb35aca8cfdae38d17283334cd62d92de36250fbec90e9892357033398ecc7d970127b1a41b703a8372972422ca4af7c90c70' + '53103bf55b957b657039510527df0df01279dec59cda115a4d6454e4135025d4546167fa30bdc99107f232561c1e096d8328609ab5a876cf7017176f92ad3e0b') + +_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="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" + +pkgver() { + cd $_srcname + git describe --tags | sed 's/^next-//' +} + +mksource() { + cd $_srcname + + # Here we don't use linux-libre but we still remove the nonfree + # software found in the Linux kernel. This avoids legal issues and + # make sure we stay FSDG compliant. + # We do it this way to stay as close as possible to the upstream + # kernel. + # The list of files to remove has been taken from debian/copyright in the + # Debian kernel git repository[1]. + # [1] https://salsa.debian.org/kernel-team/linux.git + rm -f \ + Documentation/netlabel/draft-ietf-cipso-ipsecurity-01.txt \ + arch/powerpc/platforms/8xx/micropatch.c \ + drivers/media/usb/dvb-usb/af9005-script.h \ + drivers/media/i2c/vs6624.c \ + drivers/net/appletalk/cops* \ + drivers/video/fbdev/nvidia \ + drivers/video/fbdev/riva +} + +prepare() { + cd $_srcname + + echo "Setting version..." + scripts/setlocalversion --save-scmversion + echo "-$pkgrel" > localversion.10-pkgrel + echo "${pkgbase#linux-libre}" > localversion.20-pkgname + + echo "Setting config..." + cp ../../config.$CARCH .config + make olddefconfig + + make -s kernelrelease > version + echo "Prepared $pkgbase version $(