summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Pfeifer <pfeifer@gentoo.org>2003-11-28 04:43:25 +0000
committerJay Pfeifer <pfeifer@gentoo.org>2003-11-28 04:43:25 +0000
commit1c0555229290de855c2ebfded71d5e118813fd10 (patch)
tree0d5106a6b138b9dd0a6574b637d589baf37ac27d /net-misc/cipe
parentIntial import of cipe. Closing bug #4459. (diff)
downloadhistorical-1c0555229290de855c2ebfded71d5e118813fd10.tar.gz
historical-1c0555229290de855c2ebfded71d5e118813fd10.tar.bz2
historical-1c0555229290de855c2ebfded71d5e118813fd10.zip
Intial import of cipe. Closing bug #4459.
Diffstat (limited to 'net-misc/cipe')
-rw-r--r--net-misc/cipe/Manifest4
-rw-r--r--net-misc/cipe/cipe-1.5.4.ebuild78
-rw-r--r--net-misc/cipe/files/cipe-1.5.4-gentoo.patch135
-rw-r--r--net-misc/cipe/files/digest-cipe-1.5.42
-rw-r--r--net-misc/cipe/files/init.d-ciped42
-rw-r--r--net-misc/cipe/metadata.xml12
6 files changed, 271 insertions, 2 deletions
diff --git a/net-misc/cipe/Manifest b/net-misc/cipe/Manifest
index 902493688052..a04792cc5b14 100644
--- a/net-misc/cipe/Manifest
+++ b/net-misc/cipe/Manifest
@@ -1,6 +1,6 @@
-MD5 2b769eff5f245f0f71c5398ea19cebfb cipe-1.5.4.ebuild 1573
+MD5 0f372e535e36732ca945f955621e103e cipe-1.5.4.ebuild 1668
MD5 bb3e3c43dda3ed166b0d543c22d84b83 ChangeLog 464
MD5 a8f64fc69346292f297dba6b2d575346 metadata.xml 332
MD5 3606a508beaa02106e20f68ec0d00fb1 files/init.d-ciped 1130
MD5 b476a9ee4e52c7f58d642bf6ccc503e8 files/digest-cipe-1.5.4 124
-MD5 2f01c05d2b653cd54d03c7f9f8ebfabd files/cipe-1.5.4-gentoo.patch 4375
+MD5 5b2673b980666a233f3b15dd3ce3e886 files/cipe-1.5.4-gentoo.patch 4391
diff --git a/net-misc/cipe/cipe-1.5.4.ebuild b/net-misc/cipe/cipe-1.5.4.ebuild
new file mode 100644
index 000000000000..9b16490ae28f
--- /dev/null
+++ b/net-misc/cipe/cipe-1.5.4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cipe/cipe-1.5.4.ebuild,v 1.1 2003/11/28 04:43:23 pfeifer Exp $
+
+CIPE_TEXINFO="${PN}-1.5.1.texinfo"
+
+DESCRIPTION="Cryptographic IP tunneling daemon/module"
+HOMEPAGE="http://sites.inka.de/bigred/devel/cipe.html"
+SRC_URI="http://sites.inka.de/bigred/sw/${P}.tar.gz
+ http://sites.inka.de/bigred/sw/${CIPE_TEXINFO}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~x86"
+IUSE="ssl"
+
+RDEPEND="virtual/glibc
+ ssl? ( >=dev-libs/openssl-0.9.6 )"
+
+DEPEND="${RDEPEND}
+ virtual/linux-sources"
+
+S=${WORKDIR}/${P}
+
+src_unpack() {
+ unpack ${A}
+
+ cp ${DISTDIR}/${CIPE_TEXINFO} ${S}/${PN}.texinfo
+
+ epatch ${FILESDIR}/${P}-gentoo.patch
+}
+
+src_compile() {
+ local myconf=""
+
+ use ssl \
+ && myconf="${myconf} --enable-pkcipe" \
+ || myconf="${myconf} --disable-pkcipe"
+
+ # A custom use flag for bug compatability mode
+ # Do we need this?
+ #use cipebc && myconf="${myconf} --enable-bug-compatible"
+
+ econf ${myconf} || die
+ emake || die
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+
+ insinto /etc/cipe
+ insopts -m755
+ doins samples/ip-{up,down}
+ insopts -m600
+ doins samples/options
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/init.d-ciped ciped
+
+
+ dodoc README* CHANGES COPYING tcpdump.patch
+ dodoc samples/{ip-{up,down},options}
+}
+
+pkg_postinst() {
+ if [ -f /usr/bin/rsa-keygen ] && [ ! -f /etc/cipe/identity.priv ]
+ then
+ ebegin "Generating new identity (host) key"
+ emsg="`rsa-keygen /etc/cipe/identity 2>&1`"
+ eend $? $emsg
+ fi
+
+ update-modules
+ depmod -a
+
+ echo " "
+ einfo "For info on configuring cipe, do 'info cipe'"
+}
diff --git a/net-misc/cipe/files/cipe-1.5.4-gentoo.patch b/net-misc/cipe/files/cipe-1.5.4-gentoo.patch
new file mode 100644
index 000000000000..44af64cb1f5f
--- /dev/null
+++ b/net-misc/cipe/files/cipe-1.5.4-gentoo.patch
@@ -0,0 +1,135 @@
+diff -Naur cipe-1.5.4.orig/cipe.texinfo cipe-1.5.4/cipe.texinfo
+--- cipe-1.5.4.orig/cipe.texinfo 2003-08-13 13:32:44.000000000 +0900
++++ cipe-1.5.4/cipe.texinfo 2003-08-13 13:34:05.000000000 +0900
+@@ -2,6 +2,9 @@
+ @c %**start of header
+ @setfilename cipe.info
+ @settitle CIPE Manual
++@direntry
++* cipe: (cipe)cipe. CIPE - encrypted IP over UDP tunneling
++@end direntry
+ @footnotestyle end
+ @paragraphindent asis
+ @iftex
+diff -Naur cipe-1.5.4.orig/conf/Makefile-obj.in cipe-1.5.4/conf/Makefile-obj.in
+--- cipe-1.5.4.orig/conf/Makefile-obj.in 2000-12-17 03:27:35.000000000 +0900
++++ cipe-1.5.4/conf/Makefile-obj.in 2003-08-13 13:30:14.000000000 +0900
+@@ -9,7 +9,9 @@
+
+ # $Id: cipe-1.5.4-gentoo.patch,v 1.1 2003/11/28 04:43:23 pfeifer Exp $
+
+-BINDIR:=/usr/local/sbin
++DESTDIR:=
++
++BINDIR:=/usr/sbin
+ MODDIR:=/lib/modules/@KVERS@/misc
+
+ MAKE= @MAKE@
+@@ -41,10 +43,9 @@
+ all:: $(MODULE) $(CIPED)
+
+ install:: all
+- -mkdir -p $(MODDIR) $(BINDIR)
+- install -m 644 $(MODULE) $(MODDIR)
+- install -m 755 $(CIPED) $(BINDIR)
+- -depmod -a
++ -mkdir -p $(DESTDIR)$(MODDIR) $(DESTDIR)$(BINDIR)
++ install -m 644 $(MODULE) $(DESTDIR)$(MODDIR)
++ install -m 755 $(CIPED) $(DESTDIR)$(BINDIR)
+
+ KOBJS:= module.o device.o sock.o output.o encaps.o $(CCOBJS)
+ OBJS:= ciped.o options.o ioctl.o
+diff -Naur cipe-1.5.4.orig/conf/Makefile-top.in cipe-1.5.4/conf/Makefile-top.in
+--- cipe-1.5.4.orig/conf/Makefile-top.in 2002-05-30 20:49:18.000000000 +0900
++++ cipe-1.5.4/conf/Makefile-top.in 2003-08-13 13:30:14.000000000 +0900
+@@ -9,7 +9,9 @@
+
+ # $Id: cipe-1.5.4-gentoo.patch,v 1.1 2003/11/28 04:43:23 pfeifer Exp $
+
+-INFODIR:=/usr/local/info
++DESTDIR:=
++
++INFODIR:=/usr/share/info
+
+ SRC:= cipe
+ VERSION:=@VERSION@
+@@ -97,8 +99,8 @@
+ (cd $(SRC); tar czf ../bf.tgz $(BF) bf.checksums)
+
+ install:: cipe.info
+- -mkdir -p $(INFODIR)
+- install -m 644 cipe.info $(INFODIR)
++ -mkdir -p $(DESTDIR)$(INFODIR)
++ install -m 644 cipe.info $(DESTDIR)$(INFODIR)
+
+ TAGS:
+ etags *.[hc] */*.[hc]
+diff -Naur cipe-1.5.4.orig/pkcipe/Makefile.in cipe-1.5.4/pkcipe/Makefile.in
+--- cipe-1.5.4.orig/pkcipe/Makefile.in 2000-12-17 03:27:35.000000000 +0900
++++ cipe-1.5.4/pkcipe/Makefile.in 2003-08-13 13:30:14.000000000 +0900
+@@ -11,6 +11,8 @@
+
+ lib:=../lib
+
++DESTDIR :=
++
+ WARN := -Wno-strict-prototypes
+ CC := @CC@
+ CFLAGS := @CFLAGS@ $(WARN)
+@@ -37,16 +39,12 @@
+ $(MAKE) -C $(lib) libcipe.a
+
+ install: all
+- -mkdir -p $(bindir) $(sbindir)
+- $(INSTALL) -m 755 rsa-keygen $(bindir)
+- $(INSTALL) -m 755 pkcipe $(sbindir)
+- [ -d /etc/cipe/pk ] || mkdir -p /etc/cipe/pk
+- [ -d /var/run/cipe ] || mkdir -p /var/run/cipe
+- chmod 700 /etc/cipe /etc/cipe/pk /var/run/cipe
+- @if [ ! -f /etc/cipe/identity.priv ] ; then \
+- echo "*** Generating new identity (host) key ***" ;\
+- rsa-keygen /etc/cipe/identity ;\
+- fi
++ -mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir)
++ $(INSTALL) -m 755 rsa-keygen $(DESTDIR)$(bindir)
++ $(INSTALL) -m 755 pkcipe $(DESTDIR)$(sbindir)
++ [ -d $(DESTDIR)/etc/cipe/pk ] || mkdir -p $(DESTDIR)/etc/cipe/pk
++ [ -d $(DESTDIR)/var/run/cipe ] || mkdir -p $(DESTDIR)/var/run/cipe
++ chmod 700 $(DESTDIR)/etc/cipe $(DESTDIR)/etc/cipe/pk $(DESTDIR)/var/run/cipe
+
+ clean:
+ rm -f *.[oaisd] *.out core pkcipe
+diff -Naur cipe-1.5.4.orig/samples/ip-down cipe-1.5.4/samples/ip-down
+--- cipe-1.5.4.orig/samples/ip-down 2000-12-17 02:49:10.000000000 +0900
++++ cipe-1.5.4/samples/ip-down 2003-08-13 13:48:40.000000000 +0900
+@@ -16,6 +16,12 @@
+ # remove the daemon PID file
+ rm -f /var/run/cipe/$6.pid /var/run/cipe/$1.pid
+
++# Gentoo ebuild addition.
++if [ "${PIDFILE}" != "" ]; then
++ rm -f ${PIDFILE}
++fi
++# Gentoo ebuild addition ends.
++
+ # If the system runs gated, tell it what has happened
+ #gdc interface
+
+diff -Naur cipe-1.5.4.orig/samples/ip-up cipe-1.5.4/samples/ip-up
+--- cipe-1.5.4.orig/samples/ip-up 2000-12-17 02:49:10.000000000 +0900
++++ cipe-1.5.4/samples/ip-up 2003-08-13 13:48:44.000000000 +0900
+@@ -35,6 +35,14 @@
+ # Create/update PID file. Note: PKCIPE needs this.
+ echo "$3 $1" >/var/run/cipe/${6:-$1}.pid
+
++# Gentoo ebuild addition. Store the pid in the file
++# specified by the start script, so that the stop script
++# knows who to kill
++if [ "${PIDFILE}" != "" ]; then
++ echo "$3" >> ${PIDFILE}
++fi
++# Gentoo ebuild addition ends.
++
+ # Trigger the key exchange procedure, useful when we're using SOCKS
+ # This _must_ run delayed and in the background
+ #(sleep 10; ping -c5 $5) &
diff --git a/net-misc/cipe/files/digest-cipe-1.5.4 b/net-misc/cipe/files/digest-cipe-1.5.4
new file mode 100644
index 000000000000..57409066ddaa
--- /dev/null
+++ b/net-misc/cipe/files/digest-cipe-1.5.4
@@ -0,0 +1,2 @@
+MD5 9d88f2d090fcafcd0e2fa73b018b6e16 cipe-1.5.4.tar.gz 142322
+MD5 0467ac1c044ad256cee79ea34e3f35e0 cipe-1.5.1.texinfo 72862
diff --git a/net-misc/cipe/files/init.d-ciped b/net-misc/cipe/files/init.d-ciped
new file mode 100644
index 000000000000..20e8296d9c65
--- /dev/null
+++ b/net-misc/cipe/files/init.d-ciped
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+
+# This script is distributed as /etc/init.d/ciped. If you have more than one
+# cipe interface then copy it to /etc/init.d/ciped.foo, and put the new
+# configuration in /etc/cipe/options.foo
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ # set ${OPTIONS} to the name of the options file based on the name of this init script
+ OPTIONS="/etc/cipe/options"
+ PIDFILE="/var/run/ciped.pid"
+ if [ "${myservice%%.*}" = "ciped" ] && [ "${myservice##*.}" != "${myservice}" ]
+ then
+ OPTIONS="/etc/cipe/options.${myservice##*.}"
+ PIDFILE="/var/run/ciped.${myservice##*.}.pid"
+ fi
+ if [ ! -e ${OPTIONS} ] ; then
+ eerror "${myservice} - ${OPTIONS}" does not exist
+ return 1
+ fi
+ # the cipe ip-up script will write its pid into this filename
+ export PIDFILE
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${myservice}"
+ start-stop-daemon --start --pidfile ${PIDFILE} --quiet --exec /usr/sbin/ciped-cb -- -o ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Stopping ${myservice}"
+ start-stop-daemon --stop --pidfile ${PIDFILE} --quiet --exec /usr/sbin/ciped-cb
+ eend $?
+}
diff --git a/net-misc/cipe/metadata.xml b/net-misc/cipe/metadata.xml
new file mode 100644
index 000000000000..3ac18be75a3d
--- /dev/null
+++ b/net-misc/cipe/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>pfeifer@gentoo.org</email>
+ <name>Jay Pfeifer</name>
+</maintainer>
+<longdescription>
+Cryptographic IP tunneling daemon/module
+</longdescription>
+</pkgmetadata>