[iodine] Initial import iodine into Fedora/EPEL (BZ#530747).
Pavel Alexeev
hubbitus at fedoraproject.org
Mon Sep 20 16:39:33 UTC 2010
commit 9f6eceb00be59845a60abecc03f5e1af533c1fb1
Author: Pavel Alexeev aka Pahan-Hubbitus <pahan at hubbitus.info>
Date: Mon Sep 20 20:37:54 2010 +0400
Initial import iodine into Fedora/EPEL (BZ#530747).
.gitignore | 1 +
iodine-0.5.2-prefix.patch | 12 ++++
iodine-client.conf | 3 +
iodine-client.init | 103 +++++++++++++++++++++++++++++++++++++
iodine-server.conf | 3 +
iodine-server.init | 103 +++++++++++++++++++++++++++++++++++++
iodine.logrotate | 8 +++
iodine.spec | 123 +++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
9 files changed, 357 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..dcd6e1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/iodine-0.6.0-rc1.tar.gz
diff --git a/iodine-0.5.2-prefix.patch b/iodine-0.5.2-prefix.patch
new file mode 100644
index 0000000..7cb0229
--- /dev/null
+++ b/iodine-0.5.2-prefix.patch
@@ -0,0 +1,12 @@
+--- Makefile.orig 2009-03-21 16:07:49.000000000 +0300
++++ Makefile 2009-10-24 14:55:55.000000000 +0400
+@@ -1,4 +1,8 @@
+-prefix=/usr/local
++ifdef PREFIX
++prefix = $(PREFIX)
++else
++prefix = '/usr/local'
++endif
+ sbindir=$(prefix)/sbin
+ datadir=$(prefix)/share
+ mandir=$(datadir)/man
diff --git a/iodine-client.conf b/iodine-client.conf
new file mode 100644
index 0000000..28ebb94
--- /dev/null
+++ b/iodine-client.conf
@@ -0,0 +1,3 @@
+# See `man iodine`
+#OPTIONS="-P PASSWORD NAMESERVER DOMAIN"
+OPTIONS=""
diff --git a/iodine-client.init b/iodine-client.init
new file mode 100644
index 0000000..2df0ea7
--- /dev/null
+++ b/iodine-client.init
@@ -0,0 +1,103 @@
+#!/bin/sh
+#
+# iodine-client Startup script for the iodine client
+#
+# chkconfig: - 80 30
+# description: iodine lets you tunnel IPv4 data through a DNS server
+
+### BEGIN INIT INFO
+# Provides: iodine-client
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Should-Start:
+# Should-Stop:
+# Default-Start:
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: start and stop iodine-client
+# Description: iodine lets you tunnel IPv4 data through a DNS server
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec_short="iodine"
+exec="/usr/bin/${exec_short}"
+prog="iodine-client"
+logfile="/var/log/${prog}.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ echo -n $"Starting $prog: "
+ daemon "/usr/bin/setsid $exec $OPTIONS >> $logfile 2>&1 &"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc $exec_short
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status $exec_short
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/iodine-server.conf b/iodine-server.conf
new file mode 100644
index 0000000..a2a0246
--- /dev/null
+++ b/iodine-server.conf
@@ -0,0 +1,3 @@
+# See `man iodine`
+#OPTIONS="-P PASSWORD TUNNEL_IP DOMAIN"
+OPTIONS=""
diff --git a/iodine-server.init b/iodine-server.init
new file mode 100644
index 0000000..2f55c16
--- /dev/null
+++ b/iodine-server.init
@@ -0,0 +1,103 @@
+#!/bin/sh
+#
+# iodine-server Startup script for the iodine server
+#
+# chkconfig: - 80 30
+# description: iodine lets you tunnel IPv4 data through a DNS server
+
+### BEGIN INIT INFO
+# Provides: iodine-server
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Should-Start:
+# Should-Stop:
+# Default-Start:
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: start and stop iodine-server
+# Description: iodine lets you tunnel IPv4 data through a DNS server
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec_short="iodined"
+exec="/usr/bin/${exec_short}"
+prog="iodine-server"
+logfile="/var/log/${prog}.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ echo -n $"Starting $prog: "
+ daemon "/usr/bin/setsid $exec $OPTIONS >> $logfile 2>&1 &"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc $exec_short
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status $exec_short
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/iodine.logrotate b/iodine.logrotate
new file mode 100644
index 0000000..3355b2f
--- /dev/null
+++ b/iodine.logrotate
@@ -0,0 +1,8 @@
+/var/log/iodine-server.log /var/log/iodine-client.log {
+ missingok
+ create 0600 root root
+ postrotate
+ /etc/init.d/iodine-server condrestart > /dev/null 2>&1 || :
+ /etc/init.d/iodine-client condrestart > /dev/null 2>&1 || :
+ endscript
+}
diff --git a/iodine.spec b/iodine.spec
new file mode 100644
index 0000000..75d2f1b
--- /dev/null
+++ b/iodine.spec
@@ -0,0 +1,123 @@
+%global prerel -rc1
+
+Name: iodine
+Version: 0.6.0
+Release: 0.rc1.4%{?dist}
+Summary: Solution to tunnel IPv4 data through a DNS server
+Summary(ru): Решение для туннелирования IPv4 трафика через DNS сервер
+Group: System Environment/Daemons
+License: ISC
+URL: http://code.kryo.se/iodine/
+Source0: http://code.kryo.se/%{name}/%{name}-%{version}%{prerel}.tar.gz
+# Initscripts and separate configs made by Nikolay Ulyanitsky
+Source1: %{name}-client.conf
+Source2: %{name}-server.conf
+
+Source3: %{name}-client.init
+Source4: %{name}-server.init
+
+Source5: %{name}.logrotate
+
+# It is needed because I plan push it in EPEL too
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# http://dev.kryo.se/iodine/ticket/87
+Patch0: iodine-0.5.2-prefix.patch
+
+BuildRequires: zlib-devel
+Requires(post): chkconfig
+Requires(preun): chkconfig, initscripts
+Requires(postun): initscripts
+
+%description
+iodine lets you tunnel IPv4 data through a DNS server. This can be usable in
+different situations where internet access is firewalled, but DNS queries are
+allowed.
+
+It runs on Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD and Windows and needs a
+TUN/TAP device. The bandwidth is asymmetrical with limited upstream and up to
+1 Mbit/s downstream.
+
+%description -l ru
+iodine предоставляет возможность пробросить IPv4 туннель сквозь DNS сервер.
+Это может быть очень полезно в разных ситуациях, когда доступ в интернет
+запрещён фаерволом, но DNS запросы пропускаются нормально.
+
+Iodine работает на Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD и Windows и
+использует TUN/TAP устройство. Пропускная способность асимметрична - аплоад не
+быстр, скачивание до 1 Mbit/s.
+
+%prep
+%setup -q -n %{name}-%{version}%{prerel}
+%patch0 -p0 -b .prefix
+
+%build
+# It is fail to build without -c gcc flag (comes from upstream Makefile).
+make %{?_smp_mflags} PREFIX=%{_prefix} CFLAGS="-c %{optflags}"
+
+%install
+rm -rf %{buildroot}
+make install PREFIX=%{buildroot}%{_prefix}
+
+install -Dp -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}-client
+install -Dp -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}-server
+
+install -Dp -m 0755 %{SOURCE3} %{buildroot}/%{_initrddir}/%{name}-client
+install -Dp -m 0755 %{SOURCE4} %{buildroot}/%{_initrddir}/%{name}-server
+
+install -Dp -m 0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
+
+%clean
+rm -rf %{buildroot}
+
+%post
+/sbin/chkconfig --add %{name}-client
+/sbin/chkconfig --add %{name}-server
+
+%preun
+if [ $1 = 0 ] ; then
+ /sbin/service %{name}-client stop >/dev/null 2>&1
+ /sbin/chkconfig --del %{name}-client
+
+ /sbin/service %{name}-server stop >/dev/null 2>&1
+ /sbin/chkconfig --del %{name}-server
+fi
+
+%postun
+if [ "$1" -ge "1" ] ; then
+ /sbin/service %{name}-client condrestart >/dev/null 2>&1 || :
+ /sbin/service %{name}-server condrestart >/dev/null 2>&1 || :
+fi
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGELOG README TODO
+%{_sbindir}/%{name}
+%{_sbindir}/%{name}d
+%{_mandir}/man8/%{name}.8.gz
+
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-client
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-server
+
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+
+%{_initrddir}/%{name}-client
+%{_initrddir}/%{name}-server
+
+
+%changelog
+* Sun Sep 12 2010 Pavel Alexeev <Pahan at Hubbitus.info> - 0.6.0-0.rc1.4
+- Build new version 0.6.0rc1
+- Define prerel.
+
+* Sat Mar 6 2010 Pavel Alexeev <Pahan at Hubbitus.info> - 0.5.2-3
+- Honor CFLAGS
+
+* Mon Feb 22 2010 Pavel Alexeev <Pahan at Hubbitus.info> - 0.5.2-2
+- Import some items from Nikolay Ulyanitsky package ( https://bugzilla.redhat.com/show_bug.cgi?id=530747#c1 ):
+ o Add initscripts support (modified)
+ o Add logrotate support
+ o Exclude README-win32.txt and respective delete dos2unix BR.
+ o Add BR zlib-devel
+
+* Sat Oct 24 2009 Pavel Alexeev <Pahan at Hubbitus.info> - 0.5.2-1
+- Initial spec.
diff --git a/sources b/sources
index e69de29..fb25229 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a15bb4faba020d217016fde6e231074a iodine-0.6.0-rc1.tar.gz
More information about the scm-commits
mailing list