| Summary: | A lot of changes on qmail master and all slave ports | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Renato Botelho <renato> | ||||
| Component: | Individual Port(s) | Assignee: | Sergey Matveychuk <sem> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | lioux | ||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Renato Botelho
2005-03-21 17:20:01 UTC
Responsible Changed From-To: freebsd-ports-bugs->lioux Over to qmail maintainer (lioux) for review and approval. Lioux, Here is the new pkg-install, wrote by Marcos Tischer Vallim <tischer@gmail.com>. This was wrote in csh, and I tested it so much, I think there is no problem. Just remove USE_PERL5_BUILD=yes and ${PERL5} before ${PKGINSTALL} to use it. ------------------------------------------------------------------- #!/bin/csh -f # Author : Marcos Tischer Vallim # E-Mail : tischer@gmail.com # Date : Tue Mar 22 00:40:45 BRT 2005 # Variables set pw = '/usr/sbin/pw'; set touch = '/usr/bin/touch'; set sed = '/usr/bin/sed'; set null = '/dev/null'; if ($uid != 0) then echo "It is necessary to add missing qmail users/groups at"; echo "this stage. Please either add them manually or retry"; echo "as root."; exit 1; endif if (! -x "$pw") then echo "This system looks like a pre-2.2 version of FreeBSD. We see that it"; echo "is missing the "pw" utility. We need this utility. Please get and"; echo "install it, and try again. You can get the source from:"; echo ""; echo " ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz"; echo ""; echo "No $pw"; exit 1; endif set groups = (qmail qnofiles); set gids = (82 81); set users = (alias qmaild qmaill qmailp qmailq qmailr qmails); set users_g = (qnofiles qnofiles qnofiles qnofiles qmail qmail qmail); set uids = (81 82 83 84 85 86 87); set doguid = 0; if ($#argv) then if ($argv[1] == "POST-INSTALL") then ${PKG_PREFIX}/configure/install x; cd ${PKG_PREFIX}/configure && ./config; $touch "${PKG_PREFIX}/alias/.{qmail-postmaster,qmail-root,qmail-mailer-daemon}"; if ($status) then echo "Failed to create files :"; echo " ${PKG_PREFIX}/alias/.qmail-postmaster"; echo " ${PKG_PREFIX}/alias/.qmail-root"; echo " ${PKG_PREFIX}/alias/.qmail-mailer-daemon"; exit 1; endif exit 0; endif if ($argv[1] == "PRE-INSTALL") then set doguid = 1; endif endif if (${?PACKAGE_BUILDING}) then set doguid = 1; endif if ($doguid) then set k = 1; foreach group ($groups) { set chkgid = (`$pw groupshow $group | $sed -e "s/:/ /"`); if ($chkgid[3] != $gids[$k]) then echo "Group '$group' should have gid '$gids[$k]'"; exit 1; endif @ k = $k + 1; } set k = 1; foreach user ($users) { set chkuid = (`$pw usershow $user | $sed -e "s/:/ /"`); if ($chkuid[3] != $uids[$k]) then echo "User '$user' should have uid '$uids[$k]'"; exit 1; endif @ k = $k + 1; } exit 0; endif set k = 1; foreach group ($groups) $pw groupshow $group >& $null; if ($status) then $pw groupadd $group -g $gids[$k]; if ($status) then echo "Failed to add group '$group' as gid '$gids[$k]'"; exit 1; endif endif @ k = $k + 1; end set k = 1; foreach user ($users) $pw usershow $user >& $null; if ($status) then if ($user == "alias") then set home = ${PKG_PREFIX}/alias; else set home = ${PKG_PREFIX}; endif $pw useradd $user -g $users_g[$k] -d $home -s /nonexistent -u $uids[$k]; if ($status) then echo "Failed to add user '$user' as uid '$uids[$k]'"; exit 1; endif endif @ k = $k + 1; end exit 0; ------------------------------------------------------------------- Thanks a lot -- Renato Botelho Class Changed From-To: change-request->maintainer-update Submitter is now qmail port maintainer. Responsible Changed From-To: lioux->sergei I will handle it. Responsible Changed From-To: sergei->freebsd-ports Reset responsible - I do not have the time to fully test it at the moment. This PR contains a lot of changes and I hope other committers will be able to help Renato in committing the changes. Responsible Changed From-To: freebsd-ports->sem Grab State Changed From-To: open->closed Committed, thanks! |