pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Various: Add SMF support.
Module Name: pkgsrc-wip
Committed By: Jonathan Perkin <jperkin%joyent.com@localhost>
Pushed By: jperkin
Date: Fri Oct 2 12:43:44 2015 +0100
Changeset: f87afddc167d9f8c9336ab17a78796470d4a7ed7
Modified Files:
riak/Makefile
riak/files/smf/manifest.xml
riak14/files/smf/manifest.xml
Added Files:
rsyslog6/MESSAGE.NetBSD
rsyslog6/MESSAGE.SunOS
rsyslog6/files/smf/manifest.xml
runit/files/smf/manifest.xml
wackamole/files/smf/manifest.xml
Log Message:
Various: Add SMF support.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f87afddc167d9f8c9336ab17a78796470d4a7ed7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
riak/Makefile | 4 ++++
riak/files/smf/manifest.xml | 5 ++++-
riak14/files/smf/manifest.xml | 3 +++
rsyslog6/MESSAGE.NetBSD | 11 +++++++++++
rsyslog6/MESSAGE.SunOS | 9 +++++++++
rsyslog6/files/smf/manifest.xml | 33 +++++++++++++++++++++++++++++++++
runit/files/smf/manifest.xml | 37 +++++++++++++++++++++++++++++++++++++
wackamole/files/smf/manifest.xml | 30 ++++++++++++++++++++++++++++++
8 files changed, 131 insertions(+), 1 deletion(-)
diffs:
diff --git a/riak/Makefile b/riak/Makefile
index d244e93d81..f019ed16ef 100644
--- a/riak/Makefile
+++ b/riak/Makefile
@@ -60,6 +60,10 @@ PKG_SYSCONFSUBDIR= riak
CONF_FILES+= share/examples/riak/riak.conf ${PKG_SYSCONFDIR}/riak.conf
CONF_FILES+= share/examples/riak/solr-log4j.properties ${PKG_SYSCONFDIR}/solr-log4j.properties
+SMF_USER= ${RIAK_USER}
+SMF_GROUP= ${RIAK_GROUP}
+SMF_HOME= ${RIAK_DATA}
+
BUILD_TARGET= rel
SUBST_CLASSES+= pkgsrc
diff --git a/riak/files/smf/manifest.xml b/riak/files/smf/manifest.xml
index 5c00ed3054..64d2c4fdf2 100644
--- a/riak/files/smf/manifest.xml
+++ b/riak/files/smf/manifest.xml
@@ -13,12 +13,15 @@
<dependency name="epmd" grouping="require_any" restart_on="restart" type="service">
<service_fmri value="svc:/@SMF_PREFIX@/riak-epmd:default" />
</dependency>
- <method_context working_directory="@RIAK_DATA@">
+ <method_context working_directory="@RIAK_DATA@" project="riak">
<method_credential user="@RIAK_USER@" group="@RIAK_GROUP@" />
<method_environment>
<envvar name="HOME" value="@RIAK_DATA@" />
<envvar name="LOGNAME" value="@RIAK_USER@" />
<envvar name="PATH" value="/usr/bin:/bin:@PREFIX@/bin:@PREFIX@/sbin" />
+ <envvar name="LD_PRELOAD_32" value="/lib/libumem.so.1" />
+ <envvar name="LD_PRELOAD_64" value="/lib/64/libumem.so.1" />
+ <envvar name="UMEM_OPTIONS" value="allocator=best" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/riak start" timeout_seconds="60" />
diff --git a/riak14/files/smf/manifest.xml b/riak14/files/smf/manifest.xml
index 6a1521c12f..5c3a8b6300 100644
--- a/riak14/files/smf/manifest.xml
+++ b/riak14/files/smf/manifest.xml
@@ -20,6 +20,9 @@
<envvar name="HOME" value="@RIAK_DATA@" />
<envvar name="LOGNAME" value="@RIAK_USER@" />
<envvar name="PATH" value="/usr/bin:/bin:@PREFIX@/bin:@PREFIX@/sbin" />
+ <envvar name="LD_PRELOAD_32" value="/lib/libumem.so.1" />
+ <envvar name="LD_PRELOAD_64" value="/lib/64/libumem.so.1" />
+ <envvar name="UMEM_OPTIONS" value="allocator=best" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/riak start" timeout_seconds="60" />
diff --git a/rsyslog6/MESSAGE.NetBSD b/rsyslog6/MESSAGE.NetBSD
new file mode 100644
index 0000000000..fde1b4e99f
--- /dev/null
+++ b/rsyslog6/MESSAGE.NetBSD
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD$
+
+For simple replacement for syslogd(8), you may put the following lines
+into your /etc/rc.conf:
+
+ syslogd=NO
+ rsyslogd=YES
+ rsyslogd_flags="-c 3 -f /etc/syslog.conf"
+
+===========================================================================
diff --git a/rsyslog6/MESSAGE.SunOS b/rsyslog6/MESSAGE.SunOS
new file mode 100644
index 0000000000..b931c74d20
--- /dev/null
+++ b/rsyslog6/MESSAGE.SunOS
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD$
+
+To use rsyslogd on Solaris, you'll need to stop the default syslogd first
+via SMF:
+
+ svcadm disable system/system-log
+
+===========================================================================
diff --git a/rsyslog6/files/smf/manifest.xml b/rsyslog6/files/smf/manifest.xml
new file mode 100644
index 0000000000..991f548cbf
--- /dev/null
+++ b/rsyslog6/files/smf/manifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="rsyslog">
+ <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="system_log" grouping="exclude_all" restart_on="refresh" type="service">
+ <service_fmri value="svc:/system/system-log:default" />
+ </dependency>
+ <exec_method type="method" name="start" exec="@PREFIX@/sbin/rsyslogd -c5" timeout_seconds="60" />
+ <exec_method type="method" name="refresh" exec=":kill -HUP" 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@/rsyslog.conf" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">rsyslog daemon</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>
diff --git a/runit/files/smf/manifest.xml b/runit/files/smf/manifest.xml
new file mode 100644
index 0000000000..b7de650821
--- /dev/null
+++ b/runit/files/smf/manifest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type='manifest' name='runit'>
+ <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='none' type='service'>
+ <service_fmri value='svc:/milestone/network:default' />
+ </dependency>
+ <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local:default' />
+ </dependency>
+ <method_context>
+ <method_environment>
+ <envvar name="PATH" value="@PREFIX@/bin:@PREFIX@/sbin:/usr/xpg4/bin:/usr/bin:/usr/sbin" />
+ </method_environment>
+ </method_context>
+ <exec_method type='method' name='start' exec='@PREFIX@/sbin/runsvdir -P @PREFIX@/etc/service' timeout_seconds='60'>
+ <method_context>
+ <method_credential user='root' group='root' />
+ </method_context>
+ </exec_method>
+ <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60'>
+ <method_context>
+ <method_credential user='root' group='root' />
+ </method_context>
+ </exec_method>
+ <property_group name='startd' type='framework'>
+ <!-- use 'wait' instead of 'contract' to avoid daemonization this will
+ act almost like /etc/inittab, which is what we want -->
+ <propval name='duration' type='astring' value='child' />
+ <!-- sub-process core dumps shouldn't restart session -->
+ <propval name='ignore_error' type='astring' value='core,signal' />
+ </property_group>
+ <stability value='Evolving' />
+ </service>
+</service_bundle>
diff --git a/wackamole/files/smf/manifest.xml b/wackamole/files/smf/manifest.xml
new file mode 100644
index 0000000000..f064d18e94
--- /dev/null
+++ b/wackamole/files/smf/manifest.xml
@@ -0,0 +1,30 @@
+<?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='0'>
+ <create_default_instance enabled='false' />
+ <single_instance />
+ <dependency name='filesystem_minimal' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/minimal' />
+ </dependency>
+ <dependency name='loopback' grouping='require_any' restart_on='error' type='service'>
+ <service_fmri value='svc:/network/loopback' />
+ </dependency>
+ <dependency name='network' grouping='optional_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/milestone/network' />
+ </dependency>
+ <dependency name='spread' grouping='require_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/@SMF_PREFIX@/spread' />
+ </dependency>
+ <dependency name='config' grouping='require_all' restart_on='none' type='path'>
+ <service_fmri value='file://localhost/@PKG_SYSCONFDIR@/wackamole.conf' />
+ </dependency>
+ <exec_method name='start' type='method' exec='@PREFIX@/sbin/wackamole -c @PKG_SYSCONFDIR@/wackamole.conf' timeout_seconds='300' />
+ <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />
+ <property_group name='general' type='framework'>
+ <property name='action_authorization' type='astring' />
+ <property name='value_authorization' type='astring' />
+ </property_group>
+ <stability value='Unstable' />
+ </service>
+</service_bundle>
Home |
Main Index |
Thread Index |
Old Index