Fix errors lintian errors of debian-policy

parent 80add92f
pgbouncer (1.1.2-2) unstable; urgency=low
* Fix error in script pgbouncer.prerm changed init.d to similar
pgpool2 (Closes: #471114)
* Change dependency to "$shlibs:Depends" (Closes: #461383)
* Added suggest dependency postgresql package
* Change section contrib to main
......
......@@ -3,7 +3,7 @@ Maintainer: Fernando Ike de Oliveira <fike@midstorm.org>
Section: misc
Priority: optional
Standards-Version: 3.7.3
Build-Depends: cdbs, debhelper (>= 5), libevent-dev
Build-Depends: cdbs, debhelper (>= 5), libevent-dev, dpatch
Homepage: https://developer.skype.com/SkypeGarage/DbProjects/PgBouncer
Package: pgbouncer
......
......@@ -3,12 +3,11 @@ This package was debianized by Fernando Ike de Oliveira
It was downloaded from <http://pgfoundry.org/projects/pgbouncer/>.
Copyright Holders:
Upstream Authors: Sven Suursoho <sven.suursoho@skype.net>,
Marko Kreen <marko.kreen@skype.net>
Sven Suursoho <sven.suursoho@skype.net>
Marko Kreen <marko.kreen@skype.net>
License:
Copyright: 2007 - Sven Suursoho <sven.suursoho@skype.net>,
Marko Kreen <marko.kreen@skype.net>
This package is free software; you can redistribute it and/or modify
it under the terms of the BSD License as published by Univesity
......
#! /bin/sh
### BEGIN INIT INFO
# Provides: pgbouncer
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Provides: pgbouncer2
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs postgresql
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: PgBouncer daemon
# Description: PgBouncer is a Lightweight connection pooler
# for PostgreSQL.
# Short-Description: start pgbouncer-II
# Description: pgbouncer-II is a connection pool server and replication
# proxy for PostgreSQL.
### END INIT INFO
# 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="PgBounver is connection pooler for PostgreSQL"
NAME=pgbouncer
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="--options args"
SCRIPTNAME=/etc/init.d/$NAME
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/pgbouncer
PIDFILE=/var/run/postgresql/pgbouncer.pid
OPTS="-d /etc/pgbouncer.ini"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
test -x $DAEMON || exit 5
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Include pgbouncer defaults if available
if [ -f /etc/default/pgbouncer ] ; then
. /etc/default/pgbouncer
fi
# 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.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
if [ "$START" != "1" -a "$1" != "stop" ]; then
[ "$VERBOSE" != yes ] && log_warning_msg "Not starting pgbouncer - edit /etc/default/pgbouncer and change START to be 1.";
exit 0;
fi
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# 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.
is_running() {
pidofproc -p $PIDFILE $DAEMON >/dev/null
}
#
# 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/30/KILL/5 --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# 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.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
# rm -f $PIDFILE
return "$RETVAL"
d_start() {
if is_running; then
:
else
su -c "$DAEMON -n $OPTS 2>&1 </dev/null &" - postgres
fi
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --name $NAME
return 0
d_stop() {
killproc -p $PIDFILE $DAEMON -INT
status=$?
[ $status -eq 0 ] || [ $status -eq 3 ]
return $?
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
start)
log_daemon_msg "Starting pgbouncer-II" pgbouncer
d_start
log_end_msg $?
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
stop)
log_daemon_msg "Stopping pgbouncer-II" pgbouncer
d_stop
log_end_msg $?
;;
#reload|force-reload)
#
# If do_reload() is not implemented then 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)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting" "$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
status)
is_running
status=$?
if [ $status -eq 0 ]; then
log_success_msg "pgbouncer-II is running."
else
log_failure_msg "pgbouncer-II is not running."
fi
exit $status
;;
restart|force-reload)
log_daemon_msg "Restarting pgbouncer-II" pgbouncer
d_stop && sleep 1 && d_start
log_end_msg $?
;;
try-restart)
if $0 status >/dev/null; then
$0 restart
else
exit 0
fi
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
reload)
exit 3
;;
*)
log_failure_msg "Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
;;
esac
:
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_configtxt.dpatch by <fike@pmanson>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix error in pgbouncer.5
@DPATCH@
--- pgbouncer-1.1.2/doc/config.txt 2007-12-10 06:06:04.000000000 -0200
+++ pgbouncer-1.1.2.fike/doc/config.txt 2008-03-22 21:00:39.047873181 -0300
@@ -10,7 +10,6 @@
db = ...
[pgbouncer]
- ...
== DESCRIPTION ==
......@@ -2,12 +2,16 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/dpatch.mk
DH_VERBOSE = 1
DEB_CONFIGURE_EXTRA_FLAGS := --bindir=/usr/sbin
DEB_INSTALL_MANPAGES_pgbouncer := debian/pgbouncer.8
DEB_UPDATE_RCD_PARAMS = defaults 21 19
clean::
find doc -name "pgbouncer.*" -exec rm {} \;
install/pgbouncer::
mv $(CURDIR)/debian/pgbouncer/usr/share/doc/pgbouncer/pgbouncer.ini \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment