[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#689107: unblock: w3c-linkchecker/4.81-5



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package w3c-linkchecker

Using ucf so as to not override conffile

unblock w3c-linkchecker/4.81-5

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-3-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru w3c-linkchecker-4.81/debian/changelog w3c-linkchecker-4.81/debian/changelog
--- w3c-linkchecker-4.81/debian/changelog	2012-09-28 09:09:51.000000000 +0100
+++ w3c-linkchecker-4.81/debian/changelog	2012-09-28 18:04:13.000000000 +0100
@@ -1,3 +1,17 @@
+w3c-linkchecker (4.81-5) unstable; urgency=low
+
+  * Applied patch from Hideki Yamane <henrich@debian.org> to comply
+    with policy 10.7.3. (Closes: #688736)
+    - debian/{postinst,w3c-linkchecker.install}: Not use linkchecker.conf
+    as conffile but template file and use ucf for conffile.
+    - debian/control: "Depends: ucf"
+    - debian/postrm: remove /etc/w3c/checklink.conf on purge and temporary
+    files when no longer required. 
+    - debian/config: removed '-e' from shebang and final 'exit 0'
+  * Removed gross copy/paste stupidity from long description
+
+ -- Nicholas Bamber <nicholas@periapt.co.uk>  Fri, 28 Sep 2012 18:03:48 +0100
+
 w3c-linkchecker (4.81-4) unstable; urgency=low
 
   * Updated Czech translation (Closes: #658398)
diff -Nru w3c-linkchecker-4.81/debian/config w3c-linkchecker-4.81/debian/config
--- w3c-linkchecker-4.81/debian/config	2012-09-26 15:47:36.000000000 +0100
+++ w3c-linkchecker-4.81/debian/config	2012-09-28 17:26:24.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 
 set -e
 
@@ -9,3 +9,4 @@
 db_input low w3c-linkchecker/private_ips || true
 db_go
 
+exit 0
diff -Nru w3c-linkchecker-4.81/debian/control w3c-linkchecker-4.81/debian/control
--- w3c-linkchecker-4.81/debian/control	2012-09-28 09:09:51.000000000 +0100
+++ w3c-linkchecker-4.81/debian/control	2012-09-28 17:26:24.000000000 +0100
@@ -16,11 +16,10 @@
 Depends: ${misc:Depends}, ${perl:Depends}, libcss-dom-perl,
  libhtml-parser-perl, libwww-perl (>= 5.833), liburi-perl (>= 1.53),
  libconfig-general-perl, libnet-ip-perl, libterm-readkey-perl,
- libencode-locale-perl
+ libencode-locale-perl, ucf
 Recommends: w3c-markup-validator, apache2 | httpd-cgi
 Description: tool to verify the links in a web page are still valid
- This manual page documents briefly the checklink command, a.k.a. the W3C®
- Link Checker. checklink is a program that reads an HTML or XHTML document,
+ The checklink tool is a program that reads an HTML or XHTML document,
  extracts a list of anchors and links and checks that no anchor is defined twice
  and that all the links are dereferenceable, including the fragments. It warns
  about HTTP redirects, including directory redirects, and can check recursively
diff -Nru w3c-linkchecker-4.81/debian/postinst w3c-linkchecker-4.81/debian/postinst
--- w3c-linkchecker-4.81/debian/postinst	2012-09-26 15:47:36.000000000 +0100
+++ w3c-linkchecker-4.81/debian/postinst	2012-09-28 17:26:24.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh 
 # postinst script for w3c-linkchecker
 #
 # see: dh_installdeb(1)
@@ -23,12 +23,15 @@
 case "$1" in
     configure)
 
+        CFG_TEMPLATE=/usr/share/w3c-linkchecker/checklink.conf
+        CFG_TMP=/etc/w3c/checklink.conf.dpkg-new
         CFG_FILE=/etc/w3c/checklink.conf
 
         db_get w3c-linkchecker/hostname
         if [ "$RET" ]
         then
-            sed -i -e "s|^Doc_URI = http://[a-z0-9.]\+/|Doc_URI = http://$RET/|" $CFG_FILE
+            sed -e "s|^Doc_URI = http://[a-z0-9.]\+/|Doc_URI = http://$RET/|" \
+              < $CFG_TEMPLATE > $CFG_TMP
         fi
 
         db_get w3c-linkchecker/private_ips
@@ -39,9 +42,14 @@
             then
                 VALUE=0
             fi
-            sed -i -e "s|^\(# \)\?Allow_Private_IPs = [01]$|Allow_Private_IPs = $VALUE|" $CFG_FILE
+            sed -e "s|^\(# \)\?Allow_Private_IPs = [01]$|Allow_Private_IPs = $VALUE|" \
+              < $CFG_TEMPLATE > $CFG_TMP
         fi
 
+        ucf --debconf-ok $CFG_TMP $CFG_FILE && rm -f $CFG_TMP
+        db_stop
+
+
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff -Nru w3c-linkchecker-4.81/debian/postrm w3c-linkchecker-4.81/debian/postrm
--- w3c-linkchecker-4.81/debian/postrm	1970-01-01 01:00:00.000000000 +0100
+++ w3c-linkchecker-4.81/debian/postrm	2012-09-28 17:26:24.000000000 +0100
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+set -e
+
+CFG_FILE=/etc/w3c/checklink.conf
+
+case "$1" in
+    purge)
+
+    if which ucf >/dev/null 2>&1; then
+        ucf --purge $CFG_FILE
+    else
+        rm -f $CFG_FILE
+    fi
+
+    for ext in .bak .tmp .dpkg-tmp .dkpg-new .dpkg-old .ucf-new .ucf-old .ucf-dist
+    do
+       rm -f $CFG_FILE$ext
+    done
+
+    ;;
+
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff -Nru w3c-linkchecker-4.81/debian/w3c-linkchecker.install w3c-linkchecker-4.81/debian/w3c-linkchecker.install
--- w3c-linkchecker-4.81/debian/w3c-linkchecker.install	2012-09-28 09:09:51.000000000 +0100
+++ w3c-linkchecker-4.81/debian/w3c-linkchecker.install	2012-09-28 17:26:24.000000000 +0100
@@ -1,5 +1,5 @@
 bin/checklink usr/bin
-etc/checklink.conf etc/w3c/
+etc/checklink.conf usr/share/w3c-linkchecker/
 docs/* usr/share/w3c-linkchecker/docs/
 images/* usr/share/w3c-linkchecker/images/
 debian/apache2-linkchecker.conf etc/w3c/

Reply to: