aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sch-cake-hardened
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2017-04-27 05:28:40 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-04-27 05:46:22 +0000
commitc08c8abc49153a6f4282230fb8ed4aed9f3e6bbe (patch)
treeef67e3e10e30218c9b0dcc791eb5d70f1d65b633 /testing/sch-cake-hardened
parent7916354f8c744e5bfdfefba74da6c8f8981cfd1f (diff)
downloadaports-c08c8abc49153a6f4282230fb8ed4aed9f3e6bbe.tar.bz2
aports-c08c8abc49153a6f4282230fb8ed4aed9f3e6bbe.tar.xz
testing/sch-cake-hardened: rename from sch-cake-grsec, provide sch-cake-grsec
Diffstat (limited to 'testing/sch-cake-hardened')
-rw-r--r--testing/sch-cake-hardened/10-Makefile.patch11
-rw-r--r--testing/sch-cake-hardened/APKBUILD64
2 files changed, 75 insertions, 0 deletions
diff --git a/testing/sch-cake-hardened/10-Makefile.patch b/testing/sch-cake-hardened/10-Makefile.patch
new file mode 100644
index 0000000000..5229a1e0e4
--- /dev/null
+++ b/testing/sch-cake-hardened/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-hardened/APKBUILD b/testing/sch-cake-hardened/APKBUILD
new file mode 100644
index 0000000000..3070c8310d
--- /dev/null
+++ b/testing/sch-cake-hardened/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Ben Allen <bensallen@me.com>
+# Maintainer: Ben Allen <bensallen@me.com>
+_flavor=${FLAVOR:-hardened}
+_kpkg=linux-$_flavor
+_realname=sch-cake
+_name=$_realname-$_flavor
+
+_kver=4.9.24
+_kpkgrel=1
+
+_gitver=9789742cfc596d48583ba4cdbc8f38d026121fa6
+_mypkgrel=0
+
+# source the kernel version
+if [ -f ../linux-$_flavor/APKBUILD ]; then
+ . ../linux-$_flavor/APKBUILD
+ [ "$_kver" != "$pkgver" ] && die "$_name: Please update _kver to $pkgver"
+ [ "$_kpkgrel" != "$pkgrel" ] && die "$_name: Please update _kpkgrel to $pkgrel"
+fi
+
+_kernelver=$_kver-r$_kpkgrel
+_abi_release=${_kver}-${_kpkgrel}-${_flavor}
+
+pkgname=$_name
+pkgver=$_kver
+pkgrel=$(($_kpkgrel + $_mypkgrel))
+
+pkgrel=0
+pkgdesc="Out of tree build for the new cake qdisc"
+url="https://github.com/dtaht/sch_cake"
+arch="x86 x86_64 armhf"
+license="Dual BSD/GPL"
+depends="linux-${_flavor}=${_kernelver}"
+makedepends="linux-${_flavor}-dev=${_kernelver} linux-headers"
+install=
+install_if="linux-$_flavor=$_kernelver $_realname"
+subpackages=
+provides="${_realname}-grsec=${_kernelver}"
+source="$_realname-$_gitver.tar.gz::https://github.com/dtaht/sch_cake/archive/$_gitver.tar.gz 10-Makefile.patch"
+_builddir="$srcdir"/sch_cake-$_gitver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make KERNEL_VERSION=$_abi_release CFLAGS_MODULE="$CFLAGS_MODULE" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -v -m 0755 -d $pkgdir/lib/modules/$_abi_release/kernel/net/sched
+ install -v -m 0644 $_builddir/sch_cake.ko $pkgdir/lib/modules/$_abi_release/kernel/net/sched/
+}
+
+sha512sums="1a4ae8632a3aa7349290434edfc2ca75315ea3b1698e97fbee7c102bf4e4897a09582de295c9d6cc3ec7fe6a8681df24e831c88a78df9ce766a5eec6b909cfca sch-cake-9789742cfc596d48583ba4cdbc8f38d026121fa6.tar.gz
+9555709d6db1cb6a2599fe059a33962fa74826b6717f0dbb27217b3f678e22498156be548f6883abb6c493aa345de15fe2ceaa76a52bb4eed60ef6ee64c50bd8 10-Makefile.patch"