perfsonar-dev - [pS-dev] [GEANT/SA2/SA2T3-OPPD] r861 - in trunk/perfsonar-oppd-mp-bwctl/build: . debian debian/scripts
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/SA2T3-OPPD] r861 - in trunk/perfsonar-oppd-mp-bwctl/build: . debian debian/scripts
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/SA2T3-OPPD] r861 - in trunk/perfsonar-oppd-mp-bwctl/build: . debian debian/scripts
- Date: Mon, 10 Mar 2014 19:49:57 +0000 (GMT)
Author: dfn.calim
Date: 2014-03-10 19:49:57 +0000 (Mon, 10 Mar 2014)
New Revision: 861
Added:
trunk/perfsonar-oppd-mp-bwctl/build/debian/
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.Debian
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.source
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/changelog
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/compat
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control.new
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/copyright
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/docs
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/files
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/init.d
trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/rules
Log:
adding debian package build scripts
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.Debian
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.Debian
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.Debian
2014-03-10 19:49:57 UTC (rev 861)
@@ -0,0 +1,6 @@
+perfsonar-oppd-mp-bwctl for Debian
+----------------------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Hakan Calim
<>
Mon, 10 Mar 2014 12:21:46 +0100
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.source
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.source
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/README.source
2014-03-10 19:49:57 UTC (rev 861)
@@ -0,0 +1,9 @@
+perfsonar-oppd-mp-bwctl for Debian
+----------------------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/changelog
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/changelog
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/changelog
2014-03-10 19:49:57 UTC (rev 861)
@@ -0,0 +1,22 @@
+perfsonar-oppd-mp-bwctl (1.0-1) unstable; urgency=low
+ * Change to new version numbering
+ * New structure of packages.
+ -- DFN Labor
<>
Tue, 19 Nov 2013 15:05:22 +0100
+
+perfsonar-oppd-mp-bwctl (0.53-8) unstable; urgency=low
+ * Add new configuration file
+ -- DFN Labor
<>
Wed, 17 Apr 2013 10:36:22 +0200
+
+perfsonar-oppd-mp-bwctl (0.53-7) unstable; urgency=low
+ * Problem with upgrade from 0.52 packages fixed
+ -- DFN Labor
<>
Fri, 05 Oct 2012 07:30:49 +0200
+
+perfsonar-oppd-mp-bwctl (0.53-6) unstable; urgency=low
+ * In postrm script was a deprecated operator -a. This is changed to -f
+ -- DFN Labor
<>
Tue, 04 Jul 2012 10:06:49 +0200
+
+perfsonar-oppd-mp-bwctl (0.53-4) unstable; urgency=low
+ * Initial release
+
+ -- DFN Labor
<>
Tue, 20 Apr 2010 14:06:49 +0200
+
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/compat
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/compat
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/compat 2014-03-10
19:49:57 UTC (rev 861)
@@ -0,0 +1 @@
+8
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control 2014-03-10
19:49:57 UTC (rev 861)
@@ -0,0 +1,17 @@
+Source: perfsonar-oppd-mp-bwctl
+Section: net
+Priority: extra
+Maintainer: DFN Labor
<>
+Build-Depends: debhelper (>= 8.0.0)
+Standards-Version: 3.9.3
+Homepage: http://www.win-labor.dfn.de
+
+Package: perfsonar-oppd-mp-bwctl
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, perfsonar-oppd (>= 1.0),
+Description: The perfsonar oppd BWCTL MP service.
+ The README is used to introduce the module and provide instructions on how
+ to install the module, any machine dependencies it may have (for example C
+ compilers and installed libraries) and any other information that should be
+ provided before the module is installed.
+
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control.new
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control.new
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/control.new
2014-03-10 19:49:57 UTC (rev 861)
@@ -0,0 +1,18 @@
+Source: perfsonar-oppd-mp-bwctl
+Section: net
+Priority: extra
+Maintainer: DFN Labor
<>
+Build-Depends: debhelper (>= 7), libmodule-build-perl
+Standards-Version: 3.7.3
+Homepage: http://www.win-labor.dfn.de
+
+Package: perfsonar-oppd-mp-bwctl
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: perfsonar-oppd ( >= 0.53)
+Description: perfSONAR::MP::BWCTL Perl module, plugin for oppd
+ The README is used to introduce the module and provide instructions on how
+ to install the module, any machine dependencies it may have (for example C
+ compilers and installed libraries) and any other information that should be
+ provided before the module is installed.
+
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/copyright
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/copyright
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/copyright
2014-03-10 19:49:57 UTC (rev 861)
@@ -0,0 +1,15 @@
+
+ Copyright 2010 Verein zur Foerderung eines Deutschen Forschungsnetzes e. V.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/docs
===================================================================
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/files
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/files
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/files 2014-03-10
19:49:57 UTC (rev 861)
@@ -0,0 +1 @@
+perfsonar-oppd-mp-bwctl_1.0-1_all.deb net extra
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/init.d
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/init.d
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/init.d 2014-03-10
19:49:57 UTC (rev 861)
@@ -0,0 +1,185 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: perfsonar-oppd
+# Required-Start: $remote_fs $network $local_fs
+# Required-Stop: $remote_fs $network $local_fs
+# Should-Start: $named
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: oppd (Open Perl PerfSONAR Daemon)
+# Description: oppd (Open Perl PerfSONAR Daemon)
+### END INIT INFO
+
+# Author: WiN-Labor
<>
+
+PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
+export PATH
+
+
+NAME=oppd
+# For start-stop-daemon's --name
+SNAME=oppd.pl
+DAEMON=/usr/bin/oppd.pl
+DESC="Open Perl PerfSONAR Daemon"
+
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Default options, these can be overriden by the information
+# at /etc/default/$NAME
+DAEMON_ARGS=""
+DIETIME=30
+#STARTTIME=2
+LOGFILE=""
+CONFFILE=/etc/oppd.conf
+DAEMONUSER=perfsonar
+DAEMONGROUP=perfsonar
+
+# 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
+
+. /lib/lsb/init-functions
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Check that the user exists (if we set a user)
+# Does the user exist?
+if [ -n "$DAEMONUSER" ] ; then
+ if getent passwd | grep -q "^$DAEMONUSER:"; then
+ # Obtain the uid and gid
+ DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
+ DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
+ else
+ log_failure_msg "The user $DAEMONUSER, required to run $NAME does not
exist."
+ exit 1
+ fi
+fi
+
+#
+# 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
+ touch "$PIDFILE"
+ chown $DAEMONUSER:$DAEMONGROUP "$PIDFILE"
+ if [ -n "$LOGFILE" ]
+ then
+ touch $LOGFILE
+ chown $DAEMONUSER:$DAEMONUSER $LOGFILE
+ DAEMON_ARGS="$DAEMON_ARGS --logfile=$LOGFILE"
+ fi
+
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test
> /dev/null \
+ || return 1
+ if [ -z "$DAEMONUSER" ] ; then
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ --config="$CONFFILE" --pidfile="$PIDFILE" $DAEMON_ARGS \
+ || return 2
+ else
+ # if we are using a daemonuser then change the user id
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
+ --chuid $DAEMONUSER -- \
+ --config="$CONFFILE" --pidfile="$PIDFILE" $DAEMON_ARGS \
+ || return 2
+ fi
+ [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time
+ pidofproc -p $PIDFILE > /dev/null || return 2
+}
+
+#
+# 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
+ start-stop-daemon --stop --quiet --retry=TERM/$DIETIME/KILL/5 --pidfile
$PIDFILE --name $SNAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ # oppd takes care about its children. Nevertheless take care about them
here!
+ # Important: The following command will kill more or less all running oppd.
+ #TODO Is this working at all? Or is start-stop-daemon only seeing
+ # /usr/bin/perl ?
+ start-stop-daemon --stop --quiet --oknodo --retry=0/$DIETIME/KILL/5 --exec
$DAEMON
+ [ "$?" = 2 ] && return 2
+ # oppd should delete its pid file, but perhaps it doesn't have the right
+ # to do it!!
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name
$SNAME
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ #reload|force-reload)
+ #
+ # do_reload() is available above, but not implemented by oppd yet. So leave
+ # this commented out and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 1) [ "$VERBOSE" != no ] && log_end_msg 1 ;; # Old process is still
running
+ *) [ "$VERBOSE" != no ] && log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ status)
+ status_of_proc -p $PIDFILE "" $NAME
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}"
>&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
+ exit 3
+ ;;
+esac
+
+:
Property changes on: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/init.d
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/rules
===================================================================
--- trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/rules
(rev 0)
+++ trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/rules 2014-03-10
19:49:57 UTC (rev 861)
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@
Property changes on: trunk/perfsonar-oppd-mp-bwctl/build/debian/scripts/rules
___________________________________________________________________
Added: svn:executable
+ *
- [pS-dev] [GEANT/SA2/SA2T3-OPPD] r861 - in trunk/perfsonar-oppd-mp-bwctl/build: . debian debian/scripts, svn-noreply, 03/10/2014
Archive powered by MHonArc 2.6.16.