summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-05 13:01:07 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-05 13:01:07 +0000
commit6b83dd83ccda7884fefdff691d935a845a37bc13 (patch)
tree8769212a5cee7bc130220c39efa7f9f35672e1db
parentb1be6267f0f52b1e06039bc4d213727ee80b5101 (diff)
downloadbcfg2-6b83dd83ccda7884fefdff691d935a845a37bc13.tar.gz
bcfg2-6b83dd83ccda7884fefdff691d935a845a37bc13.tar.bz2
bcfg2-6b83dd83ccda7884fefdff691d935a845a37bc13.zip
* Added server-only encaps (glib and gamin)
* Fixes for daemontools and ostiary git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2044 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--encap/TODO6
-rw-r--r--encap/tools/README11
-rw-r--r--encap/tools/bcfg2-server/bcfg2-gamin-0.1.7.ep79
-rw-r--r--encap/tools/bcfg2-server/bcfg2-glib-2.8.6.ep77
-rw-r--r--encap/tools/daemontools/daemontools-0.76.ep27
-rw-r--r--encap/tools/ostiary/ostiary-3.4.ep43
6 files changed, 236 insertions, 7 deletions
diff --git a/encap/TODO b/encap/TODO
index 2e9502c98..9fb555a9a 100644
--- a/encap/TODO
+++ b/encap/TODO
@@ -1,3 +1,5 @@
+ * Install default bcfg2.conf if one doesn't yet exist
+
* daemontools:
* Test encap, including postinstall scripts for config
* Modify Makefile, README, bcfg2-0.8.2.ep to work with daemontools
@@ -13,6 +15,10 @@
* Modify Makefile, README, bcfg2-0.8.2.ep to work with ostiary
* Integration with bcfg2 client
+ * bcfg2-site: create/test
+
+ * Double-check all permissions, and make sure they are not effected by umask
+
* Announce to mailing list:
* daemontools & ostiary stuff
* encap support for Solaris (sparc and x86)
diff --git a/encap/tools/README b/encap/tools/README
index 3a7ae54a3..9720e3353 100644
--- a/encap/tools/README
+++ b/encap/tools/README
@@ -1,3 +1,12 @@
+bcfg2-server
+------------
+Encaps for bcfg2 server deps. Only for GNU/Linux.
+
+bcfg2-site
+----------
+Tools to make an encap package with your site-specific bcfg2.conf,
+custom bcfg2 generators, bcfg2 client run frequency, etc.
+
daemontools - http://cr.yp.to/daemontools.html
----------------------------------------------
D. J. Bernstein's daemontools - a collection of tools for managing
@@ -14,4 +23,4 @@ ostiary - http://ingles.homeunix.org/software/ost
-------------------------------------------------
Ray Ingles' ostiary - simple, secure remote script execution. May be
useful if you like/are used to being able to kick off a config update
-on a config client from a config server, like with cfengine. \ No newline at end of file
+on a config client from a config server, like with cfengine.
diff --git a/encap/tools/bcfg2-server/bcfg2-gamin-0.1.7.ep b/encap/tools/bcfg2-server/bcfg2-gamin-0.1.7.ep
new file mode 100644
index 000000000..db2c2037d
--- /dev/null
+++ b/encap/tools/bcfg2-server/bcfg2-gamin-0.1.7.ep
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+
+<!-- $Id$ -->
+
+<encap_profile
+ profile_ver="1.0"
+ pkgspec="bcfg2-gamin-0.1.7"
+>
+
+<prereq package="bcfg2-glib-2.8.6" />
+
+<environment
+ variable="CC"
+ value="gcc"
+ type="set"
+/>
+
+<environment
+ variable="PATH"
+PLATFORM_IF_MATCH(solaris)
+ value="/usr/local/lib/bcfg2/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:"
+PLATFORM_ELSE
+ value="/usr/local/lib/bcfg2/bin:/usr/local/bin:"
+PLATFORM_ENDIF
+ type="prepend"
+/>
+
+PLATFORM_IF_MATCH(linux)
+PLATFORM_ELSE
+<environment
+ variable="MAKE"
+ value="gmake"
+ type="set"
+/>
+PLATFORM_ENDIF
+
+<environment
+ variable="LDFLAGS"
+PLATFORM_IF_MATCH(linux)
+ value="-L/usr/local/lib/bcfg2/lib -Wl,-rpath,/usr/local/lib/bcfg2/lib"
+PLATFORM_ELSE_IF_MATCH(aix)
+ value="-L/usr/local/lib/bcfg2/lib -Wl,-blibpath:/usr/local/lib/bcfg2/lib:/usr/lib"
+PLATFORM_ELSE_IF_MATCH(solaris)
+ value="-L/usr/local/lib/bcfg2/lib -R/usr/local/lib/bcfg2/lib:/usr/lib -YP,/usr/local/lib/bcfg2/lib:/usr/lib"
+PLATFORM_ELSE
+PLATFORM_ENDIF
+ type="set"
+/>
+
+<environment
+ variable="CPPFLAGS"
+ value="-I/usr/local/lib/bcfg2/include"
+ type="set"
+/>
+
+<source
+url="http://www.pobox.com/users/dclark/mirror/gamin/gamin-0.1.7.tar.gz
+ http://www.gnome.org/~veillard/gamin/sources/gamin-0.1.7.tar.gz"
+>
+
+<configure>
+./configure \
+ --prefix="${ENCAP_SOURCE}/${ENCAP_PKGNAME}/lib/bcfg2"
+</configure>
+
+</source>
+
+<prepackage type="set">
+mkdir var 2>/dev/null || exit 0
+mkdir var/encap 2>/dev/null || exit 0
+touch var/encap/${ENCAP_PKGNAME}
+</prepackage>
+
+<encapinfo>
+description Gamin - The File Alteration Monitor
+prereq pkgspec >= bcfg2-glib-2.8.6
+</encapinfo>
+
+</encap_profile>
diff --git a/encap/tools/bcfg2-server/bcfg2-glib-2.8.6.ep b/encap/tools/bcfg2-server/bcfg2-glib-2.8.6.ep
new file mode 100644
index 000000000..3c0103706
--- /dev/null
+++ b/encap/tools/bcfg2-server/bcfg2-glib-2.8.6.ep
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+
+<!-- $Id$ -->
+
+<encap_profile
+ profile_ver="1.0"
+ pkgspec="bcfg2-glib-2.8.6"
+>
+
+<environment
+ variable="CC"
+ value="gcc"
+ type="set"
+/>
+
+<environment
+ variable="PATH"
+PLATFORM_IF_MATCH(solaris)
+ value="/usr/local/lib/bcfg2/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:"
+PLATFORM_ELSE
+ value="/usr/local/lib/bcfg2/bin:/usr/local/bin:"
+PLATFORM_ENDIF
+ type="prepend"
+/>
+
+PLATFORM_IF_MATCH(linux)
+PLATFORM_ELSE
+<environment
+ variable="MAKE"
+ value="gmake"
+ type="set"
+/>
+PLATFORM_ENDIF
+
+<environment
+ variable="LDFLAGS"
+PLATFORM_IF_MATCH(linux)
+ value="-L/usr/local/lib/bcfg2/lib -Wl,-rpath,/usr/local/lib/bcfg2/lib"
+PLATFORM_ELSE_IF_MATCH(aix)
+ value="-L/usr/local/lib/bcfg2/lib -Wl,-blibpath:/usr/local/lib/bcfg2/lib:/usr/lib"
+PLATFORM_ELSE_IF_MATCH(solaris)
+ value="-L/usr/local/lib/bcfg2/lib -R/usr/local/lib/bcfg2/lib:/usr/lib -YP,/usr/local/lib/bcfg2/lib:/usr/lib"
+PLATFORM_ELSE
+PLATFORM_ENDIF
+ type="set"
+/>
+
+<environment
+ variable="CPPFLAGS"
+ value="-I/usr/local/lib/bcfg2/include"
+ type="set"
+/>
+
+<source
+url="http://www.pobox.com/users/dclark/mirror/glib/glib-2.8.6.tar.gz
+ http://ftp.gnome.org/pub/GNOME/sources/glib/2.8/glib-2.8.6.tar.gz"
+>
+
+<configure>
+./configure \
+ --prefix="${ENCAP_SOURCE}/${ENCAP_PKGNAME}/lib/bcfg2" \
+ --with-libiconv=gnu
+</configure>
+
+</source>
+
+<prepackage type="set">
+mkdir var 2>/dev/null || exit 0
+mkdir var/encap 2>/dev/null || exit 0
+touch var/encap/${ENCAP_PKGNAME}
+</prepackage>
+
+<encapinfo>
+description GLib - data structure handling, portability wrappers, and interfaces
+</encapinfo>
+
+</encap_profile>
diff --git a/encap/tools/daemontools/daemontools-0.76.ep b/encap/tools/daemontools/daemontools-0.76.ep
index 86f42bb78..21e8c8293 100644
--- a/encap/tools/daemontools/daemontools-0.76.ep
+++ b/encap/tools/daemontools/daemontools-0.76.ep
@@ -271,18 +271,35 @@ cp package/run.rclocal ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/package
</source>
<prepackage>
-mkdir /usr/local/var 2>/dev/null || exit 0
-mkdir /usr/local/var/svc.d 2>/dev/null || exit 0
-mkdir /usr/local/var/multilog 2>/dev/null || exit 0
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+mkdir var 2>/dev/null || exit 1
+mkdir var/svc.d 2>/dev/null || exit 1
+mkdir var/svc.d/svscan 2>/dev/null || exit 1
+mkdir var/svc.d/svscan/log 2>/dev/null || exit 1
+mkdir var/encap 2>/dev/null || exit 1
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
+<include_file name="var/svc.d/svscan/log/run" mode="0755"><![CDATA[
+#!/bin/sh
+exec 2>&1
+exec /command/multilog t /usr/local/var/multilog/svscan
+]]></include_file>
+
<include_file name="postinstall" mode="0755"><![CDATA[
#!/bin/sh -e
+umask 002
+BASEDIR="`echo ${0} | xargs -n1 dirname`"
+LOG=${BASEDIR}/postinstall.log
+exec > $LOG 2>&1
+printf "Running daemontools postinstall script...\n"
+date
+test -d /usr/local/var/multilog || mkdir /usr/local/var/multilog
+test -d /usr/local/var/multilog/svscan || mkdir /usr/local/var/multilog/svscan
test -h /command || ln -s /usr/local/encap/daemontools-0.76/bin /command
+test -d /service || mkdir /service
+test -h /service/.svscan || ln -s /usr/local/var/svc.d/svscan /service/.svscan
cd /usr/local/encap/daemontools-0.76 && ./package/run
+printf "Finished daemontools postinstall script.\n"
]]></include_file>
<encapinfo>
diff --git a/encap/tools/ostiary/ostiary-3.4.ep b/encap/tools/ostiary/ostiary-3.4.ep
index 7630f95fb..3aa6fa7b9 100644
--- a/encap/tools/ostiary/ostiary-3.4.ep
+++ b/encap/tools/ostiary/ostiary-3.4.ep
@@ -35,17 +35,58 @@ PLATFORM_ENDIF
<source
url="http://www.pobox.com/users/dclark/mirror/ostiary/ostiary-3.4.tar.gz
http://ingles.homeunix.org/software/ost/ostiary-3.4.tar.gz"
- use_objdir="no"
+ use_objdir="no"
>
</source>
<prepackage>
+# /usr/local/etc stuff
+mkdir share 2>/dev/null || exit 1
+mkdir share/doc 2>/dev/null || exit 1
+mkdir share/doc/ostiary 2>/dev/null || exit 1
+mkdir share/doc/ostiary/examples 2>/dev/null || exit 1
+mv etc/ostiary.cfg share/doc/ostiary/examples/ostiary.cfg
+rmdir etc
+# daemons should be in /usr/local/sbin
+mkdir sbin 2>/dev/null || exit 1
+mv bin/ostiaryd sbin/ostiaryd
+# daemontool stuff
+mkdir var 2>/dev/null || exit 1
+mkdir var/svc.d 2>/dev/null || exit 1
+mkdir var/svc.d/ostiary 2>/dev/null || exit 1
+mkdir var/svc.d/ostiary/log 2>/dev/null || exit 1
+# encap stuff
mkdir var 2>/dev/null || exit 0
mkdir var/encap 2>/dev/null || exit 0
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
+<include_file name="var/svc.d/ostiary/run" mode="0755"><![CDATA[
+#!/bin/sh
+exec 2>&1
+exec /usr/local/sbin/ostiaryd -c /usr/local/etc/ostiary.cfg -v -D
+]]></include_file>
+
+<include_file name="var/svc.d/ostiary/log/run" mode="0755"><![CDATA[
+#!/bin/sh
+exec 2>&1
+exec /command/multilog t /usr/local/var/multilog/ostiary
+]]></include_file>
+
+<include_file name="postinstall" mode="0755"><![CDATA[
+#!/bin/sh -e
+umask 002
+BASEDIR="`echo ${0} | xargs -n1 dirname`"
+LOG=${BASEDIR}/postinstall.log
+exec > $LOG 2>&1
+printf "Running ostiary postinstall script...\n"
+date
+test -d /usr/local/var/multilog || mkdir /usr/local/var/multilog
+test -d /usr/local/var/multilog/ostiary || mkdir /usr/local/var/multilog/ostiary
+printf "Finished ostiary postinstall script.\n"
+]]></include_file>
+
<encapinfo>
description Ostiary - Simple, Secure Remote Script Execution
</encapinfo>