pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/doc regen.
details: https://anonhg.NetBSD.org/pkgsrc/rev/7661fd4a202a
branches: trunk
changeset: 398148:7661fd4a202a
user: wiz <wiz%pkgsrc.org@localhost>
date: Tue Aug 25 13:20:58 2009 +0000
description:
regen.
diffstat:
doc/pkgsrc.html | 210 +++++++++++++++++++++++++------------------------------
doc/pkgsrc.txt | 166 +++++++++++++++++++-------------------------
2 files changed, 169 insertions(+), 207 deletions(-)
diffs (truncated from 711 to 300 lines):
diff -r c142b1b0dde7 -r 7661fd4a202a doc/pkgsrc.html
--- a/doc/pkgsrc.html Tue Aug 25 13:19:57 2009 +0000
+++ b/doc/pkgsrc.html Tue Aug 25 13:20:58 2009 +0000
@@ -567,14 +567,14 @@
<p>The following principles are basic to pkgsrc:</p>
<div class="itemizedlist"><ul type="disc">
<li><p>“<span class="quote">It should only work if it's right.</span>”
-— That means, if a package contains bugs, it's better to find
+— That means, if a package contains bugs, it's better to find
them and to complain about them rather than to just install the package
and hope that it works. There are numerous checks in pkgsrc that try to
find such bugs: Static analysis tools (<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>),
build-time checks (portability
of shell scripts), and post-installation checks (installed files,
references to shared libraries, script interpreters).</p></li>
<li><p>“<span class="quote">If it works, it should work everywhere</span>”
-— Like NetBSD has been ported to many hardware architectures,
+— Like NetBSD has been ported to many hardware architectures,
pkgsrc has been ported to many operating systems. Care is taken that
packages behave the same on all platforms.</p></li>
</ul></div>
@@ -1759,7 +1759,7 @@
other packages depend on it. Instead, they are moved to the
<code class="filename">vulnerable</code> subdirectory. So you may need to add
this directory to the <code class="varname">PKG_PATH</code> variable.
- However, you should run <span class="command"><strong>audit-packages</strong></span>
+ However, you should run <span class="command"><strong>pkg_admin audit</strong></span>
regularly, especially after installing new packages, and verify
that the vulnerabilities are acceptable for your configuration.</p>
<p>After you've installed packages, be sure to have
@@ -1809,28 +1809,45 @@
FTP site at <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities" target="_top">ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities</a>.
</p>
<p>
- Through <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/audit-packages/README.html" target="_top"><code class="filename">security/audit-packages</code></a>,
+ Through <span class="command"><strong>pkg_admin fetch-pkg-vulnerabilities</strong></span>,
this list can be downloaded
automatically, and a security audit of all packages installed on a system
can take place.
</p>
<p>
- There are two components to
- <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/audit-packages/README.html" target="_top"><code class="filename">security/audit-packages</code></a>. The first
- component, “<span class="quote">download-vulnerability-list</span>”, is for downloading
+ There are two components to auditing. The first
+ step, <span class="command"><strong>pkg_admin fetch-pkg-vulnerabilities</strong></span>,
+ is for downloading
the list of vulnerabilities from the NetBSD FTP site. The second
- component, “<span class="quote">audit-packages</span>”, checks to see if any of your
+ step, <span class="command"><strong>pkg_admin audit</strong></span>, checks to see if any of your
installed packages are vulnerable. If a package is vulnerable, you
will see output similar to the following:
</p>
<pre class="screen">Package samba-2.0.9 has a local-root-shell vulnerability, see
http://www.samba.org/samba/whatsnew/macroexploit.html</pre>
<p>
- One can set up <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/audit-packages/README.html" target="_top"><code class="filename">security/audit-packages</code></a> to download
the
+ You may wish to have the
<a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities" target="_top">vulnerabilities</a>
- file daily, and include a package audit in the daily security script.
- Details on this are located in the <a class="ulink" href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/security/audit-packages/MESSAGE?rev=HEAD&content-type=text/x-cvsweb-markup"
target="_top">MESSAGE</a>
- file for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/audit-packages/README.html" target="_top"><code class="filename">security/audit-packages</code></a>.
+ file downloaded daily so that
+ it remains current. This may be done by adding an appropriate entry
+ to the root users <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?crontab+5+NetBSD-current"><span class="citerefentry"><span
class="refentrytitle">crontab</span>(5)</span></a> entry. For example the entry
+ </p>
+<pre class="screen">
+# download vulnerabilities file
+0 3 * * * /usr/sbin/pkg_admin fetch-pkg-vulnerabilities >/dev/null 2>&1
+ </pre>
+<p>
+ will update the vulnerability list every day at 3AM. You may wish to do
+ this more often than once a day.
+
+ In addition, you may wish to run the package audit from the daily
+ security script. This may be accomplished by adding the following
+ line to <code class="filename">/etc/security.local</code>:
+ </p>
+<pre class="screen">
+/usr/sbin/pkg_admin audit
+ </pre>
+<p>
</p>
</div>
<div class="sect2" lang="en">
@@ -2162,9 +2179,11 @@
release (“<span class="quote">2.0</span>”, etc.) and architecture
(“<span class="quote">mipsel</span>”, etc.).</p></li>
<li><p><code class="varname">ACCEPTABLE_LICENSES</code>:
- List of acceptable licenses. Whenever you try to build a package
- whose license is not in this list, you will get an error message
- that includes instructions on how to change this variable.</p></li>
+ List of acceptable licenses. License names are case-sensitive.
+ Whenever you try to build a package whose license is not in this
+ list, you will get an error message. If the license condition is
+ simple enough, the error message will include specific
+ instructions on how to change this variable.</p></li>
</ul></div>
</div>
<div class="sect1" lang="en">
@@ -2185,7 +2204,7 @@
can be NFS-mounted while <code class="filename">${WRKOBJDIR}</code>
is local to every architecture. (It should be noted that
<code class="varname">PKGSRCDIR</code> should not be set by the user
- — it is an internal definition which refers to the
+ — it is an internal definition which refers to the
root of the pkgsrc tree. It is possible to have many
pkgsrc tree instances.)</p></li>
<li><p><code class="varname">LOCALPATCHES</code>:
@@ -2628,7 +2647,7 @@
Look at <code class="filename">pkgsrc/mk/defaults/mk.conf</code> for
details of the default settings. You will want to ensure that
<code class="varname">ACCEPTABLE_LICENSES</code> meet your local policy.
- As used in this example, <code class="varname">_ACCEPTABLE=yes</code>
+ As used in this example, <code class="varname">SKIP_LICENSE_CHECK=yes</code>
completely bypasses the license check.</p>
<pre class="programlisting">
PACKAGES?= ${_PKGSRCDIR}/packages/${MACHINE_ARCH}
@@ -2638,7 +2657,7 @@
OBJHOSTNAME?= yes # use work.`hostname`
FAILOVER_FETCH= yes # insist on the correct checksum
PKG_DEVELOPER?= yes
-_ACCEPTABLE= yes
+SKIP_LICENSE_CHECK= yes
</pre>
<p>Some options that are especially useful for bulk builds
can be found at the top lines of the file
@@ -2856,7 +2875,7 @@
</li>
<li>
<p><code class="filename">/usr/src</code> (system sources,
- e. g. for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/aperture/README.html" target="_top"><code class="filename">sysutils/aperture</code></a>):</p>
+ e. g. for <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/aperture/README.html" target="_top"><code class="filename">sysutils/aperture</code></a>):</p>
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>ln -s ../disk1/cvs .</code></strong>
<code class="prompt">#</code> <strong class="userinput"><code>ln -s cvs/src-2.0 src</code></strong></pre>
</li>
@@ -3019,7 +3038,7 @@
<li><p><code class="literal"><code class="varname">WRKOBJDIR</code>=/tmp/pbulk-outer</code>, to keep <code class="filename">/usr/pkgsrc</code> free from any modifications,</p></li>
<li><p><code class="literal"><code class="varname">DISTDIR</code>=/distfiles</code>, to have only one directory in which all distfiles (for the infrastructure and for the actual packages) are
downloaded,</p></li>
<li><p><code class="literal"><code class="varname">ACCEPTABLE_LICENSES</code>+=...</code>, to select some licenses additional to the usual Free/Open Source licenses that are acceptable to
you,</p></li>
-<li><p><code class="literal"><code class="varname">_ACCEPTABLE</code>=yes</code>, to accept all licenses, no matter how restrictive they are.</p></li>
+<li><p><code class="literal"><code class="varname">SKIP_LICENSE_CHECK</code>=yes</code>, to bypass the license checks.</p></li>
</ul></div>
<p>Now you are ready to build the rest of the pbulk infrastructure.</p>
<pre class="screen">
@@ -4584,7 +4603,7 @@
specific <span class="emphasis"><em>features</em></span> you need. For example,
instead of assuming that kqueue is available under NetBSD and
using the <code class="varname">__NetBSD__</code> macro to conditionalize
- kqueue support, add a check that detects kqueue itself —
+ kqueue support, add a check that detects kqueue itself —
yes, this generally involves patching the
<span class="command"><strong>configure</strong></span> script. There is absolutely nothing
that prevents some OSes from adopting interfaces from other OSes
@@ -4955,7 +4974,7 @@
operate on the words, others operate on the string as a whole. When
a string is split into words, it is split as you would expect
it from <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?sh+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">sh</span>(1)</span></a>.</p>
-<p>No rule without exception—the <span class="command"><strong>.for</strong></span>
+<p>No rule without exception—the <span class="command"><strong>.for</strong></span>
loop does not follow the shell quoting rules but splits at sequences
of whitespace.</p>
<p>There are several types of variables that should be handled
@@ -5377,54 +5396,22 @@
<a name="faq.common-dirs"></a>13.8. Sharing directories between packages</h2></div></div></div>
<p>A “<span class="quote">shared directory</span>” is a directory where
multiple (and unrelated) packages install files. These
- directories are problematic because you have to add special tricks
- in the PLIST to conditionally remove them, or have some
+ directories were problematic because you had to add special
+ tricks in the PLIST to conditionally remove them, or have some
centralized package handle them.</p>
-<p>Within pkgsrc, you'll find both approaches. If a directory
- is shared by a few unrelated packages, it's often not worth to add
- an extra package to remove it. Therefore, one simply does:</p>
-<pre class="programlisting">
-@unexec ${RMDIR} %D/path/to/shared/directory 2>/dev/null || ${TRUE}
+<p>In pkgsrc, it is now easy: Each package should create
+ directories and install files as needed; <span class="command"><strong>pkg_delete</strong></span>
+ will remove any directories left empty after uninstalling a
+ package.</p>
+<p>If a package needs an empty directory to work, create
+ the directory during installation as usual, and also add an
+ entry to the PLIST:
+ </p>
+<pre class="programlisting">
+@pkgdir path/to/empty/directory
</pre>
-<p>in the PLISTs of all affected packages, instead of the
- regular "@dirrm" line.</p>
-<p>However, if the directory is shared across many packages, two
- different solutions are available:</p>
-<div class="orderedlist"><ol type="1">
-<li><p>If the packages have a common dependency, the directory
- can be removed in that. For example, see
- <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/textproc/scrollkeeper/README.html" target="_top"><code class="filename">textproc/scrollkeeper</code></a>, which
- removes the shared directory
- <code class="filename">share/omf</code>.</p></li>
-<li><p>If the packages using the directory are not related at
- all (they have no common dependencies), a *-dirs package is
- used.</p></li>
-</ol></div>
-<p>From now on, we'll discuss the second solution. To get an
- idea of the *-dirs packages available, issue:</p>
-<pre class="programlisting">
-<code class="prompt">%</code> cd .../pkgsrc
-<code class="prompt">%</code> ls -d */*-dirs
- </pre>
-<p>Their use from other packages is very simple. The
- <code class="varname">USE_DIRS</code> variable takes a list of package names
- (without the “<span class="quote">-dirs</span>” part) together with the required
- version number (always pick the latest one when writing new
- packages).</p>
-<p>For example, if a package installs files under
- <code class="filename">share/applications</code>, it should have the
- following line in it:</p>
-<pre class="programlisting">
-USE_DIRS+= xdg-1.1
- </pre>
-<p>After regenerating the PLIST using <span class="command"><strong>make
- print-PLIST</strong></span>, you should get the right (commented out)
- lines.</p>
-<p>Note that even if your package is using
- <code class="filename">$X11BASE</code>, it must not depend on the
- *-x11-dirs packages. Just specify the name without that part and
- pkgsrc (in particular, <code class="filename">mk/dirs.mk</code>) will take
- care of it.</p>
+<p>
+ </p>
</div>
</div>
<div class="chapter" lang="en">
@@ -6783,6 +6770,9 @@
<pre class="programlisting">
MASTER_SITES= http://www.example.com/download.cgi?file=
</pre>
+<p> The exception to this rule are URLs starting with a dash.
+ In that case the URL is taken as is, fetched and the result stored
+ under the name of the distfile.</p>
<p>There are some predefined values for
<code class="varname">MASTER_SITES</code>, which can be used in
packages. The names of the variables should speak for
@@ -7637,7 +7627,7 @@
<tbody>
<tr class="question">
<td align="left" valign="top">
-<a name="tools.new"></a><a name="id1168230299569"></a><p><b>18.4.1.</b></p>
+<a name="tools.new"></a><a name="id1168230298940"></a><p><b>18.4.1.</b></p>
</td>
<td align="left" valign="top"><p>How do I add a new tool?</p></td>
</tr>
@@ -7647,7 +7637,7 @@
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="tools.listall"></a><a name="id1168230299577"></a><p><b>18.4.2.</b></p>
+<a name="tools.listall"></a><a name="id1168230298949"></a><p><b>18.4.2.</b></p>
</td>
<td align="left" valign="top"><p>How do I get a list of all available
tools?</p></td>
@@ -7658,7 +7648,7 @@
</tr>
<tr class="question">
<td align="left" valign="top">
-<a name="tools.used"></a><a name="id1168230299587"></a><p><b>18.4.3.</b></p>
+<a name="tools.used"></a><a name="id1168230298957"></a><p><b>18.4.3.</b></p>
</td>
<td align="left" valign="top"><p>How can I get a list of all the tools that a
package is using while being built? I want to know whether it
@@ -9258,26 +9248,27 @@
updated.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
-<p>Except the main TeX packages such as teTeX-texmf,
+<p>Except the main TeX packages such as kpathsea,
packages should install files
- into <code class="varname">PKG_LOCALTEXMFPREFIX</code>,
- not <code class="varname">PKG_TEXMFPREFIX</code>.</p>
+ into <code class="filename">${PREFIX}/share/texmf-dist</code>,
+ not <code class="filename">${PREFIX}/share/texmf</code>.</p>
</div>
<div class="orderedlist"><ol type="1">
<li><p>Include
- <code class="filename">../../print/teTeX/module.mk</code> instead
- of <code class="filename">../../mk/tex.buildlink3.mk</code>. This
+ <code class="filename">../../print/kpathsea/texmf.mk</code>. This
takes care of rebuilding the <code class="filename">ls-R</code>
database at installation and deinstallation time.</p></li>
<li>
<p>If your package installs files into a texmf
tree other than the one
- at <code class="varname">PKG_LOCALTEXMFPREFIX</code>,
- set <code class="varname">TEXMFDIRS</code> to the list of all texmf
+ at <code class="filename">${PREFIX}/share/texmf-dist</code>,
+ set <code class="varname">TEX_TEXMF_DIRS</code> to the list of all texmf
trees that need database update.</p>
<p>If your package also installs font map files that need
to be registered using <span class="command"><strong>updmap</strong></span>,
- set <code class="varname">TEX_FONTMAPS</code> to the list of all
+ include <code class="filename">../../print/texlive-tetex/map.mk</code> and
+ set <code class="varname">TEX_MAP_FILES</code> and/or
Home |
Main Index |
Thread Index |
Old Index