From nobody@FreeBSD.org  Tue Feb  4 22:50:29 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 66DBABC
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Feb 2014 22:50:29 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 5314D1707
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Feb 2014 22:50:29 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s14MoT1d080281
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Feb 2014 22:50:29 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s14MoTPI080268;
	Tue, 4 Feb 2014 22:50:29 GMT
	(envelope-from nobody)
Message-Id: <201402042250.s14MoTPI080268@oldred.freebsd.org>
Date: Tue, 4 Feb 2014 22:50:29 GMT
From: nemysis <nemysis@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] book.xml Stripping Binaries and Shared Libraries
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         186466
>Category:       docs
>Synopsis:       [PATCH] book.xml Stripping Binaries and Shared Libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jgh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 04 23:00:00 UTC 2014
>Closed-Date:    Sat Feb 08 01:05:49 UTC 2014
>Last-Modified:  Sat Feb  8 01:10:00 UTC 2014
>Originator:     nemysis
>Release:        FreeBSD 9.2-RELEASE amd64
>Organization:
>Environment:
FreeBSD 9.2-RELEASE-p8 #0: Mon Sep 23 16:26:45 UTC 2013
>Description:
Here I have changed so that the user can see how to patch for striping executables and libraries on more than one file.

Porter's Handbook

5.15.2. Stripping Binaries and Shared Libraries
>How-To-Repeat:

>Fix:
Please commit enclosed porters-handbook_book.xml.diff

I have sent one email to freebsd-doc@ but here is newer diff. Please use only this.

Patch attached with submission follows:

Index: en_US.ISO8859-1/books/porters-handbook/book.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/book.xml	(revision 43779)
+++ en_US.ISO8859-1/books/porters-handbook/book.xml	(working copy)
@@ -5096,8 +5096,16 @@
 	  example:</para>
 
 	<programlisting>post-install:
-	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl</programlisting>
+	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}</programlisting>
 
+	<para>If you need to strip more files, here shared libraries.
+	 For example:</para>
+
+	<programlisting>post-install:
+	 .for l in geometry media body track world
+	 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-${l}.so.0
+	 .endfor</programlisting>
+
 	<para>Use the &man.file.1; command on the installed executable
 	  to check whether the binary is stripped or not.  If it does
 	  not say <literal>not stripped</literal>, it is stripped.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->jgh 
Responsible-Changed-By: jgh 
Responsible-Changed-When: Wed Feb 5 00:58:16 UTC 2014 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186466 

From: Warren Block <wblock@wonkity.com>
To: nemysis <nemysis@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org, freebsd-doc@FreeBSD.org
Subject: Re: docs/186466: [PATCH] book.xml Stripping Binaries and Shared
 Libraries
Date: Tue, 4 Feb 2014 20:15:54 -0700 (MST)

 On Tue, 4 Feb 2014, nemysis wrote:
 
 > Index: en_US.ISO8859-1/books/porters-handbook/book.xml
 > ===================================================================
 > --- en_US.ISO8859-1/books/porters-handbook/book.xml	(revision 43779)
 > +++ en_US.ISO8859-1/books/porters-handbook/book.xml	(working copy)
 > @@ -5096,8 +5096,16 @@
 > 	  example:</para>
 >
 > 	<programlisting>post-install:
 > -	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl</programlisting>
 > +	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}</programlisting>
 >
 > +	<para>If you need to strip more files, here shared libraries.
 > +	 For example:</para>
 
 Please try to avoid the informal "you".
 (http://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/book.html#writing-style-be-clear)
 
 Suggestion:
 
    <para>When more than one file needs to be stripped, like several
      shared libraries, loop through them:</para>
 
 > +
 > +	<programlisting>post-install:
 > +	 .for l in geometry media body track world
 > +	 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-${l}.so.0
 > +	 .endfor</programlisting>
 > +
 > 	<para>Use the &man.file.1; command on the installed executable
 > 	  to check whether the binary is stripped or not.  If it does
 
 It's a bit redundant.  Suggestion:
 
    <para>Use &man.file.1; on the installed executable
      to check whether it has been stripped.
 
 > 	  not say <literal>not stripped</literal>, it is stripped.
 
 That last sentence has a double negative that makes it confusing. 
 Assuming it is there to tell the port programmer what string to expect:
 
    Binaries that have not been stripped will be reported by &man.file.1;
    as <literal>not stripped</literal>.

From: Rusmir Dusko <nemysis@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: nemysis@FreeBSD.org, Warren Block <wblock@wonkity.com>,
        Jason Helfman <jgh@FreeBSD.org>
Subject: Re: docs/186466: [PATCH] book.xml Stripping Binaries and Shared
 Libraries
Date: Wed, 5 Feb 2014 15:31:32 +0100

 --cWoXeonUoKmBZSoM
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 > On Tue, 4 Feb 2014, nemysis wrote:
 > 
 > Index: en_US.ISO8859-1/books/porters-handbook/book.xml
 > > ===================================================================
 > > --- en_US.ISO8859-1/books/porters-handbook/book.xml	(revision 43779)
 > > +++ en_US.ISO8859-1/books/porters-handbook/book.xml	(working copy)
 > > @@ -5096,8 +5096,16 @@
 > > 	  example:</para>
 > >
 > > 	<programlisting>post-install:
 > > -	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl</programlisting>
 > > +	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}</programlisting>
 > >
 > > +	<para>If you need to strip more files, here shared libraries.
 > > +	 For example:</para>
 
 > Please try to avoid the informal "you".
 > (http://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/book.html#writing-style-be-clear)
 
 Thanks for the link, I have read it a few more times.
 
 > Suggestion:
 
 > <para>When more than one file needs to be stripped, like several
 > shared libraries, loop through them:</para>
 
 Yes this is very good, thanks.
 
 > > +
 > > +	<programlisting>post-install:
 > > +	 .for l in geometry media body track world
 > > +	 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-${l}.so.0
 > > +	 .endfor</programlisting>
 > > +
 > > 	<para>Use the &man.file.1; command on the installed executable
 > > 	  to check whether the binary is stripped or not.  If it does
 
 > It's a bit redundant. Suggestion:
 
 > <para>Use &man.file.1; on the installed executable
 > to check whether it has been stripped.
 
 Yes this is very good.
 
 > > 	  not say <literal>not stripped</literal>, it is stripped.
 
 > That last sentence has a double negative that makes it confusing.
 > Assuming it is there to tell the port programmer what string to expect:
 
 Yes this is double negative.
 
 > Binaries that have not been stripped will be reported by &man.file.1;
 > as <literal>not stripped</literal>.
 
 Yes this is very good.
 
 I accept all your Sugestion thanks Warren Block.
 
 -- 
 Best regards,
 Rusmir Dusko
 
 --cWoXeonUoKmBZSoM
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="porters-handbook_book.xml.diff"
 
 Index: en_US.ISO8859-1/books/porters-handbook/book.xml
 ===================================================================
 --- en_US.ISO8859-1/books/porters-handbook/book.xml	(revision 43779)
 +++ en_US.ISO8859-1/books/porters-handbook/book.xml	(working copy)
 @@ -5096,11 +5096,20 @@
  	  example:</para>
  
  	<programlisting>post-install:
 -	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl</programlisting>
 +	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}</programlisting>
  
 -	<para>Use the &man.file.1; command on the installed executable
 -	  to check whether the binary is stripped or not.  If it does
 -	  not say <literal>not stripped</literal>, it is stripped.
 +	<para>When more than one file needs to be stripped, like several
 +	  shared libraries, loop through them:</para>
 +
 +	<programlisting>post-install:
 +	  .for l in geometry media body track world
 +	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-${l}.so.0
 +	  .endfor</programlisting>
 +
 +	<para>Use &man.file.1; on the installed executable
 +	  to check whether it has been stripped.
 +	  Binaries that have not been stripped will be reported by &man.file.1;
 +	  as <literal>not stripped</literal>.
  	  Additionally, &man.strip.1; will not strip a previously
  	  stripped program; it will instead exit cleanly.</para>
        </sect2>
 
 --cWoXeonUoKmBZSoM--
State-Changed-From-To: open->closed 
State-Changed-By: jgh 
State-Changed-When: Sat Feb 8 01:05:49 UTC 2014 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186466 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/186466: commit references a PR
Date: Sat,  8 Feb 2014 01:05:36 +0000 (UTC)

 Author: jgh
 Date: Sat Feb  8 01:05:28 2014
 New Revision: 43827
 URL: http://svnweb.freebsd.org/changeset/doc/43827
 
 Log:
   - include example on how to strip multiple files
   
   PR:		186466
   Submitted by:	nemysis@
   Approved by:	wblock (mentor)
 
 Modified:
   head/en_US.ISO8859-1/books/porters-handbook/book.xml
 
 Modified: head/en_US.ISO8859-1/books/porters-handbook/book.xml
 ==============================================================================
 --- head/en_US.ISO8859-1/books/porters-handbook/book.xml	Fri Feb  7 23:45:41 2014	(r43826)
 +++ head/en_US.ISO8859-1/books/porters-handbook/book.xml	Sat Feb  8 01:05:28 2014	(r43827)
 @@ -5122,11 +5122,19 @@ PORTVERSION=	1.0</programlisting>
  	<programlisting>post-install:
  	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl</programlisting>
  
 -	<para>Use the &man.file.1; command on the installed executable
 -	  to check whether the binary is stripped or not.  If it does
 -	  not say <literal>not stripped</literal>, it is stripped.
 -	  Additionally, &man.strip.1; will not strip a previously
 -	  stripped program; it will instead exit cleanly.</para>
 +	<para>When multiple files need to be stripped:</para>
 +
 +	<programlisting>post-install:
 +	  .for l in geometry media body track world
 +	  ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-${l}.so.0
 +	  .endfor</programlisting>
 +
 +	<para>Use &man.file.1; on a file to determine if it has been
 +	  stripped.  Binaries are reported by &man.file.1; as
 +	  <literal>stripped</literal>, or
 +	  <literal>not stripped</literal>.  Additionally, &man.strip.1;
 +	  will detect programs that have already been stripped and
 +	  exit cleanly.</para>
        </sect2>
  
        <sect2 xml:id="install-copytree">
 _______________________________________________
 svn-doc-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-doc-all
 To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org"
 
>Unformatted:
