From owner-freebsd-ports Mon Sep 13 9:30: 6 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id EC95E15076 for ; Mon, 13 Sep 1999 09:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA31071; Mon, 13 Sep 1999 09:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 9248414CAC; Mon, 13 Sep 1999 09:27:19 -0700 (PDT) Message-Id: <19990913162719.9248414CAC@hub.freebsd.org> Date: Mon, 13 Sep 1999 09:27:19 -0700 (PDT) From: papowell@astart.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: ports/13729: strip(1) exits with an error on script file - causes severe portability problems Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 13729 >Category: ports >Synopsis: strip(1) exits with an error on script file - causes severe portability problems >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 13 09:30:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Patrick Powell >Release: 3.2-Release, 4-Current >Organization: Astart Technologies >Environment: >Description: strip(1) fails with an error when asked to strip shell scripts. This behavior is documented as follows: DESCRIPTION GNU strip discards all symbols from the object files objfile. The list of object files may include archives. At least one object file must be given. strip modifies the files named in its argument, rather than writing modified copies under different names. In many install scripts for code you have: $(INSTALL) -s .... ^^^ -s specified for ALL installable executable objects including perl scripts, shell, scripts, etc. This requires a huge amount of effort when porting to FreeBSD because you now have to determine which executables can or cannot be stripped. I strongly recommend you do a test in the strip code for ALLOWABLE magic numbers, strip those, and ignore the rest.I >How-To-Repeat: strip a shell script - you get an error. More seri >Fix: 1. modify man page to indicate that strip only works on object files or executable files, and ignores others 2. modify action so that it checks to see if it has an allowable item to strip and then does it. In the strip code, find the place where it checks for 'magic numbers' of allowable executables, and rather than exiting with a non-zero error code, simply exit with a 0 error code or continue to the next file to strip. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message