[postfwd] 68/96: use pod2man to generate the manpage

Jan Wagner waja at alioth.debian.org
Tue Nov 5 20:09:45 UTC 2013


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository postfwd.

commit e896c6dda43cbeb022f74d1f17445c26198efb2b
Author: Jan Wagner <waja at cyconet.org>
Date:   Mon Sep 26 12:07:57 2011 +0000

    use pod2man to generate the manpage
---
 debian/changelog                          |    4 +-
 debian/patches/00list                     |    1 -
 debian/patches/10_hapolicy_manpage.dpatch |  177 -----------------------------
 debian/rules                              |    1 +
 4 files changed, 3 insertions(+), 180 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e724c90..13805e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
 postfwd (1.30-1) UNRELEASED; urgency=low
 
   * New upstream release
-   - new parser enhancement allows to omit the trailing "\" for multi-line rules
+   - new parser enhancement is able to omit the trailing "\" for multi-line rules
    - new plugin interface (BETA)
    - Time::HiRes is used if available
    - multiple rate limits for the same items are supported now
@@ -13,7 +13,7 @@ postfwd (1.30-1) UNRELEASED; urgency=low
    - documentation updates and fixes
   * Suppress output on restarting via init script (Closes: #636782), thanks
     Martin F. Krafft for reporting
-  * Ship hapolicy
+  * Ship hapolicy and manpage
   * Reorganize documentation
    - Add new files from upstream to documentation
    - Add 10_hapolicy_manpage.dpatch to have a manpage for hapolicy
diff --git a/debian/patches/00list b/debian/patches/00list
index 5708b67..e69de29 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1 +0,0 @@
-10_hapolicy_manpage.dpatch
diff --git a/debian/patches/10_hapolicy_manpage.dpatch b/debian/patches/10_hapolicy_manpage.dpatch
deleted file mode 100755
index 6bcfdbb..0000000
--- a/debian/patches/10_hapolicy_manpage.dpatch
+++ /dev/null
@@ -1,177 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_hapolicy_manpage.dpatch by Jan Wagner <waja at cyconet.org>
-##
-## DP: Add manpage for hapolicy
-
- at DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' postfwd-1.30~/man/man8/hapolicy.1 postfwd-1.30/man/man8/hapolicy.1
---- postfwd-1.30~/man/man8/hapolicy.1	1970-01-01 01:00:00.000000000 +0100
-+++ postfwd-1.30/man/man8/hapolicy.1	2011-09-14 14:45:34.000000000 +0200
-@@ -0,0 +1,155 @@
-+.\"Text automatically generated by txt2man
-+.TH HAPOLICY 1 "2011-09-14" "" ""
-+.SH NAME
-+\fBhapolicy \fP- policy delegation high availability script
-+\fB
-+.SH SYNOPSIS
-+.nf
-+.fam C
-+  \fBhapolicy\fP [\fIOPTIONS\fP] \fB--service\fP=SERVICE1 [\fB--service\fP=SERVICE2 \.\.\.]
-+
-+.nf
-+.fam C
-+          Services:
-+          \fB-s\fP, \fB--service\fP <name>=<address>:<port>[:<prio>:<weight>:<timeout>]
-+
-+          Options:
-+          \fB-d\fP, \fB--default\fP <action>  \fIreturns\fP <action> \fIif\fP \fIno\fP \fIservice\fP \fIwas\fP \fIavailable\fP [default: 'dunno']
-+          \fB-l\fP, \fB--logging\fP           \fIlog\fP \fIrequests\fP
-+          \fB-v\fP, \fB--verbose\fP           \fIincrease\fP \fIlogging\fP \fIverbosity\fP
-+          \fB-L\fP, \fB--stdout\fP            \fIlog\fP \fIto\fP stdout, \fIfor\fP debugging, \fIdo\fP \fINOT\fP \fIuse\fP \fIwith\fP \fIpostfix\fP
-+
-+.fam T
-+.fi
-+.fam T
-+.fi
-+.SH DESCRIPTION
-+.SS  INTRODUCTION
-+\fBhapolicy\fP enables high availability, weighted loadbalancing and a
-+fallback action \fIfor\fP \fIpostfix\fP policy delegation services. Invoked via
-+\fIpostfix\fP spawn it acts as a wrapper that queries other policy servers via
-+tcp connection. The order of the \fIservice\fP queries can be influenced by
-+assigning a specific priority and weight \fIto\fP each \fIservice\fP. A \fIservice\fP is
-+considered 'failing', \fIif\fP the connection is refused or the specified
-+\fIservice\fP timeout is reached. If all of the configured policy services
-+were failing, \fBhapolicy\fP \fIreturns\fP a default action (e.g. dunno) \fIto\fP \fIpostfix\fP.
-+.PP
-+With version 1.00 \fBhapolicy\fP has less than 200 lines of perl code using
-+only standard perl modules. It does not require any disk access nor
-+configuration files and runs under an unpriviledged user account. This
-+should allow fast and reliable operation.
-+.SS  CONFIGURATION
-+A \fIservice\fP has the following attributes
-+.PP
-+.nf
-+.fam C
-+        "servicename"           => {
-+                   ip              => '127.0.0.1',         # ip address
-+                   port            => '10040',             # tcp port
-+                   prio            => '10',                # optional, lower wins
-+                   weight          => '1',                 # optional, for items with same prio (weighted round-robin), higher is better
-+                   timeout         => '30',                # optional, query timeout in seconds
-+        },
-+
-+.fam T
-+.fi
-+You may define multiple services at the command line. Which means that
-+.PP
-+.nf
-+.fam C
-+            hapolicy -s "grey1=10.0.0.1:10031:10" -s "grey2=10.0.0.2:10031:20"
-+
-+.fam T
-+.fi
-+will always try first \fIservice\fP *grey1* at ip 10.0.0.1 port 10031 and \fIif\fP
-+that \fIservice\fP is not \fIavailable\fP or does not answer within the default of
-+30 seconds the next \fIservice\fP *grey2* at ip 10.0.0.2 port 10031 will be
-+queried.
-+.PP
-+If you want \fIto\fP load balance connections you may define
-+.PP
-+.nf
-+.fam C
-+            hapolicy -s "polw1=10.0.0.1:12525:10:2" -s "polw2=10.0.0.2:12525:10:1"
-+
-+.fam T
-+.fi
-+which queries \fIservice\fP *polw1* at ip 10.0.0.1 twice as much as \fIservice\fP
-+*polw2* at ip 10.0.0.2. Note that this setup also ensures high
-+availability \fIfor\fP both services. If *polw1* is not \fIavailable\fP or does not
-+answer within the default of 30 seconds *polw2* will be queried and vice
-+versa. There is \fIno\fP reason \fIto\fP define a \fIservice\fP twice.
-+.SS  INTEGRATION
-+Enter the following at the bottom of your \fIpostfix\fP master.cf (usually
-+located at /etc/\fIpostfix\fP):
-+.PP
-+.nf
-+.fam C
-+            # service description, note the leading blanks at the second line
-+            127.0.0.1:10060 inet    n       n       n       -       0       spawn
-+              user=nobody argv=/usr/local/bin/hapolicy -l -s GREY1=10.0.0.1:10031:10 -s GREY2=10.0.0.2:10031:10
-+
-+.fam T
-+.fi
-+save the file and open \fIpostfix\fP main.cf. Modify it as follows:
-+.PP
-+.nf
-+.fam C
-+            127.0.0.1:10060_time_limit   = 3600
-+
-+            smtpd_recipient_restrictions =
-+                permit_mynetworks,
-+                \.\.\. other authed permits \.\.\.
-+                reject_unauth_destination,
-+                \.\.\. other restrictions \.\.\.
-+                check_policy_service inet:127.0.0.1:10060   # <- hapolicy query
-+
-+.fam T
-+.fi
-+Now issue '\fIpostfix\fP reload' at the command line. Of course you can have
-+more enhanced setups using \fIpostfix\fP restriction classes. Please see
-+"LINKS" \fIfor\fP further options.
-+.SH LINKS
-+[1] Postfix SMTP Access Policy Delegation
-+<http://www.postfix.org/SMTPD_POLICY_README.html>
-+.PP
-+[2] Postfix Per-Client/User/etc. Access Control
-+<http://www.postfix.org/RESTRICTION_CLASS_README.html>
-+.SH LICENSE
-+\fBhapolicy\fP is free software and released under BSD license, which
-+basically means that you can \fIdo\fP what you want as long as you keep the
-+copyright notice:
-+.PP
-+Copyright (c) 2008, Jan Peter Kessler All rights reserved.
-+.PP
-+Redistribution and \fIuse\fP in source and binary forms, \fIwith\fP or without
-+modification, are permitted provided that the following conditions are
-+met:
-+.RS
-+.IP \(bu 3
-+Redistributions of source code must retain the above copyright
-+notice, this list of conditions and the following disclaimer.
-+.IP \(bu 3
-+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 \fIwith\fP the
-+distribution.
-+.IP \(bu 3
-+Neither the name of the authors nor the names of his contributors
-+may be used \fIto\fP endorse or promote products derived from this
-+software without specific prior written permission.
-+.RE
-+.PP
-+THIS SOFTWARE IS PROVIDED BY ME ``AS IS'' AND ANY EXPRESS OR IMPLIED
-+WARRANTIES, INCLUDING, BUT \fINOT\fP LIMITED TO, THE IMPLIED WARRANTIES OF
-+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
-+NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \fINOT\fP 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.
-+.SH AUTHOR
-+Jan Peter Kessler <info (AT) postfwd (DOT) org>. Let me know, \fIif\fP you
-+have any suggestions.
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' postfwd-1.30~/tools/hapolicy/hapolicy.txt postfwd-1.30/tools/hapolicy/hapolicy.txt
---- postfwd-1.30~/tools/hapolicy/hapolicy.txt	2011-08-16 08:32:03.000000000 +0200
-+++ postfwd-1.30/tools/hapolicy/hapolicy.txt	2011-09-14 14:43:43.000000000 +0200
-@@ -8,7 +8,7 @@
-             -s, --service <name>=<address>:<port>[:<prio>:<weight>:<timeout>]
- 
-             Options:
--            -d, --default <action>  returns <action> if no service was available (default: 'dunno')
-+            -d, --default <action>  returns <action> if no service was available [default: 'dunno']
-             -l, --logging           log requests
-             -v, --verbose           increase logging verbosity
-             -L, --stdout            log to stdout, for debugging, do NOT use with postfix
diff --git a/debian/rules b/debian/rules
index 09338ac..a8c064d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,6 +25,7 @@ install: build
 	# install man page
 	mkdir -p debian/tmp/
 	cp man/man8/postfwd.8 debian/tmp/postfwd1.8
+	pod2man debian/postfwd/usr/sbin/hapolicy man/man8/hapolicy.1
 
 # Build architecture-independent files here.
 binary-indep: build install

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/postfwd.git



More information about the Pkg-perl-cvs-commits mailing list