Date: Sat, 7 Oct 2000 03:55:57 -0700 (PDT) From: gabriel_ambuehl@buz.ch To: freebsd-gnats-submit@FreeBSD.org Subject: ports/21813: Update 4.9.4 for vpopmail port Message-ID: <20001007105557.6B89837B66D@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 21813 >Category: ports >Synopsis: Update 4.9.4 for vpopmail port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 07 04:00:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Gabriel Ambuehl >Release: 4.1.1-STABLE >Organization: BUZ Internet Services >Environment: >Description: This updates vpopmail to the current stable version 4.9.4. I changed some of the configure arguments to values we consider to be pretty useful. In order to fix the still broken make package / pkg_delete (It can't find the files because it tries to get them out of /usr/local)stuff, I added a hardcoded PREFIX=/home >How-To-Repeat: cd /usr/ports/mail/vpopmail make make install make package >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # vpopmail # vpopmail/files # vpopmail/files/md5 # vpopmail/pkg # vpopmail/pkg/COMMENT # vpopmail/pkg/DESCR # vpopmail/pkg/INSTALL # vpopmail/pkg/PLIST # vpopmail/Makefile # echo c - vpopmail mkdir -p vpopmail > /dev/null 2>&1 echo c - vpopmail/files mkdir -p vpopmail/files > /dev/null 2>&1 echo x - vpopmail/files/md5 sed 's/^X//' >vpopmail/files/md5 << 'END-of-vpopmail/files/md5' XMD5 (vpopmail-4.9.4.tar.gz) = 7bac93ecd0641eb8c991c081a4cfd08e END-of-vpopmail/files/md5 echo c - vpopmail/pkg mkdir -p vpopmail/pkg > /dev/null 2>&1 echo x - vpopmail/pkg/COMMENT sed 's/^X//' >vpopmail/pkg/COMMENT << 'END-of-vpopmail/pkg/COMMENT' XEasy virtual domain and authentication package for use with qmail END-of-vpopmail/pkg/COMMENT echo x - vpopmail/pkg/DESCR sed 's/^X//' >vpopmail/pkg/DESCR << 'END-of-vpopmail/pkg/DESCR' Xvpopmail provides an easy way to manage virtual domains and virtual Xaccounts on a qmail mail server. X XFeatures: X X. Automates all qmail file modifications into documented command line X programs X X. Support for named and IP-based virtual domains X X. NFS safe X X. dynamic directory creation for scalability using fill-in balanced 3 X level tree X X. understands standard qmail .qmail directives X X. interacts well with qmailadmin for web-based administration, courier-imap X for IMAP support, and sqwebmail for web-based mail. X XWWW: http://inter7.com/vpopmail/ END-of-vpopmail/pkg/DESCR echo x - vpopmail/pkg/INSTALL sed 's/^X//' >vpopmail/pkg/INSTALL << 'END-of-vpopmail/pkg/INSTALL' X#!/usr/bin/perl X# X X@groups = ("vchkpw"); X%users = ('vpopmail', "vchkpw"); X# daemon, local, pop, queue, remote, deliver, respectively. X# alias is a special case above... X%gids = ("vchkpw", 89); X%uids = ('vpopmail', 89); X Xif ($ENV{PACKAGE_BUILDING} || $ARGV[1] eq "PRE-INSTALL") { X $doguid=1; # Make sure we get the assigned guids. X} X Xforeach $group (@groups) { X if (! getgrnam ($group)) { X do checkrpw; # May exit X X $x = "-g $gids{$group}"; X $result = system ("/usr/sbin/pw groupadd $group $x"); X if ($result) { X die "Failed to add group $group as gid $gids{$group}\n"; X } X } X} X Xif (! getpwnam ("alias")) { X do checkrpw; # May exit X X $x = "-u $uids{'alias'}"; X $result = system ("/usr/sbin/pw useradd alias -g qnofiles -d \"$ENV{PKG_PREFIX}/alias\" -s /nonexistent $x"); X if ($result) { X die "Failed to add user alias as uid $uids{'alias'}\n"; X } X} X Xforeach $user (keys %users) { X if (! getpwnam ($user)) { X do checkrpw; # May exit X X $x = "-u $uids{$user}"; X $result = system ("/usr/sbin/pw useradd $user -g $users{$user} -d \"$ENV{PKG_PREFIX}\" -s /nonexistent $x"); X if ($result) { X die "Failed to add user $user as uid $uids{$user}\n"; X } X } X} X X# Check that all gids/uids are as they should be... X# If we are being installed as a package... Xif ($doguid) { X foreach $group (@groups) { X if (getgrnam($group) != $gids{$group}) { X die "Group $group should have gid $gids{$group}\n"; X } X } X X foreach $user (keys %users) { X if (getpwnam($user) != $uids{$user}) { X die "User $user should have uid $uids{$user}\n"; X } X } X} X Xexit 0; X Xsub checkrpw { X if (! -x "/usr/sbin/pw") { X print <<'EOM'; XThis system looks like a pre-2.2 version of FreeBSD. We see that it Xis missing the "pw" utility. We need this utility. Please get and Xinstall it, and try again. You can get the source from: X X ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz X XEOM X die "No /usr/sbin/pw"; X } X X if ($> != 0) { X print "It is necessary to add missing vpopmail users/groups at"; X print "this stage. Please either add them manually or retry"; X print "as root."; X # Let pw(1) signal the failure so the user can see which X # group/user is actually missing. X } X} END-of-vpopmail/pkg/INSTALL echo x - vpopmail/pkg/PLIST sed 's/^X//' >vpopmail/pkg/PLIST << 'END-of-vpopmail/pkg/PLIST' Xvpopmail/bin/clearopensmtp Xvpopmail/bin/vaddaliasdomain Xvpopmail/bin/vadddomain Xvpopmail/bin/vadduser Xvpopmail/bin/vchkpw Xvpopmail/bin/vconvert Xvpopmail/bin/vdeldomain Xvpopmail/bin/vdelivermail Xvpopmail/bin/vdeluser Xvpopmail/bin/vmkpasswd Xvpopmail/bin/vmoduser Xvpopmail/bin/vpasswd Xvpopmail/bin/vpopbull Xvpopmail/bin/vsetuserquota Xvpopmail/bin/vuserinfo Xvpopmail/doc/doc_html/vpopmail.html Xvpopmail/doc/doc_html/vpopmailapi.png Xvpopmail/doc/man_html/clearopensmtp.html Xvpopmail/doc/man_html/index.html Xvpopmail/doc/man_html/vaddaliasdomain.html Xvpopmail/doc/man_html/vadddomain.html Xvpopmail/doc/man_html/vadduser.html Xvpopmail/doc/man_html/vchkpw.html Xvpopmail/doc/man_html/vconvert.html Xvpopmail/doc/man_html/vdeldomain.html Xvpopmail/doc/man_html/vdelivermail.html Xvpopmail/doc/man_html/vdeluser.html Xvpopmail/doc/man_html/vpasswd.html Xvpopmail/doc/man_html/vpopbull.html Xvpopmail/doc/man_html/vsetuserquota.html Xvpopmail/include/config.h Xvpopmail/include/vauth.h Xvpopmail/include/vpopmail.h Xvpopmail/include/vpopmail_config.h Xvpopmail/lib/libvpopmail.a X@dirrm vpopmail/users X@dirrm vpopmail/lib X@dirrm vpopmail/include X@dirrm vpopmail/etc X@dirrm vpopmail/domains X@dirrm vpopmail/doc/man_html X@dirrm vpopmail/doc/doc_html X@dirrm vpopmail/doc X@dirrm vpopmail/bin X@dirrm vpopmail END-of-vpopmail/pkg/PLIST echo x - vpopmail/Makefile sed 's/^X//' >vpopmail/Makefile << 'END-of-vpopmail/Makefile' X# New ports collection makefile for: vpopmail X# Date created: 21 Sep 2000 X# Whom: Neil Blakey-Milner X# X# $FreeBSD: ports/mail/vpopmail/Makefile,v 1.2 2000/09/22 11:39:14 nbm Exp $ X# X XPORTNAME= vpopmail XPORTVERSION= 4.9.4 XCATEGORIES= mail XMASTER_SITES= http://www.inter7.com/vpopmail/ X XMAINTAINER= nbm@FreeBSD.org X XBUILD_DEPENDS= ${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \ X ${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp XRUN_DEPENDS= ${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail \ X ${LOCALBASE}/bin/tcprules:${PORTSDIR}/sysutils/ucspi-tcp X XGNU_CONFIGURE= YES XUSE_GMAKE= YES X X# I use values I found to be useful in the past -- Gabriel Ambuehl <gabriel_ambuehl@buz.ch> XCONFIGURE_ARGS= --enable-qmail-dir=${QMAIL_DIR} \ X --enable-hardquota=10000000 \ X --enable-passwd=n \ X --enable-apop=y \ X --enable-roaming-users=y \ X --enable-logging=y \ X --enable-relay-clear-minutes=30 X X# X# Attempt to set the location of qmail by a simple check. Override this X# if your qmail lives elsewhere. X# X X.if exists(${LOCALBASE}/qmail/bin/qmail-send) XQMAIL_DIR?= ${LOCALBASE}/qmail X.else XQMAIL_DIR?= /var/qmail X.endif X X# X# This port doesn't honour PREFIX, it honours vpopmail's home directory. X# Since we create vpopmail if it doesn't exist, we set it so that it X# does honour PREFIX. -- nbm X# X X#This seems to break the make package stuff. Inter7 strongly recommends to put vpopmail X#into /home/vpopmail so I added the first line. Remove it when you need to have it X#somewhere else -- GA X XPREFIX=/home X Xpre-configure: X @PKG_PREFIX=${PREFIX}/vpopmail ${PERL5} ${PKGDIR}/INSTALL X X.include <bsd.port.mk> END-of-vpopmail/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001007105557.6B89837B66D>