diff options
| author | James Turnbull <james@lovedthanlost.net> | 2008-07-10 19:52:26 +1000 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2008-07-10 19:52:26 +1000 |
| commit | 605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52 (patch) | |
| tree | bfab41f07b972f61585ef2fcf454ad9fdef6c832 /conf | |
| parent | d25c2b282cc4cd703bba3d2457f93431098ddc85 (diff) | |
| download | puppet-605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52.tar.gz puppet-605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52.tar.xz puppet-605d760dd72b7b6bd3fd54e9f6c3ffacb1b9ee52.zip | |
Moved debian to conf and updated examples directory
Diffstat (limited to 'conf')
| -rw-r--r-- | conf/debian/README.source | 2 | ||||
| -rw-r--r-- | conf/debian/TODO.Debian | 1 | ||||
| -rw-r--r-- | conf/debian/changelog | 257 | ||||
| -rw-r--r-- | conf/debian/compat | 1 | ||||
| -rw-r--r-- | conf/debian/control | 45 | ||||
| -rw-r--r-- | conf/debian/copyright | 17 | ||||
| -rw-r--r-- | conf/debian/docs | 1 | ||||
| -rw-r--r-- | conf/debian/fileserver.conf | 12 | ||||
| -rw-r--r-- | conf/debian/puppet.NEWS | 63 | ||||
| -rw-r--r-- | conf/debian/puppet.conf | 8 | ||||
| -rw-r--r-- | conf/debian/puppet.dirs | 7 | ||||
| -rw-r--r-- | conf/debian/puppet.files | 6 | ||||
| -rw-r--r-- | conf/debian/puppet.init | 64 | ||||
| -rw-r--r-- | conf/debian/puppet.logrotate | 11 | ||||
| -rw-r--r-- | conf/debian/puppet.postinst | 9 | ||||
| -rw-r--r-- | conf/debian/puppet.postrm | 21 | ||||
| -rw-r--r-- | conf/debian/puppet.preinst | 25 | ||||
| -rw-r--r-- | conf/debian/puppetmaster.files | 4 | ||||
| -rw-r--r-- | conf/debian/puppetmaster.init | 58 | ||||
| -rwxr-xr-x | conf/debian/rules | 115 | ||||
| -rw-r--r-- | conf/debian/watch | 2 |
21 files changed, 729 insertions, 0 deletions
diff --git a/conf/debian/README.source b/conf/debian/README.source new file mode 100644 index 000000000..fd9155241 --- /dev/null +++ b/conf/debian/README.source @@ -0,0 +1,2 @@ +The debian directory is now maintained on Alioth in git. +See http://pkg-puppet.alioth.debian.org/ for more information. diff --git a/conf/debian/TODO.Debian b/conf/debian/TODO.Debian new file mode 100644 index 000000000..ac70b97be --- /dev/null +++ b/conf/debian/TODO.Debian @@ -0,0 +1 @@ +* clean up initscripts per http://mail.madstop.com/pipermail/puppet-dev/2006-June/001069.html diff --git a/conf/debian/changelog b/conf/debian/changelog new file mode 100644 index 000000000..69984d622 --- /dev/null +++ b/conf/debian/changelog @@ -0,0 +1,257 @@ +puppet (0.24.1-2) unstable; urgency=low + + * Set rundir correctly (Closes: #460203, #459579) + * Apply patch for puppet#1003 to enable collection of tagged resources + + -- Thom May <thom@debian.org> Wed, 16 Jan 2008 11:08:55 +0100 + +puppet (0.24.1-1) unstable; urgency=low + + * New upstream release (Closes: #445626) + * Set maintainer to pkg-puppet-devel + + -- Thom May <thom@debian.org> Sun, 30 Dec 2007 19:13:47 +0100 + +puppet (0.24.0-1) unstable; urgency=low + + * New upstream release + + -- Thom May <thom@debian.org> Wed, 19 Dec 2007 16:00:34 +0100 + +puppet (0.23.2-15) unstable; urgency=low + + * No change upload setting maintainer to me whilst waiting for an alioth + project. + + -- Thom May <thom@debian.org> Thu, 29 Nov 2007 10:44:50 +0100 + +puppet (0.23.2-14) unstable; urgency=low + + * Orphaning. + * Create /var/lib/puppet in the puppet package. Closes: #452506. + * Start the puppet init script after puppetmaster, to silence whiny bug + reports. Closes: #452064. + * Add a reload command to the Puppet init script. Closes: #452060. + + -- Matthew Palmer <mpalmer@debian.org> Thu, 29 Nov 2007 10:48:21 +1100 + +puppet (0.23.2-13) unstable; urgency=low + + * Drop quotes from an already-quoted value in a query. Closes: #448179. + * Remove excessive quoting from puppet/network/handler/master.rb. + Closes: #448221. + * Force removal of directories during pluginsync. Closes: #448180. + + -- Matthew Palmer <mpalmer@debian.org> Tue, 30 Oct 2007 14:55:19 +1100 + +puppet (0.23.2-12) unstable; urgency=low + + * Create /var/run/puppet and set the perms in the various initscripts, as + well as hardcoding the rundir better in configuration.rb and removing + the explicit rundir setting from puppet.conf. Closes: #447314. + * Apply additional patch given (backwards) to fix export/collect on some + database backends. Closes: #445591 (again!) + + -- Matthew Palmer <mpalmer@debian.org> Sat, 20 Oct 2007 11:28:50 +1000 + +puppet (0.23.2-11) unstable; urgency=low + + * Apply patch from puppet#786 to fix a problem with exported resources not + being properly detected as needing a rerun. Closes: #445591. + * Fix ignore handling for the plugins mount. Closes: #446390. + + -- Matthew Palmer <mpalmer@debian.org> Mon, 15 Oct 2007 09:11:25 +1000 + +puppet (0.23.2-10) unstable; urgency=low + + * Recycle connections when we change (or get) certs. + * Catch and retry more transient errors in the XMLRPC wrapper. + + -- Matthew Palmer <mpalmer@debian.org> Thu, 27 Sep 2007 15:06:11 +1000 + +puppet (0.23.2-9) unstable; urgency=low + + * Recycle the HTTP connection if we get an EPIPE during a request. + Closes: #444177. Thanks to Jos Backus for helping with testing. + + -- Matthew Palmer <mpalmer@debian.org> Thu, 27 Sep 2007 09:55:34 +1000 + +puppet (0.23.2-8) unstable; urgency=low + + * Remove extraneous debugging output accidentally left behind in the last + release. + * Fix spelling mistakes in debian/control and debian/puppet.preinst. + Closes: #444158. + + -- Matthew Palmer <mpalmer@debian.org> Thu, 27 Sep 2007 07:45:07 +1000 + +puppet (0.23.2-7) unstable; urgency=low + + * Ignore ENOENT errors in the module plugin syncing code, since they're + innocuous and expected. + * Allow facts that are downloaded through pluginsync to be used like any + other fact. + * Allow users to still have an old-style plugins mount if they want, by + specifying a path for the mount. Also track down a fault in old-style + fileserving which did strange slash-stripping. Closes: #443932. + + -- Matthew Palmer <mpalmer@debian.org> Tue, 25 Sep 2007 16:41:32 +1000 + +puppet (0.23.2-6) unstable; urgency=low + + * Patch rails/param_name.rb to stop query failures, as per puppet#784. + * Actually honour namevar. + * Only set dbuser if explicitly asked for. + * Fix annoying database deletion error for ParamValue objects. + * Add an accessor for ca_file, since older openssl-ruby only had a writer. + * Fix the fileserver to honour ignore. Thanks to Nathan Ward for the + bug report on IRC. + + -- Matthew Palmer <mpalmer@debian.org> Thu, 20 Sep 2007 16:10:41 +1000 + +puppet (0.23.2-5) unstable; urgency=low + + * Add some NEWS for the ssldir transition. Should have done that earlier. + * Remove the explicit mode change for vardir, and fix up the mode on + statedir, as well. Closes: #425496. + * Only set some database parameters if they're explicitly set; this makes + life easier for PgSQL ident auth. + * Allow empty config options. + + -- Matthew Palmer <mpalmer@debian.org> Thu, 13 Sep 2007 11:09:59 +1000 + +puppet (0.23.2-4) unstable; urgency=low + + * Fix puppet#776 in a slightly better way by only flushing the cache when + a value is changed, rather than whenever a value is read. + * Apply patch from puppet#755 to cache connections to the Puppetmaster, + which improves performance by more than a little. + * Modify the fileserver so that it provides a 'plugins' mount which + exports the union of the plugins directory of all modules. + + -- Matthew Palmer <mpalmer@debian.org> Fri, 31 Aug 2007 15:32:04 +1000 + +puppet (0.23.2-3) unstable; urgency=low + + * Clear the config value cache every time. This is a titchy little + performance hit, but it works around puppet#776 rather nicely. + + -- Matthew Palmer <mpalmer@debian.org> Fri, 24 Aug 2007 16:08:04 +1000 + +puppet (0.23.2-2) unstable; urgency=low + + * Move the SSL state directory to a more policy-friendly location, + /var/lib/puppet/ssl. + + -- Matthew Palmer <mpalmer@debian.org> Tue, 21 Aug 2007 12:54:40 +1000 + +puppet (0.23.2-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer <mpalmer@debian.org> Tue, 7 Aug 2007 12:47:49 +1000 + +puppet (0.23.1-1) unstable; urgency=low + + * New upstream release. + * Switch primary maintainer to me. Thanks jaq. + * Make the recommendation for rails >= 1.2.3-2, to avoid + incompatibilities. This breaks compatibility with stable, but the rails + package from unstable should install cleanly in stable. Closes: #433999 + + -- Matthew Palmer <mpalmer@debian.org> Sat, 21 Jul 2007 16:34:36 +1000 + +puppet (0.23.0-1) unstable; urgency=low + + * New upstream release. + - Includes a new configuration file handling system; see NEWS.Debian. + + -- Matthew Palmer <mpalmer@debian.org> Mon, 25 Jun 2007 09:55:12 +1000 + +puppet (0.22.4-2) unstable; urgency=low + + * Depend on libshadow-ruby1.8, for new password modification functionality + added to upstream 0.22.4. + * Several improvements from Micah Anderson: + - Better vim syntax installation process. + - Install Emacs syntax highlighting. + - Install logcheck rules. Closes: #421851. + + -- Matthew Palmer <mpalmer@debian.org> Thu, 3 May 2007 15:04:15 +1000 + +puppet (0.22.4-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer <mpalmer@debian.org> Wed, 2 May 2007 12:20:15 +1000 + +puppet (0.22.3-1) unstable; urgency=low + + * New upstream release. Closes: #415773. + * Switch to using our own logrotate config, and enhance it as per + David Schmitt's suggestions. Closes: #414282. + * Add puppetrun to the puppetmaster package, and actually put puppetdoc + into the puppet package. Closes: #419273. + * Copy vim syntax highlighting file into the puppet package, and add a + stanza to have Vim automatically highlight .pp files. Closes: #412868. + Thanks to David Schmitt for researching how to do all of that. + * Add a templatedir setting to the default puppetmasterd.conf to make it + obvious that it can be changed. Closes: #407506. + + -- Matthew Palmer <mpalmer@debian.org> Wed, 18 Apr 2007 14:03:33 +1000 + +puppet (0.22.1-1) unstable; urgency=low + + * New upstream release. + + -- Matthew Palmer <mpalmer@debian.org> Fri, 2 Feb 2007 09:06:46 +1100 + +puppet (0.22.0-1) unstable; urgency=low + + * New upstream release. + * Use --startas instead of --init in init scripts, which (according to + Paul Hampson) makes checking for already-running instances work. + Closes: #405912. + + -- Matthew Palmer <mpalmer@debian.org> Mon, 8 Jan 2007 08:41:35 +1100 + +puppet (0.20.1-1) unstable; urgency=low + + * New upstream release. (Closes: #387674) + * Rationalise the puppetmasterd init script. + * Add inclusion of /etc/default files for init scripts. (Closes: #388178) + * Add puppet.conf to match puppetd.conf. (Closes: #385646) + + -- Matthew Palmer <mpalmer@debian.org> Thu, 30 Nov 2006 10:54:19 +1100 + +puppet (0.18.4-1) unstable; urgency=low + + * New upstream release. + - Properly detect all services, including those in rcS.d. + (Closes: #378351) + * Add Homepage: to the long description. (Closes: #377896) + + -- Matthew Palmer <mpalmer@debian.org> Mon, 24 Jul 2006 19:46:06 +1000 + +puppet (0.18.3-1) unstable; urgency=low + + * New upstream version. + - Set DEBIAN_FRONTEND=noninteractive when installing Debian packages. + (Closes: #378338) + + -- Matthew Palmer <mpalmer@debian.org> Sun, 16 Jul 2006 10:58:50 +1000 + +puppet (0.18.1-1) unstable; urgency=low + + * Make Puppet not wait for a cert at all (to prevent startup hangs). + * Cleanup the init scripts to not have NO_START detritus. + * Apply puppet.debian-frontend, to set DEBIAN_FRONTEND=noninteractive on + package installation. + + -- Matthew Palmer <mpalmer@debian.org> Tue, 27 Jun 2006 15:05:32 +1000 + +puppet (0.18.0-1) unstable; urgency=low + + * Initial release. (Closes: #348625) + + -- Matthew Palmer <mpalmer@debian.org> Wed, 24 May 2006 13:10:01 +1000 diff --git a/conf/debian/compat b/conf/debian/compat new file mode 100644 index 000000000..b8626c4cf --- /dev/null +++ b/conf/debian/compat @@ -0,0 +1 @@ +4 diff --git a/conf/debian/control b/conf/debian/control new file mode 100644 index 000000000..8b0e92e7e --- /dev/null +++ b/conf/debian/control @@ -0,0 +1,45 @@ +Source: puppet +Section: admin +Priority: optional +Maintainer: Puppet Package Maintainers <pkg-puppet-devel@lists.alioth.debian.org> +Uploaders: Thom May <thom@debian.org> +Build-Depends-Indep: debhelper (>= 4.0.0), ruby (>= 1.8.1) +Standards-Version: 3.6.2 + +Package: puppet +Architecture: all +Depends: ruby (>= 1.8.1), libxmlrpc-ruby, libopenssl-ruby, libshadow-ruby1.8, adduser, facter, lsb-base +Recommends: rdoc +Description: centralised configuration management for networks + Puppet lets you centrally manage every important aspect of your system + using a cross-platform specification language that manages all the + separate elements normally aggregated in different files, like users, + cron jobs, and hosts, along with obviously discrete elements like + packages, services, and files. + . + Puppet's simple declarative specification language provides powerful + classing abilities for drawing out the similarities between hosts while + allowing them to be as specific as necessary, and it handles dependency + and prerequisite relationships between objects clearly and explicitly. + . + Homepage: http://reductivelabs.com/projects/puppet + +Package: puppetmaster +Architecture: all +Depends: ruby (>= 1.8.1), puppet (= ${Source-Version}), facter, lsb-base +Recommends: rails (>= 1.2.3-2), rdoc +Description: centralised configuration management control daemon + Puppet lets you centrally manage every important aspect of your system + using a cross-platform specification language that manages all the + separate elements normally aggregated in different files, like users, + cron jobs, and hosts, along with obviously discrete elements like + packages, services, and files. + . + Puppet's simple declarative specification language provides powerful + classing abilities for drawing out the similarities between hosts while + allowing them to be as specific as necessary, and it handles dependency + and prerequisite relationships between objects clearly and explicitly. + . + This package contains the manifest server, 'puppetmaster'. + . + Homepage: http://reductivelabs.com/projects/puppet diff --git a/conf/debian/copyright b/conf/debian/copyright new file mode 100644 index 000000000..06bdcab30 --- /dev/null +++ b/conf/debian/copyright @@ -0,0 +1,17 @@ +This package was debianized by Jamie Wilkinson <jaq@debian.org> on +Thu, 27 Apr 2006 10:18:04 +1000. + +It was downloaded from http://reductivelabs.com/downloads/puppet + +Copyright Holder: Luke Kanies <luke@madstop.com> + +License: + +From +http://reductivelabs.com/documents/faq#what-license-is-puppet-released-under: + +Puppet is open source and is released under the GNU Public License. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + diff --git a/conf/debian/docs b/conf/debian/docs new file mode 100644 index 000000000..e845566c0 --- /dev/null +++ b/conf/debian/docs @@ -0,0 +1 @@ +README diff --git a/conf/debian/fileserver.conf b/conf/debian/fileserver.conf new file mode 100644 index 000000000..04a51c080 --- /dev/null +++ b/conf/debian/fileserver.conf @@ -0,0 +1,12 @@ +# This file consists of arbitrarily named sections/modules +# defining where files are served from and to whom + +# Define a section 'files' +# Adapt the allow/deny settings to your needs. Order +# for allow/deny does not matter, allow always takes precedence +# over deny +[files] + path /etc/puppet/files +# allow *.example.com +# deny *.evil.example.com +# allow 192.168.0.0/24 diff --git a/conf/debian/puppet.NEWS b/conf/debian/puppet.NEWS new file mode 100644 index 000000000..a712aafd4 --- /dev/null +++ b/conf/debian/puppet.NEWS @@ -0,0 +1,63 @@ +puppet (0.23.2-12) unstable; urgency=low + + * Handling of the rundir setting has been changed; we now store PID files + in /var/run/puppet, and the initscripts have been modified to ensure + that this directory exists on startup. It is no longer necessary to set + rundir explicitly in /etc/puppet/puppet.conf, and you should ensure that + you have no explicit rundir setting in your puppet.conf unless you want + to use a custom rundir setting for your own local purposes. + + -- Matthew Palmer <mpalmer@debian.org> Sat, 20 Oct 2007 11:58:58 +1000 + +puppet (0.23.2-3) unstable; urgency=low + + * This version of Puppet makes a fairly major change to the location of + the CA and certificates, from /etc/puppet/ssl to the more FHS-compliant + location /var/lib/puppet/ssl. This is to be both policy-compliant and + to match the location of the ssldir in other distributions. + + If you have transitioned to using the consolidated puppet.conf config + file, there should be no problems. If you are using a stock + puppet.conf, the change should be made for you automatically, while if + you've customised puppet.conf the ssldir will be left where it is and + you should transition to the new location manually. + + The only source of problems is if you're still using per-program config + files (puppetd.conf, puppetmasterd.conf, etc). I haven't been able to + work out a damage-free way of transitioning to the new location, so + things will likely break for you -- ssldir will have been moved to + /var/lib/puppet/ssl, but your puppet programs will use the + old config file (with the default ssldir of /etc/puppet/ssl. In this + case, you'll likely get all sorts of certificate-related problems. + + The solution is to either switch to using puppet.conf (which is + necessary anyway because support for the deprecated per-program config + files will be going away sometime) with the new ssldir setting, or add + the ssldir setting to all your per-program config files (this includes + creating them for programs that don't already have a config file, like + puppetca.conf). Then delete /etc/puppet/ssl (since it's not needed) and + use the existing SSL data that was moved to /var/lib/puppet/ssl. + + -- Matthew Palmer <mpalmer@debian.org> Fri, 24 Aug 2007 16:08:04 +1000 + +puppet (0.23.0-1) unstable; urgency=low + + * As of upstream 0.23.0, the configuration file layout has been largely + revamped. Now, instead of having one file per program, there is now + a single file, /etc/puppet/puppet.conf, which contains sections for + each program, as well as a "main" section that sets global config + options relevant for all programs. + + See http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference for + more info. + + For backwards compatibility, all programs still read the per-program + configuration files, and will ignore the generic puppet.conf file if the + per-program file still exists. To prevent accidents, you will need to + do the configuration change manually, by rewriting puppet.conf to match + your local configuration parameters and then deleting the old files. If + you haven't changed any config parameters, then it should be as simple + as deleting puppetd.conf and puppetmasterd.conf and restarting the + daemons, as the configuration itself hasn't changed between versions. + + -- Matthew Palmer <mpalmer@debian.org> Mon, 25 Jun 2007 10:43:53 +1000 diff --git a/conf/debian/puppet.conf b/conf/debian/puppet.conf new file mode 100644 index 000000000..c541c748a --- /dev/null +++ b/conf/debian/puppet.conf @@ -0,0 +1,8 @@ +[main] +logdir=/var/log/puppet +vardir=/var/lib/puppet +ssldir=/var/lib/puppet/ssl +rundir=/var/run/puppet + +[puppetmasterd] +templatedir=/var/lib/puppet/templates diff --git a/conf/debian/puppet.dirs b/conf/debian/puppet.dirs new file mode 100644 index 000000000..9ce18f88e --- /dev/null +++ b/conf/debian/puppet.dirs @@ -0,0 +1,7 @@ +usr/sbin +usr/lib/ruby/1.8 +var/log/puppet +etc/puppet/files +usr/share/vim/addons/ftdetect +usr/share/vim/vim71/syntax +var/lib/puppet diff --git a/conf/debian/puppet.files b/conf/debian/puppet.files new file mode 100644 index 000000000..d92ac32e9 --- /dev/null +++ b/conf/debian/puppet.files @@ -0,0 +1,6 @@ +usr/bin/puppet +usr/bin/puppetdoc +usr/sbin/puppetd +usr/lib/ruby/1.8/ +var/log/puppet +etc/puppet/puppet.conf diff --git a/conf/debian/puppet.init b/conf/debian/puppet.init new file mode 100644 index 000000000..063f9273f --- /dev/null +++ b/conf/debian/puppet.init @@ -0,0 +1,64 @@ +#! /bin/sh + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/puppetd +DAEMON_OPTS="-w 0" +NAME=puppetd +DESC="puppet configuration management tool" + +test -x $DAEMON || exit 0 + +[ -r /etc/default/puppet ] && . /etc/default/puppet + +. /lib/lsb/init-functions + +reload_puppet() { + start-stop-daemon --stop --quiet --signal HUP --pidfile /var/run/puppet/$NAME.pid +} + +start_puppet() { + start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \ + --startas $DAEMON -- $DAEMON_OPTS +} + +stop_puppet() { + start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid +} + +if [ ! -d /var/run/puppet ]; then + rm -rf /var/run/puppet + mkdir -p /var/run/puppet +fi + +chown puppet:puppet /var/run/puppet + +case "$1" in + start) + log_begin_msg "Starting $DESC" + start_puppet + log_end_msg 0 + ;; + stop) + log_begin_msg "Stopping $DESC" + stop_puppet + log_end_msg 0 + ;; + reload) + log_begin_msg "Reloading $DESC" + reload_puppet + log_end_msg 0 + ;; + restart|force-reload) + log_begin_msg "Restarting $DESC" + stop_puppet + sleep 1 + start_puppet + log_end_msg 0 + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/conf/debian/puppet.logrotate b/conf/debian/puppet.logrotate new file mode 100644 index 000000000..3864e396d --- /dev/null +++ b/conf/debian/puppet.logrotate @@ -0,0 +1,11 @@ +/var/log/puppet/*log { + missingok + create 0644 puppet puppet + compress + rotate 4 + + postrotate + [ -e /etc/init.d/puppetmaster ] && /etc/init.d/puppetmaster restart >/dev/null 2>&1 || true + [ -e /etc/init.d/puppet ] && /etc/init.d/puppet reload > /dev/null 2>&1 || true + endscript +} diff --git a/conf/debian/puppet.postinst b/conf/debian/puppet.postinst new file mode 100644 index 000000000..ac765ba85 --- /dev/null +++ b/conf/debian/puppet.postinst @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + if [ -d /etc/puppet/ssl ] && [ ! -e /var/lib/puppet/ssl ] && grep -q 'ssldir=/var/lib/puppet/ssl' /etc/puppet/puppet.conf; then + mv /etc/puppet/ssl /var/lib/puppet/ssl + fi +fi + +#DEBHELPER# diff --git a/conf/debian/puppet.postrm b/conf/debian/puppet.postrm new file mode 100644 index 000000000..da994c3c3 --- /dev/null +++ b/conf/debian/puppet.postrm @@ -0,0 +1,21 @@ +#! /bin/sh + +case "$1" in + purge) + rm -rf /var/lib/puppet + /usr/sbin/deluser --system puppet + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + +esac + +#DEBHELPER# + +exit 0 diff --git a/conf/debian/puppet.preinst b/conf/debian/puppet.preinst new file mode 100644 index 000000000..ce8e76083 --- /dev/null +++ b/conf/debian/puppet.preinst @@ -0,0 +1,25 @@ +#! /bin/sh + +case "$1" in + install|upgrade) + /usr/sbin/adduser --system \ + --group \ + --home /var/lib/puppet \ + --gecos "Puppet configuration management daemon" \ + puppet > /dev/null + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/conf/debian/puppetmaster.files b/conf/debian/puppetmaster.files new file mode 100644 index 000000000..15bc694b1 --- /dev/null +++ b/conf/debian/puppetmaster.files @@ -0,0 +1,4 @@ +usr/sbin/puppetmasterd +usr/sbin/puppetca +usr/sbin/puppetrun +etc/puppet/ diff --git a/conf/debian/puppetmaster.init b/conf/debian/puppetmaster.init new file mode 100644 index 000000000..ea5c1bafb --- /dev/null +++ b/conf/debian/puppetmaster.init @@ -0,0 +1,58 @@ +#! /bin/sh + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/puppetmasterd +DAEMON_OPTS="" +NAME=puppetmasterd +DESC="puppet configuration management tool master server" + +test -x $DAEMON || exit 0 + +[ -r /etc/default/puppetmaster ] && . /etc/default/puppetmaster + +. /lib/lsb/init-functions + +if [ ! -d /var/run/puppet ]; then + rm -rf /var/run/puppet + mkdir -p /var/run/puppet +fi + +chown puppet:puppet /var/run/puppet + +start_puppetmaster() { + start-stop-daemon --start --quiet --pidfile /var/run/puppet/$NAME.pid \ + --startas $DAEMON -- $DAEMON_OPTS +} + +stop_puppetmaster() { + start-stop-daemon --stop --quiet --pidfile /var/run/puppet/$NAME.pid +} + +case "$1" in + start) + log_begin_msg "Starting $DESC" + start_puppetmaster + log_end_msg $? + ;; + stop) + log_begin_msg "Stopping $DESC" + stop_puppetmaster + log_end_msg $? + ;; + reload) + # Do nothing, as Puppetmaster rechecks its config automatically + ;; + restart|force-reload) + log_begin_msg "Restarting $DESC" + stop_puppetmaster + sleep 1 + start_puppetmaster + log_end_msg 0 + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/conf/debian/rules b/conf/debian/rules new file mode 100755 index 000000000..ecabcbad0 --- /dev/null +++ b/conf/debian/rules @@ -0,0 +1,115 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +INSTALL=install -Dp + +prefix := $(CURDIR)/debian/tmp +bindir := $(prefix)/usr/bin +sbindir := $(prefix)/usr/sbin +libdir := $(prefix)/usr/lib +localstatedir := $(prefix)/var +rubylibdir := $(libdir)/ruby/1.8 +sysconfdir := $(prefix)/etc +pkgconfdir := $(sysconfdir)/puppet + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # ripped from the redhat spec + # this sucks, who wants to maintain this? + # note to self, fix the install.rb to handle DESTDIR and change + # library path + install -d -m0755 $(sbindir) + install -d -m0755 $(bindir) + install -d -m0755 $(rubylibdir) + install -d -m0755 $(pkgconfdir)/manifests + install -d -m0755 $(localstatedir)/lib/puppet + install -d -m0755 $(localstatedir)/run + install -d -m0755 $(localstatedir)/log/puppet + + $(INSTALL) -m0755 bin/puppet bin/puppetdoc $(bindir) + $(INSTALL) -m0755 bin/puppetd bin/puppetmasterd bin/puppetca bin/puppetrun $(sbindir) + $(INSTALL) -m0644 lib/puppet.rb $(rubylibdir)/puppet.rb + cp -a lib/puppet $(rubylibdir) + find $(rubylibdir) -type f -perm +ugo+x -exec chmod a-x {} \; + + $(INSTALL) -m0644 debian/fileserver.conf $(pkgconfdir)/fileserver.conf + $(INSTALL) -m0644 debian/puppet.conf $(pkgconfdir)/puppet.conf + + # Vim auto-syntax-highlighting stuff + $(INSTALL) -m0644 ext/vim/syntax/puppet.vim \ + $(CURDIR)/debian/puppet/usr/share/vim/vim71/syntax/ + $(INSTALL) -m0644 ext/vim/ftdetect/puppet.vim \ + $(CURDIR)/debian/puppet/usr/share/vim/addons/ftdetect/ + + # Emacs keeping up with the Joneses + $(INSTALL) -m0644 ext/emacs/puppet-mode-init.el \ + $(CURDIR)/debian/puppet/etc/emacs/site-start.d/50puppet-mode-init.el + $(INSTALL) -m0644 ext/emacs/puppet-mode.el \ + $(CURDIR)/debian/puppet/usr/share/emacs/site-lisp/puppet-mode.el + + dh_installexamples examples/* + + # Logcheck rules. Gee I wish you could specify a file to source + # in dh_installlogcheck. + cp ext/logcheck/puppet debian/puppet.logcheck.ignore.server + cp ext/logcheck/puppet debian/puppet.logcheck.ignore.workstation + dh_installlogcheck + rm debian/puppet.logcheck.* + + # Clean out any SVN cruft that may still be lingering in our + # packages + find debian/tmp debian/puppet debian/puppetmaster -name .svn |xargs rm -rf + +# Build architecture-dependent files here. +binary-arch: build install + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_movefiles -i + dh_installchangelogs -i CHANGELOG + dh_installdocs -i + dh_installinit -ppuppetmaster + dh_installinit -ppuppet -- defaults 21 + dh_installlogrotate -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/conf/debian/watch b/conf/debian/watch new file mode 100644 index 000000000..29d439f6d --- /dev/null +++ b/conf/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://reductivelabs.com/downloads/puppet/puppet-([0-9]+\..*)\.tgz |
