NetBSD Problem Report #49857

From www@NetBSD.org  Sat Apr 25 17:12:22 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2856FA57FD
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 25 Apr 2015 17:12:22 +0000 (UTC)
Message-Id: <20150425171221.07852A6554@mollari.NetBSD.org>
Date: Sat, 25 Apr 2015 17:12:21 +0000 (UTC)
From: jonthn+pkgsrc@pinacea.com
Reply-To: jonthn+pkgsrc@pinacea.com
To: gnats-bugs@NetBSD.org
Subject: Patch to fix build of archivers/arj on Darwin
X-Send-Pr-Version: www-1.0

>Number:         49857
>Category:       pkg
>Synopsis:       Patch to fix build of archivers/arj on Darwin
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tnn
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 25 17:15:00 +0000 2015
>Closed-Date:    Wed May 27 15:22:51 +0000 2015
>Last-Modified:  Wed May 27 15:25:00 +0000 2015
>Originator:     Jonathan Buschmann
>Release:        
>Organization:
>Environment:
>Description:
Package archivers/arj doesn't build on Darwin 10.10

I made a patch below that fixes the issue during the build, but I'm not sure it makes the tool usable, I was able to make an archive but wasn't able to extract files afterwards I keep hitting messages :

---
Error (2): No such file or directory
Can't open
OK to extract to a new filename?
---

with no filenames displayed but if I enter a name it gets created.
>How-To-Repeat:

>Fix:
diff --git a/archivers/arj/Makefile b/archivers/arj/Makefile
index ead213c..8ee9adf 100644
--- a/archivers/arj/Makefile
+++ b/archivers/arj/Makefile
@@ -8,6 +8,7 @@ MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:=arj/}
 MAINTAINER=    pkgsrc-users@NetBSD.org
 HOMEPAGE=      http://arj.sourceforge.net/
 COMMENT=       Open-source ARJ archiver
+LICENSE=       gnu-gpl-v2

 MAKE_JOBS_SAFE=                no

diff --git a/archivers/arj/distinfo b/archivers/arj/distinfo
index f61362b..0535504 100644
--- a/archivers/arj/distinfo
+++ b/archivers/arj/distinfo
@@ -15,5 +15,6 @@ SHA1 (patch-gnu_config.h.in) = 2cf609a6c7cb4e32441a433db3dc9cc04c23ae2a
 SHA1 (patch-gnu_configure.in) = 062f3dc1eee6f009dfdfa432bb3c138a9c28a829
 SHA1 (patch-gnu_makefile.in) = db8a0afa61f49242e9fd601d5fc3167cf75f748b
 SHA1 (patch-integr.c) = fade32219b21ac3382028bf23ee4171d8d095b5f
+SHA1 (patch-msgbind.c) = e3faf958f2272bf946b036fbf62ecfa665f86abc
 SHA1 (patch-register.c) = 8d81e663b499a45f7faa52b16a6cee47394cd09c
 SHA1 (patch-uxspec.c) = 24a22fa2822704e620b38df12b76ef88fe908863
diff --git a/archivers/arj/patches/patch-msgbind.c b/archivers/arj/patches/patch-msgbind.c
new file mode 100644
index 0000000..22a66c0
--- /dev/null
+++ b/archivers/arj/patches/patch-msgbind.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix overlap string copy
+
+--- msgbind.c.orig     2015-04-25 16:26:29.000000000 +0000
++++ msgbind.c
+@@ -578,7 +578,7 @@ int main(int argc, char **argv)
+    }
+    strcat(pool[tpool].data, msgname);
+    strcat(pool[tpool].data, ", ");
+-   strcpy(msg_buffer, msg_buffer+1);
++   memmove(msg_buffer, msg_buffer+1, strlen(msg_buffer));
+    buf_len=strlen(msg_buffer);
+    msg_buffer[--buf_len]='\0';
+    patch_string(msg_buffer);

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->tnn
Responsible-Changed-By: tnn@NetBSD.org
Responsible-Changed-When: Sat, 25 Apr 2015 17:23:22 +0000
Responsible-Changed-Why:
take


From: "Benny Siegert" <bsiegert@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49857 CVS commit: pkgsrc/archivers/arj
Date: Sun, 10 May 2015 18:50:47 +0000

 Module Name:	pkgsrc
 Committed By:	bsiegert
 Date:		Sun May 10 18:50:47 UTC 2015

 Modified Files:
 	pkgsrc/archivers/arj: Makefile distinfo
 Added Files:
 	pkgsrc/archivers/arj/patches: patch-msgbind.c

 Log Message:
 Add a patch to fix build on Darwin. From Jonathan Buschmann in PR pkg/49857.


 To generate a diff of this commit:
 cvs rdiff -u -r1.30 -r1.31 pkgsrc/archivers/arj/Makefile
 cvs rdiff -u -r1.21 -r1.22 pkgsrc/archivers/arj/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/archivers/arj/patches/patch-msgbind.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Tobias Nygren <tnn@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: Benny Siegert jonthn+pkgsrc@pinacea.com <bsiegert@netbsd.org>
Subject: Re: PR/49857 CVS commit: pkgsrc/archivers/arj
Date: Sun, 10 May 2015 23:29:37 +0200

 On Sun, 10 May 2015 18:55:00 +0000 (UTC)
 Benny Siegert <bsiegert@netbsd.org> wrote:

 > The following reply was made to PR pkg/49857; it has been noted by GNATS.
 > 
 > From: "Benny Siegert" <bsiegert@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc: 
 > Subject: PR/49857 CVS commit: pkgsrc/archivers/arj
 > Date: Sun, 10 May 2015 18:50:47 +0000
 > 
 >  Module Name:	pkgsrc
 >  Committed By:	bsiegert
 >  Date:		Sun May 10 18:50:47 UTC 2015
 >  
 >  Modified Files:
 >  	pkgsrc/archivers/arj: Makefile distinfo
 >  Added Files:
 >  	pkgsrc/archivers/arj/patches: patch-msgbind.c
 >  
 >  Log Message:
 >  Add a patch to fix build on Darwin. From Jonathan Buschmann in PR pkg/49857.

 But does it actually produce a working binary?
 AFAICT the package has some 64-bit issue and only works
 correctly on 32-bit platforms.

From: Benny Siegert <bsiegert@NetBSD.org>
To: Tobias Nygren <tnn@netbsd.org>, jonthn+pkgsrc@pinacea.com
Cc: gnats-bugs@netbsd.org
Subject: Re: PR/49857 CVS commit: pkgsrc/archivers/arj
Date: Mon, 11 May 2015 11:53:58 +0200

 On Sun, May 10, 2015 at 11:29 PM, Tobias Nygren <tnn@netbsd.org> wrote:
 > But does it actually produce a working binary?
 > AFAICT the package has some 64-bit issue and only works
 > correctly on 32-bit platforms.

 It produces a binary in the first place, which is an improvement. How
 about marking the package as

 NOT_FOR_PLATFORMS=${LP64_PLATFORMS}

 Is this issue (plus the memmove patch) something that can be sent
 upstream? Is there even an upstream?

 --Benny.

From: Jonathan Buschmann <jonthn@pinacea.com>
To: Benny Siegert <bsiegert@NetBSD.org>
Cc: Tobias Nygren <tnn@netbsd.org>,
 gnats-bugs@netbsd.org
Subject: Re: PR/49857 CVS commit: pkgsrc/archivers/arj
Date: Mon, 11 May 2015 21:38:16 +0200

 > Le 11 mai 2015 =C3=A0 11:53, Benny Siegert <bsiegert@NetBSD.org> a =
 =C3=A9crit :
 >=20
 > On Sun, May 10, 2015 at 11:29 PM, Tobias Nygren <tnn@netbsd.org> =
 wrote:
 >> But does it actually produce a working binary?
 >> AFAICT the package has some 64-bit issue and only works
 >> correctly on 32-bit platforms.
 >=20
 > It produces a binary in the first place, which is an improvement. How
 > about marking the package as
 >=20
 > NOT_FOR_PLATFORMS=3D${LP64_PLATFORMS}
 >=20
 > Is this issue (plus the memmove patch) something that can be sent
 > upstream? Is there even an upstream?
 >=20
 > --Benny.

 Hello,

 As said in the report, I believe there is a 'bug' in the code regarding =
 the filename when extracting.
 Also I'm not sure 'upstream' is very active if at all.
 My main objective here is to reduce non building packages on OS X but =
 I'll let you decide what is the best.

 - jonathan=

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 27 May 2015 15:22:51 +0000
State-Changed-Why:
This problem is fixed - there are probably others, e.g. there are other
build bugs on other platforms. Please open more PRs..


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: tnn@NetBSD.org
Subject: Re: PR/49857 CVS commit: pkgsrc/archivers/arj
Date: Wed, 27 May 2015 15:21:29 +0000

 On Sun, May 10, 2015 at 09:30:01PM +0000, Tobias Nygren wrote:
  >> Log Message:
  >> Add a patch to fix build on Darwin. From Jonathan Buschmann in PR pkg/49857.
  >  
  > But does it actually produce a working binary?
  > AFAICT the package has some 64-bit issue and only works
  > correctly on 32-bit platforms.

 Is there a(nother) PR for that? If not, please file one...

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.