pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Import initial SMF support for individual packages.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/642df9becf96
branches:  trunk
changeset: 631631:642df9becf96
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue Mar 11 14:34:36 2014 +0000

description:
Import initial SMF support for individual packages.

diffstat:

 chat/ejabberd/Makefile                                  |    4 +-
 chat/ejabberd/files/smf/manifest.xml                    |   39 ++++
 chat/spectrum/files/smf/manifest.xml                    |   32 +++
 databases/apache-cassandra/Makefile                     |    3 +-
 databases/apache-cassandra/files/smf/manifest.xml       |   34 +++
 databases/couchdb/Makefile                              |    6 +-
 databases/couchdb/files/smf/manifest.xml                |   39 ++++
 databases/mysql51-server/Makefile                       |    4 +-
 databases/mysql51-server/files/smf/manifest.xml         |   32 +++
 databases/mysql51-server/files/smf/mysqld.sh            |   31 +++
 databases/mysql55-server/Makefile                       |    4 +-
 databases/mysql55-server/files/smf/manifest.xml         |   32 +++
 databases/mysql55-server/files/smf/mysqld.sh            |   31 +++
 databases/mysql56-server/Makefile                       |    4 +-
 databases/mysql56-server/files/smf/manifest.xml         |   32 +++
 databases/mysql56-server/files/smf/mysqld.sh            |   31 +++
 databases/postgresql84-server/Makefile                  |    4 +-
 databases/postgresql84-server/files/smf/manifest.xml    |   37 ++++
 databases/postgresql84-server/files/smf/postgresql.sh   |   57 ++++++
 databases/postgresql90-server/Makefile                  |    4 +-
 databases/postgresql90-server/files/smf/manifest.xml    |   37 ++++
 databases/postgresql90-server/files/smf/postgresql.sh   |   57 ++++++
 databases/postgresql91-server/Makefile                  |    4 +-
 databases/postgresql91-server/files/smf/manifest.xml    |   37 ++++
 databases/postgresql91-server/files/smf/postgresql.sh   |   57 ++++++
 databases/postgresql92-server/Makefile                  |    4 +-
 databases/postgresql92-server/files/smf/manifest.xml    |   37 ++++
 databases/postgresql92-server/files/smf/postgresql.sh   |   57 ++++++
 databases/postgresql93-server/Makefile                  |    4 +-
 databases/postgresql93-server/files/smf/manifest.xml    |   37 ++++
 databases/postgresql93-server/files/smf/postgresql.sh   |   57 ++++++
 databases/redis/Makefile                                |    4 +-
 databases/redis/files/smf/manifest.xml                  |   32 +++
 devel/memcached/Makefile                                |    3 +-
 devel/memcached/files/smf/manifest.xml                  |   34 +++
 lang/erlang/Makefile                                    |    4 +-
 lang/erlang/files/smf/manifest.xml                      |   30 +++
 mail/amavisd-new/Makefile                               |    3 +-
 mail/amavisd-new/files/smf/manifest.xml                 |   39 ++++
 mail/courier-imap/Makefile                              |    3 +-
 mail/courier-imap/files/smf/courier-imap.sh             |  122 +++++++++++++
 mail/courier-imap/files/smf/manifest.xml                |   43 ++++
 mail/dovecot/files/smf/manifest.xml                     |   34 +++
 mail/dovecot2/Makefile                                  |    3 +-
 mail/dovecot2/files/smf/manifest.xml                    |   34 +++
 mail/mailman/files/smf/manifest.xml                     |   27 +++
 mail/postfix/files/smf/manifest.xml                     |   43 ++++
 mail/postgrey/Makefile                                  |    5 +-
 mail/postgrey/files/smf/manifest.xml                    |   51 +++++
 mail/sendmail/files/smf/manifest.xml                    |   41 ++++
 net/bind98/Makefile                                     |    3 +-
 net/bind98/files/smf/manifest.xml                       |  141 ++++++++++++++++
 net/bind98/files/smf/named.sh                           |  117 +++++++++++++
 net/bind99/Makefile                                     |    3 +-
 net/bind99/files/smf/manifest.xml                       |  141 ++++++++++++++++
 net/bind99/files/smf/named.sh                           |  117 +++++++++++++
 net/dnsmasq/files/smf/manifest.xml                      |   38 ++++
 net/haproxy/files/smf/manifest.xml                      |   29 +++
 net/mDNSResponder/files/smf/manifest.xml                |   30 +++
 net/nagios-base/Makefile                                |    5 +-
 net/nagios-base/files/smf/manifest.xml                  |   32 +++
 net/nagios-nrpe/Makefile                                |    6 +-
 net/nagios-nrpe/files/smf/manifest.xml                  |   33 +++
 net/net-snmp/Makefile                                   |    3 +-
 net/net-snmp/files/smf/manifest.xml                     |   45 +++++
 net/proftpd/files/smf/manifest.xml                      |   33 +++
 net/rabbitmq/Makefile                                   |    6 +-
 net/rabbitmq/files/smf/manifest.xml                     |   36 ++++
 net/rsync/Makefile                                      |    3 +-
 net/rsync/files/smf/manifest.xml                        |   29 +++
 net/spread/files/smf/manifest.xml                       |   35 +++
 security/clamav/Makefile                                |   13 +-
 security/clamav/distinfo                                |    5 +-
 security/clamav/files/smf/clamd.sh                      |   30 +++
 security/clamav/files/smf/freshclamd.sh                 |   28 +++
 security/clamav/files/smf/manifest.xml                  |   57 ++++++
 security/clamav/patches/patch-etc_clamd.conf.sample     |   33 +++
 security/clamav/patches/patch-etc_freshclam.conf.sample |   15 +
 security/courier-authlib/files/smf/manifest.xml         |   37 ++++
 security/openssh/Makefile                               |    3 +-
 security/openssh/files/smf/manifest.xml                 |   47 +++++
 security/openssh/files/smf/sshd.sh                      |   68 +++++++
 security/py-denyhosts/Makefile                          |    3 +-
 security/py-denyhosts/files/smf/manifest.xml            |   31 +++
 sysutils/munin-node/Makefile                            |    3 +-
 sysutils/munin-node/files/smf/manifest.xml              |   37 ++++
 www/apache-tomcat6/Makefile                             |    3 +-
 www/apache-tomcat6/files/smf/manifest.xml               |   35 +++
 www/apache-tomcat7/Makefile                             |    3 +-
 www/apache-tomcat7/files/smf/manifest.xml               |   35 +++
 www/apache22/files/smf/manifest.xml                     |   38 ++++
 www/apache24/files/smf/manifest.xml                     |   38 ++++
 www/lighttpd/files/smf/manifest.xml                     |   34 +++
 www/nginx-devel/files/smf/manifest.xml                  |   35 +++
 www/nginx/files/smf/manifest.xml                        |   35 +++
 www/php-fpm/Makefile                                    |    3 +-
 www/php-fpm/files/smf/manifest.xml                      |   30 +++
 www/varnish/Makefile                                    |    5 +-
 www/varnish/files/smf/manifest.xml                      |   36 ++++
 99 files changed, 2992 insertions(+), 36 deletions(-)

diffs (truncated from 3772 to 300 lines):

diff -r 79603fc7a5fc -r 642df9becf96 chat/ejabberd/Makefile
--- a/chat/ejabberd/Makefile    Tue Mar 11 14:07:04 2014 +0000
+++ b/chat/ejabberd/Makefile    Tue Mar 11 14:34:36 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2014/03/10 11:35:07 fhajny Exp $
+# $NetBSD: Makefile,v 1.39 2014/03/11 14:34:36 jperkin Exp $
 
 DISTNAME=      ejabberd-13.12
 CATEGORIES=    chat
@@ -54,6 +54,8 @@
 
 FILES_SUBST+=          DISTNAME=${DISTNAME}
 FILES_SUBST+=          EJABBERD_USER=${EJABBERD_USER}
+FILES_SUBST+=          EJABBERD_GROUP=${EJABBERD_GROUP}
+FILES_SUBST+=          EJABBERD_DB=${EJABBERD_DB}
 
 PLIST_SUBST+=          DISTNAME=${DISTNAME}
 PLIST_SUBST+=          EJABBERD_EXDIR=${EJABBERD_EXDIR}
diff -r 79603fc7a5fc -r 642df9becf96 chat/ejabberd/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/ejabberd/files/smf/manifest.xml      Tue Mar 11 14:34:36 2014 +0000
@@ -0,0 +1,39 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='@SMF_NAME@'>
+  <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='network-service' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/network/service' />
+    </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_any' restart_on='refresh' type='path'>
+      <service_fmri value='file://localhost@PKG_SYSCONFDIR@/ejabberd.cfg' />
+      <service_fmri value='file://localhost@PKG_SYSCONFDIR@/ejabberctl.cfg' />
+      <service_fmri value='file://localhost@PKG_SYSCONFDIR@/inetrc' />
+    </dependency>
+    <dependency name='@SMF_NAME@-epmd' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/@SMF_PREFIX@/epmd' />
+    </dependency>
+    <method_context working_directory='@EJABBERD_DB@'>
+      <method_credential user='@EJABBERD_USER@' group='@EJABBERD_GROUP@' />
+    </method_context>
+    <exec_method name='start' type='method' exec='@PREFIX@/sbin/ejabberdctl start' timeout_seconds='120' />
+    <exec_method name='stop' type='method' exec='@PREFIX@/sbin/ejabberdctl stop' timeout_seconds='60' />
+    <property_group name='startd' type='framework'>
+      <propval name='ignore_error' type='astring' value='core,signal' />
+    </property_group>
+    <stability value='Unstable' />
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>ejabberd - the Erlang Jabber/XMPP daemon</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff -r 79603fc7a5fc -r 642df9becf96 chat/spectrum/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/spectrum/files/smf/manifest.xml      Tue Mar 11 14:34:36 2014 +0000
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <dependency name="network" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/milestone/network:default" />
+    </dependency>
+    <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/system/filesystem/local" />
+    </dependency>
+    <instance name="default" enabled="false">
+      <method_context>
+        <method_credential user="@JABBER_USER@" group="@JABBER_GROUP@" />
+      </method_context>
+      <exec_method type="method" name="start" exec="@PREFIX@/bin/spectrum %{config_file}" timeout_seconds="60" />
+      <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+      <property_group name="startd" type="framework">
+        <propval name="duration" type="astring" value="contract" />
+        <propval name="ignore_error" type="astring" value="core,signal" />
+      </property_group>
+      <property_group name="application" type="application">
+        <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/spectrum.cfg" />
+      </property_group>
+    </instance>
+    <stability value="Evolving" />
+    <template>
+      <common_name>
+        <loctext xml:lang="C">Spectrum XMPP gateway</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff -r 79603fc7a5fc -r 642df9becf96 databases/apache-cassandra/Makefile
--- a/databases/apache-cassandra/Makefile       Tue Mar 11 14:07:04 2014 +0000
+++ b/databases/apache-cassandra/Makefile       Tue Mar 11 14:34:36 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2014/02/14 10:25:23 fhajny Exp $
+# $NetBSD: Makefile,v 1.16 2014/03/11 14:34:36 jperkin Exp $
 #
 
 DISTNAME=      apache-cassandra-${CASSANDRA_VER}
@@ -29,6 +29,7 @@
 DOCDIR=                ${PREFIX}/share/doc/cassandra
 
 RCD_SCRIPTS=           cassandra
+SMF_NAME=              cassandra
 CASSANDRA_USER?=       cassandra
 CASSANDRA_GROUP?=      cassandra
 PKG_GROUPS=            ${CASSANDRA_GROUP}
diff -r 79603fc7a5fc -r 642df9becf96 databases/apache-cassandra/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/apache-cassandra/files/smf/manifest.xml Tue Mar 11 14:34:36 2014 +0000
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name="network" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/milestone/network:default" />
+    </dependency>
+    <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/system/filesystem/local" />
+    </dependency>
+      <method_context project="@SMF_NAME@" working_directory="@CASSANDRA_HOME@">
+      <method_credential user="@CASSANDRA_USER@" group="@CASSANDRA_GROUP@" />
+      <method_environment>
+        <envvar name="JAVA_HOME" value="@PREFIX@/java/sun6" />
+        <envvar name="JVM_OPTS" value="-d64" />
+      </method_environment>
+    </method_context>
+    <exec_method type="method" name="start" exec="@PREFIX@/share/cassandra/bin/cassandra -p @VARBASE@/lib/cassandra/cassandra.pid" timeout_seconds="600" />
+    <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract" />
+      <propval name="ignore_error" type="astring" value="core,signal" />
+    </property_group>
+    <property_group name="application" type="application"></property_group>
+    <stability value="Evolving" />
+    <template>
+      <common_name>
+        <loctext xml:lang="C">Apache Cassandra</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff -r 79603fc7a5fc -r 642df9becf96 databases/couchdb/Makefile
--- a/databases/couchdb/Makefile        Tue Mar 11 14:07:04 2014 +0000
+++ b/databases/couchdb/Makefile        Tue Mar 11 14:34:36 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2014/02/12 23:17:38 tron Exp $
+# $NetBSD: Makefile,v 1.24 2014/03/11 14:34:36 jperkin Exp $
 #
 
 DISTNAME=              apache-couchdb-1.5.0
@@ -42,6 +42,10 @@
 COUCH_RUNDIR?=         ${VARBASE}/run/couchdb
 .endif
 
+FILES_SUBST+=          COUCH_USER=${COUCH_USER}
+FILES_SUBST+=          COUCH_GROUP=${COUCH_GROUP}
+FILES_SUBST+=          COUCH_DBDIR=${COUCH_DBDIR}
+
 OWN_DIRS=              ${COUCH_LOGDIR} ${COUCH_DBDIR} ${COUCH_RUNDIR} ${PKG_SYSCONFDIR}
 OWN_DIRS_PERMS+=       ${COUCH_DBDIR} ${COUCH_USER} ${COUCH_GROUP} 0770
 OWN_DIRS_PERMS+=       ${COUCH_LOGDIR} ${COUCH_USER} ${COUCH_GROUP} 0770
diff -r 79603fc7a5fc -r 642df9becf96 databases/couchdb/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/couchdb/files/smf/manifest.xml  Tue Mar 11 14:34:36 2014 +0000
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name="network" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/milestone/network:default" />
+    </dependency>
+    <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/system/filesystem/local" />
+    </dependency>
+    <dependency name='@SMF_NAME@-epmd' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/@SMF_PREFIX@/epmd' />
+    </dependency>
+    <method_context working_directory="@COUCH_DBDIR@">
+      <method_credential user="@COUCH_USER@" group="@COUCH_GROUP@" />
+      <method_environment>
+        <envvar name="PATH" value="@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin" />
+        <envvar name="HOME" value="@COUCH_DBDIR@" />
+      </method_environment>
+    </method_context>
+    <exec_method type="method" name="start" exec="@PREFIX@/bin/couchdb -b" timeout_seconds="60" />
+    <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract" />
+      <propval name="ignore_error" type="astring" value="core,signal" />
+    </property_group>
+    <property_group name="application" type="application">
+      <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/local.ini" />
+    </property_group>
+    <stability value="Evolving" />
+    <template>
+      <common_name>
+        <loctext xml:lang="C">CouchDB server</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff -r 79603fc7a5fc -r 642df9becf96 databases/mysql51-server/Makefile
--- a/databases/mysql51-server/Makefile Tue Mar 11 14:07:04 2014 +0000
+++ b/databases/mysql51-server/Makefile Tue Mar 11 14:34:36 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2014/02/12 23:17:39 tron Exp $
+# $NetBSD: Makefile,v 1.20 2014/03/11 14:34:36 jperkin Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
 PKGREVISION=   1
@@ -52,6 +52,8 @@
 PKG_SHELL.${MYSQL_USER}=       ${SH}
 
 RCD_SCRIPTS=           mysqld
+SMF_NAME=              mysql
+SMF_METHODS=           ${RCD_SCRIPTS}
 
 FILES_SUBST+=          HOSTNAME_CMD=${HOSTNAME_CMD:Q} \
                        MYSQL_DATADIR=${MYSQL_DATADIR} \
diff -r 79603fc7a5fc -r 642df9becf96 databases/mysql51-server/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql51-server/files/smf/manifest.xml   Tue Mar 11 14:34:36 2014 +0000
@@ -0,0 +1,32 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='@SMF_NAME@'>
+  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+    <create_default_instance enabled='false' />
+    <single_instance />
+    <dependency name='fs' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local' />
+    </dependency>
+    <dependency name='net' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/network/loopback' />
+    </dependency>
+    <method_context project='mysql' working_directory='@MYSQL_DATADIR@'>
+      <method_credential user='@MYSQL_USER@' group='@MYSQL_GROUP@' />
+      <method_environment>
+        <envvar name='LD_PRELOAD_32' value='/usr/lib/extendedFILE.so.1' />
+      </method_environment>
+    </method_context>
+    <exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ start' timeout_seconds='18446744073709551615' />
+    <exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ stop' timeout_seconds='18446744073709551615' />
+    <stability value='Evolving' />
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>MySQL RDBMS</loctext>
+      </common_name>
+      <documentation>
+        <manpage title='MySQL 5.1' section='1' />
+        <doc_link name='mysql.com' uri='http://dev.mysql.com/docs' />
+      </documentation>
+    </template>
+  </service>
+</service_bundle>
diff -r 79603fc7a5fc -r 642df9becf96 databases/mysql51-server/files/smf/mysqld.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql51-server/files/smf/mysqld.sh      Tue Mar 11 14:34:36 2014 +0000
@@ -0,0 +1,31 @@
+#!@SMF_METHOD_SHELL@
+#
+# $NetBSD: mysqld.sh,v 1.1 2014/03/11 14:34:36 jperkin Exp $
+#
+# Init script for mysqld.
+#
+
+. /lib/svc/share/smf_include.sh
+
+PIDFILE="@MYSQL_DATADIR@/mysql.pid"
+
+ulimit -n 10240
+
+case "$1" in
+start)
+       @LOCALBASE@/sbin/mysqld --user=mysql \
+               --basedir=@LOCALBASE@ \
+               --datadir=@MYSQL_DATADIR@ \
+               --pid-file=${PIDFILE} \
+               --log-error=@VARBASE@/log/mysql/error.log &
+       ;;
+stop)
+       [ -f ${PIDFILE} ] && kill `@HEAD@ -1 ${PIDFILE}`
+       ;;
+*)
+       echo "Usage: $0 {start|stop}" >&2
+       exit 1



Home | Main Index | Thread Index | Old Index