[xml/sgml-commit] r1752 - in /packages/w3c-markup-validator/trunk/debian: README.Debian logo.png postinst postrm prerm stuff/
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Thu Aug 19 15:59:25 UTC 2010
Author: periapt-guest
Date: Thu Aug 19 15:59:13 2010
New Revision: 1752
URL: http://svn.debian.org/wsvn/debian-xml-sgml/?sc=1&rev=1752
Log:
enabling scripts
Added:
packages/w3c-markup-validator/trunk/debian/postinst
packages/w3c-markup-validator/trunk/debian/postrm
packages/w3c-markup-validator/trunk/debian/prerm
Removed:
packages/w3c-markup-validator/trunk/debian/stuff/
Modified:
packages/w3c-markup-validator/trunk/debian/README.Debian
packages/w3c-markup-validator/trunk/debian/logo.png
Modified: packages/w3c-markup-validator/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/README.Debian?rev=1752&op=diff
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/README.Debian (original)
+++ packages/w3c-markup-validator/trunk/debian/README.Debian Thu Aug 19 15:59:13 2010
@@ -7,11 +7,57 @@
Allow Private IPs = no
+The install scripts will enable the include and rewrite apache modules, howver
+the remove scripts will not disable these modules. This seems this safest
+way of satisfying the codes dependencies on these modules.
+
Suggested post-installation tests
=================================
-1.) Run /usr/lib/cgi-bin/w3c-validator/check
+1.) Run /usr/lib/cgi-bin/w3c-markup-validator/check
This should return an HTML page complaining that that type of document is not
supported. It should not complain of syntax or configuration errors.
-2.) If online run /usr/lib/cgi-bin/w3c-validator/check 'uri=http://www.periapt.co.uk'.
+2.) If online run /usr/lib/cgi-bin/w3c-markup-validator/check 'uri=http://www.periapt.co.uk'.
This should return an HTML page confirming valid HTML.
3.) Point your browser at http://localhost/w3c-validator/ and run any tests you can think of.
+
+Old note about authentication (Needs follow up)
+=============================
+Note from Adam Sjøgren <asjo at koldfront.dk> in Bug#298772:
+
+[ Note from Nicholas Bamber <nicholas at periapt.co.uk>.
+I have not had time to check this stuff out.
+Howver the patch is now out of date. "w3c-markup-validator" is now
+"w3c-validator/". ]
+
+The Apache-configuration supplied by this package is insufficient for
+validating pages that require http-authorization.
+
+The "check" script attempts to proxy the auth-request (the browser
+pops up a login/password dialogue), but fails (the dialogue keeps
+appearing over and over despite correctly entered login/password).
+
+The problem is that the script expects the environment variable
+HTTP_AUTHORIZATION to contain the contents of the Authorization-header
+(see line 1408 in /usr/lib/cgi-bin/check). It does not by default.
+
+By searching a little I've found an easy way to set this using
+mod_rewrite, as shown in this tiny patch:
+
+
+--- apache.conf.orig 2005-03-09 22:34:20.875157298 +0100
++++ apache.conf 2005-03-09 22:34:47.086559812 +0100
+@@ -2,6 +2,10 @@
+ ScriptAlias /w3c-markup-validator/checklink /usr/lib/cgi-bin/checklink
+ Alias /w3c-markup-validator /usr/share/w3c-markup-validator/html
+
++RewriteEngine On
++RewriteCond %{HTTP:Authorization} ^(.*)$ [NC]
++RewriteRule /.* - [E=HTTP_AUTHORIZATION:%1]
++
+ <Location /w3c-markup-validator>
+ Options +Includes +MultiViews
+ AddHandler server-parsed .html
+
+
+
+ -- Frederic Schutz <schutz at mathgen.ch> Thu, 18 May 2006 19:18:55 +0200
Modified: packages/w3c-markup-validator/trunk/debian/logo.png
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/logo.png?rev=1752&op=diff
==============================================================================
Binary files - no diff available.
Added: packages/w3c-markup-validator/trunk/debian/postinst
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/postinst?rev=1752&op=file
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/postinst (added)
+++ packages/w3c-markup-validator/trunk/debian/postinst Thu Aug 19 15:59:13 2010
@@ -1,0 +1,74 @@
+#! /bin/sh
+# postinst script for w3c-markup-validator
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure|reconfigure)
+
+ servers = "apache2"
+
+ for server in $servers; do
+ test -d /etc/$server/conf.d || continue
+
+ if [ ! -s /etc/$server/conf.d/w3c-markup-validator.conf ]; then
+ ln -s /etc/w3c/httpd.conf /etc/$server/conf.d/w3c-markup-validator.conf
+ fi
+
+ if [ $server = "apache2" ]; then
+ a2enmod include
+ a2enmod rewrite
+ fi
+
+ done
+
+ . /usr/share/wwwconfig-common/restart.sh
+
+ if [ ! "$error" = "" ] ; then
+ echo "$error"
+ fi
+
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+db_stop
+
+exit 0
+
+
Added: packages/w3c-markup-validator/trunk/debian/postrm
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/postrm?rev=1752&op=file
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/postrm (added)
+++ packages/w3c-markup-validator/trunk/debian/postrm Thu Aug 19 15:59:13 2010
@@ -1,0 +1,41 @@
+#! /bin/sh
+# postrm script for w3c-markup-validator
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ ;;
+
+ purge)
+ rmdir /etc/w3c 2>/dev/null || true
+ ;;
+
+ *)
+ 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
Added: packages/w3c-markup-validator/trunk/debian/prerm
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/prerm?rev=1752&op=file
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/prerm (added)
+++ packages/w3c-markup-validator/trunk/debian/prerm Thu Aug 19 15:59:13 2010
@@ -1,0 +1,60 @@
+#! /bin/sh
+# prerm script for w3c-markup-validator
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ upgrade)
+ ;;
+ remove|deconfigure)
+
+ servers = "apache2"
+
+ for server in $servers; do
+ test -d /etc/$server || continue
+
+ if [ -s /etc/$server/conf.d/w3c-markup-validator.conf ]; then
+ rm /etc/$server/conf.d/w3c-markup-validator.conf
+
+ fi
+ done
+
+ /usr/share/wwwconfig-common/restart.sh
+
+ if [ ! "$error" = "" ] ; then
+ echo "$error"
+ fi
+
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm 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
+
+
More information about the debian-xml-sgml-commit
mailing list