Subject: pkg/12057: package makefiles should never explicitly strip binaries!
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@proven.weird.com>
List: netbsd-bugs
Date: 01/27/2001 13:45:21
>Number:         12057
>Category:       pkg
>Synopsis:       package makefiles should never explicitly strip binaries!
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 27 13:48:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        pkgsrc-2001/01/27
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:

>Description:

	I see that net/fping/Makefile still explicitly tries to strip
	the installed binary in the post-install target.

	pkgsrc module makefiles should *NEVER* explicitly strip
	anything!  I suspect occurances of this are leftovers from
	FreeBSD package conversions....

	pkgsrc may support stripping of binaries if, and only if,
	${STRIPFLAG} is set to a non-nil value (eg. '-s') via
	bsd.prefs.mk.

>How-To-Repeat:

	try debugging a fping core dump and find it's not possible with
	the installed binary....

>Fix:

	all pkgsrc modules makefiles should be checked for errant uses
	of strip or ${STRIP} without testing ${STRIPFLAG}, like this
	particularly nasty one that hides the fact it was done!

Index: Makefile
===================================================================
RCS file: /most/spare/cvs.NetBSD.ORG/pkgsrc/net/fping/Makefile,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 Makefile
*** Makefile	2000/05/19 10:20:35	1.1.1.1
--- Makefile	2001/01/27 18:54:08
***************
*** 16,22 ****
  EXTRACT_CMD=	zcat ${DOWNLOADED_DISTFILE} | ${SED} -e '1,/Archive-Name/d' | ${SH}
  NO_WRKSUBDIR=	yes
  
- post-install:
- 	@strip ${PREFIX}/sbin/fping
- 
  .include "../../mk/bsd.pkg.mk"
--- 16,19 ----
>Release-Note:
>Audit-Trail:
>Unformatted: