daily pastebin goal
33%
SHARE
TWEET

Compatibility patch for "backports-patched" with linux-grsec

a guest Nov 15th, 2015 155 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- PKGBUILD    2015-08-31 22:18:47.000000000 +0200
  2. +++ PKGBUILD.patched    2015-11-16 01:24:01.540558846 +0100
  3. @@ -5,6 +5,7 @@
  4.  # Contributor: Mathias Buren <mathias.buren at gmail dot com>
  5.  # Contributor: Benjamin Mtz (Cruznick) <cruznick at archlinux dot us>
  6.  # Contributor: t3kk3n <corp at hush dot ai>
  7. +# Contributor: Marc Straube <email@marcstraube.de>
  8.  
  9.  #TODO: Investigate empty dir - /usr/lib/modules/3.12.9-2-ARCH/
  10.  #TODO: Document and finish automation for patching and config
  11. @@ -12,6 +13,7 @@
  12.  
  13.  _runkernver=$(uname -r)
  14.  _shortkernver=${_runkernver%.*}
  15. +_kernelname=$(uname -r | cut -d'-' -f3)
  16.  
  17.  pkgname=backports-patched
  18.  pkgver=4.2_rc1_1
  19. @@ -22,7 +24,7 @@
  20.  arch=('i686' 'x86_64')
  21.  license=('GPL')
  22.  depends=('linux')
  23. -makedepends=('linux-api-headers' "linux-headers>=$_shortkernver")
  24. +makedepends=('linux-api-headers' "linux-${_kernelname}-headers>=$_shortkernver")
  25.  optdepends=('backports-frag+ack: wl-frag+ack patch')
  26.  install=backports.install
  27.  # Stable and rc? TODO: Check with rc :D | Double %% cuts to the first, single % cuts to the last
  28. @@ -39,7 +41,7 @@
  29.    warning "Skipping checksum check for snapshots"
  30.  fi
  31.  
  32. -_extramodules=extramodules-${_shortkernver}-ARCH
  33. +_extramodules=extramodules-${_shortkernver}-${_kernelname}
  34.  _kernver=$(cat /usr/lib/modules/${_extramodules}/version) # TODO make this a lower boundary and utilize in reality pacman to get freshest paths. Or make it for specific kernels. Or multiply it over specific kernels ? :3
  35.  
  36.  _cfgdir="/etc/makepkg.d/${pkgname}/"
  37. @@ -101,6 +103,28 @@
  38.   .PHONY: modules_install
  39.  EOF
  40.  
  41. +# https://dev.openwrt.org/browser/trunk/package/kernel/mac80211/patches/020-backports-do-not-add-debugfs_create_devm_seqfile-on-.patch?rev=46492
  42. +echo "Patching debugfs.h"
  43. +patch -p0 <<'EOF'
  44. +--- backport-include/linux/debugfs.h   2015-07-12 01:29:39.000000000 +0200
  45. ++++ debugfs.h  2015-11-16 00:45:43.997159897 +0100
  46. +@@ -5,6 +5,8 @@
  47. + #include <linux/device.h>
  48. + #include <generated/utsrelease.h>
  49. +
  50. ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
  51. ++#define debugfs_create_devm_seqfile LINUX_BACKPORT(debugfs_create_devm_seqfile)
  52. + #if defined(CONFIG_DEBUG_FS)
  53. + struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name,
  54. +                                          struct dentry *parent,
  55. +@@ -20,5 +22,6 @@
  56. +       return ERR_PTR(-ENODEV);
  57. + }
  58. + #endif /* CONFIG_DEBUG_FS */
  59. ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) */
  60. +
  61. + #endif /* __BACKPORT_DEBUGFS_H_ */
  62. +EOF
  63.  }
  64.  
  65.  build() {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top