Bug 65359

Summary: synce-install-cab looks for the wrong interpreter
Product: Ports & Packages Reporter: Antoine Jacoutot <ajacoutot>
Component: Individual Port(s)Assignee: Volker Stolz <vs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Antoine Jacoutot 2004-04-09 13:50:14 UTC

The synce-install-cab (from synce-librapi2-0.8.9) is looking for /bin/bash as its interpreter.
Obviously, it is not part of FreeBSD by default, and even with the BASH port installed, the bash command can be found in /usr/local/bin.
The interpreter should then be: /bin/sh.

How-To-Repeat: 

Install synce-librapi2-0.8.9 from ports ans see:

# /usr/local/bin/synce-install-cab
/usr/local/bin/synce-install-cab: Command not found.
Comment 1 Antoine Jacoutot 2004-04-09 16:59:41 UTC
It looks like synce-remove-program also has the same problem.
The fix is the same, just replace /bin/bash by /bin/sh.

Antoine
Comment 2 stolz 2004-04-11 01:19:39 UTC
Dear maintainer of palm/synce-librapi2, could you please review the 
proposed patch?

Regards,
   Volker
Comment 3 Volker Stolz freebsd_committer freebsd_triage 2004-04-11 01:26:18 UTC
State Changed
From-To: open->feedback

Forwarded PR to maintainer.
Comment 4 Sam Lawrance 2004-04-11 13:15:32 UTC
Thanks - shame on me for missing that. Fix looks good. Here's a shar to
create the patches for both. Extract in port directory.

Regards,
Sam.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files/patch-aa
#	files/patch-ab
#
echo x - files/patch-aa
sed 's/^X//' >files/patch-aa << 'END-of-files/patch-aa'
X--- script/synce-install-cab.in.orig	Sun Apr 11 21:59:15 2004
X+++ script/synce-install-cab.in	Sun Apr 11 22:02:34 2004
X@@ -1,4 +1,4 @@
X-#!/bin/bash
X+#!/bin/sh
X #
X # $Id: synce-install-cab.in,v 1.1 2002/11/27 09:15:23 twogood Exp $
X #
END-of-files/patch-aa
echo x - files/patch-ab
sed 's/^X//' >files/patch-ab << 'END-of-files/patch-ab'
X--- script/synce-remove-program.in.orig	Sun Apr 11 21:57:21 2004
X+++ script/synce-remove-program.in	Sun Apr 11 21:57:46 2004
X@@ -1,4 +1,4 @@
X-#!/bin/bash
X+#!/bin/sh
X #
X # $Id: synce-remove-program.in,v 1.1 2002/12/04 18:56:36 twogood Exp $
X #
END-of-files/patch-ab
exit
Comment 5 Antoine Jacoutot 2004-04-11 13:26:46 UTC
Selon Sam Lawrance <boris@brooknet.com.au>:
> Thanks - shame on me for missing that. Fix looks good. Here's a shar to
> create the patches for both. Extract in port directory.

Great, thanks.
Can you commit this yourself to the ports tree ?
Comment 6 Volker Stolz freebsd_committer freebsd_triage 2004-04-11 17:34:26 UTC
How about this one (also, don't forget to bump PORTREV):
Give me a thumbs-up if you want me to either commit your or my version
(obviously I prefer this one, since it doesn't include any new files).

Volker

Index: Makefile
===================================================================
RCS file: /usr/freebsdcvs/cvs-ports/ports/palm/synce-librapi2/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	14 Mar 2004 06:17:12 -0000	1.5
+++ Makefile	11 Apr 2004 16:31:05 -0000
@@ -6,6 +6,7 @@
 
 PORTNAME=	synce-librapi2
 PORTVERSION=	0.8.9
+PORTREVISION=	1
 CATEGORIES=	palm
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	synce
@@ -19,6 +20,7 @@
 
 MAN1=		pcp.1 pls.1 pmkdir.1 pmv.1 prm.1 prmdir.1 prun.1 pstatus.1 rapiconfig.1 synce-install-cab.1 synce-remove-program.1 synce-list-programs.1
 
+USE_REINPLACE=	yes
 GNU_CONFIGURE=	yes
 USE_LIBTOOL_VER=13
 USE_ICONV=	yes
@@ -27,4 +29,10 @@
 CONFIGURE_ARGS+=	--with-libsynce=${LOCALBASE}
 
 INSTALLS_SHLIB=	yes
+
+post-patch:
+.for f in synce-install-cab.in synce-remove-program.in
+	@${REINPLACE_CMD} -e 's+bin/bash+bin/sh+' ${WRKSRC}/script/${f}
+.endfor
+
 .include <bsd.port.mk>
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
rage against the finite state machine
Comment 7 Volker Stolz freebsd_committer freebsd_triage 2004-04-11 17:34:50 UTC
State Changed
From-To: feedback->analyzed

I'll handle this one. 


Comment 8 Volker Stolz freebsd_committer freebsd_triage 2004-04-11 17:34:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vs

I'll handle this one.
Comment 9 Sam Lawrance 2004-04-12 04:22:11 UTC
That's great! Go ahead with your version, Volker.

-Sam
Comment 10 Volker Stolz freebsd_committer freebsd_triage 2004-04-12 13:07:46 UTC
State Changed
From-To: analyzed->closed

Fixed, thanks!