NetBSD Problem Report #42847

From www@NetBSD.org  Fri Feb 19 13:34:36 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D581563C142
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 Feb 2010 13:34:35 +0000 (UTC)
Message-Id: <20100219133435.7246863B8DE@www.NetBSD.org>
Date: Fri, 19 Feb 2010 13:34:35 +0000 (UTC)
From: netbsd@eq.cz
Reply-To: netbsd@eq.cz
To: gnats-bugs@NetBSD.org
Subject: bulk build: add support for sending email report through postfix
X-Send-Pr-Version: www-1.0

>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
>Last-Modified:  Wed Jun 16 23:23:11 +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

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Fri, 19 Feb 2010 14:06:14 +0000
Responsible-Changed-Why:
joerg, can you please take a look at this?


From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42847 (bulk build: add support for sending email report
 through postfix)
Date: Fri, 19 Feb 2010 15:19:16 +0100

 On Fri, Feb 19, 2010 at 02:06:15PM +0000, wiz@NetBSD.org wrote:
 > Synopsis: bulk build: add support for sending email report through postfix
 > 
 > Responsible-Changed-From-To: pkg-manager->joerg
 > Responsible-Changed-By: wiz@NetBSD.org
 > Responsible-Changed-When: Fri, 19 Feb 2010 14:06:14 +0000
 > Responsible-Changed-Why:
 > joerg, can you please take a look at this?

 I don't know or care about the sandbox code for the old bulk build
 framework. For pbulk, I would simply recomment installing ssmtp in the
 chroot.

 Joerg

Responsible-Changed-From-To: joerg->pkg-manager
Responsible-Changed-By: joerg@NetBSD.org
Responsible-Changed-When: Wed, 16 Jun 2010 23:23:11 +0000
Responsible-Changed-Why:
Not my area of interest, assign back to role account.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.