[csw-devel] SF.net SVN: gar:[5081] csw/mgar/pkg

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu May 28 11:09:53 CEST 2009


Revision: 5081
          http://gar.svn.sourceforge.net/gar/?rev=5081&view=rev
Author:   wahwah
Date:     2009-05-28 09:09:51 +0000 (Thu, 28 May 2009)

Log Message:
-----------
minimalsmf, a package documenting and testing SMF support in mGAR.

Modified Paths:
--------------
    csw/mgar/pkg/minimalsmf/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/minimalsmf/
    csw/mgar/pkg/minimalsmf/trunk/files/CSWminimalsmf.gspec
    csw/mgar/pkg/minimalsmf/trunk/files/cswminimalsmf
    csw/mgar/pkg/minimalsmf/trunk/files/cswminimalsmf.xml
    csw/mgar/pkg/minimalsmf/trunk/files/sleeping-beauty
    csw/mgar/pkg/minimalsmf/trunk/files/svc-cswminimalsmf

Modified: csw/mgar/pkg/minimalsmf/trunk/Makefile
===================================================================
--- csw/mgar/pkg/template/trunk/Makefile	2009-05-26 00:54:19 UTC (rev 5052)
+++ csw/mgar/pkg/minimalsmf/trunk/Makefile	2009-05-28 09:09:51 UTC (rev 5081)
@@ -1,24 +1,35 @@
-GARNAME = mypkg
-GARVERSION = 1.0
-CATEGORIES = lib
+GARNAME = minimalsmf
+GARVERSION = 0.1
+CATEGORIES = server
 
-DESCRIPTION = This is a useful library
+DESCRIPTION = A test of an SMF-enabled package and mGAR SMF support
 define BLURB
-  It does stuff with things
+  This package is a minimal build of a package with SMF support, for the
+  purposes of testing and documenting mGAR.
+
+  It should contain the least amount of code necessary to build a package,
+  which, upon installation, imports a manifest and starts the service in the
+  global zone as well as in the non-global zones (full and sparse).
 endef
 
-MASTER_SITES = 
-DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
+ARCHALL = 1
+MASTER_SITES =
+DISTFILES  = sleeping-beauty
+DISTFILES += $(call admfiles,CSW$(GARNAME),)
+DISTFILES += csw$(GARNAME) csw$(GARNAME).xml svc-csw$(GARNAME)
 
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
+INITSMF = /opt/csw/etc/init.d/csw$(GARNAME)
 
-CONFIGURE_ARGS = $(DIRPATHS)
+CONFIGURE_SCRIPTS =
+BUILD_SCRIPTS =
+TEST_SCRIPTS =
+INSTALL_SCRIPTS = $(GARNAME)
 
-# Remove the following rules and uncomment the
-# include before building.
-all: .DEFAULT
-.DEFAULT:
-	@true
+install-$(GARNAME):
+	ginstall -d $(DESTDIR)
+	ginstall -d $(DESTDIR)$(bindir)
+	ginstall -m 755 files/sleeping-beauty $(DESTDIR)$(bindir)
+	ginstall -d $(DESTDIR)$(libdir)/svc/method
+	ginstall -m 755 files/svc-csw$(GARNAME) $(DESTDIR)$(libdir)/svc/method/csw$(GARNAME)
 
-#include gar/category.mk
+include gar/category.mk

Added: csw/mgar/pkg/minimalsmf/trunk/files/CSWminimalsmf.gspec
===================================================================
--- csw/mgar/pkg/minimalsmf/trunk/files/CSWminimalsmf.gspec	                        (rev 0)
+++ csw/mgar/pkg/minimalsmf/trunk/files/CSWminimalsmf.gspec	2009-05-28 09:09:51 UTC (rev 5081)
@@ -0,0 +1,6 @@
+%var		bitname minimalsmf
+%var		pkgname CSWminimalsmf
+%include        url file://%{PKGLIB}/csw_dyndepend.gspec
+%include	url file://%{PKGLIB}/smf_enabled.gspec
+%var		SERVICE_NAME cswminimalsmf
+%var            SERVICE_CONF_FILES /etc/foo

Added: csw/mgar/pkg/minimalsmf/trunk/files/cswminimalsmf.xml
===================================================================
--- csw/mgar/pkg/minimalsmf/trunk/files/cswminimalsmf.xml	                        (rev 0)
+++ csw/mgar/pkg/minimalsmf/trunk/files/cswminimalsmf.xml	2009-05-28 09:09:51 UTC (rev 5081)
@@ -0,0 +1,26 @@
+<?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='system/cswminimalsmf' type='service' version='0'>
+    <create_default_instance enabled='false'/>
+    <single_instance/>
+    <exec_method name='start' type='method' exec='/opt/csw/lib/svc/method/cswminimalsmf' timeout_seconds='600'>
+      <method_context/>
+    </exec_method>
+    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'>
+      <method_context/>
+    </exec_method>
+    <exec_method name='refresh' type='method' exec=':kill -HUP' timeout_seconds='60'>
+      <method_context/>
+    </exec_method>
+    <stability value='Unstable'/>
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>Just sleeping</loctext>
+      </common_name>
+      <documentation>
+        <manpage title='bash' section='1' manpath='/usr/share/man'/>
+      </documentation>
+    </template>
+  </service>
+</service_bundle>

Added: csw/mgar/pkg/minimalsmf/trunk/files/sleeping-beauty
===================================================================
--- csw/mgar/pkg/minimalsmf/trunk/files/sleeping-beauty	                        (rev 0)
+++ csw/mgar/pkg/minimalsmf/trunk/files/sleeping-beauty	2009-05-28 09:09:51 UTC (rev 5081)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+while true
+do
+	sleep 10
+	logger user.info "Sleeping $(date)"
+done


Property changes on: csw/mgar/pkg/minimalsmf/trunk/files/sleeping-beauty
___________________________________________________________________
Added: svn:executable
   + *

Added: csw/mgar/pkg/minimalsmf/trunk/files/svc-cswminimalsmf
===================================================================
--- csw/mgar/pkg/minimalsmf/trunk/files/svc-cswminimalsmf	                        (rev 0)
+++ csw/mgar/pkg/minimalsmf/trunk/files/svc-cswminimalsmf	2009-05-28 09:09:51 UTC (rev 5081)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/opt/csw/bin/sleeping-beauty &


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list