pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/doc
Module Name: pkgsrc
Committed By: rillig
Date: Sat May 30 19:25:38 UTC 2020
Modified Files:
pkgsrc/doc: pkgsrc.html pkgsrc.txt
Log Message:
doc/pkgsrc.*: regen
To generate a diff of this commit:
cvs rdiff -u -r1.293 -r1.294 pkgsrc/doc/pkgsrc.html
cvs rdiff -u -r1.291 -r1.292 pkgsrc/doc/pkgsrc.txt
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/doc/pkgsrc.html
diff -u pkgsrc/doc/pkgsrc.html:1.293 pkgsrc/doc/pkgsrc.html:1.294
--- pkgsrc/doc/pkgsrc.html:1.293 Fri May 22 18:51:44 2020
+++ pkgsrc/doc/pkgsrc.html Sat May 30 19:25:38 2020
@@ -126,18 +126,15 @@ builds)</a></span></dt>
<dt><span class="sect1"><a href="#bulk.req">8.3. Requirements of a full bulk build</a></span></dt>
<dt><span class="sect1"><a href="#bulk.var">8.4. Bulk build variants</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#bulk.var.subst_noop">8.4.1. Strict SUBST blocks</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.confopt">8.4.2. Detect unknown configure options</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.comperr">8.4.3. Detect classes of bugs by forcing compiler warnings</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.dirs">8.4.4. Use custom directories</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.warn">8.4.5. Turn warnings into errors</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.pkglint">8.4.6. Reject packages for which pkglint reports errors</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.strings">8.4.7. Reject packages that contain forbidden strings</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.test">8.4.8. Reject packages whose self-test fails</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.shvar">8.4.9. Reject packages that use undefined shell variables</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.quiet">8.4.10. Turn off verbose logging</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.options">8.4.11. Select random sets of options</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.build_defs">8.4.12. Select random configurations of BUILD_DEFS</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.confopt">8.4.1. Detect unknown configure options</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.comperr">8.4.2. Detect classes of bugs by forcing compiler warnings</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.dirs">8.4.3. Use custom directories</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.warn">8.4.4. Turn warnings into errors</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.pkglint">8.4.5. Reject packages for which pkglint reports errors</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.strings">8.4.6. Reject packages that contain forbidden strings</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.test">8.4.7. Reject packages whose self-test fails</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.shvar">8.4.8. Reject packages that use undefined shell variables</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.quiet">8.4.9. Turn off verbose logging</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="#creating-cdroms">8.5. Creating a multiple CD-ROM packages collection</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="#cdpack-example">8.5.1. Example of cdpack</a></span></dt></dl></dd>
@@ -886,18 +883,15 @@ builds)</a></span></dt>
<dt><span class="sect1"><a href="#bulk.req">8.3. Requirements of a full bulk build</a></span></dt>
<dt><span class="sect1"><a href="#bulk.var">8.4. Bulk build variants</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#bulk.var.subst_noop">8.4.1. Strict SUBST blocks</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.confopt">8.4.2. Detect unknown configure options</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.comperr">8.4.3. Detect classes of bugs by forcing compiler warnings</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.dirs">8.4.4. Use custom directories</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.warn">8.4.5. Turn warnings into errors</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.pkglint">8.4.6. Reject packages for which pkglint reports errors</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.strings">8.4.7. Reject packages that contain forbidden strings</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.test">8.4.8. Reject packages whose self-test fails</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.shvar">8.4.9. Reject packages that use undefined shell variables</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.quiet">8.4.10. Turn off verbose logging</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.options">8.4.11. Select random sets of options</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.build_defs">8.4.12. Select random configurations of BUILD_DEFS</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.confopt">8.4.1. Detect unknown configure options</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.comperr">8.4.2. Detect classes of bugs by forcing compiler warnings</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.dirs">8.4.3. Use custom directories</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.warn">8.4.4. Turn warnings into errors</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.pkglint">8.4.5. Reject packages for which pkglint reports errors</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.strings">8.4.6. Reject packages that contain forbidden strings</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.test">8.4.7. Reject packages whose self-test fails</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.shvar">8.4.8. Reject packages that use undefined shell variables</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.quiet">8.4.9. Turn off verbose logging</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="#creating-cdroms">8.5. Creating a multiple CD-ROM packages collection</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="#cdpack-example">8.5.1. Example of cdpack</a></span></dt></dl></dd>
@@ -1250,7 +1244,7 @@ and you can still use binary packages fr
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="using-pkg"></a>5.1.�Using binary packages</h2></div></div></div>
-<p>On the <a class="ulink" href="https://cdn.NetBSD.org/" target="_top">cdn.NetBSD.org</a>
+<p>On the <a class="ulink" href="http://cdn.NetBSD.org/" target="_top">cdn.NetBSD.org</a>
site and mirrors, there are collections of binary packages,
ready to be installed. These binary packages have been built using the
default settings for the directories, that is:</p>
@@ -1267,7 +1261,8 @@ and you can still use binary packages fr
<a name="finding-binary-packages"></a>5.1.1.�Finding binary packages</h3></div></div></div>
<p>To install binary packages, you first need to know from where
to get them. The first place where you should look is on the main
- pkgsrc FTP server in the directory <a class="ulink" href="https://cdn.NetBSD.org/pub/pkgsrc/packages/" target="_top"><code class="filename">/pub/pkgsrc/packages</code></a>.</p>
+
+ pkgsrc FTP server in the directory <a class="ulink" href="http://cdn.NetBSD.org/pub/pkgsrc/packages/" target="_top"><code class="filename">/pub/pkgsrc/packages</code></a>.</p>
<p>This directory contains binary packages for multiple
platforms. First, select your operating system. (Ignore the
directories with version numbers attached to it, they just exist for
@@ -1294,7 +1289,8 @@ and you can still use binary packages fr
<span class="command"><strong>su</strong></span> to root first):</p>
<pre class="screen">
<code class="prompt">#</code> <strong class="userinput"><code>PATH="/usr/pkg/sbin:$PATH"</code></strong>
-<code class="prompt">#</code> <strong class="userinput"><code>PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages"</code></strong>
+
+<code class="prompt">#</code> <strong class="userinput"><code>PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages"</code></strong>
<code class="prompt">#</code> <strong class="userinput"><code>PKG_PATH="$PKG_PATH/<em class="replaceable"><code>OPSYS</code></em>/<em class="replaceable"><code>ARCH</code></em>/<em
class="replaceable"><code>VERSIONS</code></em>/All/"</code></strong>
<code class="prompt">#</code> <strong class="userinput"><code>export PATH PKG_PATH</code></strong>
</pre>
@@ -1360,7 +1356,8 @@ and you can still use binary packages fr
The pkgsrc Security Team and Packages Groups maintain a list of
known security vulnerabilities to packages which are (or have been)
included in pkgsrc. The list is available from the NetBSD
- FTP site at <a class="ulink" href="https://ftp.NetBSD.org/pub/NetBSD/packages/vulns/pkg-vulnerabilities" target="_top">https://ftp.NetBSD.org/pub/NetBSD/packages/vulns/pkg-vulnerabilities</a>.
+
+ FTP site at <a class="ulink" href="http://ftp.NetBSD.org/pub/NetBSD/packages/vulns/pkg-vulnerabilities" target="_top">http://ftp.NetBSD.org/pub/NetBSD/packages/vulns/pkg-vulnerabilities</a>.
</p>
<p>
Through <span class="command"><strong>pkg_admin fetch-pkg-vulnerabilities</strong></span>,
@@ -1381,7 +1378,8 @@ and you can still use binary packages fr
https://www.samba.org/samba/whatsnew/macroexploit.html</pre>
<p>
You may wish to have the
- <a class="ulink" href="https://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities" target="_top">vulnerabilities</a>
+
+ <a class="ulink" href="http://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities" target="_top">vulnerabilities</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="https://netbsd.gw.com/cgi-bin/man-cgi?crontab+5.i386+NetBSD-9.0"><span class="citerefentry"><span
class="refentrytitle">crontab</span>(5)</span></a> entry. For example the entry
@@ -2093,18 +2091,15 @@ builds)</h2></div></div></div>
<dt><span class="sect1"><a href="#bulk.req">8.3. Requirements of a full bulk build</a></span></dt>
<dt><span class="sect1"><a href="#bulk.var">8.4. Bulk build variants</a></span></dt>
<dd><dl>
-<dt><span class="sect2"><a href="#bulk.var.subst_noop">8.4.1. Strict SUBST blocks</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.confopt">8.4.2. Detect unknown configure options</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.comperr">8.4.3. Detect classes of bugs by forcing compiler warnings</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.dirs">8.4.4. Use custom directories</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.warn">8.4.5. Turn warnings into errors</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.pkglint">8.4.6. Reject packages for which pkglint reports errors</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.strings">8.4.7. Reject packages that contain forbidden strings</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.test">8.4.8. Reject packages whose self-test fails</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.shvar">8.4.9. Reject packages that use undefined shell variables</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.quiet">8.4.10. Turn off verbose logging</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.options">8.4.11. Select random sets of options</a></span></dt>
-<dt><span class="sect2"><a href="#bulk.var.build_defs">8.4.12. Select random configurations of BUILD_DEFS</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.confopt">8.4.1. Detect unknown configure options</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.comperr">8.4.2. Detect classes of bugs by forcing compiler warnings</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.dirs">8.4.3. Use custom directories</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.warn">8.4.4. Turn warnings into errors</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.pkglint">8.4.5. Reject packages for which pkglint reports errors</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.strings">8.4.6. Reject packages that contain forbidden strings</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.test">8.4.7. Reject packages whose self-test fails</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.shvar">8.4.8. Reject packages that use undefined shell variables</a></span></dt>
+<dt><span class="sect2"><a href="#bulk.var.quiet">8.4.9. Turn off verbose logging</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="#creating-cdroms">8.5. Creating a multiple CD-ROM packages collection</a></span></dt>
<dd><dl><dt><span class="sect2"><a href="#cdpack-example">8.5.1. Example of cdpack</a></span></dt></dl></dd>
@@ -2238,37 +2233,7 @@ section lists some ideas for bulk builds
fail if they don't follow the pkgsrc style.</p>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.subst_noop"></a>8.4.1.�Strict SUBST blocks</h3></div></div></div>
-<p>Up to May 2020, the SUBST blocks ignored files that didn't exist,
-as well as substitutions that didn't have any effect. There were quite a
-few SUBST blocks that were redundant, and these have been removed
-already.</p>
-<p>The next step would be to not only check that each filename pattern
-has an effect but also that each substitution in SUBST_SED or SUBST_VARS
-applies to at least one file.</p>
-<p>To do this, <code class="filename">mk/subst.mk</code> would have to be
-adjusted, in a similar way as the check for no-op SUBST_FILES. There are
-several regression tests in <code class="filename">regress/infra-unittests</code>
-that help to get all edge cases correct.</p>
-<p>When a package fails this additional check, there are various
-possible causes why the <code class="varname">SUBST_SED</code> became a
-no-op.</p>
-<div class="orderedlist"><ol class="orderedlist" type="1">
-<li class="listitem"><p>The pattern used to be found in a former version of the
-package, but is not needed anymore. In that case, just remove
-it.</p></li>
-<li class="listitem"><p>The pattern contains a typo. In that case, fix the typo
-and bump <code class="varname">PKGREVISION</code>, since the fixed typo will
-probably modify the resulting binary package.</p></li>
-<li class="listitem"><p>There is a patch that is applied before the SUBST block,
-and the patch accidentally contains the change that was intended for the
-SUBST block. In that case, remove the respective hunk from the
-patch.</p></li>
-</ol></div>
-</div>
-<div class="sect2">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.confopt"></a>8.4.2.�Detect unknown configure options</h3></div></div></div>
+<a name="bulk.var.confopt"></a>8.4.1.�Detect unknown configure options</h3></div></div></div>
<p>Add the following line to <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
<pre class="programlisting">
GNU_CONFIGURE_STRICT= yes
@@ -2279,41 +2244,53 @@ package but does not apply anymore. In t
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.comperr"></a>8.4.3.�Detect classes of bugs by forcing compiler warnings</h3></div></div></div>
+<a name="bulk.var.comperr"></a>8.4.2.�Detect classes of bugs by forcing compiler warnings</h3></div></div></div>
<p>The job of a compiler is not restricted to producing executable
-code, most compilers also detects typical mistakes.</p>
-<p>Add the following line to <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
+code, most compilers also detect typical programming mistakes. The pkgsrc
+compiler wrappers make it easy to force compiler options when the package
+is built. This can be used to find typical bugs across all packages that
+are in pkgsrc. By reporting these bugs upstream, the packages will be
+more reliable with the next updates.</p>
+<p>Add some of the following lines to <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>:</p>
<pre class="programlisting">
CFLAGS+= -Werror=char-subscripts
+CFLAGS+= -Werror=implicit-function-declaration
</pre>
-<p>When a package fails this additional check, first document the
-circumstances in which the compiler produced the error message. This
-includes:</p>
+<p>When a package fails to build using these stricter compiler
+options, document the circumstances in which the compiler produced the
+error message. This includes:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>The platform
(<code class="varname">MACHINE_PLATFORM</code>)</p></li>
<li class="listitem"><p>The source file</p></li>
<li class="listitem"><p>An excerpt of the code. GCC and Clang already do this as
part of the diagnostic.</p></li>
-<li class="listitem"><p>The error message from the compiler.</p></li>
+<li class="listitem"><p>The exact error message from the compiler.</p></li>
</ul></div>
<p>If a package produces these error messages, but the package is
-fine, document this in the package Makefile, like this:</p>
+fine, record this in your local <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, like this, to skip this check
+in the next builds:</p>
<pre class="programlisting">
+.if ${PKGPATH} == category/package
# Version ${VERSION} failed on ${MACHINE_PLATFORM}:
# error message
# code
-# reason why the code does not need to be fixed
+# Reason why the code does not need to be fixed.
BUILDLINK_TRANSFORM+= rm:-Werror=char-subscripts
+.endif
</pre>
<p>If the error messages from the compiler are valid and the code
-needs to be fixed, prepare a patch for a single source file, or if it's a
-one-liner fix, add a SUBST block to the package Makefile. In any case,
-report it to the upstream authors of the package.</p>
+needs to be fixed, prepare a local patch (see
+<code class="varname">LOCALPATCHES</code>) and report the bug to the upstream
+authors of the package, providing them with the information you collected
+above.</p>
+<p>Patches that are not essential for the package to work should only
+be reported upstream but not committed to pkgsrc, to make future updates
+easier.</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.dirs"></a>8.4.4.�Use custom directories</h3></div></div></div>
+<a name="bulk.var.dirs"></a>8.4.3.�Use custom directories</h3></div></div></div>
<p>Some directories like <code class="varname">PREFIX</code>,
<code class="varname">VARBASE</code>, <code class="varname">PKG_SYSCONFDIR</code>,
<code class="varname">PKGMANDIR</code>, <code class="varname">PKG_INFODIR</code> can be
@@ -2329,7 +2306,7 @@ PKG_INFODIR= a-random-uuid
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.warn"></a>8.4.5.�Turn warnings into errors</h3></div></div></div>
+<a name="bulk.var.warn"></a>8.4.4.�Turn warnings into errors</h3></div></div></div>
<p>When building a package, warnings are typically ignored since they
just flow by and do not cause the build to fail immediately. To find
these warnings, redefine them to errors in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
@@ -2339,7 +2316,7 @@ WARNING_MSG= ${FAIL_MSG} "(wa
</pre>
<p>(There are many more classes of warnings in pkgsrc, and most of
them can be redefined with a simple definition like above.</p>
-<p>If a package suggest to add <code class="varname">USE_TOOLS+=perl</code> to
+<p>If a package suggests to add <code class="varname">USE_TOOLS+=perl</code> to
the package Makefile, research whether the package actually needs Perl.
If it does, add <code class="varname">USE_TOOLS+=perl</code> to the package
Makefile, and if it doesn't, add
@@ -2347,7 +2324,7 @@ Makefile, and if it doesn't, add
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.pkglint"></a>8.4.6.�Reject packages for which pkglint reports errors</h3></div></div></div>
+<a name="bulk.var.pkglint"></a>8.4.5.�Reject packages for which pkglint reports errors</h3></div></div></div>
<p>Using pkglint as part of the regular build process is mostly a
waste of time. If you want to fix some of the warnings, just run pkglint
recursively on the whole pkgsrc tree. This will take a few minutes (up to
@@ -2355,7 +2332,7 @@ recursively on the whole pkgsrc tree. Th
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.strings"></a>8.4.7.�Reject packages that contain forbidden strings</h3></div></div></div>
+<a name="bulk.var.strings"></a>8.4.6.�Reject packages that contain forbidden strings</h3></div></div></div>
<p>To ensure that the binary packages don't contain references to the
build directory, there is already <code class="varname">CHECK_WRKREF</code>. If
that variable includes the item <code class="literal">extra</code>, it is
@@ -2372,7 +2349,7 @@ therefore the results need to be taken w
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.test"></a>8.4.8.�Reject packages whose self-test fails</h3></div></div></div>
+<a name="bulk.var.test"></a>8.4.7.�Reject packages whose self-test fails</h3></div></div></div>
<p>To run the test suites that come with each package, add this line
to <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
<pre class="programlisting">
@@ -2385,7 +2362,7 @@ cyclic dependencies. There is still a lo
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.shvar"></a>8.4.9.�Reject packages that use undefined shell variables</h3></div></div></div>
+<a name="bulk.var.shvar"></a>8.4.8.�Reject packages that use undefined shell variables</h3></div></div></div>
<p>To catch typos in the shell snippets from the Makefile fragments,
add the <code class="literal">-u</code> flag to most of the commands by adding this
line to <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
@@ -2397,7 +2374,7 @@ definition.</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.quiet"></a>8.4.10.�Turn off verbose logging</h3></div></div></div>
+<a name="bulk.var.quiet"></a>8.4.9.�Turn off verbose logging</h3></div></div></div>
<p>The build logs of a package are often quite long. This allows error
messages or other interesting details to hide between the noise. To make
the actual error message stand out more, add these lines to
@@ -2410,44 +2387,6 @@ MAKE_FLAGS+= -s
Make. On exotic platforms with their own make, it may be a little
different.</p>
</div>
-<div class="sect2">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.options"></a>8.4.11.�Select random sets of options</h3></div></div></div>
-<p>Most bulk builds run with the default package options. This means
-that other combinations of options are not regularly tested. To do this,
-run a bulk build with these configurations.</p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
-<li class="listitem"><p>no options enabled</p></li>
-<li class="listitem"><p>all options enabled</p></li>
-<li class="listitem"><p>2n + 0</p></li>
-<li class="listitem"><p>2n + 1</p></li>
-<li class="listitem"><p>4n + 0..1</p></li>
-<li class="listitem"><p>4n + 2..3</p></li>
-<li class="listitem"><p>8n + 0..3</p></li>
-<li class="listitem"><p>8n + 4..7</p></li>
-<li class="listitem"><p>2048n + 0..1023</p></li>
-<li class="listitem"><p>2048n + 1024..2047</p></li>
-</ul></div>
-<p>Open questions are:</p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
-<li class="listitem"><p>how to collect all options from the entire
-pkgsrc</p></li>
-<li class="listitem"><p>how to handle mutually exclusive
-options</p></li>
-<li class="listitem"><p>the sets of mutually exclusive options are defined
-per-package</p></li>
-<li class="listitem"><p>the sets of nonempty sets are defined
-per-package</p></li>
-</ul></div>
-</div>
-<div class="sect2">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="bulk.var.build_defs"></a>8.4.12.�Select random configurations of BUILD_DEFS</h3></div></div></div>
-<p>Just like the <code class="varname">PKG_OPTIONS</code>, the
-<code class="varname">BUILD_DEFS</code> also allow different variants of pkgsrc to
-be created. The same ideas as in <a class="xref" href="#bulk.var.options" title="8.4.11.�Select random sets of options">Section�8.4.11, “Select random sets of options”</a>
-apply.</p>
-</div>
</div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
Index: pkgsrc/doc/pkgsrc.txt
diff -u pkgsrc/doc/pkgsrc.txt:1.291 pkgsrc/doc/pkgsrc.txt:1.292
--- pkgsrc/doc/pkgsrc.txt:1.291 Fri May 22 18:51:44 2020
+++ pkgsrc/doc/pkgsrc.txt Sat May 30 19:25:38 2020
@@ -109,18 +109,15 @@ I. The pkgsrc user's guide
8.3. Requirements of a full bulk build
8.4. Bulk build variants
- 8.4.1. Strict SUBST blocks
- 8.4.2. Detect unknown configure options
- 8.4.3. Detect classes of bugs by forcing compiler warnings
- 8.4.4. Use custom directories
- 8.4.5. Turn warnings into errors
- 8.4.6. Reject packages for which pkglint reports errors
- 8.4.7. Reject packages that contain forbidden strings
- 8.4.8. Reject packages whose self-test fails
- 8.4.9. Reject packages that use undefined shell variables
- 8.4.10. Turn off verbose logging
- 8.4.11. Select random sets of options
- 8.4.12. Select random configurations of BUILD_DEFS
+ 8.4.1. Detect unknown configure options
+ 8.4.2. Detect classes of bugs by forcing compiler warnings
+ 8.4.3. Use custom directories
+ 8.4.4. Turn warnings into errors
+ 8.4.5. Reject packages for which pkglint reports errors
+ 8.4.6. Reject packages that contain forbidden strings
+ 8.4.7. Reject packages whose self-test fails
+ 8.4.8. Reject packages that use undefined shell variables
+ 8.4.9. Turn off verbose logging
8.5. Creating a multiple CD-ROM packages collection
@@ -765,18 +762,15 @@ Table of Contents
8.3. Requirements of a full bulk build
8.4. Bulk build variants
- 8.4.1. Strict SUBST blocks
- 8.4.2. Detect unknown configure options
- 8.4.3. Detect classes of bugs by forcing compiler warnings
- 8.4.4. Use custom directories
- 8.4.5. Turn warnings into errors
- 8.4.6. Reject packages for which pkglint reports errors
- 8.4.7. Reject packages that contain forbidden strings
- 8.4.8. Reject packages whose self-test fails
- 8.4.9. Reject packages that use undefined shell variables
- 8.4.10. Turn off verbose logging
- 8.4.11. Select random sets of options
- 8.4.12. Select random configurations of BUILD_DEFS
+ 8.4.1. Detect unknown configure options
+ 8.4.2. Detect classes of bugs by forcing compiler warnings
+ 8.4.3. Use custom directories
+ 8.4.4. Turn warnings into errors
+ 8.4.5. Reject packages for which pkglint reports errors
+ 8.4.6. Reject packages that contain forbidden strings
+ 8.4.7. Reject packages whose self-test fails
+ 8.4.8. Reject packages that use undefined shell variables
+ 8.4.9. Turn off verbose logging
8.5. Creating a multiple CD-ROM packages collection
@@ -1121,7 +1115,8 @@ To install packages directly from an FTP
commands in a Bourne-compatible shell (be sure to su to root first):
# PATH="/usr/pkg/sbin:$PATH"
-# PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages"
+
+# PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages"
# PKG_PATH="$PKG_PATH/OPSYS/ARCH/VERSIONS/All/"
# export PATH PKG_PATH
@@ -1172,8 +1167,8 @@ files.
The pkgsrc Security Team and Packages Groups maintain a list of known security
vulnerabilities to packages which are (or have been) included in pkgsrc. The
-list is available from the NetBSD FTP site at https://ftp.NetBSD.org/pub/NetBSD
-/packages/vulns/pkg-vulnerabilities.
+list is available from the NetBSD FTP site at http://ftp.NetBSD.org/pub/NetBSD/
+packages/vulns/pkg-vulnerabilities.
Through pkg_admin fetch-pkg-vulnerabilities, this list can be downloaded
automatically, and a security audit of all packages installed on a system can
@@ -1737,18 +1732,15 @@ Table of Contents
8.3. Requirements of a full bulk build
8.4. Bulk build variants
- 8.4.1. Strict SUBST blocks
- 8.4.2. Detect unknown configure options
- 8.4.3. Detect classes of bugs by forcing compiler warnings
- 8.4.4. Use custom directories
- 8.4.5. Turn warnings into errors
- 8.4.6. Reject packages for which pkglint reports errors
- 8.4.7. Reject packages that contain forbidden strings
- 8.4.8. Reject packages whose self-test fails
- 8.4.9. Reject packages that use undefined shell variables
- 8.4.10. Turn off verbose logging
- 8.4.11. Select random sets of options
- 8.4.12. Select random configurations of BUILD_DEFS
+ 8.4.1. Detect unknown configure options
+ 8.4.2. Detect classes of bugs by forcing compiler warnings
+ 8.4.3. Use custom directories
+ 8.4.4. Turn warnings into errors
+ 8.4.5. Reject packages for which pkglint reports errors
+ 8.4.6. Reject packages that contain forbidden strings
+ 8.4.7. Reject packages whose self-test fails
+ 8.4.8. Reject packages that use undefined shell variables
+ 8.4.9. Turn off verbose logging
8.5. Creating a multiple CD-ROM packages collection
@@ -1878,35 +1870,7 @@ to run non-default bulk builds from time
for bulk builds that intentionally let packages fail if they don't follow the
pkgsrc style.
-8.4.1. Strict SUBST blocks
-
-Up to May 2020, the SUBST blocks ignored files that didn't exist, as well as
-substitutions that didn't have any effect. There were quite a few SUBST blocks
-that were redundant, and these have been removed already.
-
-The next step would be to not only check that each filename pattern has an
-effect but also that each substitution in SUBST_SED or SUBST_VARS applies to at
-least one file.
-
-To do this, mk/subst.mk would have to be adjusted, in a similar way as the
-check for no-op SUBST_FILES. There are several regression tests in regress/
-infra-unittests that help to get all edge cases correct.
-
-When a package fails this additional check, there are various possible causes
-why the SUBST_SED became a no-op.
-
- 1. The pattern used to be found in a former version of the package, but is not
- needed anymore. In that case, just remove it.
-
- 2. The pattern contains a typo. In that case, fix the typo and bump
- PKGREVISION, since the fixed typo will probably modify the resulting binary
- package.
-
- 3. There is a patch that is applied before the SUBST block, and the patch
- accidentally contains the change that was intended for the SUBST block. In
- that case, remove the respective hunk from the patch.
-
-8.4.2. Detect unknown configure options
+8.4.1. Detect unknown configure options
Add the following line to mk.conf.
@@ -1916,17 +1880,23 @@ When a package fails this additional che
configure option was valid for an older version of the package but does not
apply anymore. In that case, just remove it.
-8.4.3. Detect classes of bugs by forcing compiler warnings
+8.4.2. Detect classes of bugs by forcing compiler warnings
The job of a compiler is not restricted to producing executable code, most
-compilers also detects typical mistakes.
+compilers also detect typical programming mistakes. The pkgsrc compiler
+wrappers make it easy to force compiler options when the package is built. This
+can be used to find typical bugs across all packages that are in pkgsrc. By
+reporting these bugs upstream, the packages will be more reliable with the next
+updates.
-Add the following line to mk.conf.
+Add some of the following lines to mk.conf:
CFLAGS+= -Werror=char-subscripts
+CFLAGS+= -Werror=implicit-function-declaration
-When a package fails this additional check, first document the circumstances in
-which the compiler produced the error message. This includes:
+When a package fails to build using these stricter compiler options, document
+the circumstances in which the compiler produced the error message. This
+includes:
* The platform (MACHINE_PLATFORM)
@@ -1935,23 +1905,28 @@ which the compiler produced the error me
* An excerpt of the code. GCC and Clang already do this as part of the
diagnostic.
- * The error message from the compiler.
+ * The exact error message from the compiler.
-If a package produces these error messages, but the package is fine, document
-this in the package Makefile, like this:
+If a package produces these error messages, but the package is fine, record
+this in your local mk.conf, like this, to skip this check in the next builds:
+.if ${PKGPATH} == category/package
# Version ${VERSION} failed on ${MACHINE_PLATFORM}:
# error message
# code
-# reason why the code does not need to be fixed
+# Reason why the code does not need to be fixed.
BUILDLINK_TRANSFORM+= rm:-Werror=char-subscripts
+.endif
If the error messages from the compiler are valid and the code needs to be
-fixed, prepare a patch for a single source file, or if it's a one-liner fix,
-add a SUBST block to the package Makefile. In any case, report it to the
-upstream authors of the package.
+fixed, prepare a local patch (see LOCALPATCHES) and report the bug to the
+upstream authors of the package, providing them with the information you
+collected above.
-8.4.4. Use custom directories
+Patches that are not essential for the package to work should only be reported
+upstream but not committed to pkgsrc, to make future updates easier.
+
+8.4.3. Use custom directories
Some directories like PREFIX, VARBASE, PKG_SYSCONFDIR, PKGMANDIR, PKG_INFODIR
can be configured in pkgsrc. Set these to arbitrary paths during bootstrap or
@@ -1963,7 +1938,7 @@ VARBASE= /a-random-uuid
PKGMANDIR= a-random-uuid
PKG_INFODIR= a-random-uuid
-8.4.5. Turn warnings into errors
+8.4.4. Turn warnings into errors
When building a package, warnings are typically ignored since they just flow by
and do not cause the build to fail immediately. To find these warnings,
@@ -1975,18 +1950,18 @@ WARNING_MSG= ${FAIL_MSG} "(wa
(There are many more classes of warnings in pkgsrc, and most of them can be
redefined with a simple definition like above.
-If a package suggest to add USE_TOOLS+=perl to the package Makefile, research
+If a package suggests to add USE_TOOLS+=perl to the package Makefile, research
whether the package actually needs Perl. If it does, add USE_TOOLS+=perl to the
package Makefile, and if it doesn't, add TOOLS_BROKEN+=perl.
-8.4.6. Reject packages for which pkglint reports errors
+8.4.5. Reject packages for which pkglint reports errors
Using pkglint as part of the regular build process is mostly a waste of time.
If you want to fix some of the warnings, just run pkglint recursively on the
whole pkgsrc tree. This will take a few minutes (up to 10), which is much
faster than a complete bulk build.
-8.4.7. Reject packages that contain forbidden strings
+8.4.6. Reject packages that contain forbidden strings
To ensure that the binary packages don't contain references to the build
directory, there is already CHECK_WRKREF. If that variable includes the item
@@ -2001,7 +1976,7 @@ CHECK_WRKREF_EXTRA_DIRS+= @[A-Z][A
The above patterns will probably generate many false positives, therefore the
results need to be taken with a grain of salt.
-8.4.8. Reject packages whose self-test fails
+8.4.7. Reject packages whose self-test fails
To run the test suites that come with each package, add this line to mk.conf.
@@ -2012,7 +1987,7 @@ build with this, it will often abort in
scanned for their dependencies since there are cyclic dependencies. There is
still a lot to do in this area.
-8.4.9. Reject packages that use undefined shell variables
+8.4.8. Reject packages that use undefined shell variables
To catch typos in the shell snippets from the Makefile fragments, add the -u
flag to most of the commands by adding this line to mk.conf.
@@ -2021,7 +1996,7 @@ RUN= @set -eu;
See mk/misc/common.mk for the existing definition.
-8.4.10. Turn off verbose logging
+8.4.9. Turn off verbose logging
The build logs of a package are often quite long. This allows error messages or
other interesting details to hide between the noise. To make the actual error
@@ -2033,48 +2008,6 @@ MAKE_FLAGS+= -s
The -s option works for both GNU Make and BSD Make. On exotic platforms with
their own make, it may be a little different.
-8.4.11. Select random sets of options
-
-Most bulk builds run with the default package options. This means that other
-combinations of options are not regularly tested. To do this, run a bulk build
-with these configurations.
-
- * no options enabled
-
- * all options enabled
-
- * 2n + 0
-
- * 2n + 1
-
- * 4n + 0..1
-
- * 4n + 2..3
-
- * 8n + 0..3
-
- * 8n + 4..7
-
- * 2048n + 0..1023
-
- * 2048n + 1024..2047
-
-Open questions are:
-
- * how to collect all options from the entire pkgsrc
-
- * how to handle mutually exclusive options
-
- * the sets of mutually exclusive options are defined per-package
-
- * the sets of nonempty sets are defined per-package
-
-8.4.12. Select random configurations of BUILD_DEFS
-
-Just like the PKG_OPTIONS, the BUILD_DEFS also allow different variants of
-pkgsrc to be created. The same ideas as in Section 8.4.11, "Select random sets
-of options" apply.
-
8.5. Creating a multiple CD-ROM packages collection
After your pkgsrc bulk-build has completed, you may wish to create a CD-ROM set
Home |
Main Index |
Thread Index |
Old Index