diff -Nru webfs-1.21+ds1/debian/changelog webfs-1.21+ds1/debian/changelog --- webfs-1.21+ds1/debian/changelog 2010-10-22 19:56:21.000000000 +0000 +++ webfs-1.21+ds1/debian/changelog 2010-12-02 21:36:48.000000000 +0000 @@ -1,9 +1,31 @@ -webfs (1.21+ds1-6ubuntu1) natty; urgency=low +webfs (1.21+ds1-8) unstable; urgency=low - * 99_binutils_gold.diff: Add -lgcrypt to LDFLAGS for binutils-gold, - fixes FTBFS (LP: #665276) + * Regressions on previous package version. + + debian/postrm: Test on full path. + + debian/postinst: Full path and temporary file copy. + + Closes: #605690, #605691. + + -- Mats Erik Andersson Thu, 02 Dec 2010 22:34:44 +0100 + +webfs (1.21+ds1-7) unstable; urgency=low + + * Violation of Policy 10.7.3: Config file. + + Use `ucf' for updating configuration. + + d/control: Depend on "ucf". + + d/rules: Install conffile as "/usr/share/webfs/webfsd.conf.auto". + + d/webfs.postinst: Copy old conffile, do all updating on the file + "webfs.conf.auto", and register the result using "ucf" and "ucfr". + + d/webfs.postrm: Purge with support of "ucfr" and "ucf". + + Closes: #603926. + * FTBFS when using "binutils-gold". + + Explicitly add "-lgcrypt" to LDFLAGS. + + debian/patches/63_gnutls.diff: Updated file. + + Contributed by Roy Jamison. Origin LP: #665276. + + Closes: #601044. + * debian/webfs.init: Remove `$named' from Required-Start + and from Required-Stop. - -- Roy Jamison Fri, 22 Oct 2010 21:56:21 +0200 + -- Mats Erik Andersson Tue, 30 Nov 2010 19:51:04 +0100 webfs (1.21+ds1-6) unstable; urgency=low diff -Nru webfs-1.21+ds1/debian/control webfs-1.21+ds1/debian/control --- webfs-1.21+ds1/debian/control 2010-10-22 19:56:18.000000000 +0000 +++ webfs-1.21+ds1/debian/control 2010-11-30 14:58:34.000000000 +0000 @@ -2,14 +2,13 @@ Section: httpd Priority: optional Build-Depends: debhelper (>= 7), po-debconf, libgnutls-dev -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Mats Erik Andersson +Maintainer: Mats Erik Andersson Standards-Version: 3.9.1 Homepage: http://linux.bytesex.org/misc/webfs.html Package: webfs Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, debconf | debconf-2.0 +Depends: ${shlibs:Depends}, ${misc:Depends}, debconf | debconf-2.0, ucf Provides: httpd Description: lightweight HTTP server for static content This package provides a simple web server for mostly static content, diff -Nru webfs-1.21+ds1/debian/patches/63_gnutls.diff webfs-1.21+ds1/debian/patches/63_gnutls.diff --- webfs-1.21+ds1/debian/patches/63_gnutls.diff 2010-06-10 07:05:28.000000000 +0000 +++ webfs-1.21+ds1/debian/patches/63_gnutls.diff 2010-10-26 07:35:28.000000000 +0000 @@ -7,9 +7,12 @@ . No client verifications are implemented, neither can the crypto key be protected by a pass phrase at this time. + . + Explicit linking to "gcrypt". This is needed by "binutils-gold". + Reported as LP: #665276. Contributed by Roy Jamison. Author: Mats Erik Andersson Forwarded: no -Last-Update: 2010-03-16 +Last-Update: 2010-10-26 --- webfs-1.21+ds1/GNUmakefile.debian +++ webfs-1.21+ds1/GNUmakefile @@ -24,6 +24,7 @@ LIB := $(LIB) @@ -28,7 +31,7 @@ +USE_SSL = no +CFLAGS += -DUSE_GNUTLS=1 +OBJS += ssl.o -+LDLIBS += -lgnutls ++LDLIBS += -lgnutls -lgcrypt +endif + diff -Nru webfs-1.21+ds1/debian/patches/99_binutils_gold.diff webfs-1.21+ds1/debian/patches/99_binutils_gold.diff --- webfs-1.21+ds1/debian/patches/99_binutils_gold.diff 2010-10-22 19:56:18.000000000 +0000 +++ webfs-1.21+ds1/debian/patches/99_binutils_gold.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -Description: Adds -lgcrypt to LDFLAGS in GNUmakefile for binutils-gold -Author: Roy Jamison -Bug-Ubuntu: https://bugs.launchpad.net/bugs/665276 ---- webfs-1.21+ds1.orig/GNUmakefile 2010-10-22 19:34:04.978312580 +0100 -+++ webfs-1.21+ds1/GNUmakefile 2010-10-22 19:34:39.000000000 +0100 -@@ -47,7 +47,7 @@ - USE_SSL = no - CFLAGS += -DUSE_GNUTLS=1 - OBJS += ssl.o --LDLIBS += -lgnutls -+LDLIBS += -lgnutls -lgcrypt - endif - - diff -Nru webfs-1.21+ds1/debian/patches/series webfs-1.21+ds1/debian/patches/series --- webfs-1.21+ds1/debian/patches/series 2010-10-22 19:56:18.000000000 +0000 +++ webfs-1.21+ds1/debian/patches/series 2010-04-22 11:46:03.000000000 +0000 @@ -9,4 +9,3 @@ 63_gnutls.diff 66_further_gnutls.diff 70_group_access.diff -99_binutils_gold.diff diff -Nru webfs-1.21+ds1/debian/rules webfs-1.21+ds1/debian/rules --- webfs-1.21+ds1/debian/rules 2010-02-14 15:46:26.000000000 +0000 +++ webfs-1.21+ds1/debian/rules 2010-11-30 17:54:59.000000000 +0000 @@ -16,9 +16,10 @@ $(MAKE) install \ prefix=$(installdir)/usr \ mandir=$(installdir)/usr/share/man - install -d $(installdir)/etc - install -m 0644 debian/webfsd.conf $(installdir)/etc/ - + install -d $(installdir)/usr/share/webfs + install -m 0644 debian/webfsd.conf \ + $(installdir)/usr/share/webfs/webfsd.conf.auto + binary-arch: install dh_testroot -a dh_installdirs -a diff -Nru webfs-1.21+ds1/debian/webfs.init webfs-1.21+ds1/debian/webfs.init --- webfs-1.21+ds1/debian/webfs.init 2010-03-31 12:14:47.000000000 +0000 +++ webfs-1.21+ds1/debian/webfs.init 2010-11-18 13:16:07.000000000 +0000 @@ -1,8 +1,8 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: webfs -# Required-Start: $local_fs $remote_fs $syslog $named $network -# Required-Stop: $local_fs $remote_fs $syslog $named $network +# Required-Start: $local_fs $remote_fs $syslog $network +# Required-Stop: $local_fs $remote_fs $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Webfs simple HTTP server diff -Nru webfs-1.21+ds1/debian/webfs.postinst webfs-1.21+ds1/debian/webfs.postinst --- webfs-1.21+ds1/debian/webfs.postinst 2010-02-14 15:46:26.000000000 +0000 +++ webfs-1.21+ds1/debian/webfs.postinst 2010-12-02 21:33:59.000000000 +0000 @@ -23,27 +23,47 @@ q15=web_cgipath q16=web_extras +CONFFILE=/etc/webfsd.conf +AUTOCONFFILE=/usr/share/webfs/webfsd.conf.auto + if [ "$1" = "configure" ] then + TEMPCONFFILE=$(mktemp) + + # Copy static file (in package) to a writable location. + cp -a $AUTOCONFFILE $TEMPCONFFILE + + if test -f $CONFFILE + then + # Use old configuration as upgrade basis + cp -a $CONFFILE $TEMPCONFFILE + fi + # update config file from debconf answers - test -f /etc/webfsd.conf || touch /etc/webfsd.conf + for question in $q1 $q2 $q3 $q4 $q5 $q6 $q7 $q8 $q9 $q10 \ $q11 $q12 $q13 $q14 $q15 $q16 do db_get "webfsd/$question" # echo "debug: webfsd/$question=$RET" > /dev/tty - if grep -q -e "^$question=" /etc/webfsd.conf + if grep -q -e "^$question=" $TEMPCONFFILE then - sed -e "s|^$question=.*|$question=\"$RET\"|" \ - < /etc/webfsd.conf > /etc/webfsd.conf.new - mv -f /etc/webfsd.conf.new /etc/webfsd.conf + sed -i -e "s|^$question=.*|$question=\"$RET\"|" \ + $TEMPCONFFILE else - echo "$question=\"$RET\"" >> /etc/webfsd.conf + echo "$question=\"$RET\"" >> $TEMPCONFFILE fi done db_set webfsd/pending no + # Register the auto generated configuration file. + test -x /usr/bin/ucf && \ + ucf --three-way --debconf-ok $TEMPCONFFILE $CONFFILE + test -x /usr/bin/ucfr && \ + ucfr webfs $CONFFILE + + # Compute some sensible defaults before doing setup. db_get "webfs/web_user" || RET=www-data web_user=$RET db_get "webfs/web_group" || RET=www-data @@ -67,6 +87,9 @@ touch "$web_accesslog" 2>/dev/null || true chown "$web_user":"$web_group" "$web_accesslog" 2>/dev/null || true fi + + # Erase safely, out of principle + rm $TEMPCONFFILE 2>/dev/null || true fi # test for "configure" #DEBHELPER# diff -Nru webfs-1.21+ds1/debian/webfs.postrm webfs-1.21+ds1/debian/webfs.postrm --- webfs-1.21+ds1/debian/webfs.postrm 2010-02-14 15:46:26.000000000 +0000 +++ webfs-1.21+ds1/debian/webfs.postrm 2010-12-02 20:56:26.000000000 +0000 @@ -2,12 +2,26 @@ set -e +CONFIG=/etc/webfsd.conf + if [ "$1" = "purge" ]; then rm -Rf /var/log/webfs/* if dpkg-statoverride --list /var/log/webfs >/dev/null 2>&1 then dpkg-statoverride --remove /var/log/webfs fi + + # Erase the registration of the only config file, + # and the file itself as well as intermediary files. + for ext in .ucf-new .ucf-old .ucf-dist + do + rm -f $CONFIG$ext + done + rm -f $CONFIG + test -x /usr/bin/ucfr && \ + ucfr --purge webfs $CONFIG + test -x /usr/bin/ucf && \ + ucf --purge $CONFIG fi #DEBHELPER#