diff options
-rw-r--r-- | debian/changelog | 18 | ||||
-rw-r--r-- | debian/copyright | 48 | ||||
-rw-r--r-- | debian/patches/010_w3m.1-debian-fix.patch (renamed from debian/patches/10_w3m.1-debian-fix.patch) | 0 | ||||
-rw-r--r-- | debian/patches/020_ja-w3m.1-debian-fix.patch (renamed from debian/patches/20_ja-w3m.1-debian-fix.patch) | 0 | ||||
-rw-r--r-- | debian/patches/030_config-debian-fix.patch (renamed from debian/patches/30_config-debian-fix.patch) | 0 | ||||
-rw-r--r-- | debian/patches/040_gnukfreebsd-ftbfs-fix.patch (renamed from debian/patches/40_gnukfreebsd-ftbfs-fix.patch) | 0 | ||||
-rw-r--r-- | debian/patches/050_w3mman-keep-formatting.patch (renamed from debian/patches/50_w3mman-keep-formatting.patch) | 0 | ||||
-rw-r--r-- | debian/patches/060_check-null-cn.patch (renamed from debian/patches/60_check-null-cn.patch) | 0 | ||||
-rw-r--r-- | debian/patches/070_form-update.patch | 15 | ||||
-rw-r--r-- | debian/patches/080_xhtml-support.patch | 232 | ||||
-rw-r--r-- | debian/patches/090_simple-preserve-space.patch | 48 | ||||
-rw-r--r-- | debian/patches/70_ssl-init.patch | 25 | ||||
-rw-r--r-- | debian/patches/series | 16 | ||||
-rw-r--r-- | debian/w3mconfig | 2 |
14 files changed, 345 insertions, 59 deletions
diff --git a/debian/changelog b/debian/changelog index 0e9235f..d70bedb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +w3m (0.5.2-6) unstable; urgency=low + + * debian/patches/070_form-update.patch: Patch to fix a problem of + formUpdateBuffer(), from [w3m-dev 04286] on 2007-08-04, provided by + Hironori SAKAMOTO. (Closes: #409933) + * debian/patches/080_xhtml-support.patch: Patch to support for + application/xhtml+xml and default UTF-8 encoding, provided by + Karsten Schoelzel. (Closes: #223589, #242599, #357817) + * debian/patches/090_simple-preserve-space.patch: Patch to add a new + option "simple_preserve_space", provided by dai. + (Closes: #384982, #426055) + * debian/patches/*: Renumbered. + * debian/patches/70_ssl-init.patch: Removed. + * debian/w3mconfig: Set ssl_forbid_method to 2 to disable SSLv2. + * debian/copyright: Updated. + + -- Tatsuya Kinoshita <tats@debian.org> Wed, 07 Jul 2010 00:10:09 +0900 + w3m (0.5.2-5) unstable; urgency=high * debian/patches/60_check-null-cn.patch: Patch to check for null bytes diff --git a/debian/copyright b/debian/copyright index 878a056..fb3ae52 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,32 +5,28 @@ This package was debianized by The upstream source can be downloaded from http://sourceforge.net/projects/w3m -Upstream Authors: - Akinori ITO <aito@ei5sun.yz.yamagata-u.ac.jp> - Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> - Fumitoshi UKAI <ukai@debian.or.jp> - -(C) Copyright 1994-1999 by Akinori Ito. All rights reserved. - Permission is hereby granted to use or copy this program - for any purpose, provided the above notices are retained on all copies - and you accept that there is no warranty for this software. - Permission to modify the code and to distribute modified code is granted, - provided the above notices are retained, and a notice that the code was - modified is included with the above copyright notice and you accept - that there is no warranty for this software. - - This software may be redistributed freely for this purpose, in full - or in part, provided that this entire copyright notice is included - on any copies of this software and applications and derivations thereof. - - This software is provided on an "as is" basis, without warranty of any - kind, either expressed or implied, as to any matter including, but not - limited to warranty of fitness of purpose, or merchantability, or - results obtained from use of this software. - -And source archive includes Boehm GC, which is already debianized -as libgc5 and libgc5-dev, so this Debian binary package uses it -instead of libgc which comes with w3m sources. +(C) Copyright 1994-2002 by Akinori Ito +(C) Copyright 2002-2007 by Akinori Ito, Hironori Sakamoto, Fumitoshi Ukai + +Use, modification and redistribution of this software is hereby granted, +provided that this entire copyright notice is included on any copies of +this software and applications and derivations thereof. + +This software is provided on an "as is" basis, without warranty of any +kind, either expressed or implied, as to any matter including, but not +limited to warranty of fitness of purpose, or merchantability, or +results obtained from use of this software. + +The Debian packaging is distributed under the same conditions as the +upstream. + +w3mimg/fb/*: + +Copyright (C) 2002, hito +follow w3m license +(ChangeLog: 2002-10-11 Hiroyuki Ito <hito@crl.go.jp>) + +matrix.c: Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved. diff --git a/debian/patches/10_w3m.1-debian-fix.patch b/debian/patches/010_w3m.1-debian-fix.patch index e43dae4..e43dae4 100644 --- a/debian/patches/10_w3m.1-debian-fix.patch +++ b/debian/patches/010_w3m.1-debian-fix.patch diff --git a/debian/patches/20_ja-w3m.1-debian-fix.patch b/debian/patches/020_ja-w3m.1-debian-fix.patch index da9961b..da9961b 100644 --- a/debian/patches/20_ja-w3m.1-debian-fix.patch +++ b/debian/patches/020_ja-w3m.1-debian-fix.patch diff --git a/debian/patches/30_config-debian-fix.patch b/debian/patches/030_config-debian-fix.patch index 0f0818d..0f0818d 100644 --- a/debian/patches/30_config-debian-fix.patch +++ b/debian/patches/030_config-debian-fix.patch diff --git a/debian/patches/40_gnukfreebsd-ftbfs-fix.patch b/debian/patches/040_gnukfreebsd-ftbfs-fix.patch index 8398f4d..8398f4d 100644 --- a/debian/patches/40_gnukfreebsd-ftbfs-fix.patch +++ b/debian/patches/040_gnukfreebsd-ftbfs-fix.patch diff --git a/debian/patches/50_w3mman-keep-formatting.patch b/debian/patches/050_w3mman-keep-formatting.patch index 2e3c81c..2e3c81c 100644 --- a/debian/patches/50_w3mman-keep-formatting.patch +++ b/debian/patches/050_w3mman-keep-formatting.patch diff --git a/debian/patches/60_check-null-cn.patch b/debian/patches/060_check-null-cn.patch index fdab45c..fdab45c 100644 --- a/debian/patches/60_check-null-cn.patch +++ b/debian/patches/060_check-null-cn.patch diff --git a/debian/patches/070_form-update.patch b/debian/patches/070_form-update.patch new file mode 100644 index 0000000..8dc185f --- /dev/null +++ b/debian/patches/070_form-update.patch @@ -0,0 +1,15 @@ +Description: Bug fix for formUpdateBuffer() +Origin: http://mi.med.tohoku.ac.jp/~satodai/w3m-dev/200708.month/4286.html +Author: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> +Bug-Debian: http://bugs.debian.org/409933 + +--- w3m-0.5.2.orig/form.c Fri Feb 6 02:23:07 2004 ++++ w3m-0.5.2/form.c Sat Aug 4 00:23:41 2007 +@@ -403,6 +403,7 @@ + line->lineBuf = buf; + line->propBuf = prop; + line->len = len; ++ line->size = len; + + return pos; + } diff --git a/debian/patches/080_xhtml-support.patch b/debian/patches/080_xhtml-support.patch new file mode 100644 index 0000000..10a5989 --- /dev/null +++ b/debian/patches/080_xhtml-support.patch @@ -0,0 +1,232 @@ +Description: Support for application/xhtml+xml and default UTF-8 encoding +Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=242599#21 +Author: Karsten Schoelzel <kuser@gmx.de> +Bug-Debian: http://bugs.debian.org/242599 + +--- +commit e6f2cebfaf5a026a1dd3901d226cd8dcdbda8b45 +tree 4182106482bf6409ee482bf35495e4daf044ddee +parent 183d52a10e7ad0115ad6853b8a67a71228d7b0ee +author Karsten Schoelzel <kuser@asus.karsten.local> Wed, 03 May 2006 17:34:05 +0200 +committer Karsten Schoelzel <kuser@asus.karsten.local> Wed, 03 May 2006 17:34:05 +0200 + + backend.c | 2 +- + buffer.c | 4 ++-- + display.c | 2 +- + file.c | 28 ++++++++++++++++++++-------- + main.c | 12 ++++++------ + proto.h | 1 + + url.c | 1 + + 7 files changed, 32 insertions(+), 18 deletions(-) + +diff --git a/backend.c b/backend.c +index 101e67e..1360091 100644 +--- a/backend.c ++++ b/backend.c +@@ -95,7 +95,7 @@ internal_get(char *url, int flag, FormLi + buf = loadGeneralFile(url, NULL, NO_REFERER, 0, request); + do_download = FALSE; + if (buf != NULL && buf != NO_BUFFER) { +- if (!strcasecmp(buf->type, "text/html") && backend_halfdump_buf) { ++ if (is_html_type(buf->type) && backend_halfdump_buf) { + TextLineListItem *p; + Str first, last; + int len = 0; +diff --git a/buffer.c b/buffer.c +index f258dd6..ec48942 100644 +--- a/buffer.c ++++ b/buffer.c +@@ -558,7 +558,7 @@ reshapeBuffer(Buffer *buf) + WcOption.auto_detect = WC_OPT_DETECT_OFF; + UseContentCharset = FALSE; + #endif +- if (!strcasecmp(buf->type, "text/html")) ++ if (is_html_type(buf->type)) + loadHTMLBuffer(&f, buf); + else + loadBuffer(&f, buf); +@@ -590,7 +590,7 @@ reshapeBuffer(Buffer *buf) + gotoLine(buf, cur->linenumber); + } + buf->pos -= buf->currentLine->bpos; +- if (FoldLine && strcasecmp(buf->type, "text/html")) ++ if (FoldLine && !is_html_type(buf->type)) + buf->currentColumn = 0; + else + buf->currentColumn = sbuf.currentColumn; +diff --git a/display.c b/display.c +index addcaeb..18b8655 100644 +--- a/display.c ++++ b/display.c +@@ -383,7 +383,7 @@ displayBuffer(Buffer *buf, int mode) + if (buf->height == 0) + buf->height = LASTLINE + 1; + if ((buf->width != INIT_BUFFER_WIDTH && +- ((buf->type && !strcmp(buf->type, "text/html")) || FoldLine)) ++ (is_html_type(buf->type) || FoldLine)) + || buf->need_reshape) { + buf->need_reshape = TRUE; + reshapeBuffer(buf); +diff --git a/file.c b/file.c +index 0c82b93..df03333 100644 +--- a/file.c ++++ b/file.c +@@ -272,6 +272,13 @@ is_plain_text_type(char *type) + (is_text_type(type) && !is_dump_text_type(type))); + } + ++int ++is_html_type(char *type) ++{ ++ return (type && (strcasecmp(type, "text/html") == 0 || ++ strcasecmp(type, "application/xhtml+xml") == 0)); ++} ++ + static void + check_compression(char *path, URLFile *uf) + { +@@ -373,7 +380,7 @@ examineFile(char *path, URLFile *uf) + uf->guess_type = guessContentType(path); + if (uf->guess_type == NULL) + uf->guess_type = "text/plain"; +- if (strcasecmp(uf->guess_type, "text/html") == 0) ++ if (is_html_type(uf->guess_type)) + return; + if ((fp = lessopen_stream(path))) { + UFclose(uf); +@@ -2054,6 +2061,10 @@ loadGeneralFile(char *path, ParsedURL *v + t = f.guess_type; + } + ++ /* XXX: can we use guess_type to give the type to loadHTMLstream ++ * to support default utf8 encoding for XHTML here? */ ++ f.guess_type = t; ++ + page_loaded: + if (page) { + FILE *src; +@@ -2164,7 +2175,7 @@ loadGeneralFile(char *path, ParsedURL *v + } + #endif + +- if (!strcasecmp(t, "text/html")) ++ if (is_html_type(t)) + proc = loadHTMLBuffer; + else if (is_plain_text_type(t)) + proc = loadBuffer; +@@ -2228,7 +2239,7 @@ loadGeneralFile(char *path, ParsedURL *v + b->real_type = real_type; + if (b->currentURL.host == NULL && b->currentURL.file == NULL) + copyParsedURL(&b->currentURL, &pu); +- if (!strcasecmp(t, "text/html")) ++ if (is_html_type(t)) + b->type = "text/html"; + else if (w3m_backend) { + Str s = Strnew_charp(t); +@@ -6734,6 +6745,8 @@ loadHTMLstream(URLFile *f, Buffer *newBu + } + if (content_charset && UseContentCharset) + doc_charset = content_charset; ++ else if (f->guess_type && !strcasecmp(f->guess_type, "application/xhtml+xml")) ++ doc_charset = WC_CES_UTF_8; + meta_charset = 0; + #endif + #if 0 +@@ -7164,8 +7177,7 @@ _saveBuffer(Buffer *buf, Line *l, FILE * + wc_ces charset = DisplayCharset ? DisplayCharset : WC_CES_US_ASCII; + #endif + +- if (buf->type && !strcasecmp(buf->type, "text/html")) +- is_html = TRUE; ++ is_html = is_html_type(buf->type); + + pager_next: + for (; l != NULL; l = l->next) { +@@ -7322,7 +7334,7 @@ openGeneralPagerBuffer(InputStream strea + t = DefaultType; + DefaultType = NULL; + } +- if (!strcasecmp(t, "text/html")) { ++ if (is_html_type(t)) { + buf = loadHTMLBuffer(&uf, t_buf); + buf->type = "text/html"; + } +@@ -8126,7 +8138,7 @@ reloadBuffer(Buffer *buf) + buf->hmarklist->nmark = 0; + if (buf->imarklist) + buf->imarklist->nmark = 0; +- if (!strcasecmp(buf->type, "text/html")) ++ if (is_html_type(buf->type)) + loadHTMLBuffer(&uf, buf); + else + loadBuffer(&uf, buf); +diff --git a/main.c b/main.c +index 70c8c1d..9026775 100644 +--- a/main.c ++++ b/main.c +@@ -4588,10 +4588,10 @@ DEFUN(vwSrc, SOURCE VIEW, "View HTML sou + + buf = newBuffer(INIT_BUFFER_WIDTH); + +- if (!strcasecmp(Currentbuf->type, "text/html")) { ++ if (is_html_type(Currentbuf->type)) { + buf->type = "text/plain"; + if (Currentbuf->real_type && +- !strcasecmp(Currentbuf->real_type, "text/html")) ++ is_html_type(Currentbuf->real_type)) + buf->real_type = "text/plain"; + else + buf->real_type = Currentbuf->real_type; +@@ -4739,8 +4739,8 @@ DEFUN(reload, RELOAD, "Reload buffer") + repBuffer(Currentbuf, buf); + if ((buf->type != NULL) && (sbuf.type != NULL) && + ((!strcasecmp(buf->type, "text/plain") && +- !strcasecmp(sbuf.type, "text/html")) || +- (!strcasecmp(buf->type, "text/html") && ++ is_html_type(sbuf.type)) || ++ (is_html_type(buf->type) && + !strcasecmp(sbuf.type, "text/plain")))) { + vwSrc(); + if (Currentbuf != buf) +@@ -5059,7 +5059,7 @@ DEFUN(dispI, DISPLAY_IMAGE, "Restart loa + return; + displayImage = TRUE; + /* +- * if (!(Currentbuf->type && !strcmp(Currentbuf->type, "text/html"))) ++ * if (!(Currentbuf->type && is_html_type(Currentbuf->type))) + * return; + */ + Currentbuf->image_flag = IMG_FLAG_AUTO; +@@ -5072,7 +5072,7 @@ DEFUN(stopI, STOP_IMAGE, "Stop loading a + if (!activeImage) + return; + /* +- * if (!(Currentbuf->type && !strcmp(Currentbuf->type, "text/html"))) ++ * if (!(Currentbuf->type && is_html_type(Currentbuf->type))) + * return; + */ + Currentbuf->image_flag = IMG_FLAG_SKIP; +diff --git a/proto.h b/proto.h +index 8929580..61a04c1 100644 +--- a/proto.h ++++ b/proto.h +@@ -167,6 +167,7 @@ extern ParsedURL *schemeToProxy(int sche + extern void examineFile(char *path, URLFile *uf); + extern char *acceptableEncoding(); + extern int dir_exist(char *path); ++extern int is_html_type(char *type); + #ifdef USE_M17N + extern char **get_symbol(wc_ces charset, int *width); + extern char **set_symbol(int width); +diff --git a/url.c b/url.c +index b34d535..507589f 100644 +--- a/url.c ++++ b/url.c +@@ -92,6 +92,7 @@ static struct table2 DefaultGuess[] = { + {"html", "text/html"}, + {"htm", "text/html"}, + {"shtml", "text/html"}, ++ {"xhtml", "application/xhtml+xml"}, + {"gif", "image/gif"}, + {"jpeg", "image/jpeg"}, + {"jpg", "image/jpeg"}, diff --git a/debian/patches/090_simple-preserve-space.patch b/debian/patches/090_simple-preserve-space.patch new file mode 100644 index 0000000..d590c02 --- /dev/null +++ b/debian/patches/090_simple-preserve-space.patch @@ -0,0 +1,48 @@ +Description: New option "simple_preserve_space" +Origin: http://www.sic.med.tohoku.ac.jp/~satodai/w3m-dev/200705.month/4238.html +Author: dai <d+w3m@vdr.jp> +Bug-Debian: http://bugs.debian.org/384982 + +diff -urNp w3m-0.5.1+cvs1.948/file.c w3m-preserve-space/file.c +--- w3m-0.5.1+cvs1.948/file.c 2006-02-14 16:33:23.000000000 +0900 ++++ w3m-preserve-space/file.c 2006-07-29 22:28:47.000000000 +0900 +@@ -6131,7 +6131,7 @@ HTMLlineproc0(char *line, struct html_fe + is_hangul = wtf_is_hangul((wc_uchar *) str); + else + is_hangul = 0; +- if (mode == PC_KANJI1 && ++ if (!SimplePreserveSpace && mode == PC_KANJI1 && + !is_hangul && !prev_is_hangul && + obuf->pos > h_env->envs[h_env->envc].indent && + Strlastchar(obuf->line) == ' ') { +diff -urNp w3m-0.5.1+cvs1.948/fm.h w3m-preserve-space/fm.h +--- w3m-0.5.1+cvs1.948/fm.h 2006-02-14 16:34:24.000000000 +0900 ++++ w3m-preserve-space/fm.h 2006-07-29 22:24:02.000000000 +0900 +@@ -1015,6 +1015,7 @@ global char ExtHalfdump init(FALSE); + global char FollowLocale init(TRUE); + global char UseContentCharset init(TRUE); + global char SearchConv init(TRUE); ++global char SimplePreserveSpace init(FALSE); + #define Str_conv_from_system(x) wc_Str_conv((x), SystemCharset, InnerCharset) + #define Str_conv_to_system(x) wc_Str_conv_strict((x), InnerCharset, SystemCharset) + #define Str_conv_to_halfdump(x) (ExtHalfdump ? wc_Str_conv((x), InnerCharset, DisplayCharset) : (x)) +diff -urNp w3m-0.5.1+cvs1.948/rc.c w3m-preserve-space/rc.c +--- w3m-0.5.1+cvs1.948/rc.c 2006-02-14 16:34:24.000000000 +0900 ++++ w3m-preserve-space/rc.c 2006-07-29 22:27:50.000000000 +0900 +@@ -228,6 +228,7 @@ static int OptionEncode = FALSE; + #define CMT_USE_JISX0213 N_("Use JIS X 0213:2000 (2000JIS)") + #define CMT_STRICT_ISO2022 N_("Strict ISO-2022-JP/KR/CN") + #define CMT_GB18030_AS_UCS N_("Treat 4 bytes char. of GB18030 as Unicode") ++#define CMT_SIMPLE_PRESERVE_SPACE N_("Simple Preserve space") + #endif + + #define CMT_KEYMAP_FILE N_("keymap file") +@@ -662,6 +663,8 @@ struct param_ptr params10[] = { + {"gb18030_as_ucs", P_CHARINT, PI_ONOFF, (void *)&WcOption.gb18030_as_ucs, + CMT_GB18030_AS_UCS, NULL}, + #endif ++ {"simple_preserve_space", P_CHARINT, PI_ONOFF, (void *)&SimplePreserveSpace, ++ CMT_SIMPLE_PRESERVE_SPACE, NULL}, + {NULL, 0, 0, NULL, NULL, NULL}, + }; + #endif diff --git a/debian/patches/70_ssl-init.patch b/debian/patches/70_ssl-init.patch deleted file mode 100644 index 6d19279..0000000 --- a/debian/patches/70_ssl-init.patch +++ /dev/null @@ -1,25 +0,0 @@ -Description: Force ssl_verify_server on and disable SSLv2 support -Origin: http://www.openwall.com/lists/oss-security/2010/06/14/4 -Author: Ludwig Nussel <ludwig.nussel@suse.de> -Bug-Debian: http://bugs.debian.org/587445 - ---- w3m-0.5.2.orig/fm.h -+++ w3m-0.5.2/fm.h -@@ -1120,7 +1120,7 @@ global int view_unseenobject init(TRUE); - #endif - - #if defined(USE_SSL) && defined(USE_SSL_VERIFY) --global int ssl_verify_server init(FALSE); -+global int ssl_verify_server init(TRUE); - global char *ssl_cert_file init(NULL); - global char *ssl_key_file init(NULL); - global char *ssl_ca_path init(NULL); -@@ -1129,7 +1129,7 @@ global int ssl_path_modified init(FALSE) - #endif /* defined(USE_SSL) && - * defined(USE_SSL_VERIFY) */ - #ifdef USE_SSL --global char *ssl_forbid_method init(NULL); -+global char *ssl_forbid_method init("2"); - #endif - - global int is_redisplay init(FALSE); diff --git a/debian/patches/series b/debian/patches/series index abb32d3..e6327bd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,9 @@ -10_w3m.1-debian-fix.patch -20_ja-w3m.1-debian-fix.patch -30_config-debian-fix.patch -40_gnukfreebsd-ftbfs-fix.patch -50_w3mman-keep-formatting.patch -60_check-null-cn.patch -70_ssl-init.patch +010_w3m.1-debian-fix.patch +020_ja-w3m.1-debian-fix.patch +030_config-debian-fix.patch +040_gnukfreebsd-ftbfs-fix.patch +050_w3mman-keep-formatting.patch +060_check-null-cn.patch +070_form-update.patch +080_xhtml-support.patch +090_simple-preserve-space.patch diff --git a/debian/w3mconfig b/debian/w3mconfig index 3ed4829..45ff1ff 100644 --- a/debian/w3mconfig +++ b/debian/w3mconfig @@ -8,7 +8,7 @@ ssl_ca_path /etc/ssl/certs ssl_key_file ssl_cert_file ssl_verify_server 1 -ssl_forbid_method +ssl_forbid_method 2 no_cache 0 noproxy_netaddr 0 no_proxy |