From ubergeek@terrafirma.cstone.net Fri Jul  9 21:39:44 1999
Return-Path: <ubergeek@terrafirma.cstone.net>
Received: from terrafirma.cstone.net (terrafirma.cstone.net [205.197.102.33])
	by hub.freebsd.org (Postfix) with ESMTP id AAEEC14ECB
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Jul 1999 21:39:40 -0700 (PDT)
	(envelope-from ubergeek@terrafirma.cstone.net)
Received: (from ubergeek@localhost)
	by terrafirma.cstone.net (8.9.3/8.9.2) id AAA17647;
	Sat, 10 Jul 1999 00:40:05 -0400 (EDT)
	(envelope-from ubergeek)
Message-Id: <199907100440.AAA17647@terrafirma.cstone.net>
Date: Sat, 10 Jul 1999 00:40:05 -0400 (EDT)
From: adrian@ubergeeks.com
Sender: ubergeek@terrafirma.cstone.net
Reply-To: adrian@ubergeeks.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: cyrus packing list is incomplete
X-Send-Pr-Version: 3.2

>Number:         12584
>Category:       ports
>Synopsis:       directories made during 'make install' are not in the package
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    stb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul  9 21:40:01 PDT 1999
>Closed-Date:    Wed Dec 29 00:35:43 PST 1999
>Last-Modified:  Wed Dec 29 00:36:07 PST 1999
>Originator:     Adrian Filipi-Martin
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
Ubergeeks Consulting
>Environment:

	3.2-R with ports from -STABLE as of 7/8/99.

>Description:

	Several directories are made during the 'make install' target of the port
	that are not also made when installing the package.

>How-To-Repeat:

	Make the package, remove it.  Remove /usr/local/etc/imap*, /var/pwcheck
	and /var/spool/imap.  Then install the package.  Notice the absence of
	these directories.

>Fix:
	
	Apply the following patch which adds the necessary commands to the
	package packing list.  (Note, this could probably be done in a
	cleaner manner, but this works.)

--- Makefile.orig	Fri Jul  9 18:17:26 1999
+++ Makefile	Sat Jul 10 00:12:12 1999
@@ -59,14 +59,15 @@
 			${PREFIX}/share/doc/cyrus/html
 		@${ECHO} share/doc/cyrus/html/${file}.html >>${TMPPLIST}
 .endfor
-		@${ECHO} "@dirrm share/doc/cyrus/html"
-		@${ECHO} "@dirrm share/doc/cyrus"
+		@${ECHO} "@dirrm share/doc/cyrus/html" >>${TMPPLIST}
+		@${ECHO} "@dirrm share/doc/cyrus" >>${TMPPLIST}
 .endif
 		${INSTALL_DATA} ${FILESDIR}/imapd.conf \
 			${PREFIX}/etc/imapd.conf.dist
 		${INSTALL_DATA} ${FILESDIR}/inetd.conf.cyrus \
 			${PREFIX}/etc/
-		${INSTALL} -d -m 750 -o cyrus -g cyrus /var/spool/imap \
+		${INSTALL} -d -m 750 -o cyrus -g cyrus \
+			/var/spool/imap \
 			${PREFIX}/etc/imap \
 			${PREFIX}/etc/imap/user \
 			${PREFIX}/etc/imap/quota \
@@ -76,6 +77,25 @@
 		${INSTALL} -d -m 700 -o cyrus -g cyrus /var/pwcheck
 		${TOUCH} ${PREFIX}/etc/imap/mailboxes
 		chmod 640 ${PREFIX}/etc/imap/mailboxes
+		chown cyrus:cyrus ${PREFIX}/etc/imap/mailboxes
+		@${ECHO} "@exec mkdir %D/etc/imap" >>${TMPPLIST}
+.for dir in user quota proc log msg
+		@${ECHO} "@exec mkdir %D/etc/imap/${dir}" >>${TMPPLIST}
+		@${ECHO} "@dirrm etc/imap/${dir}" >>${TMPPLIST}
+.endfor
+		@${ECHO} "@exec cp /dev/null %D/etc/imap/mailboxes" >>${TMPPLIST}
+		@${ECHO} "@exec chown -R cyrus:cyrus %D/etc/imap" >>${TMPPLIST}
+		@${ECHO} "@exec chmod -R g-w,o= %D/etc/imap" >>${TMPPLIST}
+		@${ECHO} "@mode u=rwx,go=" >>${TMPPLIST}
+		@${ECHO} "@exec mkdir /var/pwcheck" >>${TMPPLIST}
+		@${ECHO} "@exec chown cyrus:cyrus /var/pwcheck" >>${TMPPLIST}
+		@${ECHO} "@exec chmod go= /var/pwcheck" >>${TMPPLIST}
+		@${ECHO} "@exec mkdir /var/spool/imap" >>${TMPPLIST}
+		@${ECHO} "@exec chown cyrus:cyrus /var/spool/imap" >>${TMPPLIST}
+		@${ECHO} "@exec chmod g-w,o= /var/spool/imap" >>${TMPPLIST}
+		@${ECHO} "@cwd /var" >>${TMPPLIST}
+		@${ECHO} "@dirrm pwcheck" >>${TMPPLIST}
+		@${ECHO} "@dirrm spool/imap" >>${TMPPLIST}
 		@sed -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/cyrus.sh \
 			>${PREFIX}/etc/rc.d/cyrus.sh
 		@chmod 0755 ${PREFIX}/etc/rc.d/cyrus.sh

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->stb 
Responsible-Changed-By: cpiazza 
Responsible-Changed-When: Sat Jul 10 19:33:15 PDT 1999 
Responsible-Changed-Why:  
Over to maintainer 

From: Stefan Bethke <stefan.bethke@hanse.de>
To: freebsd-gnats-submit@freebsd.org, adrian@ubergeeks.com
Cc:  
Subject: Re: ports/12584: directories made during 'make install' are not in the package
Date: Sun, 11 Jul 1999 17:27:58 +0100

 Adrian,
 
 you're mostly right, the port's a mess. It'll take me some more weeks to
 have the opportunity to clean it up and update to the current version). I
 just moved from Hamburg to London, and hopefully, I'll have a usable
 FreeBSD machine here in a couple of days,
 
 One point about your patch: @dirrm will only remove the directory itself,
 not it's contents, so @dirrm'ing /var/spool/imap and pwcheck will only
 produce warnings on removing the package. On the other hand, I definitely
 expect my mailspool to stay around even if I choose to remove the package.
 
 
 Cheers,
 Stefan
 
 --
 Stefan Bethke
 Muehlendamm 12            Phone: +49-40-256848, +44-778-891 3832
 D-22087 Hamburg           <stefan.bethke@hanse.de>
 Hamburg, Germany          <stb@freebsd.org>
 
 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Wed Dec 29 00:35:43 PST 1999 
State-Changed-Why:  
Committed, thanks! 
>Unformatted:
