pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42847: bulk build: add support for sending email report through postfix



>Number:         42847
>Category:       pkg
>Synopsis:       bulk build: add support for sending email report through 
>postfix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 19 13:35:00 +0000 2010
>Originator:     rudolf
>Release:        netbsd-5
>Organization:
>Environment:
NetBSD 5.0_STABLE i386
>Description:
The /usr/pkgsrc/mk/bulk/mksandbox script does not mount the main system's 
postfix directories to the sandbox and thus the bulk build script can't send 
email from sandbox through the postfix.

Attached patch adds the following to the mksandbox script:
Mount /var/spool/postfix read-only to the sandbox and then mount 
/var/spool/postfix/maildrop read-write to the sandbox. This allows sending the 
final email report through the postfix.

>How-To-Repeat:

>Fix:
--- mk/bulk/mksandbox.orig      2010-02-12 19:29:49.000000000 +0100
+++ mk/bulk/mksandbox   2010-02-12 19:31:10.000000000 +0100
@@ -46,6 +46,7 @@
 
 kernel=""
 sandboxMountDirs="/bin /sbin /lib /libexec /usr/X11R7 /usr/bin /usr/games 
/usr/include /usr/lib /usr/libdata /usr/libexec /usr/lkm /usr/share /usr/sbin 
/var/mail"
+sandboxAfterMountRWDirs=
 sandboxEmptyDirs="/var/run /var/log /var/spool/lock /var/spool/mqueue"
 sandboxEmptyFiles="/var/run/utmp /var/run/utmpx /var/log/wtmp /var/log/wtmpx 
/var/log/lastlog /var/log/lastlogx"
 
@@ -118,6 +119,8 @@
        sedprog=/usr/bin/sed
        need_src=yes
        need_xsrc=yes
+       sandboxMountDirs="$sandboxMountDirs /var/spool/postfix"
+       sandboxAfterMountRWDirs="/var/spool/postfix/maildrop"
        ;;
 SunOS)
        bmakeprog=bmake
@@ -274,6 +277,13 @@
        echo "$d $d ro \\" >> $sandbox_script
 done
 
+for d in $sandboxAfterMountRWDirs; do
+       test -d $d -a -d $sandbox$d || continue;
+       echo "Mount $d from $sandbox"
+       $mountprog $mountflags $d $sandbox$d;
+       echo "$d $d rw \\" >> $sandbox_script
+done
+
 echo "Making /tmp in $sandbox"
 $mkdirprog $sandbox/tmp $sandbox/var/tmp
 $chmodprog 1777 $sandbox/tmp $sandbox/var/tmp


Home | Main Index | Thread Index | Old Index