From 7f81c26aea1613d3a0eeb58b9eaa8cb6c5ff0b44 Mon Sep 17 00:00:00 2001 From: Martin Väth Date: Sun, 16 Dec 2012 14:43:05 +0100 Subject: Rename martian->martian-modem and update from tree. Bump squash_dir, duckduckgo --- .../files/martian-modem-20100123-grsecurity.patch | 15 +++++++ .../files/martian-modem-20100123-makefile.patch | 34 +++++++++++++++ .../martian-modem/files/martian-modem.conf.d | 45 +++++++++++++++++++ .../martian-modem/files/martian-modem.init.d | 50 ++++++++++++++++++++++ 4 files changed, 144 insertions(+) create mode 100644 net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch create mode 100644 net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch create mode 100644 net-dialup/martian-modem/files/martian-modem.conf.d create mode 100644 net-dialup/martian-modem/files/martian-modem.init.d (limited to 'net-dialup/martian-modem/files') 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.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= - 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..3c5b8561 --- /dev/null +++ b/net-dialup/martian-modem/files/martian-modem.init.d @@ -0,0 +1,50 @@ +#!/sbin/runscript +# 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.init.d,v 1.1 2012/12/15 16:41:36 pacho Exp $ + +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 $? +} -- cgit v1.2.3-65-gdbad