diff options
author | David Cohen | 2022-03-20 16:45:34 -0500 |
---|---|---|
committer | David Cohen | 2022-03-20 16:45:34 -0500 |
commit | b930c1ac22b53b78af55e55d869cbb62c456806e (patch) | |
tree | 2021e30dc208d68efb165f3ae5e72313ed64a7e6 | |
parent | 8b3b361f0e3fc221e92f685c00632977689cd88e (diff) | |
download | aur-b930c1ac22b53b78af55e55d869cbb62c456806e.tar.gz |
Add support for persistent user custom config file
This patch adds support for a persistent user custom config file located
at /etc/linux-mainline-git/config that will be appended to .config
before compilation.
Signed-off-by: David Cohen <dacohen@pm.me>
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | config.user | 3 |
3 files changed, 20 insertions, 3 deletions
@@ -1,6 +1,6 @@ pkgbase = linux-mainline-git pkgdesc = Linus Torvalds' Mainline Linux - pkgver = v5.17.rc8.r0.09688c0166e7 + pkgver = v5.17.r0.f443e374ae13 pkgrel = 1 url = https://www.kernel.org arch = x86_64 @@ -20,14 +20,17 @@ pkgbase = linux-mainline-git makedepends = imagemagick makedepends = git options = !strip + backup = etc/linux-mainline-git/config source = linux-torvalds::git+https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux source = config source = config.extra + source = config.user validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E sha256sums = SKIP sha256sums = 937b8c12653d7b18be9b5673e9fa7fba9512c2b5c947e5d489a5e0749a0a8253 sha256sums = 6c593d021527cef8f328cbce0da5a5dcd0d418468d93ff7aef43c700aad51349 + sha256sums = b5ced6ad1f03a5cfe6dccc0b2b31f91420cfe97823e5d15d5b94b7224362daa9 pkgname = linux-mainline-git pkgdesc = The Linus Torvalds' Mainline Linux kernel and modules @@ -6,12 +6,14 @@ # will be on config.extra file. pkgbase=linux-mainline-git -pkgver=v5.17.rc8.r0.09688c0166e7 +pkgver=v5.17.r0.f443e374ae13 pkgrel=1 pkgdesc="Linus Torvalds' Mainline Linux" url="https://www.kernel.org" arch=(x86_64) license=(GPL2) +_userconfig="/etc/${pkgbase}/config" +backup=("${_userconfig##/}") makedepends=( bc kmod libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick @@ -23,6 +25,7 @@ source=( "$_srcname::git+https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux" config # the main kernel config file config.extra # additional configs + config.user # user custom config ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -30,7 +33,9 @@ validpgpkeys=( ) sha256sums=('SKIP' '937b8c12653d7b18be9b5673e9fa7fba9512c2b5c947e5d489a5e0749a0a8253' - '6c593d021527cef8f328cbce0da5a5dcd0d418468d93ff7aef43c700aad51349') + '6c593d021527cef8f328cbce0da5a5dcd0d418468d93ff7aef43c700aad51349' + 'b5ced6ad1f03a5cfe6dccc0b2b31f91420cfe97823e5d15d5b94b7224362daa9') + export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase @@ -60,6 +65,9 @@ prepare() { echo "Setting config..." cat ../config ../config.extra > .config + if [[ -f "$_userconfig" ]]; then + cat $_userconfig >> .config + fi make olddefconfig diff -u ../config .config || : @@ -97,6 +105,9 @@ _package() { # remove build and source links rm "$modulesdir"/{source,build} + + # install user config file + install -Dm644 $srcdir/config.user "${pkgdir}${_userconfig}" } _package-headers() { diff --git a/config.user b/config.user new file mode 100644 index 000000000000..c2a9be6e7c03 --- /dev/null +++ b/config.user @@ -0,0 +1,3 @@ +# User custom config for linux-mainline-git AUR package +# Add extra configs to be appended to .config file before package compilation + |