Subject: [alpine-aports] [PATCH] testing/sch-cake-grsec: Upgrade to 747954d

From: Ben Allen <[email-masked]>
Date: Sun, 10 Jul 2016 17:23:44 +0000

- Patch Makefile to accept CFLAGS and LDFLAGS from the APKBUILD
- Evidently kernel modules need -fno-pie now?
---
 testing/sch-cake-grsec/10-Makefile.patch | 11 +++++++++++
 testing/sch-cake-grsec/APKBUILD          | 15 +++++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)
 create mode 100644 testing/sch-cake-grsec/10-Makefile.patch

diff --git a/testing/sch-cake-grsec/10-Makefile.patch b/testing/sch-cake-grsec/10-Makefile.patch
new file mode 100644
index 0000000..5229a1e
--- /dev/null
+++ b/testing/sch-cake-grsec/10-Makefile.patch
@@ -0,0 +1,11 @@
+--- sch_cake-747954dd0bde66bb28d2b6c2c109597c9abbe5c5/Makefile.orig
++++ sch_cake-747954dd0bde66bb28d2b6c2c109597c9abbe5c5/Makefile
+@@ -5,7 +5,7 @@
+ PWD := $(shell pwd)
+ VERSION := $(shell git rev-parse HEAD 2>/dev/null)
+ default:
+-	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules $(if $(VERSION),LDFLAGS_MODULE="--build-id=0x$(VERSION)" CFLAGS_MODULE="-DCAKE_VERSION=\\\"$(VERSION)\\\"")
++	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules $(if $(VERSION),LDFLAGS_MODULE="$(LDFLAGS_MODULE) --build-id=0x$(VERSION)" CFLAGS_MODULE="$(CFLAGS_MODULE) -DCAKE_VERSION=\\\"$(VERSION)\\\"")
+ 
+ install:
+ 	install -v -m 644 sch_cake.ko $(IDIR)
diff --git a/testing/sch-cake-grsec/APKBUILD b/testing/sch-cake-grsec/APKBUILD
index 7dfa20b..9d2e1b1 100644
--- a/testing/sch-cake-grsec/APKBUILD
+++ b/testing/sch-cake-grsec/APKBUILD
@@ -8,7 +8,7 @@ _name=$_realname-$_flavor
 _kver=4.4.14
 _kpkgrel=0
 
-_gitver=df40fa23fbbed9f652e201058fc730f37ae7513c
+_gitver=747954dd0bde66bb28d2b6c2c109597c9abbe5c5
 _mypkgrel=0
 
 # source the kernel version
@@ -35,7 +35,7 @@ makedepends="linux-${_flavor}-dev=${_kernelver} linux-headers"
 install=
 install_if="linux-$_flavor=$_kernelver $_realname"
 subpackages=
-source="$_realname-$_gitver.tar.gz::https://github.com/dtaht/sch_cake/archive/$_gitver.tar.gz"
+source="$_realname-$_gitver.tar.gz::https://github.com/dtaht/sch_cake/archive/$_gitver.tar.gz 10-Makefile.patch"
 _builddir="$srcdir"/sch_cake-$_gitver
 
 prepare() {
@@ -50,7 +50,7 @@ prepare() {
 
 build() {
 	cd "$_builddir"
-	make KERNEL_VERSION=$_abi_release || return 1
+	make KERNEL_VERSION=$_abi_release CFLAGS_MODULE="$CFLAGS_MODULE -fno-pie" || return 1
 }
 
 package() {
@@ -59,6 +59,9 @@ package() {
         install -v -m 0644 $_builddir/sch_cake.ko $pkgdir/lib/modules/$_abi_release/kernel/net/sched/
 }
 
-md5sums="1007bc57f2327a2db7fccb7c82e4254c  sch-cake-df40fa23fbbed9f652e201058fc730f37ae7513c.tar.gz"
-sha256sums="a2ed94772531263cc8faf24d55be8fd9d3981d93f60580dc5bd4f3537a64a771  sch-cake-df40fa23fbbed9f652e201058fc730f37ae7513c.tar.gz"
-sha512sums="e7a3cbc7c2b618f28b7ac4c55987eeb5c7820a0141ada718253607bcdf0814b865d9120ef95215706a5e46dababbcbffafcd33b29501b753ad0916c3e2efa0eb  sch-cake-df40fa23fbbed9f652e201058fc730f37ae7513c.tar.gz"
+md5sums="eede7fbd176f1dafeb4b13cefde2fb79  sch-cake-747954dd0bde66bb28d2b6c2c109597c9abbe5c5.tar.gz
+b4b30182fd86d0fdb971732f33fc2c8d  10-Makefile.patch"
+sha256sums="691ac473c16f117a5de7c9091937588c24a625bdf21c98a9a9214bb874630bce  sch-cake-747954dd0bde66bb28d2b6c2c109597c9abbe5c5.tar.gz
+dadb9615c10a20384ebed9ccaaedc2e0964f04f7d6adaab1dd8211592b6c794e  10-Makefile.patch"
+sha512sums="0dc844d555ff03ad7cea7a7359a3af3154fdbb67ab5a7fa63ea2bcb1d20109aa9090ebebf294e8d073cb7e46786a050a1ecde27c1da28b696b0cadb8408f13c9  sch-cake-747954dd0bde66bb28d2b6c2c109597c9abbe5c5.tar.gz
+9555709d6db1cb6a2599fe059a33962fa74826b6717f0dbb27217b3f678e22498156be548f6883abb6c493aa345de15fe2ceaa76a52bb4eed60ef6ee64c50bd8  10-Makefile.patch"
-- 
2.9.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---