lbcd (3.3.0-1) debian-dir only changes

Summary

 debian/changelog |   79 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/compat    |    1 
 debian/control   |   23 +++++++++++++++
 debian/copyright |   40 +++++++++++++++++++++++++++
 debian/default   |   12 ++++++++
 debian/init      |   81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/postinst  |   26 +++++++++++++++++
 debian/postrm    |    7 ++++
 debian/prerm     |   15 ++++++++++
 debian/rules     |   65 ++++++++++++++++++++++++++++++++++++++++++++
 debian/watch     |    9 ++++++
 11 files changed, 358 insertions(+)

    
download this patch

Patch contents

--- lbcd-3.3.0.orig/debian/changelog
+++ lbcd-3.3.0/debian/changelog
@@ -0,0 +1,79 @@
+lbcd (3.3.0-1) unstable; urgency=low
+
+  * [4107c5d] Imported Upstream version 3.3.0
+  * [965cd57] create a pid dir since lbcd runs non root
+  * [db4ed40] bump standards version
+
+ -- Guido Guenther <agx@sigxcpu.org>  Wed, 17 Sep 2008 10:06:02 +0200
+
+lbcd (3.2.6-3) unstable; urgency=low
+
+  * Upload to unstable (Closes: #488372) 
+
+ -- Guido Guenther <agx@sigxcpu.org>  Mon, 30 Jun 2008 18:55:49 -0300
+
+lbcd (3.2.6-2) unstable; urgency=low
+
+  * [0c80707] add myself to uploaders
+  * [ef07945] init script: add LSB header
+  * [e150623] start lbcd by default
+  * [78b3ac6] don't run lbcd as root
+
+ -- Guido Guenther <agx@sigxcpu.org>  Sat, 28 Jun 2008 00:04:49 +0200
+
+lbcd (3.2.6-1) unstable; urgency=low
+
+  * New upstream release.
+  * Don't fail on stop and restart actions in the init script if lbcd was
+    not already running.
+  * Ignore failures in prerm from the old init script, since it will fail
+    if lbcd couldn't be stopped.
+  * Update standards version to 3.7.2 (no changes required).
+
+ -- Russ Allbery <rra@debian.org>  Tue, 16 May 2006 12:01:08 -0700
+
+lbcd (3.2.5-1) unstable; urgency=low
+
+  * New upstream release.
+    - Fix a bug in using external commands to generate weights.
+  * Add a watch file.
+
+ -- Russ Allbery <rra@debian.org>  Mon, 10 Apr 2006 20:51:34 -0700
+
+lbcd (3.2.4-1) unstable; urgency=low
+
+  * New upstream release.
+    - Document behavior on systems with multiple interfaces.
+  * General debian/rules cleanup.
+  * Update debian/copyright to my current format.
+  * Update to standards version 3.6.2 (no changes required).
+  * Update maintainer address.
+
+ -- Russ Allbery <rra@debian.org>  Fri, 17 Mar 2006 23:26:43 -0800
+
+lbcd (3.2.3-1) unstable; urgency=low
+
+  * New upstream release adding the -b option to lbcd.
+
+ -- Russ Allbery <rra@stanford.edu>  Thu, 24 Feb 2005 20:02:29 -0800
+
+lbcd (3.2.2-1) unstable; urgency=low
+
+  * New upstream release.
+    - Improved documentation.
+
+ -- Russ Allbery <rra@stanford.edu>  Tue, 16 Nov 2004 14:40:48 -0800
+
+lbcd (3.2.1-1) unstable; urgency=low
+
+  * New upstream release.
+    - Fixes -R mode on Linux when responding to v2 queries.
+
+ -- Russ Allbery <rra@stanford.edu>  Thu, 16 Sep 2004 16:12:51 -0700
+
+lbcd (3.2.0-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Russ Allbery <rra@stanford.edu>  Thu, 19 Aug 2004 17:30:18 -0700
+
--- lbcd-3.3.0.orig/debian/compat
+++ lbcd-3.3.0/debian/compat
@@ -0,0 +1 @@
+4
--- lbcd-3.3.0.orig/debian/control
+++ lbcd-3.3.0/debian/control
@@ -0,0 +1,23 @@
+Source: lbcd
+Section: net
+Priority: optional
+Maintainer: Russ Allbery <rra@debian.org>
+Uploaders: Guido Guenther <agx@sigxcpu.org>
+Build-Depends: debhelper (>= 4.0.0)
+Standards-Version: 3.8.0
+
+Package: lbcd
+Architecture: any
+Depends: ${shlibs:Depends}, adduser
+Description: Return system load via UDP for remote load balancers
+ lbcd is a daemon that answers UDP queries for system load information and
+ returns such information as uptime, load, number of logged-in users,
+ percentage free of /tmp and /var/tmp, and whether there is a user on the
+ console.  It is intended for use with a load balancing system, and is
+ particularly useful for such things as Unix clusters for remote login
+ where a traditional hardware load balancing solution doesn't work as well.
+ .
+ No load balancing system is included in this package, only the client
+ daemon and a simple Perl script to query it.  No security or access
+ control is done by the daemon, so access control must be done via
+ iptables, a firewall, or an equivalent system.
--- lbcd-3.3.0.orig/debian/copyright
+++ lbcd-3.3.0/debian/copyright
@@ -0,0 +1,40 @@
+Debianized by Russ Allbery <rra@debian.org>                     2004-08-14
+
+It was downloaded from:
+
+    <http://www.eyrie.org/~eagle/software/lbcd/>
+
+Upstream authors:
+
+    lbcd was originally written by Roland Schemers and was significantly
+    updated by Larry Schwimmer.  The current maintainer is Russ Allbery
+    <rra@stanford.edu>, who also maintains the Debian package.
+
+Debian packaging copyright:
+
+    All Debian packaging files and modifications for Debian are covered
+    under the same copyright and license as the upstream lbcd source.
+
+Copyright:
+
+    Copyright 1993, 1994, 1996, 1997, 1998, 2000, 2003, 2004, 2005, 2006
+    Board of Trustees, Leland Stanford Jr.  University.
+  
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, sublicense, and/or sell copies of the Software, and to
+    permit persons to whom the Software is furnished to do so, subject to
+    the following conditions:
+    
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+    
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--- lbcd-3.3.0.orig/debian/default
+++ lbcd-3.3.0/debian/default
@@ -0,0 +1,12 @@
+# /etc/default/lbcd -- Defaults for the lbcd init script.  -*- sh -*-
+#
+# This file is sourced by /etc/init.d/lbcd and is used to configure the
+# behavior of the init script.  This file must follow standard POSIX shell
+# syntax.
+
+# To not start lbcd at boot commount or remove this line
+NO_START=0
+
+# Additional options to pass to lbcd.  This is the place to put -R, -c, or
+# any similar options that are needed.
+DAEMON_OPTS="-P/var/run/lbcd/lbcd.pid"
--- lbcd-3.3.0.orig/debian/init
+++ lbcd-3.3.0/debian/init
@@ -0,0 +1,81 @@
+#! /bin/sh
+# /etc/init.d/lbcd -- Init script for lbcd load information daemon.
+#
+# Written by Russ Allbery <rra@stanford.edu>
+# Based on the dh-make template written by:
+#
+#     Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#     Modified for Debian 
+#     by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+### BEGIN INIT INFO
+# Provides:          lbcd
+# Required-Start:    $syslog $remote_fs
+# Required-Stop:     $syslog $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: lb client daemon
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/lbcd
+NAME=lbcd
+DESC=lbcd
+PIDDIR=/var/run/lbcd/
+OWNER=lbcd
+GROUP=lbcd
+
+set -e
+
+test -x $DAEMON || exit 0
+
+# Include lbcd defaults if available.
+if [ -f /etc/default/lbcd ] ; then
+    . /etc/default/lbcd
+fi
+
+# Create a dir for the pidfile since lbcd runs nonroot
+create_piddir()
+{
+    mkdir -p $PIDDIR
+    chown $OWNER:$GROUP $PIDDIR
+}
+
+case "$1" in
+start)
+    # Don't start lbcd if NO_START is set.
+    if [ "$NO_START" = 1 ] ; then
+        echo "Not starting $DESC (see /etc/default/$NAME)"
+        exit 0
+    fi
+    echo -n "Starting $DESC: "
+    create_piddir
+    start-stop-daemon -c lbcd -g lbcd --start --quiet --pidfile $PIDDIR$NAME.pid \
+        --exec $DAEMON -- $DAEMON_OPTS
+    echo "$NAME."
+    ;;
+stop)
+    echo -n "Stopping $DESC: "
+    start-stop-daemon --stop --quiet --pidfile $PIDDIR$NAME.pid \
+        --oknodo --exec $DAEMON
+    echo "$NAME."
+    ;;
+reload)
+    ;;
+restart|force-reload)
+    echo -n "Restarting $DESC: "
+    start-stop-daemon --stop --quiet --pidfile $PIDDIR$NAME.pid \
+        --oknodo --exec $DAEMON
+    sleep 1
+    start-stop-daemon -c lbcd -g lbcd --start --quiet --pidfile $PIDDIR$NAME.pid \
+        --exec $DAEMON -- $DAEMON_OPTS
+    echo "$NAME."
+    ;;
+*)
+    N=/etc/init.d/$NAME
+    echo "Usage: $N {start|stop|restart|force-reload}" >&2
+    exit 1
+    ;;
+esac
+
+exit 0
--- lbcd-3.3.0.orig/debian/postinst
+++ lbcd-3.3.0/debian/postinst
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Mostly we want to use the debhelper default.  However, older versions of
+# lbcd didn't ignore failures to stop lbcd in the init script, meaning that if
+# shishid wasn't running, the prerm would fail and the package couldn't be
+# upgraded.  Provide a failure handler that honors failure here and one that
+# ignores failure in the prerm script.  dh_installinit is then told to call
+# these functions instead of its exit $? default using the --error-handler
+# option.
+
+maybe_ignore_failure () {
+    exit $?
+}
+
+case "$1" in
+    configure)
+        if ! getent passwd lbcd >/dev/null; then
+		adduser --disabled-password --quiet --system --no-create-home \
+			 --gecos "Load Balancing Client Daemon" --group lbcd
+	fi
+	;;
+    *)
+    ;;
+esac
+
+#DEBHELPER#
--- lbcd-3.3.0.orig/debian/postrm
+++ lbcd-3.3.0/debian/postrm
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ "$1" = "purge" ]; then
+    deluser --quiet --system lbcd > /dev/null || true
+fi
+
+#DEBHELPER#
--- lbcd-3.3.0.orig/debian/prerm
+++ lbcd-3.3.0/debian/prerm
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Mostly we want to use the debhelper default.  However, older versions of
+# lbcd didn't ignore failures to stop lbcd in the init script, meaning that if
+# shishid wasn't running, the prerm would fail and the package couldn't be
+# upgraded.  Provide a failure handler that ignores failure here and one that
+# pays attention to failure in the postinst script.  dh_installinit is then
+# told to call these functions instead of its exit $? default using the
+# --error-handler option.
+
+maybe_ignore_failure () {
+    true
+}
+
+#DEBHELPER#
--- lbcd-3.3.0.orig/debian/rules
+++ lbcd-3.3.0/debian/rules
@@ -0,0 +1,65 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Written by by Russ Allbery <rra@stanford.edu>
+# Based on the dh_make template, GNU copyright 1997 to 1999 by Joey Hess.
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+    CFLAGS += -O0
+else
+    CFLAGS += -O2
+endif
+
+config.status: configure
+	dh_testdir
+	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
+	    --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
+	    --mandir=\$${prefix}/share/man
+
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep:
+build-stamp: config.status
+	dh_testdir
+	$(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+	dh_clean
+
+install: build-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean
+	$(MAKE) install prefix=$(CURDIR)/debian/lbcd/usr
+
+binary: binary-arch binary-indep
+binary-indep:
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs NEWS
+	dh_installdocs README TODO
+	dh_installinit --error-handler=maybe_ignore_failure
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
+.PHONY: install
--- lbcd-3.3.0.orig/debian/watch
+++ lbcd-3.3.0/debian/watch
@@ -0,0 +1,9 @@
+# watch -- Rules for uscan to find new upstream versions.
+# $Id: watch 2498 2006-03-20 18:02:22Z rra $
+#
+# I don't use this personally since I'm also one of the upstream
+# maintainers, but it's included for the benefit of automated package
+# analysis systems.
+
+version=3
+http://archives.eyrie.org/software/system/lbcd-(.*)\.tar\.gz