Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 2002 21:34:45 +0900 (JST)
From:      KOMATSU Shinichiro <koma2@jiro.c.u-tokyo.ac.jp>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/41121: print/acroread5: 2 sed_inplace problems
Message-ID:  <20020729123446.3F84C1934@taro.c.u-tokyo.ac.jp>

next in thread | raw e-mail | index | archive | help

>Number:         41121
>Category:       ports
>Synopsis:       print/acroread5: 2 sed_inplace problems
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 29 05:40:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     KOMATSU Shinichiro
>Release:        FreeBSD 4.6-RELEASE-p3 i386
>Organization:
>Environment:
FreeBSD 4.6-RELEASE-p3 i386

>Description:

o sed_inplace's -i option must take an argument. 
  According to -current's man page of sed(1),

    -i extension
        Edit files in-place, saving backups with the specified extension.
	If a zero-length extension is given, no backup will be saved.

  If no argument is supplied to -i, eg. 

      sed_inplace -i -E 's:Linux):FreeBSD|Linux):g' ${WRKDIR}/INSTALL

  backup file ${WRKDIR}/INSTALL-E is created.
  So, $REINPLACE_ARGS must be -i '' instead of just -i.

o Because sed_inplace -i has a problem with read-only files,
  write permission bit must be set to target file. 

>How-To-Repeat:

Run make as a normal (non-root) user:

    % make
    ......(snip)......
    ===>  Configuring for acroread-5.06
    /usr/local/bin/sed_inplace -i -E 's:Linux):FreeBSD|Linux):g' /usr/local/ports/print/acroread5/work/INSTALL
    sed_inplace: stdout: Bad file descriptor
    *** Error code 1

    Stop in /usr/local/ports/print/acroread5.

This is the second problem.

If make intall is run as root, the second problem does not occur,
but an extra file /usr/local/Acrobat5/bin/acroread-E is created.
This is the first problem.

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/print/acroread5/Makefile,v
retrieving revision 1.41
diff -u -u -r1.41 Makefile
--- Makefile	27 Jul 2002 13:20:22 -0000	1.41
+++ Makefile	28 Jul 2002 19:46:56 -0000
@@ -21,7 +21,7 @@
 
 USE_LINUX=	yes
 USE_REINPLACE=	yes
-REINPLACE_ARGS=	-i
+REINPLACE_ARGS=	-i ''
 NO_FILTER_SHLIBS=	yes
 
 .if ${ARCH} == "i386"
@@ -30,6 +30,7 @@
 WRKSRC=		${WRKDIR}
 
 pre-configure:
+	${CHMOD} u+w ${WRKDIR}/INSTALL
 	${REINPLACE_CMD} -E 's:Linux):FreeBSD|Linux):g' ${WRKDIR}/INSTALL
 
 do-build:
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020729123446.3F84C1934>