summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-dialup/diald
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-dialup/diald')
-rw-r--r--net-dialup/diald/Manifest1
-rw-r--r--net-dialup/diald/diald-1.0-r2.ebuild59
-rw-r--r--net-dialup/diald/files/diald-1.0-gentoo.patch50
-rw-r--r--net-dialup/diald/files/diald-1.0-nopam.patch40
-rw-r--r--net-dialup/diald/files/diald-1.0-posix.patch42
-rw-r--r--net-dialup/diald/files/diald-init30
-rw-r--r--net-dialup/diald/files/diald.conf39
-rw-r--r--net-dialup/diald/files/diald.filter139
-rw-r--r--net-dialup/diald/metadata.xml10
9 files changed, 410 insertions, 0 deletions
diff --git a/net-dialup/diald/Manifest b/net-dialup/diald/Manifest
new file mode 100644
index 000000000000..8b95dd67c272
--- /dev/null
+++ b/net-dialup/diald/Manifest
@@ -0,0 +1 @@
+DIST diald-1.0.tar.gz 199698 SHA256 dd7630811006ad0f49512de9f2fa6705e50fb475c5bb12e2dde77e198a863bd0
diff --git a/net-dialup/diald/diald-1.0-r2.ebuild b/net-dialup/diald/diald-1.0-r2.ebuild
new file mode 100644
index 000000000000..e7f4a423149c
--- /dev/null
+++ b/net-dialup/diald/diald-1.0-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools pam
+
+DESCRIPTION="Daemon that provides on demand IP links via SLIP or PPP"
+HOMEPAGE="http://diald.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="Old-MIT GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="pam"
+
+DEPEND="pam? ( virtual/pam )
+ sys-apps/tcp-wrappers"
+RDEPEND="${DEPEND}
+ net-dialup/ppp"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}/${P}-posix.patch"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ if ! use pam; then
+ epatch "${FILESDIR}/${P}-nopam.patch"
+ rm "${S}"/README.pam
+ cd "${S}"
+ eautoconf
+ fi
+}
+
+src_install() {
+ make \
+ DESTDIR="${D}" \
+ sysconfdir=/etc \
+ bindir=/usr/bin \
+ sbindir=/usr/sbin \
+ mandir=/usr/share/man \
+ libdir=/usr/lib/diald \
+ BINGRP=root \
+ ROOTUID=root \
+ ROOTGRP=root \
+ install || die "make failed"
+ use pam && pamd_mimic_system diald auth account
+
+ dodir /var/cache/diald
+ mknod -m 0660 "${D}/var/cache/diald/diald.ctl" p
+
+ dodoc BUGS CHANGES NOTES README* \
+ THANKS TODO TODO.budget doc/diald-faq.txt
+ docinto setup ; cp -pPR setup/* "${D}/usr/share/doc/${PF}/setup"
+ docinto contrib ; cp -pPR contrib/* "${D}/usr/share/doc/${PF}/contrib"
+ prepalldocs
+
+ insinto /etc/diald ; doins "${FILESDIR}"/{diald.conf,diald.filter}
+ newinitd "${FILESDIR}/diald-init" diald
+}
diff --git a/net-dialup/diald/files/diald-1.0-gentoo.patch b/net-dialup/diald/files/diald-1.0-gentoo.patch
new file mode 100644
index 000000000000..0e6f538ef76c
--- /dev/null
+++ b/net-dialup/diald/files/diald-1.0-gentoo.patch
@@ -0,0 +1,50 @@
+diff -Nru diald-1.0.orig/Makefile.in diald-1.0/Makefile.in
+--- diald-1.0.orig/Makefile.in 2008-04-13 21:09:37.000000000 +0300
++++ diald-1.0/Makefile.in 2008-04-13 21:11:17.000000000 +0300
+@@ -21,9 +21,13 @@
+ mandir = @mandir@
+
+
++ROOTUID = root
++ROOTGRP = root
++BINGRP = bin
++
+ CC = @CC@
+ CFLAGS = @CFLAGS@ @DEFS@ -I$(srcdir) \
+- -DDIALD_CONFIG_FILE=\"@sysconfdir@/diald.conf\" \
++ -DDIALD_CONFIG_FILE=\"@sysconfdir@/diald/diald.conf\" \
+ -DDIALD_DEFS_FILE=\"@libdir@/diald/diald.defs\" \
+ -DRUN_PREFIX=\"@localstatedir@/run\"
+ INSTALL = @INSTALL@
+@@ -51,21 +55,19 @@
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 0755 bin/dctrl $(DESTDIR)$(bindir)/dctrl
+ $(INSTALL) -d $(DESTDIR)$(sbindir)
+- $(INSTALL) -s -o root -g bin diald $(DESTDIR)$(sbindir)/diald
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) diald $(DESTDIR)$(sbindir)/diald
+ $(INSTALL) -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 \
+ $(DESTDIR)$(mandir)/man8
+- $(INSTALL) -o root -g bin -m 0644 doc/diald.man $(DESTDIR)$(mandir)/man8/diald.8
+- $(INSTALL) -o root -g bin -m 0644 doc/dctrl.man $(DESTDIR)$(mandir)/man1/dctrl.1
+- $(INSTALL) -o root -g bin -m 0644 doc/diald-examples.man $(DESTDIR)$(mandir)/man5/diald-examples.5
+- $(INSTALL) -o root -g bin -m 0644 doc/diald-control.man $(DESTDIR)$(mandir)/man5/diald-control.5
+- $(INSTALL) -o root -g bin -m 0644 doc/diald-monitor.man $(DESTDIR)$(mandir)/man5/diald-monitor.5
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald.man $(DESTDIR)$(mandir)/man8/diald.8
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/dctrl.man $(DESTDIR)$(mandir)/man1/dctrl.1
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald-examples.man $(DESTDIR)$(mandir)/man5/diald-examples.5
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald-control.man $(DESTDIR)$(mandir)/man5/diald-control.5
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald-monitor.man $(DESTDIR)$(mandir)/man5/diald-monitor.5
+ -mkdir -p $(DESTDIR)$(libdir)
+- $(INSTALL) -o root -g bin lib/*.gif $(DESTDIR)$(libdir)
+- $(INSTALL) -o root -g bin -m 0644 config/diald.defs $(DESTDIR)$(libdir)/diald.defs
+- $(INSTALL) -o root -g bin -m 0644 config/standard.filter $(DESTDIR)$(libdir)/standard.filter
+- $(INSTALL) -d -m 0755 $(DESTDIR)/etc/pam.d
+- $(INSTALL) -o root -g root -m 0644 config/diald.pam $(DESTDIR)/$(sysconfdir)/pam.d/diald
+- $(INSTALL) -o root -g bin bin/connect $(DESTDIR)$(libdir)/connect
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) lib/*.gif $(DESTDIR)$(libdir)
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 config/diald.defs $(DESTDIR)$(libdir)/diald.defs
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 config/standard.filter $(DESTDIR)$(libdir)/standard.filter
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) bin/connect $(DESTDIR)$(libdir)/connect
+
+ clean:
+ rm -f *.o diald
diff --git a/net-dialup/diald/files/diald-1.0-nopam.patch b/net-dialup/diald/files/diald-1.0-nopam.patch
new file mode 100644
index 000000000000..7fb78b5631a2
--- /dev/null
+++ b/net-dialup/diald/files/diald-1.0-nopam.patch
@@ -0,0 +1,40 @@
+diff -Nru diald-1.0.orig/configure.in diald-1.0/configure.in
+--- diald-1.0.orig/configure.in 2001-06-16 19:01:25.000000000 +0300
++++ diald-1.0/configure.in 2007-07-12 09:56:35.000000000 +0300
+@@ -10,7 +10,6 @@
+ dnl Checks for libraries.
+ AC_CHECK_LIB(dl, dlsym)
+ AC_CHECK_LIB(nsl, nis_add)
+-AC_CHECK_LIB(pam, pam_start)
+ AC_CHECK_LIB(wrap, request_init)
+ AC_CHECK_LIB(util, openpty)
+
+diff -Nru diald-1.0.orig/doc/diald-control.man diald-1.0/doc/diald-control.man
+--- diald-1.0.orig/doc/diald-control.man 2001-06-15 18:38:20.000000000 +0300
++++ diald-1.0/doc/diald-control.man 2007-07-12 09:55:59.000000000 +0300
+@@ -65,10 +65,6 @@
+ TCP connections.
+ If \fI<method>\fR is "simple" then a single following
+ string specifies the name of the privileges to request.
+-If \fI<method>\fR is "pam" then the two following strings specify
+-the UNIX username and password to be authenticated using PAM
+-(Pluggable Authentication Modules). Privileges are then given
+-according to group membership.
+ .TP
+ .B block
+ Block diald from making outgoing calls until a unblock command is issued.
+diff -Nru diald-1.0.orig/doc/diald.man diald-1.0/doc/diald.man
+--- diald-1.0.orig/doc/diald.man 2001-06-15 18:38:20.000000000 +0300
++++ diald-1.0/doc/diald.man 2007-07-12 09:54:37.000000000 +0300
+@@ -184,11 +184,6 @@
+ (very simple...) for TCP monitor connections.
+
+ .TP
+-.B authpam \fI<file>\fR
+-Specifies the name of a file to be used for PAM authentication
+-(not so simple...) for TCP monitor connections.
+-
+-.TP
+ .B scheduler \fI<class>\fR
+ Set diald's scheduling class. Valid choices for systems that
+ support POSIX scheduling classes are:
diff --git a/net-dialup/diald/files/diald-1.0-posix.patch b/net-dialup/diald/files/diald-1.0-posix.patch
new file mode 100644
index 000000000000..3ff13ab9bdbc
--- /dev/null
+++ b/net-dialup/diald/files/diald-1.0-posix.patch
@@ -0,0 +1,42 @@
+diff -Nru diald-1.0.orig/diald.h diald-1.0/diald.h
+--- diald-1.0.orig/diald.h 2001-06-16 19:01:25.000000000 +0300
++++ diald-1.0/diald.h 2006-09-21 15:58:57.000000000 +0300
+@@ -31,6 +31,10 @@
+ #if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
++#include <time.h>
++#ifndef CLK_TCK
++# define CLK_TCK (CLOCKS_PER_SEC)
++#endif
+ #ifdef _POSIX_PRIORITY_SCHEDULING
+ # include <sched.h>
+ #endif
+diff -Nru diald-1.0.orig/firewall.c diald-1.0/firewall.c
+--- diald-1.0.orig/firewall.c 2006-09-21 16:08:18.000000000 +0300
++++ diald-1.0/firewall.c 2006-09-21 15:49:12.000000000 +0300
+@@ -69,7 +69,7 @@
+ #if 0
+ mon_syslog(LOG_DEBUG,"slot def: %d %d %x %x %x",
+ slot->start, slot->end, slot->wday, slot->mday, slot->month);
+-#endif 0
++#endif
+ if ((slot->start <= ctime)
+ && (ctime <= slot->end)
+ && (slot->wday & (1<<ltime->tm_wday))
+diff -Nru diald-1.0.orig/log.c diald-1.0/log.c
+--- diald-1.0.orig/log.c 2001-06-16 22:51:39.000000000 +0300
++++ diald-1.0/log.c 2006-09-21 16:05:11.000000000 +0300
+@@ -19,10 +19,8 @@
+ xstrerror(int n)
+ {
+ static char buf[30];
+-
+- if (n >= 0 && n < sys_nerr)
+- return (char *)sys_errlist[n];
+- sprintf(buf, "Error code %d\n", n);
++ if (strerror_r(n, buf, 30) != 0)
++ sprintf(buf, "Error code %d\n", n);
+ return buf;
+ }
+
diff --git a/net-dialup/diald/files/diald-init b/net-dialup/diald/files/diald-init
new file mode 100644
index 000000000000..6eefde3d5797
--- /dev/null
+++ b/net-dialup/diald/files/diald-init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/diald/diald.conf ] ; then
+ eerror "You need an /etc/diald/diald.conf file first"
+ eerror "There is a sample in /usr/share/doc/diald"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting diald"
+ start-stop-daemon --start --quiet --exec /usr/sbin/diald \
+ -- -f /etc/diald/diald.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping diald"
+ start-stop-daemon --stop --quiet --pidfile /var/run/diald.pid
+ eend $?
+}
diff --git a/net-dialup/diald/files/diald.conf b/net-dialup/diald/files/diald.conf
new file mode 100644
index 000000000000..51b882d570e4
--- /dev/null
+++ b/net-dialup/diald/files/diald.conf
@@ -0,0 +1,39 @@
+# sample diald.conf
+# $Id$
+
+# if Internet Access Type is modem
+# ---------begin-section----------
+mode ppp
+connect "/usr/sbin/chat -v -f /etc/network-scripts/chat-ppp0"
+device /dev/modem
+speed 115200
+modem
+lock
+crtscts
+# ---------end-section------------
+#
+
+# if Internet Access Type is ISDN
+# ---------begin-section----------
+# mode dev
+# connect "/bin/sh /etc/network-scripts/net_cnx_up"
+# disconnect "/bin/sh /etc/network-scripts/net_cnx_down"
+# device ippp0
+# ---------end-section------------
+
+local 10.0.0.2
+remote 10.0.0.3
+dynamic
+defaultroute
+connect-timeout 90
+redial-timeout 10
+retry-count 3
+include /etc/diald/diald.filter
+fifo /var/cache/diald/diald.ctl
+#
+# you can start any script when interface up or down
+# sample with bastille
+# ---------begin-section----------
+#ip-up /sbin/bastille-firewall-reset
+#ip-down /sbin/bastille-firewall-reset
+# ---------end-section------------
diff --git a/net-dialup/diald/files/diald.filter b/net-dialup/diald/files/diald.filter
new file mode 100644
index 000000000000..7d494956f803
--- /dev/null
+++ b/net-dialup/diald/files/diald.filter
@@ -0,0 +1,139 @@
+# sample diald.filter
+# $Id$
+#
+# connect policy during office hours on weekdays
+restrict 8:00:00 17:59:59 1-5 * *
+
+# connect policy outside office hours on weekdays
+#restrict * 7:59:59 1-5 * *
+#or-restrict 18:00:00 * 1-5 * *
+
+# connect policy during the weekend
+#restrict * * 0,6 * *
+
+# always connected
+up
+
+# always down
+# down
+
+
+#------------------------------------------------------------------------------
+# Rules for TCP packets.
+#------------------------------------------------------------------------------
+
+# If we force the line up (for example to trigger fetchmail)
+# but no packets are sent, specify how long to hold the line
+# up:
+# here :everything else gets 30 minutes.
+
+first-packet-timeout 30
+
+# The first rule is designed to give the link 30 seconds up time
+# when we are initiating a TCP connection. The idea here is to deal
+# with possibility that the network on the opposite end of the
+# connection is unreachable. In this case you don't really want to
+# give the link 10 minutes up time. With the rule below we only give
+# the link 30 seconds initially. If the network is reachable then
+# we will normally get a response that actually contains some data
+# within 30 seconds. If this causes problems because you have a
+# slow response time at some site you want to regularly access, you
+# can either increase the timeout or remove this rule.
+
+accept tcp 30 tcp.syn
+
+# If you are running named, then it will send data across the link
+# periodically to synchronize against other domain name servers.
+# Since this can happen at any time, it is undesirable to keep the
+# link up for it. Therefore, we ignore any tcp traffic from or to a
+# domain name server.
+
+ignore tcp tcp.dest=tcp.domain
+ignore tcp tcp.source=tcp.domain
+
+# Normally the packet that starts a connection is longer that 40
+# bytes, since it normally contains TCP options to specify the MSS.
+# However, some TCP implementations don't include these options.
+# Therefore, we must be careful not to ignore SYN packets that are
+# only 40 bytes long.
+
+accept tcp 30 ip.tot_len=40,tcp.syn
+
+# Otherwise, we want to ignore any TCP packet that is only 40 bytes
+# long, since it is not carrying any data. However, we don't want to
+# ignore 40 byte packets that mark the closing of a connection,
+# since we use those to cut short the timeout on connections that
+# have died. Therefore we must test the tcp.live flag here. If it
+# is not set we might want to see this packet later on in the rules.
+
+ignore tcp ip.tot_len=40,tcp.live
+
+# Make sure http transfers hold the link up, even after they end.
+# This prevents web browsers from bouncing the connection too much.
+#
+# HTTP transfers get 3 minutes
+accept tcp 180 tcp.dest=tcp.www
+accept tcp 180 tcp.source=tcp.www
+
+
+# Once the link is no longer live, we try to shut down the
+# connection quickly. Note that if the link is already down, the
+# closing of the a connection (which will generate traffic) will not
+# bring it back up.
+
+# here :everything else gets 30 minutes.
+keepup tcp 30 !tcp.live
+ignore tcp !tcp.live
+
+# Finally, if we don't match the TCP packet somewhere above, then we
+# give the link 10 minutes up time. Most TCP packets match this
+# rule. Note that as soon as the TCP connection is closed, the keepup
+# rule above overwrites the timeout.
+
+accept tcp 600 any
+
+#------------------------------------------------------------------------------
+# Rules for UDP packets
+#------------------------------------------------------------------------------
+
+# Don't bring the link up for rwho:
+
+ignore udp udp.dest=udp.who
+ignore udp udp.source=udp.who
+
+# Don't bring the link up for routing packets:
+
+ignore udp udp.dest=udp.router
+ignore udp udp.source=udp.router
+
+# Don't bring the link up for NTP or timed:
+
+ignore udp udp.dest=udp.ntp
+ignore udp udp.source=udp.ntp
+ignore udp udp.dest=udp.timed
+ignore udp udp.source=udp.timed
+
+# Don't bring up on domain name requests between two running copies of named:
+
+ignore udp udp.dest=udp.domain,udp.source=udp.domain
+
+# Bring up the network for domain requests:
+
+accept udp 30 udp.dest=udp.domain
+accept udp 30 udp.source=udp.domain
+
+# Bring up the network for netbios requests, except between netbios servers:
+
+ignore udp udp.source=udp.netbios-ns,udp.dest=udp.netbios-ns
+accept udp 30 udp.dest=udp.netbios-ns
+accept udp 30 udp.source=udp.netbios-ns
+
+# Any other UDP packets:
+
+# here :everything else gets 30 minutes.
+accept udp 30 any
+
+# Catch any packets that we didn't catch above:
+
+# here :everything else gets 30 minutes.
+accept any 30 any
diff --git a/net-dialup/diald/metadata.xml b/net-dialup/diald/metadata.xml
new file mode 100644
index 000000000000..8569d812c705
--- /dev/null
+++ b/net-dialup/diald/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <longdescription>Diald is an intelligent link management tool originally named
+for its ability to control dial-on-demand network connections</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">diald</remote-id>
+ </upstream>
+</pkgmetadata>