ports/162082: [patch] databases/mongodb: fix strip binaries

Abdrey Zonov andrey at zonov.org
Fri Oct 28 07:00:27 UTC 2011


>Number:         162082
>Category:       ports
>Synopsis:       [patch] databases/mongodb: fix strip binaries
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 28 07:00:23 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Abdrey Zonov
>Release:        STABLE-7, STABLE-8
>Organization:
>Environment:
>Description:
I suggest to remove post-patch section from Makefile of subject port, because it doesn't work any more and use attached patch to strip binaries.
>How-To-Repeat:
cd /usr/ports/databases/mongodb && make package && ls -l /usr/ports/packages/mongodb*
>Fix:
Use attached patch.

Patch attached with submission follows:

--- files/SConstruct.orig	2011-04-06 04:40:13.000000000 +0000
+++ files/SConstruct	2011-10-04 19:16:33.000000000 +0000
@@ -679,7 +679,10 @@
 
     #make scons colorgcc friendly
     env['ENV']['HOME'] = os.environ['HOME']
-    env['ENV']['TERM'] = os.environ['TERM']
+    try:
+        env['ENV']['TERM'] = os.environ['TERM']
+    except KeyError:
+        env['ENV']['TERM'] = 'dumb'
 
     if linux and has_option( "sharedclient" ):
         env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
@@ -1473,7 +1476,7 @@
     fullInstallName = installDir + "/bin/" + name
 
     allBinaries += [ name ]
-    if (solaris or linux) and (not has_option("nostrip")):
+    if (solaris or linux or freebsd) and (not has_option("nostrip")):
         e.AddPostAction( inst, e.Action( 'strip ' + fullInstallName ) )
 
     if linux and len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "s3dist":
--- Makefile.orig	2011-10-28 10:48:49.843500000 +0400
+++ Makefile	2011-10-28 10:49:05.609125000 +0400
@@ -43,11 +43,6 @@
 PLIST_SUB+=	DEVEL="@comment "
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|elif "freebsd7" == os.sys.platform|elif os.sys.platform.startswith("freebsd")|' \
-			  -e '/not GetOption("nostrip")/ s,linux,linux or freebsd,g' \
-		${WRKSRC}/SConstruct
-
 post-install:
 	@if [ ! -f ${PREFIX}/etc/mongodb.conf ]; then \
 		${TOUCH} ${PREFIX}/etc/mongodb.conf ; \


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list