| Summary: | [PATCH] book.xml Stripping Binaries and Shared Libraries | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Rusmir Dusko <nemysis> | ||||||
| Component: | Books & Articles | Assignee: | Jason Helfman <jgh> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | ||||||||
| Priority: | Normal | ||||||||
| Version: | Latest | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
Rusmir Dusko
2014-02-04 23:00:00 UTC
Responsible Changed From-To: freebsd-doc->jgh I'll take it. 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>. > 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 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" State Changed From-To: open->closed Committed, with minor changes. Thanks! |