r313 - in packages/libmail-audit-perl/trunk/debian: . patches

S. Zachariah Sprackett zacs-guest@haydn.debian.org
Sun, 19 Sep 2004 08:45:53 -0600


Author: zacs-guest
Date: 2004-09-19 08:45:47 -0600 (Sun, 19 Sep 2004)
New Revision: 313

Added:
   packages/libmail-audit-perl/trunk/debian/patches/
   packages/libmail-audit-perl/trunk/debian/patches/00list
   packages/libmail-audit-perl/trunk/debian/patches/accept_to_var-mail.dpatch
Modified:
   packages/libmail-audit-perl/trunk/debian/changelog
   packages/libmail-audit-perl/trunk/debian/control
   packages/libmail-audit-perl/trunk/debian/rules
Log:
moved to dpatch
added accept to /var/mail/ patch


Modified: packages/libmail-audit-perl/trunk/debian/changelog
===================================================================
--- packages/libmail-audit-perl/trunk/debian/changelog	2004-09-15 15:48:24 UTC (rev 312)
+++ packages/libmail-audit-perl/trunk/debian/changelog	2004-09-19 14:45:47 UTC (rev 313)
@@ -1,3 +1,10 @@
+libmail-audit-perl (2.1-6) unstable; urgency=low
+
+  * Set up rules for dpatch
+  * Added patch to move delivery from /var/spool/mail to /var/mail (Closes: #272303)
+
+ -- S. Zachariah Sprackett <zac@sprackett.com>  Sun, 19 Sep 2004 10:40:12 -0400
+
 libmail-audit-perl (2.1-5) unstable; urgency=low
 
   * Add missing dependency on libmail-listdetector-perl (Closes: #269364)

Modified: packages/libmail-audit-perl/trunk/debian/control
===================================================================
--- packages/libmail-audit-perl/trunk/debian/control	2004-09-15 15:48:24 UTC (rev 312)
+++ packages/libmail-audit-perl/trunk/debian/control	2004-09-19 14:45:47 UTC (rev 313)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
 Uploaders: Daniel Ruoso <daniel@ruoso.com>, S. Zachariah Sprackett <zac@sprackett.com>
-Build-Depends-Indep: debhelper (>> 3.0.0), perl (>= 5.6.0-16), perl-modules
+Build-Depends-Indep: debhelper (>> 3.0.0), perl (>= 5.6.0-16), perl-modules, dpatch
 Standards-Version: 3.6.1
 
 Package: libmail-audit-perl

Added: packages/libmail-audit-perl/trunk/debian/patches/00list
===================================================================
--- packages/libmail-audit-perl/trunk/debian/patches/00list	2004-09-15 15:48:24 UTC (rev 312)
+++ packages/libmail-audit-perl/trunk/debian/patches/00list	2004-09-19 14:45:47 UTC (rev 313)
@@ -0,0 +1 @@
+accept_to_var-mail

Added: packages/libmail-audit-perl/trunk/debian/patches/accept_to_var-mail.dpatch
===================================================================
--- packages/libmail-audit-perl/trunk/debian/patches/accept_to_var-mail.dpatch	2004-09-15 15:48:24 UTC (rev 312)
+++ packages/libmail-audit-perl/trunk/debian/patches/accept_to_var-mail.dpatch	2004-09-19 14:45:47 UTC (rev 313)
@@ -0,0 +1,65 @@
+#! /bin/sh -e
+## accept_to_var-mail.dpatch by S. Zachariah Sprackett <zac@sprackett.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Convert /var/spool/mail/ access to /var/mail/ access per debian 
+## DP: policy 12.6
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p1 ${patch_opts} < $0;;
+    -unpatch) patch -R -p1 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/zsprackett/debian/libmail-audit-perl-2.1.working/Audit.pm libmail-audit-perl-2.1.working/Audit.pm
+--- /home/zsprackett/debian/libmail-audit-perl-2.1.working/Audit.pm	2004-09-18 22:20:01.000000000 -0400
++++ libmail-audit-perl-2.1.working/Audit.pm	2004-09-18 22:42:12.000000000 -0400
+@@ -185,7 +185,7 @@
+     $self->{_audit_opts}->{'noexit'} ||= 0;
+     $self->{_audit_opts}->{'interpolate_strftime'} ||= 0;
+ 
+-    my $default_mbox = ($ENV{MAIL} || ( grep { -d $_ } qw(/var/spool/mail/ /var/mail/) )[0] . getpwuid($>));
++    my $default_mbox = ($ENV{MAIL} || ( grep { -d $_ } qw(/var/mail/ /var/spool/mail/) )[0] . getpwuid($>));
+     $self->{_default_mbox} = $default_mbox;
+     $self->{_audit_opts}->{'emergency'} ||= $default_mbox;
+ 
+@@ -200,10 +200,10 @@
+ 
+ You can choose to accept the mail into a mailbox by calling
+ the C<accept> method; with no argument, this accepts to
+-F</var/spool/mail/you>. The mailbox is opened append-write,
++F</var/mail/you>. The mailbox is opened append-write,
+ then locked F<LOCK_EX>, the mail written and then the
+ mailbox unlocked and closed.  If Mail::Audit sees that you
+-have a maildir style system, where F</var/spool/mail/you> is
++have a maildir style system, where F</var/mail/you> is
+ a directory, it'll deliver in maildir style.  If the path
+ you specify does not exist, Mail::Audit will assume mbox,
+ unless it ends in /, which means maildir.
+@@ -899,11 +899,11 @@
+ 
+ =head1 CAVEATS
+ 
+-If your mailbox file in /var/spool/mail/ doesn't already
++If your mailbox file in /var/mail/ doesn't already
+ exist, you may need to use your standard system MDA to
+ create it.  After it's been created, Mail::Audit should be
+ able to append to it.  Mail::Audit may not be able to create
+-/var/spool/mail because programs run from .forward don't
++/var/mail because programs run from .forward don't
+ inherit the special permissions needed to create files in
+ that directory.
+ 


Property changes on: packages/libmail-audit-perl/trunk/debian/patches/accept_to_var-mail.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/libmail-audit-perl/trunk/debian/rules
===================================================================
--- packages/libmail-audit-perl/trunk/debian/rules	2004-09-15 15:48:24 UTC (rev 312)
+++ packages/libmail-audit-perl/trunk/debian/rules	2004-09-19 14:45:47 UTC (rev 313)
@@ -8,13 +8,17 @@
 # This is the debhelper compatability version to use.
 export DH_COMPAT=3
 
+# the dbs rules
+include /usr/share/dpatch/dpatch.make
+
+
 ifndef PERL
 	PERL = /usr/bin/perl
 endif
 
 package = libmail-audit-perl
 
-build: build-stamp
+build: patch-stamp build-stamp
 build-stamp:
 	dh_testdir
 
@@ -23,10 +27,10 @@
 
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp configure-stamp
+	rm -f build-stamp
 
 	-$(MAKE) realclean