diff options
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 46 |
1 files changed, 33 insertions, 13 deletions
@@ -1,4 +1,5 @@ -# Maintainer: Kyle De'Vir (QuartzDragon) <kyle[dot]devir[at]mykolab[dot]com> +# Maintainer: Νίκος Φυτίλης n-fit[at]live[dot]com +# Contributor: Kyle De'Vir (QuartzDragon) <kyle[dot]devir[at]mykolab[dot]com> # Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> @@ -59,8 +60,8 @@ _subarch= _localmodcfg= pkgbase=linux-bcachefs-git -_srcver_tag=5.1.15-arch1 -pkgver="${_srcver_tag//-/.}" +_srcver_tag=5.1 +pkgver=v5.1.20 pkgrel=1 arch=(x86_64) url="https://github.com/koverstreet/bcachefs" @@ -81,20 +82,20 @@ _repo_url="https://github.com/koverstreet/${_reponame}" _reponame_gcc_patch="kernel_gcc_patch" _repo_url_gcc_patch="https://github.com/graysky2/${_reponame_gcc_patch}" _gcc_patch_name="enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch" +_repo_upstream="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git" _pkgdesc_extra="~ featuring Kent Overstreet's bcachefs filesystem" source=( "git+${_repo_url}" "git+${_repo_url_gcc_patch}" + "upstream::git+${_repo_upstream}" config # the main kernel config file 60-linux.hook # pacman hook for depmod 90-linux.hook # pacman hook for initramfs regeneration linux.preset # standard config files for mkinitcpio ramdisk 001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch 002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch - 003-Bluetooth-Fix-minimum-encryption-key-size-check.patch - ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -102,20 +103,30 @@ validpgpkeys=( ) sha512sums=('SKIP' 'SKIP' + 'SKIP' 'f78db94e15ed4a5abca28238d2a315dcf13ff20e04694497275208b4aad18b1ded8b715bad546c623b0138747e6de4c070c28b5d3cc383bdd8b5959afc58294b' '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a' '2718b58dbbb15063bacb2bde6489e5b3c59afac4c0e0435b97fe720d42c711b6bcba926f67a8687878bd51373c9cf3adb1915a11666d79ccb220bf36e0788ab7' '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf' '6792e775464ba41b03938fd42d71caf22c85a4c63a255f5ff807da6101a42afe2f9cb940bd5e80b1e7d21a0b959962d90cc2452920597e7ba0bcb15d37c15233' 'dc6321a572ac365f73b924b3bd8cd26112a0256baf358e3893b90a623e4c0a9eb3667b23f86570581371f993f2c17998e31e27aa36eee925a0589b20b71b65ff' - '2e9bc765b1761dc14fd924c6500bd16076991571692eb1dd9c84c10d92ce3cfc95e12aad503e64d9bbd2e3229a8d73e480d44e7713f958da36f2ac70e4820dd2') +) _kernelname=${pkgbase#linux} : ${_kernelname:=-ARCH} -prepare() { +pkgver() { + cd upstream + git fetch --tags &> /dev/null + _srcver_tag=$(git tag | grep v${_srcver_tag} | grep -v '-' | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -n1) + echo "${_srcver_tag//-/.}" +} + +actual_prepare() { +#prepare() { cd ${_reponame} + msg2 "Latest tag found: ${pkgver}" msg2 "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel @@ -126,19 +137,28 @@ prepare() { # git pull --no-edit arch_stable "v${_srcver_tag}" # msg2 "Adding patches from Linux upstream kernel repository..." - git remote add upstream_stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git || true - git pull --no-edit upstream_stable v"${_srcver_tag//-arch*/}" + git remote add upstream ../upstream || true + git fetch --tags upstream + if ! git merge v${_srcver_tag} + then if ! git diff --name-only --diff-filter=U | xargs git checkout --theirs + then git diff --name-only --diff-filter=U | + while read line + do sleep 0.1; if ! git checkout --theirs $line + then sleep 0.1; git rm $line + fi + done + fi + fi msg2 "Arch patches" patch -Np1 -i "${srcdir}/001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch" patch -Np1 -i "${srcdir}/002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch" - patch -Np1 -i "${srcdir}/003-Bluetooth-Fix-minimum-encryption-key-size-check.patch" - sed -i -e "s/^EXTRAVERSION =.*/EXTRAVERSION = -arch1/" Makefile +# sed -i -e "s/^EXTRAVERSION =.*/EXTRAVERSION = -arch1/" Makefile # https://github.com/graysky2/kernel_gcc_patch msg2 "Patching to enabled additional gcc CPU optimizatons..." patch -Np1 -i "$srcdir/${_reponame_gcc_patch}/${_gcc_patch_name}" - + msg2 "Setting config..." cp ../config .config @@ -174,8 +194,8 @@ prepare() { } build() { + ( actual_prepare ) cd ${_reponame} - make bzImage modules } |