diff options
Diffstat (limited to 'doc/pkgsrc.html')
-rw-r--r-- | doc/pkgsrc.html | 358 |
1 files changed, 212 insertions, 146 deletions
diff --git a/doc/pkgsrc.html b/doc/pkgsrc.html index 895db5ee925..bf6df613aae 100644 --- a/doc/pkgsrc.html +++ b/doc/pkgsrc.html @@ -186,8 +186,11 @@ <dt><span class="sect1"><a href="#components.distinfo">10.2. <code class="filename">distinfo</code></a></span></dt> <dt><span class="sect1"><a href="#components.patches">10.3. patches/*</a></span></dt> <dd><dl> -<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.1. Patching guidelines</a></span></dt> -<dt><span class="sect2"><a href="#components.patches.feedback">10.3.2. Feedback to the author</a></span></dt> +<dt><span class="sect2"><a href="#components.patch.structure">10.3.1. Structure of a single patch file</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.caveats">10.3.2. Creating patch files</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.sources">10.3.3. Sources where the patch files come from</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.4. Patching guidelines</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.feedback">10.3.5. Feedback to the author</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#other-mandatory-files">10.4. Other mandatory files</a></span></dt> <dt><span class="sect1"><a href="#components.optional">10.5. Optional files</a></span></dt> @@ -444,7 +447,7 @@ <dt><span class="sect1"><a href="#ftp-misc">C.4. <code class="filename">misc</code>: Miscellaneous things</a></span></dt> <dt><span class="sect1"><a href="#ftp-packages">C.5. <code class="filename">packages*</code>: Binary packages</a></span></dt> <dt><span class="sect1"><a href="#ftp-source">C.6. <code class="filename">current</code>, -<code class="filename">200<em class="replaceable"><code>x</code></em>Q<em class="replaceable"><code>y</code></em></code>: +<code class="filename">pkgsrc-200<em class="replaceable"><code>x</code></em>Q<em class="replaceable"><code>y</code></em></code>: source packages</a></span></dt> </dl></dd> <dt><span class="appendix"><a href="#editing">D. Editing guidelines for the pkgsrc guide</a></span></dt> @@ -649,7 +652,7 @@ minutes!</p> <a href="#users-guide" title="Part I. The pkgsrc user's guide">The pkgsrc user's guide</a>, describes how one can use one of the packages in the Package Collection, either by installing a precompiled binary package, - or by building one's own copy using the NetBSD package system. + or by building one's own copy using the NetBSD package system. The second part, <a href="#developers-guide" title="Part II. The pkgsrc developer's guide">The pkgsrc developer's guide</a>, explains how to prepare a package so it can be easily built by other NetBSD users without knowing about the package's building details. The third part, @@ -898,7 +901,7 @@ and dashes.</p> quarterly basis from the current branch and only gets modified for security updates. The names of the stable branches are built from the year and the quarter, for example - <code class="literal">2006Q1</code>.</p> + <code class="literal">2006Q3</code>.</p> <p>The second step is to decide <span class="emphasis"><em>how</em></span> you want to download pkgsrc. You can get it as a tar file, via SUP, or via CVS. All three ways are described here.</p> @@ -912,8 +915,8 @@ and dashes.</p> <p>The tar file for the current branch is in the directory <code class="filename">current</code> and is called <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc.tar.gz" target="_top"><code class="filename">pkgsrc.tar.gz</code></a>. It is autogenerated daily.</p> -<p>The tar file for the stable branch 2006Q1 is in the - directory <code class="filename">2006Q1</code> and is also called <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/2006Q1/pkgsrc.tar.gz" target="_top"><code class="filename">pkgsrc.tar.gz</code></a>.</p> +<p>The tar file for the stable branch 2006Q3 is in the + directory <code class="filename">pkgsrc-2006Q3</code> and is also called <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/pkgsrc-2006Q3/pkgsrc-2006Q3.tar.gz" target="_top"><code class="filename">pkgsrc-2006Q3.tar.gz</code></a>.</p> <p>After downloading the tar file, change to the directory where you want to have pkgsrc. This is usually <code class="filename">/usr</code>. Then, run <span><strong class="command">gzcat @@ -960,7 +963,7 @@ and dashes.</p> <code class="filename">/usr</code>. In that directory you run the checkout command, which is <span><strong class="command">cvs -q checkout -P pkgsrc</strong></span> for the current branch and <span><strong class="command">cvs -q - checkout -rpkgsrc-2006Q1 -P pkgsrc</strong></span> for the stable + checkout -rpkgsrc-2006Q3 -P pkgsrc</strong></span> for the stable branch. This command will create a directory called <code class="filename">pkgsrc</code> with all the pkgsrc files in it.</p> @@ -1013,7 +1016,7 @@ and dashes.</p> by adding the option “<span class="quote">-A</span>” after the “<span class="quote">update</span>” keyword. To switch from the current branch back to the stable branch, add the - “<span class="quote">-rpkgsrc-2006Q1</span>” option.</p> + “<span class="quote">-rpkgsrc-2006Q3</span>” option.</p> </div> <div class="sect3" lang="en"> <div class="titlepage"><div><div><h4 class="title"> @@ -1166,9 +1169,9 @@ directory on ftp.NetBSD.org.</p> </tr> <tr> <td class="osname">Interix 3.5</td> -<td class="date">20051010</td> -<td class="kit-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/bootstrap-pkgsrc/bootstrap-pkgsrc-Interix-3.5-i386-20051010.tar.gz" target="_top">binary kit</a></td> -<td class="binary-pkgs-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/Interix-3.5/i386/current/" target="_top">binary packages</a></td> +<td class="date">20061106</td> +<td class="kit-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/bootstrap-pkgsrc/bootstrap-pkgsrc-Interix-3.5-i386-20061106.tar.gz" target="_top">binary kit</a></td> +<td class="binary-pkgs-url"> </td> </tr> <tr> <td class="osname">IRIX 6.5 n32-bit ABI</td> @@ -1196,7 +1199,7 @@ directory on ftp.NetBSD.org.</p> </tr> <tr> <td class="osname">OpenBSD 3.5/i386</td> -<td class="date">20040507</td> +<td class="date">20040703</td> <td class="kit-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/bootstrap-pkgsrc/bootstrap-pkgsrc-OpenBSD-3.5-i386-20040703.tar.gz" target="_top">binary kit</a></td> <td class="binary-pkgs-url"> </td> </tr> @@ -1208,7 +1211,7 @@ directory on ftp.NetBSD.org.</p> </tr> <tr> <td class="osname">Slackware Linux 9/i386</td> -<td class="date">20031023</td> +<td class="date">20040703</td> <td class="kit-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/bootstrap-pkgsrc/bootstrap-pkgsrc-Linux-2.4.22-i386-slackware9-20040703.tar.gz" target="_top">binary kit</a></td> <td class="binary-pkgs-url"> </td> </tr> @@ -1226,9 +1229,9 @@ directory on ftp.NetBSD.org.</p> </tr> <tr> <td class="osname">Solaris 9/sparc</td> -<td class="date">20041208</td> -<td class="kit-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/bootstrap-pkgsrc/bootstrap-pkgsrc-SunOS-5.9-sparc-20041208.tar.gz" target="_top">binary kit</a></td> -<td class="binary-pkgs-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/SunOS-5.9/sparc/" target="_top">binary packages</a></td> +<td class="date">20060713</td> +<td class="kit-url"><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/bootstrap-pkgsrc/bootstrap-pkgsrc-SunOS-5.9-sparc-pkgsrc-2006Q2.tar.gz" target="_top">binary kit</a></td> +<td class="binary-pkgs-url"> </td> </tr> <tr> <td class="osname">Solaris 9/i386</td> @@ -1395,9 +1398,12 @@ file and inspect the contents before extracting it. available with Cygwin. It is part of the Windows Services for Unix package, available for free for any licensed copy of Windows 2000, XP (not including XP Home), or 2003. SFU can be downloaded from <a href="http://www.microsoft.com/windows/sfu/" target="_top">http://www.microsoft.com/windows/sfu/</a>.</p> -<p>Services for Unix 3.5, current as of this writing, has been tested. 3.0 - or 3.1 may work, but are not officially supported. (The main difference - in 3.0/3.1 is lack of pthreads.)</p> +<p>Services for Unix 3.5 has been tested. 3.0 or 3.1 may work, but + are not officially supported. (The main difference in 3.0/3.1 is lack + of pthreads, but other parts of libc may also be lacking.)</p> +<p>Services for Unix Applications (aka SUA) is an integrated component + of Windows Server 2003 R2 and Windows Vista. As of this writing, SUA's + Interix 5.x subsystem not been tested with pkgsrc.</p> <div class="sect3" lang="en"> <div class="titlepage"><div><div><h4 class="title"> <a name="platform.interix-sfu-install"></a>3.3.3.1. When installing Interix/SFU</h4></div></div></div> @@ -1428,6 +1434,16 @@ file and inspect the contents before extracting it. must be installed. Hotfixes are available from Microsoft through a support contract; however, a NetBSD developer has made most Interix hotfixes available for personal use from <a href="http://www.duh.org/interix/hotfixes.php" target="_top">http://www.duh.org/interix/hotfixes.php</a>.</p> +<p>In addition to the hotfix noted above, it may be necessary to + disable Data Execution Prevention entirely to make Interix functional. + This may happen only with certain types of CPUs; the cause is not fully + understood at this time. If gcc or other applications still segfault + repeatedly after installing one of the hotfixes note above, the + following option can be added to the appropriate "boot.ini" line on the + Windows boot drive: /NoExecute=AlwaysOff + (WARNING, this will disable DEP completely, which may be a security + risk if applications are often run as a user in the Administrators + group!)</p> </div> <div class="sect3" lang="en"> <div class="titlepage"><div><div><h4 class="title"> @@ -1493,11 +1509,6 @@ file and inspect the contents before extracting it. <a href="http://www.interopsystems.com/InteropXserver.htm" target="_top">Interop X Server</a>), and the free X11 server included with <a href="http://x.cygwin.com/" target="_top">Cygwin</a>.</p> -<p>Also, StarNet Communications has graciously provided a free - version of their X-Win32 product that accepts connections only - from localhost: - <a href="http://www.starnet.com/xwin32LX/get_xwin32LX.htm" target="_top">X-Win32 LX</a>, - recommended by the maintainer of Interix pkgsrc support.</p> </li> <li> <p><span class="strong"><strong>X11 acceleration:</strong></span></p> @@ -1596,7 +1607,7 @@ file and inspect the contents before extracting it. bootstrap should create an appropriate <code class="filename">mk.conf.example</code> by default.</p> <p>If you have both the MIPSPro compiler chain installed as well as gcc, - but want to make sure that MIPRPro is used, please set your <code class="varname">PATH</code> + but want to make sure that MIPSPro is used, please set your <code class="varname">PATH</code> to <span class="emphasis"><em>not</em></span> include the location of gcc (often <code class="filename">/usr/freeware/bin</code>), and (important) pass the '--preserve-path' flag.</p> @@ -1721,7 +1732,7 @@ file and inspect the contents before extracting it. then either build gcc from <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/lang/gcc/README.html" target="_top"><code class="filename">lang/gcc</code></a> or install a binary gcc package, then remove gcc used during bootstrapping.</p> -<p>Binary packages of gcc can be found through <a href="http://www.sun.com/bigadmin/common/freewareSearch.html" target="_top">http://www.sun.com/bigadmin/common/freewareSearch.html</a>.</p> +<p>Binary packages of gcc can be found through <a href="http://www.sunfreeware.com/" target="_top">http://www.sunfreeware.com/</a>.</p> </div> <div class="sect3" lang="en"> <div class="titlepage"><div><div><h4 class="title"> @@ -1749,7 +1760,7 @@ file and inspect the contents before extracting it. </div> <div class="sect3" lang="en"> <div class="titlepage"><div><div><h4 class="title"> -<a name="solaris-sunpro-64"></a>3.3.7.3. Buildling 64-bit binaries with SunPro</h4></div></div></div> +<a name="solaris-sunpro-64"></a>3.3.7.3. Building 64-bit binaries with SunPro</h4></div></div></div> <p>Building 64-bit binaries is a little trickier. First, you need to bootstrap pkgsrc in 64-bit mode. One problem here is that while building one of the programs in the bootstrap kit @@ -2008,13 +2019,13 @@ and you can still use binary packages from someone else.</p> FTP site at <a 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 <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>, 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 + 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 the list of vulnerabilities from the NetBSD FTP site. The second @@ -2036,7 +2047,7 @@ and you can still use binary packages from someone else.</p> <div class="titlepage"><div><div><h3 class="title"> <a name="pkg_versions"></a>4.1.6. Finding if newer versions of your installed packages are in pkgsrc</h3></div></div></div> <p> - Install <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a> and run + Install <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a> and run <span><strong class="command">lintpkgsrc</strong></span> with the “<span class="quote">-i</span>” argument to check if your packages are up-to-date, e.g. </p> @@ -2137,7 +2148,7 @@ Version mismatch: 'tcsh' 6.09.00 vs 6.10.00 and adding the definitions there.</p> <p> If a package depends on many other packages (such as - <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/kde3/README.html" target="_top"><code class="filename">meta-pkgs/kde3</code></a>), the build process may + <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/meta-pkgs/kde3/README.html" target="_top"><code class="filename">meta-pkgs/kde3</code></a>), the build process may alternate between periods of downloading source, and compiling. To ensure you have all the source downloaded initially you can run the command: @@ -2352,7 +2363,10 @@ works.</p> and <code class="filename">ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/</code>.</p></li> <li><p><code class="varname">BINPKG_SITES</code>: - List of sites carrying binary pkgs.</p></li> + List of sites carrying binary pkgs. <em class="replaceable"><code>rel</code></em> and + <em class="replaceable"><code>arch</code></em> are replaced with OS + 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 @@ -2383,10 +2397,7 @@ works.</p> <li><p><code class="varname">LOCALPATCHES</code>: Directory for local patches that aren't part of pkgsrc. See <a href="#components.patches" title="10.3. patches/*">Section 10.3, “patches/*”</a> for more - information. <em class="replaceable"><code>rel</code></em> and - <em class="replaceable"><code>arch</code></em> are replaced with OS - release (“<span class="quote">2.0</span>”, etc.) and architecture - (“<span class="quote">mipsel</span>”, etc.).</p></li> + information.</p></li> <li><p><code class="varname">PKGMAKECONF</code>: Location of the <code class="filename">mk.conf</code> file used by a package's BSD-style Makefile. If this is not set, @@ -2649,7 +2660,8 @@ PKG_OPTIONS.apache= suexec </pre> <a name="binary.configuration"></a>6.3.1. Configuration</h3></div></div></div> <div class="sect3" lang="en"> <div class="titlepage"><div><div><h4 class="title"> -<a name="binary.bulk.build.conf"></a>6.3.1.1. <code class="filename">build.conf</code></h4></div></div></div> +<a name="binary.bulk.build.conf"></a>6.3.1.1. <code class="filename">build.conf</code> +</h4></div></div></div> <p>The <code class="filename">build.conf</code> file is the main configuration file for bulk builds. You can configure how your copy of pkgsrc is kept up to date, how the distfiles are @@ -2709,11 +2721,11 @@ PKG_OPTIONS.apache= suexec </pre> build system from even trying to build them, so possible building errors would not show up.</p></li> <li><p><code class="varname">CHECK_FILES</code> - (<code class="filename">pkgsrc/mk/bsd.pkg.check.mk</code>) can be set to + (<code class="filename">pkgsrc/mk/check/check-files.mk</code>) can be set to “<span class="quote">yes</span>” to check that the installed set of files matches the <code class="filename">PLIST</code>.</p></li> <li><p><code class="varname">CHECK_INTERPRETER</code> - (<code class="filename">pkgsrc/mk/bsd.pkg.check.mk</code>) can be set to + (<code class="filename">pkgsrc/mk/check/check-interpreter.mk</code>) can be set to “<span class="quote">yes</span>” to check that the installed “<span class="quote">#!</span>”-scripts will find their interpreter.</p></li> @@ -2730,7 +2742,8 @@ PKG_OPTIONS.apache= suexec </pre> </div> <div class="sect3" lang="en"> <div class="titlepage"><div><div><h4 class="title"> -<a name="pre-build.local"></a>6.3.1.3. <code class="filename">pre-build.local</code></h4></div></div></div> +<a name="pre-build.local"></a>6.3.1.3. <code class="filename">pre-build.local</code> +</h4></div></div></div> <p>It is possible to configure the bulk build to perform certain site-specific tasks at the end of the pre-build stage. If the file @@ -2972,17 +2985,17 @@ PKG_OPTIONS.apache= suexec </pre> <p>Then, make sure that you have <code class="varname">RSYNC_DST</code> set properly in your <code class="filename">mk/bulk/build.conf</code> file, i.e. adjust it to something like one of the following:</p> -<pre class="screen">RSYNC_DST=ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload </pre> -<p>Please use appropriate values for "pkgsrc-200xQy", +<pre class="screen">RSYNC_DST=ftp.NetBSD.org:/pub/NetBSD/packages/packages-200xQy/NetBSD-a.b.c/arch/upload </pre> +<p>Please use appropriate values for "packages-200xQy", "NetBSD-a.b.c" and "arch" here. If your login on ftp.NetBSD.org is different from your local login, write your login directly into the variable, e.g. my local account is "feyrer", but for my login "hubertf", I use:</p> -<pre class="screen">RSYNC_DST=hubertf@ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload</pre> +<pre class="screen">RSYNC_DST=hubertf@ftp.NetBSD.org:/pub/NetBSD/packages/packages-200xQy/NetBSD-a.b.c/arch/upload</pre> <p>A separate <code class="filename">upload</code> directory is used here to allow "closing" the directory during upload. To do so, run the following command on ftp.NetBSD.org next:</p> -<pre class="screen">nbftp% <strong class="userinput"><code>mkdir -p -m 750 /pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch/upload</code></strong></pre> +<pre class="screen">nbftp% <strong class="userinput"><code>mkdir -p -m 750 /pub/NetBSD/packages/packages-200xQy/NetBSD-a.b.c/arch/upload</code></strong></pre> <p>Please note that <code class="filename">/pub/NetBSD/packages</code> is only appropriate for packages for the NetBSD operating system. Binary packages for other operating systems should go @@ -3024,7 +3037,7 @@ chroot-<code class="prompt">#</code> <strong class="userinput"><code>exit</code> <code class="filename">upload</code> directory to have them accessible to everyone:</p> <pre class="screen"> -nbftp% <strong class="userinput"><code>cd /pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/arch</code></strong> +nbftp% <strong class="userinput"><code>cd /pub/NetBSD/packages/packages-200xQy/NetBSD-a.b.c/arch</code></strong> nbftp% <strong class="userinput"><code>mv upload/* .</code></strong> nbftp% <strong class="userinput"><code>rmdir upload</code></strong> nbftp% <strong class="userinput"><code>chmod 755 .</code></strong> @@ -3102,7 +3115,7 @@ are:</p> LOCALBASE= /usr/pkg PKG_SYSCONFBASE= /usr/pkg/etc VARBASE= /var - PKGDBDIR= /var/db/pkg + PKG_DBDIR= /var/db/pkg </pre> <p>In unprivileged mode (when pkgsrc has been installed as any other user), the default locations are:</p> @@ -3110,7 +3123,7 @@ user), the default locations are:</p> LOCALBASE= ${HOME}/pkg PKG_SYSCONFBASE= ${HOME}/pkg/etc VARBASE= ${HOME}/pkg/var - PKGDBDIR= ${HOME}/pkg/var/db/pkg + PKG_DBDIR= ${HOME}/pkg/var/db/pkg </pre> <p>What these four directories are for, and what they look like is explained below.</p> @@ -3133,7 +3146,8 @@ itself.</p></li> </ul></div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="files.localbase"></a>7.1. File system layout in <code class="literal">${LOCALBASE}</code></h2></div></div></div> +<a name="files.localbase"></a>7.1. File system layout in <code class="literal">${LOCALBASE}</code> +</h2></div></div></div> <p>The following directories exist in a typical pkgsrc installation in <code class="filename">${LOCALBASE}</code>.</p> <div class="variablelist"><dl> @@ -3198,7 +3212,8 @@ installation.</p></dd> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="files.varbase"></a>7.2. File system layout in <code class="literal">${VARBASE}</code></h2></div></div></div> +<a name="files.varbase"></a>7.2. File system layout in <code class="literal">${VARBASE}</code> +</h2></div></div></div> <div class="variablelist"><dl> <dt><span class="term"><code class="filename">db/pkg</code> (the usual location of <code class="filename">${PKG_DBDIR}</code>)</span></dt> @@ -3378,7 +3393,7 @@ them by setting <code class="varname">UNPRIVILEGED_USER</code> and <span><strong class="command">bootstrap</strong></span> script will ease non-root configuration when given the “<span class="quote">--ignore-user-check</span>” flag, as it will choose and use multiple default directories under <code class="filename">~/pkg</code> as the -installation targets. These directories can be overriden by the +installation targets. These directories can be overridden by the “<span class="quote">--prefix</span>” flag provided by the script, as well as some others that allow finer tuning of the tree layout.</p> </div> @@ -3684,8 +3699,11 @@ anymore, you can remove that file and run <span><strong class="command">cvs -q u <dt><span class="sect1"><a href="#components.distinfo">10.2. <code class="filename">distinfo</code></a></span></dt> <dt><span class="sect1"><a href="#components.patches">10.3. patches/*</a></span></dt> <dd><dl> -<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.1. Patching guidelines</a></span></dt> -<dt><span class="sect2"><a href="#components.patches.feedback">10.3.2. Feedback to the author</a></span></dt> +<dt><span class="sect2"><a href="#components.patch.structure">10.3.1. Structure of a single patch file</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.caveats">10.3.2. Creating patch files</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.sources">10.3.3. Sources where the patch files come from</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.4. Patching guidelines</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.feedback">10.3.5. Feedback to the author</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#other-mandatory-files">10.4. Other mandatory files</a></span></dt> <dt><span class="sect1"><a href="#components.optional">10.5. Optional files</a></span></dt> @@ -4225,8 +4243,11 @@ everything worked.</p> <dt><span class="sect1"><a href="#components.distinfo">10.2. <code class="filename">distinfo</code></a></span></dt> <dt><span class="sect1"><a href="#components.patches">10.3. patches/*</a></span></dt> <dd><dl> -<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.1. Patching guidelines</a></span></dt> -<dt><span class="sect2"><a href="#components.patches.feedback">10.3.2. Feedback to the author</a></span></dt> +<dt><span class="sect2"><a href="#components.patch.structure">10.3.1. Structure of a single patch file</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.caveats">10.3.2. Creating patch files</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.sources">10.3.3. Sources where the patch files come from</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.guidelines">10.3.4. Patching guidelines</a></span></dt> +<dt><span class="sect2"><a href="#components.patches.feedback">10.3.5. Feedback to the author</a></span></dt> </dl></dd> <dt><span class="sect1"><a href="#other-mandatory-files">10.4. Other mandatory files</a></span></dt> <dt><span class="sect1"><a href="#components.optional">10.5. Optional files</a></span></dt> @@ -4244,7 +4265,8 @@ files involved which are described in the following sections.</p> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="components.Makefile"></a>10.1. <code class="filename">Makefile</code></h2></div></div></div> +<a name="components.Makefile"></a>10.1. <code class="filename">Makefile</code> +</h2></div></div></div> <p>Building, installation and creation of a binary package are all controlled by the package's <code class="filename">Makefile</code>. The <code class="filename">Makefile</code> describes various things about @@ -4382,7 +4404,8 @@ sections.</p> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="components.distinfo"></a>10.2. <code class="filename">distinfo</code></h2></div></div></div> +<a name="components.distinfo"></a>10.2. <code class="filename">distinfo</code> +</h2></div></div></div> <p>The <code class="filename">distinfo</code> file contains the message digest, or checksum, of each distfile needed for the package. This ensures that the distfiles retrieved from the Internet have not been @@ -4405,29 +4428,55 @@ sections.</p> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="components.patches"></a>10.3. patches/*</h2></div></div></div> -<p>This directory contains files that are used by the - <a href="http://netbsd.gw.com/cgi-bin/man-cgi?patch+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">patch</span>(1)</span></a> command to - modify the sources as distributed in the distribution file into a form - that will compile and run perfectly on NetBSD. The files are applied - successively in alphabetic order (as returned by a shell - “<span class="quote">patches/patch-*</span>” glob expansion), so - <code class="filename">patch-aa</code> is applied before +<p>Many packages still don't work out-of-the box on the various + platforms that are supported by pkgsrc. Therefore, a number of custom + patch files are needed to make the package work. These patch files are + found in the <code class="filename">patches/</code> directory.</p> +<p>In the <span class="emphasis"><em>patch</em></span> phase, these patches are + applied to the files in <code class="varname">WRKSRC</code> directory after + extracting them, in <a href="http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_03" target="_top">alphabetic + order</a>, so <code class="filename">patch-aa</code> is applied before <code class="filename">patch-ab</code>, etc.</p> +<div class="sect2" lang="en"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="components.patch.structure"></a>10.3.1. Structure of a single patch file</h3></div></div></div> <p>The <code class="filename">patch-*</code> files should be in <span><strong class="command">diff -bu</strong></span> format, and apply without a fuzz to avoid - problems. (To force patches to apply - with fuzz you can set <code class="varname">PATCH_FUZZ_FACTOR=-F2</code>). - Furthermore, do not put changes for more than one file into a single - patch file, as this will make future modifications more difficult.</p> -<p>Similar, a file should be patched at most once, not several times by - several different patches. If a file needs several patches, they should - be combined into one file.</p> -<p>One important thing to mention is to pay attention that no RCS IDs - get stored in the patch files, as these will cause problems when + problems. (To force patches to apply with fuzz you can set + <code class="varname">PATCH_FUZZ_FACTOR=-F2</code>). Furthermore, each patch + should contain only changed for a single file, and no file should be + patched by more than one patch file. This helps to keep future + modifications simple.</p> +<p>Each patch file is structured as follows: In the first line, + there is the RCS Id of the patch itself. The second line should be + empty for aesthetic reasons. After that, there should be a comment for + each change that the patch does. There are a number of standard + cases:</p> +<div class="itemizedlist"><ul type="disc"> +<li><p>Patches that replace the <code class="literal">==</code> + operator for <a href="http://netbsd.gw.com/cgi-bin/man-cgi?test+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">test</span>(1)</span></a> with <code class="literal">=</code> in shell scripts + should contain a reference to , to avoid + redundant explanations.</p></li> +<li><p>Patches for commonly known vulnerabilities should + mention the vulnerability ID (CAN, CVE).</p></li> +<li><p>Patches that change source code should mention the + platform and other environment (for example, the compiler) that the + patch is needed for.</p></li> +</ul></div> +<p>In all other cases, the patch should be commented so that any + developer who knows the code of the application can make some use of + the patch. Special care should be taken for the upstream developers, + since we generally want that they accept our patches, so we have less + work in the future.</p> +</div> +<div class="sect2" lang="en"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="components.patches.caveats"></a>10.3.2. Creating patch files</h3></div></div></div> +<p>One important thing to mention is to pay attention that no RCS + IDs get stored in the patch files, as these will cause problems when later checked into the NetBSD CVS tree. Use the - <span><strong class="command">pkgdiff</strong></span> from the - <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/README.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a> package to avoid - these problems.</p> + <span><strong class="command">pkgdiff</strong></span> command from the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/README.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a> package to avoid these + problems.</p> <p>For even more automation, we recommend using <span><strong class="command">mkpatches</strong></span> from the same package to make a whole set of patches. You just have to backup files before you @@ -4448,13 +4497,17 @@ sections.</p> maintainer. This benefits non-pkgsrc users of the package, and usually makes it possible to remove the patch in future version.</p> +</div> +<div class="sect2" lang="en"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="components.patches.sources"></a>10.3.3. Sources where the patch files come from</h3></div></div></div> <p>If you want to share patches between multiple packages in pkgsrc, e.g. because they use the same distfiles, set <code class="varname">PATCHDIR</code> to the path where the patch files can be found, e.g.:</p> <pre class="programlisting"> PATCHDIR= ${.CURDIR}/../xemacs/patches - </pre> +</pre> <p>Patch files that are distributed by the author or other maintainers can be listed in <code class="varname">PATCHFILES</code>.</p> @@ -4471,9 +4524,10 @@ sections.</p> files in the named directory are expected to be patch files, and <span class="emphasis"><em>they are applied after pkgsrc patches are applied</em></span>.</p> +</div> <div class="sect2" lang="en"> <div class="titlepage"><div><div><h3 class="title"> -<a name="components.patches.guidelines"></a>10.3.1. Patching guidelines</h3></div></div></div> +<a name="components.patches.guidelines"></a>10.3.4. Patching guidelines</h3></div></div></div> <p>When fixing a portability issue in the code do not use preprocessor magic to check for the current operating system nor platform. Doing so hurts portability to other platforms because @@ -4575,7 +4629,7 @@ sections.</p> </div> <div class="sect2" lang="en"> <div class="titlepage"><div><div><h3 class="title"> -<a name="components.patches.feedback"></a>10.3.2. Feedback to the author</h3></div></div></div> +<a name="components.patches.feedback"></a>10.3.5. Feedback to the author</h3></div></div></div> <p>Always, always, <span class="strong"><strong>always</strong></span> feed back any <span class="emphasis"><em>portability fixes</em></span> or improvements you do to a package to the mainstream developers. @@ -4583,8 +4637,8 @@ sections.</p> and to ensure that future versions can be built out-of-the box on NetBSD. Furthermore, any user that gets newer distfiles will get the fixes straight from the packaged code.</p> -<p>This generally involves cleaning up the patches as described - in the following section (because sometimes the patches that are +<p>This generally involves cleaning up the patches + (because sometimes the patches that are added to pkgsrc are quick hacks), filling bug reports in the appropriate trackers for the projects and working with the mainstream authors to accept your changes. It is @@ -4711,7 +4765,8 @@ sections.</p> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="work-dir"></a>10.6. <code class="filename">work*</code></h2></div></div></div> +<a name="work-dir"></a>10.6. <code class="filename">work*</code> +</h2></div></div></div> <p>When you type <span><strong class="command">make</strong></span>, the distribution files are unpacked into the directory denoted by <code class="varname">WRKDIR</code>. It can be removed by running @@ -4724,7 +4779,8 @@ sections.</p> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="files-dir"></a>10.7. <code class="filename">files/*</code></h2></div></div></div> +<a name="files-dir"></a>10.7. <code class="filename">files/*</code> +</h2></div></div></div> <p>If you have any files that you wish to be placed in the package prior to configuration or building, you could place these files here and use a <span><strong class="command">${CP}</strong></span> command in the @@ -5076,7 +5132,8 @@ sections.</p> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="print-PLIST"></a>12.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span></h2></div></div></div> +<a name="print-PLIST"></a>12.3. Tweaking output of <span><strong class="command">make print-PLIST</strong></span> +</h2></div></div></div> <p>If you have used any of the *-dirs packages, as explained in <a href="#faq.common-dirs" title="12.8. Sharing directories between packages">Section 12.8, “Sharing directories between packages”</a>, you may have noticed that <span><strong class="command">make print-PLIST</strong></span> outputs a set of @@ -5172,7 +5229,8 @@ sections.</p> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="using-PLIST_SRC"></a>12.6. Changing PLIST source with <code class="varname">PLIST_SRC</code></h2></div></div></div> +<a name="using-PLIST_SRC"></a>12.6. Changing PLIST source with <code class="varname">PLIST_SRC</code> +</h2></div></div></div> <p>To use one or more files as source for the <code class="filename">PLIST</code> used in generating the binary package, set the variable <code class="varname">PLIST_SRC</code> to the names of that file(s). @@ -5354,7 +5412,7 @@ sections.</p> variables that may be used by packages that use the Open Sound System (OSS) API.</p></li> <li><p><code class="filename">pgsql.buildlink3.mk</code> will accept - either Postgres 7.4, 8.0, or 8.1, whichever is found installed. See + either Postgres 8.0, 8.1, or 8.2, whichever is found installed. See the file for more information.</p></li> <li><p><code class="filename">pthread.buildlink3.mk</code> uses the value of <code class="varname">PTHREAD_OPTS</code> and checks for native pthreads or adds @@ -6056,7 +6114,7 @@ not specified.</p> <pre class="programlisting"> group </pre> -<p>The numeric GID of the group may be set by defining +<p>The numeric GID of the group may be set by defining <code class="varname">PKG_GID.<em class="replaceable"><code>group</code></em></code>.</p> <p>If a package needs to create the users and groups at an earlier stage, then it can set <code class="varname">USERGROUP_PHASE</code> to @@ -6143,7 +6201,8 @@ This variable should be set in <code class="filename">/etc/mk.conf</code>.</p> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="converting-to-options"></a>15.2. Converting packages to use <code class="filename">bsd.options.mk</code></h2></div></div></div> +<a name="converting-to-options"></a>15.2. Converting packages to use <code class="filename">bsd.options.mk</code> +</h2></div></div></div> <p>The following example shows how <code class="filename">bsd.options.mk</code> should be used by the hypothetical ``wibble'' package, either in the package @@ -6476,7 +6535,7 @@ support.</span>” The file is sorted by option names.</p> package.</p></dd> <dt><span class="term"><code class="varname">WRKDIR</code></span></dt> <dd><p>This is an absolute pathname pointing to the directory - where all work takes place. The distfiles are extraced to this + where all work takes place. The distfiles are extracted to this directory. It also contains temporary directories and log files used by the various pkgsrc frameworks, like <span class="emphasis"><em>buildlink</em></span> or the <span class="emphasis"><em>wrappers</em></span>.</p></dd> @@ -6565,6 +6624,7 @@ support.</span>” The file is sorted by option names.</p> ${MASTER_SITE_DEBIAN} ${MASTER_SITE_FREEBSD} ${MASTER_SITE_FREEBSD_LOCAL} + ${MASTER_SITE_GENTOO} ${MASTER_SITE_GNOME} ${MASTER_SITE_GNU} ${MASTER_SITE_GNUSTEP} @@ -6586,8 +6646,8 @@ support.</span>” The file is sorted by option names.</p> </pre> <p>Some explanations for the less self-explaining ones: <code class="varname">MASTER_SITE_BACKUP</code> contains backup sites - for packages that are maintained in <a href="ftp://ftp.NetBSD.org:/pub/NetBSD/packages/distfiles/%24%7BDIST_SUBDIR%7D" target="_top">ftp://ftp.NetBSD.org:/pub/NetBSD/packages/distfiles/${DIST_SUBDIR}</a>. <code class="varname">MASTER_SITE_LOCAL</code> contains local - package source distributions that are maintained in <a href="ftp://ftp.NetBSD.org:/pub/NetBSD/packages/distfiles/LOCAL_PORTS/" target="_top">ftp://ftp.NetBSD.org:/pub/NetBSD/packages/distfiles/LOCAL_PORTS/</a>.</p> + for packages that are maintained in <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/%24%7BDIST_SUBDIR%7D" target="_top">ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/${DIST_SUBDIR}</a>. <code class="varname">MASTER_SITE_LOCAL</code> contains local + package source distributions that are maintained in <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/LOCAL_PORTS/" target="_top">ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/LOCAL_PORTS/</a>.</p> <p>If you choose one of these predefined sites, you may want to specify a subdirectory of that site. Since these macros may expand to more than one actual site, you @@ -6605,7 +6665,7 @@ support.</span>” The file is sorted by option names.</p> <a name="build.fetch.how"></a>16.5.2. How are the files fetched?</h3></div></div></div> <p>The <span class="emphasis"><em>fetch</em></span> phase makes sure that all the distfiles exist in a local directory - (<code class="varname">DISTDIR</code>), which can be set by the pkgsrc + (<code class="varname">DISTDIR</code>, which can be set by the pkgsrc user). If the files do not exist, they are fetched using commands of the form</p> <pre class="programlisting"> @@ -6647,7 +6707,7 @@ support.</span>” The file is sorted by option names.</p> <code class="varname">EXTRACT_ONLY</code> variable to the list of those files.</p> <p>Extracting the files is usually done by a little - program, <code class="filename">mk/scripts/extract</code>, which + program, <code class="filename">mk/extract/extract</code>, which already knows how to extract various archive formats, so most likely you will not need to change anything here. But if you need, the following variables may help you:</p> @@ -6655,10 +6715,11 @@ support.</span>” The file is sorted by option names.</p> <dt><span class="term"><code class="varname">EXTRACT_OPTS_{BIN,LHA,PAX,RAR,TAR,ZIP,ZOO}</code></span></dt> <dd><p>Use these variables to override the default options for an extract command, which are defined in - <code class="filename">mk/scripts/extract</code>.</p></dd> + <code class="filename">mk/extract/extract</code>.</p></dd> <dt><span class="term"><code class="varname">EXTRACT_USING</code></span></dt> <dd><p>This variable can be set to - <code class="literal">pax</code>, <code class="literal">tar</code> or an + <code class="literal">gtar</code>, <code class="literal">nbtar</code> (which is the + default value), <code class="literal">pax</code>, or an absolute pathname pointing to the command with which tar archives should be extracted.</p></dd> @@ -7107,7 +7168,7 @@ support.</span>” The file is sorted by option names.</p> <dd> <p>Update the installation of the current package. This differs from update in that it does not replace dependent - packages. You will need to install <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgsrc/pkgtools/pkg_tarup/README.html" target="_top"><code class="filename">pkgsrc/pkgtools/pkg_tarup</code></a> for this + packages. You will need to install <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_tarup/README.html" target="_top"><code class="filename">pkgtools/pkg_tarup</code></a> for this target to work.</p> <p><span class="emphasis"><em>Be careful when using this target!</em></span> There are no guarantees that dependent @@ -7445,7 +7506,8 @@ TOOLS_PLATFORM.true?= true # shell builtin </div> <div class="sect2" lang="en"> <div class="titlepage"><div><div><h3 class="title"> -<a name="pulling-vars-from-etc-mk.conf"></a>18.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code></h3></div></div></div> +<a name="pulling-vars-from-etc-mk.conf"></a>18.1.2. How to pull in user-settable variables from <code class="filename">mk.conf</code> +</h3></div></div></div> <p>The pkgsrc user can configure pkgsrc by overriding several variables in the file pointed to by <code class="varname">MAKECONF</code>, which is <code class="filename">/etc/mk.conf</code> by default. When you @@ -7589,7 +7651,7 @@ TOOLS_PLATFORM.true?= true # shell builtin <p><code class="varname">NO_BIN_ON_FTP</code></p> <p>Binaries may not be placed on an FTP server. Set this variable to <code class="varname">${RESTRICTED}</code> - whenever a binary package may not not be made available + whenever a binary package may not be made available on the Internet.</p> </li> <li> @@ -7694,7 +7756,7 @@ TOOLS_PLATFORM.true?= true # shell builtin against an earlier version of tiff.</p> <p>Please note that such dependencies should only be updated if a package requires a newer pre-requisite, but - not to denote recommendations such as + not to denote recommendations such as ABI changes that do not prevent a package from building correctly. Such recommendations can be expressed using <code class="varname">ABI_DEPENDS</code>:</p> @@ -7984,7 +8046,7 @@ TOOLS_PLATFORM.true?= true # shell builtin set <code class="varname">DIST_SUBDIR</code> to a unique directory name, usually based on <code class="varname">PKGNAME_NOREV</code>. All <code class="varname">DISTFILES</code> and - <code class="varname">PATCHFILES</code> for this package will be put in that + <code class="varname">PATCHFILES</code> for this package will be put in that subdirectory of the local distfiles directory. In case this happens more often, <code class="varname">PKGNAME</code> can be used (thus including the <code class="filename">nbX</code> suffix) or a date stamp @@ -8430,13 +8492,13 @@ TOOLS_PLATFORM.true?= true # shell builtin possibility. That compiler cannot handle the following code:</p> <pre class="programlisting"> extern int extern_func(int); - + static inline int inline_func(int x) { return extern_func(x); } - + int main(void) { return 0; @@ -8827,8 +8889,8 @@ of functions.</p> <div class="sect2" lang="en"> <div class="titlepage"><div><div><h3 class="title"> <a name="intltool"></a>18.6.14. Packages using intltool</h3></div></div></div> -<p>If a package uses intltool during its build, include the - <code class="filename">../../textproc/intltool/buildlink3.mk</code> file, +<p>If a package uses intltool during its build, add + <code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code>, which forces it to use the intltool package provided by pkgsrc, instead of the one bundled with the distribution file.</p> <p>This tracks intltool's build-time dependencies and uses the @@ -9041,7 +9103,7 @@ of functions.</p> </li> <li> <p>Reinstall the binary package:</p> -<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>pkgadd .../<em class="replaceable"><code>examplepkg</code></em>.tgz</code></strong></pre> +<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>pkg_add .../<em class="replaceable"><code>examplepkg</code></em>.tgz</code></strong></pre> </li> <li><p>Play with it. Make sure everything works.</p></li> <li> @@ -9108,7 +9170,7 @@ of functions.</p> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="general-notes-for-changes"></a>20.3. General notes when adding, updating, or removing packages</h2></div></div></div> <p>Please note all package additions, updates, moves, and - removals in <code class="filename">pkgsrc/doc/CHANGES</code>. It's very + removals in <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code>. It's very important to keep this file up to date and conforming to the existing format, because it will be used by scripts to automatically update pages on <a href="http://www.NetBSD.org/" target="_top">www.NetBSD.org</a> and other @@ -9118,15 +9180,15 @@ of functions.</p> there.</p> <p>When the <code class="varname">PKGREVISION</code> of a package is bumped, the change should appear in - <code class="filename">pkgsrc/doc/CHANGES</code> if it is security + <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code> if it is security related or otherwise relevant. Mass bumps that result from a dependency being updated should not be mentioned. In all other cases it's the developer's decision.</p> <p>There is a make target that helps in creating proper - <code class="filename">CHANGES</code> entries: <span><strong class="command">make + <code class="filename">CHANGES-<em class="replaceable"><code>YYYY</code></em></code> entries: <span><strong class="command">make changes-entry</strong></span>. It uses the optional <code class="varname">CTYPE</code> and <code class="varname">NETBSD_LOGIN_NAME</code> variables. The general - usage is to first make sure that your <code class="filename">CHANGES</code> + usage is to first make sure that your <code class="filename">CHANGES-<em class="replaceable"><code>YYYY</code></em></code> file is up-to-date (to avoid having to resolve conflicts later-on) and then to <span><strong class="command">cd</strong></span> to the package directory. For package updates, <span><strong class="command">make changes-entry</strong></span> is enough. @@ -9135,7 +9197,7 @@ of functions.</p> "Moved", or "Removed". You can set <code class="varname">NETBSD_LOGIN_NAME</code> in <code class="filename">/etc/mk.conf</code> if your local login name is not the same as your NetBSD login name. Don't forget to commit - the changes to <code class="filename">pkgsrc/doc/CHANGES</code>!</p> + the changes to <code class="filename">pkgsrc/doc/CHANGES-<em class="replaceable"><code>YYYY</code></em></code>!</p> </div> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> @@ -9231,36 +9293,36 @@ place.</p></li> <code class="literal">pkgsrc-users</code> mailing list.</p> <div class="qandaset"> <dl> -<dt>21.1. <a href="#id2685494">What is the difference between +<dt>21.1. <a href="#devfaq.makeflags">What is the difference between MAKEFLAGS, .MAKEFLAGS and MAKE_FLAGS?</a> </dt> -<dt>21.2. <a href="#id2685530">What is the difference between +<dt>21.2. <a href="#devfaq.make">What is the difference between MAKE, GMAKE and MAKE_PROGRAM?</a> </dt> -<dt>21.3. <a href="#id2685637">What is the difference between +<dt>21.3. <a href="#devfaq.cc">What is the difference between CC, PKG_CC and PKGSRC_COMPILER?</a> </dt> -<dt>21.4. <a href="#id2685674">What is the difference between +<dt>21.4. <a href="#devfaq.bl3flags">What is the difference between BUILDLINK_LDFLAGS, BUILDLINK_LDADD and BUILDLINK_LIBS?</a> </dt> -<dt>21.5. <a href="#id2685692">Why does make show-var +<dt>21.5. <a href="#devfaq.bl3prefix">Why does make show-var VARNAME=BUILDLINK_PREFIX.foo say it's empty?</a> </dt> -<dt>21.6. <a href="#id2685720">What does +<dt>21.6. <a href="#devfaq.master_sites">What does ${MASTER_SITE_SOURCEFORGE:=package/} mean? I don't understand the := inside it.</a> </dt> -<dt>21.7. <a href="#id2685795">Which mailing lists are there for package +<dt>21.7. <a href="#devfaq.mailinglists">Which mailing lists are there for package developers?</a> </dt> -<dt>21.8. <a href="#id2685831">Where is the pkgsrc +<dt>21.8. <a href="#devfaq.documentation">Where is the pkgsrc documentation?</a> </dt> <dt>21.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I @@ -9272,7 +9334,7 @@ do?</a> <tbody> <tr class="question"> <td align="left" valign="top"> -<a name="id2685494"></a><a name="id2685495"></a><b>21.1.</b> +<a name="devfaq.makeflags"></a><a name="id2686068"></a><b>21.1.</b> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and @@ -9288,7 +9350,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id2685530"></a><a name="id2685531"></a><b>21.2.</b> +<a name="devfaq.make"></a><a name="id2686106"></a><b>21.2.</b> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and @@ -9306,7 +9368,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id2685637"></a><a name="id2685638"></a><b>21.3.</b> +<a name="devfaq.cc"></a><a name="id2686147"></a><b>21.3.</b> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and @@ -9324,7 +9386,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id2685674"></a><a name="id2685675"></a><b>21.4.</b> +<a name="devfaq.bl3flags"></a><a name="id2686186"></a><b>21.4.</b> </td> <td align="left" valign="top"><p>What is the difference between <code class="varname">BUILDLINK_LDFLAGS</code>, @@ -9337,7 +9399,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id2685692"></a><a name="id2685693"></a><b>21.5.</b> +<a name="devfaq.bl3prefix"></a><a name="id2686206"></a><b>21.5.</b> </td> <td align="left" valign="top"><p>Why does <span><strong class="command">make show-var VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span> @@ -9353,7 +9415,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id2685720"></a><a name="id2685721"></a><b>21.6.</b> +<a name="devfaq.master_sites"></a><a name="id2686305"></a><b>21.6.</b> </td> <td align="left" valign="top"><p>What does <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I @@ -9377,7 +9439,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id2685795"></a><a name="id2685796"></a><b>21.7.</b> +<a name="devfaq.mailinglists"></a><a name="id2686381"></a><b>21.7.</b> </td> <td align="left" valign="top"><p>Which mailing lists are there for package developers?</p></td> @@ -9402,7 +9464,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="id2685831"></a><a name="id2685832"></a><b>21.8.</b> +<a name="devfaq.documentation"></a><a name="id2686420"></a><b>21.8.</b> </td> <td align="left" valign="top"><p>Where is the pkgsrc documentation?</p></td> @@ -9439,7 +9501,7 @@ do?</a> <li><p>Some parts of pkgsrc are only “<span class="quote">implicitly documented</span>”, that is the documentation exists only in the mind of the developer who wrote the code. To get this - information, use the the <span><strong class="command">cvs annotate</strong></span> command + information, use the <span><strong class="command">cvs annotate</strong></span> command to see who has written it and ask on the <code class="literal">tech-pkg</code> mailing list, so that others can find your questions later (see above). To be sure that the @@ -9450,7 +9512,7 @@ do?</a> </tr> <tr class="question"> <td align="left" valign="top"> -<a name="devfaq.too-much-time"></a><a name="id2685894"></a><b>21.9.</b> +<a name="devfaq.too-much-time"></a><a name="id2686482"></a><b>21.9.</b> </td> <td align="left" valign="top"><p>I have a little time to kill. What shall I do?</p></td> @@ -9458,7 +9520,7 @@ do?</p></td> <tr class="answer"> <td align="left" valign="top"></td> <td align="left" valign="top"> -<p>This is not really an FAQ yet, but here's the answer +<p>This is not really an FAQ yet, but here's the answer anyway.</p> <div class="itemizedlist"><ul type="disc"> <li><p>Run <span><strong class="command">pkg_chk -N</strong></span> (from the @@ -9582,7 +9644,8 @@ USE_TOOLS+=gmake</pre> specify any dependency in your package and that the version requirements are all correct.</p> </li> -<li><p>If the package uses intltool, be sure to include the <a href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/textproc/intltool/buildlink3.mk?rev=HEAD&content-type=text/x-cvsweb-markup" target="_top"><code class="filename">pkgsrc/textproc/intltool/buildlink3.mk</code></a> file +<li><p>If the package uses intltool, be sure to add + <code class="literal">intltool</code> to the <code class="varname">USE_TOOLS</code> to handle dependencies and to force the package to use the latest available version.</p></li> <li> @@ -9727,14 +9790,14 @@ followed:</p> <p>Generate a patch from the modified meta packages and extract the list of "new" lines. This will provide you an outline on what packages need to be updated in pkgsrc and in what order:</p> -<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cvs diff gnome-devel gnome-base gnome | grep '^+D' >todo.txt</code></strong></pre> +<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cvs diff -u gnome-devel gnome-base gnome | grep '^+D' >todo.txt</code></strong></pre> </li> <li><p>For major desktop updates it is recommended to zap all your installed packages and start over from scratch at this point.</p></li> <li><p>Now comes the longest step by far: iterate over the contents of <code class="filename">todo.txt</code> and update the packages listed in it in order. For major desktop updates none of these should be - commited until the entire set is completed because there are chances + committed until the entire set is completed because there are chances of breaking not-yet-updated packages.</p></li> <li><p>Once the packages are up to date and working, commit them to the tree one by one with appropriate log messages. At the end, @@ -9749,7 +9812,7 @@ followed:</p> <p>GNOME is a very big component in pkgsrc which approaches 100 packages. Please, it is very important that you always, always, <span class="strong"><strong>always</strong></span> feed back any portability -fixes you do to a GNOME package to the mainstream developers (see <a href="#components.patches.feedback" title="10.3.2. Feedback to the author">Section 10.3.2, “Feedback to the author”</a>). This is the only way to get +fixes you do to a GNOME package to the mainstream developers (see <a href="#components.patches.feedback" title="10.3.5. Feedback to the author">Section 10.3.5, “Feedback to the author”</a>). This is the only way to get their attention on portability issues and to ensure that future versions can be built out-of-the box on NetBSD. The less custom patches in pkgsrc, the easier further updates are. Those developers in charge of @@ -9766,7 +9829,7 @@ issues. While the FreeBSD GNOME people are doing a great job in porting GNOME to their operating system, the official GNOME sources are now plagued by conditionals that check for <code class="varname">__FreeBSD__</code> and similar macros. This hurts portability. Please see our patching -guidelines (<a href="#components.patches.guidelines" title="10.3.1. Patching guidelines">Section 10.3.1, “Patching guidelines”</a>) for more +guidelines (<a href="#components.patches.guidelines" title="10.3.4. Patching guidelines">Section 10.3.4, “Patching guidelines”</a>) for more details.</p> </div> </div> @@ -10039,8 +10102,9 @@ details.</p> are loaded and gives reasons for that order.</p> <div class="sect2" lang="en"> <div class="titlepage"><div><div><h3 class="title"> -<a name="infr.order.prefs"></a>23.6.1. The order in <code class="filename">bsd.prefs.mk</code></h3></div></div></div> -<p>The very first action in <code class="filename">bsd.pkg.mk</code> +<a name="infr.order.prefs"></a>23.6.1. The order in <code class="filename">bsd.prefs.mk</code> +</h3></div></div></div> +<p>The very first action in <code class="filename">bsd.prefs.mk</code> is to define some essential variables like <code class="varname">OPSYS</code>, <code class="varname">OS_VERSION</code> and <code class="varname">MACHINE_ARCH</code>.</p> @@ -10066,11 +10130,12 @@ details.</p> </div> <div class="sect2" lang="en"> <div class="titlepage"><div><div><h3 class="title"> -<a name="infr.order.pkg"></a>23.6.2. The order in <code class="filename">bsd.pkg.mk</code></h3></div></div></div> +<a name="infr.order.pkg"></a>23.6.2. The order in <code class="filename">bsd.pkg.mk</code> +</h3></div></div></div> <p>First, <code class="filename">bsd.prefs.mk</code> is loaded.</p> <p>Then, the various <code class="filename">*-vars.mk</code> files are loaded, which fill default values for those variables that have - not been defined by the the package. These variables may later + not been defined by the package. These variables may later be used even in unrelated files.</p> <p>Then, the file <code class="filename">bsd.pkg.error.mk</code> provides the target <code class="literal">error-check</code> that is added @@ -10212,7 +10277,7 @@ details.</p> <code class="literal">MyOS</code> in this example), you need to touch the following files:</p> <div class="variablelist"><dl> -<dt><span class="term"><code class="filename">bootstrap/mods/mk/<em class="replaceable"><code>MyOS</code></em>.sys.mk</code></span></dt> +<dt><span class="term"><code class="filename">pkgtools/bootstrap-mk-files/files/mods/<em class="replaceable"><code>MyOS</code></em>.sys.mk</code></span></dt> <dd><p>This file contains some basic definitions, for example the name of the C compiler.</p></dd> @@ -10224,19 +10289,19 @@ details.</p> <code class="varname">MACHINE_ARCH</code>, <code class="varname">OBJECT_FMT</code>, <code class="varname">APPEND_ELF</code>, and the other variables that appear in this file.</p></dd> -<dt><span class="term"><code class="filename">mk/platform/MyOS.mk</code></span></dt> +<dt><span class="term"><code class="filename">mk/platform/<em class="replaceable"><code>MyOS</code></em>.mk</code></span></dt> <dd><p>This file contains the platform-specific definitions that are used by pkgsrc. Start by copying one of the other files and edit it to your needs.</p></dd> -<dt><span class="term"><code class="filename">mk/platform/MyOS.pkg.dist</code></span></dt> +<dt><span class="term"><code class="filename">mk/platform/<em class="replaceable"><code>MyOS</code></em>.pkg.dist</code></span></dt> <dd><p>This file contains a list of directories, together with their permission bits and ownership. These directories will be created automatically with every package that does not explicitly set <code class="varname">NO_MTREE</code>. There have been some discussions about whether this file is needed at all, but with no result.</p></dd> -<dt><span class="term"><code class="filename">mk/platform/MyOS.x11.dist</code></span></dt> +<dt><span class="term"><code class="filename">mk/platform/<em class="replaceable"><code>MyOS</code></em>.x11.dist</code></span></dt> <dd><p>Just copy one of the pre-existing x11.dist files to your <code class="filename"><em class="replaceable"><code>MyOS</code></em>.x11.dist</code>.</p></dd> @@ -10247,7 +10312,7 @@ details.</p> narrow limit on the line length they can process. Therefore pkgsrc brings its own tools, which can be enabled here.</p></dd> -<dt><span class="term"><code class="filename">mk/tools/<em class="replaceable"><code>MyOS</code></em>.mk</code></span></dt> +<dt><span class="term"><code class="filename">mk/tools/tools.<em class="replaceable"><code>MyOS</code></em>.mk</code></span></dt> <dd><p>This file defines the paths to all the tools that are needed by one or the other package in pkgsrc, as well as by pkgsrc itself. Find out where these tools are on your @@ -10330,7 +10395,8 @@ details.</p> </div> <div class="sect2" lang="en"> <div class="titlepage"><div><div><h3 class="title"> -<a name="checking-package-with-pkglint"></a>A.1.4. Checking a package with <span><strong class="command">pkglint</strong></span></h3></div></div></div> +<a name="checking-package-with-pkglint"></a>A.1.4. Checking a package with <span><strong class="command">pkglint</strong></span> +</h3></div></div></div> <p>The NetBSD package system comes with <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a> which helps to check the contents of these @@ -10580,7 +10646,7 @@ Registering depends:. <dt><span class="sect1"><a href="#ftp-misc">C.4. <code class="filename">misc</code>: Miscellaneous things</a></span></dt> <dt><span class="sect1"><a href="#ftp-packages">C.5. <code class="filename">packages*</code>: Binary packages</a></span></dt> <dt><span class="sect1"><a href="#ftp-source">C.6. <code class="filename">current</code>, -<code class="filename">200<em class="replaceable"><code>x</code></em>Q<em class="replaceable"><code>y</code></em></code>: +<code class="filename">pkgsrc-200<em class="replaceable"><code>x</code></em>Q<em class="replaceable"><code>y</code></em></code>: source packages</a></span></dt> </dl> </div> @@ -10643,7 +10709,7 @@ source packages</a></span></dt> <div class="sect1" lang="en"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="ftp-source"></a>C.6. <code class="filename">current</code>, -<code class="filename">200<em class="replaceable"><code>x</code></em>Q<em class="replaceable"><code>y</code></em></code>: +<code class="filename">pkgsrc-200<em class="replaceable"><code>x</code></em>Q<em class="replaceable"><code>y</code></em></code>: source packages</h2></div></div></div> <p>These directories contain the “<span class="quote">real</span>” pkgsrc, that is the files that define how to create binary packages from |