Bug 104144 - baz does't work with neon-0.25.5
Summary: baz does't work with neon-0.25.5
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Yoichi NAKAYAMA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-08 06:00 UTC by Yoichi NAKAYAMA
Modified: 2006-10-19 15:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoichi NAKAYAMA freebsd_committer freebsd_triage 2006-10-08 06:00:33 UTC
bazaar-1.4.2_1 port built with neon-0.25.5 dumps core.

Fix: 

I found Gentoo applies patch obtained from
http://www.cs.aau.dk/~arj/neon-0.24-fix.patch
and I checked above command does work when I build port with this patch.
How-To-Repeat: % baz grab "http://lorentey.hu/grab/multi-tty"
zsh: segmentation fault (core dumped)  baz grab "http://lorentey.hu/grab/multi-tty"
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-10-08 06:02:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->yoichi

Submitter has GNATS access
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2006-10-08 06:02:20 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 3 Ulf Lilleengen 2006-10-16 22:45:15 UTC
On søn, okt 08, 2006 at 05:02:12am +0000, Edwin Groothuis wrote:
> Maintainer of devel/bazaar,
> 
> Please note that PR ports/104144 has just been submitted.
> 
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
> 
> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/104144

Sorry for the late answer. I modified the patch a bit, so it applies correctly
to bazaar working directory. The patch can be found here:
http://folk.ntnu.no/lulf/patches/freebsd/bazaar_neonpatch.diff

-- 
Ulf Lilleengen
Comment 4 yoichi 2006-10-17 04:42:03 UTC
At Mon, 16 Oct 2006 21:50:21 GMT,
Ulf Lilleengen wrote:
>  Sorry for the late answer. I modified the patch a bit, so it applies correctly
>  to bazaar working directory. The patch can be found here:
>  http://folk.ntnu.no/lulf/patches/freebsd/bazaar_neonpatch.diff

Thanks. I'm going to apply following change after obtaining portmgr approval
(since ports tree is frozen for 6.2-release):

ChangeLog:
Apply patch obtained from http://www.cs.aau.dk/~arj/neon-0.24-fix.patch
to make it work.

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/bazaar/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	13 Sep 2006 21:24:18 -0000	1.5
+++ Makefile	17 Oct 2006 03:37:39 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	bazaar
 PORTVERSION=	1.4.2
-PORTREVISION?=	2
+PORTREVISION?=	3
 CATEGORIES=	devel
 MASTER_SITES=	http://bazaar.canonical.com/releases/src/
 DISTNAME=	bazaar_${PORTVERSION}
Index: files/patch-pfs.c
===================================================================
RCS file: files/patch-pfs.c
diff -N files/patch-pfs.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-pfs.c	17 Oct 2006 03:37:39 -0000
@@ -0,0 +1,79 @@
+diff -uN -r src/baz/libarch/pfs.c src/baz/libarch/pfs.c
+--- src/baz/libarch/pfs.c	2005-06-20 23:59:37.000000000 +0200
++++ src/baz/libarch/pfs.c	2006-01-14 17:12:24.000000000 +0100
+@@ -520,6 +520,66 @@
+     parsed_uri->host = str_replace (parsed_uri->host, str_save (0, at_pos + 1));
+ }
+ 
++/* RFC2396 spake:
++ * "Data must be escaped if it does not have a representation 
++ * using an unreserved character".
++ */
++
++/* Lookup table: character classes from 2396. (This is overkill) */
++
++#define SP 0   /* space    = <US-ASCII coded character 20 hexadecimal>                 */
++#define CO 0   /* control  = <US-ASCII coded characters 00-1F and 7F hexadecimal>      */
++#define DE 0   /* delims   = "<" | ">" | "#" | "%" | <">                               */
++#define UW 0   /* unwise   = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"             */
++#define MA 1   /* mark     = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"       */
++#define AN 2   /* alphanum = alpha | digit                                             */
++#define RE 2   /* reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," */
++
++static const char uri_chars[128] = {
++/*                +2      +4      +6      +8     +10     +12     +14     */
++/*   0 */ CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO,
++/*  16 */ CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO, CO,
++/*  32 */ SP, MA, DE, DE, RE, DE, RE, MA, MA, MA, MA, RE, RE, MA, MA, RE,
++/*  48 */ AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, RE, RE, DE, RE, DE, RE,
++/*  64 */ RE, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
++/*  80 */ AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, UW, UW, UW, UW, MA,
++/*  96 */ UW, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN,
++/* 112 */ AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, AN, UW, UW, UW, MA, CO 
++};
++
++#define ESCAPE(ch) (((const signed char)(ch) < 0 || \
++		uri_chars[(unsigned int)(ch)] == 0))
++
++char *oldneon_ne_path_escape(const char *abs_path) 
++{
++    const char *pnt;
++    char *ret, *retpos;
++    int count = 0;
++    for (pnt = abs_path; *pnt != '\0'; pnt++) {
++	if (ESCAPE(*pnt)) {
++	    count++;
++	}
++    }
++    if (count == 0) {
++	return ne_strdup(abs_path);
++    }
++    /* An escaped character is "%xx", i.e., two MORE
++     * characters than the original string */
++    retpos = ret = ne_malloc(strlen(abs_path) + 2*count + 1);
++    for (pnt = abs_path; *pnt != '\0'; pnt++) {
++	if (ESCAPE(*pnt)) {
++	    /* Escape it - %<hex><hex> */
++	    sprintf(retpos, "%%%02x", (unsigned char) *pnt);
++	    retpos += 3;
++	} else {
++	    /* It's cool */
++	    *retpos++ = *pnt;
++	}
++    }
++    *retpos = '\0';
++    return ret;
++}
++
+ /**
+  * \brief escape a location
+  *
+@@ -528,7 +588,7 @@
+ t_uchar *
+ escape_location (t_uchar const *location)
+ {
+-    return ne_path_escape(location);
++    return oldneon_ne_path_escape(location);
+ }
+ 
+ /**
Comment 5 dfilter service freebsd_committer freebsd_triage 2006-10-19 14:31:25 UTC
yoichi      2006-10-19 13:30:51 UTC

  FreeBSD ports repository

  Modified files:
    devel/bazaar         Makefile 
  Added files:
    devel/bazaar/files   patch-pfs.c 
  Log:
  Apply patch obtained from http://www.cs.aau.dk/~arj/neon-0.24-fix.patch
  to avoid segfault.
  
  PR:             ports/104144
  Approved by:    portmgr (erwin), maintainer
  
  Revision  Changes    Path
  1.6       +1 -1      ports/devel/bazaar/Makefile
  1.1       +79 -0     ports/devel/bazaar/files/patch-pfs.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Yoichi NAKAYAMA freebsd_committer freebsd_triage 2006-10-19 15:54:46 UTC
State Changed
From-To: feedback->closed

committed, thanks!