summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2015-10-11 11:26:48 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 11:32:18 +0200
commit109d6b4f673a249aea4deeb0cdb5b54a21592410 (patch)
treeec3589a50dac5be54ef6248d1e0ff3a9fd3b41b4 /net-dialup/martian-modem/files
downloadmv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.gz
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.bz2
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.zip
Clear history for egencache --repo=mv --update-changelogs
Diffstat (limited to 'net-dialup/martian-modem/files')
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch15
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch34
-rw-r--r--net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch22
-rw-r--r--net-dialup/martian-modem/files/martian-modem.conf.d45
-rw-r--r--net-dialup/martian-modem/files/martian-modem.init.d47
5 files changed, 163 insertions, 0 deletions
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch b/net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch
new file mode 100644
index 00000000..332680d9
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch
@@ -0,0 +1,15 @@
+--- kmodule/mfifo.h
++++ kmodule/mfifo.h
+@@ -20,7 +20,11 @@
+
+ void (*wrap) (mfifo_t *fifo, int *ending);
+ int (*space) (mfifo_t *fifo);
+-};
++}
++#ifdef __no_const
++__no_const
++#endif
++;
+
+ struct _mfifo {
+ /* struct circ_buf header; */
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
new file mode 100644
index 00000000..e6ce7ca7
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
@@ -0,0 +1,34 @@
+--- martian-full-20100123/Makefile 2008-07-02 15:42:48.000000000 -0800
++++ martian-full-20100123.new/Makefile 2012-10-08 12:14:33.284275312 -0800
+@@ -1,10 +1,10 @@
+
+-KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
+-SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
+-# support begins at SUBLEVEL 20
+-after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
++#KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
++#SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
++## support begins at SUBLEVEL 20
++#after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
+
+-ifdef after20
++#ifdef after20
+ all:
+ $(MAKE) -C kmodule/ modules
+ $(MAKE) -C modem/ all
+@@ -14,11 +14,11 @@
+ $(MAKE) -C kmodule/ install
+ $(MAKE) -C modem/ install
+
+-else
+-20less:
+- @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
++#else
++#20less:
++# @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
+
+-endif
++#endif
+
+ clean:
+ $(MAKE) -C kmodule/ clean
diff --git a/net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch b/net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch
new file mode 100644
index 00000000..eb138df8
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-kernel-3.8.patch
@@ -0,0 +1,22 @@
+--- kmodule/martian.c
++++ kmodule/martian.c
+@@ -46,6 +46,19 @@
+ #include "../martian.h"
+ #include "marsio.h"
+
++#ifndef __devinit
++#define __devinit
++#endif
++#ifndef __devexit
++#define __devexit
++#endif
++#ifndef __devexit_p
++#define __devexit_p
++#endif
++#ifndef __devinitdata
++#define __devinitdata
++#endif
++
+ /***** Driver globals *****/
+
+ struct proc_dir_entry *martians_proc_dir = NULL;
diff --git a/net-dialup/martian-modem/files/martian-modem.conf.d b/net-dialup/martian-modem/files/martian-modem.conf.d
new file mode 100644
index 00000000..47e2f62b
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.conf.d
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/martian-modem/files/martian-modem.conf.d,v 1.1 2012/12/15 16:41:36 pacho Exp $
+#
+### Configuration for martian-modem initscript
+#
+### DEVICE
+# Device that will martian-modem daemon create to act as modem device.
+# Default is /dev/ttySM0.
+#DEVICE="/dev/ttySM0"
+#
+#
+### USER/GROUP
+# User and group that will have access to the modem device.
+# Default values are nobody/dialout.
+# Note: the daemon itself needs to be run as root!
+#USER="nobody"
+#GROUP="dialout"
+#
+#
+### MARTIAN_OPTS
+# Other options to be passed to the daemon, see description below.
+# Defaults to empty.
+# --realtime - raise priority of threads to realtime.
+# --smp - true smp (symmetric multiprocessing) mode.
+# --country=<country> - two-letter code for the country.
+# Run `/usr/sbin/martian_modem --info countries` for list.
+# --no-cdclose - keep working with client when carrier lost.
+# --hide-pty - save pty from others as soon its open. Client
+# should notify it's here writing to device. For callback feature.
+#MARTIAN_OPTS=""
+#
+#
+### LOGGING
+# Should we log to syslog [YES/NO]
+# Default to YES. If you do not want this, say NO here to use LOGFILE instead.
+#USE_SYSLOG="YES"
+# Alternatively, you can log to a separate file. The default location is below.
+#LOGFILE="/var/log/martian-modem.log"
+#
+#
+### DEBUG
+# How verbose should the log be [1-5]
+# Default debug_level=1; debug_level=3 is suitable for normal debugging.
+#DEBUG_LEVEL=1
diff --git a/net-dialup/martian-modem/files/martian-modem.init.d b/net-dialup/martian-modem/files/martian-modem.init.d
new file mode 100644
index 00000000..540d14c5
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.init.d
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+
+daemon=/usr/sbin/martian_modem
+description="Initscript to run the userspace daemon for winmodems supported by martian-modem driver"
+
+: ${device:=${DEVICE:-/dev/ttySM0}}
+: ${logfile:=${LOGFILE:-/var/log/martian-modem.log}}
+: ${user:=${USER:-nobody}}
+: ${group:=${GROUP:-dialout}}
+: ${debug_level:=${DEBUG_LEVEL:-1}}
+: ${use_syslog:=${USE_SYSLOG:-YES}}
+pidfile=/var/run/${SVCNAME}.pid
+
+depend() {
+ need localmount
+ [ "${use_syslog}" = "YES" ] && use syslog
+}
+
+start() {
+ if [ -e /proc/modules ] ; then
+ local modem=
+ for modem in /dev/modem /dev/ttySM[0-9]* ; do
+ [ -e "${modem}" ] && break
+ done
+ fi
+ if [ ! -e "${modem}" ] ; then
+ modprobe martian-dev || eerror $? "Error loading martian-dev module"
+ fi
+
+ if ! yesno "${use_syslog}" ; then
+ martian_opts="${MARTIAN_OPTS} --log=${logfile}"
+ else
+ martian_opts="${MARTIAN_OPTS} --syslog"
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${daemon} --user ${user}:${group} \
+ --pidfile ${pidfile} --make-pidfile --background \
+ -- ${martian_opts} --debug=${debug_level} ${device}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${pidfile}
+ eend $?
+}