summaryrefslogtreecommitdiffstats
path: root/main/devicemaster-linux-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-04-10 11:29:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-04-10 11:29:25 +0000
commit609d7acd796c05a8458d898f11f3991d32d099ec (patch)
tree4478f1fde8386d87e442f67c0cfa6d3e2879ff67 /main/devicemaster-linux-grsec
parent6d6d11d6dadd52c8f4337fa3adaefff4f91b7183 (diff)
downloadaports-609d7acd796c05a8458d898f11f3991d32d099ec.tar.bz2
aports-609d7acd796c05a8458d898f11f3991d32d099ec.tar.xz
main/devicemaster-linux*: move from testing
Diffstat (limited to 'main/devicemaster-linux-grsec')
-rw-r--r--main/devicemaster-linux-grsec/APKBUILD71
-rw-r--r--main/devicemaster-linux-grsec/nslink.patch81
2 files changed, 152 insertions, 0 deletions
diff --git a/main/devicemaster-linux-grsec/APKBUILD b/main/devicemaster-linux-grsec/APKBUILD
new file mode 100644
index 000000000..c8aeb43e4
--- /dev/null
+++ b/main/devicemaster-linux-grsec/APKBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+
+_flavor=grsec
+_kpkg=linux-$_flavor
+_kver=3.14.37
+_kpkgrel=3
+_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.06
+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="all"
+license="GPL"
+depends="linux-${_flavor}=${_kpkgver}"
+makedepends="linux-${_flavor}-dev=${_kpkgver} linux-headers"
+install=
+install_if="$_kpkg=$_kpkgver $_realname"
+subpackages=""
+source="ftp://ftp.comtrol.com/dev_mstr/rts/drivers/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
+}
+
+md5sums="deded30023c8135c9beb06696e8c578f devicemaster-linux-7.06.tar.gz
+4a7ab12e64cfb0dc2f5270a95534ca18 nslink.patch"
+sha256sums="6b11295952d1d74a6102a295a6ed5651ec040a0d8c30838cd23a1f3f7c95a4e7 devicemaster-linux-7.06.tar.gz
+6d635a133f795a90ff776b1f5026d4cae734570a46042b3e23c3f6bd07d2c11c nslink.patch"
+sha512sums="496144ee40464c96442ce655424db886cb5b4df1701e30cc8d059fc918e8916cb6c3b0b57cead2d0e9d50e4618ee13efa5f3630765545ea45e29f8080101800b devicemaster-linux-7.06.tar.gz
+acb1e19bb56f47ba95bebf386c66a5639e11ed5c3d7e8591060fcc739d5383cec0cab08a1accaeef930adae495f3a63526ed1491977567caa257e4a9bd219045 nslink.patch"
diff --git a/main/devicemaster-linux-grsec/nslink.patch b/main/devicemaster-linux-grsec/nslink.patch
new file mode 100644
index 000000000..0304bf6c8
--- /dev/null
+++ b/main/devicemaster-linux-grsec/nslink.patch
@@ -0,0 +1,81 @@
+diff --git a/nslink.c b/nslink.c
+index 16a4212..e64907d 100755
+--- a/nslink.c
++++ b/nslink.c
+@@ -113,6 +113,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
+@@ -2864,7 +2865,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);
+@@ -2880,9 +2881,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;
+ }
+
+@@ -2925,9 +2926,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)
+@@ -4786,7 +4787,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;
+ }
+@@ -5008,7 +5009,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");
+@@ -5192,7 +5193,7 @@ static int status_proc_show(struct seq_file *m, void *v)
+ struct si_state *si;
+
+ seq_printf(m, "Comtrol NS-Link -- version %s (%s)\n",SI_VERSION,SI_DATE);
+- seq_printf(m, "Built %s %s\n\n",__DATE__,__TIME__);
++ seq_printf(m, "Build %s\n\n",utsname()->version);
+ seq_printf(m, "Hub State Address Ports\n");
+ seq_printf(m, "--- ------------ ------------------ -----\n");
+
+@@ -5381,7 +5382,7 @@ int nrp_init(void)
+ static struct proc_dir_entry *procdir;
+
+ printk(KERN_INFO "nslink: NS-Link driver, version %s %s\n",SI_VERSION, SI_DATE);
+- printk(KERN_INFO "nslink: Built %s %s\n", __DATE__, __TIME__);
++ printk(KERN_INFO "nslink: Build %s\n", utsname()->version);
+
+ // Initialize the array of pointers to our own internal state structures.
+ memset(nrp_table, 0, sizeof(nrp_table));