From ef16cd47db9e779fa6e674217cab03d25fed7cf2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 5 Nov 2016 22:33:30 +0100 Subject: [PATCH] Simple Debian packaging --- Makefile | 5 +++++ README | 1 + config | 4 +++- debian/bouncer.docs | 1 + debian/bouncer.service | 9 +++++++++ debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 15 +++++++++++++++ debian/copyright | 9 +++++++++ debian/rules | 7 +++++++ 10 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 README create mode 100644 debian/bouncer.docs create mode 100644 debian/bouncer.service create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules diff --git a/Makefile b/Makefile index 7743cf8..178d1a7 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,9 @@ bouncer: bouncer.c clean: rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*` + rm -f bouncer +install: bouncer + install -d $(DESTDIR)/usr/sbin $(DESTDIR)/etc + install -m755 bouncer $(DESTDIR)/usr/sbin/ + install -m644 config $(DESTDIR)/etc/bouncer diff --git a/README b/README new file mode 100644 index 0000000..f255da7 --- /dev/null +++ b/README @@ -0,0 +1 @@ +This is Bouncer. More information to come. diff --git a/config b/config index e3c9873..10c72b6 100644 --- a/config +++ b/config @@ -1,3 +1,5 @@ +# Configuration of the bouncer daemon + Bouncer { # Socket through which we receive log messages @@ -23,7 +25,7 @@ MaxSuspects 1000 MaxBanned 1000 # We log all messages to the log stream configured below -# LogStream syslog +LogStream syslog # Names of ipsets we feed the banned addresses to # (you can omit either to disable processing of IPv4 or IPv6) diff --git a/debian/bouncer.docs b/debian/bouncer.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/bouncer.docs @@ -0,0 +1 @@ +README diff --git a/debian/bouncer.service b/debian/bouncer.service new file mode 100644 index 0000000..6faaa21 --- /dev/null +++ b/debian/bouncer.service @@ -0,0 +1,9 @@ +[Unit] +Description=Daemon for Turning Away Mischievous Guests +After=network.target + +[Service] +ExecStart=/usr/sbin/bouncer + +[Install] +Wanted=multi-user.target diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..55eb462 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +bouncer (0.9) unstable; urgency=medium + + * Initial release. + + -- Martin Mares Sat, 05 Nov 2016 21:55:11 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..08c06e4 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: bouncer +Section: net +Priority: extra +Maintainer: Martin Mares +Build-Depends: debhelper (>= 9.0), libucw-dev (>= 6.4), libipset-dev +Standards-Version: 3.9.8 + +Package: bouncer +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A daemon for turning away mischievous guests + The bouncer daemon monitors authentication logs and maintains an ipset + containing IP addresses of frequent sources of unsuccessful password + authentication. Usually, this ipset is plugged in iptables to block + such offenders. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9d35cab --- /dev/null +++ b/debian/copyright @@ -0,0 +1,9 @@ +This work is maintained and packaged for Debian by: + + Martin Mares + +Copyright: + + (c) 2016 Martin Mares + + Licensed under GPL v2 or newer diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..cd7c777 --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +%: + dh $@ -- 2.39.2