/usr/share/doc/racket/pkg/strip.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>5 Source, Binary, and Built Packages</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Package Management in Racket</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="getting-started.html" class="tocviewlink" data-pltdoc="x">Getting Started with Packages</a></td></tr><tr><td align="right">2 </td><td><a href="Package_Concepts.html" class="tocviewlink" data-pltdoc="x">Package Concepts</a></td></tr><tr><td align="right">3 </td><td><a href="cmdline.html" class="tocviewlink" data-pltdoc="x">Using <span class="stt">raco pkg</span></a></td></tr><tr><td align="right">4 </td><td><a href="metadata.html" class="tocviewlink" data-pltdoc="x">Package Metadata</a></td></tr><tr><td align="right">5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Source, Binary, and Built Packages</a></td></tr><tr><td align="right">6 </td><td><a href="apis.html" class="tocviewlink" data-pltdoc="x">Package APIs</a></td></tr><tr><td align="right">7 </td><td><a href="catalog-protocol.html" class="tocviewlink" data-pltdoc="x">Package Catalog Protocol</a></td></tr><tr><td align="right">8 </td><td><a href="PLaneT_Compatibility.html" class="tocviewlink" data-pltdoc="x"><span class="planetName">PLane<span class="mywbr"> </span>T</span> Compatibility</a></td></tr><tr><td align="right">9 </td><td><a href="FAQ.html" class="tocviewlink" data-pltdoc="x">FAQ</a></td></tr><tr><td align="right">10 </td><td><a href="Future_Plans.html" class="tocviewlink" data-pltdoc="x">Future Plans</a></td></tr><tr><td align="right">11 </td><td><a href="implementation.html" class="tocviewlink" data-pltdoc="x">How Package Installation and Distribution Works</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._pkg%2Fstrip..rkt%29._generate-stripped-directory%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">generate-<wbr></wbr>stripped-<wbr></wbr>directory</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._pkg%2Fstrip..rkt%29._fixup-local-redirect-reference%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">fixup-<wbr></wbr>local-<wbr></wbr>redirect-<wbr></wbr>reference</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.1</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="metadata.html" title="backward to "4 Package Metadata"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Package Management in Racket"" data-pltdoc="x">up</a> <a href="apis.html" title="forward to "6 Package APIs"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "pkg/scribblings/pkg.scrbl")" x-part-tag=""strip"">5<tt> </tt><a name="(part._strip)"></a><a name="(mod-path._pkg/strip)"></a>Source, Binary, and Built Packages</h3><p>A package, especially in a repository format, normally provides module
implementations and documentation in source form. Such <a name="(tech._source._package)"></a><span style="font-style: italic">source
packages</span> may work with multiple Racket versions, and modules are
compiled to bytecode and documentation is rendered when the package is
installed.</p><p>A <a name="(tech._binary._package)"></a><span style="font-style: italic">binary package</span> provides only compiled bytecode and
rendered documentation, instead of package and documentation
sources. Since compiled bytecode is specific to a version of Racket, a
<a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a> is specific to a version of Racket. The benefit
of a binary package is that it can have fewer dependencies (e.g., on
Scribble to implement the documentation or on other
packages whose documentation is referenced) and it can be installed
faster. A drawback of a binary package is that it is version-specific
and the source code may be less immediately accessible to other
programmers.</p><p>A <a name="(tech._built._package)"></a><span style="font-style: italic">built package</span> combines source and compiled elements. A
<a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a> can be installed more quickly than source, as
long as it is installed for a suitable Racket version, but the source
remains available as a back-up for other programmers to consult or to
re-build for a different Racket version.</p><p>A package is not specifically tagged as a <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source package</span></a>,
<a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a>, or <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a>. The different kinds of
packages are just conventions based on the content of the package. All
forms of packages can be mixed in an installation, and a package can
be updated from any form to any other form.</p><p>Programmers normally supply only <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source packages</span></a>, while a
package catalog service may convert each source package to a
<a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a> or <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a>. Alternatively,
programmers can create <a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary packages</span></a> or <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built packages</span></a>
by using the <a href="cmdline.html#%28part._raco-pkg-create%29" class="plainlink" data-pltdoc="x"><span class="stt">raco pkg create</span></a> subcommand with <span class="nobreak"><span class="stt">--binary</span></span> or
<span class="nobreak"><span class="stt">--built</span></span>. As a convenience, the <a href="cmdline.html#%28part._raco-pkg-create%29" class="plainlink" data-pltdoc="x"><span class="stt">raco pkg create</span></a> subcommand
can also create a <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source package</span></a> from an installed package or
repository checkout, dropping repository elements (such as a
<span class="stt">".git"</span> directory) and compiled code. Note that
<a href="cmdline.html#%28part._raco-pkg-create%29" class="plainlink" data-pltdoc="x"><span class="stt">raco pkg create</span></a> by default bundles a package directory as-is,
with no filtering at all.</p><p>Creating a <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source package</span></a>, <a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a>, or
<a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a> from a directory or package installation prunes
the following files and directories:</p><ul><li><p>directories/files named <span class="stt">".svn"</span>;</p></li><li><p>directories/files whose names start with <span class="stt">".git"</span>;</p></li><li><p>directories/files whose names end with <span class="stt">"~"</span>; and</p></li><li><p>directories/files whose names start and end with <span class="stt">"#"</span>.</p></li></ul><p>Any of the above can be suppressed, however, by a
<span class="RktSym">source-keep-files</span> (for <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source package</span></a> and <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built
package</span></a> bundling) or <span class="RktSym">binary-keep-files</span> (for <a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary
package</span></a> and <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a> bundling) definition in an
<span class="stt">"info.rkt"</span> in the package or any subdirectory. A
<span class="RktSym">binary-keep-files</span> or <span class="RktSym">binary-keep-files</span> definition
should bind the name to a list of paths relative to the
<span class="stt">"info.rkt"</span> file.</p><p>Creating a <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source package</span></a> prunes the following additional files
and directories:</p><ul><li><p>directories/files named <span class="stt">"compiled"</span>;</p></li><li><p>directories/files named <span class="stt">"doc"</span>;</p></li><li><p>directories/files named <span class="stt">"synced.rktd"</span>, which can appear
as a marker in rendered documentation;</p></li><li><p>directories/files named in an <span class="stt">"info.rkt"</span> file’s
<span class="RktSym">source-omit-files</span> definition.</p></li></ul><p>Any of the above removals can be suppressed through
<span class="RktSym">source-keep-files</span>—<wbr></wbr>even for files and directories
within an otherwise removed directory.</p><p>Creating a <a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a> prunes the following additional files
and directories:</p><ul><li><p>directories/files with names ending in <span class="stt">".rkt"</span> or
<span class="stt">".ss"</span> for which a corresponding compiled bytecode file is
present (in a <span class="stt">"compiled"</span> subdirectory);</p></li><li><p>directories/files with names ending in <span class="stt">".scrbl"</span>,
<span class="stt">"_scrbl.zo"</span>, or <span class="stt">".dep"</span>;</p></li><li><p>directories/files ending with <span class="stt">".css"</span> or <span class="stt">".js"</span>
immediately within a directory named <span class="stt">"doc"</span>;</p></li><li><p>directories/files named <span class="stt">"tests"</span> or
<span class="stt">"scribblings"</span> (but see the exception below for
<span class="stt">"doc"</span> and <span class="stt">"info.rkt"</span>;</p></li><li><p>directories/files named in an <span class="stt">"info.rkt"</span> file’s
<span class="RktSym">binary-omit-files</span> definition.</p></li></ul><p>Any of the above removals can be suppressed through
<span class="RktSym">binary-keep-files</span>—<wbr></wbr>even files and directories within
an otherwise removed directory. Furthermore, a <span class="stt">"doc"</span> or
<span class="stt">"info.rkt"</span> directory/file is kept when it is within a
<span class="stt">"scribblings"</span> directory and not within a <span class="stt">"tests"</span>
directory. Creating a <a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a> further adjusts the
following files (when they are not pruned):</p><ul><li><p>for any file whose name ends in <span class="stt">".zo"</span>, submodules
named <span class="RktSym">test</span>, <span class="RktSym">doc</span>, or
<span class="RktSym">srcdoc</span> are removed;</p></li><li><p>for each <span class="stt">".html"</span> file that refers to a
<span class="stt">"local-redirect.js"</span> script, the path to the script is
removed; and</p></li><li><p>each <span class="stt">"info.rkt"</span> is adjusted as follows: an
<span class="RktSym">assume-virtual-sources</span> definition is added, any
<span class="RktSym">copy-foreign-libs</span> definition is changed to
<span class="RktSym">move-foreign-libs</span>, any
<span class="RktSym">copy-shared-files</span> definition is changed to
<span class="RktSym">move-shared-files</span>, any <span class="RktSym">copy-man-pages</span>
definition is changed to <span class="RktSym">move-man-pages</span>, and any
<span class="RktSym">build-deps</span> definition is removed.</p></li></ul><p>Creating a <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a> removes any file or directory that
would be removed for a <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source package</span></a> and <a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary
package</span></a>, and it performs the <span class="stt">".html"</span> file updating of a
<a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a>.</p><p>Finally, creating <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a> or <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source package</span></a>
“unmoves” files that were installed via <span class="RktSym">move-foreign-libs</span>,
<span class="RktSym">move-shared-files</span>, or <span class="RktSym">move-man-pages</span> definitions in
an <span class="stt">"info.rkt"</span> file, retrieving them if they are not present
at referenced location but are present in a user-specific target
directory (i.e., the directory reported by <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-user-lib-dir%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">find-user-lib-dir</a></span>,
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-user-share-dir%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">find-user-share-dir</a></span>, or <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-user-man-dir%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">find-user-man-dir</a></span>,
respectively).</p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">pkg/strip</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">pkg/strip</span></a> module provides
support for copying a package-style directory to a given destination
with the same file/directory omissions and updates as
<a href="cmdline.html#%28part._raco-pkg-create%29" class="plainlink" data-pltdoc="x"><span class="stt">raco pkg create</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._pkg/strip..rkt)._generate-stripped-directory))"></a><span title="Provided from: pkg/strip | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._pkg%2Fstrip..rkt%29._generate-stripped-directory%29%29" class="RktValDef RktValLink" data-pltdoc="x">generate-stripped-directory</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">mode</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">src-dir</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">dest-dir</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym">void?</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mode</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">or/c</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">source</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">binary</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">built</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">src-dir</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">path-string?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">dest-dir</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">path-string?</span></td></tr></table></blockquote></div><div class="SIntrapara">Copies <span class="RktVar">src-dir</span> to <span class="RktVar">dest-dir</span> with file/directory
omissions and updates corresponding the creation of a <a href="#%28tech._source._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">source
package</span></a>, <a href="#%28tech._binary._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">binary package</span></a>, or <a href="#%28tech._built._package%29" class="techoutside" data-pltdoc="x"><span class="techinside">built package</span></a> as indicated
by <span class="RktVar">mode</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._pkg/strip..rkt)._fixup-local-redirect-reference))"></a><span title="Provided from: pkg/strip | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._pkg%2Fstrip..rkt%29._fixup-local-redirect-reference%29%29" class="RktValDef RktValLink" data-pltdoc="x">fixup-local-redirect-reference</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">file</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">js-path</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym">void?</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">file</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">path-string?</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">js-path</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">string?</span></td></tr></table></blockquote></div><div class="SIntrapara">Assuming that <span class="RktVar">file</span> is an HTML file for documentation, adjusts
the URL reference to <span class="stt">"local-redirect.js"</span>, if any, to use the
prefix <span class="RktVar">js-path</span>.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="metadata.html" title="backward to "4 Package Metadata"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Package Management in Racket"" data-pltdoc="x">up</a> <a href="apis.html" title="forward to "6 Package APIs"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|