[med-svn] r2921 - in trunk/packages/gnumed-server/trunk/debian: . conf
tille at alioth.debian.org
tille at alioth.debian.org
Thu Jan 8 08:50:37 UTC 2009
Author: tille
Date: 2009-01-08 08:50:36 +0000 (Thu, 08 Jan 2009)
New Revision: 2921
Added:
trunk/packages/gnumed-server/trunk/debian/conf/
trunk/packages/gnumed-server/trunk/debian/conf/gnumed-backup.conf
trunk/packages/gnumed-server/trunk/debian/conf/gnumed-restore.conf
trunk/packages/gnumed-server/trunk/debian/cron.daily
Modified:
trunk/packages/gnumed-server/trunk/debian/changelog
trunk/packages/gnumed-server/trunk/debian/control
trunk/packages/gnumed-server/trunk/debian/dirs
trunk/packages/gnumed-server/trunk/debian/install
trunk/packages/gnumed-server/trunk/debian/rules
Log:
Use python-support for python modules, move backup/restore scripts to /usr/sbin, cron job for backup
Modified: trunk/packages/gnumed-server/trunk/debian/changelog
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/changelog 2009-01-07 17:39:45 UTC (rev 2920)
+++ trunk/packages/gnumed-server/trunk/debian/changelog 2009-01-08 08:50:36 UTC (rev 2921)
@@ -2,6 +2,10 @@
* Do not bootstrap in postinst and provide a script in
/usr/sbin instead
+ * Install gm*.py scripts by using python-support
+ * Copy shell scripts to /usr/sbin
+ * Install config files for backup and restore
+ * Cron.daily for backing up database
-- Andreas Tille <tille at debian.org> Sun, 04 Jan 2009 09:28:32 +0100
Added: trunk/packages/gnumed-server/trunk/debian/conf/gnumed-backup.conf
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/conf/gnumed-backup.conf (rev 0)
+++ trunk/packages/gnumed-server/trunk/debian/conf/gnumed-backup.conf 2009-01-08 08:50:36 UTC (rev 2921)
@@ -0,0 +1,150 @@
+#------------------------------------------------------------
+#
+# This is a shell fragment sourced by backup shell scripts.
+#
+# Copy this file to /etc/gnumed/gnumed-backup.conf and
+# configure appropriately.
+#
+# If the PostgreSQL users $GM_DBO and/or "postgres" need a
+# password you will have to configure that using a .pgpass
+# file (see the PG manual for how to do that):
+#
+# http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html
+#
+#------------------------------------------------------------
+# $Source: /sources/gnumed/gnumed/gnumed/client/doc/gnumed-backup.conf.example,v $
+# $Id: gnumed-backup.conf.example,v 1.13 2008/08/01 10:08:49 ncq Exp $
+
+
+#------------------------------------------------------------
+# those need to be changed in most if not all cases
+#------------------------------------------------------------
+
+
+# options for *taking* backups:
+
+# identify the logical/business-level owner of this
+# GNUmed database instance, such as "ACME GP Office",
+# do not use spaces: "ACME_GP_Offices"
+INSTANCE_OWNER="GNUmed_Team"
+
+# where to eventually store the backup
+BACKUP_DIR="${HOME}/.gnumed/backup/"
+
+# which database to backup
+GM_DATABASE="gnumed_v9"
+
+# user/group the backup is eventually owned by
+BACKUP_OWNER="$USER.$USER"
+
+
+# options for *offsiting* backups:
+
+# this needs to be set to a host you can reach via rsync w/o
+# need for manually entering a password (say, SSH public key
+# authentication)
+OFFSITE_BACKUP_HOST="need to set this"
+
+# this is where you want the backup files to end up
+# on OFFSITE_BACKUP_HOST
+OFFSITE_BACKUP_DIR="need to set this"
+
+# the maximum bandwith, in KBytes/second, to utilize,
+# empty means full speed ahead
+MAX_OFFSITING_BANDWIDTH=""
+
+# how to determine whether or not to transfer a file:
+# yes
+# - compare files by CRC
+# - can put quite a bit of load on both machines
+# no
+# - compare files by timestamp and size
+# - a lot cheaper CPU-wise but may result
+# in redundant file transfers
+#
+# default "yes" - better safe than sorry
+OFFSITE_BY_CRC="yes"
+
+#------------------------------------------------------------
+# those need to be changed less likely:
+#------------------------------------------------------------
+
+# which PostgreSQL user to dump as, usually "gm-dbo"
+GM_DBO="gm-dbo"
+
+# if your PostgreSQL server is running on another port
+GM_PORT="5432"
+
+# set this if you want to dump from a remote host
+GM_HOST=""
+
+# file permissions mask to set the backup file to
+BACKUP_MASK="0600"
+
+# whether or not to verify that TAR archive,
+# verification may be very time consuming,
+# empty means: do not verify
+VERIFY_TAR=""
+
+# the compression level to use with bzip2 (1-9) (see: man bzip2)
+COMPRESSION_LEVEL="9"
+
+# set this to an email address which will receive
+# digitally signed replies from the GNotary server
+# notarizing the hash of the backup
+SIG_RECEIVER="$USER at localhost"
+
+# set this to the email address of the GNotary server
+# you want your hashes to be signed by
+GNOTARY_SERVER="gnotary at gnotary.de"
+
+# you will have to set the GNotary TAN here,
+# using "free" works but makes you a Freeloader,
+# as it is mainly intended for testing,
+# setting this to "" effectively disables notarizing
+GNOTARY_TAN="free"
+
+#============================================================
+# $Log: gnumed-backup.conf.example,v $
+# Revision 1.13 2008/08/01 10:08:49 ncq
+# - /bin/sh -> /bin/bash
+#
+# Revision 1.12 2008/01/07 19:45:11 ncq
+# - bump db version
+#
+# Revision 1.11 2007/12/02 11:42:48 ncq
+# - improved docs
+# - add options for moving backups offsite
+#
+# Revision 1.10 2007/10/22 12:37:02 ncq
+# - default database change
+#
+# Revision 1.9 2007/09/24 18:25:45 ncq
+# - VERIFY_TAR
+#
+# Revision 1.8 2007/06/11 20:14:59 ncq
+# - bump database version
+#
+# Revision 1.7 2007/06/05 14:57:03 ncq
+# - add compression level variable
+#
+# Revision 1.6 2007/05/17 15:14:54 ncq
+# - better default backup target dir in line with the rest of GNUmed
+#
+# Revision 1.5 2007/05/14 21:28:09 ncq
+# - better docs
+# - add GM_HOST
+#
+# Revision 1.4 2007/05/07 08:00:52 ncq
+# - default backup location $HOME rather than /
+#
+# Revision 1.3 2007/05/01 19:40:08 ncq
+# - add URL
+#
+# Revision 1.2 2007/05/01 16:45:24 ncq
+# - improved
+#
+# Revision 1.1 2007/05/01 16:34:45 ncq
+# - needed by gm-backup_database.sh
+#
+#
\ No newline at end of file
Added: trunk/packages/gnumed-server/trunk/debian/conf/gnumed-restore.conf
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/conf/gnumed-restore.conf (rev 0)
+++ trunk/packages/gnumed-server/trunk/debian/conf/gnumed-restore.conf 2009-01-08 08:50:36 UTC (rev 2921)
@@ -0,0 +1,42 @@
+#------------------------------------------------------------
+#
+# this is a shell fragment used by gm-restore_from_backup.sh
+#
+# copy this file to /etc/gnumed/gnumed-restore.conf and
+# configure appropriately
+#
+# if the PostgreSQL user $GM_DBO needs a password you will
+# have to configure that using a .pgpass file (see the PG
+# manual for how to do that)
+#
+# http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html
+#
+#------------------------------------------------------------
+# $Source: /sources/gnumed/gnumed/gnumed/client/doc/gnumed-restore.conf.example,v $
+# $Id: gnumed-restore.conf.example,v 1.3 2008/08/01 10:08:49 ncq Exp $
+
+# if your PostgreSQL server is running on another port
+GM_PORT="5432"
+
+# set this to a writable directory on a drive where
+# there is plenty of disk space available
+WORK_DIR_BASE="${HOME}/gnumed"
+
+# where to store log files,
+# note that if you chose to write logs to the work
+# directory they will get lost during cleanup if the
+# restore process succeeds
+LOG_BASE="."
+
+#============================================================
+# $Log: gnumed-restore.conf.example,v $
+# Revision 1.3 2008/08/01 10:08:49 ncq
+# - /bin/sh -> /bin/bash
+#
+# Revision 1.2 2007/07/03 09:57:29 ncq
+# - WORK_DIR_BASE, LOG_BASE
+#
+# Revision 1.1 2007/05/08 11:57:40 ncq
+# - new
+#
+#
\ No newline at end of file
Modified: trunk/packages/gnumed-server/trunk/debian/control
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/control 2009-01-07 17:39:45 UTC (rev 2920)
+++ trunk/packages/gnumed-server/trunk/debian/control 2009-01-08 08:50:36 UTC (rev 2921)
@@ -4,7 +4,7 @@
Maintainer: Debian-Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
DM-Upload-Allowed: yes
Uploaders: Andreas Tille <tille at debian.org>
-Build-Depends: cdbs, debhelper, po-debconf
+Build-Depends: cdbs, debhelper, po-debconf, python-support
Standards-Version: 3.8.0
Homepage: http://gnumed.org/
Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/gnumed-server/trunk/?rev=0&sc=0
Added: trunk/packages/gnumed-server/trunk/debian/cron.daily
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/cron.daily (rev 0)
+++ trunk/packages/gnumed-server/trunk/debian/cron.daily 2009-01-08 08:50:36 UTC (rev 2921)
@@ -0,0 +1,19 @@
+#!/bin/sh
+# care for daily backup of GNUmed database
+
+DATA=/usr/sbin/gm-backup_data
+DATABASE=/usr/sbin/gm-backup_database
+ZIPSIGN=/usr/sbin/gm-zip+sign_backups
+
+if [ -x "$DATA" ] ; then
+ $DATA
+fi
+
+if [ -x "$DATABASE" ] ; then
+ $DATABASE
+fi
+
+if [ -x "$ZIPSIGN" ] ; then
+ $ZIPSIGN
+fi
+
Modified: trunk/packages/gnumed-server/trunk/debian/dirs
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/dirs 2009-01-07 17:39:45 UTC (rev 2920)
+++ trunk/packages/gnumed-server/trunk/debian/dirs 2009-01-08 08:50:36 UTC (rev 2921)
@@ -1 +1,2 @@
-/var/lib/gnumed/server/bootstrap
+var/lib/gnumed/server/bootstrap
+usr/sbin
Modified: trunk/packages/gnumed-server/trunk/debian/install
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/install 2009-01-07 17:39:45 UTC (rev 2920)
+++ trunk/packages/gnumed-server/trunk/debian/install 2009-01-08 08:50:36 UTC (rev 2921)
@@ -1,2 +1,4 @@
server/sql var/lib/gnumed/server
debian/gm-bootstrap_server usr/sbin
+server/bootstrap/gm*.py usr/share/python-support/gnumed-server
+debian/conf/* etc/gnumed
Modified: trunk/packages/gnumed-server/trunk/debian/rules
===================================================================
--- trunk/packages/gnumed-server/trunk/debian/rules 2009-01-07 17:39:45 UTC (rev 2920)
+++ trunk/packages/gnumed-server/trunk/debian/rules 2009-01-08 08:50:36 UTC (rev 2921)
@@ -12,3 +12,6 @@
for conffile in `find debian/$(pkg)/var/lib/gnumed/server/bootstrap -maxdepth 1 -type f -name \*.conf` ; do \
sed -i 's/^\(interactive[[:space:]]*=[[:space:]]*\)yes/\1no/' "$$conffile" ; \
done
+ for script in `ls server/gm-*.sh` ; do \
+ cp -a "$$script" debian/$(pkg)/usr/sbin/`basename "$$script" .sh` ; \
+ done
More information about the debian-med-commit
mailing list