Control: tags -1 patch

Please, find below three patches that fix Bug#517315. They apply cleanly to the current debian branch of the Git repository at alioth.d.o.

The links to the local CGI examples cannot be really "fixed", since there is no way to get the <a href="..."> links to use the POST method instead of the GET method, what makes the CGI scripts w3mbookmark and w3mhelperpanel fail. I implemented another approach, namely by invoking two new CGI scripts, called "add-bookmark" and "helper-app", that use "W3m-control:" headers.

Best,

Rafael Laboissiere





>From b0a22bf7ff0fef6e0a8baa1362098ede26398ef8 Mon Sep 17 00:00:00 2001
From: Rafael Laboissiere <raf...@laboissiere.net>
Date: Thu, 26 Dec 2013 13:10:41 +0100
Subject: [PATCH 1/3] Avoid compression of README.func and get the link in
 MANUAL.html working

---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index a3d4e40..2a1c2b5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -94,7 +94,7 @@ binary-arch: install
 #	dh_installman
 	dh_installchangelogs -a $(builddir)/ChangeLog
 	dh_strip -a
-	dh_compress -a
+	dh_compress -a -XREADME.func
 	dh_lintian -a
 	dh_fixperms -a -Xw3mimgdisplay
 	dh_installdeb -a
-- 
1.8.5.1

>From af0d5705d0abd90135f18c820c4ab13580d7c01b Mon Sep 17 00:00:00 2001
From: Rafael Laboissiere <raf...@laboissiere.net>
Date: Thu, 26 Dec 2013 13:11:47 +0100
Subject: [PATCH 2/3] Fix links to the keymap examples in MANUAL.html

---
 debian/patches/300_keymap-links.patch | 18 ++++++++++++++++++
 debian/patches/series                 |  1 +
 2 files changed, 19 insertions(+)
 create mode 100644 debian/patches/300_keymap-links.patch

diff --git a/debian/patches/300_keymap-links.patch b/debian/patches/300_keymap-links.patch
new file mode 100644
index 0000000..214a1e6
--- /dev/null
+++ b/debian/patches/300_keymap-links.patch
@@ -0,0 +1,18 @@
+Description: Fix links to the keymap examples in the manual
+Author: Rafael Laboissiere <raf...@laboissiere.net>
+Bug-Debian: http://bugs.debian.org/517315
+Last-Update: 2013-12-26
+
+--- w3m-0.5.3.orig/doc/MANUAL.html
++++ w3m-0.5.3/doc/MANUAL.html
+@@ -457,8 +457,8 @@ by describing ~/.w3m/keymap. For example
+ binds `NEXT_PAGE' function (normally bound to SPC and C-v)
+ to control-o. See <a href="README.func">README.func</a> for
+ list of available functions. Original and Lynx-like keymap
+-definitions are provided (<a href="keymap.default">keymap.default</a>
+-and <a href="keymap.lynx">keymap.lynx</a>) as examples.
++definitions are provided (<a href="examples/keymap.default">keymap.default</a>
++and <a href="examples/keymap.lynx">keymap.lynx</a>) as examples.
+ 
+ <hr>
+ <a name="LocalCGI"></a>
diff --git a/debian/patches/series b/debian/patches/series
index 38de3ff..191ac7b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -28,4 +28,5 @@
 270_refresh-url.patch
 280_search-next.patch
 290_closedir.patch
+300_keymap-links.patch
 900_ChangeLog.patch
-- 
1.8.5.1

>From e4232cbfbe6d18f3180a09f393c9fd62aff6ffd8 Mon Sep 17 00:00:00 2001
From: Rafael Laboissiere <raf...@laboissiere.net>
Date: Thu, 26 Dec 2013 13:13:45 +0100
Subject: [PATCH 3/3] Fix links to the local CGI examples in MANUAL.html

---
 debian/add-bookmark                      |  5 +++++
 debian/helper-app                        |  5 +++++
 debian/patches/310_local-cgi-links.patch | 27 +++++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 debian/rules                             |  2 ++
 5 files changed, 40 insertions(+)
 create mode 100755 debian/add-bookmark
 create mode 100755 debian/helper-app
 create mode 100644 debian/patches/310_local-cgi-links.patch

diff --git a/debian/add-bookmark b/debian/add-bookmark
new file mode 100755
index 0000000..77cf6ea
--- /dev/null
+++ b/debian/add-bookmark
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "Content-Type: text/plain"
+echo "W3m-control: BACK"
+echo "W3m-control: ADD_BOOKMARK"
diff --git a/debian/helper-app b/debian/helper-app
new file mode 100755
index 0000000..478d7ec
--- /dev/null
+++ b/debian/helper-app
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "Content-Type: text/plain"
+echo "W3m-control: BACK"
+echo "W3m-control: OPTIONS"
diff --git a/debian/patches/310_local-cgi-links.patch b/debian/patches/310_local-cgi-links.patch
new file mode 100644
index 0000000..f2adf7e
--- /dev/null
+++ b/debian/patches/310_local-cgi-links.patch
@@ -0,0 +1,27 @@
+Description: Fix links to the local CGI examples in the manual
+Author: Rafael Laboissiere <raf...@laboissiere.net>
+Bug-Debian: http://bugs.debian.org/517315
+Last-Update: 2013-12-26
+
+--- w3m-0.5.3.orig/doc/MANUAL.html
++++ w3m-0.5.3/doc/MANUAL.html
+@@ -466,8 +466,8 @@ and <a href="examples/keymap.lynx">keyma
+ You can run CGI scripts using w3m, without any HTTP server.
+ It means that w3m behaves like an HTTP server and activates CGI script,
+ then w3m reads the output of the script and display it. The 
+-<a href="file:///$LIB/w3mbookmark?mode=panel&bmark=~/.w3m/bookmark.html&url=MANUAL.html&title=w3m+manual">bookmark registration</a>
+-and <a href="file:///$LIB/w3mhelperpanel?mode=panel">helper-app editor</a>
++<a href="file:///$LIB/add-bookmark">bookmark registration</a>
++and <a href="file:///$LIB/helper-app">helper-app editor</a>
+ are realized as local CGI scripts.
+ Using local CGI, w3m can be used as a general purpose form interface.
+ <P>
+@@ -475,7 +475,7 @@ For security reason, CGI scripts invoked
+ these directories.
+ <ul>
+ <li>The directory where w3m-related files are stored 
+-(typically /usr/local/lib/w3m). This directory can be referred
++(/usr/lib/w3m/cgi-bin/ in Debian systems). This directory can be referred
+ as $LIB.
+ <li>/cgi-bin/ directory. You can map /cgi-bin/ to any directory you like
+ with option setting panel (``Directory corresponds to /cgi-bin'' field).
diff --git a/debian/patches/series b/debian/patches/series
index 191ac7b..606325f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,4 +29,5 @@
 280_search-next.patch
 290_closedir.patch
 300_keymap-links.patch
+310_local-cgi-links.patch
 900_ChangeLog.patch
diff --git a/debian/rules b/debian/rules
index 2a1c2b5..74ce9d4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -68,6 +68,8 @@ binary-indep:
 binary-arch: install
 	dh_testdir -a
 	dh_testroot -a
+	install --mode=755 debian/add-bookmark debian/helper-app	\
+		debian/w3m/usr/lib/w3m/cgi-bin/
 	dh_installdocs -a
 	-rm -f debian/w3m/usr/share/doc/w3m/README.cygwin
 	-mv -f debian/w3m/usr/share/doc/w3m/README.img debian/w3m-img/usr/share/doc/w3m-img/README.img
-- 
1.8.5.1

Reply via email to