summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-05-14 00:36:23 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-05-14 00:36:23 +0200
commitc73977c5cd8e4c756566681d96c18b4171dde60a (patch)
treeaeff039036535a3efd16b8bc269667dc8765b2d9
parentMerge branch 'master' into debianpkg (diff)
updated debian package for new releasedebianpkg
-rw-r--r--debian/changelog11
-rw-r--r--debian/patches/fix-initscript.patch19
-rw-r--r--debian/patches/fix-prefix-variable.patch21
-rw-r--r--debian/patches/fix-sighandler-return-code.patch81
-rw-r--r--debian/patches/series3
-rwxr-xr-xdebian/rules5
-rw-r--r--debian/tcpproxy.service10
7 files changed, 13 insertions, 137 deletions
diff --git a/debian/changelog b/debian/changelog
index 92f9040..501fe70 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
-tcpproxy (1.1-4) UNRELEASED; urgency=medium
+tcpproxy (1.2-1) unstable; urgency=medium
+
+ * New upstream release
+ * dropped all patches
+
+ -- Christian Pointner <equinox@spreadspace.org> Thu, 14 May 2015 00:26:16 +0200
+
+tcpproxy (1.1-4) unstable; urgency=medium
* added systemd service file
- -- Christian Pointner <equinox@spreadspace.org> Wed, 13 May 2015 03:46:51 +0200
+ -- Christian Pointner <equinox@spreadspace.org> Wed, 13 May 2015 06:10:23 +0200
tcpproxy (1.1-3) unstable; urgency=medium
diff --git a/debian/patches/fix-initscript.patch b/debian/patches/fix-initscript.patch
deleted file mode 100644
index ab02134..0000000
--- a/debian/patches/fix-initscript.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: fix initscript
- This patches to initscript ot source /lib/lsb/init-functions.
- .
- tcpproxy (1.1-2) unstable; urgency=low
- .
- * updated Debian packaging (debhelper 9)
- * Bump standards version
-Author: Christian Pointner <equinox@spreadspace.org>
---- tcpproxy-1.1.orig/contrib/initscript
-+++ tcpproxy-1.1/contrib/initscript
-@@ -23,6 +23,8 @@ if [ -f /etc/default/tcpproxy ] ; then
- . /etc/default/tcpproxy
- fi
-
-+. /lib/lsb/init-functions
-+
- set -e
- case "$1" in
- start)
diff --git a/debian/patches/fix-prefix-variable.patch b/debian/patches/fix-prefix-variable.patch
deleted file mode 100644
index f4cdf28..0000000
--- a/debian/patches/fix-prefix-variable.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: rename prefix variable to lower case
- This changes the name of the prefix variable to be more compliant
- with standard configure scripts.
- .
- tcpproxy (1.1-2) unstable; urgency=low
- .
- * updated Debian packaging (debhelper 9)
- * Bump standards version
-Author: Christian Pointner <equinox@spreadspace.org>
-
---- tcpproxy-1.1.orig/src/configure
-+++ tcpproxy-1.1/src/configure
-@@ -158,7 +158,7 @@ STRIP := strip
- INSTALL := install
- RAGEL := ragel
-
--PREFIX := '$PREFIX'
-+prefix := '$PREFIX'
- BINDIR := '$BINDIR'
- ETCDIR := '$ETCDIR'
- EOF
diff --git a/debian/patches/fix-sighandler-return-code.patch b/debian/patches/fix-sighandler-return-code.patch
deleted file mode 100644
index 5f40062..0000000
--- a/debian/patches/fix-sighandler-return-code.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Description: this fixes the return code when signals are caught
- For better support of systemd the return value should reflect the
- caught signal.
- .
- tcpproxy (1.1-4) unstable; urgency=medium
- .
- * added systemd service file
-Author: Christian Pointner <equinox@spreadspace.org>
-
-Index: tcpproxy/src/sig_handler.c
-===================================================================
---- tcpproxy.orig/src/sig_handler.c
-+++ tcpproxy/src/sig_handler.c
-@@ -116,12 +116,12 @@ int signal_handle()
- for(sig=1; sig < NSIG; ++sig) {
- if(sigismember(&set, sig)) {
- switch(sig) {
-- case SIGINT: log_printf(NOTICE, "SIG-Int caught, exitting"); return_value = 1; break;
-- case SIGQUIT: log_printf(NOTICE, "SIG-Quit caught, exitting"); return_value = 1; break;
-- case SIGTERM: log_printf(NOTICE, "SIG-Term caught, exitting"); return_value = 1; break;
-- case SIGHUP: log_printf(NOTICE, "SIG-Hup caught"); return_value = 2; break;
-- case SIGUSR1: log_printf(NOTICE, "SIG-Usr1 caught"); return_value = 3; break;
-- case SIGUSR2: log_printf(NOTICE, "SIG-Usr2 caught"); return_value = 4; break;
-+ case SIGINT: log_printf(NOTICE, "SIG-Int caught, exitting"); return_value = SIGINT; break;
-+ case SIGQUIT: log_printf(NOTICE, "SIG-Quit caught, exitting"); return_value = SIGQUIT; break;
-+ case SIGTERM: log_printf(NOTICE, "SIG-Term caught, exitting"); return_value = SIGTERM; break;
-+ case SIGHUP: log_printf(NOTICE, "SIG-Hup caught"); return_value = SIGHUP; break;
-+ case SIGUSR1: log_printf(NOTICE, "SIG-Usr1 caught"); return_value = SIGUSR1; break;
-+ case SIGUSR2: log_printf(NOTICE, "SIG-Usr2 caught"); return_value = SIGUSR2; break;
- default: log_printf(WARNING, "unknown signal %d caught, ignoring", sig); break;
- }
- sigdelset(&set, sig);
-Index: tcpproxy/src/tcpproxy.c
-===================================================================
---- tcpproxy.orig/src/tcpproxy.c
-+++ tcpproxy/src/tcpproxy.c
-@@ -30,6 +30,9 @@
- #include <errno.h>
- #include <string.h>
- #include <sys/select.h>
-+#include <sys/types.h>
-+#include <unistd.h>
-+#include <signal.h>
-
- #include "datatypes.h"
- #include "options.h"
-@@ -73,8 +76,8 @@ int main_loop(options_t* opt, listeners_
-
- if(FD_ISSET(sig_fd, &readfds)) {
- return_value = signal_handle();
-- if(return_value == 1) break;
-- if(return_value == 2) {
-+ if(return_value == SIGINT || return_value == SIGQUIT || return_value == SIGTERM) break;
-+ if(return_value == SIGHUP) {
- if(opt->config_file_) {
- log_printf(NOTICE, "re-reading config file: %s", opt->config_file_);
- read_configfile(opt->config_file_, listeners);
-@@ -82,9 +85,9 @@ int main_loop(options_t* opt, listeners_
- log_printf(NOTICE, "ignoring SIGHUP: no config file specified");
-
- return_value = 0;
-- } else if(return_value == 3) {
-+ } else if(return_value == SIGUSR1) {
- listeners_print(listeners);
-- } else if(return_value == 4) {
-+ } else if(return_value == SIGUSR2) {
- clients_print(&clients);
- }
- }
-@@ -233,8 +236,10 @@ int main(int argc, char* argv[])
- log_printf(NOTICE, "normal shutdown");
- else if(ret < 0)
- log_printf(NOTICE, "shutdown after error");
-- else
-+ else {
- log_printf(NOTICE, "shutdown after signal");
-+ kill(getpid(), ret);
-+ }
-
- log_close();
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 8d1450a..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-fix-prefix-variable.patch
-fix-initscript.patch
-fix-sighandler-return-code.patch
diff --git a/debian/rules b/debian/rules
index 4ef064a..8576118 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,4 +3,7 @@
dh $@ --with=systemd --sourcedirectory=src
override_dh_auto_configure:
- dh_auto_configure -- --ebuild-compat
+ dh_auto_configure -- --systemddir=/lib/systemd/system --ebuild-compat
+
+override_dh_installinit:
+ dh_installinit --onlyscripts
diff --git a/debian/tcpproxy.service b/debian/tcpproxy.service
deleted file mode 100644
index d5b0c66..0000000
--- a/debian/tcpproxy.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=tcp proxy server
-
-[Service]
-ExecStart=/usr/bin/tcpproxy -u tcpproxy -g tcpproxy -D
-ExecReload=/bin/kill -HUP $MAINPID
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target