Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
261
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None
  1. diff --git a/PKGBUILD b/PKGBUILD
  2. index 07d3b9e..33879b5 100755
  3. --- a/PKGBUILD
  4. +++ b/PKGBUILD
  5. @@ -59,8 +59,8 @@ _subarch=
  6. _localmodcfg=
  7.  
  8. pkgbase=linux-bcachefs-git
  9. -_srcver_tag=5.1.15-arch1
  10. -pkgver="${_srcver_tag//-/.}"
  11. +_srcver_tag=5.1
  12. +pkgver=v5.1.19
  13. pkgrel=1
  14. arch=(x86_64)
  15. url="https://github.com/koverstreet/bcachefs"
  16. @@ -81,26 +81,27 @@ _repo_url="https://github.com/koverstreet/${_reponame}"
  17. _reponame_gcc_patch="kernel_gcc_patch"
  18. _repo_url_gcc_patch="https://github.com/graysky2/${_reponame_gcc_patch}"
  19. _gcc_patch_name="enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch"
  20. +_repo_upstream="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
  21.  
  22. _pkgdesc_extra="~ featuring Kent Overstreet's bcachefs filesystem"
  23.  
  24. source=(
  25. "git+${_repo_url}"
  26. "git+${_repo_url_gcc_patch}"
  27. + "upstream::git+${_repo_upstream}"
  28. config # the main kernel config file
  29. 60-linux.hook # pacman hook for depmod
  30. 90-linux.hook # pacman hook for initramfs regeneration
  31. linux.preset # standard config files for mkinitcpio ramdisk
  32. 001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch
  33. 002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch
  34. - 003-Bluetooth-Fix-minimum-encryption-key-size-check.patch
  35. -
  36. )
  37. validpgpkeys=(
  38. 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
  39. '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
  40. )
  41. sha512sums=('SKIP'
  42. + 'SKIP'
  43. 'SKIP'
  44. 'f78db94e15ed4a5abca28238d2a315dcf13ff20e04694497275208b4aad18b1ded8b715bad546c623b0138747e6de4c070c28b5d3cc383bdd8b5959afc58294b'
  45. '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a'
  46. @@ -108,14 +109,23 @@ sha512sums=('SKIP'
  47. '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf'
  48. '6792e775464ba41b03938fd42d71caf22c85a4c63a255f5ff807da6101a42afe2f9cb940bd5e80b1e7d21a0b959962d90cc2452920597e7ba0bcb15d37c15233'
  49. 'dc6321a572ac365f73b924b3bd8cd26112a0256baf358e3893b90a623e4c0a9eb3667b23f86570581371f993f2c17998e31e27aa36eee925a0589b20b71b65ff'
  50. - '2e9bc765b1761dc14fd924c6500bd16076991571692eb1dd9c84c10d92ce3cfc95e12aad503e64d9bbd2e3229a8d73e480d44e7713f958da36f2ac70e4820dd2')
  51. +)
  52.  
  53. _kernelname=${pkgbase#linux}
  54. : ${_kernelname:=-ARCH}
  55.  
  56. -prepare() {
  57. +pkgver() {
  58. + cd upstream
  59. + git fetch --tags &> /dev/null
  60. + _srcver_tag=$(git tag | grep v${_srcver_tag} | grep -v '-' | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -n1)
  61. + echo "${_srcver_tag//-/.}"
  62. +}
  63. +
  64. +actual_prepare() {
  65. +#prepare() {
  66. cd ${_reponame}
  67.  
  68. + msg2 "Latest tag found: ${pkgver}"
  69. msg2 "Setting version..."
  70. scripts/setlocalversion --save-scmversion
  71. echo "-$pkgrel" > localversion.10-pkgrel
  72. @@ -126,19 +136,28 @@ prepare() {
  73. # git pull --no-edit arch_stable "v${_srcver_tag}"
  74.  
  75. # msg2 "Adding patches from Linux upstream kernel repository..."
  76. - git remote add upstream_stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git || true
  77. - git pull --no-edit upstream_stable v"${_srcver_tag//-arch*/}"
  78. + git remote add upstream ../upstream || true
  79. + git fetch --tags upstream
  80. + if ! git merge v${_srcver_tag}
  81. + then if ! git diff --name-only --diff-filter=U | xargs git checkout --theirs
  82. + then git diff --name-only --diff-filter=U |
  83. + while read line
  84. + do sleep 0.1; if ! git checkout --theirs $line
  85. + then sleep 0.1; git rm $line
  86. + fi
  87. + done
  88. + fi
  89. + fi
  90.  
  91. msg2 "Arch patches"
  92. patch -Np1 -i "${srcdir}/001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch"
  93. patch -Np1 -i "${srcdir}/002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch"
  94. - patch -Np1 -i "${srcdir}/003-Bluetooth-Fix-minimum-encryption-key-size-check.patch"
  95. - sed -i -e "s/^EXTRAVERSION =.*/EXTRAVERSION = -arch1/" Makefile
  96. +# sed -i -e "s/^EXTRAVERSION =.*/EXTRAVERSION = -arch1/" Makefile
  97.  
  98. # https://github.com/graysky2/kernel_gcc_patch
  99. msg2 "Patching to enabled additional gcc CPU optimizatons..."
  100. patch -Np1 -i "$srcdir/${_reponame_gcc_patch}/${_gcc_patch_name}"
  101. -
  102. +
  103. msg2 "Setting config..."
  104. cp ../config .config
  105.  
  106. @@ -174,8 +193,8 @@ prepare() {
  107. }
  108.  
  109. build() {
  110. + ( actual_prepare )
  111. cd ${_reponame}
  112. -
  113. make bzImage modules
  114. }
Advertisement
RAW Paste Data Copied
Advertisement