pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/clamsmtp mail/clamsmtp: Add SMF support. Make sur...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ee071cf02232
branches:  trunk
changeset: 374426:ee071cf02232
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Mon Jan 22 15:50:37 2018 +0000

description:
mail/clamsmtp: Add SMF support. Make sure $CLAMAV_USER exists,
since it's referenced in init scripts. Bump PKGREVISION.

diffstat:

 mail/clamsmtp/Makefile               |   8 +++++-
 mail/clamsmtp/files/smf/manifest.xml |  42 ++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 2 deletions(-)

diffs (77 lines):

diff -r 3329e03b9e0c -r ee071cf02232 mail/clamsmtp/Makefile
--- a/mail/clamsmtp/Makefile    Mon Jan 22 15:00:03 2018 +0000
+++ b/mail/clamsmtp/Makefile    Mon Jan 22 15:50:37 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.46 2016/12/01 18:34:57 nros Exp $
+# $NetBSD: Makefile,v 1.47 2018/01/22 15:50:37 fhajny Exp $
 
 DISTNAME=              clamsmtp-1.10
-#PKGREVISION=          1
+PKGREVISION=           1
 CATEGORIES=            mail
 MASTER_SITES=          http://thewalter.net/stef/software/clamsmtp/
 
@@ -15,6 +15,7 @@
 
 MESSAGE_SUBST+=                HOMEPAGE=${HOMEPAGE:Q}
 FILES_SUBST+=          CLAMAV_USER=${CLAMAV_USER}
+FILES_SUBST+=          CLAMAV_GROUP=${CLAMAV_GROUP}
 
 # Doesn't work with GNU pth (missing required mutex features)
 PTHREAD_OPTS+=         require native
@@ -26,6 +27,9 @@
 INSTALLATION_DIRS=     share/examples/${PKGBASE}
 
 PKG_USERS_VARS=                CLAMAV_USER
+PKG_GROUPS_VARS=       CLAMAV_GROUP
+PKG_GROUPS+=           ${CLAMAV_GROUP}
+PKG_USERS+=            ${CLAMAV_USER}:${CLAMAV_GROUP}
 
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 
diff -r 3329e03b9e0c -r ee071cf02232 mail/clamsmtp/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/clamsmtp/files/smf/manifest.xml      Mon Jan 22 15:50:37 2018 +0000
@@ -0,0 +1,42 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='export'>
+  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local' />
+    </dependency>
+    <dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
+      <service_fmri value='svc:/network/loopback:default' />
+    </dependency>
+    <dependency name='physical' grouping='require_all' restart_on='error' type='service'>
+      <service_fmri value='svc:/network/physical:default' />
+    </dependency>
+    <dependency name='name-services' grouping='require_all'  restart_on='refresh' type='service'>
+      <service_fmri value='svc:/milestone/name-services' />
+    </dependency>
+    <dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/system-log' />
+    </dependency>
+    <dependency name='config-files' grouping='require_all' restart_on='refresh' type='path'>
+      <service_fmri value='file://@PKG_SYSCONFDIR@/clamsmtpd.conf' />
+    </dependency>
+    <method_context working_directory='/tmp'>
+      <method_credential user='@CLAMAV_USER@' group='@CLAMAV_GROUP@' />
+    </method_context>
+    <exec_method name='start' type='method' exec='@PREFIX@/sbin/clamsmtpd' timeout_seconds='60' />
+    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />
+    <property_group name='startd' type='framework'>
+      <propval name='ignore_error' type='astring' value='core,signal' />
+    </property_group>
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>ClamAV SMTP filter for postfix daemon</loctext>
+      </common_name>
+      <documentation>
+        <manpage title='clamsmtpd' section='8' manpath='@PREFIX@/@PKGMANDIR@'/>
+      </documentation>
+    </template>
+  </service>
+</service_bundle>



Home | Main Index | Thread Index | Old Index