diff options
author | antoine <antoine@FreeBSD.org> | 2014-09-15 04:38:48 +0800 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2014-09-15 04:38:48 +0800 |
commit | ce684e43eb2ac68a99a4fe7d7288e521923a5141 (patch) | |
tree | 321455b9ac5843efa400a8cb12552ea3e8218ea6 /security | |
parent | bb675f0a7f9249d79a6e4c80c53d13168b10e257 (diff) | |
download | freebsd-ports-graphics-ce684e43eb2ac68a99a4fe7d7288e521923a5141.tar.gz freebsd-ports-graphics-ce684e43eb2ac68a99a4fe7d7288e521923a5141.tar.zst freebsd-ports-graphics-ce684e43eb2ac68a99a4fe7d7288e521923a5141.zip |
- Use the ports framework to create user/group
- Shebangfix
- Allow staging as a regular user
Diffstat (limited to 'security')
-rw-r--r-- | security/amavisd-new/Makefile | 12 | ||||
-rw-r--r-- | security/amavisd-new/files/pkg-deinstall.in | 8 | ||||
-rw-r--r-- | security/amavisd-new/files/pkg-install.in | 30 |
3 files changed, 5 insertions, 45 deletions
diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile index 2d20678a6d4..0497e114404 100644 --- a/security/amavisd-new/Makefile +++ b/security/amavisd-new/Makefile @@ -2,6 +2,7 @@ PORTNAME= amavisd-new PORTVERSION= 2.9.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= security MASTER_SITES= http://www.ijs.si/software/amavisd/ \ @@ -21,8 +22,9 @@ RUN_DEPENDS= p5-Unix-Syslog>=0:${PORTSDIR}/sysutils/p5-Unix-Syslog \ p5-Net-Server>=2.0:${PORTSDIR}/net/p5-Net-Server \ p5-Mail-DKIM>=0.33:${PORTSDIR}/mail/p5-Mail-DKIM -USES= perl5 tar:xz +USES= perl5 shebangfix tar:xz USE_PERL5= run +SHEBANG_FILES= amavisd-agent amavisd-nanny amavisd-release NO_BUILD= yes @@ -32,6 +34,8 @@ DOCS= AAAREADME.first AMAVIS-MIB.txt INSTALL LDAP.schema LICENSE \ AMAVISUSER?= vscan AMAVISGROUP?= vscan +USERS= ${AMAVISUSER} +GROUPS= ${AMAVISGROUP} AMAVISDIR?= /var/amavis AMAVISQUARANTINE?= /var/virusmails DAEMON?= /usr/sbin/daemon -p @@ -234,9 +238,6 @@ post-patch: -e 's|$$localhost_name = .localhost.;|$$localhost_name = $$myhostname;|' \ ${WRKSRC}/amavisd -pre-install: - @${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL - do-install: .if ${PORT_OPTIONS:MP0F} ${INSTALL_SCRIPT} ${WRKSRC}/p0f-analyzer.pl ${STAGEDIR}${PREFIX}/sbin @@ -256,9 +257,6 @@ do-install: .endfor @${CP} -pr ${WRKSRC}/README_FILES/images/ ${STAGEDIR}${DOCSDIR}/images .endif - -post-install: ${LN} -s ${PREFIX}/sbin/amavisd-release ${STAGEDIR}${PREFIX}/sbin/amavisd-requeue - @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/security/amavisd-new/files/pkg-deinstall.in b/security/amavisd-new/files/pkg-deinstall.in index 8c3c4d8fde4..19a407b179f 100644 --- a/security/amavisd-new/files/pkg-deinstall.in +++ b/security/amavisd-new/files/pkg-deinstall.in @@ -10,14 +10,6 @@ QUARANTINE=%%AMAVISQUARANTINE%% if [ "$2" = "POST-DEINSTALL" ]; then - if /usr/sbin/pw group show "${GROUP}" 2>&1 >/dev/null; then - echo "You should manually remove the \"${GROUP}\" group." - fi - - if /usr/sbin/pw user show "${USER}" 2>&1 >/dev/null; then - echo "You should manually remove the \"${USER}\" user." - fi - if [ -e ${DIR} ]; then echo "You should manually remove the \"${DIR}\" directory." fi diff --git a/security/amavisd-new/files/pkg-install.in b/security/amavisd-new/files/pkg-install.in index 198bbc32708..994fd4c8fd0 100644 --- a/security/amavisd-new/files/pkg-install.in +++ b/security/amavisd-new/files/pkg-install.in @@ -10,36 +10,6 @@ QUARANTINE=%%AMAVISQUARANTINE%% if [ "$2" = "PRE-INSTALL" ]; then - if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP} -h - -g 110 - then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \ - -d ${DIR} \ - -s /bin/sh \ - -c "Scanning Virus Account" \ - -u 110 - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR} echo "Created \"${DIR}\" directory." /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/db |