diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-04-27 04:52:00 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-04-27 05:46:22 +0000 |
commit | 8771699b5999395fca175dbf93c0e99679a2509c (patch) | |
tree | 8d0a72eae27da6d0e56d23114e77e2a4f1b195ce /main/devicemaster-linux-hardened | |
parent | d771aa0af875e384568679a993b6e451e764f380 (diff) | |
download | aports-8771699b5999395fca175dbf93c0e99679a2509c.tar.bz2 aports-8771699b5999395fca175dbf93c0e99679a2509c.tar.xz |
main/devicemaster-linux-grsec: rename from devicemaster-linux-hardened, provide devicemaster-linux-grsec
Diffstat (limited to 'main/devicemaster-linux-hardened')
-rw-r--r-- | main/devicemaster-linux-hardened/APKBUILD | 68 | ||||
-rw-r--r-- | main/devicemaster-linux-hardened/nslink.patch | 63 |
2 files changed, 131 insertions, 0 deletions
diff --git a/main/devicemaster-linux-hardened/APKBUILD b/main/devicemaster-linux-hardened/APKBUILD new file mode 100644 index 0000000000..c743a69f43 --- /dev/null +++ b/main/devicemaster-linux-hardened/APKBUILD @@ -0,0 +1,68 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> + +_flavor=hardened +_kpkg=linux-$_flavor +_kver=4.9.24 +_kpkgrel=1 +_mypkgrel=0 + +_kpkgver="$_kver-r$_kpkgrel" +_abi_release=${_kver}-${_kpkgrel}-${_flavor} +_realname=devicemaster-linux + +pkgname=${_realname}-${_flavor} +pkgver=$_kver +# when changing _realver we *must* bump _mypkgrel +_realver=7.15 +pkgrel=$(( $_kpkgrel + $_mypkgrel )) +pkgdesc="NS-Link Device Drivers $_realver for linux-$_flavor" +url="http://www.comtrol.com/resources/product-resources-white-papers/ns-link-device-drivers" +arch="x86 x86_64 armhf" +license="GPL" +depends="linux-${_flavor}=${_kpkgver}" +makedepends="linux-${_flavor}-dev=${_kpkgver} linux-headers" +install= +install_if="$_kpkg=$_kpkgver $_realname" +subpackages="" +provides="${_realname}-grsec=${pkgver}-r${pkgrel}" +source="http://dev.alpinelinux.org/archive/devicemaster-linux/devicemaster-linux-$_realver.tar.gz + nslink.patch + " + +prepare() { + # verify the kernel version + (if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then + _name=$pkgname + . ../../main/linux-${_flavor}/APKBUILD + pkgname=$_name + [ "$_kver" != "$pkgver" ] \ + && die "please update _kver to $pkgver" + [ "$_kpkgrel" != "$pkgrel" ] \ + && die "please update _kpkgrel to $pkgrel" + fi) || return 1 + + cd "$srcdir/$_realname-$_realver" + for i in $source; do + case $i in + *.patch|*.diff) + msg "Applying $i" + patch -p1 -i "$srcdir"/$i || return 1 + ;; + esac + done +} + +build() { + cd "$srcdir/$_realname-$_realver" + make -C /lib/modules/$_abi_release/build SUBDIRS="$PWD" modules \ + V=1 || return 1 +} + +package() { + cd "$srcdir/$_realname-$_realver" + mkdir -p "$pkgdir/lib/modules/${_abi_release}/misc/" + cp *.ko "$pkgdir/lib/modules/${_abi_release}/misc/" || return 1 +} + +sha512sums="794f680613db6462f1452e32f17ab7e30e637d0a77d4c7c5cf43650776f5ec0d3c5144ebdf92fc5bf0f2f0fba456c2710d2cd2280981a208ff936b472388c3ba devicemaster-linux-7.15.tar.gz +1af5aa054c19f25d6090bc00d7df38edfa764e9bb6105ba89c0952740379d2d3af9df53ea4e8a6cc5044835630d53552bdf9c025af602deaf6c241cab1836cc5 nslink.patch" diff --git a/main/devicemaster-linux-hardened/nslink.patch b/main/devicemaster-linux-hardened/nslink.patch new file mode 100644 index 0000000000..98703430f8 --- /dev/null +++ b/main/devicemaster-linux-hardened/nslink.patch @@ -0,0 +1,63 @@ +diff --git a/nslink.c b/nslink.c +index bf4a922..1672325 100755 +--- a/nslink.c ++++ b/nslink.c +@@ -117,6 +117,7 @@ + #include <linux/slab.h> + #include <linux/time.h> + #include <linux/delay.h> ++#include <linux/utsname.h> + #if LINUX_VERSION_CODE >= VERSION_CODE(2,6,36) && LINUX_VERSION_CODE < VERSION_CODE(2,6,39) + #include <linux/smp_lock.h> + #endif +@@ -2874,7 +2875,7 @@ static int nrp_open(struct tty_struct *tty, struct file *filp) + + info = nrp_table[line]; + +- DebugOpen("ttySI%d (count=%d) enter\n", line, info->port.count); ++ DebugOpen("ttySI%d (count=%d) enter\n", line, info->port.count.counter); + + if (!info->si) { + DebugOpenErr("ttySI%d info->si==NULL: return -ENODEV\n", line); +@@ -2890,9 +2891,9 @@ static int nrp_open(struct tty_struct *tty, struct file *filp) + ret = tty_port_open(&info->port, tty, filp); + + if (ret && ret != -ERESTARTSYS) +- DebugOpenErr("ttySI%d (count=%d) return %d\n", line, info->port.count,ret); ++ DebugOpenErr("ttySI%d (count=%d) return %d\n", line, info->port.count.counter,ret); + else +- DebugOpen("ttySI%d (count=%d) return %d\n", line, info->port.count,ret); ++ DebugOpen("ttySI%d (count=%d) return %d\n", line, info->port.count.counter,ret); + return ret; + } + +@@ -2935,9 +2936,9 @@ static void nrp_port_shutdown(struct tty_port *port) + static void nrp_close(struct tty_struct *tty, struct file *filp) + { + struct nr_port *info = (struct nr_port *) tty->driver_data; +- DebugOpen("ttySI%d (count=%d) enter\n", info->line, info->port.count); ++ DebugOpen("ttySI%d (count=%d) enter\n", info->line, info->port.count.counter); + tty_port_close(&info->port, tty, filp); +- DebugOpen("ttySI%d (count=%d) return\n", info->line, info->port.count); ++ DebugOpen("ttySI%d (count=%d) return\n", info->line, info->port.count.counter); + } + + static void nrp_set_termios(struct tty_struct *tty, struct ktermios *old_termios) +@@ -4799,7 +4800,7 @@ static int free_si_box(int boxid) + info = nrp_table[i + si->base_port]; + if (!info) + continue; +- if (info->port.count) { ++ if (info->port.count.counter) { + DebugOpenErr("Attempt to free_si_box() with port open\n"); + return -EBUSY; + } +@@ -5021,7 +5022,7 @@ static int port_proc_show(struct seq_file *m, void *v) + for (i=0; i<NumElements(nrp_table); ++i) { + struct nr_port *info = nrp_table[i]; + if (info) { +- seq_printf(m,"%3d %4d %02x %6d ", i, info->port.count, info->rsmode, info->baud_rate); ++ seq_printf(m,"%3d %4d %02x %6d ", i, info->port.count.counter, info->rsmode, info->baud_rate); + + // Ctrl ... + seq_printf(m, (info->control_settings & SC_DATABITS_7) ? "7" : "8"); |