Hi Wolfgang, Giorgia, Petter, et al. On Fr 07 Jun 2013 12:03:04 CEST Wolfgang Schweer wrote:
On Fri, Jun 07, 2013 at 10:59:16AM +0200, Petter Reinholdtsen wrote:[Wolfgang Schweer] > This patch seems to work: Wow. This is great news. Patches for both the blocking bugs for Debian Edu Wheezy in the same week. Can you explain what the patch do, and how this could work ealier?The nonhttps stuff was added after the squeeze release. The break seems to have been forgotten, I guess.
I have just released slbackup-php 0.4.4 (upstream) which has some more break statements added and also fixes slbackup-php out-of-the-box installation on vanilla Debian wheezy.
The upstream diff to 0.4.3 is attached to this mail.Note: on a Debian Edu main server we now have to place an extra file to make slbackup-php use the backup host »backup« instead of the now newly hard-coded default backup host »localhost«.
This one liner has to be created as /etc/slbackup-php/config.php: """ <?php $backuphost="backup"; ?> """ Greets, Mike -- DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148 GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
commit c42f60786d9465d8c0adb442b84e5cf3020f45dc Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Jun 7 17:38:31 2013 +0200 Imported Upstream version 0.4.4 diff --git a/ChangeLog b/ChangeLog index 2f301cb..6aed580 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Fri, 06 Jun 2013 Mike Gabriel + + * Release 0.4.4: + - Fix installation/usage on non-Debian-Edu + (i.e. vanilla Debian) systems. Esp. do not + hard-code the host 'backup' as default backup host. + - Add two more break statements when evaluating + session arguments. + - Store changes to the nonhttps session parameter back + to the client-side session cookie if changes occur. + Thu, 12 Jul 2012 Mike Gabriel * Release 0.4.3: diff --git a/debian/changelog b/debian/changelog index a64d9b7..0b2414c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +slbackup-php (0.4.4-0) unstable; urgency=low + + * Upstream version (0.4.4): + - Add 'break' statements after evaluating the nonhttps option + and the selected option. Patch from Wolfgang Schweer. Thanks! + - Write changes to nonhttps _SESSION option back to cookie. + - As a host default use 'localhost', not 'backup'. The hostname + 'backup' is set up on the Debian Edu mainserver by default, + but not on vanilla Debian systems. The generic approach is: + -> use 'localhost' in src/functions.php + -> provide alternative backup hostname via /etc/slbackup-php/config.php. + * Pick packaging files from debian/0.4.3-1. + + -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Fri, 07 Jun 2013 17:30:30 +0200 + slbackup-php (0.4.3-0) unstable; urgency=low * Upstream version (0.4.3): diff --git a/debian/compat b/debian/compat index 7f8f011..7ed6ff8 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +5 diff --git a/debian/control b/debian/control index 566a0e9..599bf3e 100644 --- a/debian/control +++ b/debian/control @@ -3,11 +3,11 @@ Section: misc Priority: optional Maintainer: Debian Edu Packaging Team <debian-edu-pkg-team@lists.alioth.debian.org> Uploaders: - Mike Gabriel <mike.gabriel@das-netzwerkteam.de>, + Mike Gabriel <sunweaver@debian.org>, Patrick Winnertz <winnie@debian.org>, Morten Werner Olsen <werner@debian.org>, Finn-Arne Johansen <faj@bzz.no> -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 Build-Depends: debhelper (>= 7.0.50~), po-debconf, @@ -21,10 +21,12 @@ Depends: ${misc:Depends}, libapache2-mod-php5, apache2, - smarty3, ssh, php5-cli, - smarty-gettext (>= 1.0b1-7) + smarty3, + smarty-gettext (>= 1.0b1-7), +Suggests: + x-www-browser, Description: Web-based administration tool for slbackup Slbackup-php provides the necessary functions to maintain a slbackup repository. @@ -35,4 +37,3 @@ Description: Web-based administration tool for slbackup - verifying SSH keys and successful backups; - restoring from backups; - removing old backups from the repository. - diff --git a/debian/rules b/debian/rules index deb9373..7adae8e 100755 --- a/debian/rules +++ b/debian/rules @@ -2,12 +2,14 @@ # -*- makefile -*- -build: build-stamp build-arch build-indep +build: build-arch build-indep build-arch: -# nothing to be done here +# nothing to do for build-arch -build-indep: +build-indep: build-stamp + +build-stamp: debconf-updatepo build-stamp: @@ -20,18 +22,16 @@ clean: dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) clean - dh_quilt_unpatch dh_clean install: build dh_testdir dh_testroot dh_clean - dh_quilt_patch -$(MAKE) mo-files dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/slbackup-php prefix=/usr - + dh_install binary-arch: @@ -40,7 +40,6 @@ binary-indep: build install dh_testroot dh_installchangelogs dh_installdocs ./ChangeLog - #dh_installdocs mv $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/ChangeLog $(CURDIR)/debian/slbackup-php/usr/share/doc/slbackup-php/changelog dh_installcron dh_installdebconf diff --git a/debian/slbackup-php.desktop b/debian/slbackup-php.desktop new file mode 100644 index 0000000..0fe733f --- /dev/null +++ b/debian/slbackup-php.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=slbackup-php +GenericName=SLBackup configuration tool +Comment=Webpage for configuring slbackup +Version=1.0 +TryExec=x-www-browser http://localhost/slbackup-php/?nonhttps=warn +Exec=x-www-browser http://localhost/slbackup-php/?nonhttps=warn +Terminal=false +Type=Application +Categories=Application;Network;System;Security diff --git a/debian/slbackup-php.install b/debian/slbackup-php.install new file mode 100644 index 0000000..54c1af7 --- /dev/null +++ b/debian/slbackup-php.install @@ -0,0 +1 @@ +debian/slbackup-php.desktop usr/share/applications/ \ No newline at end of file diff --git a/src/functions.php b/src/functions.php index 3eb90c6..7f52734 100644 --- a/src/functions.php +++ b/src/functions.php @@ -22,13 +22,13 @@ function loadConfig () { global $backuphost, $backupuser, $backupconf, $backupcron, $ssh_options, $logfile, $nonhttps, $smarty_templ, $smarty_compile ; - @include_once ("/etc/slbackup/config.php") ; + @include_once ("/etc/slbackup-php/config.php") ; if (empty ($nonhttps)) $nonhttps = $_COOKIE ['nonhttps'] ; if (empty ($smarty_templ)) $smarty_templ = $_COOKIE ['smarty_templ'] ; if (empty ($smarty_compile)) $smarty_compile = $_COOKIE ['smarty_compile'] ; - if (empty ($backuphost)) $backuphost="backup" ; + if (empty ($backuphost)) $backuphost="localhost" ; if (empty ($backupuser)) $backupuser="root" ; if (empty ($backupconf)) $backupconf="/etc/slbackup/slbackup.conf" ; if (empty ($backupcron)) $backupcron="/etc/cron.d/slbackup" ; diff --git a/src/index.php b/src/index.php index af2fad9..8a2e248 100644 --- a/src/index.php +++ b/src/index.php @@ -620,6 +620,7 @@ foreach ($arguments as $key => $value) { break ; case "nonhttps": $nonhttps = $value ; + break ; case "Passwd": $passwd = $value ; $submit = "status" ; @@ -654,6 +655,7 @@ foreach ($arguments as $key => $value) { break ; case "selected": $selected=$value ; + break ; case "snapshot": $snapshot=$value ; break ; @@ -684,6 +686,7 @@ if (isset ($passwd)) if (empty ($config)) { if (empty ($_SERVER["HTTPS"])) { $smarty->assign ('nonhttps', $nonhttps) ; + if ($nonhttps != $_COOKIE['nonhttps']) setcookie ('nonhttps', $nonhttps); } $smarty->assign ('backupuser', $backupuser) ; $smarty->assign ('backuphost', $backuphost) ;
Attachment:
pgpSCapqduHRw.pgp
Description: Digitale PGP-Unterschrift