summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-09-02 23:06:16 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-09-02 23:06:16 +0000
commit57a3484065040d4a651187d21482ccdd4a8faac4 (patch)
treef087d0ea0334eb816fef7a7ad8ac59795aed29e2
parent9a5ec9dd1783f69fc4870f72ba7dfd8035422607 (diff)
downloadbcfg2-57a3484065040d4a651187d21482ccdd4a8faac4.tar.gz
bcfg2-57a3484065040d4a651187d21482ccdd4a8faac4.tar.bz2
bcfg2-57a3484065040d4a651187d21482ccdd4a8faac4.zip
EncapPackages:
* Delete VERSION and ChangeLog, just use bcfg2 version or svn release # * Update install scripts to allow forcing replacement of local config files * Make python build fail if "from httplib import HTTPS" fails * Some doc updates git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2172 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--encap/ChangeLog58
-rw-r--r--encap/HOWTO126
-rw-r--r--encap/INSTALL99
-rw-r--r--encap/README116
-rw-r--r--encap/TODO34
-rw-r--r--encap/VERSION1
-rw-r--r--encap/src/Makefile25
-rwxr-xr-xencap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl56
-rw-r--r--encap/src/encap-profiles/Makefile8
-rw-r--r--encap/src/encap-profiles/bcfg2-python-2.4.3.ep12
-rwxr-xr-xencap/src/makeself-dist/makedist.sh14
11 files changed, 349 insertions, 200 deletions
diff --git a/encap/ChangeLog b/encap/ChangeLog
deleted file mode 100644
index a1bc6cc1c..000000000
--- a/encap/ChangeLog
+++ /dev/null
@@ -1,58 +0,0 @@
-== 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
- * Bunch of other stuff - TODO
-
- 0.91::
- * TODO \ No newline at end of file
diff --git a/encap/HOWTO b/encap/HOWTO
index 51b2d8c88..87f7631ad 100644
--- a/encap/HOWTO
+++ b/encap/HOWTO
@@ -1,128 +1,8 @@
-= Encap based bootstrap for bcfg2 and complete bcfg2 client toolchain =
+= EncapHowto: Encap Packages HOWTO =
-This documentation is not up to date with the current state of the encap code.
-A complete doc refresh should be done in time for the 0.8.4 release.
+TODO: Aim is to have nice HOWTO for 0.8.4 release.
-This should be considered an alpha version. Everything compiles and seems to
-work, but it has not yet been tested.
-
-This bootstrap code is a method for getting bcfg2 (as a client),
-including all dependencies, up and running on a new platform as
-quickly as possible (from source).
-
-The latest version of this document is always available from:
- * http://trac.mcs.anl.gov/projects/bcfg2/browser/trunk/bcfg2/encap/README
-
-For a more general overview of what this is, see:
- * http://trac.mcs.anl.gov/projects/bcfg2/wiki/EncapPackages
-
-You can view this document with glorious Trac Wiki formatting at:
- * http://trac.mcs.anl.gov/projects/bcfg2/wiki/EncapHowto
- (Although that version may be out of date)
-
-You can obtain the latest version of the code from bcfg2 svn:
- * `svn co https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2/encap`
-
-Or browse the latest version on the web via:
- * http://trac.mcs.anl.gov/projects/bcfg2/browser/trunk/bcfg2/encap
-
-Using the encap package manager it automatically downloads, builds and
-creates encap packages for bcfg2 and dependencies to `/usr/local/encap`, and
-installs symbolic links to these packages from `/usr/local` (the usual encap
-thing).
-
-It attempts to be as self contained as possible; everything gets linked to
-under `/usr/local/lib/bcfg2`, except for bcfg2 itself and some dependent
-software, which is prefixed by `b2-` (`b2-openssl`, `b2-python` etc.).
-
-To run the bcfg2 server, you also need to install gamin, which
-supports a subset of the platforms bcfg2 client will work on, including
-GNU/Linux and FreeBSD.
-
-When using this packaging, `/etc/bcfg2.conf` is instead
-`/usr/local/etc/bcfg2.conf`.
-
-== Building and installing everything ==
- 1. Make sure all of the Prerequisites (see below) are installed.
- 1. The build user needs write access to the encap source and build
- directories. By default, these are `/usr/local/encap` and
- `/usr/local/src`. If you like to live dangerously, you can also just do
- the builds as `root`.
- 1. Run `make`. This will kick off and background the entire build process.
- Make output will be redirected to `make.log`, and package build output
- will go to individual log files.
- 1. If everything goes well, try running "`bcfg2-repo-validate`". This should
- not generate a python traceback :-)
- 1. You now have *-encap-*.tar.gz encap packages you can distribute to other
- machines. If you don't like the OS name encap uses automatically (esp.
- on GNU/Linux these can be too generic), do `make rename OS=somestring`.
-
-== Prerequisites ==
- * GNU gcc and GNU g++
- * If you are using the gcc distributed with Solaris/x86 10, you need to
- install the gcc bugfix at http://www.openssl.org/~appro/values.c by
- running "ksh -f values.c" as root (or openssl will segfault)
- * GNU make (make sure "gmake" links to GNU make on non-GNU platforms)
- * /usr/local/man should be a directory, not a symbolic link
- * epkg (the encap package manager)
- * Canonical website is http://www.encap.org/epkg
- * Mirror of epkg binaries is available at http://www.dclark.us/mirror/
- * If built from source, first need all recommended libraries from web page
-
-You will need binaries of the GNU tools. For GNU and BSD based operating
-systems, you should be able to get these via the operating system's package
-system. For commercial operating systems, these can be obtained from:
-
- AIX::
- * UCLA's Public Domain Software Library for AIX at
- http://aixpdslib.seas.ucla.edu/aixpdslib.html
- (These are trivial to convert into encap packages)
- * Bull AIX Freeware at http://www.bullfreeware.com/
-
- Solaris::
- * Freeware for Solaris at http://www.sunfreeware.com/
- * Community Software for Solaris at http://www.blastwave.org/packages.php
-
-== Supported Platforms ==
-Below is a table of platforms that have been successfully bootstrapped using
-this code.
-
-|| OS || Vendor || Version || Arch || GCC || By || With VERSION ||
-|| AIX || IBM || 5.3 || POWER || 4.1.0 || dc || 0.7/0.8.2 ||
-|| GNU/Linux || Debian || Sarge || i386 || 3.3.5 || dc || 0.7/0.8.2 ||
-|| GNU/Linux || Debian || Sid || i386 || 4.1.2 || dc || 0.8/0.8.2 ||
-|| Solaris || Sun || 10 || Sparc || 3.4.3 || dc || 0.7/0.8.2 ||
-|| Solaris || Sun || 10 || i386 || 3.4.3 || dc || 0.7/0.8.2 ||
-
-dc: "Daniel Clark" <mailto:dclark@member.fsf.org>
-
-If you bootstrap a platform not listed above, please add a comment to:
- * http://trac.mcs.anl.gov/projects/bcfg2/ticket/74
-so that platform can be added to the list.
-
-If you modified any of the files in this package to be able to bootstrap the
-new platform, please include either diffs or a tarball of your modified
-version in a new ticket so your changes can be incorporated into a new
-release.
-
-Any other notes, such as where you got the GNU binaries or any issues people
-should be aware of, would also be appreciated.
-
-You may want to scan all of the bootstrapped binaries and libraries with
-`ldd` (or equivalent) to make sure there are no dependencies on libraries
-other than those included with the base operating system and the libraries
-built as part of the bootstrap process.
-
-On non-GNU operating systems, libgcc and libstdc++ are a run-time
-requirement. These libraries are usually distributed with gcc/g++, so the
-bootstrap system attempts to create encap packages containing those
-libraries by copying them from the build machine. To test that this worked,
-you'll want to either temporarily remove gcc/g++ from the build machine and
-make sure everything still works, or install the bcfg2-*.tar.gz encap
-packages on a "clean" machine (without a gcc/g++ install) and test on that
-machine.
-
-Note that the doc for the encap profile format is in "man 5 encap_profile".
+<Reference to README and INSTALL in wiki: format>
== Documentation Version ==
$Id$
diff --git a/encap/INSTALL b/encap/INSTALL
index f5b12376f..53fa20d16 100644
--- a/encap/INSTALL
+++ b/encap/INSTALL
@@ -1 +1,98 @@
-For now, look at the HOWTO \ No newline at end of file
+= EncapInstall: bcfg2/encap installation instructions =
+
+== Prerequisites ==
+ * Read the [wiki:EncapReadme README]
+ * GNU gcc and GNU g++
+ * If you are using the gcc distributed with Solaris/x86 10, you need to
+ install the gcc bug fix at http://www.openssl.org/~appro/values.c by
+ running "ksh -f values.c" as root (or openssl will segfault)
+ * GNU make (make sure "gmake" links to GNU make on non-GNU platforms)
+ * /usr/local/man should be a directory, not a symbolic link
+ * epkg (the encap package manager)
+ * Canonical website is http://www.encap.org/epkg
+ * Mirror of epkg binaries is available at http://www.dclark.us/mirror/
+ * If built from source, first need all recommended libraries from web page
+ * To ease building from source, read epkg/README and use epkg/Makefile
+
+You will need binaries of the GNU tools. For GNU and BSD based operating
+systems, you should be able to get these via the operating system's package
+system. For commercial operating systems, these can be obtained from:
+
+ AIX::
+ * UCLA's Public Domain Software Library for AIX at
+ http://aixpdslib.seas.ucla.edu/aixpdslib.html
+ (These are trivial to convert into encap packages)
+ * Bull AIX Freeware at http://www.bullfreeware.com/
+
+ Solaris::
+ * Freeware for Solaris at http://www.sunfreeware.com/
+ * Community Software for Solaris at http://www.blastwave.org/packages.php
+
+== Advanced Packaging Tool (APT) support (Debian/Ubuntu/etc) ==
+
+On platforms that use APT, such as Debian and Ubuntu, bcfg2-python-apt must be
+built. Unfortunately the version required is dependent on the version of the
+distribution.
+
+To see if your distribution is supported, do:
+{{{
+cat /etc/issue
+grep DISTRO src/encap-profiles/Makefile \
+ | awk -F, '{print $2}' | sort | sed s:\)$::g
+}}}
+If any of the lines from `src/encap-profiles/Makefile` match your `/etc/issue`,
+you're good to go; if not, open a ticket at http://www.bcfg2.org/newticket with
+the contents of your `/etc/issue` requesting that it be supported, and support
+should be added within a few days (or of course patches are gratefully
+accepted).
+
+When building bcfg2-python-apt, there are some additional prerequisites:
+ * `/usr/lib/libapt-pkg*` (Part of the "apt" package on Debian)
+ * `/usr/lib/libapt-inst*` (Part of the "apt-utils" package on Debian)
+ * The "`libapt-pkg-dev`" package
+So you probably want to do something like:
+{{{
+apt-get install apt apt-utils libapt-pkg-dev
+}}}
+
+== Building and installing everything ==
+Note that the build is disruptive to the currently installed bcfg2 packages
+(whatever you have installed is uninstalled and then replaced with the
+newly-built packages), although no configuration files will be replaced
+unless you ask them to be (via `REPLACE_CONFIG="yes"; export REPLACE_CONFIG`).
+
+ 1. Make sure all of the prerequisites (see above) are installed.
+ 1. The build/install must be done as "`root`".
+ 1. Change to the src directory (`cd src`)
+ 1. Copy your `site-settings.conf` file to `bcfg2-site/`; if you don't have
+ one already, copy over bcfg2-site/site-settings.conf-example and change
+ it to suit your site.
+ 1. Run `make` (GNU/Linux platforms) or `gmake` (all other platforms). This
+ will kick off and background the entire build process. Make output will be
+ redirected to `make.log`, and package build output will go to individual
+ log files. If the entire build is successful, you will see:
+ {{{### encap build finished...}}}
+ followed by the locations of the various packages at the end of make.log
+ 1. If everything goes well, try running "`bcfg2-repo-validate`". This should
+ not generate a python traceback, but will probably throw an error.
+
+Packages that you can install on other machines will be in the "`DIST`"
+directory. In most cases you will only need the self-extracting/installing
+package with the name like "`bcfg2-*.run`"; that will install the bcfg2 client.
+
+You can install the doc packages if you want, although it probably makes more
+sense to let bcfg2 install them on machines you want to have them on after you
+get stuff up and running.
+
+On GNU/Linux platforms, glib and gamin will also be built; these only have to be installed only on the bcfg2 server machine.
+
+Cheetah will be built on all platforms (as it is needed as a build-time
+prerequisite), however for run-time it only needs to be installed on the bcfg2
+server machine.
+
+== Next step ==
+For more information on the "`bcfg2-*.run`" file and what to do next, see the
+[wiki:EncapHowto HOWTO].
+
+== Documentation Version ==
+$Id$
diff --git a/encap/README b/encap/README
index 1d8344a30..5caf3ef53 100644
--- a/encap/README
+++ b/encap/README
@@ -1 +1,115 @@
-For now, look at the HOWTO
+= EncapReadme: Encap based bootstrap for bcfg2 and complete bcfg2 toolchain =
+
+This code is a method for getting bcfg2, including all dependencies, up and
+running on many platforms as quickly as possible, from source.
+
+== What you get ==
+The end result is a self-extracting/self-installing bcfg2 client distribution
+that does a complete client install, which includes:
+ * the epkg encap package manager
+ * all software on which bcfg2 depends
+ * bcfg2 itself
+ * ostiary to kick off bcfg2 client runs remotely
+ * daemontools to run bcfg2 client as a periodic service with logging
+ * all with site-specific configuration parameters, set at build time in a
+ single unified build-time configuration file, site-settings.conf
+ * optional install-time entry of bcfg2 and ostiary passwords, interactively
+ or via environment variables
+
+As well as:
+ * encap packages for software on which the bcfg2 server functionality
+ depends (glib, gamin, and cheetah)
+ * encaps of optional documentation packages
+
+== Internet resources ==
+For a more general overview of what this is, see:
+ * http://trac.mcs.anl.gov/projects/bcfg2/wiki/EncapPackages
+
+You can obtain the latest version of the code from bcfg2 svn:
+ * `svn co https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2/encap`
+
+== Operation notes ==
+Using the encap package manager this code automatically downloads, builds and
+creates encap packages for bcfg2 and dependencies to `/usr/local/encap`, and
+installs symbolic links to these packages from `/usr/local` (the usual encap
+thing).
+
+It attempts to be as self contained as possible; everything gets linked to
+under `/usr/local/lib/bcfg2`, except for bcfg2 itself and some dependent
+software, which is prefixed by `b2-` (`b2-openssl`, `b2-python` etc.).
+
+To run the bcfg2 server, you also need to install gamin, which
+supports a subset of the platforms bcfg2 client will work on, including
+GNU/Linux (but first install glib, on which gamin depends). You also need to
+install the cheetah templating system on the bcfg2 server if you wish to use
+the bcfg2 templating functionality.
+
+== Important differances from upstream sources ==
+ * `/usr/local/etc/bcfg2.conf` is used instead of `/etc/bcfg2.conf`
+ * In general, everything is under `/usr/local` instead of `/`
+
+== About ostiary integration ==
+TODO
+
+== About daemontools integration ==
+TODO
+
+== Environment variables ==
+TODO
+Before the initial make/gmake and before the client install, you can set some
+environment variables to control some behaviors:
+ * DEST=""
+ * FORCE_CONFIG="yes"
+ *
+
+== Supported Platforms ==
+Below is a table of platforms that have been successfully bootstrapped using
+this code.
+
+|| OS || Vendor || Version || Arch || GCC || By || Bcfg2 (+svn) ||
+|| AIX || IBM || 5.3 || POWER || 4.1.0 || dc || 0.8.2 +r???? ||
+|| GNU/Linux || Debian || Sarge || i386 || 3.3.5 || dc || 0.8.2 +r???? ||
+|| GNU/Linux || Debian || Sid || i386 || 4.1.2 || dc || 0.8.2 +r???? ||
+|| GNU/Linux || Ubuntu || Dapper || i386 || 4.0.3 || dc || 0.8.2 +r???? ||
+|| Solaris || Sun || 10 || Sparc || 3.4.3 || dc || 0.8.2 +r???? ||
+|| Solaris || Sun || 10 || i386 || 3.4.3 || dc || 0.8.2 +r???? ||
+
+dc: "Daniel Clark" <mailto:dclark@member.fsf.org>
+
+If you bootstrap a platform not listed above, please add a comment to:
+ * http://trac.mcs.anl.gov/projects/bcfg2/ticket/74
+so that platform can be added to the list.
+
+If you modified any of the files in this package to be able to bootstrap the
+new platform, please include either diffs or a tarball of your modified
+version in a new ticket so your changes can be incorporated into a new
+release.
+
+Any other notes, such as where you got the GNU binaries or any issues people
+should be aware of, would also be appreciated.
+
+You may want to scan all of the bootstrapped binaries and libraries with
+`ldd` (or equivalent) to make sure there are no dependencies on libraries
+other than those included with the base operating system and the libraries
+built as part of the bootstrap process.
+
+== libgcc and libstdc++ ==
+On non-GNU operating systems, libgcc and libstdc++ are a run-time
+requirement. These libraries are usually distributed with gcc/g++, so the
+bootstrap system attempts to create encap packages containing those
+libraries by copying them from the build machine. To test that this worked,
+you'll want to either temporarily remove gcc/g++ from the build machine and
+make sure everything still works, or install the bcfg2-*.tar.gz encap
+packages on a "clean" machine (without a gcc/g++ install) and test on that
+machine.
+
+== Encap profile (.ep) documentation ==
+Note that the doc for the encap profile format is in
+[wiki:EncapManEncapProfile "`man 5 encap_profile`"].
+
+== Next steps ==
+ 1. Build and install; see [wiki:EncapInstall INSTALL]
+ 1. Set up your server and clients; see [wiki:EncapHowto HOWTO]
+
+== Documentation Version ==
+$Id$
diff --git a/encap/TODO b/encap/TODO
index 259740fb3..ce9466129 100644
--- a/encap/TODO
+++ b/encap/TODO
@@ -1,13 +1,37 @@
-= TODO =
+= EncapTodo: TODO =
-== For 0.8.4 ==
+== For 0.8.3 ==
+ * Fix "from httplib import HTTPS" issue
+
+ * Update README and INSTALL
+
* Build everywhere, basic test
- * Double-check all permissions, and make sure they are not effected by
- the environment's umask
+== For 0.8.4 ==
+
+ * Possibly add GNU Readline library for python
+
+ * Write HOWTO
+
+ * Packages all deps of new reports (django etc.) for GNU/Linux
+
+== For 0.8.5 or earlier ==
- * Big documentation update
+ * Cut down distribution size to something more reasonable
+ * Some platforms are now >150MB (installed)
+ * Remove unneeded doc / test code / etc.
+ * Perhaps make seperate -doc- or -extra- encap packages
+ * Improve handling of libgcc/libstdc++
+
+ * Try to make build not effect the build host as much
+
+ * Try to make it easier to build as non-root
+
* Handle removals nicely (preremove/postremove scripts)
* Work towards full compliance with encap 2.1 spec
+ * Remove /service links in remove scripts for daemontools services
+
+== Documentation Version ==
+$Id$
diff --git a/encap/VERSION b/encap/VERSION
deleted file mode 100644
index b3e7b0fc6..000000000
--- a/encap/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-.91
diff --git a/encap/src/Makefile b/encap/src/Makefile
index 9547709dd..fec6f66b7 100644
--- a/encap/src/Makefile
+++ b/encap/src/Makefile
@@ -2,7 +2,10 @@
export SHELL = /bin/sh
-.PHONY : test log all clean uninstall
+.PHONY : test log all clean distclean uninstall
+
+DEST ?= DIST
+MKINSTALLDIRS = ./bcfg2-site/bcfg2-site-RENAME/mkinstalldirs
log :
@printf "Building in background, and logging to ./make.log\n"
@@ -12,21 +15,31 @@ all :
$(MAKE) -C ./encap-profiles all
$(MAKE) -C ./bcfg2-site all
$(MAKE) -C ./makeself-dist all
+ if [ ! -d $(DEST) ]; then $(MKINSTALLDIRS) $(DEST); fi
+ cp makeself-dist/*.run $(DEST)
+ cp encap-profiles/*doc*.tar.gz $(DEST)
+ cp encap-profiles/bcfg2-cheetah-[0-9]*.tar.gz $(DEST)
+ -cp encap-profiles/bcfg2-glib-*.tar.gz $(DEST)
+ -cp encap-profiles/bcfg2-gamin-*.tar.gz $(DEST)
@printf "\n\n### encap build finished...\n"
@printf "## Client install self-extracting/installing package is:\n"
- @printf "%s\n" "`ls makeself-dist/*.run 2>/dev/null`"
+ @printf "%s\n" "`ls $(DEST)/*.run 2>/dev/null`"
@printf "# Use 'epkg -i <packagename>' to install encap packages...\n"
@printf "## Doc encap packages are:\n"
- -@(ls encap-profiles/*doc*.tar.gz 2>/dev/null)
+ -@(ls $(DEST)/*doc*.tar.gz 2>/dev/null)
@printf "## Server encap packages, if built (GNU/Linux only), are:\n"
- -@printf "%s\n" "`ls encap-profiles/bcfg2-glib-*.tar.gz 2>/dev/null`"
- -@printf "%s\n" "`ls encap-profiles/bcfg2-gamin-*.tar.gz 2>/dev/null`"
- -@printf "%s\n" "`ls encap-profiles/bcfg2-cheetah-[0-9]*.tar.gz 2>/dev/null`"
+ -@printf "%s\n" "`ls $(DEST)/bcfg2-glib-*.tar.gz 2>/dev/null`"
+ -@printf "%s\n" "`ls $(DEST)/bcfg2-gamin-*.tar.gz 2>/dev/null`"
+ -@printf "%s\n" "`ls $(DEST)/bcfg2-cheetah-[0-9]*.tar.gz 2>/dev/null`"
@printf "\n"
clean :
-rm ./*.log ./*~ ./\#*
+distclean: clean
+ -rm $(DEST)/*
+ -rmdir $(DEST)
+
uninstall : clean
$(MAKE) -C ./encap-profiles uninstall
$(MAKE) -C ./bcfg2-site distclean
diff --git a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl
index 8a20a968d..1ac29eb7e 100755
--- a/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl
+++ b/encap/src/bcfg2-site/bcfg2-site-RENAME/postinstall.tmpl
@@ -22,17 +22,33 @@ ${MKINSTALLDIRS} "${BASEDIR}/sbin"
rmcp() {
SRCFILENAME="`basename ${1}`"
- if [ -d "${2}" ]; then
+ 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
+ RMTARGET="no"
+ if [ -h "$TARGETNAME" ]; then RMTARGET="yes"; fi
+ if [ -f "$TARGETNAME" ]; then RMTARGET="yes"; fi
+ if [ "${RMTARGET}x"="yesx" ]; then
+ DATE="`date +%Y-%m-%d--%H-%M-%S`"
+ printf "INFO: Moving old $TARGETNAME to ${TARGETNAME}-${DATE}...\n"
+ cp "$TARGETNAME" "${TARGETNAME}-${DATE}" && rm "$TARGETNAME"
+ fi
+ printf "INFO: Copying %s to %s...\n" "$1" "$2"
cp "$1" "$2"
}
+# bcfg2-client (options)
+if [ "${REPLACE_CONFIG}x" = "yesx" ]; then
+ printf "REPLACE_CONFIG=yes, so removing bcfg2-client sentinel files...\n"
+ S_B="${BASEDIR}/etc/default/bcfg2-client/.SENTINEL_BCFG2"
+ test -f ${S_B} && rm ${S_B}
+ S_S="${BASEDIR}/etc/default/bcfg2-client/.SENTINEL_SITE"
+ test -f ${S_S} && rm ${S_S}
+fi
+
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"
@@ -46,6 +62,15 @@ else
touch ${BASEDIR}/$DIR/.SENTINEL_SITE
fi
+# bcfg2-server (options)
+if [ "${REPLACE_CONFIG}x" = "yesx" ]; then
+ printf "REPLACE_CONFIG=yes, so removing bcfg2-server sentinel files...\n"
+ S_B="${BASEDIR}/etc/default/bcfg2-server/.SENTINEL_BCFG2"
+ test -f ${S_B} && rm ${S_B}
+ S_S="${BASEDIR}/etc/default/bcfg2-server/.SENTINEL_SITE"
+ test -f ${S_S} && rm ${S_S}
+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"
@@ -58,6 +83,15 @@ else
touch ${BASEDIR}/$DIR/.SENTINEL_SITE
fi
+# bcfg2.conf & ostiary.conf
+if [ "${REPLACE_CONFIG}x" = "yesx" ]; then
+ printf "REPLACE_CONFIG=yes, so removing ${BASEDIR}/etc sentinel files...\n"
+ S_B="${BASEDIR}/etc/.SENTINEL_BCFG2"
+ test -f ${S_B} && rm ${S_B}
+ S_S="${BASEDIR}/etc/.SENTINEL_SITE"
+ test -f ${S_S} && rm ${S_S}
+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"
@@ -70,6 +104,15 @@ else
touch ${BASEDIR}/etc/.SENTINEL_SITE
fi
+# ost-bcfg2.sh
+if [ "${REPLACE_CONFIG}x" = "yesx" ]; then
+ printf "REPLACE_CONFIG=yes, so removing ${BASEDIR}/sbin sentinel files...\n"
+ S_B="${BASEDIR}/sbin/.SENTINEL_BCFG2"
+ test -f ${S_B} && rm ${S_B}
+ S_S="${BASEDIR}/sbin/.SENTINEL_SITE"
+ test -f ${S_S} && rm ${S_S}
+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"
@@ -81,8 +124,10 @@ else
touch ${BASEDIR}/sbin/.SENTINEL_SITE
fi
+# ostiary (daemontools)
if [ ! -h /service/ostiary ]; then
if [ -d /usr/local/var/svc.d/ostiary ]; then
+ printf "INFO: Enabling ostiary service (via daemontools)...\n"
ln -s /usr/local/var/svc.d/ostiary /service/ostiary
else
printf "ERROR: /usr/local/var/svc.d/ostiary does not exist.\n"
@@ -92,19 +137,22 @@ else
printf "INFO: /service/ostiary already exists, not replacing...\n"
fi
+# bcfg2-client (daemontools)
//if int(@BCFG2_CLIENT_RUN_INTERVAL_SECONDS) > 0
if [ ! -h /service/bcfg2-client ]; then
if [ -d /usr/local/var/svc.d/bcfg2-client ]; then
+ printf "INFO: Enabling bcfg2-client service (via daemontools)...\n"
ln -s /usr/local/var/svc.d/bcfg2-client /service/bcfg2-client
else
printf "ERROR: /usr/local/var/svc.d/bcfg2-client does not exist.\n"
- exit 1
+ printf "ERROR: Could not enable bcfg2-client service.\n"
fi
else
printf "INFO: /service/bcfg2-client already exists, not replacing...\n"
fi
//end if
+# end
printf "Finished ${ENCAP_PKGNAME} postinstall script.\n"
exit 0
diff --git a/encap/src/encap-profiles/Makefile b/encap/src/encap-profiles/Makefile
index f2c4d04b9..664aea619 100644
--- a/encap/src/encap-profiles/Makefile
+++ b/encap/src/encap-profiles/Makefile
@@ -141,6 +141,14 @@ rename : encaps
fi; \
done; \
fi
+ for OLDNAME in `ls ./*-doc-*-encap-*.tar.gz`; do \
+ NEWNAME="`printf "%s\n" "$${OLDNAME}" \
+ | awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' \
+ | sed s:\ :-:g | sed s:OSDIST:share:g`" ; \
+ if [ "$${OLDNAME}x" != "$${NEWNAME}x" ]; then \
+ mv ./$${OLDNAME} ./$${NEWNAME}; \
+ fi; \
+ done;
clean :
-(rm ./*.log; rm ./*.packaged; rm ./*.gz; rm ./*~)
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 454aeced1..d94aba979 100644
--- a/encap/src/encap-profiles/bcfg2-python-2.4.3.ep
+++ b/encap/src/encap-profiles/bcfg2-python-2.4.3.ep
@@ -83,6 +83,18 @@ PLATFORM_ENDIF
--disable-ipv6
</configure>
+<build type="append"><![CDATA[
+# Make sure linking to openssl worked
+${builddir}/python -c "from httplib import HTTPS" || HS="no"; \
+if [ "${HS}x" = "nox" ]; then \
+ printf "ERROR: HTTPS fails (usually a problem with linking against "; \
+ printf "openssl), aborting...\n"; \
+ exit 1; \
+else \
+ printf "INFO: HTTPS works\n"; \
+fi
+]]></build>
+
</source>
<prepackage><![CDATA[
diff --git a/encap/src/makeself-dist/makedist.sh b/encap/src/makeself-dist/makedist.sh
index 72855dc4f..68aee6c99 100755
--- a/encap/src/makeself-dist/makedist.sh
+++ b/encap/src/makeself-dist/makedist.sh
@@ -234,6 +234,18 @@ chgrp 0 \${LOC_OST_CFG}*
chmod 600 \${LOC_BCFG2_CONF}*
chmod 600 \${LOC_OST_CFG}*
+# Restart services if they exist to catch any config file changes
+if [ -x /command/svc -a -x /command/svstat ]; then
+ for LOC_SERVICE in bcfg2-client bcfg2-server ostiary; do
+ if [ -h /service/\${LOC_SERVICE} ]; then
+ printf "Restarting daemontools service \${LOC_SERVICE}...\n"
+ /command/svc -t /service/\${LOC_SERVICE}
+ sleep 2
+ /command/svstat /service/\${LOC_SERVICE}
+ fi
+ done
+fi
+
exit 0
EOF
@@ -241,7 +253,7 @@ EOF
chmod 755 $DISTDIR/setup.sh
# Create .run file from $DISTDIR with makeself
-BLURB="Bcfg2 Client install for $SITENAME (version $SITEVER)"
+BLURB="Bcfg2 Client install for $SITENAME (version $SITEVER) - export REPLACE_CONFIG=yes before running to force config file replacement"
${MAKESELF} --nox11 $DISTDIR ${DISTDIR}.run "$BLURB" ./setup.sh
exit 0