switchconf (0.0.9-2) debian-dir only changes

Summary

 debian/changelog |  191 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/compat    |    1 
 debian/control   |   25 +++++++
 debian/copyright |   32 +++++++++
 debian/dirs      |    3 
 debian/docs      |    3 
 debian/examples  |    1 
 debian/init.d    |  141 ++++++++++++++++++++++++++++++++++++++++
 debian/logrotate |    7 ++
 debian/rules     |  113 ++++++++++++++++++++++++++++++++
 10 files changed, 517 insertions(+)

    
download this patch

Patch contents

--- switchconf-0.0.9.orig/debian/copyright
+++ switchconf-0.0.9/debian/copyright
@@ -0,0 +1,32 @@
+This package was debianized by Sebastien J. Gross <sjg@debian.org> on
+Sun, 14 Apr 2002 21:55:24 +0200.  Now the author and the maintainer is
+Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>
+
+
+Is available from http://web.tagus.ist.utl.pt/~jose.calhariz/
+
+
+Copyright:
+
+(c) 2002 Sebastien J. Gross <sjg@debian.org>
+(c) 2007 Eric Lavarde <bugs.debian.nospam@zorglub.s.bawue.de>
+(c) 2005,2007,2010 Instituto Superior Tecnico by Jose Calhariz 
+      <jose.calhariz@tagus.ist.utl.pt>
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 dated June, 1991.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+   02110-1301, USA
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
--- switchconf-0.0.9.orig/debian/rules
+++ switchconf-0.0.9/debian/rules
@@ -0,0 +1,113 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# 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)
+
+# "based" on template Makefile for most debian packages version 0.7
+# Personall Variables
+PACKNAME=$(shell dh_listpackages)
+PACKAGE=$(shell dh_listpackages)
+SOURCENAME=$(shell dpkg-parsechangelog | grep "Source:" | cut -d ' ' -f 2)
+DEBVER=$(shell dpkg-parsechangelog | grep "Version:" | cut -d ' ' -f 2)
+VER=$(shell dpkg-parsechangelog | grep "Version:" | cut -d ' ' -f 2 | cut -f 1 -d -)
+MDIST=etch
+DIST=$(shell dpkg-parsechangelog | grep "Distribution" | cut -d ' ' -f 2)
+SECTION=main
+CATEG=my_sources
+
+REPOSTARGET=root@debian.tagus.ist.utl.pt:/var/www/debian/debian/dists/$(MDIST)/$(DIST)/$(SECTION)/
+REPOSARCH=~/debian/$(SECTION)/$(CATEG)/$(SOURCENAME)
+
+
+variables:
+	echo $(VER) $(DEBVER) $(MDIST) $(DIST) $(PACKNAME) $(SOURCENAME)
+	echo $(DEB_HOST_GNU_TYPE) $(DEB_BUILD_GNU_TYPE)
+
+build: build-stamp
+
+build-stamp: 
+	dh_testdir
+	$(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+	$(MAKE) clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/$(PACKNAME)
+
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installexamples --exclude=.svn
+	dh_installman
+	dh_installinit --no-start --update-rcd-params="start 37 S ."
+	dh_installchangelogs 
+	dh_installlogrotate
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+
+binary-arch: build install
+
+
+binary: binary-indep binary-arch
+
+
+# Create the files ready for distribution, need to be run in a dir
+# without SVN control files
+
+# Non-native package
+dist:
+	if test -e ../$(SOURCENAME)_$(VER).orig.tar.gz ; then echo "$(SOURCENAME)_$(VER).orig.tar.gz file should be generated only once" ; false ; fi
+	cd .. && GZIP=-9 tar --exclude='.svn' --exclude='debian' --exclude='tmp' --exclude='*~' -czf $(SOURCENAME)_$(VER).orig.tar.gz $(SOURCENAME)
+
+# Create the files ready for distribution
+# Debian native package
+#dist:
+#	cd .. && GZIP=-9 tar --exclude='.svn' --exclude='tmp' --exclude='*~' -czf $(SOURCENAME)_$(DEBVER).tar.gz $(SOURCENAME)
+
+
+# Upload the packages and the distribution files into the rigth places
+upload:	
+	scp ../$(SOURCENAME)_$(VER)* ../*_$(DEBVER).* ../*_$(DEBVER)_* $(REPOSTARGET)
+	#mkdir -p $(REPOSARCH)
+	cp ../*_$(DEBVER).* ../*_$(DEBVER)_* $(REPOSARCH)
+
+
+# Make tags of the sources as documented by subversion
+tag:
+	cd .. ; svn add $(SOURCENAME)_$(VER).orig.tar.gz $(SOURCENAME)_$(VER).tar.gz
+	cd .. ; svn add $(SOURCENAME)_$(DEBVER)_*.changes ; svn add $(SOURCENAME)_$(DEBVER)_*.build ; svn add $(SOURCENAME)_$(DEBVER).dsc ; svn add $(SOURCENAME)_$(DEBVER).diff.gz
+	cd .. ; svn add *_$(DEBVER)_*.deb
+	cd .. ; svn st ; echo "enter to continue" ; read enter
+	cd .. ; svn ci -m "released v$(DEBVER)"
+	svn copy -m "released v$(DEBVER)" $(shell svn info | grep "Repository Root" | cut -d ' ' -f 3)/trunk/src/$(SOURCENAME) $(shell svn info | grep "Repository Root" | cut -d ' ' -f 3)/tags/src/$(SOURCENAME)/$(SOURCENAME)-$(DEBVER)
+
+
+.PHONY: build clean binary-indep binary-arch binary install
--- switchconf-0.0.9.orig/debian/init.d
+++ switchconf-0.0.9/debian/init.d
@@ -0,0 +1,141 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          switchconf
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:      
+# Short-Description: Switchconf at boot time based on kernel options
+# Description:       This file should be used to construct scripts to be
+#                    placed in /etc/init.d.
+### END INIT INFO
+
+# Author: Eric Lavarde <deb@zorglub.s.bawue.de>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="switching configuration using kernel option"
+NAME=switchconf
+DAEMON=/usr/sbin/$NAME
+DAEMON_ARGS="--options args"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CMDLINE="/proc/cmdline"
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+[ -r /lib/lsb/init-functions ] && . /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+    # Return
+    #   0 if daemon has been started
+    #   1 if daemon was already running
+    #   2 if daemon could not be started
+
+    if [ ! -f $CMDLINE ] ; then
+	log_failure_msg "File '$CMDLINE' does not exist."
+	return 2;
+    fi
+    if [ ! -r $CMDLINE ] ; then
+	log_failure_msg "File '$CMDLINE' not readable."
+	return 2;
+    fi
+
+    conf="$(sed -rne 's/(.*[[:space:]]|^)switchconf=([^[:space:]]+).*/\2/p' "$CMDLINE" | tr -d \\n)"
+
+    if [ -z "${conf}" ] ; then
+	[ "$VERBOSE" != no ] && log_action_msg " No switchconf kernel option"
+	return 0;
+    else
+	log_action_msg " Switching to config '${conf}'"
+	$DAEMON "${conf}" >/dev/null || log_end_msg 2
+	return 0
+    fi
+
+    # Add code here, if necessary, that waits for the process to be ready
+    # to handle requests from services started subsequently which depend
+    # on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+    # Return
+    #   0 if daemon has been stopped
+    #   1 if daemon was already stopped
+    #   2 if daemon could not be stopped
+    #   other if a failure occurred
+    : Nothing to be done...
+    # Wait for children to finish too if this is a daemon that forks
+    # and if the daemon is only ever run from this initscript.
+    # If the above conditions are not satisfied then add some other code
+    # that waits for the process to drop all resources that could be
+    # needed by services started subsequently.  A last resort is to
+    # sleep for some time.
+
+    # Many daemons don't delete their pidfiles when they exit.
+
+    return 0
+}
+
+case "$1" in
+    start)
+	log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+	    0)   log_end_msg 0 ;;
+	    1|2) log_end_msg 1 ;;
+	esac
+	;;
+    stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	    0|1) log_end_msg 0 ;;
+	    2)   log_end_msg 1 ;;
+	esac
+	;;
+    restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	    0|1)
+		do_start
+		case "$?" in
+		    0) log_end_msg 0 ;;
+		    1) log_end_msg 1 ;; # Old process is still running
+		    *) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	    *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+    *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}"
+	exit 3
+	;;
+esac
--- switchconf-0.0.9.orig/debian/compat
+++ switchconf-0.0.9/debian/compat
@@ -0,0 +1 @@
+5
--- switchconf-0.0.9.orig/debian/logrotate
+++ switchconf-0.0.9/debian/logrotate
@@ -0,0 +1,7 @@
+/var/log/switchconf {
+	weekly
+	missingok
+	rotate 2
+	compress
+	create 640 root adm
+}
--- switchconf-0.0.9.orig/debian/control
+++ switchconf-0.0.9/debian/control
@@ -0,0 +1,25 @@
+Source: switchconf
+Section: admin
+Priority: optional
+Maintainer: Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>
+Build-Depends: debhelper (>> 5.0.0)
+Standards-Version: 3.8.4
+
+Package: switchconf
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-6), liblockfile1,
+Description: switch between system configuration sets
+ Switchconf allows users to easily change their system's settings,
+ choosing between the possible configurations for different
+ environments. 
+ .
+ Most switchconf users are laptop owners who want to change their
+ network settings according to where they currently are - but there
+ are many cases for non mobile systems to desire to choose between
+ configuration sets. 
+ .
+ Switchconf is a very simple script that takes its arguments from the
+ command line. It allows you to maintain different sets of
+ configurations, installing the desired set of configuration when
+ called with its name as an argument, and execute a pre-specified set
+ of commands before and after the switch.
--- switchconf-0.0.9.orig/debian/changelog
+++ switchconf-0.0.9/debian/changelog
@@ -0,0 +1,191 @@
+switchconf (0.0.9-2) unstable; urgency=low
+
+  * Fix bashism in a private rule on debian/rules file (Closes: #581451).
+  * Add remote_fs to dependency of init.d.
+  * Bump standard version to 3.8.4, no changes needed.
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Tue, 01 Jun 2010 20:52:38 +0100
+
+switchconf (0.0.9-1) unstable; urgency=low
+  
+  * New upstream version:
+    * Remove old version of files when using softlinks (Closes: #553427).
+    * Use run-parts when available to run scripts (Closes: #563224).
+    * Call scripts with the name of next configuration (Closes: #563223).
+    * Locking system to prevent a second run before the first finish.
+  
+  * Updates to the package:
+    * Minor updates to debian/rules.
+    * Upgrade policy to 3.8.3, after the implementation of a locking system
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Wed, 13 Jan 2010 15:26:00 +0000
+
+switchconf (0.0.8-1) updates; urgency=low
+
+  * move code from Makefile into debian/rules so the Makefile is more
+    portable for other Linux distributions than Debian
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Sun, 09 Sep 2007 00:51:19 +0100
+
+switchconf (0.0.7-1) unstable; urgency=low
+
+  * New upstream version:
+  
+    * fixed a bug that methods copy and hardlink didn't work when target
+      file don't exist
+  
+    * implemented tests to check if switchconf really works
+
+    * updated the copyright to give attribution of my work to my employer.
+  
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Thu, 26 Jul 2007 00:06:25 +0100
+
+switchconf (0.0.6-1) unstable; urgency=low
+
+  * New upstream version: 
+  
+    * added new methods to change configuration files: copy, hardlinks
+      (closes: #416094); Eric Lavarde
+  
+    * added init.d script to allow for boot time configuration switch
+      using kernel options (closes: #416095); Eric Lavarde
+
+  * Changes to the build process:
+  
+    * updated Makefile with better intelligence to detect package names
+    * added support for multi-package sources
+    * $(DESTDIR) variable should be use in Makefile target install
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Thu, 21 Jun 2007 12:50:25 +0100
+
+switchconf (0.0.5.1-2) UNRELEASED; urgency=low
+
+  * updated to Standards Version 3.7.2
+  * use invoke-rc.d to start init.d scripts, if it exist
+  * removing martin f. krafft from Uploaders
+  
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Fri,  7 Jul 2006 23:02:50 +0100
+
+switchconf (0.0.5.1-1) unstable; urgency=low
+
+  * New upstream version, to fix an error handling orig.tar.gz
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Sun, 18 Dec 2005 23:52:52 +0000
+
+switchconf (0.0.5-2) unstable; urgency=low
+
+  * Updated to Standards Version 3.6.2
+  * Updated the address of Free Software Foundation
+  * DH_COMPAT is 4 and not 5 because I need to build this in sarge.
+  * Removed unneeded comments from rules.
+  * Removed dh_installcron and dh_installinfo because are not needed.
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Mon, 12 Dec 2005 23:46:58 +0000
+
+switchconf (0.0.5-1) unstable; urgency=low
+
+  * New upstream version:
+  * Abort execution when don't exist configuration file. Closes the bug report
+    "switchconf: exit if the configuration is not found" (Closes #332916)
+  * Sort the files in /etc/switchconf/{before,after}.d before execution
+    (Closes #332918)
+  * Corrected the args of find when listing configuration schemes. Closes
+    the bug report "find: warning: you have specified the -maxdepth option
+    ..." (Closes #332920)
+  * rename plugins pcmcia to 20pcmcia, to make easy to control the order
+    of running the plugins.
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Tue, 11 Oct 2005 16:57:38 +0100
+
+switchconf (0.0.4-1) unstable; urgency=low
+
+  * New upstream version: updated docs and a more powerfull makefile, no
+    new features.
+  * Put myself as upstream.
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Wed, 27 Apr 2005 00:35:46 +0100
+
+switchconf (0.0.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Converted to non-native package
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Tue, 12 Apr 2005 22:42:20 +0100
+
+switchconf (0.0.2-10) unstable; urgency=low
+
+  * New maintainer.
+  * Added action deb to makefile, to produce the deb file.
+
+ -- Jose Calhariz <jose.calhariz@tagus.ist.utl.pt>  Sun, 13 Mar 2005 19:19:38 +0000
+
+switchconf (0.0.2-9) unstable; urgency=low
+
+  * /etc/switchconf/lastcfg is system-generated and violates FHS -
+    Moving to /var/lib/misc (thanks to David A. Riggs for pointing
+    this out right away - I prepared the upload last night when it was
+    time for me to be asleep :-/ )
+
+ -- Gunnar Wolf <gwolf@debian.org>  Sun, 30 May 2004 10:33:41 -0300
+
+switchconf (0.0.2-8) unstable; urgency=low
+
+  * Now creates a /etc/switchconf/lastcfg memory file (Closes: #251659)
+  * Noted the right manual page in its header (8, was 1)
+
+ -- Gunnar Wolf <gwolf@debian.org>  Sun, 30 May 2004 00:01:58 -0300
+
+switchconf (0.0.2-7) unstable; urgency=low
+
+  * Check for the existence of /etc/init.d/pcmcia before calling it
+    (Closes: #224124)
+  * Added a "Suggests: pcmcia-cs" in control
+
+ -- Gunnar Wolf <gwolf@debian.org>  Wed, 17 Dec 2003 21:32:04 -0600
+
+switchconf (0.0.2-6) unstable; urgency=low
+
+  * Further elaborated the description making it useful to discern when
+    to use switchcnf from other similar programs (Closes: #209790)
+  * Added some more explanation on the manual page
+
+ -- Gunnar Wolf <gwolf@debian.org>  Sun,  2 Nov 2003 23:06:49 -0600
+
+switchconf (0.0.2-5) unstable; urgency=low
+
+  * New maintainer, Gunnar Wolf <gwolf@debian.org>
+  * Fixes the description, was too short (Closes: #209790)
+  * Bumped standards-version to 3.6.1
+
+ -- Gunnar Wolf <gwolf@debian.org>  Fri, 24 Oct 2003 16:00:16 -0500
+
+switchconf (0.0.2-4) unstable; urgency=low
+
+  * Moved to "admin" section (Closes: #178921)
+
+ -- Sebastien J. Gross <sjg@debian.org>  Wed, 29 Jan 2003 17:47:53 +0100
+
+switchconf (0.0.2-3) unstable; urgency=low
+
+  * Correct manpage lack (closes: #164728) 
+
+ -- Sebastien J. Gross <sjg@debian.org>  Tue, 15 Oct 2002 13:57:55 +0200
+
+switchconf (0.0.2-2) unstable; urgency=low
+
+  * Typo in man page (closes: #162174) 
+
+ -- Sebastien J. Gross <sjg@debian.org>  Thu, 26 Sep 2002 11:28:55 +0200
+
+switchconf (0.0.2-1) unstable; urgency=low
+
+  * Add before and after plugins extentions
+
+ -- Sebastien J. Gross <sjg@debian.org>  Mon, 22 Apr 2002 21:07:43 +0200
+
+switchconf (0.0.1-1) unstable; urgency=low
+
+  * Initial Release (closes: #143209)
+
+ -- Sebastien J. Gross <sjg@debian.org>  Sun, 14 Apr 2002 21:55:24 +0200
+
--- switchconf-0.0.9.orig/debian/dirs
+++ switchconf-0.0.9/debian/dirs
@@ -0,0 +1,3 @@
+/etc/switchconf
+/etc/switchconf/before.d
+/etc/switchconf/after.d
--- switchconf-0.0.9.orig/debian/docs
+++ switchconf-0.0.9/debian/docs
@@ -0,0 +1,3 @@
+TODO
+README
+
--- switchconf-0.0.9.orig/debian/examples
+++ switchconf-0.0.9/debian/examples
@@ -0,0 +1 @@
+examples/*