--- bld-0.3.4.1.orig/debian/README.source +++ bld-0.3.4.1/debian/README.source @@ -0,0 +1,38 @@ +This package uses dpatch to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To get the fully patched source after unpacking the source package, cd +to the root level of the source package and run: + + debian/rules patch + +Removing a patch is as simple as removing its entry from the +debian/patches/00list file, and please also remove the patch file +itself. + +Creating a new patch is done with "dpatch-edit-patch patch XX_patchname" +where you should replace XX with a new number and patchname with a +descriptive shortname of the patch. You can then simply edit all the +files your patch wants to edit, and then simply "exit 0" from the shell +to actually create the patch file. + +To tweak an already existing patch, call "dpatch-edit-patch XX_patchname" +and replace XX_patchname with the actual filename from debian/patches +you want to use. + +To clean up afterwards again, "debian/rules unpatch" will do the +work for you - or you can of course choose to call +"fakeroot debian/rules clean" all together. + + +--- + +this documentation is part of dpatch package, and may be used by +packages using dpatch to comply with policy on README.source. This +documentation is meant to be useful to users who are not proficient in +dpatch in doing work with dpatch-based packages. Please send any +improvements to the BTS of dpatch package. + +original text by Gerfried Fuchs, edited by Junichi Uekawa +10 Aug 2008. --- bld-0.3.4.1.orig/debian/bld-postfix.dirs +++ bld-0.3.4.1/debian/bld-postfix.dirs @@ -0,0 +1,3 @@ +usr/sbin +usr/share/man/man8 +usr/share/doc/bld-postfix --- bld-0.3.4.1.orig/debian/bld-postfix.docs +++ bld-0.3.4.1/debian/bld-postfix.docs @@ -0,0 +1 @@ +README.postfix --- bld-0.3.4.1.orig/debian/bld-tools.dirs +++ bld-0.3.4.1/debian/bld-tools.dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/share/man/man8 --- bld-0.3.4.1.orig/debian/bld.dirs +++ bld-0.3.4.1/debian/bld.dirs @@ -0,0 +1,3 @@ +usr/sbin +usr/share/man/man5 +usr/share/man/man8 --- bld-0.3.4.1.orig/debian/bld.docs +++ bld-0.3.4.1/debian/bld.docs @@ -0,0 +1,2 @@ +README +TODO --- bld-0.3.4.1.orig/debian/bld.init +++ bld-0.3.4.1/debian/bld.init @@ -0,0 +1,59 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bld +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +# +# Version: Fri Aug 27 08:24:38 CEST 2004 +# Cyril Bouthors +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/bld +NAME=bld +DESC='Black List Daemon' +DAEMON_OPTS= +USER=bld + +test -x $DAEMON || exit 0 + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + mkdir -p /var/run/bld + chown -R $USER:$USER /var/run/bld + start-stop-daemon --start --quiet --pidfile /var/run/bld/$NAME.pid \ + --exec $DAEMON --chuid $USER -- $DAEMON_OPTS + echo "$NAME." + ;; + + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/bld/$NAME.pid \ + --user $USER + echo "$NAME." + ;; + + restart|reload|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/bld/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/bld/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- bld-0.3.4.1.orig/debian/bld.logcheck.ignore.server +++ bld-0.3.4.1/debian/bld.logcheck.ignore.server @@ -0,0 +1,4 @@ +bld\[[0-9]+\]: ([0-9]+\.){3}[0-9]+ (\(wl\) ){0,1}(decremen|submit|inser)ted by ([0-9]+\.){3}[0-9]+ +bld\[[0-9]+\]: ([0-9]+\.){3}[0-9]+ put in bl: +bld\[[0-9]+\]: notified .+:.+ about ([0-9]+\.){3}[0-9]+ +bld\[[0-9]+\]: request for a blacklisted IP: ([0-9]+\.){3}[0-9]+ --- bld-0.3.4.1.orig/debian/bld.postinst +++ bld-0.3.4.1/debian/bld.postinst @@ -0,0 +1,16 @@ +#!/bin/sh + +# Inspired by openssh-3.8.1p1/debian/postinst +# Cyril Bouthors +# Thu Dec 30 18:17:23 EAT 2004 + +set -e + +user=bld + +if ! getent passwd $user >/dev/null +then + adduser --quiet --system --no-create-home --home /var/run/$user --group $user +fi + +#DEBHELPER# --- bld-0.3.4.1.orig/debian/bld.postrm +++ bld-0.3.4.1/debian/bld.postrm @@ -0,0 +1,18 @@ +#!/bin/sh -e + +# Inspired by openssh-3.8.1p1/debian/postinst +# Cyril Bouthors +# Thu Dec 30 18:17:23 EAT 2004 + +#DEBHELPER# + +set -e + +user=bld + +if [ "$1" = "purge" ] +then + deluser --quiet $user > /dev/null || true +fi + +exit 0 --- bld-0.3.4.1.orig/debian/changelog +++ bld-0.3.4.1/debian/changelog @@ -0,0 +1,107 @@ +bld (0.3.4.1-4build1) bionic; urgency=high + + * No change rebuild to pick up -fPIE compiler default + + -- Balint Reczey Tue, 03 Apr 2018 12:15:01 +0000 + +bld (0.3.4.1-4) unstable; urgency=low + + [ SevenMachines ] + * debian/bld.postinst: drop creation and ownership changes of /var/run/bld, + this is now handled by init script (Closes: #557084) + * debian/bld.init: add ownership change of /var/run/bld + + [ Martin Meredith ] + * Sponsored Upload for SevenMachines + * Bumped Standards Version + * Added README.source (from /usr/share/doc/dpatch/README.source.gz) + + -- Martin Meredith Fri, 20 Nov 2009 00:18:56 +0000 + +bld (0.3.4.1-3) unstable; urgency=low + + * Changed priority back to optional, and changed the priority to extra + only for bld-postfix + + -- Martin Meredith Sat, 18 Apr 2009 17:53:03 +0100 + +bld (0.3.4.1-2) unstable; urgency=low + + * Added Watch file + * Updated init script to create /var/run/bld + * Updated to Standards Version 3.8.1 + * Changed priority to extra to comply with policy section 2.5 + + -- Martin Meredith Sun, 12 Apr 2009 17:20:55 +0100 + +bld (0.3.4.1-1) unstable; urgency=low + + * New upstream release (Closes: #434151 + * New Maintainer (Closes: #500348) + * Fixed minor Lintian Errors + * Bumped to Debhelper 7 + * Bumped to Standards 3.8.0 + * Applied half a patch to fix potential core dump, other half has been + fixed upstream. Thanks to Oleg Milaenko + (Closes: #330921) + * Fixed stripping issues (Closes: #436592) + + -- Martin Meredith Sat, 14 Feb 2009 12:19:31 +0000 + +bld (0.3.2-3.2) unstable; urgency=low + + * Non-maintainer upload. + * Added LSB formatted dependency info in init.d script (closes: #468374) + + -- Peter Eisentraut Wed, 02 Apr 2008 00:48:32 +0200 + +bld (0.3.2-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix bashisms in debian/rules. (Closes: #374454) + * Fix spelling mistakes in package descriptions + (Closes: #363181, #363184, #363186) + + -- Lucas Nussbaum Mon, 14 Jan 2008 13:26:59 +0100 + +bld (0.3.2-3) unstable; urgency=low + + * debian/bld.postinst, debian/bld.postrm, debian/bld.init: run the + daemon as an unprivileged user, bld instead of root thanks to a + contribution from Samuel Tardieu (closes: #287757). + + -- Cyril Bouthors Thu, 30 Dec 2004 18:15:37 +0300 + +bld (0.3.2-2) unstable; urgency=low + + * debian/bld.logcheck.ignore.server: added that file for better logcheck + support thanks to a contribution from "Omniflux" and Olivier Beyssac + (closes: #285327). + * debian/control: nicely updated descriptions thanks to Martin Schulze. + + -- Cyril Bouthors Tue, 14 Dec 2004 11:52:50 +0300 + +bld (0.3.2-1) unstable; urgency=low + + * New upstream release + * Split into the packages bld, bld-postfix and bld-tools. + + -- Cyril Bouthors Mon, 22 Nov 2004 18:50:12 +0300 + +bld (0.3.0-1) unstable; urgency=low + + * New upstream release + + -- Cyril Bouthors Wed, 20 Oct 2004 01:52:16 +0200 + +bld (0.2.4-1) unstable; urgency=low + + * New upstream release + + -- Cyril Bouthors Wed, 29 Sep 2004 16:38:08 +0200 + +bld (0.2.2-1) unstable; urgency=low + + * Initial Release. + + -- Cyril Bouthors Fri, 27 Aug 2004 07:29:42 +0200 --- bld-0.3.4.1.orig/debian/compat +++ bld-0.3.4.1/debian/compat @@ -0,0 +1 @@ +7 --- bld-0.3.4.1.orig/debian/control +++ bld-0.3.4.1/debian/control @@ -0,0 +1,54 @@ +Source: bld +Section: admin +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Martin Meredith +Build-Depends: debhelper (>= 7.0.0), dpatch +Standards-Version: 3.8.3 +Homepage: http://bld.r14.freenix.org/ + +Package: bld +Architecture: any +Depends: ${shlibs:Depends}, adduser +Suggests: bld-tools, bld-postfix +Description: Black List Daemon, automatically build blacklists + BLD stands for "black list daemon" and is intended to build blacklists + using simple rules based on a maximum number of submissions of the same + IP address during a minimum time interval. BLD was primarily designed to + fight against dictionary-based spams (by making the MTA report to BLD + any host that tries to send a mail to an unknown user) but can be used + by any application that needs a blacklist based on connection rate + limits. + . + This package contains the server. + +Package: bld-postfix +Priority: extra +Architecture: any +Depends: ${shlibs:Depends}, postfix +Recommends: bld (= ${source:Version}) +Description: Postfix tools for the Black List Daemon + BLD stands for "black list daemon" and is intended to build blacklists + using simple rules based on a maximum number of submissions of the same + IP address during a minimum time interval. BLD was primarily designed to + fight against dictionary-based spams (by making the MTA report to BLD + any host that tries to send a mail to an unknown user) but can be used + by any application that needs a blacklist based on connection rate + limits. + . + This package contains the tools dedicated to Postfix. + +Package: bld-tools +Architecture: any +Depends: ${shlibs:Depends} +Recommends: bld (= ${source:Version}) +Description: Generic tools for Black List Daemon + BLD stands for "black list daemon" and is intended to build blacklists + using simple rules based on a maximum number of submissions of the same + IP address during a minimum time interval. BLD was primarily designed to + fight against dictionary-based spams (by making the MTA report to BLD + any host that tries to send a mail to an unknown user) but can be used + by any application that needs a blacklist based on connection rate + limits. + . + This package contains additional tools to be used with bld. --- bld-0.3.4.1.orig/debian/copyright +++ bld-0.3.4.1/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Cyril Bouthors on +Fri, 27 Aug 2004 07:29:42 +0200. + +It was downloaded from http://www.online.redhate.org/bld/ + +Upstream Author: Olivier Beyssac + +Copyright: + +Copyright (c) 2004 Free (Olivier Beyssac) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. --- bld-0.3.4.1.orig/debian/patches/00list +++ bld-0.3.4.1/debian/patches/00list @@ -0,0 +1,3 @@ +01-fix_potential_core_dump +02-fix_strip +03-remove_extensions_from_README.postfix --- bld-0.3.4.1.orig/debian/patches/01-fix_potential_core_dump.dpatch +++ bld-0.3.4.1/debian/patches/01-fix_potential_core_dump.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01-fix_potential_core_dump.dpatch by Oleg Milaenko +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix Potential Core dump + +@DPATCH@ +diff -urNad bld-0.3.4.1~/postfix_policy.c bld-0.3.4.1/postfix_policy.c +--- bld-0.3.4.1~/postfix_policy.c 2009-02-14 12:40:19.000000000 +0000 ++++ bld-0.3.4.1/postfix_policy.c 2009-02-14 12:54:29.000000000 +0000 +@@ -128,7 +128,7 @@ + printf("action=%s\n\n", action); + fflush(stdout); + if (verbose) +- syslog(LOG_INFO, "%s: %s", ip, action); ++ syslog(LOG_INFO, "%s: %s", ip ? ip : "(null)", action); + + if (ip) free(ip); + break; --- bld-0.3.4.1.orig/debian/patches/02-fix_strip.dpatch +++ bld-0.3.4.1/debian/patches/02-fix_strip.dpatch @@ -0,0 +1,25 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02-fix_strip.dpatch by Martin Meredith +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Removes stripping lines from the Makefile.in. + +@DPATCH@ +diff -urNad bld-0.3.4.1~/Makefile.in bld-0.3.4.1/Makefile.in +--- bld-0.3.4.1~/Makefile.in 2008-07-02 23:48:11.000000000 +0100 ++++ bld-0.3.4.1/Makefile.in 2009-02-14 12:47:29.000000000 +0000 +@@ -43,14 +43,10 @@ + install: all + [ -d $(DESTDIR)$(sbindir) ] || mkdir -p $(DESTDIR)$(sbindir) + cp $(PROGNAME) $(READERNAME) $(POLICYNAME) $(UTILS) $(DESTDIR)$(sbindir) +- strip $(DESTDIR)$(sbindir)/$(PROGNAME) +- strip $(DESTDIR)$(sbindir)/$(READERNAME) +- strip $(DESTDIR)$(sbindir)/$(POLICYNAME) + cp $(SUBMITNAME) $(DESTDIR)$(sbindir) \ + && (cd $(DESTDIR)$(sbindir) && ln -s $(SUBMITNAME) $(QUERYNAME)) \ + && (cd $(DESTDIR)$(sbindir) && ln -s $(SUBMITNAME) $(INSERTNAME)) \ + && (cd $(DESTDIR)$(sbindir) && ln -s $(SUBMITNAME) $(DECRNAME)) +- strip $(DESTDIR)$(sbindir)/$(SUBMITNAME) + [ -d $(DESTDIR)$(mandir)/man8 ] || mkdir -p $(DESTDIR)$(mandir)/man8 + $(GZIP) -c bld.8 > $(DESTDIR)$(mandir)/man8/bld.8.gz + $(GZIP) -c bldread.8 > $(DESTDIR)$(mandir)/man8/bldread.8.gz --- bld-0.3.4.1.orig/debian/patches/03-remove_extensions_from_README.postfix.dpatch +++ bld-0.3.4.1/debian/patches/03-remove_extensions_from_README.postfix.dpatch @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03-remove_extensions_from_README.postfix.dpatch by Martin Meredith +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Removes the .pl extensions from README.postfix. + +@DPATCH@ +diff -urNad bld-0.3.4.1~/README.postfix bld-0.3.4.1/README.postfix +--- bld-0.3.4.1~/README.postfix 2008-07-02 23:49:44.000000000 +0100 ++++ bld-0.3.4.1/README.postfix 2009-02-14 13:16:12.000000000 +0000 +@@ -5,15 +5,15 @@ + + Feeding BLD + To submit IP addresses to BLD, you have to read your mail logs with +- a small script named bld-pf_log.pl. Basically, it takes any ++ a small script named bld-pf_log. Basically, it takes any + line logging a "User unknown" reject and sends the IP address of the + SMTP client to BLD. + + On FreeBSD, you can do it with something like this: +- tail -c0 -F /var/log/maillog | bld-pf_log.pl ++ tail -c0 -F /var/log/maillog | bld-pf_log + + If you use Linux or more generally GNU tail, this would be: +- tail -c0 --follow=name /var/log/mail.log | bld-pf_log.pl ++ tail -c0 --follow=name /var/log/mail.log | bld-pf_log + Of course, you'll have to replace /var/log/mail.log with the file + that keeps logs of "user unkown" errors. + +@@ -28,18 +28,18 @@ + Using BLD from Postfix + This is easy if you have Postfix 2.1 or a later version thanks to + the policy server. If you don't, you can have a look at the +- bld2zone.pl script that generates a RBL zone file from BLD dumps. ++ bld2zone script that generates a RBL zone file from BLD dumps. + The problem with this method is that potential dictionary-spammers + won't be rejected until the RBL zone is reloaded. + + If you run Postfix 2.1, though, BLD is really simple to use as a + policy server. It works just like the greylist mechanism implemented +- by the greylist.pl distributed with Postfix source code (more +- precisely, the following script is written from greylist.pl). ++ by the greylist distributed with Postfix source code (more ++ precisely, the following script is written from greylist). + + You'll only have to put these lines in your master.cf file: + bld-policy unix - n n - - spawn +- user=nobody argv=/usr/bin/perl /usr/local/sbin/bld-pf_policy.pl ++ user=nobody argv=/usr/bin/perl /usr/local/sbin/bld-pf_policy + + Alternative: + If you prefer using a binary compiled for your platform, you can try --- bld-0.3.4.1.orig/debian/rules +++ bld-0.3.4.1/debian/rules @@ -0,0 +1,93 @@ +#!/usr/bin/make -f + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: patch configure + dh_testdir + CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc/bld + +build: build-stamp + +build-stamp: config.status + dh_testdir + $(MAKE) + touch build-stamp + +clean: clean-patched unpatch +clean-patched: + dh_testdir + dh_testroot + rm -f build-stamp + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs +# bld + $(MAKE) install prefix=$(CURDIR)/debian/bld/usr + + +# bld-postfix + mv -v debian/bld/usr/sbin/bld-pf_policy debian/bld-postfix/usr/sbin/bld-pf_policy + -rm -f debian/bld/usr/sbin/bld-pf_policy.pl + mv -v debian/bld/usr/share/man/man8/bld-pf_policy.8.gz debian/bld-postfix/usr/share/man/man8/bld-pf_policy.8.gz + mv -v debian/bld/usr/sbin/bld-pf_log.pl debian/bld-postfix/usr/sbin/bld-pf_log + mv -v debian/bld/usr/share/man/man8/bld-pf_log.pl.8.gz debian/bld-postfix/usr/share/man/man8/bld-pf_log.8.gz + +# bld-tools + + for i in bldsubmit bldquery bldinsert blddecr; do \ + mv -v "debian/bld/usr/sbin/$$i" debian/bld-tools/usr/sbin/ ; \ + mv -v "debian/bld/usr/share/man/man8/$$i.8.gz" debian/bld-tools/usr/share/man/man8 ; \ + done + mv -v debian/bld/usr/sbin/bld-mrtg.pl debian/bld-tools/usr/sbin/bld-mrtg + mv -v debian/bld/usr/share/man/man8/bld-mrtg.pl.8.gz debian/bld-tools/usr/share/man/man8/bld-mrtg.8.gz + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installinit + dh_installman + dh_installlogcheck + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +patch: patch-stamp +patch-stamp: + dpatch apply-all + dpatch cat-all > patch-stamp + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + + + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- bld-0.3.4.1.orig/debian/watch +++ bld-0.3.4.1/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://bld.r14.freenix.org/Home/Download /Home/Download/bld-(.*).tar.gz.* debian uupdate