Split package into server and client packages.
authorgregor herrmann <gregoa@debian.org>
Fri, 20 Jun 2014 01:50:53 +0000 (03:50 +0200)
committergregor herrmann <gregoa@debian.org>
Fri, 20 Jun 2014 01:50:53 +0000 (03:50 +0200)
Closes: #491287
24 files changed:
debian/config [deleted file]
debian/control
debian/iodine-client.docs [new file with mode: 0644]
debian/iodine-client.install [new file with mode: 0644]
debian/iodine-client.manpages [new file with mode: 0644]
debian/iodine.docs [deleted file]
debian/iodine.install [deleted file]
debian/iodine.iodined.init [deleted file]
debian/iodine.links [deleted file]
debian/iodine.logcheck.ignore.server [deleted file]
debian/iodine.manpages [deleted file]
debian/iodined.config [new file with mode: 0644]
debian/iodined.docs [new file with mode: 0644]
debian/iodined.init [new file with mode: 0644]
debian/iodined.install [new file with mode: 0644]
debian/iodined.logcheck.ignore.server [new file with mode: 0644]
debian/iodined.postinst [new file with mode: 0644]
debian/iodined.postrm [new file with mode: 0644]
debian/iodined.templates [new file with mode: 0644]
debian/po/POTFILES.in
debian/postinst [deleted file]
debian/postrm [deleted file]
debian/rules
debian/templates [deleted file]

diff --git a/debian/config b/debian/config
deleted file mode 100644 (file)
index 020a214..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-CONFIGFILE=/etc/default/iodine
-set -e
-. /usr/share/debconf/confmodule
-
-if [ -s $CONFIGFILE ] ; then
-       . $CONFIGFILE
-       db_set iodine/start_daemon    "$START_IODINED"
-       db_set iodine/daemon_options  "$IODINED_ARGS"
-       db_set iodine/daemon_password "$IODINED_PASSWORD"
-fi
-
-db_input medium iodine/start_daemon || true
-db_go || true
-
-db_get iodine/start_daemon
-START_DAEMON=$RET
-
-if [ "x$START_DAEMON" = "xtrue" ] ; then
-       db_input medium iodine/daemon_options || true
-       db_input medium iodine/daemon_password || true
-       db_go || true
-fi
index 54534faaf479f49bb6bf5da401fe8fa10858a198..96deae55a3ef6c1dae5533dc66bb048f3e382631 100644 (file)
@@ -16,17 +16,50 @@ Vcs-Git: git://git.toastfreeware.priv.at/debian/iodine.git
 Vcs-Browser: http://git.toastfreeware.priv.at/debian/iodine.git/
 
 Package: iodine
+Architecture: all
+Depends: ${misc:Depends},
+         iodined (>= ${source:Version}),
+         iodine-client (>= ${source:Version})
+Description: tool for tunneling IPv4 data through a DNS server (metapackage)
+ This is a piece of software that 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.
+ .
+ iodine is similar to nstx but has password authentication, brings up the
+ tun interface automatically and lets the user specify the IP address as a
+ command line option.
+ .
+ This package is a metapackage for installing both the server and the client.
+ If you need only one of them, feel free to remove it and only keep the
+ iodined or iodine-client package.
+
+Package: iodined
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends},
          adduser,
          udev [linux-any] | makedev [linux-any]
+Description: tool for tunneling IPv4 data through a DNS server (server)
+ This is a piece of software that 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.
+ .
+ iodine is similar to nstx but has password authentication, brings up the
+ tun interface automatically and lets the user specify the IP address as a
+ command line option.
+ .
+ This package installs the server component.
+
+Package: iodine-client
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
 Suggests: dnsutils,
           fping | oping,
           gawk,
           ipcalc,
           iproute2
-Description: tool for tunneling IPv4 data through a DNS server
+Description: tool for tunneling IPv4 data through a DNS server (client)
  This is a piece of software that 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.
@@ -34,3 +67,5 @@ Description: tool for tunneling IPv4 data through a DNS server
  iodine is similar to nstx but has password authentication, brings up the
  tun interface automatically and lets the user specify the IP address as a
  command line option.
+ .
+ This package installs the client component.
diff --git a/debian/iodine-client.docs b/debian/iodine-client.docs
new file mode 100644 (file)
index 0000000..2e09849
--- /dev/null
@@ -0,0 +1,2 @@
+README
+doc/*
diff --git a/debian/iodine-client.install b/debian/iodine-client.install
new file mode 100644 (file)
index 0000000..7e2d11d
--- /dev/null
@@ -0,0 +1,3 @@
+debian/iodine-client-start usr/sbin
+usr/sbin/iodine
+usr/share/man/man8/iodine.8
diff --git a/debian/iodine-client.manpages b/debian/iodine-client.manpages
new file mode 100644 (file)
index 0000000..810c3dc
--- /dev/null
@@ -0,0 +1 @@
+debian/iodine-client-start.8
diff --git a/debian/iodine.docs b/debian/iodine.docs
deleted file mode 100644 (file)
index 2e09849..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-README
-doc/*
diff --git a/debian/iodine.install b/debian/iodine.install
deleted file mode 100644 (file)
index 5a7cdea..0000000
+++ /dev/null
@@ -1 +0,0 @@
-debian/iodine-client-start usr/sbin
diff --git a/debian/iodine.iodined.init b/debian/iodine.iodined.init
deleted file mode 100644 (file)
index 79839a7..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          iodined
-# Required-Start:    $remote_fs $network $syslog $named
-# Required-Stop:     $remote_fs $network $syslog
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: initscript for iodined
-# Description:       initscript for iodined
-### END INIT INFO
-
-# Author: gregor herrmann <gregor+debian@comodo.priv.at>
-
-# Do NOT "set -e"
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="IP over DNS tunneling server"
-NAME=iodined
-DAEMON=/usr/sbin/$NAME
-DEFAULT=iodine
-DAEMON_ARGS=""
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CHROOTDIR=/var/run/iodine
-
-# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit 0
-
-# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
-
-# Get config
-get_config() {
-       [ -r /etc/default/$DEFAULT ] && . /etc/default/$DEFAULT
-       if [ "$START_IODINED" != "true" ] ; then
-               [ "$VERBOSE" != no ] && log_progress_msg "- automatic start disabled" && log_end_msg 0
-               exit 0
-       else
-               if [ -n "$IODINED_ARGS" ] && [ -n "$IODINED_PASSWORD" ] ; then
-                       DAEMON_ARGS="-u iodine -t $CHROOTDIR $IODINED_ARGS"
-               else
-                       [ "$VERBOSE" != no ] && log_warning_msg "$NAME is not fully configured. Change this in /etc/default/$DEFAULT or run dpkg-reconfigure $DEFAULT."
-                       exit 0
-               fi
-       fi
-}
-
-# chroot dir
-check_chrootdir() {
-       if [ -d "$CHROOTDIR" ] || mkdir -p "$CHROOTDIR" ; then
-               return 0
-       else
-               [ "$VERBOSE" != no ] && log_failure_msg "$CHROOTDIR does not exist and can't be created."
-               exit 0
-       fi
-}      
-
-#
-# Function that starts the daemon/service
-#
-do_start()
-{
-       # populate $DAEMON_ARGS
-       get_config
-       # check CHROOTDIR
-       check_chrootdir
-       # 
-       # Return
-       #   0 if daemon has been started
-       #   1 if daemon was already running
-       #   2 if daemon could not be started
-       start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS -P "$IODINED_PASSWORD" \
-               || return 2
-       # Add code here, if necessary, that waits for the process to be ready
-       # to handle requests from services started subsequently which depend
-       # on this one.  As a last resort, sleep for some time.
-}
-
-#
-# Function that stops the daemon/service
-#
-do_stop()
-{
-       # Return
-       #   0 if daemon has been stopped
-       #   1 if daemon was already stopped
-       #   2 if daemon could not be stopped
-       #   other if a failure occurred
-       start-stop-daemon --stop --quiet --retry=TERM/5/KILL/5 --exec $DAEMON
-       RETVAL="$?"
-       [ "$RETVAL" = 2 ] && return 2
-       # Wait for children to finish too if this is a daemon that forks
-       # and if the daemon is only ever run from this initscript.
-       # If the above conditions are not satisfied then add some other code
-       # that waits for the process to drop all resources that could be
-       # needed by services started subsequently.  A last resort is to
-       # sleep for some time.
-       start-stop-daemon --stop --quiet --oknodo --retry=0/5/KILL/5 --exec $DAEMON
-       [ "$?" = 2 ] && return 2
-       # Many daemons don't delete their pidfiles when they exit.
-       rm -f $PIDFILE
-       return "$RETVAL"
-}
-
-case "$1" in
-  start)
-       [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-       do_start
-       case "$?" in
-               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-       esac
-       ;;
-  stop)
-       [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
-       do_stop
-       case "$?" in
-               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-       esac
-       ;;
-  status)
-       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
-       ;;
-  restart|force-reload)
-       log_daemon_msg "Restarting $DESC" "$NAME"
-       do_stop
-       case "$?" in
-         0|1)
-               do_start
-               case "$?" in
-                       0) log_end_msg 0 ;;
-                       1) log_end_msg 1 ;; # Old process is still running
-                       *) log_end_msg 1 ;; # Failed to start
-               esac
-               ;;
-         *)
-               # Failed to stop
-               log_end_msg 1
-               ;;
-       esac
-       ;;
-  *)
-       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
-       exit 3
-       ;;
-esac
-
-:
diff --git a/debian/iodine.links b/debian/iodine.links
deleted file mode 100644 (file)
index 9518c79..0000000
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/man/man8/iodine.8 usr/share/man/man8/iodined.8
diff --git a/debian/iodine.logcheck.ignore.server b/debian/iodine.logcheck.ignore.server
deleted file mode 100644 (file)
index add9aa8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ iodined: accepted version for user #[[:digit:]]+ from [.[:digit:]]{7,15}$
-^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ iodined: accepted password from user #[[:digit:]]+, given IP [.[:digit:]]{7,15}$
diff --git a/debian/iodine.manpages b/debian/iodine.manpages
deleted file mode 100644 (file)
index 810c3dc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-debian/iodine-client-start.8
diff --git a/debian/iodined.config b/debian/iodined.config
new file mode 100644 (file)
index 0000000..020a214
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+CONFIGFILE=/etc/default/iodine
+set -e
+. /usr/share/debconf/confmodule
+
+if [ -s $CONFIGFILE ] ; then
+       . $CONFIGFILE
+       db_set iodine/start_daemon    "$START_IODINED"
+       db_set iodine/daemon_options  "$IODINED_ARGS"
+       db_set iodine/daemon_password "$IODINED_PASSWORD"
+fi
+
+db_input medium iodine/start_daemon || true
+db_go || true
+
+db_get iodine/start_daemon
+START_DAEMON=$RET
+
+if [ "x$START_DAEMON" = "xtrue" ] ; then
+       db_input medium iodine/daemon_options || true
+       db_input medium iodine/daemon_password || true
+       db_go || true
+fi
diff --git a/debian/iodined.docs b/debian/iodined.docs
new file mode 100644 (file)
index 0000000..2e09849
--- /dev/null
@@ -0,0 +1,2 @@
+README
+doc/*
diff --git a/debian/iodined.init b/debian/iodined.init
new file mode 100644 (file)
index 0000000..6758f19
--- /dev/null
@@ -0,0 +1,156 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          iodined
+# Required-Start:    $remote_fs $network $syslog $named
+# Required-Stop:     $remote_fs $network $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: initscript for iodined
+# Description:       initscript for iodined
+### END INIT INFO
+
+# Author: gregor herrmann <gregor+debian@comodo.priv.at>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="IP over DNS tunneling server"
+NAME=iodined
+DAEMON=/usr/sbin/$NAME
+DEFAULT=iodine
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CHROOTDIR=/var/run/iodine
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+# Get config
+get_config() {
+       [ -r /etc/default/$DEFAULT ] && . /etc/default/$DEFAULT
+       if [ "$START_IODINED" != "true" ] ; then
+               [ "$VERBOSE" != no ] && log_progress_msg "- automatic start disabled" && log_end_msg 0
+               exit 0
+       else
+               if [ -n "$IODINED_ARGS" ] && [ -n "$IODINED_PASSWORD" ] ; then
+                       DAEMON_ARGS="-u iodine -t $CHROOTDIR $IODINED_ARGS"
+               else
+                       [ "$VERBOSE" != no ] && log_warning_msg "$NAME is not fully configured. Change this in /etc/default/$DEFAULT or run dpkg-reconfigure $DEFAULT."
+                       exit 0
+               fi
+       fi
+}
+
+# chroot dir
+check_chrootdir() {
+       if [ -d "$CHROOTDIR" ] || mkdir -p "$CHROOTDIR" ; then
+               return 0
+       else
+               [ "$VERBOSE" != no ] && log_failure_msg "$CHROOTDIR does not exist and can't be created."
+               exit 0
+       fi
+}
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+       # populate $DAEMON_ARGS
+       get_config
+       # check CHROOTDIR
+       check_chrootdir
+       #
+       # Return
+       #   0 if daemon has been started
+       #   1 if daemon was already running
+       #   2 if daemon could not be started
+       start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
+               || return 1
+       start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS -P "$IODINED_PASSWORD" \
+               || return 2
+       # Add code here, if necessary, that waits for the process to be ready
+       # to handle requests from services started subsequently which depend
+       # on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+       # Return
+       #   0 if daemon has been stopped
+       #   1 if daemon was already stopped
+       #   2 if daemon could not be stopped
+       #   other if a failure occurred
+       start-stop-daemon --stop --quiet --retry=TERM/5/KILL/5 --exec $DAEMON
+       RETVAL="$?"
+       [ "$RETVAL" = 2 ] && return 2
+       # Wait for children to finish too if this is a daemon that forks
+       # and if the daemon is only ever run from this initscript.
+       # If the above conditions are not satisfied then add some other code
+       # that waits for the process to drop all resources that could be
+       # needed by services started subsequently.  A last resort is to
+       # sleep for some time.
+       start-stop-daemon --stop --quiet --oknodo --retry=0/5/KILL/5 --exec $DAEMON
+       [ "$?" = 2 ] && return 2
+       # Many daemons don't delete their pidfiles when they exit.
+       rm -f $PIDFILE
+       return "$RETVAL"
+}
+
+case "$1" in
+  start)
+       [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+       do_start
+       case "$?" in
+               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+       esac
+       ;;
+  stop)
+       [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+       do_stop
+       case "$?" in
+               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+       esac
+       ;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  restart|force-reload)
+       log_daemon_msg "Restarting $DESC" "$NAME"
+       do_stop
+       case "$?" in
+         0|1)
+               do_start
+               case "$?" in
+                       0) log_end_msg 0 ;;
+                       1) log_end_msg 1 ;; # Old process is still running
+                       *) log_end_msg 1 ;; # Failed to start
+               esac
+               ;;
+         *)
+               # Failed to stop
+               log_end_msg 1
+               ;;
+       esac
+       ;;
+  *)
+       echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+       exit 3
+       ;;
+esac
+
+:
diff --git a/debian/iodined.install b/debian/iodined.install
new file mode 100644 (file)
index 0000000..a0ba9ed
--- /dev/null
@@ -0,0 +1,2 @@
+usr/sbin/iodined
+usr/share/man/man8/iodine.8
diff --git a/debian/iodined.logcheck.ignore.server b/debian/iodined.logcheck.ignore.server
new file mode 100644 (file)
index 0000000..add9aa8
--- /dev/null
@@ -0,0 +1,2 @@
+^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ iodined: accepted version for user #[[:digit:]]+ from [.[:digit:]]{7,15}$
+^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ iodined: accepted password from user #[[:digit:]]+, given IP [.[:digit:]]{7,15}$
diff --git a/debian/iodined.postinst b/debian/iodined.postinst
new file mode 100644 (file)
index 0000000..13a1cf6
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/sh
+# postinst script for iodine
+#
+# see: dh_installdeb(1)
+
+CONFIGFILE=/etc/default/iodine
+set -e
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        # we need a tun device
+        if [ ! -c /dev/net/tun ] && [ -x /dev/MAKEDEV ] ; then
+            echo "Creating device /dev/net/tun ..."
+            cd /dev
+            ./MAKEDEV tun || true
+        fi
+
+        # and we want a special user
+        adduser --quiet --system --home /var/run/iodine iodine
+
+        # generate/update /etc/default/iodine
+        if [ ! -e $CONFIGFILE ]; then
+            cat <<EOF >$CONFIGFILE
+# Default settings for iodine. This file is sourced from
+# /etc/init.d/iodined
+START_IODINED=
+IODINED_ARGS=
+IODINED_PASSWORD=
+EOF
+        fi
+
+        db_get iodine/start_daemon
+        START_IODINED=$RET
+        db_get iodine/daemon_options
+        IODINED_ARGS=$RET
+        db_get iodine/daemon_password
+        IODINED_PASSWORD=$RET
+
+        cp -a -f $CONFIGFILE $CONFIGFILE.tmp
+
+        # If the admin deleted or commented some variables but then set
+        # them via debconf, (re-)add them to the conffile.
+        test -z "$START_IODINED" || grep -Eq '^ *START_IODINED=' $CONFIGFILE || \
+            echo "START_IODINED=" >> $CONFIGFILE
+        test -z "$IODINED_ARGS" || grep -Eq '^ *IODINED_ARGS=' $CONFIGFILE || \
+            echo "IODINED_ARGS=" >> $CONFIGFILE
+        test -z "$IODINED_PASSWORD" || grep -Eq '^ *IODINED_PASSWORD=' $CONFIGFILE || \
+            echo "IODINED_PASSWORD=" >> $CONFIGFILE
+
+        perl -p -e "s{^ *START_IODINED=.*}{START_IODINED=\"$START_IODINED\"}; \
+                    s{^ *IODINED_ARGS=.*}{IODINED_ARGS=\"$IODINED_ARGS\"}; \
+                    s{^ *IODINED_PASSWORD=.*}{IODINED_PASSWORD=\"$IODINED_PASSWORD\"};" \
+            < $CONFIGFILE > $CONFIGFILE.tmp
+
+        mv -f $CONFIGFILE.tmp $CONFIGFILE
+        [ ! -e $CONFIGFILE ] || chmod 600 $CONFIGFILE
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# tell debconf we are done. otherwise, it hangs waiting for the daemon.
+db_stop;
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/iodined.postrm b/debian/iodined.postrm
new file mode 100644 (file)
index 0000000..b33bb2a
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postrm script for #PACKAGE#
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+    purge)
+      [ -f /etc/default/iodine ] && rm /etc/default/iodine
+    ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/iodined.templates b/debian/iodined.templates
new file mode 100644 (file)
index 0000000..c61c332
--- /dev/null
@@ -0,0 +1,20 @@
+Template: iodine/start_daemon
+Type: boolean
+Default: false
+_Description: Should iodined (server) start on boot?
+ If you want iodined to be started at boot time you can set this behaviour here.
+
+Template: iodine/daemon_options
+Type: string
+#flag:comment:2
+# TRANSLATORS: please don't translate/change ".example" (RFC 2606)
+_Description: Options to iodined (server):
+ You need to give the necessary arguments to iodined; see iodined(8) for help.
+ Example: 10.0.0.1 tunnel.mydomain.example
+
+Template: iodine/daemon_password
+Type: password
+_Description: Password for iodined (server):
+ Enter the password iodined uses at startup. It has to be used by clients
+ when connecting.
+ This password will be stored in plain text in /etc/default/iodine.
index cef83a3407df50c2213b6febd8062ee54c13051b..71057a265ed33f6e209dcc47644039f4a08374b0 100644 (file)
@@ -1 +1 @@
-[type: gettext/rfc822deb] templates
+[type: gettext/rfc822deb] iodined.templates
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644 (file)
index 61d5fdd..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-# postinst script for iodine
-#
-# see: dh_installdeb(1)
-
-CONFIGFILE=/etc/default/iodine
-set -e
-. /usr/share/debconf/confmodule
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    configure)
-        # we need a tun device
-        if [ ! -c /dev/net/tun ] && [ -x /dev/MAKEDEV ] ; then
-            echo "Creating device /dev/net/tun ..."
-            cd /dev
-            ./MAKEDEV tun || true
-        fi 
-
-        # and we want a special user
-        adduser --quiet --system --home /var/run/iodine iodine
-
-        # generate/update /etc/default/iodine
-        if [ ! -e $CONFIGFILE ]; then
-            cat <<EOF >$CONFIGFILE
-# Default settings for iodine. This file is sourced from
-# /etc/init.d/iodined
-START_IODINED=
-IODINED_ARGS=
-IODINED_PASSWORD=
-EOF
-        fi
-
-        db_get iodine/start_daemon
-        START_IODINED=$RET
-        db_get iodine/daemon_options
-        IODINED_ARGS=$RET
-        db_get iodine/daemon_password
-        IODINED_PASSWORD=$RET
-
-        cp -a -f $CONFIGFILE $CONFIGFILE.tmp
-
-        # If the admin deleted or commented some variables but then set
-        # them via debconf, (re-)add them to the conffile.
-        test -z "$START_IODINED" || grep -Eq '^ *START_IODINED=' $CONFIGFILE || \
-            echo "START_IODINED=" >> $CONFIGFILE
-        test -z "$IODINED_ARGS" || grep -Eq '^ *IODINED_ARGS=' $CONFIGFILE || \
-            echo "IODINED_ARGS=" >> $CONFIGFILE
-        test -z "$IODINED_PASSWORD" || grep -Eq '^ *IODINED_PASSWORD=' $CONFIGFILE || \
-            echo "IODINED_PASSWORD=" >> $CONFIGFILE
-
-        perl -p -e "s{^ *START_IODINED=.*}{START_IODINED=\"$START_IODINED\"}; \
-                    s{^ *IODINED_ARGS=.*}{IODINED_ARGS=\"$IODINED_ARGS\"}; \
-                    s{^ *IODINED_PASSWORD=.*}{IODINED_PASSWORD=\"$IODINED_PASSWORD\"};" \
-            < $CONFIGFILE > $CONFIGFILE.tmp
-
-        mv -f $CONFIGFILE.tmp $CONFIGFILE
-        [ ! -e $CONFIGFILE ] || chmod 600 $CONFIGFILE
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# tell debconf we are done. otherwise, it hangs waiting for the daemon.
-db_stop;
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100644 (file)
index b33bb2a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-# postrm script for #PACKAGE#
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <overwriter>
-#          <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-    purge)
-      [ -f /etc/default/iodine ] && rm /etc/default/iodine
-    ;;
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
index ecfef8db20268747d5fcfcda7ba86a43d551e1a6..7d941a462a88689bdc73ac488c68b82419524ee1 100755 (executable)
@@ -1,8 +1,5 @@
 #!/usr/bin/make -f
 
-PACKAGE = $(shell dh_listpackages)
-TMP     = $(CURDIR)/debian/$(PACKAGE)
-
 export DEB_BUILD_MAINT_OPTIONS := hardening=+pie,+bindnow
 
 %:
@@ -20,11 +17,9 @@ override_dh_auto_build:
                $(CURDIR)/debian/iodine-client-start
 
 override_dh_auto_install:
-       dh_auto_install -- DESTDIR=$(TMP) prefix=/usr
-
-override_dh_installinit:
-       dh_installinit --name=iodined
+       dh_auto_install -- prefix=/usr
 
-override_dh_installlogcheck:
-       dh_installlogcheck
-       mv $(TMP)/etc/logcheck/ignore.d.server/iodine $(TMP)/etc/logcheck/ignore.d.server/iodined
+override_dh_install:
+       dh_install
+       mv -v $(CURDIR)/debian/iodined/usr/share/man/man8/iodine.8 \
+               $(CURDIR)/debian/iodined/usr/share/man/man8/iodined.8
diff --git a/debian/templates b/debian/templates
deleted file mode 100644 (file)
index c61c332..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Template: iodine/start_daemon
-Type: boolean
-Default: false
-_Description: Should iodined (server) start on boot?
- If you want iodined to be started at boot time you can set this behaviour here.
-
-Template: iodine/daemon_options
-Type: string
-#flag:comment:2
-# TRANSLATORS: please don't translate/change ".example" (RFC 2606)
-_Description: Options to iodined (server):
- You need to give the necessary arguments to iodined; see iodined(8) for help.
- Example: 10.0.0.1 tunnel.mydomain.example
-
-Template: iodine/daemon_password
-Type: password
-_Description: Password for iodined (server):
- Enter the password iodined uses at startup. It has to be used by clients
- when connecting.
- This password will be stored in plain text in /etc/default/iodine.