[debian-edu-commits] debian-edu/ 02/08: Imported Upstream version 0.4.5
Mike Gabriel
sunweaver at debian.org
Sun Jan 5 14:36:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository slbackup-php.
commit 59b350e2ddf9e627a59b340cd6ce80776a766f82
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sun Jan 5 11:08:21 2014 +0100
Imported Upstream version 0.4.5
---
ChangeLog | 10 ++++++++++
debian/changelog | 13 +++++++++++++
debian/control | 5 +++--
debian/links | 2 +-
debian/postinst | 16 ++++++++++++++++
debian/postrm | 16 +++++++++++++++-
debian/slbackup-php.desktop | 1 -
src/index.php | 10 +++++-----
templates/config.tpl | 9 +++------
templates/maint.tpl | 6 ++----
templates/restore.tpl | 6 ++----
11 files changed, 70 insertions(+), 24 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6aed580..22df10d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun, 05 Jan 2014 Mike Gabriel
+
+ * Release 0.4.5:
+ - Fix parsing of log file for the case that the
+ server_destdir does not exist.
+ - Handle scheduler time values as strings. Thanks to
+ Cyril ETCHEVERRIA.
+ - No line breaks in html_options fields as those get
+ handled weirdly by Smarty3. Thanks to Cyril ETCHEVERRIA.
+
Fri, 06 Jun 2013 Mike Gabriel
* Release 0.4.4:
diff --git a/debian/changelog b/debian/changelog
index 0b2414c..690dee1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+slbackup-php (0.4.5-0) unstable; urgency=low
+
+ * Upstream version (0.4.5):
+ - Fix parsing of log file for the case that the server_destdir does not
+ exist.
+ - Handle scheduler time values as strings. Thanks to Cyril ETCHEVERRIA.
+ - No line breaks in html_options fields as those get handled weirdly by
+ Smarty3. Thanks to Cyril ETCHEVERRIA.
+ * debian/*:
+ + Make package compliant with Apache 2.4 packaging policy.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Sun, 05 Jan 2014 00:09:54 +0100
+
slbackup-php (0.4.4-0) unstable; urgency=low
* Upstream version (0.4.4):
diff --git a/debian/control b/debian/control
index 599bf3e..d781c10 100644
--- a/debian/control
+++ b/debian/control
@@ -19,12 +19,13 @@ Package: slbackup-php
Architecture: all
Depends:
${misc:Depends},
- libapache2-mod-php5,
- apache2,
+ libapache2-mod-php5 | php5-cgi,
ssh,
php5-cli,
smarty3,
smarty-gettext (>= 1.0b1-7),
+Recommends:
+ apache2 | httpd,
Suggests:
x-www-browser,
Description: Web-based administration tool for slbackup
diff --git a/debian/links b/debian/links
index 42cd3dd..4d5a94a 100644
--- a/debian/links
+++ b/debian/links
@@ -1 +1 @@
-etc/slbackup-php/apache.conf etc/apache2/conf.d/slbackup
+etc/slbackup-php/apache.conf etc/apache2/conf-available/slbackup-php.conf
diff --git a/debian/postinst b/debian/postinst
old mode 100644
new mode 100755
index 3735b50..f87858c
--- a/debian/postinst
+++ b/debian/postinst
@@ -25,4 +25,20 @@ fi
db_stop
+if [ "$1" = "configure" ] ; then
+
+ CONF="slbackup-php"
+ COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
+
+ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+ . /usr/share/apache2/apache2-maintscript-helper
+ apache2_invoke enconf $CONF || exit $?
+ elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
+ if [ -d /etc/apache2/conf.d/ -a ! -L /etc/apache2/conf.d/$CONF.conf ]; then
+ ln -s ../conf-available/$CONF.conf /etc/apache2/conf.d/$CONF.conf
+ fi
+ fi
+
+fi
+
#DEBHELPER#
diff --git a/debian/postrm b/debian/postrm
old mode 100644
new mode 100755
index 6ff4525..04fd546
--- a/debian/postrm
+++ b/debian/postrm
@@ -3,7 +3,21 @@
set -e
if [ -d /var/spool/slbackup-php ]; then
- rm -rf /var/spool/slbackup-php/
+ rm -rf /var/spool/slbackup-php/
+fi
+
+if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then
+
+ CONF="slbackup-php"
+ COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
+
+ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+ . /usr/share/apache2/apache2-maintscript-helper
+ apache2_invoke disconf $CONF || exit $?
+ elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
+ [ ! -L /etc/apache2/conf.d/$CONF.conf ] || rm /etc/apache2/conf.d/$CONF.conf
+ fi
+
fi
#DEBHELPER#
diff --git a/debian/slbackup-php.desktop b/debian/slbackup-php.desktop
index 0fe733f..e9e4182 100644
--- a/debian/slbackup-php.desktop
+++ b/debian/slbackup-php.desktop
@@ -1,5 +1,4 @@
[Desktop Entry]
-Encoding=UTF-8
Name=slbackup-php
GenericName=SLBackup configuration tool
Comment=Webpage for configuring slbackup
diff --git a/src/index.php b/src/index.php
index 8a2e248..e57bd6d 100644
--- a/src/index.php
+++ b/src/index.php
@@ -561,15 +561,15 @@ global $backuphost, $backupuser, $logfile, $ssh_options, $ssh_askpass ;
$log["start"] = strtotime($timestamp) ;
elseif ($info == "Finished slbackup.")
$log["end"] = strtotime($timestamp) ;
- elseif (strpos ($line, "Starting backup of client") !== false) {
+ elseif (strpos ($line, "Starting backup of client ") !== false) {
sscanf ($info, "Starting backup of client %s", $client) ;
if (!empty ($client))
$log["clients"][$client]["start"] = strtotime($timestamp) ;
- } elseif (strpos ($line, "Failed backing up client") !== false) {
+ } elseif (strpos ($line, "Failed backing up client ") !== false) {
sscanf ($info, "Failed backing up client %s", $client) ;
if (!empty ($client))
$log["clients"][$client]["failed"] = strtotime($timestamp) ;
- } elseif (strpos ($line, "Successfully finished backing up client") !== false) {
+ } elseif (strpos ($line, "Successfully finished backing up client ") !== false) {
sscanf ($info, "Successfully finished backing up client %s", $client) ;
if (!empty ($client))
$log["clients"][$client]["ok"] = strtotime($timestamp) ;
@@ -711,8 +711,8 @@ foreach ($scheduler as $line) {
continue ;
$config["active"] = true ;
$array = explode (" ", $line) ;
- sscanf ($array[0], "%d", $config["minutes"]) ;
- sscanf ($array[1], "%d", $config["hours"]) ;
+ sscanf ($array[0], "%s", $config["minutes"]) ;
+ sscanf ($array[1], "%s", $config["hours"]) ;
}
unset ($revisions) ;
diff --git a/templates/config.tpl b/templates/config.tpl
index ae46879..5eff991 100644
--- a/templates/config.tpl
+++ b/templates/config.tpl
@@ -45,8 +45,7 @@
<TR>
<TD>{t}Servertype{/t}</TD>
<TD>
- {html_options name=server_type values=$types
- output=$types selected=$server_type}
+ {html_options name=server_type values=$types output=$types selected=$server_type}
</TD>
<TD>{t}User{/t}</TD>
<TD>
@@ -66,8 +65,7 @@
</TABLE>
<H2>{t}Client config{/t}</H2>
{t}Client:{/t}
- {html_options name=client values=$clients output=$clients
- selected=$client}
+ {html_options name=client values=$clients output=$clients selected=$client}
<INPUT type=submit name=chooseclient value="{t}Choose{/t}">
<INPUT type=submit name=addclient value="{t}New{/t}">
<INPUT type=submit name=delclient value="{t}Remove{/t}">
@@ -87,8 +85,7 @@
<TR>
<TD>{t}Clienttype{/t}</TD>
<TD>
- {html_options name=client_type values=$types
- output=$types selected=$client_type}
+ {html_options name=client_type values=$types output=$types selected=$client_type}
</TD>
<TD>{t}User{/t}</TD>
<TD>
diff --git a/templates/maint.tpl b/templates/maint.tpl
index 41752aa..ae2d419 100644
--- a/templates/maint.tpl
+++ b/templates/maint.tpl
@@ -20,14 +20,12 @@
<FORM action="index.php" method=post>
<H2>{t}Maintenance{/t}</H2>
- {html_options name=client values=$clients output=$clients
- selected=$client}
+ {html_options name=client values=$clients output=$clients selected=$client}
<INPUT type=submit name=maint value="{t}Choose{/t}">
{if $client <> ""}
<INPUT type=hidden name=selected value="{$client}">
{t}Oldest snapshot to keep:{/t}</TD>
- {html_options name=snapshot values=$snapshots output=$snapshots
- selected=$snapshot}
+ {html_options name=snapshot values=$snapshots output=$snapshots selected=$snapshot}
<INPUT type=submit name=removesnapshot value="{t}Delete older{/t}">
{/if}
<HR>
diff --git a/templates/restore.tpl b/templates/restore.tpl
index af52faa..0eb5c2e 100644
--- a/templates/restore.tpl
+++ b/templates/restore.tpl
@@ -20,12 +20,10 @@
<FORM action="index.php" method=post>
<H2>{t}Client to restore{/t}</H2>
- {html_options name=client values=$clients output=$clients
- selected=$client}
+ {html_options name=client values=$clients output=$clients selected=$client}
<INPUT type=submit name=restoreclient value="{t}Choose{/t}">
{t}Locations:{/t}</TD>
- {html_options name=location values=$locations output=$locations
- selected=$location}
+ {html_options name=location values=$locations output=$locations selected=$location}
<INPUT type=submit name=restorelocation value="{t}Browse{/t}">
<BR>
{if $sub <> ""}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/slbackup-php.git
More information about the debian-edu-commits
mailing list