summaryrefslogtreecommitdiffstats
path: root/encap
diff options
context:
space:
mode:
Diffstat (limited to 'encap')
-rw-r--r--encap/ChangeLog54
-rw-r--r--encap/HOWTO52
-rw-r--r--encap/INSTALL (renamed from encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-client/.SENTINEL_SITE)0
-rw-r--r--encap/Makefile116
-rw-r--r--encap/README58
-rw-r--r--encap/TODO27
-rw-r--r--encap/VERSION2
-rw-r--r--encap/src/Makefile19
-rw-r--r--encap/src/bcfg2-site/Makefile26
-rw-r--r--encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl2
-rw-r--r--encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE0
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs32
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/postinstall81
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/preinstall0
-rw-r--r--encap/src/bcfg2-site/site-settings.conf-example (renamed from encap/src/bcfg2-site/site-settings.conf)0
-rw-r--r--encap/src/encap-profiles/Makefile164
-rw-r--r--encap/src/encap-profiles/bcfg2-0.8.3pre1.ep (renamed from encap/src/encap-profiles/bcfg2-0.8.2.ep)22
-rw-r--r--encap/src/encap-profiles/bcfg2-cheetah-2.0rc7.ep4
-rw-r--r--encap/src/encap-profiles/bcfg2-cheetah-doc-0.9.16a1.ep3
-rw-r--r--encap/src/encap-profiles/bcfg2-gamin-0.1.7.ep10
-rw-r--r--encap/src/encap-profiles/bcfg2-gettext-0.14.5.ep11
-rw-r--r--encap/src/encap-profiles/bcfg2-glib-2.8.6.ep16
-rw-r--r--encap/src/encap-profiles/bcfg2-libiconv-1.9.2.ep10
-rw-r--r--encap/src/encap-profiles/bcfg2-libxml2-2.6.26.ep16
-rw-r--r--encap/src/encap-profiles/bcfg2-libxslt-1.1.17.ep15
-rw-r--r--encap/src/encap-profiles/bcfg2-lxml-1.0.1.ep15
-rw-r--r--encap/src/encap-profiles/bcfg2-openssl-0.9.8b.ep15
-rw-r--r--encap/src/encap-profiles/bcfg2-pkg-config-0.20.ep9
-rw-r--r--encap/src/encap-profiles/bcfg2-pyopenssl-0.6.ep13
-rw-r--r--encap/src/encap-profiles/bcfg2-pyrex-0.9.4.1.ep10
-rw-r--r--encap/src/encap-profiles/bcfg2-python-2.4.3.ep14
-rw-r--r--encap/src/encap-profiles/bcfg2-python-apt-0.5.10.ep8
-rw-r--r--encap/src/encap-profiles/bcfg2-python-apt-0.6.16.2ubuntu8.ep10
-rw-r--r--encap/src/encap-profiles/bcfg2-python-apt-0.6.19.ep8
-rw-r--r--encap/src/encap-profiles/bcfg2-zlib-1.2.3.ep10
-rw-r--r--encap/src/encap-profiles/daemontools-0.76.ep13
-rw-r--r--encap/src/encap-profiles/daemontools-doc-20060731.ep7
-rwxr-xr-xencap/src/encap-profiles/ep2target40
-rwxr-xr-xencap/src/encap-profiles/m4-1.4.4.sh4
-rw-r--r--encap/src/encap-profiles/makeself-2.1.4.ep2
-rw-r--r--encap/src/encap-profiles/ostiary-3.4.ep24
-rw-r--r--encap/src/encap-profiles/ostiary-doc-20060801.ep7
-rw-r--r--encap/src/encap-profiles/patch-2.5.9.ep7
43 files changed, 670 insertions, 286 deletions
diff --git a/encap/ChangeLog b/encap/ChangeLog
new file mode 100644
index 000000000..b49550313
--- /dev/null
+++ b/encap/ChangeLog
@@ -0,0 +1,54 @@
+== Release Notes ==
+ 0.1::
+ * Initial Released Version
+ * Work needs to be done to minimize size of distribution. In 0.1
+ libraries and binaries are not stripped, and there is a lot of
+ pruning that can be done of individual packages.
+
+ 0.2::
+ * Updated bcfg2 to 0.8.2pre7
+ * Updated README to point to mcs.anl.gov resources
+
+ 0.3::
+ * Updated bcfg2 to 0.8.2pre10
+
+ 0.4::
+ * Versions before this version won't work without manually fixing paths
+ * Added patches so paths actually exist, specifically:
+ * bcfg2.conf default location is /usr/local/etc
+ * epkg/encap paths changed to encap default /usr/local paths
+ * schema prefix patch (changeset 1953) applied
+ * default schema prefix changed to /usr/local/lib/bcfg2
+ * Added mirror of all packages downloaded by the profiles at
+ http://www.pobox.com/users/dclark/mirror and made mirror default for
+ those downloads
+ * Set up automatic hourly mirror of bcfg2 ftp site *.tar.gz files
+ * Mirror of other packages is manual (but deps shouldn't change often)
+
+ 0.5::
+ * Removed external download of patches as that was not working consistently;
+ replaced with patches inline the bcfg2 encap profile (.ep file)
+ * Added GNU patch dependency, both for bcfg2 patches and call from Cfg.py
+ * Fixed bcfg-repo-validate so it can find xmllint (as b2-xmllint)
+
+ 0.6::
+ * Updated bcfg2 to 0.8.2 (released version)
+ * Removed r1953 patch from bcfg2 profile, since that is included in 0.8.2
+ * Added alpha version warning
+
+ 0.7::
+ * Added Solaris support
+
+ 0.8::
+ * Added python code to fix paths; removed inline patch & GNU patch dependency
+ * Path change happens as part of install, logged to postinstall.log
+ * Changed prefix from b2 to b2- to disambiguate from system commands
+ * Fixes to make man pages easier to access
+ * Install tools as b2-example-tools-*
+ * Added some auxiliary tools under tools/ directory
+ * daemontools - cross-platform alternative to init scripts/cron
+ * ostiary - simple/secure daemon for kicking off a local script
+ * epkg Makefile - to build epkg when prebuilt binaries aren't available
+
+ 0.9::
+ * Major directory structure changes \ No newline at end of file
diff --git a/encap/HOWTO b/encap/HOWTO
index 488639c7f..4dcc12d24 100644
--- a/encap/HOWTO
+++ b/encap/HOWTO
@@ -121,57 +121,5 @@ machine.
Note that the doc for the encap profile format is in "man 5 encap_profile".
-== Release Notes ==
- 0.1::
- * Initial Released Version
- * Work needs to be done to minimize size of distribution. In 0.1
- libraries and binaries are not stripped, and there is a lot of
- pruning that can be done of individual packages.
-
- 0.2::
- * Updated bcfg2 to 0.8.2pre7
- * Updated README to point to mcs.anl.gov resources
-
- 0.3::
- * Updated bcfg2 to 0.8.2pre10
-
- 0.4::
- * Versions before this version won't work without manually fixing paths
- * Added patches so paths actually exist, specifically:
- * bcfg2.conf default location is /usr/local/etc
- * epkg/encap paths changed to encap default /usr/local paths
- * schema prefix patch (changeset 1953) applied
- * default schema prefix changed to /usr/local/lib/bcfg2
- * Added mirror of all packages downloaded by the profiles at
- http://www.pobox.com/users/dclark/mirror and made mirror default for
- those downloads
- * Set up automatic hourly mirror of bcfg2 ftp site *.tar.gz files
- * Mirror of other packages is manual (but deps shouldn't change often)
-
- 0.5::
- * Removed external download of patches as that was not working consistently;
- replaced with patches inline the bcfg2 encap profile (.ep file)
- * Added GNU patch dependency, both for bcfg2 patches and call from Cfg.py
- * Fixed bcfg-repo-validate so it can find xmllint (as b2-xmllint)
-
- 0.6::
- * Updated bcfg2 to 0.8.2 (released version)
- * Removed r1953 patch from bcfg2 profile, since that is included in 0.8.2
- * Added alpha version warning
-
- 0.7::
- * Added Solaris support
-
- 0.8::
- * Added python code to fix paths; removed inline patch & GNU patch dependency
- * Path change happens as part of install, logged to postinstall.log
- * Changed prefix from b2 to b2- to disambiguate from system commands
- * Fixes to make man pages easier to access
- * Install tools as b2-example-tools-*
- * Added some auxiliary tools under tools/ directory
- * daemontools - cross-platform alternative to init scripts/cron
- * ostiary - simple/secure daemon for kicking off a local script
- * epkg Makefile - to build epkg when prebuilt binaries aren't available
-
== Documentation Version ==
$Id$
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-client/.SENTINEL_SITE b/encap/INSTALL
index e69de29bb..e69de29bb 100644
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-client/.SENTINEL_SITE
+++ b/encap/INSTALL
diff --git a/encap/Makefile b/encap/Makefile
deleted file mode 100644
index 45de670d0..000000000
--- a/encap/Makefile
+++ /dev/null
@@ -1,116 +0,0 @@
-# $Id$
-
-.PHONY : all install clean uninstall encaps rename bcfg2only
-.SUFFIXES :
-.SUFFIXES : .ep .sh .installed .packaged
-
-BASEDIR = /usr/local
-ENCAPDIR = ${BASEDIR}/encap
-export ENCAPDIR
-EPKG = ${BASEDIR}/bin/epkg
-export EPKG
-MKENCAP = ${BASEDIR}/bin/mkencap
-export MKENCAP
-
-M4 = m4-1.4.4
-ZLIB = bcfg2-zlib-1.2.3
-LIBICONV = bcfg2-libiconv-1.9.2
-GETTEXT = bcfg2-gettext-0.14.5
-PKG-CONFIG = bcfg2-pkg-config-0.20
-OPENSSL = bcfg2-openssl-0.9.8b
-LIBSTDCXX = bcfg2-libstdc++-0.1
-LIBGCC = bcfg2-libgcc-0.1
-PYTHON = bcfg2-python-2.4.3
-PYREX = bcfg2-pyrex-0.9.4.1
-PYOPENSSL = bcfg2-pyopenssl-0.6
-LIBXML2 = bcfg2-libxml2-2.6.26
-LIBXSLT = bcfg2-libxslt-1.1.17
-LXML = bcfg2-lxml-1.0.1
-BCFG2 = bcfg2-0.8.2
-
-.ep.installed : # Clean, compile and install an encap package
- @printf "***** START .ep.installed for |$*| ***** \n"
- ( ${EPKG} -q -r ${ENCAPDIR}/$* || true )
- ( rm -rf ${ENCAPDIR}/$* || true )
- ( ${MKENCAP} -m /usr/local/bin/m4 -b -DUP $*.ep || true ) > $*.log 2>&1
- ( ${MKENCAP} -m /usr/local/bin/m4 -b -T $*.ep || true ) >> $*.log 2>&1
- ( ${MKENCAP} -m /usr/local/bin/m4 -b -CBI $*.ep ) >> $*.log 2>&1
- ${EPKG} -q -i ${ENCAPDIR}/$*
- test -h ${BASEDIR}/var/encap/$*
- touch $*.installed
- @printf "***** STOP .ep.installed for |$*| ***** \n"
-
-.sh.installed : # Create and install a "fake" encap package
- @printf "***** START .sh.installed for |$*| ***** \n"
- ( ${EPKG} -q -r ${ENCAPDIR}/$* || true )
- ( rm -rf ${ENCAPDIR}/$* || true )
- chmod 755 ./$*.sh
- ./$*.sh
- ${EPKG} -q -i ${ENCAPDIR}/$*
- test -h ${BASEDIR}/var/encap/$*
- touch $*.installed
- @printf "***** STOP .sh.installed for |$*| ***** \n"
-
-.installed.packaged : # Create .tar.gz encap packages for distribution
- @printf "***** START .installed.packaged for |$*| ***** \n"
- ( rm ${ENCAPDIR}/$*-*.tar.gz || true )
- ( cd ${ENCAPDIR} && ${MKENCAP} -e $* || true )
- cd ${ENCAPDIR} && ${MKENCAP} -c $*
- mv ${ENCAPDIR}/$*-encap-*.tar.gz .
- touch $*.packaged
- @printf "***** STOP .installed.packaged for |$*| ***** \n"
-
-all :
- ( $(MAKE) install > make.log 2>&1 && $(MAKE) encaps >> make.log 2>&1 ) &
-
-install : ${EPKG} ${MKENCAP} ${BCFG2}.installed
-
-encaps : ${EPKG} ${MKENCAP} ${BCFG2}.packaged
-
-rename : encaps
- test "$${OS}x" != "x"
- for EARCHIVE in `ls *-encap-*.tar.gz`; do \
- mv $${EARCHIVE} `printf $${EARCHIVE} | awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' | sed s:\ :-:g | sed s:OSDIST:\$${OS}:g` ; \
- done
-
-clean :
- ( rm *.log || true )
- ( rm *.packaged || true )
- ( rm *.gz || true )
- ( rm *~ || true )
-
-uninstall : clean
- ( rm *.installed || true )
- ( ${EPKG} -q -r ${ENCAPDIR}/bcfg2-* || true )
- ( rm -rf ${ENCAPDIR}/bcfg2-* || true )
- ( rm -rf ${BASEDIR}/lib/bcfg2 || true )
-
-bcfg2only :
- $(MAKE) -t; sleep 2; touch $(BCFG2).ep; $(MAKE)
-
-${ZLIB}.installed : ${M4}.installed
-${LIBICONV}.installed : ${ZLIB}.installed
-${GETTEXT}.installed : ${LIBICONV}.installed
-${PKG-CONFIG}.installed : ${GETTEXT}.installed
-${OPENSSL}.installed : ${PKG-CONFIG}.installed
-${LIBSTDCXX}.installed : ${OPENSSL}.installed
-${LIBGCC}.installed : ${LIBSTDCXX}.installed
-${PYTHON}.installed : ${LIBGCC}.installed
-${PYREX}.installed : ${PYTHON}.installed
-${PYOPENSSL}.installed : ${PYREX}.installed
-${LIBXML2}.installed : ${PYOPENSSL}.installed
-${LIBXSLT}.installed : ${LIBXML2}.installed
-${LXML}.installed : ${LIBXSLT}.installed
-${BCFG2}.installed : ${LXML}.installed
-
-${LIBICONV}.packaged : ${ZLIB}.packaged
-${GETTEXT}.packaged : ${LIBICONV}.packaged
-${OPENSSL}.packaged : ${GETTEXT}.packaged
-${LIBSTDCXX}.packaged : ${OPENSSL}.packaged
-${LIBGCC}.packaged : ${LIBSTDCXX}.packaged
-${PYTHON}.packaged : ${LIBGCC}.packaged
-${PYOPENSSL}.packaged : ${PYTHON}.packaged
-${LIBXML2}.packaged : ${PYOPENSSL}.packaged
-${LIBXSLT}.packaged : ${LIBXML2}.packaged
-${LXML}.packaged : ${LIBXSLT}.packaged
-${BCFG2}.packaged : ${LXML}.packaged
diff --git a/encap/README b/encap/README
index bdb4cd1ab..964fd2341 100644
--- a/encap/README
+++ b/encap/README
@@ -1,30 +1,50 @@
+tools-build
+-----------
+Tools used during the build process; should be built before anything else.
+ * m4 - The macro processor, used by mkencap, which is used by everything.
+ * makeself - A utility to create self-extracting archives, used by the
+ top-level Makefile to create the bcfg2-*.run distributions.
+ * patch - Used to patch daemontools and ostiary sources before they build.
+
+bcfg2-client
+------------
+bcfg2 gettext libgcc libiconv libstdc++ libxml2 libxslt lxml openssl pkg-config pyopenssl pyrex python zlib
+
+bcfg2-cheetah
+-------------
+The cheetah python-powered templating system. Used as a build tool by bcfg2-site, and by bcfg2-server. Build order:
+
bcfg2-python-apt
----------------
-Needed for bcfg2 clients that use the "Advanced Packaging Tool" (apt).
+Needed for bcfg2 clients that use the "Advanced Packaging Tool" (apt), such as Debian and Ubuntu.
bcfg2-server
------------
-Encaps for bcfg2 server deps. Only for GNU/Linux.
+Gamin (and glib, upon which it depends), which are needed by the bcfg2 server. 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
-UNIX services the same way across all UNIX platforms. May be useful to
-set up one-time run of bcfg2 client at startup, or to run ostiary.
-
-epkg - http://www.encap.org/epkg
---------------------------------
-Mark D. Roth's epkg - an encap pacakage manager. Needed to build the
-*.ep and *.sh files, although in most cases epkg binaries for your
-platform will already exist.
-
-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.
+tools-deploy/daemontools
+------------------------
+D. J. Bernstein's daemontools - a collection of tools for managing UNIX services the same way across all UNIX platforms. Used by bcfg2-site to run ostiary and bcfg2-client; may also be used to run bcfg2-server.
+
+tools-deploy/ostiary
+--------------------
+Ray Ingles' ostiary - simple, secure remote script execution. Used by bcfg2-site to enable the remote kickoff of bcfg2-client runs.
+
+bcfg2-python-apt
+----------------
+Before building this, make sure that you have these libraries installed:
+ * /usr/lib/libapt-pkg* (Part of the "apt" package on Debian)
+ * /usr/lib/libapt-inst* (Part of the "apt-utils" package on Debian)
+
+You also must have the "libapt-pkg-dev" package installed.
+
+To see if your Debian variant is supported, do "grep ifeq Makefile" and see if
+any of those strings match "cat /etc/issue".
+
+It should be pretty trivial to add new Debian platforms; if you have any
+issues, mail the bcfg2-dev list or open a ticket.
diff --git a/encap/TODO b/encap/TODO
index 2f4a45b71..5c4978aca 100644
--- a/encap/TODO
+++ b/encap/TODO
@@ -1,18 +1,16 @@
- * bcfg2-site: create/test
- * ostiary setup / bcfg2 integration scripts
- * envdir overrides
- * etc.
+ * Add daemontools bcfg2-client service startup to either bcfg2-site, or
+ makeself install script.
- * Double-check all permissions, and make sure they are not effected by umask
+ * makeself-dist: create/test
+ * Handle TODO items in ./src/encap-profiles/makeself-2.1.4.ep
+ * End result will be .run distribution that installs all client stuff
+ * gamin and glib (server requirements) will be manual install items
- * Update Makefile to refer to make/install tools/bcfg2-python-apt
- on apt-using platforms (Debian, Ubuntu etc.) - also mention false error
- message you will get if you don't in the README.
-
- * Big README update, mention ostiary, daemontools, bcfg2-site etc.
-
- * Handle removals nicely (preremove/postremove scripts)
+ * Double-check all permissions, and make sure they are not effected by
+ the environment's umask
+ * Big documentation update
+
* Build everywhere, basic test and post binaries
* Announce to mailing list:
@@ -20,3 +18,8 @@
* encap support for Solaris (sparc and x86)
* Binary epkg archive at
http://www.pobox.com/users/dclark/mirror/bcfg2-encaps
+
+ * Fix epkg README/Makefile links on dclark.us
+
+ * Handle removals nicely (preremove/postremove scripts)
+ * Work towards full compliance with encap 2.1 spec
diff --git a/encap/VERSION b/encap/VERSION
index aec258df7..b63ba696b 100644
--- a/encap/VERSION
+++ b/encap/VERSION
@@ -1 +1 @@
-0.8
+0.9
diff --git a/encap/src/Makefile b/encap/src/Makefile
new file mode 100644
index 000000000..4bf91fb32
--- /dev/null
+++ b/encap/src/Makefile
@@ -0,0 +1,19 @@
+# $Id$
+
+export SHELL = /bin/sh
+
+.PHONY : test log all installconfig dist
+
+log :
+ ( $(MAKE) all > ./make.log 2>&1 ) &
+
+all :
+ $(MAKE) -C ./encap-profiles all
+ $(MAKE) -C ./bcfg2-site all
+ $(MAKE) dist
+
+installconfig :
+ $(MAKE) -C ./bcfg2-site install
+
+dist :
+
diff --git a/encap/src/bcfg2-site/Makefile b/encap/src/bcfg2-site/Makefile
index e42ff2eb6..1f9063d9e 100644
--- a/encap/src/bcfg2-site/Makefile
+++ b/encap/src/bcfg2-site/Makefile
@@ -7,7 +7,7 @@ CHEETAH = /usr/local/lib/bcfg2/bin/cheetah
# Main
-.PHONY : all clean fill copy fix encap test cheetah
+.PHONY : all clean distclean fill copy fix encap install test cheetah
.SUFFIXES :
BD = /usr/local
@@ -23,36 +23,46 @@ clean :
done; \
done
+distclean : clean
+ -rm *-encap-*.tar.gz
+
fill : clean
$(CHEETAH) fill -R --oext out
copy : fill
EN=`cat bcfg2-site-RENAME/encapname.out` && \
- ( test ! -d $$ED/bcfg2-site-$${EN} || rm -rf $$ED/bcfg2-site-$${EN} ) && \
+ ( test ! -d $(ED)/bcfg2-site-$${EN} || rm -rf $(ED)/bcfg2-site-$${EN} ) && \
for SRC in `find bcfg2-site-RENAME | grep -v svn | grep -v tmpl`; do \
- DEST=$$ED/`printf "$$SRC" | sed s/RENAME/$$EN/g | sed s/\.out//g`; \
+ DEST=$(ED)/`printf "$$SRC" | sed s/RENAME/$$EN/g | sed s/\.out//g`; \
if [ -d $$SRC ]; then mkdir $$DEST; else cp $$SRC $$DEST; fi; \
done
fix : copy
- EN="$$ED/bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \
+ EN="$(ED)/bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \
chown -R 0 $$EN && chgrp -R 0 $$EN && \
find $$EN -type d | xargs -n1 chmod 0755 && \
find $$EN -type f | xargs -n1 chmod 0644 && \
chmod 0600 $$EN/etc/ostiary.cfg && \
chmod 0600 $$EN/etc/bcfg2.conf && \
chmod 0755 $$EN/sbin/ost-bcfg2.sh && \
- chmod 0755 $$EN/postinstall && \
- chmod 0755 $$EN/preinstall
+ chmod 0755 $$EN/postinstall
encap : fix
EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \
- cd $$ED && \
+ cd $(ED) && \
( test ! -f $${EN}-encap-*.tar.gz || rm $${EN}-encap-*.tar.gz ) && \
mkencap -c $$EN
EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \
- mv $$ED/$${EN}-encap-*.tar.gz .
+ mv $(ED)/$${EN}-encap-*.tar.gz ./
+install : fix
+ -(EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \
+ epkg -q -r $(ED)/$$EN)
+ EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \
+ cd $(ED) && \
+ epkg -q -i $(ED)/$$EN && \
+ test -h $(BD)/var/encap/$$EN
+
test :
: $(PATH)
$(CHEETAH) test
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl b/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl
index e6af738ac..f54cb1e18 100644
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/encapinfo.tmpl
@@ -7,3 +7,5 @@ description bcfg2-site-${SITE_SHORTNAME} - bcfg2 configuration for ${SITE_NAME}
prereq pkgspec >= bcfg2-0.8.2
prereq pkgspec >= daemontools-0.76
prereq pkgspec >= ostiary-3.4
+exclude etc
+exclude sbin
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE b/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE
deleted file mode 100644
index e69de29bb..000000000
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/etc/default/bcfg2-server/.SENTINEL_SITE
+++ /dev/null
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs b/encap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs
new file mode 100755
index 000000000..0801ec2c9
--- /dev/null
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/mkinstalldirs
@@ -0,0 +1,32 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Last modified: 1994-03-25
+# Public domain
+
+errstatus=0
+
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d in ${1+"$@"} ; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" || errstatus=$?
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall
index e69de29bb..4ed875e4c 100755
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall
@@ -0,0 +1,81 @@
+#!/bin/sh -e
+
+umask 002
+BASEDIR="${ENCAP_TARGET}" # Usually /usr/local
+PKGDIR="${ENCAP_SOURCE}/${ENCAP_PKGNAME}" # Ususally /usr/local/encap/<pkgname>
+LOG="${PKGDIR}/postinstall.log"
+MKINSTALLDIRS="${PKGDIR}/mkinstalldirs"
+exec > $LOG 2>&1
+
+printf "Running ${ENCAP_PKGNAME} postinstall script...\n"
+date
+
+chmod 755 ${MKINSTALLDIRS}
+${MKINSTALLDIRS} "${BASEDIR}/etc/default/bcfg2-client/env"
+${MKINSTALLDIRS} "${BASEDIR}/etc/default/bcfg2-server/env"
+${MKINSTALLDIRS} "${BASEDIR}/sbin"
+
+rmcp() {
+ SRCFILENAME="`basename ${1}`"
+ if [ -d "${2}" ]; then
+ DESTDIRNAME="$2"
+ else
+ DESTDIRNAME="`dirname ${2}`"
+ fi
+ TARGETNAME="$DESTDIRNAME/$SRCFILENAME"
+ if [ -h "$TARGETNAME" ]; then rm "$TARGETNAME"; fi
+ if [ -f "$TARGETNAME" ]; then rm "$TARGETNAME"; fi
+ cp "$1" "$2"
+}
+
+if [ -f ${BASEDIR}/etc/default/bcfg2-client/.SENTINEL_BCFG2 ]; then
+ printf "INFO: bcfg2 client options have been updated by bcfg2 -\n"
+ printf "INFO: not replacing that configuration.\n"
+elif [ -f ${BASEDIR}/etc/default/bcfg2-client/.SENTINEL_SITE ]; then
+ printf "INFO: bcfg2 client options have been previously updated -\n"
+ printf "INFO: not replacing that configuration.\n"
+else
+ DIR="etc/default/bcfg2-client"
+ rmcp $PKGDIR/$DIR/env/RUN_INTERVAL_SECONDS ${BASEDIR}/$DIR/env/
+ rmcp $PKGDIR/$DIR/env/OPTIONS ${BASEDIR}/$DIR/env/
+ touch ${BASEDIR}/$DIR/.SENTINEL_SITE
+fi
+
+if [ -f ${BASEDIR}/etc/default/bcfg2-server/.SENTINEL_BCFG2 ]; then
+ printf "INFO: bcfg2 server options have been updated by bcfg2 -\n"
+ printf "INFO: not replacing that configuration.\n"
+elif [ -f ${BASEDIR}/etc/default/bcfg2-server/.SENTINEL_SITE ]; then
+ printf "INFO: bcfg2 server options have been previously updated -\n"
+ printf "INFO: not replacing that configuration.\n"
+else
+ DIR="etc/default/bcfg2-server"
+ rmcp $PKGDIR/$DIR/env/OPTIONS ${BASEDIR}/$DIR/env/
+ touch ${BASEDIR}/$DIR/.SENTINEL_SITE
+fi
+
+if [ -f ${BASEDIR}/etc/.SENTINEL_BCFG2 ]; then
+ printf "INFO: bcfg2.conf and/or ostiary.cfg may have been updated by\n"
+ printf "INFO: bcfg2 - not replacing that configuration.\n"
+elif [ -f ${BASEDIR}/etc/.SENTINEL_SITE ]; then
+ printf "INFO: bcfg2.conf and/or ostiary.cfg may have been previously\n"
+ printf "INFO: updated - not replacing that configuration.\n"
+else
+ rmcp $PKGDIR/etc/bcfg2.conf ${BASEDIR}/etc/
+ rmcp $PKGDIR/etc/ostiary.cfg ${BASEDIR}/etc/
+ touch ${BASEDIR}/etc/.SENTINEL_SITE
+fi
+
+if [ -f ${BASEDIR}/sbin/.SENTINEL_BCFG2 ]; then
+ printf "INFO: ost-bcfg2.sh may have been updated by bcfg2 -\n"
+ printf "INFO: not replacing that configuration with this script.\n"
+elif [ -f ${BASEDIR}/sbin/.SENTINEL_SITE ]; then
+ printf "INFO: ost-bcfg2.sh may have been previously updated -\n"
+ printf "INFO: not replacing that configuration with this script.\n"
+else
+ rmcp $PKGDIR/sbin/ost-bcfg2.sh ${BASEDIR}/sbin/
+ touch ${BASEDIR}/sbin/.SENTINEL_SITE
+fi
+
+printf "Finished ${ENCAP_PKGNAME} postinstall script.\n"
+
+exit 0
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/preinstall b/encap/src/bcfg2-site/bcfg2-site-RENAME/preinstall
deleted file mode 100755
index e69de29bb..000000000
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/preinstall
+++ /dev/null
diff --git a/encap/src/bcfg2-site/site-settings.conf b/encap/src/bcfg2-site/site-settings.conf-example
index c29ab36e2..c29ab36e2 100644
--- a/encap/src/bcfg2-site/site-settings.conf
+++ b/encap/src/bcfg2-site/site-settings.conf-example
diff --git a/encap/src/encap-profiles/Makefile b/encap/src/encap-profiles/Makefile
new file mode 100644
index 000000000..357758f02
--- /dev/null
+++ b/encap/src/encap-profiles/Makefile
@@ -0,0 +1,164 @@
+# $Id$
+
+.PHONY : test log all install clean distclean uninstall encaps rename bcfg2only
+.SUFFIXES :
+.SUFFIXES : .ep .sh .installed .packaged .d
+
+export BASEDIR = /usr/local
+export ENCAPDIR := ${BASEDIR}/encap
+export EPKG := ${BASEDIR}/bin/epkg
+export MKENCAP := ${BASEDIR}/bin/mkencap
+export SHELL = /bin/sh
+srcdir = .
+export EP2TARGET := $(srcdir)/ep2target
+
+BCFG2 := $(basename $(wildcard bcfg2-[0-9].[0-9]*.ep))
+BCFG2_CHEETAH := $(basename $(wildcard bcfg2-cheetah-[0-9].[0-9]*.ep))
+BCFG2_CHEETAH_DOC := $(basename $(wildcard bcfg2-cheetah-doc-*.ep))
+BCFG2_GAMIN := $(basename $(wildcard bcfg2-gamin-*.ep))
+BCFG2_GETTEXT := $(basename $(wildcard bcfg2-gettext-*.ep))
+BCFG2_GLIB := $(basename $(wildcard bcfg2-glib-*.ep))
+BCFG2_LIBGCC := $(basename $(wildcard bcfg2-libgcc-*.sh))
+BCFG2_LIBICONV := $(basename $(wildcard bcfg2-libiconv-*.ep))
+BCFG2_LIBSTDCXX := $(basename $(wildcard bcfg2-libstdc++-*.sh))
+BCFG2_LIBXML2 := $(basename $(wildcard bcfg2-libxml2-*.ep))
+BCFG2_LIBXSLT := $(basename $(wildcard bcfg2-libxslt-*.ep))
+BCFG2_LXML := $(basename $(wildcard bcfg2-lxml-*.ep))
+BCFG2_OPENSSL := $(basename $(wildcard bcfg2-openssl-*.ep))
+BCFG2_PKG_CONFIG := $(basename $(wildcard bcfg2-pkg-config-*.ep))
+BCFG2_PYOPENSSL := $(basename $(wildcard bcfg2-pyopenssl-*.ep))
+BCFG2_PYREX := $(basename $(wildcard bcfg2-pyrex-*.ep))
+BCFG2_PYTHON := $(basename $(wildcard bcfg2-python-[0-9].[0-9]*.ep))
+BCFG2_ZLIB := $(basename $(wildcard bcfg2-zlib-*.ep))
+DAEMONTOOLS := $(basename $(wildcard daemontools-[0-9].[0-9]*.ep))
+DAEMONTOOLS_DOC := $(basename $(wildcard daemontools-doc-*.ep))
+M4 := $(basename $(wildcard m4-*.sh))
+MAKESELF := $(basename $(wildcard makeself-*.ep))
+OSTIARTY := $(basename $(wildcard ostiary-[0-9].[0-9]*.ep))
+OSTIARTY_DOC := $(basename $(wildcard ostiary-doc-*.ep))
+PATCH := $(basename $(wildcard patch-*.ep))
+
+sources_ep := $(sort $(BCFG2) $(BCFG2_CHEETAH) $(BCFG2_CHEETAH_DOC) $(BCFG2_GETTEXT) $(BCFG2_LIBICONV) $(BCFG2_LIBXML2) $(BCFG2_LIBXSLT) $(BCFG2_LXML) $(BCFG2_OPENSSL) $(BCFG2_PKG_CONFIG) $(BCFG2_PYOPENSSL) $(BCFG2_PYREX) $(BCFG2_PYTHON) $(BCFG2_ZLIB) $(DAEMONTOOLS) $(DAEMONTOOLS_DOC) $(MAKESELF) $(OSTIARTY) $(OSTIARTY_DOC) $(PATCH))
+
+sources_sh := $(sort $(BCFG2_LIBGCC) $(BCFG2_LIBSTDCXX) $(M4))
+
+# Only compile bcfg2-glib and bcfg2-gamin (needed by bcfg2 server) on Linux
+# (Gamin only supports Linux), and only compile bcfg2-python-apt on known
+# Debian and Ubuntu systems (as python-apt is distribution-specific)
+UNAME := $(shell uname)
+
+ifeq ($(UNAME),Linux)
+sources_ep += $(BCFG2_GLIB) $(BCFG2_GAMIN)
+DISTRO := $(shell cat /etc/issue | head -1)
+endif
+
+ifeq ($(DISTRO),Debian GNU/Linux 3.1 \n \l)
+BCFG2_PYTHON_APT = bcfg2-python-apt-0.5.10
+OS ?= linux_debian_sarge
+endif
+
+ifeq ($(DISTRO),Debian GNU/Linux testing/unstable \n \l)
+BCFG2_PYTHON_APT = bcfg2-python-apt-0.6.19
+OS ?= linux_debian_sid
+endif
+
+ifeq ($(DISTRO),Ubuntu 6.06.1 LTS \n \l)
+BCFG2_PYTHON_APT = bcfg2-python-apt-0.6.16.2ubuntu8
+OS ?= linux_ubuntu_dapper
+endif
+
+ifdef BCFG2_PYTHON_APT
+sources_ep += $(BCFG2_PYTHON_APT)
+endif
+
+# List of all sources...
+sources := $(sort $(sources_ep) $(sources_sh))
+
+%.installed : %.ep # Clean, compile and install an encap package
+ @printf "***** START .ep.installed for |$*| ***** \n"
+ -$(EPKG) -q -r $(ENCAPDIR)/$*
+ -rm -rf $(ENCAPDIR)/$*
+ -$(MKENCAP) -m /usr/local/bin/m4 -b -DUP $(srcdir)/$*.ep > ./$*.log 2>&1
+ -$(MKENCAP) -m /usr/local/bin/m4 -b -T $(srcdir)/$*.ep >> ./$*.log 2>&1
+ $(MKENCAP) -m /usr/local/bin/m4 -b -CBI $(srcdir)/$*.ep >> ./$*.log 2>&1
+ $(EPKG) -q -i $(ENCAPDIR)/$*
+ test -h $(BASEDIR)/var/encap/$*
+ touch ./$*.installed
+ @printf "***** STOP .ep.installed for |$*| ***** \n"
+
+%.installed : %.sh # Create and install a "fake" encap package
+ @printf "***** START .sh.installed for |$*| ***** \n"
+ -$(EPKG) -q -r $(ENCAPDIR)/$*
+ -rm -rf $(ENCAPDIR)/$*
+ chmod 755 $(srcdir)/$*.sh && $(srcdir)/$*.sh
+ $(EPKG) -q -i $(ENCAPDIR)/$*
+ test -h $(BASEDIR)/var/encap/$*
+ touch ./$*.installed
+ @printf "***** STOP .sh.installed for |$*| ***** \n"
+
+%.packaged : %.installed # Create .tar.gz encap packages
+ @printf "***** START .installed.packaged for |$*| ***** \n"
+ -rm $(ENCAPDIR)/$*-*.tar.gz
+ -(cd $(ENCAPDIR) && $(MKENCAP) -e $*)
+ -(cd $(ENCAPDIR) && $(MKENCAP) -c $*)
+ mv $(ENCAPDIR)/$*-encap-*.tar.gz ./
+ touch ./$*.packaged
+ @printf "***** STOP .installed.packaged for |$*| ***** \n"
+
+%.d : %.ep # Create dependancy files from .ep files
+ @printf "***** START .d.ep for |$*| ***** \n"
+ chmod 755 $(EP2TARGET) && $(EP2TARGET) $< > $@
+ @printf "***** STOP .d.ep for |$*| ***** \n"
+
+%.d : %.sh # Create dependancy files from .sh files
+ @printf "***** START .d.sh for |$*| ***** \n"
+ chmod 755 $(EP2TARGET) && $(EP2TARGET) $< > $@
+ @printf "***** STOP .d.sh for |$*| ***** \n"
+
+log :
+ ( $(MAKE) install > ./make.log 2>&1 \
+ && $(MAKE) encaps >> ./make.log 2>&1 \
+ && $(MAKE) rename >> ./make.log 2>&1 ) &
+
+all : install encaps rename
+
+.DELETE_ON_ERROR : # delete the target of a rule if it has changed and its
+ # commands exit with a nonzero exit status
+
+install : $(EPKG) $(MKENCAP) $(EP2TARGET) $(addsuffix .installed,$(sources))
+
+encaps : $(EPKG) $(MKENCAP) $(EP2TARGET) $(addsuffix .packaged,$(sources))
+
+rename : encaps
+ if [ "$(OS)x" != "x" ]; then OS="$(OS)"; fi && \
+ if [ "$${OS}x" != "x" ]; then \
+ for OLDNAME in `ls ./*-encap-*.tar.gz`; do \
+ NEWNAME="`printf $${OLDNAME} \
+ | awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' \
+ | sed s:\ :-:g | sed s:OSDIST:\$${OS}:g`" ; \
+ if [ "$${OLDNAME}x" != "$${NEWNAME}x" ]; then \
+ mv ./$${OLDNAME} ./$${NEWNAME}; \
+ fi; \
+ done; \
+ fi
+
+clean :
+ -(rm ./*.log; rm ./*.packaged; rm ./*.gz; rm ./*~)
+
+distclean : clean
+ -rm ./*.d
+
+uninstall : distclean
+ -(find $(BASEDIR)/lib/bcfg2 | grep "\.pyc" | xargs -n1 rm)
+ -(ENCAPS="m4 patch daemontools makeself ostiary bcfg2"; \
+ for ENCAP in $${ENCAPS}; do \
+ $(EPKG) -q -r $(ENCAPDIR)/$${ENCAP}-*; \
+ rm -rf $(ENCAPDIR)/$${ENCAP}-*; \
+ rm ./$${ENCAP}-*.installed; \
+ done)
+ test ! -d $(BASEDIR)/lib/bcfg2
+
+bcfg2only :
+ $(MAKE) -t; sleep 2; touch $(srcdir)/$(BCFG2).ep; $(MAKE)
+
+include $(addsuffix .d,$(sources))
diff --git a/encap/src/encap-profiles/bcfg2-0.8.2.ep b/encap/src/encap-profiles/bcfg2-0.8.3pre1.ep
index cb8b99ecf..55834df59 100644
--- a/encap/src/encap-profiles/bcfg2-0.8.2.ep
+++ b/encap/src/encap-profiles/bcfg2-0.8.3pre1.ep
@@ -4,9 +4,23 @@
<encap_profile
profile_ver="1.0"
- pkgspec="bcfg2-0.8.2"
+ pkgspec="bcfg2-0.8.3pre1"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-openssl-0.9.8b" />
+<prereq package="bcfg2-libstdc++-0.1" />
+<prereq package="bcfg2-libgcc-0.1" />
+<prereq package="bcfg2-python-2.4.3" />
+<prereq package="bcfg2-pyopenssl-0.6" />
+<prereq package="bcfg2-libxml2-2.6.26" />
+<prereq package="bcfg2-libxslt-1.1.17" />
+<prereq package="bcfg2-lxml-1.0.1" />
+
<environment
variable="CC"
value="gcc"
@@ -52,8 +66,8 @@ PLATFORM_ENDIF
/>
<source
-url="http://www.pobox.com/users/dclark/mirror/bcfg/bcfg2-0.8.2.tar.gz
- ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-0.8.2.tar.gz"
+url="http://www.pobox.com/users/dclark/mirror/bcfg/bcfg2-0.8.3pre1.tar.gz
+ ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-0.8.3pre1.tar.gz"
>
<configure>
@@ -159,7 +173,7 @@ def make_files_list(dir, regx):
# don't include symbolic links
for root, dirs, files in os.walk(dir):
for name in files:
- if cregex.search(name) and name not in ("b2-regexplace.sh", "b2-regexplace.py", "postinstall", "postinstall.log", "bcfg2-0.8.2.ep"):
+ if cregex.search(name) and name not in ("b2-regexplace.sh", "b2-regexplace.py", "postinstall", "postinstall.log", "bcfg2-0.8.3pre1.ep"):
path = os.path.join(root, name)
if not os.path.islink(path):
fileslist.append(path)
diff --git a/encap/src/encap-profiles/bcfg2-cheetah-2.0rc7.ep b/encap/src/encap-profiles/bcfg2-cheetah-2.0rc7.ep
index ba77108f3..956536109 100644
--- a/encap/src/encap-profiles/bcfg2-cheetah-2.0rc7.ep
+++ b/encap/src/encap-profiles/bcfg2-cheetah-2.0rc7.ep
@@ -7,6 +7,9 @@
pkgspec="bcfg2-cheetah-2.0rc7"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-python-2.4.3" />
+
<environment
variable="CC"
value="gcc"
@@ -80,6 +83,7 @@ http://umn.dl.sourceforge.net/sourceforge/cheetahtemplate/Cheetah-2.0rc7.tar.gz"
</source>
<prepackage type="set">
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
test -d var || mkdir var
test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
diff --git a/encap/src/encap-profiles/bcfg2-cheetah-doc-0.9.16a1.ep b/encap/src/encap-profiles/bcfg2-cheetah-doc-0.9.16a1.ep
index 023e0bf21..475d5070f 100644
--- a/encap/src/encap-profiles/bcfg2-cheetah-doc-0.9.16a1.ep
+++ b/encap/src/encap-profiles/bcfg2-cheetah-doc-0.9.16a1.ep
@@ -7,6 +7,8 @@
pkgspec="bcfg2-cheetah-doc-0.9.16a1"
>
+<prereq package="m4-1.4.4" />
+
<environment
variable="PATH"
PLATFORM_IF_MATCH(solaris)
@@ -47,6 +49,7 @@ cp -R * ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/cheetah
</source>
<prepackage>
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
test -d var || mkdir var
test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
diff --git a/encap/src/encap-profiles/bcfg2-gamin-0.1.7.ep b/encap/src/encap-profiles/bcfg2-gamin-0.1.7.ep
index db2c2037d..99118d03f 100644
--- a/encap/src/encap-profiles/bcfg2-gamin-0.1.7.ep
+++ b/encap/src/encap-profiles/bcfg2-gamin-0.1.7.ep
@@ -7,6 +7,11 @@
pkgspec="bcfg2-gamin-0.1.7"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-python-2.4.3" />
<prereq package="bcfg2-glib-2.8.6" />
<environment
@@ -66,8 +71,9 @@ url="http://www.pobox.com/users/dclark/mirror/gamin/gamin-0.1.7.tar.gz
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/bcfg2-gettext-0.14.5.ep b/encap/src/encap-profiles/bcfg2-gettext-0.14.5.ep
index eaf6b01e1..7116b0b98 100644
--- a/encap/src/encap-profiles/bcfg2-gettext-0.14.5.ep
+++ b/encap/src/encap-profiles/bcfg2-gettext-0.14.5.ep
@@ -7,6 +7,9 @@
pkgspec="bcfg2-gettext-0.14.5"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+
<environment
variable="CC"
value="gcc"
@@ -66,14 +69,14 @@ url="http://www.pobox.com/users/dclark/mirror/gettext/gettext-0.14.5.tar.gz
<prepackage type="set">
# Make man pages available from /usr/local/lib/bcfg2/man
mv lib/bcfg2/share/man lib/bcfg2/
-# Other stuff...
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description Gettext - Tools to produce multi-lingual messages
+description gettext - tools to produce multi-lingual messages
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-glib-2.8.6.ep b/encap/src/encap-profiles/bcfg2-glib-2.8.6.ep
index 3c0103706..f20eeae32 100644
--- a/encap/src/encap-profiles/bcfg2-glib-2.8.6.ep
+++ b/encap/src/encap-profiles/bcfg2-glib-2.8.6.ep
@@ -7,6 +7,15 @@
pkgspec="bcfg2-glib-2.8.6"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-python-2.4.3" />
+<prereq package="bcfg2-libxml2-2.6.26" />
+<prereq package="bcfg2-libxslt-1.1.17" />
+
<environment
variable="CC"
value="gcc"
@@ -65,13 +74,14 @@ url="http://www.pobox.com/users/dclark/mirror/glib/glib-2.8.6.tar.gz
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description GLib - data structure handling, portability wrappers, and interfaces
+description glib - data structure handling, portability wrappers, and interfaces
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-libiconv-1.9.2.ep b/encap/src/encap-profiles/bcfg2-libiconv-1.9.2.ep
index b25f7090b..b1e534191 100644
--- a/encap/src/encap-profiles/bcfg2-libiconv-1.9.2.ep
+++ b/encap/src/encap-profiles/bcfg2-libiconv-1.9.2.ep
@@ -7,6 +7,8 @@
pkgspec="bcfg2-libiconv-1.9.2"
>
+<prereq package="m4-1.4.4" />
+
<environment
variable="CC"
value="gcc"
@@ -66,14 +68,14 @@ url="http://www.pobox.com/users/dclark/mirror/libiconv/libiconv-1.9.2.tar.gz
<prepackage type="set">
# Make man pages available from /usr/local/lib/bcfg2/man
mv lib/bcfg2/share/man lib/bcfg2/
-# Other stuff...
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description Libiconv - Converts between character encodings
+description libiconv - Converts between character encodings
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-libxml2-2.6.26.ep b/encap/src/encap-profiles/bcfg2-libxml2-2.6.26.ep
index 318f90787..d76256e59 100644
--- a/encap/src/encap-profiles/bcfg2-libxml2-2.6.26.ep
+++ b/encap/src/encap-profiles/bcfg2-libxml2-2.6.26.ep
@@ -7,6 +7,13 @@
pkgspec="bcfg2-libxml2-2.6.26"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-python-2.4.3" />
+
<environment
variable="CC"
value="gcc"
@@ -72,15 +79,16 @@ PLATFORM_ENDIF
</source>
<prepackage type="set">
-mkdir bin 2>/dev/null || exit 0
+test -d bin || mkdir bin
ln -sf ../lib/bcfg2/bin/xmllint bin/b2-xmllint
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description Libxml2 - XML C library for the Gnome project
+description libxml2 - XML C library for the Gnome project
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-libxslt-1.1.17.ep b/encap/src/encap-profiles/bcfg2-libxslt-1.1.17.ep
index 8845c4a4f..96c3d4247 100644
--- a/encap/src/encap-profiles/bcfg2-libxslt-1.1.17.ep
+++ b/encap/src/encap-profiles/bcfg2-libxslt-1.1.17.ep
@@ -7,6 +7,14 @@
pkgspec="bcfg2-libxslt-1.1.17"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-python-2.4.3" />
+<prereq package="bcfg2-libxml2-2.6.26" />
+
<environment
variable="CC"
value="gcc"
@@ -77,13 +85,14 @@ PLATFORM_ENDIF
<prepackage type="set">
mv lib/bcfg2/lib/lib/python2.4 lib/bcfg2/lib
rmdir lib/bcfg2/lib/lib
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description Libxml2 - XML C library for the Gnome project
+description libxslt - XSLT C processing library
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-lxml-1.0.1.ep b/encap/src/encap-profiles/bcfg2-lxml-1.0.1.ep
index aa8e009e1..b8cc4c6fb 100644
--- a/encap/src/encap-profiles/bcfg2-lxml-1.0.1.ep
+++ b/encap/src/encap-profiles/bcfg2-lxml-1.0.1.ep
@@ -7,6 +7,16 @@
pkgspec="bcfg2-lxml-1.0.1"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-python-2.4.3" />
+<prereq package="bcfg2-pyrex-0.9.4.1" />
+<prereq package="bcfg2-libxml2-2.6.26" />
+<prereq package="bcfg2-libxslt-1.1.17" />
+
<environment
variable="CC"
value="gcc"
@@ -82,8 +92,9 @@ make clean
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/bcfg2-openssl-0.9.8b.ep b/encap/src/encap-profiles/bcfg2-openssl-0.9.8b.ep
index 2fa76160b..6a5d92659 100644
--- a/encap/src/encap-profiles/bcfg2-openssl-0.9.8b.ep
+++ b/encap/src/encap-profiles/bcfg2-openssl-0.9.8b.ep
@@ -7,6 +7,12 @@
pkgspec="bcfg2-openssl-0.9.8b"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+
<environment
variable="CC"
value="gcc"
@@ -75,15 +81,16 @@ url="http://www.pobox.com/users/dclark/mirror/openssl/openssl-0.9.8b.tar.gz
# Make man pages available from /usr/local/lib/bcfg2/man
mv lib/bcfg2/ssl/man lib/bcfg2/
# Other stuff...
-mkdir bin 2>/dev/null || exit 0
+test -d bin || mkdir bin
ln -sf ../lib/bcfg2/bin/openssl bin/b2-openssl
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description SSL encryption tool and library
+description openssl - SSL encryption tool and library
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-pkg-config-0.20.ep b/encap/src/encap-profiles/bcfg2-pkg-config-0.20.ep
index 62db17661..5b61c9a92 100644
--- a/encap/src/encap-profiles/bcfg2-pkg-config-0.20.ep
+++ b/encap/src/encap-profiles/bcfg2-pkg-config-0.20.ep
@@ -7,6 +7,10 @@
pkgspec="bcfg2-pkg-config-0.20"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+
<environment
variable="CC"
value="gcc"
@@ -65,8 +69,9 @@ url="http://www.pobox.com/users/dclark/mirror/pkg-config/pkg-config-0.20.tar.gz
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/bcfg2-pyopenssl-0.6.ep b/encap/src/encap-profiles/bcfg2-pyopenssl-0.6.ep
index 7f9fa97f6..a2a59d562 100644
--- a/encap/src/encap-profiles/bcfg2-pyopenssl-0.6.ep
+++ b/encap/src/encap-profiles/bcfg2-pyopenssl-0.6.ep
@@ -7,6 +7,14 @@
pkgspec="bcfg2-pyopenssl-0.6"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-openssl-0.9.8b" />
+<prereq package="bcfg2-python-2.4.3" />
+
<environment
variable="CC"
value="gcc"
@@ -79,8 +87,9 @@ url="http://www.pobox.com/users/dclark/mirror/pyopenssl/pyOpenSSL-0.6.tar.gz
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/bcfg2-pyrex-0.9.4.1.ep b/encap/src/encap-profiles/bcfg2-pyrex-0.9.4.1.ep
index 8fcc80449..5c411285a 100644
--- a/encap/src/encap-profiles/bcfg2-pyrex-0.9.4.1.ep
+++ b/encap/src/encap-profiles/bcfg2-pyrex-0.9.4.1.ep
@@ -7,6 +7,9 @@
pkgspec="bcfg2-pyrex-0.9.4.1"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-python-2.4.3" />
+
<environment
variable="CC"
value="gcc"
@@ -78,13 +81,14 @@ url="http://www.pobox.com/users/dclark/mirror/pyrex/Pyrex-0.9.4.1.tar.gz
<prepackage type="set">
chmod -R o+r lib/bcfg2
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description Pyrex - a Language for Writing Python Extension Modules
+description pyrex - a language for writing python extension modules
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-python-2.4.3.ep b/encap/src/encap-profiles/bcfg2-python-2.4.3.ep
index f62184a08..454aeced1 100644
--- a/encap/src/encap-profiles/bcfg2-python-2.4.3.ep
+++ b/encap/src/encap-profiles/bcfg2-python-2.4.3.ep
@@ -7,6 +7,13 @@
pkgspec="bcfg2-python-2.4.3"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-zlib-1.2.3" />
+<prereq package="bcfg2-libiconv-1.9.2" />
+<prereq package="bcfg2-gettext-0.14.5" />
+<prereq package="bcfg2-pkg-config-0.20" />
+<prereq package="bcfg2-openssl-0.9.8b" />
+
<environment
variable="CC"
value="gcc"
@@ -86,13 +93,14 @@ mkdir bin 2>/dev/null || exit 0
ln -sf ../lib/bcfg2/bin/idle bin/b2-idle
ln -sf ../lib/bcfg2/bin/pydoc bin/b2-pydoc
ln -sf ../lib/bcfg2/bin/python bin/b2-python
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
]]></prepackage>
<encapinfo>
-description Python - Scripting language
+description python - scripting language
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/bcfg2-python-apt-0.5.10.ep b/encap/src/encap-profiles/bcfg2-python-apt-0.5.10.ep
index 57ce35310..77955e0de 100644
--- a/encap/src/encap-profiles/bcfg2-python-apt-0.5.10.ep
+++ b/encap/src/encap-profiles/bcfg2-python-apt-0.5.10.ep
@@ -7,6 +7,9 @@
pkgspec="bcfg2-python-apt-0.5.10"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-python-2.4.3" />
+
<environment
variable="CC"
value="gcc"
@@ -81,8 +84,9 @@ subdir="python-apt-0.5.10"
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/bcfg2-python-apt-0.6.16.2ubuntu8.ep b/encap/src/encap-profiles/bcfg2-python-apt-0.6.16.2ubuntu8.ep
index 4336827ae..59f30be2c 100644
--- a/encap/src/encap-profiles/bcfg2-python-apt-0.6.16.2ubuntu8.ep
+++ b/encap/src/encap-profiles/bcfg2-python-apt-0.6.16.2ubuntu8.ep
@@ -1,12 +1,15 @@
<?xml version="1.0"?>
-<!-- $Id$ -->
+<!-- $Id:$ -->
<encap_profile
profile_ver="1.0"
pkgspec="bcfg2-python-apt-0.6.16.2ubuntu8"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-python-2.4.3" />
+
<environment
variable="CC"
value="gcc"
@@ -81,8 +84,9 @@ subdir="python-apt-0.6.16.2ubuntu8"
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/bcfg2-python-apt-0.6.19.ep b/encap/src/encap-profiles/bcfg2-python-apt-0.6.19.ep
index 448d04351..af74340ff 100644
--- a/encap/src/encap-profiles/bcfg2-python-apt-0.6.19.ep
+++ b/encap/src/encap-profiles/bcfg2-python-apt-0.6.19.ep
@@ -7,6 +7,9 @@
pkgspec="bcfg2-python-apt-0.6.19"
>
+<prereq package="m4-1.4.4" />
+<prereq package="bcfg2-python-2.4.3" />
+
<environment
variable="CC"
value="gcc"
@@ -81,8 +84,9 @@ subdir="python-apt-0.6.19"
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/bcfg2-zlib-1.2.3.ep b/encap/src/encap-profiles/bcfg2-zlib-1.2.3.ep
index cba36bfb3..3b2effc8e 100644
--- a/encap/src/encap-profiles/bcfg2-zlib-1.2.3.ep
+++ b/encap/src/encap-profiles/bcfg2-zlib-1.2.3.ep
@@ -7,6 +7,8 @@
pkgspec="bcfg2-zlib-1.2.3"
>
+<prereq package="m4-1.4.4" />
+
<environment
variable="CC"
value="gcc"
@@ -77,14 +79,14 @@ PLATFORM_ENDIF
<prepackage type="set">
# Make man pages available from /usr/local/lib/bcfg2/man
mv lib/bcfg2/share/man lib/bcfg2/
-# Other stuff...
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description Zlib compression library
+description zlib - compression library
</encapinfo>
</encap_profile>
diff --git a/encap/src/encap-profiles/daemontools-0.76.ep b/encap/src/encap-profiles/daemontools-0.76.ep
index c09b67a72..c6b93c2ab 100644
--- a/encap/src/encap-profiles/daemontools-0.76.ep
+++ b/encap/src/encap-profiles/daemontools-0.76.ep
@@ -7,8 +7,8 @@
pkgspec="daemontools-0.76"
>
-<prereq package="patch-2.5.9" />
<prereq package="m4-1.4.4" />
+<prereq package="patch-2.5.9" />
<environment
variable="CC"
@@ -277,11 +277,12 @@ mv package/run.inittab package/run.inittab.orig
mv package/boot.inittab package/boot.inittab.orig
mv package/run.rclocal package/run.inittab.orig
mv package/boot.rclocal package/boot.inittab.orig
-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
+test -d var || mkdir var
+test -d var/svc.d || mkdir var/svc.d
+test -d var/svc.d/svscan || mkdir var/svc.d/svscan
+test -d var/svc.d/svscan/log || mkdir var/svc.d/svscan/log
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/daemontools-doc-20060731.ep b/encap/src/encap-profiles/daemontools-doc-20060731.ep
index dee918647..1ce5d2d3e 100644
--- a/encap/src/encap-profiles/daemontools-doc-20060731.ep
+++ b/encap/src/encap-profiles/daemontools-doc-20060731.ep
@@ -7,6 +7,8 @@
pkgspec="daemontools-doc-20060731"
>
+<prereq package="m4-1.4.4" />
+
<environment
variable="PATH"
PLATFORM_IF_MATCH(solaris)
@@ -46,8 +48,9 @@ cp -R * ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/daemontools
</source>
<prepackage>
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/ep2target b/encap/src/encap-profiles/ep2target
new file mode 100755
index 000000000..31beb6e79
--- /dev/null
+++ b/encap/src/encap-profiles/ep2target
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+chomp() {
+ printf "$1" | sed s:^\ ::g | sed s:\ $::g
+}
+
+cname() {
+ unset CTMP1 CTMP2
+ for PART in $(printf "$1" | sed s:-:\ :g); do
+ if [ ! "`printf $PART | cut -c1 | sed s:[0-9]:0:g`x" = "0x" ]; then
+ CTMP1="${CTMP1} ${PART}"
+ fi
+ done
+ CTMP2="`chomp "$CTMP1" | sed s:\ :_:g | sed s:\+:X:g | tr [a-z] [A-Z]`"
+ printf "\$(%s)%s" "`basename "$CTMP2"`" "$2"
+}
+
+builddeps() {
+ unset DEPSTMP
+ for LINE in `grep "<prereq package=\"" $1 \
+ | sed s/\ //g \
+ | awk -F\" '{print $2}'`; do
+ DEPSTMP="${DEPSTMP} `cname $LINE $2`"
+ done
+ chomp "$DEPSTMP"
+}
+
+installdeps() {
+ unset DEPSTMP
+ for LINE in `grep "prereq pkgspec" $1 \
+ | awk '{print $4}'`; do
+ DEPSTMP="${DEPSTMP} `cname $LINE $2`"
+ done
+ chomp "$DEPSTMP"
+}
+
+printf "%s : %s\n" "`cname $1 .installed`" "`builddeps $1 .installed`"
+printf "%s : %s\n" "`cname $1 .packaged`" "`installdeps $1 .packaged`"
+
+exit 0
diff --git a/encap/src/encap-profiles/m4-1.4.4.sh b/encap/src/encap-profiles/m4-1.4.4.sh
index b424007eb..835036722 100755
--- a/encap/src/encap-profiles/m4-1.4.4.sh
+++ b/encap/src/encap-profiles/m4-1.4.4.sh
@@ -40,8 +40,8 @@ cat > ${ENCAP_PKGNAME}.ep << EOF
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/makeself-2.1.4.ep b/encap/src/encap-profiles/makeself-2.1.4.ep
index 8e8c5f2b5..fa64e1da8 100644
--- a/encap/src/encap-profiles/makeself-2.1.4.ep
+++ b/encap/src/encap-profiles/makeself-2.1.4.ep
@@ -7,6 +7,8 @@
pkgspec="makeself-2.1.4"
>
+<prereq package="m4-1.4.4" />
+
<source
url="http://www.pobox.com/users/dclark/mirror/makeself/makeself-2.1.4.run
http://www.megastep.org/makeself/makeself-2.1.4.run"
diff --git a/encap/src/encap-profiles/ostiary-3.4.ep b/encap/src/encap-profiles/ostiary-3.4.ep
index be0c4fbdb..c3d95c6c0 100644
--- a/encap/src/encap-profiles/ostiary-3.4.ep
+++ b/encap/src/encap-profiles/ostiary-3.4.ep
@@ -7,8 +7,8 @@
pkgspec="ostiary-3.4"
>
-<prereq package="patch-2.5.9" />
<prereq package="m4-1.4.4" />
+<prereq package="patch-2.5.9" />
<environment
variable="CC"
@@ -71,22 +71,22 @@ url="http://www.pobox.com/users/dclark/mirror/ostiary/ostiary-3.4.tar.gz
<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
+test -d share || mkdir share
+test -d share/doc || mkdir share/doc
+test -d share/doc/ostiary || mkdir share/doc/ostiary
+test -d share/doc/ostiary/examples || mkdir share/doc/ostiary/examples
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
+test -d sbin || mkdir sbin
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/encap 2>/dev/null || exit 0
+test -d var || mkdir var
+test -d var/svc.d || mkdir var/svc.d
+test -d var/svc.d/ostiary || mkdir var/svc.d/ostiary
+test -d var/svc.d/ostiary/log || mkdir var/svc.d/ostiary/log
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/ostiary-doc-20060801.ep b/encap/src/encap-profiles/ostiary-doc-20060801.ep
index 3b0251f2e..6ffb698be 100644
--- a/encap/src/encap-profiles/ostiary-doc-20060801.ep
+++ b/encap/src/encap-profiles/ostiary-doc-20060801.ep
@@ -7,6 +7,8 @@
pkgspec="ostiary-doc-20060801"
>
+<prereq package="m4-1.4.4" />
+
<environment
variable="PATH"
PLATFORM_IF_MATCH(solaris)
@@ -46,8 +48,9 @@ cp * ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/ostiary
</source>
<prepackage>
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
diff --git a/encap/src/encap-profiles/patch-2.5.9.ep b/encap/src/encap-profiles/patch-2.5.9.ep
index c6e2f6b69..18ce80d2b 100644
--- a/encap/src/encap-profiles/patch-2.5.9.ep
+++ b/encap/src/encap-profiles/patch-2.5.9.ep
@@ -42,13 +42,14 @@ PLATFORM_ENDIF
</source>
<prepackage type="set">
-mkdir var 2>/dev/null || exit 0
-mkdir var/encap 2>/dev/null || exit 0
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
touch var/encap/${ENCAP_PKGNAME}
</prepackage>
<encapinfo>
-description patch - Apply a diff file to an original
+description patch - apply a diff file to an original
</encapinfo>
</encap_profile>