Thu Jan 1 06:32:33 2015 UTC ()
regen


(dholland)
diff -r1.192 -r1.193 pkgsrc/doc/pkgsrc.html
diff -r1.194 -r1.195 pkgsrc/doc/pkgsrc.txt

cvs diff -r1.192 -r1.193 pkgsrc/doc/pkgsrc.html (expand / switch to unified diff)

--- pkgsrc/doc/pkgsrc.html 2015/01/01 05:20:29 1.192
+++ pkgsrc/doc/pkgsrc.html 2015/01/01 06:32:32 1.193
@@ -20,28 +20,28 @@ @@ -20,28 +20,28 @@
20</h3> 20</h3>
21<div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:agc@NetBSD.org">agc@NetBSD.org</a>&gt;</code></p></div></div> 21<div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:agc@NetBSD.org">agc@NetBSD.org</a>&gt;</code></p></div></div>
22</div> 22</div>
23<div class="author"> 23<div class="author">
24<h3 class="author"> 24<h3 class="author">
25<span class="firstname">Hubert</span> <span class="surname">Feyrer</span> 25<span class="firstname">Hubert</span> <span class="surname">Feyrer</span>
26</h3> 26</h3>
27<div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:hubertf@NetBSD.org">hubertf@NetBSD.org</a>&gt;</code></p></div></div> 27<div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:hubertf@NetBSD.org">hubertf@NetBSD.org</a>&gt;</code></p></div></div>
28</div> 28</div>
29<h3 class="corpauthor"> 29<h3 class="corpauthor">
30 The pkgsrc Developers 30 The pkgsrc Developers
31 </h3> 31 </h3>
32</div></div> 32</div></div>
33<div><p class="copyright">Copyright © 1994-2015 The NetBSD Foundation, Inc</p></div> 33<div><p class="copyright">Copyright © 1994-2014 The NetBSD Foundation, Inc</p></div>
34<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.28 2015/01/01 05:19:02 jnemeth Exp $</p></div> 34<div><p class="pubdate">$NetBSD: pkgsrc.xml,v 1.27 2014/09/19 04:53:09 jnemeth Exp $</p></div>
35<div><div class="abstract"> 35<div><div class="abstract">
36<p class="title"><b>Abstract</b></p> 36<p class="title"><b>Abstract</b></p>
37<p>pkgsrc is a centralized package management system for 37<p>pkgsrc is a centralized package management system for
38 Unix-like operating systems. This guide provides information for 38 Unix-like operating systems. This guide provides information for
39 users and developers of pkgsrc. It covers installation of binary 39 users and developers of pkgsrc. It covers installation of binary
40 and source packages, creation of binary and source packages and 40 and source packages, creation of binary and source packages and
41 a high-level overview about the infrastructure.</p> 41 a high-level overview about the infrastructure.</p>
42</div></div> 42</div></div>
43</div> 43</div>
44<hr> 44<hr>
45</div> 45</div>
46<div class="toc"> 46<div class="toc">
47<p><b>Table of Contents</b></p> 47<p><b>Table of Contents</b></p>
@@ -138,43 +138,44 @@ builds) @@ -138,43 +138,44 @@ builds)
138<dd><dl><dt><span class="sect2"><a href="#bulk.pbulk.conf">7.2.1. Configuration</a></span></dt></dl></dd> 138<dd><dl><dt><span class="sect2"><a href="#bulk.pbulk.conf">7.2.1. Configuration</a></span></dt></dl></dd>
139<dt><span class="sect1"><a href="#bulk.req">7.3. Requirements of a full bulk build</a></span></dt> 139<dt><span class="sect1"><a href="#bulk.req">7.3. Requirements of a full bulk build</a></span></dt>
140<dt><span class="sect1"><a href="#creating-cdroms">7.4. Creating a multiple CD-ROM packages collection</a></span></dt> 140<dt><span class="sect1"><a href="#creating-cdroms">7.4. Creating a multiple CD-ROM packages collection</a></span></dt>
141<dd><dl><dt><span class="sect2"><a href="#cdpack-example">7.4.1. Example of cdpack</a></span></dt></dl></dd> 141<dd><dl><dt><span class="sect2"><a href="#cdpack-example">7.4.1. Example of cdpack</a></span></dt></dl></dd>
142</dl></dd> 142</dl></dd>
143<dt><span class="chapter"><a href="#files">8. Directory layout of the installed files</a></span></dt> 143<dt><span class="chapter"><a href="#files">8. Directory layout of the installed files</a></span></dt>
144<dd><dl> 144<dd><dl>
145<dt><span class="sect1"><a href="#files.localbase">8.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt> 145<dt><span class="sect1"><a href="#files.localbase">8.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
146<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt> 146<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
147</dl></dd> 147</dl></dd>
148<dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt> 148<dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt>
149<dd><dl> 149<dd><dl>
150<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt> 150<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
151<dt><span class="sect1"><a href="#faq-pkgtools">9.2. Utilities for package management (pkgtools)</a></span></dt> 151<dt><span class="sect1"><a href="#pkgviews-docs">9.2. Where's the pkgviews documentation?</a></span></dt>
152<dt><span class="sect1"><a href="#non-root-pkgsrc">9.3. How to use pkgsrc as non-root</a></span></dt> 152<dt><span class="sect1"><a href="#faq-pkgtools">9.3. Utilities for package management (pkgtools)</a></span></dt>
153<dt><span class="sect1"><a href="#resume-transfers">9.4. How to resume transfers when fetching distfiles?</a></span></dt> 153<dt><span class="sect1"><a href="#non-root-pkgsrc">9.4. How to use pkgsrc as non-root</a></span></dt>
154<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.5. How can I install/use modular X.org from pkgsrc?</a></span></dt> 154<dt><span class="sect1"><a href="#resume-transfers">9.5. How to resume transfers when fetching distfiles?</a></span></dt>
155<dt><span class="sect1"><a href="#fetch-behind-firewall">9.6. How to fetch files from behind a firewall</a></span></dt> 155<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
156<dt><span class="sect1"><a href="#fetch-https">9.7. How to fetch files from HTTPS sites</a></span></dt> 156<dt><span class="sect1"><a href="#fetch-behind-firewall">9.7. How to fetch files from behind a firewall</a></span></dt>
157<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</a></span></dt> 157<dt><span class="sect1"><a href="#fetch-https">9.8. How to fetch files from HTTPS sites</a></span></dt>
158<dt><span class="sect1"><a href="#fetching-all-distfiles">9.9. How to fetch all distfiles at once</a></span></dt> 158<dt><span class="sect1"><a href="#passive-ftp">9.9. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</a></span></dt>
159<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does <span class="quote">&#8220;<span class="quote">Don't know how to make 159<dt><span class="sect1"><a href="#fetching-all-distfiles">9.10. How to fetch all distfiles at once</a></span></dt>
 160<dt><span class="sect1"><a href="#tmac.andoc-missing">9.11. What does <span class="quote">&#8220;<span class="quote">Don't know how to make
160/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</a></span></dt> 161/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</a></span></dt>
161<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</a></span></dt> 162<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.12. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</a></span></dt>
162<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.12. Using 'sudo' with pkgsrc</a></span></dt> 163<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.13. Using 'sudo' with pkgsrc</a></span></dt>
163<dt><span class="sect1"><a href="#faq.conf">9.13. How do I change the location of configuration files?</a></span></dt> 164<dt><span class="sect1"><a href="#faq.conf">9.14. How do I change the location of configuration files?</a></span></dt>
164<dt><span class="sect1"><a href="#audit-packages">9.14. Automated security checks</a></span></dt> 165<dt><span class="sect1"><a href="#audit-packages">9.15. Automated security checks</a></span></dt>
165<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt> 166<dt><span class="sect1"><a href="#ufaq-cflags">9.16. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
166<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt> 167<dt><span class="sect1"><a href="#ufaq-fail">9.17. A package does not build. What shall I do?</a></span></dt>
167<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</a></span></dt> 168<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.18. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</a></span></dt>
168</dl></dd> 169</dl></dd>
169</dl></dd> 170</dl></dd>
170<dt><span class="part"><a href="#developers-guide">II. The pkgsrc developer's guide</a></span></dt> 171<dt><span class="part"><a href="#developers-guide">II. The pkgsrc developer's guide</a></span></dt>
171<dd><dl> 172<dd><dl>
172<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt> 173<dt><span class="chapter"><a href="#creating">10. Creating a new pkgsrc package from scratch</a></span></dt>
173<dd><dl> 174<dd><dl>
174<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt> 175<dt><span class="sect1"><a href="#creating.common">10.1. Common types of packages</a></span></dt>
175<dd><dl> 176<dd><dl>
176<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt> 177<dt><span class="sect2"><a href="#creating.perl-module">10.1.1. Perl modules</a></span></dt>
177<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE3 applications</a></span></dt> 178<dt><span class="sect2"><a href="#creating.kde-app">10.1.2. KDE3 applications</a></span></dt>
178<dt><span class="sect2"><a href="#creating.python-module">10.1.3. Python modules and programs</a></span></dt> 179<dt><span class="sect2"><a href="#creating.python-module">10.1.3. Python modules and programs</a></span></dt>
179</dl></dd> 180</dl></dd>
180<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt> 181<dt><span class="sect1"><a href="#creating.examples">10.2. Examples</a></span></dt>
@@ -865,43 +866,44 @@ builds) @@ -865,43 +866,44 @@ builds)
865<dd><dl><dt><span class="sect2"><a href="#bulk.pbulk.conf">7.2.1. Configuration</a></span></dt></dl></dd> 866<dd><dl><dt><span class="sect2"><a href="#bulk.pbulk.conf">7.2.1. Configuration</a></span></dt></dl></dd>
866<dt><span class="sect1"><a href="#bulk.req">7.3. Requirements of a full bulk build</a></span></dt> 867<dt><span class="sect1"><a href="#bulk.req">7.3. Requirements of a full bulk build</a></span></dt>
867<dt><span class="sect1"><a href="#creating-cdroms">7.4. Creating a multiple CD-ROM packages collection</a></span></dt> 868<dt><span class="sect1"><a href="#creating-cdroms">7.4. Creating a multiple CD-ROM packages collection</a></span></dt>
868<dd><dl><dt><span class="sect2"><a href="#cdpack-example">7.4.1. Example of cdpack</a></span></dt></dl></dd> 869<dd><dl><dt><span class="sect2"><a href="#cdpack-example">7.4.1. Example of cdpack</a></span></dt></dl></dd>
869</dl></dd> 870</dl></dd>
870<dt><span class="chapter"><a href="#files">8. Directory layout of the installed files</a></span></dt> 871<dt><span class="chapter"><a href="#files">8. Directory layout of the installed files</a></span></dt>
871<dd><dl> 872<dd><dl>
872<dt><span class="sect1"><a href="#files.localbase">8.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt> 873<dt><span class="sect1"><a href="#files.localbase">8.1. File system layout in <code class="literal">${LOCALBASE}</code></a></span></dt>
873<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt> 874<dt><span class="sect1"><a href="#files.varbase">8.2. File system layout in <code class="literal">${VARBASE}</code></a></span></dt>
874</dl></dd> 875</dl></dd>
875<dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt> 876<dt><span class="chapter"><a href="#faq">9. Frequently Asked Questions</a></span></dt>
876<dd><dl> 877<dd><dl>
877<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt> 878<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
878<dt><span class="sect1"><a href="#faq-pkgtools">9.2. Utilities for package management (pkgtools)</a></span></dt> 879<dt><span class="sect1"><a href="#pkgviews-docs">9.2. Where's the pkgviews documentation?</a></span></dt>
879<dt><span class="sect1"><a href="#non-root-pkgsrc">9.3. How to use pkgsrc as non-root</a></span></dt> 880<dt><span class="sect1"><a href="#faq-pkgtools">9.3. Utilities for package management (pkgtools)</a></span></dt>
880<dt><span class="sect1"><a href="#resume-transfers">9.4. How to resume transfers when fetching distfiles?</a></span></dt> 881<dt><span class="sect1"><a href="#non-root-pkgsrc">9.4. How to use pkgsrc as non-root</a></span></dt>
881<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.5. How can I install/use modular X.org from pkgsrc?</a></span></dt> 882<dt><span class="sect1"><a href="#resume-transfers">9.5. How to resume transfers when fetching distfiles?</a></span></dt>
882<dt><span class="sect1"><a href="#fetch-behind-firewall">9.6. How to fetch files from behind a firewall</a></span></dt> 883<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
883<dt><span class="sect1"><a href="#fetch-https">9.7. How to fetch files from HTTPS sites</a></span></dt> 884<dt><span class="sect1"><a href="#fetch-behind-firewall">9.7. How to fetch files from behind a firewall</a></span></dt>
884<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</a></span></dt> 885<dt><span class="sect1"><a href="#fetch-https">9.8. How to fetch files from HTTPS sites</a></span></dt>
885<dt><span class="sect1"><a href="#fetching-all-distfiles">9.9. How to fetch all distfiles at once</a></span></dt> 886<dt><span class="sect1"><a href="#passive-ftp">9.9. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</a></span></dt>
886<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does <span class="quote">&#8220;<span class="quote">Don't know how to make 887<dt><span class="sect1"><a href="#fetching-all-distfiles">9.10. How to fetch all distfiles at once</a></span></dt>
 888<dt><span class="sect1"><a href="#tmac.andoc-missing">9.11. What does <span class="quote">&#8220;<span class="quote">Don't know how to make
887/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</a></span></dt> 889/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</a></span></dt>
888<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</a></span></dt> 890<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.12. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</a></span></dt>
889<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.12. Using 'sudo' with pkgsrc</a></span></dt> 891<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.13. Using 'sudo' with pkgsrc</a></span></dt>
890<dt><span class="sect1"><a href="#faq.conf">9.13. How do I change the location of configuration files?</a></span></dt> 892<dt><span class="sect1"><a href="#faq.conf">9.14. How do I change the location of configuration files?</a></span></dt>
891<dt><span class="sect1"><a href="#audit-packages">9.14. Automated security checks</a></span></dt> 893<dt><span class="sect1"><a href="#audit-packages">9.15. Automated security checks</a></span></dt>
892<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt> 894<dt><span class="sect1"><a href="#ufaq-cflags">9.16. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
893<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt> 895<dt><span class="sect1"><a href="#ufaq-fail">9.17. A package does not build. What shall I do?</a></span></dt>
894<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</a></span></dt> 896<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.18. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</a></span></dt>
895</dl></dd> 897</dl></dd>
896</dl> 898</dl>
897</div> 899</div>
898<div class="chapter"> 900<div class="chapter">
899<div class="titlepage"><div><div><h2 class="title"> 901<div class="titlepage"><div><div><h2 class="title">
900<a name="getting"></a>Chapter 2. Where to get pkgsrc and how to keep it up-to-date</h2></div></div></div> 902<a name="getting"></a>Chapter 2. Where to get pkgsrc and how to keep it up-to-date</h2></div></div></div>
901<div class="toc"> 903<div class="toc">
902<p><b>Table of Contents</b></p> 904<p><b>Table of Contents</b></p>
903<dl> 905<dl>
904<dt><span class="sect1"><a href="#getting-first">2.1. Getting pkgsrc for the first time</a></span></dt> 906<dt><span class="sect1"><a href="#getting-first">2.1. Getting pkgsrc for the first time</a></span></dt>
905<dd><dl> 907<dd><dl>
906<dt><span class="sect2"><a href="#getting-via-tar">2.1.1. As tar archive</a></span></dt> 908<dt><span class="sect2"><a href="#getting-via-tar">2.1.1. As tar archive</a></span></dt>
907<dt><span class="sect2"><a href="#getting-via-cvs">2.1.2. Via anonymous CVS</a></span></dt> 909<dt><span class="sect2"><a href="#getting-via-cvs">2.1.2. Via anonymous CVS</a></span></dt>
@@ -2849,43 +2851,44 @@ files.

 @@ -2849,43 +2851,44 @@ files.

2849<dt><span class="term"><code class="filename">run</code></span></dt> 2851<dt><span class="term"><code class="filename">run</code></span></dt>
2850<dd><p>Contains informational files about daemons that are 2852<dd><p>Contains informational files about daemons that are
2851currently running.</p></dd> 2853currently running.</p></dd>
2852</dl></div> 2854</dl></div>
2853</div> 2855</div>
2854</div> 2856</div>
2855<div class="chapter"> 2857<div class="chapter">
2856<div class="titlepage"><div><div><h2 class="title"> 2858<div class="titlepage"><div><div><h2 class="title">
2857<a name="faq"></a>Chapter 9. Frequently Asked Questions</h2></div></div></div> 2859<a name="faq"></a>Chapter 9. Frequently Asked Questions</h2></div></div></div>
2858<div class="toc"> 2860<div class="toc">
2859<p><b>Table of Contents</b></p> 2861<p><b>Table of Contents</b></p>
2860<dl> 2862<dl>
2861<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt> 2863<dt><span class="sect1"><a href="#mailing-list-pointers">9.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
2862<dt><span class="sect1"><a href="#faq-pkgtools">9.2. Utilities for package management (pkgtools)</a></span></dt> 2864<dt><span class="sect1"><a href="#pkgviews-docs">9.2. Where's the pkgviews documentation?</a></span></dt>
2863<dt><span class="sect1"><a href="#non-root-pkgsrc">9.3. How to use pkgsrc as non-root</a></span></dt> 2865<dt><span class="sect1"><a href="#faq-pkgtools">9.3. Utilities for package management (pkgtools)</a></span></dt>
2864<dt><span class="sect1"><a href="#resume-transfers">9.4. How to resume transfers when fetching distfiles?</a></span></dt> 2866<dt><span class="sect1"><a href="#non-root-pkgsrc">9.4. How to use pkgsrc as non-root</a></span></dt>
2865<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.5. How can I install/use modular X.org from pkgsrc?</a></span></dt> 2867<dt><span class="sect1"><a href="#resume-transfers">9.5. How to resume transfers when fetching distfiles?</a></span></dt>
2866<dt><span class="sect1"><a href="#fetch-behind-firewall">9.6. How to fetch files from behind a firewall</a></span></dt> 2868<dt><span class="sect1"><a href="#x.org-from-pkgsrc">9.6. How can I install/use modular X.org from pkgsrc?</a></span></dt>
2867<dt><span class="sect1"><a href="#fetch-https">9.7. How to fetch files from HTTPS sites</a></span></dt> 2869<dt><span class="sect1"><a href="#fetch-behind-firewall">9.7. How to fetch files from behind a firewall</a></span></dt>
2868<dt><span class="sect1"><a href="#passive-ftp">9.8. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</a></span></dt> 2870<dt><span class="sect1"><a href="#fetch-https">9.8. How to fetch files from HTTPS sites</a></span></dt>
2869<dt><span class="sect1"><a href="#fetching-all-distfiles">9.9. How to fetch all distfiles at once</a></span></dt> 2871<dt><span class="sect1"><a href="#passive-ftp">9.9. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</a></span></dt>
2870<dt><span class="sect1"><a href="#tmac.andoc-missing">9.10. What does <span class="quote">&#8220;<span class="quote">Don't know how to make 2872<dt><span class="sect1"><a href="#fetching-all-distfiles">9.10. How to fetch all distfiles at once</a></span></dt>
 2873<dt><span class="sect1"><a href="#tmac.andoc-missing">9.11. What does <span class="quote">&#8220;<span class="quote">Don't know how to make
2871/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</a></span></dt> 2874/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</a></span></dt>
2872<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.11. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</a></span></dt> 2875<dt><span class="sect1"><a href="#bsd.own.mk-missing">9.12. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</a></span></dt>
2873<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.12. Using 'sudo' with pkgsrc</a></span></dt> 2876<dt><span class="sect1"><a href="#using-sudo-with-pkgsrc">9.13. Using 'sudo' with pkgsrc</a></span></dt>
2874<dt><span class="sect1"><a href="#faq.conf">9.13. How do I change the location of configuration files?</a></span></dt> 2877<dt><span class="sect1"><a href="#faq.conf">9.14. How do I change the location of configuration files?</a></span></dt>
2875<dt><span class="sect1"><a href="#audit-packages">9.14. Automated security checks</a></span></dt> 2878<dt><span class="sect1"><a href="#audit-packages">9.15. Automated security checks</a></span></dt>
2876<dt><span class="sect1"><a href="#ufaq-cflags">9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt> 2879<dt><span class="sect1"><a href="#ufaq-cflags">9.16. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
2877<dt><span class="sect1"><a href="#ufaq-fail">9.16. A package does not build. What shall I do?</a></span></dt> 2880<dt><span class="sect1"><a href="#ufaq-fail">9.17. A package does not build. What shall I do?</a></span></dt>
2878<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.17. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</a></span></dt> 2881<dt><span class="sect1"><a href="#faq.rcs-conflicts">9.18. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</a></span></dt>
2879</dl> 2882</dl>
2880</div> 2883</div>
2881<p>This section contains hints, tips &amp; tricks on special things in 2884<p>This section contains hints, tips &amp; tricks on special things in
2882pkgsrc that we didn't find a better place for in the previous chapters, and 2885pkgsrc that we didn't find a better place for in the previous chapters, and
2883it contains items for both pkgsrc users and developers.</p> 2886it contains items for both pkgsrc users and developers.</p>
2884<div class="sect1"> 2887<div class="sect1">
2885<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 2888<div class="titlepage"><div><div><h2 class="title" style="clear: both">
2886<a name="mailing-list-pointers"></a>9.1. Are there any mailing lists for pkg-related discussion?</h2></div></div></div> 2889<a name="mailing-list-pointers"></a>9.1. Are there any mailing lists for pkg-related discussion?</h2></div></div></div>
2887<p>The following mailing lists may be of interest to pkgsrc users:</p> 2890<p>The following mailing lists may be of interest to pkgsrc users:</p>
2888<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 2891<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
2889<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-users" target="_top">pkgsrc-users</a>: 2892<li class="listitem"><p><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-users" target="_top">pkgsrc-users</a>:
2890 This is a general purpose list for most issues regarding 2893 This is a general purpose list for most issues regarding
2891 pkgsrc, regardless of platform, e.g. soliciting user help 2894 pkgsrc, regardless of platform, e.g. soliciting user help
@@ -2904,27 +2907,34 @@ it contains items for both pkgsrc users  @@ -2904,27 +2907,34 @@ it contains items for both pkgsrc users
2904 also available in digest form, meaning one daily message 2907 also available in digest form, meaning one daily message
2905 containing all commit messages for changes to the package 2908 containing all commit messages for changes to the package
2906 source tree in that 24 hour period.</p></li> 2909 source tree in that 24 hour period.</p></li>
2907</ul></div> 2910</ul></div>
2908<p>To subscribe, do:</p> 2911<p>To subscribe, do:</p>
2909<pre class="programlisting"> 2912<pre class="programlisting">
2910<code class="prompt">%</code> echo subscribe <em class="replaceable"><code>listname</code></em> | mail majordomo@NetBSD.org 2913<code class="prompt">%</code> echo subscribe <em class="replaceable"><code>listname</code></em> | mail majordomo@NetBSD.org
2911</pre> 2914</pre>
2912<p>Archives for all these mailing lists are available from 2915<p>Archives for all these mailing lists are available from
2913<a class="ulink" href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>.</p> 2916<a class="ulink" href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>.</p>
2914</div> 2917</div>
2915<div class="sect1"> 2918<div class="sect1">
2916<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 2919<div class="titlepage"><div><div><h2 class="title" style="clear: both">
2917<a name="faq-pkgtools"></a>9.2. Utilities for package management (pkgtools)</h2></div></div></div> 2920<a name="pkgviews-docs"></a>9.2. Where's the pkgviews documentation?</h2></div></div></div>
 2921<p>Pkgviews is tightly integrated with buildlink. You can find a
 2922pkgviews User's guide in
 2923<code class="filename">pkgsrc/mk/buildlink3/PKGVIEWS_UG</code>.</p>
 2924</div>
 2925<div class="sect1">
 2926<div class="titlepage"><div><div><h2 class="title" style="clear: both">
 2927<a name="faq-pkgtools"></a>9.3. Utilities for package management (pkgtools)</h2></div></div></div>
2918<p>The directory <code class="filename">pkgsrc/pkgtools</code> contains 2928<p>The directory <code class="filename">pkgsrc/pkgtools</code> contains
2919a number of useful utilities for both users and developers of pkgsrc. This 2929a number of useful utilities for both users and developers of pkgsrc. This
2920section attempts only to make the reader aware of the utilities and when 2930section attempts only to make the reader aware of the utilities and when
2921they might be useful, and not to duplicate the documentation that comes 2931they might be useful, and not to duplicate the documentation that comes
2922with each package.</p> 2932with each package.</p>
2923<p>Utilities used by pkgsrc (automatically installed when needed):</p> 2933<p>Utilities used by pkgsrc (automatically installed when needed):</p>
2924<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/x11-links/README.html" target="_top"><code class="filename">pkgtools/x11-links</code></a>: 2934<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/x11-links/README.html" target="_top"><code class="filename">pkgtools/x11-links</code></a>:
2925 Symlinks for use by buildlink.</p></li></ul></div> 2935 Symlinks for use by buildlink.</p></li></ul></div>
2926<p>OS tool augmentation (automatically installed when needed):</p> 2936<p>OS tool augmentation (automatically installed when needed):</p>
2927<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 2937<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
2928<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/digest/README.html" target="_top"><code class="filename">pkgtools/digest</code></a>: 2938<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/digest/README.html" target="_top"><code class="filename">pkgtools/digest</code></a>:
2929 Calculates various kinds of checksums (including SHA1).</p></li> 2939 Calculates various kinds of checksums (including SHA1).</p></li>
2930<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html" target="_top"><code class="filename">pkgtools/libnbcompat</code></a>: 2940<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html" target="_top"><code class="filename">pkgtools/libnbcompat</code></a>:
@@ -2980,138 +2990,138 @@ etc:

 @@ -2980,138 +2990,138 @@ etc:

2980 converting to pkgsrc.</p></li> 2990 converting to pkgsrc.</p></li>
2981</ul></div> 2991</ul></div>
2982<p>Utilities for people maintaining pkgsrc (or: more obscure pkg 2992<p>Utilities for people maintaining pkgsrc (or: more obscure pkg
2983utilities)</p> 2993utilities)</p>
2984<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 2994<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
2985<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_comp/README.html" target="_top"><code class="filename">pkgtools/pkg_comp</code></a>: Build 2995<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_comp/README.html" target="_top"><code class="filename">pkgtools/pkg_comp</code></a>: Build
2986 packages in a chrooted area.</p></li> 2996 packages in a chrooted area.</p></li>
2987<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libkver/README.html" target="_top"><code class="filename">pkgtools/libkver</code></a>: Spoof 2997<li class="listitem"><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libkver/README.html" target="_top"><code class="filename">pkgtools/libkver</code></a>: Spoof
2988 kernel version for chrooted cross builds.</p></li> 2998 kernel version for chrooted cross builds.</p></li>
2989</ul></div> 2999</ul></div>
2990</div> 3000</div>
2991<div class="sect1"> 3001<div class="sect1">
2992<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3002<div class="titlepage"><div><div><h2 class="title" style="clear: both">
2993<a name="non-root-pkgsrc"></a>9.3. How to use pkgsrc as non-root</h2></div></div></div> 3003<a name="non-root-pkgsrc"></a>9.4. How to use pkgsrc as non-root</h2></div></div></div>
2994<p>If you want to use pkgsrc as non-root user, you can set some 3004<p>If you want to use pkgsrc as non-root user, you can set some
2995variables to make pkgsrc work under these conditions. At the very least, 3005variables to make pkgsrc work under these conditions. At the very least,
2996you need to set <code class="varname">UNPRIVILEGED</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>; this 3006you need to set <code class="varname">UNPRIVILEGED</code> to <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>; this
2997will turn on unprivileged mode and set multiple related variables to allow 3007will turn on unprivileged mode and set multiple related variables to allow
2998installation of packages as non-root.</p> 3008installation of packages as non-root.</p>
2999<p>In case the defaults are not enough, you may want to tune some other 3009<p>In case the defaults are not enough, you may want to tune some other
3000variables used. For example, if the automatic user/group detection leads 3010variables used. For example, if the automatic user/group detection leads
3001to incorrect values (or not the ones you would like to use), you can change 3011to incorrect values (or not the ones you would like to use), you can change
3002them by setting <code class="varname">UNPRIVILEGED_USER</code> and 3012them by setting <code class="varname">UNPRIVILEGED_USER</code> and
3003<code class="varname">UNPRIVILEGED_GROUP</code> respectively.</p> 3013<code class="varname">UNPRIVILEGED_GROUP</code> respectively.</p>
3004<p>As regards bootstrapping, please note that the 3014<p>As regards bootstrapping, please note that the
3005<span class="command"><strong>bootstrap</strong></span> script will ease non-root configuration when 3015<span class="command"><strong>bootstrap</strong></span> script will ease non-root configuration when
3006given the <span class="quote">&#8220;<span class="quote">--ignore-user-check</span>&#8221;</span> flag, as it will choose and 3016given the <span class="quote">&#8220;<span class="quote">--ignore-user-check</span>&#8221;</span> flag, as it will choose and
3007use multiple default directories under <code class="filename">~/pkg</code> as the 3017use multiple default directories under <code class="filename">~/pkg</code> as the
3008installation targets. These directories can be overridden by the 3018installation targets. These directories can be overridden by the
3009<span class="quote">&#8220;<span class="quote">--prefix</span>&#8221;</span> flag provided by the script, as well as some others 3019<span class="quote">&#8220;<span class="quote">--prefix</span>&#8221;</span> flag provided by the script, as well as some others
3010that allow finer tuning of the tree layout.</p> 3020that allow finer tuning of the tree layout.</p>
3011</div> 3021</div>
3012<div class="sect1"> 3022<div class="sect1">
3013<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3023<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3014<a name="resume-transfers"></a>9.4. How to resume transfers when fetching distfiles?</h2></div></div></div> 3024<a name="resume-transfers"></a>9.5. How to resume transfers when fetching distfiles?</h2></div></div></div>
3015<p>By default, resuming transfers in pkgsrc is disabled, but you can 3025<p>By default, resuming transfers in pkgsrc is disabled, but you can
3016enable this feature by adding the option 3026enable this feature by adding the option
3017<code class="varname">PKG_RESUME_TRANSFERS=YES</code> into 3027<code class="varname">PKG_RESUME_TRANSFERS=YES</code> into
3018<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>. If, during a fetch step, an incomplete 3028<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>. If, during a fetch step, an incomplete
3019distfile is found, pkgsrc will try to resume it.</p> 3029distfile is found, pkgsrc will try to resume it.</p>
3020<p>You can also 3030<p>You can also
3021use a different program than the platform default program by changing the 3031use a different program than the platform default program by changing the
3022<code class="varname">FETCH_USING</code> variable. You can specify the program by 3032<code class="varname">FETCH_USING</code> variable. You can specify the program by
3023using of ftp, fetch, wget or curl. Alternatively, fetching can be disabled 3033using of ftp, fetch, wget or curl. Alternatively, fetching can be disabled
3024by using the value manual. A value of custom disables the system defaults 3034by using the value manual. A value of custom disables the system defaults
3025and dependency tracking for the fetch program. In that case you have to 3035and dependency tracking for the fetch program. In that case you have to
3026provide <code class="varname">FETCH_CMD</code>, <code class="varname">FETCH_BEFORE_ARGS</code>, 3036provide <code class="varname">FETCH_CMD</code>, <code class="varname">FETCH_BEFORE_ARGS</code>,
3027<code class="varname">FETCH_RESUME_ARGS</code>, <code class="varname">FETCH_OUTPUT_ARGS</code>, 3037<code class="varname">FETCH_RESUME_ARGS</code>, <code class="varname">FETCH_OUTPUT_ARGS</code>,
3028<code class="varname">FETCH_AFTER_ARGS</code>.</p> 3038<code class="varname">FETCH_AFTER_ARGS</code>.</p>
3029<p>For example, if you want to use 3039<p>For example, if you want to use
3030<code class="filename">wget</code> to download, you'll have to use something 3040<code class="filename">wget</code> to download, you'll have to use something
3031like:</p> 3041like:</p>
3032<pre class="programlisting"> 3042<pre class="programlisting">
3033FETCH_USING= wget 3043FETCH_USING= wget
3034</pre> 3044</pre>
3035</div> 3045</div>
3036<div class="sect1"> 3046<div class="sect1">
3037<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3047<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3038<a name="x.org-from-pkgsrc"></a>9.5. How can I install/use modular X.org from pkgsrc?</h2></div></div></div> 3048<a name="x.org-from-pkgsrc"></a>9.6. How can I install/use modular X.org from pkgsrc?</h2></div></div></div>
3039<p>If you want to use modular X.org from pkgsrc instead of your system's own X11 3049<p>If you want to use modular X.org from pkgsrc instead of your system's own X11
3040(<code class="filename">/usr/X11R6</code>, <code class="filename">/usr/openwin</code>, ...) 3050(<code class="filename">/usr/X11R6</code>, <code class="filename">/usr/openwin</code>, ...)
3041you will have to add the following line into 3051you will have to add the following line into
3042<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>:</p> 3052<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>:</p>
3043<pre class="programlisting"> 3053<pre class="programlisting">
3044X11_TYPE=modular 3054X11_TYPE=modular
3045</pre> 3055</pre>
3046<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> 3056<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
3047<h3 class="title">Note</h3> 3057<h3 class="title">Note</h3>
3048<p>The DragonFly operating system defaults to using modular X.org from pkgsrc. 3058<p>The DragonFly operating system defaults to using modular X.org from pkgsrc.
3049</p> 3059</p>
3050</div> 3060</div>
3051</div> 3061</div>
3052<div class="sect1"> 3062<div class="sect1">
3053<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3063<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3054<a name="fetch-behind-firewall"></a>9.6. How to fetch files from behind a firewall</h2></div></div></div> 3064<a name="fetch-behind-firewall"></a>9.7. How to fetch files from behind a firewall</h2></div></div></div>
3055<p>If you are sitting behind a firewall which does not allow direct 3065<p>If you are sitting behind a firewall which does not allow direct
3056connections to Internet hosts (i.e. non-NAT), you may specify the 3066connections to Internet hosts (i.e. non-NAT), you may specify the
3057relevant proxy hosts. This is done using an environment variable in the 3067relevant proxy hosts. This is done using an environment variable in the
3058form of a URL, e.g. in Amdahl, the machine 3068form of a URL, e.g. in Amdahl, the machine
3059<span class="quote">&#8220;<span class="quote">orpheus.amdahl.com</span>&#8221;</span> is one of the firewalls, and it uses 3069<span class="quote">&#8220;<span class="quote">orpheus.amdahl.com</span>&#8221;</span> is one of the firewalls, and it uses
3060port 80 as the proxy port number. So the proxy environment variables 3070port 80 as the proxy port number. So the proxy environment variables
3061are:</p> 3071are:</p>
3062<pre class="programlisting"> 3072<pre class="programlisting">
3063ftp_proxy=ftp://orpheus.amdahl.com:80/ 3073ftp_proxy=ftp://orpheus.amdahl.com:80/
3064http_proxy=http://orpheus.amdahl.com:80/ 3074http_proxy=http://orpheus.amdahl.com:80/
3065</pre> 3075</pre>
3066</div> 3076</div>
3067<div class="sect1"> 3077<div class="sect1">
3068<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3078<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3069<a name="fetch-https"></a>9.7. How to fetch files from HTTPS sites</h2></div></div></div> 3079<a name="fetch-https"></a>9.8. How to fetch files from HTTPS sites</h2></div></div></div>
3070<p>Some fetch tools are not prepared to support HTTPS by default 3080<p>Some fetch tools are not prepared to support HTTPS by default
3071(for example, the one in NetBSD 6.0), or the one installed by the 3081(for example, the one in NetBSD 6.0), or the one installed by the
3072pkgsrc bootstrap (to avoid an openssl dependency that low in the 3082pkgsrc bootstrap (to avoid an openssl dependency that low in the
3073dependency graph).</p> 3083dependency graph).</p>
3074<p>Usually you won't notice, because distribution files are 3084<p>Usually you won't notice, because distribution files are
3075mirrored weekly to <span class="quote">&#8220;<span class="quote">ftp.NetBSD.org</span>&#8221;</span>, but that might not 3085mirrored weekly to <span class="quote">&#8220;<span class="quote">ftp.NetBSD.org</span>&#8221;</span>, but that might not
3076be often enough if you are following pkgsrc-current. In that case, set 3086be often enough if you are following pkgsrc-current. In that case, set
3077<code class="varname">FETCH_USING</code> in your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file to 3087<code class="varname">FETCH_USING</code> in your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file to
3078<span class="quote">&#8220;<span class="quote">curl</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">wget</span>&#8221;</span>, which are both compiled 3088<span class="quote">&#8220;<span class="quote">curl</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">wget</span>&#8221;</span>, which are both compiled
3079with HTTPS support by default. Of course, these tools need to be 3089with HTTPS support by default. Of course, these tools need to be
3080installed before you can use them this way.</p> 3090installed before you can use them this way.</p>
3081</div> 3091</div>
3082<div class="sect1"> 3092<div class="sect1">
3083<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3093<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3084<a name="passive-ftp"></a>9.8. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</h2></div></div></div> 3094<a name="passive-ftp"></a>9.9. How do I tell <span class="command"><strong>make fetch</strong></span> to do passive FTP?</h2></div></div></div>
3085<p>This depends on which utility is used to retrieve distfiles. From 3095<p>This depends on which utility is used to retrieve distfiles. From
3086<code class="filename">bsd.pkg.mk</code>, <code class="varname">FETCH_CMD</code> is assigned 3096<code class="filename">bsd.pkg.mk</code>, <code class="varname">FETCH_CMD</code> is assigned
3087the first available command from the following list:</p> 3097the first available command from the following list:</p>
3088<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 3098<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
3089<li class="listitem"><p><code class="filename">${LOCALBASE}/bin/ftp</code></p></li> 3099<li class="listitem"><p><code class="filename">${LOCALBASE}/bin/ftp</code></p></li>
3090<li class="listitem"><p><code class="filename">/usr/bin/ftp</code></p></li> 3100<li class="listitem"><p><code class="filename">/usr/bin/ftp</code></p></li>
3091</ul></div> 3101</ul></div>
3092<p>On a default NetBSD installation, this will be 3102<p>On a default NetBSD installation, this will be
3093<code class="filename">/usr/bin/ftp</code>, which automatically tries passive 3103<code class="filename">/usr/bin/ftp</code>, which automatically tries passive
3094connections first, and falls back to active connections if the server 3104connections first, and falls back to active connections if the server
3095refuses to do passive. For the other tools, add the following to your 3105refuses to do passive. For the other tools, add the following to your
3096<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file: 3106<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a> file:
3097<code class="varname">PASSIVE_FETCH=1</code>.</p> 3107<code class="varname">PASSIVE_FETCH=1</code>.</p>
3098<p>Having that option present will prevent 3108<p>Having that option present will prevent
3099<code class="filename">/usr/bin/ftp</code> from falling back to active 3109<code class="filename">/usr/bin/ftp</code> from falling back to active
3100transfers.</p> 3110transfers.</p>
3101</div> 3111</div>
3102<div class="sect1"> 3112<div class="sect1">
3103<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3113<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3104<a name="fetching-all-distfiles"></a>9.9. How to fetch all distfiles at once</h2></div></div></div> 3114<a name="fetching-all-distfiles"></a>9.10. How to fetch all distfiles at once</h2></div></div></div>
3105<p>You would like to download all the distfiles in a single batch 3115<p>You would like to download all the distfiles in a single batch
3106from work or university, where you can't run a <span class="command"><strong>make 3116from work or university, where you can't run a <span class="command"><strong>make
3107fetch</strong></span>. There is an archive of distfiles on <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/" target="_top">ftp.NetBSD.org</a>, 3117fetch</strong></span>. There is an archive of distfiles on <a class="ulink" href="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/" target="_top">ftp.NetBSD.org</a>,
3108but downloading the entire directory may not be appropriate.</p> 3118but downloading the entire directory may not be appropriate.</p>
3109<p>The answer here is to do a <span class="command"><strong>make fetch-list</strong></span> in 3119<p>The answer here is to do a <span class="command"><strong>make fetch-list</strong></span> in
3110<code class="filename">/usr/pkgsrc</code> or one of its subdirectories, carry the 3120<code class="filename">/usr/pkgsrc</code> or one of its subdirectories, carry the
3111resulting list to your machine at work/school and use it there. If you 3121resulting list to your machine at work/school and use it there. If you
3112don't have a NetBSD-compatible <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?ftp+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">ftp</span>(1)</span></a> (like tnftp) at work, don't 3122don't have a NetBSD-compatible <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?ftp+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">ftp</span>(1)</span></a> (like tnftp) at work, don't
3113forget to set <code class="varname">FETCH_CMD</code> to something that fetches a 3123forget to set <code class="varname">FETCH_CMD</code> to something that fetches a
3114URL:</p> 3124URL:</p>
3115<p>At home:</p> 3125<p>At home:</p>
3116<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cd /usr/pkgsrc</code></strong> 3126<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cd /usr/pkgsrc</code></strong>
3117<code class="prompt">%</code> <strong class="userinput"><code>make fetch-list FETCH_CMD=wget DISTDIR=/tmp/distfiles &gt;/tmp/fetch.sh</code></strong> 3127<code class="prompt">%</code> <strong class="userinput"><code>make fetch-list FETCH_CMD=wget DISTDIR=/tmp/distfiles &gt;/tmp/fetch.sh</code></strong>
@@ -3123,93 +3133,93 @@ home.

 @@ -3123,93 +3133,93 @@ home.

3123<p>If you have a machine running NetBSD, and you want to get 3133<p>If you have a machine running NetBSD, and you want to get
3124<span class="emphasis"><em>all</em></span> distfiles (even ones that aren't for your 3134<span class="emphasis"><em>all</em></span> distfiles (even ones that aren't for your
3125machine architecture), you can do so by using the above-mentioned 3135machine architecture), you can do so by using the above-mentioned
3126<span class="command"><strong>make fetch-list</strong></span> approach, or fetch the distfiles 3136<span class="command"><strong>make fetch-list</strong></span> approach, or fetch the distfiles
3127directly by running:</p> 3137directly by running:</p>
3128<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make mirror-distfiles</code></strong></pre> 3138<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make mirror-distfiles</code></strong></pre>
3129<p>If you even decide to ignore 3139<p>If you even decide to ignore
3130<code class="varname">NO_{SRC,BIN}_ON_{FTP,CDROM}</code>, then you can get everything 3140<code class="varname">NO_{SRC,BIN}_ON_{FTP,CDROM}</code>, then you can get everything
3131by running:</p> 3141by running:</p>
3132<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make fetch NO_SKIP=yes</code></strong></pre> 3142<pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make fetch NO_SKIP=yes</code></strong></pre>
3133</div> 3143</div>
3134<div class="sect1"> 3144<div class="sect1">
3135<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3145<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3136<a name="tmac.andoc-missing"></a>9.10. What does <span class="quote">&#8220;<span class="quote">Don't know how to make 3146<a name="tmac.andoc-missing"></a>9.11. What does <span class="quote">&#8220;<span class="quote">Don't know how to make
3137/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</h2></div></div></div> 3147/usr/share/tmac/tmac.andoc</span>&#8221;</span> mean?</h2></div></div></div>
3138<p>When compiling the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a> 3148<p>When compiling the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a>
3139package, you get the error from make that it doesn't know how to make 3149package, you get the error from make that it doesn't know how to make
3140<code class="filename">/usr/share/tmac/tmac.andoc</code>? This indicates that 3150<code class="filename">/usr/share/tmac/tmac.andoc</code>? This indicates that
3141you don't have installed the <span class="quote">&#8220;<span class="quote">text</span>&#8221;</span> set (nroff, ...) from 3151you don't have installed the <span class="quote">&#8220;<span class="quote">text</span>&#8221;</span> set (nroff, ...) from
3142the NetBSD base distribution on your machine. It is recommended to do 3152the NetBSD base distribution on your machine. It is recommended to do
3143that to format man pages.</p> 3153that to format man pages.</p>
3144<p>In the case of the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a> package, you 3154<p>In the case of the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a> package, you
3145can get away with setting <code class="varname">NOMAN=YES</code> either in the 3155can get away with setting <code class="varname">NOMAN=YES</code> either in the
3146environment or in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p> 3156environment or in <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>.</p>
3147</div> 3157</div>
3148<div class="sect1"> 3158<div class="sect1">
3149<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3159<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3150<a name="bsd.own.mk-missing"></a>9.11. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</h2></div></div></div> 3160<a name="bsd.own.mk-missing"></a>9.12. What does <span class="quote">&#8220;<span class="quote">Could not find bsd.own.mk</span>&#8221;</span> mean?</h2></div></div></div>
3151<p>You didn't install the compiler set, <code class="filename">comp.tgz</code>, 3161<p>You didn't install the compiler set, <code class="filename">comp.tgz</code>,
3152when you installed your NetBSD machine. Please get and install it, by 3162when you installed your NetBSD machine. Please get and install it, by
3153extracting it in <code class="filename">/</code>:</p> 3163extracting it in <code class="filename">/</code>:</p>
3154<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cd /</code></strong> 3164<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cd /</code></strong>
3155<code class="prompt">#</code> <strong class="userinput"><code>tar --unlink -zxvpf .../comp.tgz</code></strong></pre> 3165<code class="prompt">#</code> <strong class="userinput"><code>tar --unlink -zxvpf .../comp.tgz</code></strong></pre>
3156<p><code class="filename">comp.tgz</code> is part of every NetBSD release. Get 3166<p><code class="filename">comp.tgz</code> is part of every NetBSD release. Get
3157the one that corresponds to your release (determine via <span class="command"><strong>uname 3167the one that corresponds to your release (determine via <span class="command"><strong>uname
3158-r</strong></span>).</p> 3168-r</strong></span>).</p>
3159</div> 3169</div>
3160<div class="sect1"> 3170<div class="sect1">
3161<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3171<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3162<a name="using-sudo-with-pkgsrc"></a>9.12. Using 'sudo' with pkgsrc</h2></div></div></div> 3172<a name="using-sudo-with-pkgsrc"></a>9.13. Using 'sudo' with pkgsrc</h2></div></div></div>
3163<p>When installing packages as non-root user and using the just-in-time 3173<p>When installing packages as non-root user and using the just-in-time
3164<a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?su+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">su</span>(1)</span></a> feature of pkgsrc, it can become annoying to type in the root 3174<a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?su+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">su</span>(1)</span></a> feature of pkgsrc, it can become annoying to type in the root
3165password for each required package installed. To avoid this, the sudo 3175password for each required package installed. To avoid this, the sudo
3166package can be used, which does password caching over a limited time. To 3176package can be used, which does password caching over a limited time. To
3167use it, install sudo (either as binary package or from 3177use it, install sudo (either as binary package or from
3168<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/sudo/README.html" target="_top"><code class="filename">security/sudo</code></a>) and then put the 3178<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/sudo/README.html" target="_top"><code class="filename">security/sudo</code></a>) and then put the
3169following into your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, somewhere 3179following into your <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, somewhere
3170<span class="emphasis"><em>after</em></span> the definition of the 3180<span class="emphasis"><em>after</em></span> the definition of the
3171<code class="varname">LOCALBASE</code> variable:</p> 3181<code class="varname">LOCALBASE</code> variable:</p>
3172<pre class="programlisting"> 3182<pre class="programlisting">
3173.if exists(${LOCALBASE}/bin/sudo) 3183.if exists(${LOCALBASE}/bin/sudo)
3174SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c 3184SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
3175.endif 3185.endif
3176</pre> 3186</pre>
3177</div> 3187</div>
3178<div class="sect1"> 3188<div class="sect1">
3179<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3189<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3180<a name="faq.conf"></a>9.13. How do I change the location of configuration files?</h2></div></div></div> 3190<a name="faq.conf"></a>9.14. How do I change the location of configuration files?</h2></div></div></div>
3181<p>As the system administrator, you can choose where configuration files 3191<p>As the system administrator, you can choose where configuration files
3182are installed. The default settings make all these files go into 3192are installed. The default settings make all these files go into
3183<code class="filename">${PREFIX}/etc</code> or some of its subdirectories; this may 3193<code class="filename">${PREFIX}/etc</code> or some of its subdirectories; this may
3184be suboptimal depending on your expectations (e.g., a read-only, 3194be suboptimal depending on your expectations (e.g., a read-only,
3185NFS-exported <code class="varname">PREFIX</code> with a need of per-machine 3195NFS-exported <code class="varname">PREFIX</code> with a need of per-machine
3186configuration of the provided packages).</p> 3196configuration of the provided packages).</p>
3187<p>In order to change the defaults, you can modify the 3197<p>In order to change the defaults, you can modify the
3188<code class="varname">PKG_SYSCONFBASE</code> variable (in 3198<code class="varname">PKG_SYSCONFBASE</code> variable (in
3189<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>) to point to your preferred configuration 3199<a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>) to point to your preferred configuration
3190directory; some common examples include <code class="filename">/etc</code> or 3200directory; some common examples include <code class="filename">/etc</code> or
3191<code class="filename">/etc/pkg</code>.</p> 3201<code class="filename">/etc/pkg</code>.</p>
3192<p>Furthermore, you can change this value on a per-package basis by 3202<p>Furthermore, you can change this value on a per-package basis by
3193setting the <code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code> variable. 3203setting the <code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code> variable.
3194<code class="varname">PKG_SYSCONFVAR</code>'s value usually matches the name of the 3204<code class="varname">PKG_SYSCONFVAR</code>'s value usually matches the name of the
3195package you would like to modify, that is, the contents of 3205package you would like to modify, that is, the contents of
3196<code class="varname">PKGBASE</code>.</p> 3206<code class="varname">PKGBASE</code>.</p>
3197<p>Note that after changing these settings, you must rebuild and 3207<p>Note that after changing these settings, you must rebuild and
3198reinstall any affected packages.</p> 3208reinstall any affected packages.</p>
3199</div> 3209</div>
3200<div class="sect1"> 3210<div class="sect1">
3201<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3211<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3202<a name="audit-packages"></a>9.14. Automated security checks</h2></div></div></div> 3212<a name="audit-packages"></a>9.15. Automated security checks</h2></div></div></div>
3203<p>Please be aware that there can often be bugs in third-party software, 3213<p>Please be aware that there can often be bugs in third-party software,
3204and some of these bugs can leave a machine vulnerable to exploitation by 3214and some of these bugs can leave a machine vulnerable to exploitation by
3205attackers. In an effort to lessen the exposure, the NetBSD packages team 3215attackers. In an effort to lessen the exposure, the NetBSD packages team
3206maintains a database of known-exploits to packages which have at one time 3216maintains a database of known-exploits to packages which have at one time
3207been included in pkgsrc. The database can be downloaded automatically, and 3217been included in pkgsrc. The database can be downloaded automatically, and
3208a security audit of all packages installed on a system can take place. To 3218a security audit of all packages installed on a system can take place. To
3209do this, refer to the following two tools (installed as part of the 3219do this, refer to the following two tools (installed as part of the
3210<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a> package):</p> 3220<a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_install/README.html" target="_top"><code class="filename">pkgtools/pkg_install</code></a> package):</p>
3211<div class="orderedlist"><ol class="orderedlist" type="1"> 3221<div class="orderedlist"><ol class="orderedlist" type="1">
3212<li class="listitem"> 3222<li class="listitem">
3213<p><span class="command"><strong>pkg_admin fetch-pkg-vulnerabilities</strong></span>, an easy way to 3223<p><span class="command"><strong>pkg_admin fetch-pkg-vulnerabilities</strong></span>, an easy way to
3214 download a list of the security vulnerabilities information. This list 3224 download a list of the security vulnerabilities information. This list
3215 is kept up to date by the pkgsrc security team, and is distributed 3225 is kept up to date by the pkgsrc security team, and is distributed
@@ -3222,70 +3232,70 @@ do this, refer to the following two tool @@ -3222,70 +3232,70 @@ do this, refer to the following two tool
3222 including a description of the type of vulnerability, and a URL 3232 including a description of the type of vulnerability, and a URL
3223 containing more information.</p></li> 3233 containing more information.</p></li>
3224</ol></div> 3234</ol></div>
3225<p>Use of these tools is strongly recommended! After 3235<p>Use of these tools is strongly recommended! After
3226<span class="quote">&#8220;<span class="quote">pkg_install</span>&#8221;</span> is installed, please read 3236<span class="quote">&#8220;<span class="quote">pkg_install</span>&#8221;</span> is installed, please read
3227the package's message, which you can get by running <strong class="userinput"><code>pkg_info -D 3237the package's message, which you can get by running <strong class="userinput"><code>pkg_info -D
3228pkg_install</code></strong>.</p> 3238pkg_install</code></strong>.</p>
3229<p>If this package is installed, pkgsrc builds will use it to 3239<p>If this package is installed, pkgsrc builds will use it to
3230perform a security check before building any package. See <a class="xref" href="#variables-affecting-build" title="5.2. Variables affecting the build process">Section 5.2, &#8220;Variables affecting the build process&#8221;</a> for ways to control this 3240perform a security check before building any package. See <a class="xref" href="#variables-affecting-build" title="5.2. Variables affecting the build process">Section 5.2, &#8220;Variables affecting the build process&#8221;</a> for ways to control this
3231check.</p> 3241check.</p>
3232</div> 3242</div>
3233<div class="sect1"> 3243<div class="sect1">
3234<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3244<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3235<a name="ufaq-cflags"></a>9.15. Why do some packages ignore my <code class="varname">CFLAGS</code>?</h2></div></div></div> 3245<a name="ufaq-cflags"></a>9.16. Why do some packages ignore my <code class="varname">CFLAGS</code>?</h2></div></div></div>
3236<p>When you add your own preferences to the 3246<p>When you add your own preferences to the
3237 <code class="varname">CFLAGS</code> variable in your 3247 <code class="varname">CFLAGS</code> variable in your
3238 <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, these flags are passed in 3248 <a class="link" href="#mk.conf"><code class="filename">mk.conf</code></a>, these flags are passed in
3239 environment variables to the <code class="filename">./configure</code> 3249 environment variables to the <code class="filename">./configure</code>
3240 scripts and to <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>. Some package authors ignore the 3250 scripts and to <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>. Some package authors ignore the
3241 <code class="varname">CFLAGS</code> from the environment variable by 3251 <code class="varname">CFLAGS</code> from the environment variable by
3242 overriding them in the <code class="filename">Makefile</code>s of their 3252 overriding them in the <code class="filename">Makefile</code>s of their
3243 package.</p> 3253 package.</p>
3244<p>Currently there is no solution to this problem. If you 3254<p>Currently there is no solution to this problem. If you
3245 really need the package to use your <code class="varname">CFLAGS</code> 3255 really need the package to use your <code class="varname">CFLAGS</code>
3246 you should run <span class="command"><strong>make patch</strong></span> in the package 3256 you should run <span class="command"><strong>make patch</strong></span> in the package
3247 directory and then inspect any <code class="filename">Makefile</code> and 3257 directory and then inspect any <code class="filename">Makefile</code> and
3248 <code class="filename">Makefile.in</code> for whether they define 3258 <code class="filename">Makefile.in</code> for whether they define
3249 <code class="varname">CFLAGS</code> explicitly. Usually you can remove 3259 <code class="varname">CFLAGS</code> explicitly. Usually you can remove
3250 these lines. But be aware that some <span class="quote">&#8220;<span class="quote">smart</span>&#8221;</span> 3260 these lines. But be aware that some <span class="quote">&#8220;<span class="quote">smart</span>&#8221;</span>
3251 programmers write so bad code that it only works for the 3261 programmers write so bad code that it only works for the
3252 specific combination of <code class="varname">CFLAGS</code> they have 3262 specific combination of <code class="varname">CFLAGS</code> they have
3253 chosen.</p> 3263 chosen.</p>
3254</div> 3264</div>
3255<div class="sect1"> 3265<div class="sect1">
3256<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3266<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3257<a name="ufaq-fail"></a>9.16. A package does not build. What shall I do?</h2></div></div></div> 3267<a name="ufaq-fail"></a>9.17. A package does not build. What shall I do?</h2></div></div></div>
3258<div class="procedure"><ol class="procedure" type="1"> 3268<div class="procedure"><ol class="procedure" type="1">
3259<li class="step"><p>Make sure that your copy of pkgsrc is consistent. A 3269<li class="step"><p>Make sure that your copy of pkgsrc is consistent. A
3260 case that occurs often is that people only update pkgsrc in 3270 case that occurs often is that people only update pkgsrc in
3261 parts, because of performance reasons. Since pkgsrc is one large 3271 parts, because of performance reasons. Since pkgsrc is one large
3262 system, not a collection of many small systems, there are 3272 system, not a collection of many small systems, there are
3263 sometimes changes that only work when the whole pkgsrc tree is 3273 sometimes changes that only work when the whole pkgsrc tree is
3264 updated.</p></li> 3274 updated.</p></li>
3265<li class="step"><p>Make sure that you don't have any CVS conflicts. 3275<li class="step"><p>Make sure that you don't have any CVS conflicts.
3266 Search for <span class="quote">&#8220;<span class="quote">&lt;&lt;&lt;&lt;&lt;&lt;</span>&#8221;</span> or 3276 Search for <span class="quote">&#8220;<span class="quote">&lt;&lt;&lt;&lt;&lt;&lt;</span>&#8221;</span> or
3267 <span class="quote">&#8220;<span class="quote">&gt;&gt;&gt;&gt;&gt;&gt;</span>&#8221;</span> in all your pkgsrc 3277 <span class="quote">&#8220;<span class="quote">&gt;&gt;&gt;&gt;&gt;&gt;</span>&#8221;</span> in all your pkgsrc
3268 files.</p></li> 3278 files.</p></li>
3269<li class="step"><p>Make sure that you don't have old copies of the packages 3279<li class="step"><p>Make sure that you don't have old copies of the packages
3270 extracted. Run <span class="command"><strong>make clean clean-depends</strong></span> to 3280 extracted. Run <span class="command"><strong>make clean clean-depends</strong></span> to
3271 verify this.</p></li> 3281 verify this.</p></li>
3272<li class="step"><p>If the problem still exists, write a mail to the 3282<li class="step"><p>If the problem still exists, write a mail to the
3273 <code class="literal">pkgsrc-users</code> mailing list.</p></li> 3283 <code class="literal">pkgsrc-users</code> mailing list.</p></li>
3274</ol></div> 3284</ol></div>
3275</div> 3285</div>
3276<div class="sect1"> 3286<div class="sect1">
3277<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 3287<div class="titlepage"><div><div><h2 class="title" style="clear: both">
3278<a name="faq.rcs-conflicts"></a>9.17. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</h2></div></div></div> 3288<a name="faq.rcs-conflicts"></a>9.18. What does <span class="quote">&#8220;<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>&#8221;</span> mean?</h2></div></div></div>
3279<p>You have modified a file from pkgsrc, and someone else has 3289<p>You have modified a file from pkgsrc, and someone else has
3280modified that same file afterwards in the CVS repository. Both changes 3290modified that same file afterwards in the CVS repository. Both changes
3281are in the same region of the file, so when you updated pkgsrc, the 3291are in the same region of the file, so when you updated pkgsrc, the
3282<code class="literal">cvs</code> command marked the conflicting changes in the 3292<code class="literal">cvs</code> command marked the conflicting changes in the
3283file. Because of these markers, the file is no longer a valid 3293file. Because of these markers, the file is no longer a valid
3284<code class="filename">Makefile</code>.</p> 3294<code class="filename">Makefile</code>.</p>
3285<p>Have a look at that file, and if you don't need your local changes 3295<p>Have a look at that file, and if you don't need your local changes
3286anymore, you can remove that file and run <span class="command"><strong>cvs -q update 3296anymore, you can remove that file and run <span class="command"><strong>cvs -q update
3287-dP</strong></span> in that directory to download the current version.</p> 3297-dP</strong></span> in that directory to download the current version.</p>
3288</div> 3298</div>
3289</div> 3299</div>
3290</div> 3300</div>
3291<div class="part"> 3301<div class="part">
@@ -5310,31 +5320,33 @@ BUILDLINK_TREE+= -tiff @@ -5310,31 +5320,33 @@ BUILDLINK_TREE+= -tiff
5310 (not shown above) is a shell pipeline that 5320 (not shown above) is a shell pipeline that
5311 outputs to stdout a list of files relative to 5321 outputs to stdout a list of files relative to
5312 <code class="filename">${BUILDLINK_PREFIX.<em class="replaceable"><code>pkg</code></em>}</code>. 5322 <code class="filename">${BUILDLINK_PREFIX.<em class="replaceable"><code>pkg</code></em>}</code>.
5313 The resulting files are to be symlinked 5323 The resulting files are to be symlinked
5314 into <code class="filename">${BUILDLINK_DIR}</code>. By default, 5324 into <code class="filename">${BUILDLINK_DIR}</code>. By default,
5315 this takes the <code class="filename">+CONTENTS</code> of a 5325 this takes the <code class="filename">+CONTENTS</code> of a
5316 <em class="replaceable"><code>pkg</code></em> and filters it through 5326 <em class="replaceable"><code>pkg</code></em> and filters it through
5317 <code class="varname">${BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em>}</code>.</p></li> 5327 <code class="varname">${BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em>}</code>.</p></li>
5318<li class="listitem"><p><code class="varname">BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em></code> 5328<li class="listitem"><p><code class="varname">BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em></code>
5319 (not shown above) is a filter command that filters 5329 (not shown above) is a filter command that filters
5320 <code class="filename">+CONTENTS</code> input into a list of files 5330 <code class="filename">+CONTENTS</code> input into a list of files
5321 relative to 5331 relative to
5322 <code class="filename">${BUILDLINK_PREFIX.<em class="replaceable"><code>pkg</code></em>}</code> 5332 <code class="filename">${BUILDLINK_PREFIX.<em class="replaceable"><code>pkg</code></em>}</code>
5323 on stdout. By default, 5333 on stdout. By default for overwrite packages,
5324 <code class="varname">BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em></code> 5334 <code class="varname">BUILDLINK_CONTENTS_FILTER.<em class="replaceable"><code>pkg</code></em></code>
5325 outputs the contents of the <code class="filename">include</code> 5335 outputs the contents of the <code class="filename">include</code>
5326 and <code class="filename">lib</code> directories in the package 5336 and <code class="filename">lib</code> directories in the package
5327 <code class="filename">+CONTENTS</code>.</p></li> 5337 <code class="filename">+CONTENTS</code>, and for pkgviews packages,
 5338 it outputs any libtool archives in
 5339 <code class="filename">lib</code> directories.</p></li>
5328<li class="listitem"><p><code class="varname">BUILDLINK_FNAME_TRANSFORM.<em class="replaceable"><code>pkg</code></em></code> 5340<li class="listitem"><p><code class="varname">BUILDLINK_FNAME_TRANSFORM.<em class="replaceable"><code>pkg</code></em></code>
5329 (not shown above) is a list of sed arguments used to 5341 (not shown above) is a list of sed arguments used to
5330 transform the name of the source filename into a 5342 transform the name of the source filename into a
5331 destination filename, e.g. <span class="command"><strong>-e 5343 destination filename, e.g. <span class="command"><strong>-e
5332 "s|/curses.h|/ncurses.h|g"</strong></span>.</p></li> 5344 "s|/curses.h|/ncurses.h|g"</strong></span>.</p></li>
5333</ul></div> 5345</ul></div>
5334<p>This section can additionally include any 5346<p>This section can additionally include any
5335 <code class="filename">buildlink3.mk</code> needed for 5347 <code class="filename">buildlink3.mk</code> needed for
5336 <em class="replaceable"><code>pkg</code></em>'s library dependencies. 5348 <em class="replaceable"><code>pkg</code></em>'s library dependencies.
5337 Including these <code class="filename">buildlink3.mk</code> files 5349 Including these <code class="filename">buildlink3.mk</code> files
5338 means that the headers and libraries for these 5350 means that the headers and libraries for these
5339 dependencies are also symlinked into 5351 dependencies are also symlinked into
5340 <code class="filename">${BUILDLINK_DIR}</code> 5352 <code class="filename">${BUILDLINK_DIR}</code>
@@ -7326,67 +7338,67 @@ the name of the common tools. For exampl @@ -7326,67 +7338,67 @@ the name of the common tools. For exampl
7326.if exists(/usr/bin/bzcat) 7338.if exists(/usr/bin/bzcat)
7327TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat 7339TOOLS_PLATFORM.bzcat?= /usr/bin/bzcat
7328.elif exists(/usr/bin/bzip2) 7340.elif exists(/usr/bin/bzip2)
7329TOOLS_PLATFORM.bzcat?= /usr/bin/bzip2 -cd 7341TOOLS_PLATFORM.bzcat?= /usr/bin/bzip2 -cd
7330.endif 7342.endif
7331 7343
7332TOOLS_PLATFORM.true?= true # shell builtin 7344TOOLS_PLATFORM.true?= true # shell builtin
7333</pre> 7345</pre>
7334</div> 7346</div>
7335<div class="sect1"> 7347<div class="sect1">
7336<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 7348<div class="titlepage"><div><div><h2 class="title" style="clear: both">
7337<a name="tools.questions"></a>18.4. Questions regarding the tools</h2></div></div></div> 7349<a name="tools.questions"></a>18.4. Questions regarding the tools</h2></div></div></div>
7338<div class="qandaset"> 7350<div class="qandaset">
7339<a name="idm77719184"></a><dl> 7351<a name="idm77799312"></a><dl>
7340<dt>18.4.1. <a href="#tools.new">How do I add a new tool?</a> 7352<dt>18.4.1. <a href="#tools.new">How do I add a new tool?</a>
7341</dt> 7353</dt>
7342<dt>18.4.2. <a href="#tools.listall">How do I get a list of all available 7354<dt>18.4.2. <a href="#tools.listall">How do I get a list of all available
7343 tools?</a> 7355 tools?</a>
7344</dt> 7356</dt>
7345<dt>18.4.3. <a href="#tools.used">How can I get a list of all the tools that a 7357<dt>18.4.3. <a href="#tools.used">How can I get a list of all the tools that a
7346 package is using while being built? I want to know whether it 7358 package is using while being built? I want to know whether it
7347 uses sed or not.</a> 7359 uses sed or not.</a>
7348</dt> 7360</dt>
7349</dl> 7361</dl>
7350<table border="0" style="width: 100%;"> 7362<table border="0" style="width: 100%;">
7351<colgroup> 7363<colgroup>
7352<col align="left" width="1%"> 7364<col align="left" width="1%">
7353<col> 7365<col>
7354</colgroup> 7366</colgroup>
7355<tbody> 7367<tbody>
7356<tr class="question"> 7368<tr class="question">
7357<td align="left" valign="top"> 7369<td align="left" valign="top">
7358<a name="tools.new"></a><a name="idm77718800"></a><p><b>18.4.1.</b></p> 7370<a name="tools.new"></a><a name="idm77798928"></a><p><b>18.4.1.</b></p>
7359</td> 7371</td>
7360<td align="left" valign="top"><p>How do I add a new tool?</p></td> 7372<td align="left" valign="top"><p>How do I add a new tool?</p></td>
7361</tr> 7373</tr>
7362<tr class="answer"> 7374<tr class="answer">
7363<td align="left" valign="top"></td> 7375<td align="left" valign="top"></td>
7364<td align="left" valign="top"><p>TODO</p></td> 7376<td align="left" valign="top"><p>TODO</p></td>
7365</tr> 7377</tr>
7366<tr class="question"> 7378<tr class="question">
7367<td align="left" valign="top"> 7379<td align="left" valign="top">
7368<a name="tools.listall"></a><a name="idm77717776"></a><p><b>18.4.2.</b></p> 7380<a name="tools.listall"></a><a name="idm77797904"></a><p><b>18.4.2.</b></p>
7369</td> 7381</td>
7370<td align="left" valign="top"><p>How do I get a list of all available 7382<td align="left" valign="top"><p>How do I get a list of all available
7371 tools?</p></td> 7383 tools?</p></td>
7372</tr> 7384</tr>
7373<tr class="answer"> 7385<tr class="answer">
7374<td align="left" valign="top"></td> 7386<td align="left" valign="top"></td>
7375<td align="left" valign="top"><p>TODO</p></td> 7387<td align="left" valign="top"><p>TODO</p></td>
7376</tr> 7388</tr>
7377<tr class="question"> 7389<tr class="question">
7378<td align="left" valign="top"> 7390<td align="left" valign="top">
7379<a name="tools.used"></a><a name="idm77716752"></a><p><b>18.4.3.</b></p> 7391<a name="tools.used"></a><a name="idm77796752"></a><p><b>18.4.3.</b></p>
7380</td> 7392</td>
7381<td align="left" valign="top"><p>How can I get a list of all the tools that a 7393<td align="left" valign="top"><p>How can I get a list of all the tools that a
7382 package is using while being built? I want to know whether it 7394 package is using while being built? I want to know whether it
7383 uses sed or not.</p></td> 7395 uses sed or not.</p></td>
7384</tr> 7396</tr>
7385<tr class="answer"> 7397<tr class="answer">
7386<td align="left" valign="top"></td> 7398<td align="left" valign="top"></td>
7387<td align="left" valign="top"><p>Currently, you can't. (TODO: But I want to be able 7399<td align="left" valign="top"><p>Currently, you can't. (TODO: But I want to be able
7388 to do it.)</p></td> 7400 to do it.)</p></td>
7389</tr> 7401</tr>
7390</tbody> 7402</tbody>
7391</table> 7403</table>
7392</div> 7404</div>
@@ -7882,29 +7894,40 @@ DEPENDS+= {perl>=5.10.0,p5-version-[0 @@ -7882,29 +7894,40 @@ DEPENDS+= {perl>=5.10.0,p5-version-[0
7882CONFLICTS= baz-[0-9]* 7894CONFLICTS= baz-[0-9]*
7883 </pre> 7895 </pre>
7884<p>and in <code class="filename">pkgsrc/foo/baz/Makefile</code>:</p> 7896<p>and in <code class="filename">pkgsrc/foo/baz/Makefile</code>:</p>
7885<pre class="programlisting"> 7897<pre class="programlisting">
7886CONFLICTS= bar-[0-9]* 7898CONFLICTS= bar-[0-9]*
7887 </pre> 7899 </pre>
7888</div> 7900</div>
7889<div class="sect2"> 7901<div class="sect2">
7890<div class="titlepage"><div><div><h3 class="title"> 7902<div class="titlepage"><div><div><h3 class="title">
7891<a name="not-building-packages"></a>19.1.8. Packages that cannot or should not be built</h3></div></div></div> 7903<a name="not-building-packages"></a>19.1.8. Packages that cannot or should not be built</h3></div></div></div>
7892<p>There are several reasons why a package might be 7904<p>There are several reasons why a package might be
7893 instructed to not build under certain circumstances. If the 7905 instructed to not build under certain circumstances. If the
7894 package builds and runs on most platforms, the exceptions 7906 package builds and runs on most platforms, the exceptions
7895 should be noted with <code class="varname">NOT_FOR_PLATFORM</code>. If 7907 should be noted with <code class="varname">BROKEN_ON_PLATFORM</code>. If
7896 the package builds and runs on a small handful of platforms, 7908 the package builds and runs on a small handful of platforms,
7897 set <code class="varname">ONLY_FOR_PLATFORM</code> instead. 7909 set <code class="varname">BROKEN_EXCEPT_ON_PLATFORM</code> instead.
 7910 Both <code class="varname">BROKEN_ON_PLATFORM</code> and
 7911 <code class="varname">BROKEN_EXCEPT_ON_PLATFORM</code> are OS triples
 7912 (OS-version-platform) that can use glob-style
 7913 wildcards.</p>
 7914<p>If a package is not appropriate for some platforms (as
 7915 oopposed to merely broken), a different set of variables should be
 7916 used as this affects failure reporting and statistics.
 7917 If the package is appropriate for most platforms, the exceptions
 7918 should be noted with <code class="varname">NOT_FOR_PLATFORM</code>. If
 7919 the package is appropriate for only a small handful of platforms
 7920 (often exactly one), set <code class="varname">ONLY_FOR_PLATFORM</code> instead.
7898 Both <code class="varname">ONLY_FOR_PLATFORM</code> and 7921 Both <code class="varname">ONLY_FOR_PLATFORM</code> and
7899 <code class="varname">NOT_FOR_PLATFORM</code> are OS triples 7922 <code class="varname">NOT_FOR_PLATFORM</code> are OS triples
7900 (OS-version-platform) that can use glob-style 7923 (OS-version-platform) that can use glob-style
7901 wildcards.</p> 7924 wildcards.</p>
7902<p>Some packages are tightly bound to a specific version of an 7925<p>Some packages are tightly bound to a specific version of an
7903 operating system, e.g. LKMs or <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/lsof/README.html" target="_top"><code class="filename">sysutils/lsof</code></a>. Such binary packages are not 7926 operating system, e.g. LKMs or <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/sysutils/lsof/README.html" target="_top"><code class="filename">sysutils/lsof</code></a>. Such binary packages are not
7904 backwards compatible with other versions of the OS, and should be 7927 backwards compatible with other versions of the OS, and should be
7905 uploaded to a version specific directory on the FTP server. Mark 7928 uploaded to a version specific directory on the FTP server. Mark
7906 these packages by setting <code class="varname">OSVERSION_SPECIFIC</code> to 7929 these packages by setting <code class="varname">OSVERSION_SPECIFIC</code> to
7907 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. This variable is not currently used by any of 7930 <span class="quote">&#8220;<span class="quote">yes</span>&#8221;</span>. This variable is not currently used by any of
7908 the package system internals, but may be used in the 7931 the package system internals, but may be used in the
7909 future.</p> 7932 future.</p>
7910<p>If the package should be skipped (for example, because it 7933<p>If the package should be skipped (for example, because it
@@ -8462,26 +8485,27 @@ pre-configure: @@ -8462,26 +8485,27 @@ pre-configure:
8462/* non-BSD-specific code goes here */ 8485/* non-BSD-specific code goes here */
8463#endif 8486#endif
8464</pre> 8487</pre>
8465<p>If this distinction is not fine enough, you can also test 8488<p>If this distinction is not fine enough, you can also test
8466 for the following macros.</p> 8489 for the following macros.</p>
8467<pre class="programlisting"> 8490<pre class="programlisting">
8468Cygwin __CYGWIN__ 8491Cygwin __CYGWIN__
8469DragonFly __DragonFly__ 8492DragonFly __DragonFly__
8470FreeBSD __FreeBSD__ 8493FreeBSD __FreeBSD__
8471Haiku __HAIKU__ 8494Haiku __HAIKU__
8472Interix __INTERIX 8495Interix __INTERIX
8473IRIX __sgi (TODO: get a definite source for this) 8496IRIX __sgi (TODO: get a definite source for this)
8474Linux linux, __linux, __linux__ 8497Linux linux, __linux, __linux__
 8498Mac OS X __APPLE__
8475MirBSD __MirBSD__ (__OpenBSD__ is also defined) 8499MirBSD __MirBSD__ (__OpenBSD__ is also defined)
8476Minix3 __minix 8500Minix3 __minix
8477NetBSD __NetBSD__ 8501NetBSD __NetBSD__
8478OpenBSD __OpenBSD__ 8502OpenBSD __OpenBSD__
8479Solaris sun, __sun 8503Solaris sun, __sun
8480</pre> 8504</pre>
8481</div> 8505</div>
8482<div class="sect3"> 8506<div class="sect3">
8483<div class="titlepage"><div><div><h4 class="title"> 8507<div class="titlepage"><div><div><h4 class="title">
8484<a name="fixes.build.cpp.arch"></a>19.5.1.2. C preprocessor macros to identify the hardware architecture</h4></div></div></div> 8508<a name="fixes.build.cpp.arch"></a>19.5.1.2. C preprocessor macros to identify the hardware architecture</h4></div></div></div>
8485<pre class="programlisting"> 8509<pre class="programlisting">
8486i386 i386, __i386, __i386__ 8510i386 i386, __i386, __i386__
8487MIPS __mips 8511MIPS __mips
@@ -8871,27 +8895,27 @@ PERL5_PACKLIST= auto/Pg/.packlist @@ -8871,27 +8895,27 @@ PERL5_PACKLIST= auto/Pg/.packlist
8871 instead of its <code class="filename">buildlink3.mk</code> file. This 8895 instead of its <code class="filename">buildlink3.mk</code> file. This
8872 takes care of rebuilding the GConf database at installation and 8896 takes care of rebuilding the GConf database at installation and
8873 deinstallation time, and tells the package where to install 8897 deinstallation time, and tells the package where to install
8874 GConf data files using some standard configure arguments. It 8898 GConf data files using some standard configure arguments. It
8875 also disallows any access to the database directly from the 8899 also disallows any access to the database directly from the
8876 package.</p></li> 8900 package.</p></li>
8877<li class="listitem"><p>Ensure that the package installs its 8901<li class="listitem"><p>Ensure that the package installs its
8878 <code class="filename">.schemas</code> files under 8902 <code class="filename">.schemas</code> files under
8879 <code class="filename">${PREFIX}/share/gconf/schemas</code>. If they get 8903 <code class="filename">${PREFIX}/share/gconf/schemas</code>. If they get
8880 installed under <code class="filename">${PREFIX}/etc</code>, you will 8904 installed under <code class="filename">${PREFIX}/etc</code>, you will
8881 need to manually patch the package.</p></li> 8905 need to manually patch the package.</p></li>
8882<li class="listitem"><p>Check the PLIST and remove any entries under the etc/gconf 8906<li class="listitem"><p>Check the PLIST and remove any entries under the etc/gconf
8883 directory, as they will be handled automatically. See 8907 directory, as they will be handled automatically. See
8884 <a class="xref" href="#faq.conf" title="9.13. How do I change the location of configuration files?">Section 9.13, &#8220;How do I change the location of configuration files?&#8221;</a> for more information.</p></li> 8908 <a class="xref" href="#faq.conf" title="9.14. How do I change the location of configuration files?">Section 9.14, &#8220;How do I change the location of configuration files?&#8221;</a> for more information.</p></li>
8885<li class="listitem"><p>Define the <code class="varname">GCONF_SCHEMAS</code> variable in 8909<li class="listitem"><p>Define the <code class="varname">GCONF_SCHEMAS</code> variable in
8886 your <code class="filename">Makefile</code> with a list of all 8910 your <code class="filename">Makefile</code> with a list of all
8887 <code class="filename">.schemas</code> files installed by the package, if 8911 <code class="filename">.schemas</code> files installed by the package, if
8888 any. Names must not contain any directories in them.</p></li> 8912 any. Names must not contain any directories in them.</p></li>
8889<li class="listitem"><p>Define the <code class="varname">GCONF_ENTRIES</code> variable in 8913<li class="listitem"><p>Define the <code class="varname">GCONF_ENTRIES</code> variable in
8890 your <code class="filename">Makefile</code> with a 8914 your <code class="filename">Makefile</code> with a
8891 list of all <code class="filename">.entries</code> files installed by the 8915 list of all <code class="filename">.entries</code> files installed by the
8892 package, if any. Names must not contain any directories in 8916 package, if any. Names must not contain any directories in
8893 them.</p></li> 8917 them.</p></li>
8894</ol></div> 8918</ol></div>
8895</div> 8919</div>
8896<div class="sect2"> 8920<div class="sect2">
8897<div class="titlepage"><div><div><h3 class="title"> 8921<div class="titlepage"><div><div><h3 class="title">
@@ -9449,27 +9473,27 @@ place.

 @@ -9449,27 +9473,27 @@ place.

9449</li> 9473</li>
9450</ol></div> 9474</ol></div>
9451</div> 9475</div>
9452</div> 9476</div>
9453<div class="chapter"> 9477<div class="chapter">
9454<div class="titlepage"><div><div><h2 class="title"> 9478<div class="titlepage"><div><div><h2 class="title">
9455<a name="devfaq"></a>Chapter 22. Frequently Asked Questions</h2></div></div></div> 9479<a name="devfaq"></a>Chapter 22. Frequently Asked Questions</h2></div></div></div>
9456<p>This section contains the answers to questions that may 9480<p>This section contains the answers to questions that may
9457 arise when you are writing a package. If you don't find your 9481 arise when you are writing a package. If you don't find your
9458 question answered here, first have a look in the other chapters, 9482 question answered here, first have a look in the other chapters,
9459 and if you still don't have the answer, ask on the 9483 and if you still don't have the answer, ask on the
9460 <code class="literal">pkgsrc-users</code> mailing list.</p> 9484 <code class="literal">pkgsrc-users</code> mailing list.</p>
9461<div class="qandaset"> 9485<div class="qandaset">
9462<a name="idm77169424"></a><dl> 9486<a name="idm77235344"></a><dl>
9463<dt>22.1. <a href="#devfaq.makeflags">What is the difference between 9487<dt>22.1. <a href="#devfaq.makeflags">What is the difference between
9464 MAKEFLAGS, .MAKEFLAGS and 9488 MAKEFLAGS, .MAKEFLAGS and
9465 MAKE_FLAGS?</a> 9489 MAKE_FLAGS?</a>
9466</dt> 9490</dt>
9467<dt>22.2. <a href="#devfaq.make">What is the difference between 9491<dt>22.2. <a href="#devfaq.make">What is the difference between
9468 MAKE, GMAKE and 9492 MAKE, GMAKE and
9469 MAKE_PROGRAM?</a> 9493 MAKE_PROGRAM?</a>
9470</dt> 9494</dt>
9471<dt>22.3. <a href="#devfaq.cc">What is the difference between 9495<dt>22.3. <a href="#devfaq.cc">What is the difference between
9472 CC, PKG_CC and 9496 CC, PKG_CC and
9473 PKGSRC_COMPILER?</a> 9497 PKGSRC_COMPILER?</a>
9474</dt> 9498</dt>
9475<dt>22.4. <a href="#devfaq.bl3flags">What is the difference between 9499<dt>22.4. <a href="#devfaq.bl3flags">What is the difference between
@@ -9494,157 +9518,157 @@ place.

 @@ -9494,157 +9518,157 @@ place.

9494</dt> 9518</dt>
9495<dt>22.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I 9519<dt>22.9. <a href="#devfaq.too-much-time">I have a little time to kill. What shall I
9496do?</a> 9520do?</a>
9497</dt> 9521</dt>
9498</dl> 9522</dl>
9499<table border="0" style="width: 100%;"> 9523<table border="0" style="width: 100%;">
9500<colgroup> 9524<colgroup>
9501<col align="left" width="1%"> 9525<col align="left" width="1%">
9502<col> 9526<col>
9503</colgroup> 9527</colgroup>
9504<tbody> 9528<tbody>
9505<tr class="question"> 9529<tr class="question">
9506<td align="left" valign="top"> 9530<td align="left" valign="top">
9507<a name="devfaq.makeflags"></a><a name="idm77169040"></a><p><b>22.1.</b></p> 9531<a name="devfaq.makeflags"></a><a name="idm77234960"></a><p><b>22.1.</b></p>
9508</td> 9532</td>
9509<td align="left" valign="top"><p>What is the difference between 9533<td align="left" valign="top"><p>What is the difference between
9510 <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and 9534 <code class="varname">MAKEFLAGS</code>, <code class="varname">.MAKEFLAGS</code> and
9511 <code class="varname">MAKE_FLAGS</code>?</p></td> 9535 <code class="varname">MAKE_FLAGS</code>?</p></td>
9512</tr> 9536</tr>
9513<tr class="answer"> 9537<tr class="answer">
9514<td align="left" valign="top"></td> 9538<td align="left" valign="top"></td>
9515<td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed 9539<td align="left" valign="top"><p><code class="varname">MAKEFLAGS</code> are the flags passed
9516 to the pkgsrc-internal invocations of <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>, while 9540 to the pkgsrc-internal invocations of <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>, while
9517 <code class="varname">MAKE_FLAGS</code> are the flags that are passed to 9541 <code class="varname">MAKE_FLAGS</code> are the flags that are passed to
9518 the <code class="varname">MAKE_PROGRAM</code> when building the 9542 the <code class="varname">MAKE_PROGRAM</code> when building the
9519 package. [FIXME: What is .MAKEFLAGS for?]</p></td> 9543 package. [FIXME: What is .MAKEFLAGS for?]</p></td>
9520</tr> 9544</tr>
9521<tr class="question"> 9545<tr class="question">
9522<td align="left" valign="top"> 9546<td align="left" valign="top">
9523<a name="devfaq.make"></a><a name="idm77160848"></a><p><b>22.2.</b></p> 9547<a name="devfaq.make"></a><a name="idm77230992"></a><p><b>22.2.</b></p>
9524</td> 9548</td>
9525<td align="left" valign="top"><p>What is the difference between 9549<td align="left" valign="top"><p>What is the difference between
9526 <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and 9550 <code class="varname">MAKE</code>, <code class="varname">GMAKE</code> and
9527 <code class="varname">MAKE_PROGRAM</code>?</p></td> 9551 <code class="varname">MAKE_PROGRAM</code>?</p></td>
9528</tr> 9552</tr>
9529<tr class="answer"> 9553<tr class="answer">
9530<td align="left" valign="top"></td> 9554<td align="left" valign="top"></td>
9531<td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the 9555<td align="left" valign="top"><p><code class="varname">MAKE</code> is the path to the
9532 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> program that is used in the pkgsrc 9556 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> program that is used in the pkgsrc
9533 infrastructure. <code class="varname">GMAKE</code> is the path to GNU 9557 infrastructure. <code class="varname">GMAKE</code> is the path to GNU
9534 Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to 9558 Make, but you need to say <code class="varname">USE_TOOLS+=gmake</code> to
9535 use that. <code class="varname">MAKE_PROGRAM</code> is the path to the 9559 use that. <code class="varname">MAKE_PROGRAM</code> is the path to the
9536 Make program that is used for building the 9560 Make program that is used for building the
9537 package.</p></td> 9561 package.</p></td>
9538</tr> 9562</tr>
9539<tr class="question"> 9563<tr class="question">
9540<td align="left" valign="top"> 9564<td align="left" valign="top">
9541<a name="devfaq.cc"></a><a name="idm77156496"></a><p><b>22.3.</b></p> 9565<a name="devfaq.cc"></a><a name="idm77226512"></a><p><b>22.3.</b></p>
9542</td> 9566</td>
9543<td align="left" valign="top"><p>What is the difference between 9567<td align="left" valign="top"><p>What is the difference between
9544 <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and 9568 <code class="varname">CC</code>, <code class="varname">PKG_CC</code> and
9545 <code class="varname">PKGSRC_COMPILER</code>?</p></td> 9569 <code class="varname">PKGSRC_COMPILER</code>?</p></td>
9546</tr> 9570</tr>
9547<tr class="answer"> 9571<tr class="answer">
9548<td align="left" valign="top"></td> 9572<td align="left" valign="top"></td>
9549<td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C 9573<td align="left" valign="top"><p><code class="varname">CC</code> is the path to the real C
9550 compiler, which can be configured by the pkgsrc user. 9574 compiler, which can be configured by the pkgsrc user.
9551 <code class="varname">PKG_CC</code> is the path to the compiler wrapper. 9575 <code class="varname">PKG_CC</code> is the path to the compiler wrapper.
9552 <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a 9576 <code class="varname">PKGSRC_COMPILER</code> is <span class="emphasis"><em>not</em></span> a
9553 path to a compiler, but the type of compiler that should be 9577 path to a compiler, but the type of compiler that should be
9554 used. See <code class="filename">mk/compiler.mk</code> for more 9578 used. See <code class="filename">mk/compiler.mk</code> for more
9555 information about the latter variable.</p></td> 9579 information about the latter variable.</p></td>
9556</tr> 9580</tr>
9557<tr class="question"> 9581<tr class="question">
9558<td align="left" valign="top"> 9582<td align="left" valign="top">
9559<a name="devfaq.bl3flags"></a><a name="idm77152272"></a><p><b>22.4.</b></p> 9583<a name="devfaq.bl3flags"></a><a name="idm77222416"></a><p><b>22.4.</b></p>
9560</td> 9584</td>
9561<td align="left" valign="top"><p>What is the difference between 9585<td align="left" valign="top"><p>What is the difference between
9562 <code class="varname">BUILDLINK_LDFLAGS</code>, 9586 <code class="varname">BUILDLINK_LDFLAGS</code>,
9563 <code class="varname">BUILDLINK_LDADD</code> and 9587 <code class="varname">BUILDLINK_LDADD</code> and
9564 <code class="varname">BUILDLINK_LIBS</code>?</p></td> 9588 <code class="varname">BUILDLINK_LIBS</code>?</p></td>
9565</tr> 9589</tr>
9566<tr class="answer"> 9590<tr class="answer">
9567<td align="left" valign="top"></td> 9591<td align="left" valign="top"></td>
9568<td align="left" valign="top"><p>[FIXME]</p></td> 9592<td align="left" valign="top"><p>[FIXME]</p></td>
9569</tr> 9593</tr>
9570<tr class="question"> 9594<tr class="question">
9571<td align="left" valign="top"> 9595<td align="left" valign="top">
9572<a name="devfaq.bl3prefix"></a><a name="idm77150096"></a><p><b>22.5.</b></p> 9596<a name="devfaq.bl3prefix"></a><a name="idm77220240"></a><p><b>22.5.</b></p>
9573</td> 9597</td>
9574<td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var 9598<td align="left" valign="top"><p>Why does <span class="command"><strong>make show-var
9575 VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span> 9599 VARNAME=BUILDLINK_PREFIX.<em class="replaceable"><code>foo</code></em></strong></span>
9576 say it's empty?</p></td> 9600 say it's empty?</p></td>
9577</tr> 9601</tr>
9578<tr class="answer"> 9602<tr class="answer">
9579<td align="left" valign="top"></td> 9603<td align="left" valign="top"></td>
9580<td align="left" valign="top"><p>For optimization reasons, some variables are only 9604<td align="left" valign="top"><p>For optimization reasons, some variables are only
9581 available in the <span class="quote">&#8220;<span class="quote">wrapper</span>&#8221;</span> phase and later. To 9605 available in the <span class="quote">&#8220;<span class="quote">wrapper</span>&#8221;</span> phase and later. To
9582 <span class="quote">&#8220;<span class="quote">simulate</span>&#8221;</span> the wrapper phase, append 9606 <span class="quote">&#8220;<span class="quote">simulate</span>&#8221;</span> the wrapper phase, append
9583 <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above 9607 <span class="command"><strong>PKG_PHASE=wrapper</strong></span> to the above
9584 command.</p></td> 9608 command.</p></td>
9585</tr> 9609</tr>
9586<tr class="question"> 9610<tr class="question">
9587<td align="left" valign="top"> 9611<td align="left" valign="top">
9588<a name="devfaq.master_sites"></a><a name="idm77147024"></a><p><b>22.6.</b></p> 9612<a name="devfaq.master_sites"></a><a name="idm77208848"></a><p><b>22.6.</b></p>
9589</td> 9613</td>
9590<td align="left" valign="top"><p>What does 9614<td align="left" valign="top"><p>What does
9591 <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I 9615 <code class="literal">${MASTER_SITE_SOURCEFORGE:=package/}</code> mean? I
9592 don't understand the <code class="literal">:=</code> inside 9616 don't understand the <code class="literal">:=</code> inside
9593 it.</p></td> 9617 it.</p></td>
9594</tr> 9618</tr>
9595<tr class="answer"> 9619<tr class="answer">
9596<td align="left" valign="top"></td> 9620<td align="left" valign="top"></td>
9597<td align="left" valign="top"><p>The <code class="literal">:=</code> is not really an 9621<td align="left" valign="top"><p>The <code class="literal">:=</code> is not really an
9598 assignment operator, like you might expect at first sight. 9622 assignment operator, like you might expect at first sight.
9599 Instead, it is a degenerate form of 9623 Instead, it is a degenerate form of
9600 <code class="literal">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>, 9624 <code class="literal">${LIST:<em class="replaceable"><code>old_string</code></em>=<em class="replaceable"><code>new_string</code></em>}</code>,
9601 which is documented in the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> man page and which you 9625 which is documented in the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a> man page and which you
9602 may have seen as in <code class="literal">${SRCS:.c=.o}</code>. In the 9626 may have seen as in <code class="literal">${SRCS:.c=.o}</code>. In the
9603 case of <code class="varname">MASTER_SITE_*</code>, 9627 case of <code class="varname">MASTER_SITE_*</code>,
9604 <em class="replaceable"><code>old_string</code></em> is the empty string and 9628 <em class="replaceable"><code>old_string</code></em> is the empty string and
9605 <em class="replaceable"><code>new_string</code></em> is 9629 <em class="replaceable"><code>new_string</code></em> is
9606 <code class="literal">package/</code>. That's where the 9630 <code class="literal">package/</code>. That's where the
9607 <code class="literal">:</code> and the <code class="literal">=</code> fall 9631 <code class="literal">:</code> and the <code class="literal">=</code> fall
9608 together.</p></td> 9632 together.</p></td>
9609</tr> 9633</tr>
9610<tr class="question"> 9634<tr class="question">
9611<td align="left" valign="top"> 9635<td align="left" valign="top">
9612<a name="devfaq.mailinglists"></a><a name="idm77130768"></a><p><b>22.7.</b></p> 9636<a name="devfaq.mailinglists"></a><a name="idm77200784"></a><p><b>22.7.</b></p>
9613</td> 9637</td>
9614<td align="left" valign="top"><p>Which mailing lists are there for package 9638<td align="left" valign="top"><p>Which mailing lists are there for package
9615 developers?</p></td> 9639 developers?</p></td>
9616</tr> 9640</tr>
9617<tr class="answer"> 9641<tr class="answer">
9618<td align="left" valign="top"></td> 9642<td align="left" valign="top"></td>
9619<td align="left" valign="top"><div class="variablelist"><dl class="variablelist"> 9643<td align="left" valign="top"><div class="variablelist"><dl class="variablelist">
9620<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt> 9644<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#tech-pkg" target="_top">tech-pkg</a></span></dt>
9621<dd><p>This is a list for technical discussions related 9645<dd><p>This is a list for technical discussions related
9622 to pkgsrc development, e.g. soliciting feedback for changes to 9646 to pkgsrc development, e.g. soliciting feedback for changes to
9623 pkgsrc infrastructure, proposed new features, questions related 9647 pkgsrc infrastructure, proposed new features, questions related
9624 to porting pkgsrc to a new platform, advice for maintaining a 9648 to porting pkgsrc to a new platform, advice for maintaining a
9625 package, patches that affect many packages, help requests moved 9649 package, patches that affect many packages, help requests moved
9626 from pkgsrc-users when an infrastructure bug is found, 9650 from pkgsrc-users when an infrastructure bug is found,
9627 etc.</p></dd> 9651 etc.</p></dd>
9628<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt> 9652<dt><span class="term"><a class="ulink" href="http://www.NetBSD.org/mailinglists/index.html#pkgsrc-bugs" target="_top">pkgsrc-bugs</a></span></dt>
9629<dd><p>All bug reports in category "pkg" sent with 9653<dd><p>All bug reports in category "pkg" sent with
9630 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?send-pr+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> appear here. Please do not report your bugs here 9654 <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?send-pr+1+NetBSD-5.0.1+i386"><span class="citerefentry"><span class="refentrytitle">send-pr</span>(1)</span></a> appear here. Please do not report your bugs here
9631 directly; use one of the other mailing 9655 directly; use one of the other mailing
9632 lists.</p></dd> 9656 lists.</p></dd>
9633</dl></div></td> 9657</dl></div></td>
9634</tr> 9658</tr>
9635<tr class="question"> 9659<tr class="question">
9636<td align="left" valign="top"> 9660<td align="left" valign="top">
9637<a name="devfaq.documentation"></a><a name="idm77126928"></a><p><b>22.8.</b></p> 9661<a name="devfaq.documentation"></a><a name="idm77197072"></a><p><b>22.8.</b></p>
9638</td> 9662</td>
9639<td align="left" valign="top"><p>Where is the pkgsrc 9663<td align="left" valign="top"><p>Where is the pkgsrc
9640 documentation?</p></td> 9664 documentation?</p></td>
9641</tr> 9665</tr>
9642<tr class="answer"> 9666<tr class="answer">
9643<td align="left" valign="top"></td> 9667<td align="left" valign="top"></td>
9644<td align="left" valign="top"> 9668<td align="left" valign="top">
9645<p>There are many places where you can find 9669<p>There are many places where you can find
9646 documentation about pkgsrc:</p> 9670 documentation about pkgsrc:</p>
9647<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9671<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9648<li class="listitem"><p>The pkgsrc guide (this document) is a collection 9672<li class="listitem"><p>The pkgsrc guide (this document) is a collection
9649 of chapters that explain large parts of pkgsrc, but some 9673 of chapters that explain large parts of pkgsrc, but some
9650 chapters tend to be outdated. Which ones they are is hard to 9674 chapters tend to be outdated. Which ones they are is hard to
@@ -9672,27 +9696,27 @@ do? @@ -9672,27 +9696,27 @@ do?
9672 documented</span>&#8221;</span>, that is the documentation exists only in the 9696 documented</span>&#8221;</span>, that is the documentation exists only in the
9673 mind of the developer who wrote the code. To get this 9697 mind of the developer who wrote the code. To get this
9674 information, use the <span class="command"><strong>cvs annotate</strong></span> command 9698 information, use the <span class="command"><strong>cvs annotate</strong></span> command
9675 to see who has written it and ask on the 9699 to see who has written it and ask on the
9676 <code class="literal">tech-pkg</code> mailing list, so that others can 9700 <code class="literal">tech-pkg</code> mailing list, so that others can
9677 find your questions later (see above). To be sure that the 9701 find your questions later (see above). To be sure that the
9678 developer in charge reads the mail, you may CC him or 9702 developer in charge reads the mail, you may CC him or
9679 her.</p></li> 9703 her.</p></li>
9680</ul></div> 9704</ul></div>
9681</td> 9705</td>
9682</tr> 9706</tr>
9683<tr class="question"> 9707<tr class="question">
9684<td align="left" valign="top"> 9708<td align="left" valign="top">
9685<a name="devfaq.too-much-time"></a><a name="idm77120400"></a><p><b>22.9.</b></p> 9709<a name="devfaq.too-much-time"></a><a name="idm77190544"></a><p><b>22.9.</b></p>
9686</td> 9710</td>
9687<td align="left" valign="top"><p>I have a little time to kill. What shall I 9711<td align="left" valign="top"><p>I have a little time to kill. What shall I
9688do?</p></td> 9712do?</p></td>
9689</tr> 9713</tr>
9690<tr class="answer"> 9714<tr class="answer">
9691<td align="left" valign="top"></td> 9715<td align="left" valign="top"></td>
9692<td align="left" valign="top"> 9716<td align="left" valign="top">
9693<p>This is not really an FAQ yet, but here's the answer 9717<p>This is not really an FAQ yet, but here's the answer
9694anyway.</p> 9718anyway.</p>
9695<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 9719<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
9696<li class="listitem"><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the 9720<li class="listitem"><p>Run <span class="command"><strong>pkg_chk -N</strong></span> (from the
9697 <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_chk/README.html" target="_top"><code class="filename">pkgtools/pkg_chk</code></a> package). It 9721 <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_chk/README.html" target="_top"><code class="filename">pkgtools/pkg_chk</code></a> package). It
9698 will tell you about newer versions of installed packages that are 9722 will tell you about newer versions of installed packages that are

cvs diff -r1.194 -r1.195 pkgsrc/doc/pkgsrc.txt (expand / switch to unified diff)

--- pkgsrc/doc/pkgsrc.txt 2015/01/01 05:20:29 1.194
+++ pkgsrc/doc/pkgsrc.txt 2015/01/01 06:32:33 1.195
@@ -2,29 +2,29 @@ The pkgsrc guide @@ -2,29 +2,29 @@ The pkgsrc guide
2 2
3Documentation on the NetBSD packages system 3Documentation on the NetBSD packages system
4 4
5Alistair Crooks 5Alistair Crooks
6 6
7<agc@NetBSD.org> 7<agc@NetBSD.org>
8 8
9Hubert Feyrer 9Hubert Feyrer
10 10
11<hubertf@NetBSD.org> 11<hubertf@NetBSD.org>
12 12
13The pkgsrc Developers 13The pkgsrc Developers
14 14
15Copyright 1994-2015 The NetBSD Foundation, Inc 15Copyright 1994-2014 The NetBSD Foundation, Inc
16 16
17$NetBSD: pkgsrc.xml,v 1.28 2015/01/01 05:19:02 jnemeth Exp $ 17$NetBSD: pkgsrc.xml,v 1.27 2014/09/19 04:53:09 jnemeth Exp $
18 18
19Abstract 19Abstract
20 20
21pkgsrc is a centralized package management system for Unix-like operating 21pkgsrc is a centralized package management system for Unix-like operating
22systems. This guide provides information for users and developers of pkgsrc. It 22systems. This guide provides information for users and developers of pkgsrc. It
23covers installation of binary and source packages, creation of binary and 23covers installation of binary and source packages, creation of binary and
24source packages and a high-level overview about the infrastructure. 24source packages and a high-level overview about the infrastructure.
25 25
26------------------------------------------------------------------------------- 26-------------------------------------------------------------------------------
27 27
28Table of Contents 28Table of Contents
29 29
301. What is pkgsrc? 301. What is pkgsrc?
@@ -121,43 +121,44 @@ I. The pkgsrc user's guide @@ -121,43 +121,44 @@ I. The pkgsrc user's guide
121 7.3. Requirements of a full bulk build 121 7.3. Requirements of a full bulk build
122 7.4. Creating a multiple CD-ROM packages collection 122 7.4. Creating a multiple CD-ROM packages collection
123 123
124 7.4.1. Example of cdpack 124 7.4.1. Example of cdpack
125 125
126 8. Directory layout of the installed files 126 8. Directory layout of the installed files
127 127
128 8.1. File system layout in ${LOCALBASE} 128 8.1. File system layout in ${LOCALBASE}
129 8.2. File system layout in ${VARBASE} 129 8.2. File system layout in ${VARBASE}
130 130
131 9. Frequently Asked Questions 131 9. Frequently Asked Questions
132 132
133 9.1. Are there any mailing lists for pkg-related discussion? 133 9.1. Are there any mailing lists for pkg-related discussion?
134 9.2. Utilities for package management (pkgtools) 134 9.2. Where's the pkgviews documentation?
135 9.3. How to use pkgsrc as non-root 135 9.3. Utilities for package management (pkgtools)
136 9.4. How to resume transfers when fetching distfiles? 136 9.4. How to use pkgsrc as non-root
137 9.5. How can I install/use modular X.org from pkgsrc? 137 9.5. How to resume transfers when fetching distfiles?
138 9.6. How to fetch files from behind a firewall 138 9.6. How can I install/use modular X.org from pkgsrc?
139 9.7. How to fetch files from HTTPS sites 139 9.7. How to fetch files from behind a firewall
140 9.8. How do I tell make fetch to do passive FTP? 140 9.8. How to fetch files from HTTPS sites
141 9.9. How to fetch all distfiles at once 141 9.9. How do I tell make fetch to do passive FTP?
142 9.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" 142 9.10. How to fetch all distfiles at once
 143 9.11. What does "Don't know how to make /usr/share/tmac/tmac.andoc"
143 mean? 144 mean?
144 9.11. What does "Could not find bsd.own.mk" mean? 145 9.12. What does "Could not find bsd.own.mk" mean?
145 9.12. Using 'sudo' with pkgsrc 146 9.13. Using 'sudo' with pkgsrc
146 9.13. How do I change the location of configuration files? 147 9.14. How do I change the location of configuration files?
147 9.14. Automated security checks 148 9.15. Automated security checks
148 9.15. Why do some packages ignore my CFLAGS? 149 9.16. Why do some packages ignore my CFLAGS?
149 9.16. A package does not build. What shall I do? 150 9.17. A package does not build. What shall I do?
150 9.17. What does "Makefile appears to contain unresolved cvs/rcs/??? 151 9.18. What does "Makefile appears to contain unresolved cvs/rcs/???
151 merge conflicts" mean? 152 merge conflicts" mean?
152 153
153II. The pkgsrc developer's guide 154II. The pkgsrc developer's guide
154 155
155 10. Creating a new pkgsrc package from scratch 156 10. Creating a new pkgsrc package from scratch
156 157
157 10.1. Common types of packages 158 10.1. Common types of packages
158 159
159 10.1.1. Perl modules 160 10.1.1. Perl modules
160 10.1.2. KDE3 applications 161 10.1.2. KDE3 applications
161 10.1.3. Python modules and programs 162 10.1.3. Python modules and programs
162 163
163 10.2. Examples 164 10.2. Examples
@@ -765,42 +766,43 @@ Table of Contents @@ -765,42 +766,43 @@ Table of Contents
765 7.3. Requirements of a full bulk build 766 7.3. Requirements of a full bulk build
766 7.4. Creating a multiple CD-ROM packages collection 767 7.4. Creating a multiple CD-ROM packages collection
767 768
768 7.4.1. Example of cdpack 769 7.4.1. Example of cdpack
769 770
7708. Directory layout of the installed files 7718. Directory layout of the installed files
771 772
772 8.1. File system layout in ${LOCALBASE} 773 8.1. File system layout in ${LOCALBASE}
773 8.2. File system layout in ${VARBASE} 774 8.2. File system layout in ${VARBASE}
774 775
7759. Frequently Asked Questions 7769. Frequently Asked Questions
776 777
777 9.1. Are there any mailing lists for pkg-related discussion? 778 9.1. Are there any mailing lists for pkg-related discussion?
778 9.2. Utilities for package management (pkgtools) 779 9.2. Where's the pkgviews documentation?
779 9.3. How to use pkgsrc as non-root 780 9.3. Utilities for package management (pkgtools)
780 9.4. How to resume transfers when fetching distfiles? 781 9.4. How to use pkgsrc as non-root
781 9.5. How can I install/use modular X.org from pkgsrc? 782 9.5. How to resume transfers when fetching distfiles?
782 9.6. How to fetch files from behind a firewall 783 9.6. How can I install/use modular X.org from pkgsrc?
783 9.7. How to fetch files from HTTPS sites 784 9.7. How to fetch files from behind a firewall
784 9.8. How do I tell make fetch to do passive FTP? 785 9.8. How to fetch files from HTTPS sites
785 9.9. How to fetch all distfiles at once 786 9.9. How do I tell make fetch to do passive FTP?
786 9.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean? 787 9.10. How to fetch all distfiles at once
787 9.11. What does "Could not find bsd.own.mk" mean? 788 9.11. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
788 9.12. Using 'sudo' with pkgsrc 789 9.12. What does "Could not find bsd.own.mk" mean?
789 9.13. How do I change the location of configuration files? 790 9.13. Using 'sudo' with pkgsrc
790 9.14. Automated security checks 791 9.14. How do I change the location of configuration files?
791 9.15. Why do some packages ignore my CFLAGS? 792 9.15. Automated security checks
792 9.16. A package does not build. What shall I do? 793 9.16. Why do some packages ignore my CFLAGS?
793 9.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge 794 9.17. A package does not build. What shall I do?
 795 9.18. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
794 conflicts" mean? 796 conflicts" mean?
795 797
796Chapter 2. Where to get pkgsrc and how to keep it up-to-date 798Chapter 2. Where to get pkgsrc and how to keep it up-to-date
797 799
798Table of Contents 800Table of Contents
799 801
8002.1. Getting pkgsrc for the first time 8022.1. Getting pkgsrc for the first time
801 803
802 2.1.1. As tar archive 804 2.1.1. As tar archive
803 2.1.2. Via anonymous CVS 805 2.1.2. Via anonymous CVS
804 806
8052.2. Keeping pkgsrc up-to-date 8072.2. Keeping pkgsrc up-to-date
806 808
@@ -2471,42 +2473,43 @@ games @@ -2471,42 +2473,43 @@ games
2471log 2473log
2472 2474
2473 Contains log files. 2475 Contains log files.
2474 2476
2475run 2477run
2476 2478
2477 Contains informational files about daemons that are currently running. 2479 Contains informational files about daemons that are currently running.
2478 2480
2479Chapter 9. Frequently Asked Questions 2481Chapter 9. Frequently Asked Questions
2480 2482
2481Table of Contents 2483Table of Contents
2482 2484
24839.1. Are there any mailing lists for pkg-related discussion? 24859.1. Are there any mailing lists for pkg-related discussion?
24849.2. Utilities for package management (pkgtools) 24869.2. Where's the pkgviews documentation?
24859.3. How to use pkgsrc as non-root 24879.3. Utilities for package management (pkgtools)
24869.4. How to resume transfers when fetching distfiles? 24889.4. How to use pkgsrc as non-root
24879.5. How can I install/use modular X.org from pkgsrc? 24899.5. How to resume transfers when fetching distfiles?
24889.6. How to fetch files from behind a firewall 24909.6. How can I install/use modular X.org from pkgsrc?
24899.7. How to fetch files from HTTPS sites 24919.7. How to fetch files from behind a firewall
24909.8. How do I tell make fetch to do passive FTP? 24929.8. How to fetch files from HTTPS sites
24919.9. How to fetch all distfiles at once 24939.9. How do I tell make fetch to do passive FTP?
24929.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean? 24949.10. How to fetch all distfiles at once
24939.11. What does "Could not find bsd.own.mk" mean? 24959.11. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
24949.12. Using 'sudo' with pkgsrc 24969.12. What does "Could not find bsd.own.mk" mean?
24959.13. How do I change the location of configuration files? 24979.13. Using 'sudo' with pkgsrc
24969.14. Automated security checks 24989.14. How do I change the location of configuration files?
24979.15. Why do some packages ignore my CFLAGS? 24999.15. Automated security checks
24989.16. A package does not build. What shall I do? 25009.16. Why do some packages ignore my CFLAGS?
24999.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge 25019.17. A package does not build. What shall I do?
 25029.18. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
2500 conflicts" mean? 2503 conflicts" mean?
2501 2504
2502This section contains hints, tips & tricks on special things in pkgsrc that we 2505This section contains hints, tips & tricks on special things in pkgsrc that we
2503didn't find a better place for in the previous chapters, and it contains items 2506didn't find a better place for in the previous chapters, and it contains items
2504for both pkgsrc users and developers. 2507for both pkgsrc users and developers.
2505 2508
25069.1. Are there any mailing lists for pkg-related discussion? 25099.1. Are there any mailing lists for pkg-related discussion?
2507 2510
2508The following mailing lists may be of interest to pkgsrc users: 2511The following mailing lists may be of interest to pkgsrc users:
2509 2512
2510 * pkgsrc-users: This is a general purpose list for most issues regarding 2513 * pkgsrc-users: This is a general purpose list for most issues regarding
2511 pkgsrc, regardless of platform, e.g. soliciting user help for pkgsrc 2514 pkgsrc, regardless of platform, e.g. soliciting user help for pkgsrc
2512 configuration, unexpected build failures, using particular packages, 2515 configuration, unexpected build failures, using particular packages,
@@ -2520,27 +2523,32 @@ The following mailing lists may be of in @@ -2520,27 +2523,32 @@ The following mailing lists may be of in
2520 2523
2521 * pkgsrc-changes: This list is for those who are interested in getting a 2524 * pkgsrc-changes: This list is for those who are interested in getting a
2522 commit message for every change committed to pkgsrc. It is also available 2525 commit message for every change committed to pkgsrc. It is also available
2523 in digest form, meaning one daily message containing all commit messages 2526 in digest form, meaning one daily message containing all commit messages
2524 for changes to the package source tree in that 24 hour period. 2527 for changes to the package source tree in that 24 hour period.
2525 2528
2526To subscribe, do: 2529To subscribe, do:
2527 2530
2528% echo subscribe listname | mail majordomo@NetBSD.org 2531% echo subscribe listname | mail majordomo@NetBSD.org
2529 2532
2530Archives for all these mailing lists are available from http:// 2533Archives for all these mailing lists are available from http://
2531mail-index.NetBSD.org/. 2534mail-index.NetBSD.org/.
2532 2535
25339.2. Utilities for package management (pkgtools) 25369.2. Where's the pkgviews documentation?
 2537
 2538Pkgviews is tightly integrated with buildlink. You can find a pkgviews User's
 2539guide in pkgsrc/mk/buildlink3/PKGVIEWS_UG.
 2540
 25419.3. Utilities for package management (pkgtools)
2534 2542
2535The directory pkgsrc/pkgtools contains a number of useful utilities for both 2543The directory pkgsrc/pkgtools contains a number of useful utilities for both
2536users and developers of pkgsrc. This section attempts only to make the reader 2544users and developers of pkgsrc. This section attempts only to make the reader
2537aware of the utilities and when they might be useful, and not to duplicate the 2545aware of the utilities and when they might be useful, and not to duplicate the
2538documentation that comes with each package. 2546documentation that comes with each package.
2539 2547
2540Utilities used by pkgsrc (automatically installed when needed): 2548Utilities used by pkgsrc (automatically installed when needed):
2541 2549
2542 * pkgtools/x11-links: Symlinks for use by buildlink. 2550 * pkgtools/x11-links: Symlinks for use by buildlink.
2543 2551
2544OS tool augmentation (automatically installed when needed): 2552OS tool augmentation (automatically installed when needed):
2545 2553
2546 * pkgtools/digest: Calculates various kinds of checksums (including SHA1). 2554 * pkgtools/digest: Calculates various kinds of checksums (including SHA1).
@@ -2588,115 +2596,115 @@ Utilities for keeping track of installed @@ -2588,115 +2596,115 @@ Utilities for keeping track of installed
2588Utilities for people maintaining or creating individual packages: 2596Utilities for people maintaining or creating individual packages:
2589 2597
2590 * pkgtools/pkgdiff: Automate making and maintaining patches for a package 2598 * pkgtools/pkgdiff: Automate making and maintaining patches for a package
2591 (includes pkgdiff, pkgvi, mkpatches, etc.). 2599 (includes pkgdiff, pkgvi, mkpatches, etc.).
2592 2600
2593 * pkgtools/url2pkg: Aids in converting to pkgsrc. 2601 * pkgtools/url2pkg: Aids in converting to pkgsrc.
2594 2602
2595Utilities for people maintaining pkgsrc (or: more obscure pkg utilities) 2603Utilities for people maintaining pkgsrc (or: more obscure pkg utilities)
2596 2604
2597 * pkgtools/pkg_comp: Build packages in a chrooted area. 2605 * pkgtools/pkg_comp: Build packages in a chrooted area.
2598 2606
2599 * pkgtools/libkver: Spoof kernel version for chrooted cross builds. 2607 * pkgtools/libkver: Spoof kernel version for chrooted cross builds.
2600 2608
26019.3. How to use pkgsrc as non-root 26099.4. How to use pkgsrc as non-root
2602 2610
2603If you want to use pkgsrc as non-root user, you can set some variables to make 2611If you want to use pkgsrc as non-root user, you can set some variables to make
2604pkgsrc work under these conditions. At the very least, you need to set 2612pkgsrc work under these conditions. At the very least, you need to set
2605UNPRIVILEGED to "yes"; this will turn on unprivileged mode and set multiple 2613UNPRIVILEGED to "yes"; this will turn on unprivileged mode and set multiple
2606related variables to allow installation of packages as non-root. 2614related variables to allow installation of packages as non-root.
2607 2615
2608In case the defaults are not enough, you may want to tune some other variables 2616In case the defaults are not enough, you may want to tune some other variables
2609used. For example, if the automatic user/group detection leads to incorrect 2617used. For example, if the automatic user/group detection leads to incorrect
2610values (or not the ones you would like to use), you can change them by setting 2618values (or not the ones you would like to use), you can change them by setting
2611UNPRIVILEGED_USER and UNPRIVILEGED_GROUP respectively. 2619UNPRIVILEGED_USER and UNPRIVILEGED_GROUP respectively.
2612 2620
2613As regards bootstrapping, please note that the bootstrap script will ease 2621As regards bootstrapping, please note that the bootstrap script will ease
2614non-root configuration when given the "--ignore-user-check" flag, as it will 2622non-root configuration when given the "--ignore-user-check" flag, as it will
2615choose and use multiple default directories under ~/pkg as the installation 2623choose and use multiple default directories under ~/pkg as the installation
2616targets. These directories can be overridden by the "--prefix" flag provided by 2624targets. These directories can be overridden by the "--prefix" flag provided by
2617the script, as well as some others that allow finer tuning of the tree layout. 2625the script, as well as some others that allow finer tuning of the tree layout.
2618 2626
26199.4. How to resume transfers when fetching distfiles? 26279.5. How to resume transfers when fetching distfiles?
2620 2628
2621By default, resuming transfers in pkgsrc is disabled, but you can enable this 2629By default, resuming transfers in pkgsrc is disabled, but you can enable this
2622feature by adding the option PKG_RESUME_TRANSFERS=YES into mk.conf. If, during 2630feature by adding the option PKG_RESUME_TRANSFERS=YES into mk.conf. If, during
2623a fetch step, an incomplete distfile is found, pkgsrc will try to resume it. 2631a fetch step, an incomplete distfile is found, pkgsrc will try to resume it.
2624 2632
2625You can also use a different program than the platform default program by 2633You can also use a different program than the platform default program by
2626changing the FETCH_USING variable. You can specify the program by using of ftp, 2634changing the FETCH_USING variable. You can specify the program by using of ftp,
2627fetch, wget or curl. Alternatively, fetching can be disabled by using the value 2635fetch, wget or curl. Alternatively, fetching can be disabled by using the value
2628manual. A value of custom disables the system defaults and dependency tracking 2636manual. A value of custom disables the system defaults and dependency tracking
2629for the fetch program. In that case you have to provide FETCH_CMD, 2637for the fetch program. In that case you have to provide FETCH_CMD,
2630FETCH_BEFORE_ARGS, FETCH_RESUME_ARGS, FETCH_OUTPUT_ARGS, FETCH_AFTER_ARGS. 2638FETCH_BEFORE_ARGS, FETCH_RESUME_ARGS, FETCH_OUTPUT_ARGS, FETCH_AFTER_ARGS.
2631 2639
2632For example, if you want to use wget to download, you'll have to use something 2640For example, if you want to use wget to download, you'll have to use something
2633like: 2641like:
2634 2642
2635FETCH_USING= wget 2643FETCH_USING= wget
2636 2644
26379.5. How can I install/use modular X.org from pkgsrc? 26459.6. How can I install/use modular X.org from pkgsrc?
2638 2646
2639If you want to use modular X.org from pkgsrc instead of your system's own X11 2647If you want to use modular X.org from pkgsrc instead of your system's own X11
2640(/usr/X11R6, /usr/openwin, ...) you will have to add the following line into 2648(/usr/X11R6, /usr/openwin, ...) you will have to add the following line into
2641mk.conf: 2649mk.conf:
2642 2650
2643X11_TYPE=modular 2651X11_TYPE=modular
2644 2652
2645Note 2653Note
2646 2654
2647The DragonFly operating system defaults to using modular X.org from pkgsrc. 2655The DragonFly operating system defaults to using modular X.org from pkgsrc.
2648 2656
26499.6. How to fetch files from behind a firewall 26579.7. How to fetch files from behind a firewall
2650 2658
2651If you are sitting behind a firewall which does not allow direct connections to 2659If you are sitting behind a firewall which does not allow direct connections to
2652Internet hosts (i.e. non-NAT), you may specify the relevant proxy hosts. This 2660Internet hosts (i.e. non-NAT), you may specify the relevant proxy hosts. This
2653is done using an environment variable in the form of a URL, e.g. in Amdahl, the 2661is done using an environment variable in the form of a URL, e.g. in Amdahl, the
2654machine "orpheus.amdahl.com" is one of the firewalls, and it uses port 80 as 2662machine "orpheus.amdahl.com" is one of the firewalls, and it uses port 80 as
2655the proxy port number. So the proxy environment variables are: 2663the proxy port number. So the proxy environment variables are:
2656 2664
2657ftp_proxy=ftp://orpheus.amdahl.com:80/ 2665ftp_proxy=ftp://orpheus.amdahl.com:80/
2658http_proxy=http://orpheus.amdahl.com:80/ 2666http_proxy=http://orpheus.amdahl.com:80/
2659 2667
26609.7. How to fetch files from HTTPS sites 26689.8. How to fetch files from HTTPS sites
2661 2669
2662Some fetch tools are not prepared to support HTTPS by default (for example, the 2670Some fetch tools are not prepared to support HTTPS by default (for example, the
2663one in NetBSD 6.0), or the one installed by the pkgsrc bootstrap (to avoid an 2671one in NetBSD 6.0), or the one installed by the pkgsrc bootstrap (to avoid an
2664openssl dependency that low in the dependency graph). 2672openssl dependency that low in the dependency graph).
2665 2673
2666Usually you won't notice, because distribution files are mirrored weekly to " 2674Usually you won't notice, because distribution files are mirrored weekly to "
2667ftp.NetBSD.org", but that might not be often enough if you are following 2675ftp.NetBSD.org", but that might not be often enough if you are following
2668pkgsrc-current. In that case, set FETCH_USING in your mk.conf file to "curl" or 2676pkgsrc-current. In that case, set FETCH_USING in your mk.conf file to "curl" or
2669"wget", which are both compiled with HTTPS support by default. Of course, these 2677"wget", which are both compiled with HTTPS support by default. Of course, these
2670tools need to be installed before you can use them this way. 2678tools need to be installed before you can use them this way.
2671 2679
26729.8. How do I tell make fetch to do passive FTP? 26809.9. How do I tell make fetch to do passive FTP?
2673 2681
2674This depends on which utility is used to retrieve distfiles. From bsd.pkg.mk, 2682This depends on which utility is used to retrieve distfiles. From bsd.pkg.mk,
2675FETCH_CMD is assigned the first available command from the following list: 2683FETCH_CMD is assigned the first available command from the following list:
2676 2684
2677 * ${LOCALBASE}/bin/ftp 2685 * ${LOCALBASE}/bin/ftp
2678 2686
2679 * /usr/bin/ftp 2687 * /usr/bin/ftp
2680 2688
2681On a default NetBSD installation, this will be /usr/bin/ftp, which 2689On a default NetBSD installation, this will be /usr/bin/ftp, which
2682automatically tries passive connections first, and falls back to active 2690automatically tries passive connections first, and falls back to active
2683connections if the server refuses to do passive. For the other tools, add the 2691connections if the server refuses to do passive. For the other tools, add the
2684following to your mk.conf file: PASSIVE_FETCH=1. 2692following to your mk.conf file: PASSIVE_FETCH=1.
2685 2693
2686Having that option present will prevent /usr/bin/ftp from falling back to 2694Having that option present will prevent /usr/bin/ftp from falling back to
2687active transfers. 2695active transfers.
2688 2696
26899.9. How to fetch all distfiles at once 26979.10. How to fetch all distfiles at once
2690 2698
2691You would like to download all the distfiles in a single batch from work or 2699You would like to download all the distfiles in a single batch from work or
2692university, where you can't run a make fetch. There is an archive of distfiles 2700university, where you can't run a make fetch. There is an archive of distfiles
2693on ftp.NetBSD.org, but downloading the entire directory may not be appropriate. 2701on ftp.NetBSD.org, but downloading the entire directory may not be appropriate.
2694 2702
2695The answer here is to do a make fetch-list in /usr/pkgsrc or one of its 2703The answer here is to do a make fetch-list in /usr/pkgsrc or one of its
2696subdirectories, carry the resulting list to your machine at work/school and use 2704subdirectories, carry the resulting list to your machine at work/school and use
2697it there. If you don't have a NetBSD-compatible ftp(1) (like tnftp) at work, 2705it there. If you don't have a NetBSD-compatible ftp(1) (like tnftp) at work,
2698don't forget to set FETCH_CMD to something that fetches a URL: 2706don't forget to set FETCH_CMD to something that fetches a URL:
2699 2707
2700At home: 2708At home:
2701 2709
2702% cd /usr/pkgsrc 2710% cd /usr/pkgsrc
@@ -2711,81 +2719,81 @@ then tar up /tmp/distfiles and take it h @@ -2711,81 +2719,81 @@ then tar up /tmp/distfiles and take it h
2711 2719
2712If you have a machine running NetBSD, and you want to get all distfiles (even 2720If you have a machine running NetBSD, and you want to get all distfiles (even
2713ones that aren't for your machine architecture), you can do so by using the 2721ones that aren't for your machine architecture), you can do so by using the
2714above-mentioned make fetch-list approach, or fetch the distfiles directly by 2722above-mentioned make fetch-list approach, or fetch the distfiles directly by
2715running: 2723running:
2716 2724
2717% make mirror-distfiles 2725% make mirror-distfiles
2718 2726
2719If you even decide to ignore NO_{SRC,BIN}_ON_{FTP,CDROM}, then you can get 2727If you even decide to ignore NO_{SRC,BIN}_ON_{FTP,CDROM}, then you can get
2720everything by running: 2728everything by running:
2721 2729
2722% make fetch NO_SKIP=yes 2730% make fetch NO_SKIP=yes
2723 2731
27249.10. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean? 27329.11. What does "Don't know how to make /usr/share/tmac/tmac.andoc" mean?
2725 2733
2726When compiling the pkgtools/pkg_install package, you get the error from make 2734When compiling the pkgtools/pkg_install package, you get the error from make
2727that it doesn't know how to make /usr/share/tmac/tmac.andoc? This indicates 2735that it doesn't know how to make /usr/share/tmac/tmac.andoc? This indicates
2728that you don't have installed the "text" set (nroff, ...) from the NetBSD base 2736that you don't have installed the "text" set (nroff, ...) from the NetBSD base
2729distribution on your machine. It is recommended to do that to format man pages. 2737distribution on your machine. It is recommended to do that to format man pages.
2730 2738
2731In the case of the pkgtools/pkg_install package, you can get away with setting 2739In the case of the pkgtools/pkg_install package, you can get away with setting
2732NOMAN=YES either in the environment or in mk.conf. 2740NOMAN=YES either in the environment or in mk.conf.
2733 2741
27349.11. What does "Could not find bsd.own.mk" mean? 27429.12. What does "Could not find bsd.own.mk" mean?
2735 2743
2736You didn't install the compiler set, comp.tgz, when you installed your NetBSD 2744You didn't install the compiler set, comp.tgz, when you installed your NetBSD
2737machine. Please get and install it, by extracting it in /: 2745machine. Please get and install it, by extracting it in /:
2738 2746
2739# cd / 2747# cd /
2740# tar --unlink -zxvpf .../comp.tgz 2748# tar --unlink -zxvpf .../comp.tgz
2741 2749
2742comp.tgz is part of every NetBSD release. Get the one that corresponds to your 2750comp.tgz is part of every NetBSD release. Get the one that corresponds to your
2743release (determine via uname -r). 2751release (determine via uname -r).
2744 2752
27459.12. Using 'sudo' with pkgsrc 27539.13. Using 'sudo' with pkgsrc
2746 2754
2747When installing packages as non-root user and using the just-in-time su(1) 2755When installing packages as non-root user and using the just-in-time su(1)
2748feature of pkgsrc, it can become annoying to type in the root password for each 2756feature of pkgsrc, it can become annoying to type in the root password for each
2749required package installed. To avoid this, the sudo package can be used, which 2757required package installed. To avoid this, the sudo package can be used, which
2750does password caching over a limited time. To use it, install sudo (either as 2758does password caching over a limited time. To use it, install sudo (either as
2751binary package or from security/sudo) and then put the following into your 2759binary package or from security/sudo) and then put the following into your
2752mk.conf, somewhere after the definition of the LOCALBASE variable: 2760mk.conf, somewhere after the definition of the LOCALBASE variable:
2753 2761
2754.if exists(${LOCALBASE}/bin/sudo) 2762.if exists(${LOCALBASE}/bin/sudo)
2755SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c 2763SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
2756.endif 2764.endif
2757 2765
27589.13. How do I change the location of configuration files? 27669.14. How do I change the location of configuration files?
2759 2767
2760As the system administrator, you can choose where configuration files are 2768As the system administrator, you can choose where configuration files are
2761installed. The default settings make all these files go into ${PREFIX}/etc or 2769installed. The default settings make all these files go into ${PREFIX}/etc or
2762some of its subdirectories; this may be suboptimal depending on your 2770some of its subdirectories; this may be suboptimal depending on your
2763expectations (e.g., a read-only, NFS-exported PREFIX with a need of per-machine 2771expectations (e.g., a read-only, NFS-exported PREFIX with a need of per-machine
2764configuration of the provided packages). 2772configuration of the provided packages).
2765 2773
2766In order to change the defaults, you can modify the PKG_SYSCONFBASE variable 2774In order to change the defaults, you can modify the PKG_SYSCONFBASE variable
2767(in mk.conf) to point to your preferred configuration directory; some common 2775(in mk.conf) to point to your preferred configuration directory; some common
2768examples include /etc or /etc/pkg. 2776examples include /etc or /etc/pkg.
2769 2777
2770Furthermore, you can change this value on a per-package basis by setting the 2778Furthermore, you can change this value on a per-package basis by setting the
2771PKG_SYSCONFDIR.${PKG_SYSCONFVAR} variable. PKG_SYSCONFVAR's value usually 2779PKG_SYSCONFDIR.${PKG_SYSCONFVAR} variable. PKG_SYSCONFVAR's value usually
2772matches the name of the package you would like to modify, that is, the contents 2780matches the name of the package you would like to modify, that is, the contents
2773of PKGBASE. 2781of PKGBASE.
2774 2782
2775Note that after changing these settings, you must rebuild and reinstall any 2783Note that after changing these settings, you must rebuild and reinstall any
2776affected packages. 2784affected packages.
2777 2785
27789.14. Automated security checks 27869.15. Automated security checks
2779 2787
2780Please be aware that there can often be bugs in third-party software, and some 2788Please be aware that there can often be bugs in third-party software, and some
2781of these bugs can leave a machine vulnerable to exploitation by attackers. In 2789of these bugs can leave a machine vulnerable to exploitation by attackers. In
2782an effort to lessen the exposure, the NetBSD packages team maintains a database 2790an effort to lessen the exposure, the NetBSD packages team maintains a database
2783of known-exploits to packages which have at one time been included in pkgsrc. 2791of known-exploits to packages which have at one time been included in pkgsrc.
2784The database can be downloaded automatically, and a security audit of all 2792The database can be downloaded automatically, and a security audit of all
2785packages installed on a system can take place. To do this, refer to the 2793packages installed on a system can take place. To do this, refer to the
2786following two tools (installed as part of the pkgtools/pkg_install package): 2794following two tools (installed as part of the pkgtools/pkg_install package):
2787 2795
2788 1. pkg_admin fetch-pkg-vulnerabilities, an easy way to download a list of the 2796 1. pkg_admin fetch-pkg-vulnerabilities, an easy way to download a list of the
2789 security vulnerabilities information. This list is kept up to date by the 2797 security vulnerabilities information. This list is kept up to date by the
2790 pkgsrc security team, and is distributed from the NetBSD ftp server: 2798 pkgsrc security team, and is distributed from the NetBSD ftp server:
2791 2799
@@ -2794,57 +2802,57 @@ following two tools (installed as part o @@ -2794,57 +2802,57 @@ following two tools (installed as part o
2794 2. pkg_admin audit, an easy way to audit the current machine, checking each 2802 2. pkg_admin audit, an easy way to audit the current machine, checking each
2795 known vulnerability. If a vulnerable package is installed, it will be shown 2803 known vulnerability. If a vulnerable package is installed, it will be shown
2796 by output to stdout, including a description of the type of vulnerability, 2804 by output to stdout, including a description of the type of vulnerability,
2797 and a URL containing more information. 2805 and a URL containing more information.
2798 2806
2799Use of these tools is strongly recommended! After "pkg_install" is installed, 2807Use of these tools is strongly recommended! After "pkg_install" is installed,
2800please read the package's message, which you can get by running pkg_info -D 2808please read the package's message, which you can get by running pkg_info -D
2801pkg_install. 2809pkg_install.
2802 2810
2803If this package is installed, pkgsrc builds will use it to perform a security 2811If this package is installed, pkgsrc builds will use it to perform a security
2804check before building any package. See Section 5.2, "Variables affecting the 2812check before building any package. See Section 5.2, "Variables affecting the
2805build process" for ways to control this check. 2813build process" for ways to control this check.
2806 2814
28079.15. Why do some packages ignore my CFLAGS? 28159.16. Why do some packages ignore my CFLAGS?
2808 2816
2809When you add your own preferences to the CFLAGS variable in your mk.conf, these 2817When you add your own preferences to the CFLAGS variable in your mk.conf, these
2810flags are passed in environment variables to the ./configure scripts and to 2818flags are passed in environment variables to the ./configure scripts and to
2811make(1). Some package authors ignore the CFLAGS from the environment variable 2819make(1). Some package authors ignore the CFLAGS from the environment variable
2812by overriding them in the Makefiles of their package. 2820by overriding them in the Makefiles of their package.
2813 2821
2814Currently there is no solution to this problem. If you really need the package 2822Currently there is no solution to this problem. If you really need the package
2815to use your CFLAGS you should run make patch in the package directory and then 2823to use your CFLAGS you should run make patch in the package directory and then
2816inspect any Makefile and Makefile.in for whether they define CFLAGS explicitly. 2824inspect any Makefile and Makefile.in for whether they define CFLAGS explicitly.
2817Usually you can remove these lines. But be aware that some "smart" programmers 2825Usually you can remove these lines. But be aware that some "smart" programmers
2818write so bad code that it only works for the specific combination of CFLAGS 2826write so bad code that it only works for the specific combination of CFLAGS
2819they have chosen. 2827they have chosen.
2820 2828
28219.16. A package does not build. What shall I do? 28299.17. A package does not build. What shall I do?
2822 2830
2823 1. Make sure that your copy of pkgsrc is consistent. A case that occurs often 2831 1. Make sure that your copy of pkgsrc is consistent. A case that occurs often
2824 is that people only update pkgsrc in parts, because of performance reasons. 2832 is that people only update pkgsrc in parts, because of performance reasons.
2825 Since pkgsrc is one large system, not a collection of many small systems, 2833 Since pkgsrc is one large system, not a collection of many small systems,
2826 there are sometimes changes that only work when the whole pkgsrc tree is 2834 there are sometimes changes that only work when the whole pkgsrc tree is
2827 updated. 2835 updated.
2828 2836
2829 2. Make sure that you don't have any CVS conflicts. Search for "<<<<<<" or " 2837 2. Make sure that you don't have any CVS conflicts. Search for "<<<<<<" or "
2830 >>>>>>" in all your pkgsrc files. 2838 >>>>>>" in all your pkgsrc files.
2831 2839
2832 3. Make sure that you don't have old copies of the packages extracted. Run  2840 3. Make sure that you don't have old copies of the packages extracted. Run
2833 make clean clean-depends to verify this. 2841 make clean clean-depends to verify this.
2834 2842
2835 4. If the problem still exists, write a mail to the pkgsrc-users mailing list. 2843 4. If the problem still exists, write a mail to the pkgsrc-users mailing list.
2836 2844
28379.17. What does "Makefile appears to contain unresolved cvs/rcs/??? merge 28459.18. What does "Makefile appears to contain unresolved cvs/rcs/??? merge
2838conflicts" mean? 2846conflicts" mean?
2839 2847
2840You have modified a file from pkgsrc, and someone else has modified that same 2848You have modified a file from pkgsrc, and someone else has modified that same
2841file afterwards in the CVS repository. Both changes are in the same region of 2849file afterwards in the CVS repository. Both changes are in the same region of
2842the file, so when you updated pkgsrc, the cvs command marked the conflicting 2850the file, so when you updated pkgsrc, the cvs command marked the conflicting
2843changes in the file. Because of these markers, the file is no longer a valid 2851changes in the file. Because of these markers, the file is no longer a valid
2844Makefile. 2852Makefile.
2845 2853
2846Have a look at that file, and if you don't need your local changes anymore, you 2854Have a look at that file, and if you don't need your local changes anymore, you
2847can remove that file and run cvs -q update -dP in that directory to download 2855can remove that file and run cvs -q update -dP in that directory to download
2848the current version. 2856the current version.
2849 2857
2850Part II. The pkgsrc developer's guide 2858Part II. The pkgsrc developer's guide
@@ -4500,29 +4508,30 @@ symlinking: @@ -4500,29 +4508,30 @@ symlinking:
4500 4508
4501 * BUILDLINK_FILES.pkg (not shown above) is a shell glob pattern relative to $ 4509 * BUILDLINK_FILES.pkg (not shown above) is a shell glob pattern relative to $
4502 {BUILDLINK_PREFIX.pkg} to be symlinked into ${BUILDLINK_DIR}, e.g. include/ 4510 {BUILDLINK_PREFIX.pkg} to be symlinked into ${BUILDLINK_DIR}, e.g. include/
4503 *.h. 4511 *.h.
4504 4512
4505 * BUILDLINK_FILES_CMD.pkg (not shown above) is a shell pipeline that outputs 4513 * BUILDLINK_FILES_CMD.pkg (not shown above) is a shell pipeline that outputs
4506 to stdout a list of files relative to ${BUILDLINK_PREFIX.pkg}. The 4514 to stdout a list of files relative to ${BUILDLINK_PREFIX.pkg}. The
4507 resulting files are to be symlinked into ${BUILDLINK_DIR}. By default, this 4515 resulting files are to be symlinked into ${BUILDLINK_DIR}. By default, this
4508 takes the +CONTENTS of a pkg and filters it through $ 4516 takes the +CONTENTS of a pkg and filters it through $
4509 {BUILDLINK_CONTENTS_FILTER.pkg}. 4517 {BUILDLINK_CONTENTS_FILTER.pkg}.
4510 4518
4511 * BUILDLINK_CONTENTS_FILTER.pkg (not shown above) is a filter command that 4519 * BUILDLINK_CONTENTS_FILTER.pkg (not shown above) is a filter command that
4512 filters +CONTENTS input into a list of files relative to $ 4520 filters +CONTENTS input into a list of files relative to $
4513 {BUILDLINK_PREFIX.pkg} on stdout. By default, BUILDLINK_CONTENTS_FILTER.pkg 4521 {BUILDLINK_PREFIX.pkg} on stdout. By default for overwrite packages,
4514 outputs the contents of the include and lib directories in the package 4522 BUILDLINK_CONTENTS_FILTER.pkg outputs the contents of the include and lib
4515 +CONTENTS. 4523 directories in the package +CONTENTS, and for pkgviews packages, it outputs
 4524 any libtool archives in lib directories.
4516 4525
4517 * BUILDLINK_FNAME_TRANSFORM.pkg (not shown above) is a list of sed arguments 4526 * BUILDLINK_FNAME_TRANSFORM.pkg (not shown above) is a list of sed arguments
4518 used to transform the name of the source filename into a destination 4527 used to transform the name of the source filename into a destination
4519 filename, e.g. -e "s|/curses.h|/ncurses.h|g". 4528 filename, e.g. -e "s|/curses.h|/ncurses.h|g".
4520 4529
4521This section can additionally include any buildlink3.mk needed for pkg's 4530This section can additionally include any buildlink3.mk needed for pkg's
4522library dependencies. Including these buildlink3.mk files means that the 4531library dependencies. Including these buildlink3.mk files means that the
4523headers and libraries for these dependencies are also symlinked into $ 4532headers and libraries for these dependencies are also symlinked into $
4524{BUILDLINK_DIR} whenever the pkg buildlink3.mk file is included. Dependencies 4533{BUILDLINK_DIR} whenever the pkg buildlink3.mk file is included. Dependencies
4525are only added for directly include buildlink3.mk files. 4534are only added for directly include buildlink3.mk files.
4526 4535
4527When providing a buildlink3.mk and including other buildlink3.mk files in it, 4536When providing a buildlink3.mk and including other buildlink3.mk files in it,
4528please only add necessary ones, i.e., those whose libraries or header files are 4537please only add necessary ones, i.e., those whose libraries or header files are
@@ -6605,30 +6614,38 @@ set in foo/bar/Makefile: @@ -6605,30 +6614,38 @@ set in foo/bar/Makefile:
6605 6614
6606CONFLICTS= baz-[0-9]* 6615CONFLICTS= baz-[0-9]*
6607 6616
6608 6617
6609and in pkgsrc/foo/baz/Makefile: 6618and in pkgsrc/foo/baz/Makefile:
6610 6619
6611CONFLICTS= bar-[0-9]* 6620CONFLICTS= bar-[0-9]*
6612 6621
6613 6622
661419.1.8. Packages that cannot or should not be built 662319.1.8. Packages that cannot or should not be built
6615 6624
6616There are several reasons why a package might be instructed to not build under 6625There are several reasons why a package might be instructed to not build under
6617certain circumstances. If the package builds and runs on most platforms, the 6626certain circumstances. If the package builds and runs on most platforms, the
6618exceptions should be noted with NOT_FOR_PLATFORM. If the package builds and 6627exceptions should be noted with BROKEN_ON_PLATFORM. If the package builds and
6619runs on a small handful of platforms, set ONLY_FOR_PLATFORM instead. Both 6628runs on a small handful of platforms, set BROKEN_EXCEPT_ON_PLATFORM instead.
6620ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM are OS triples (OS-version-platform) 6629Both BROKEN_ON_PLATFORM and BROKEN_EXCEPT_ON_PLATFORM are OS triples
6621that can use glob-style wildcards. 6630(OS-version-platform) that can use glob-style wildcards.
 6631
 6632If a package is not appropriate for some platforms (as oopposed to merely
 6633broken), a different set of variables should be used as this affects failure
 6634reporting and statistics. If the package is appropriate for most platforms, the
 6635exceptions should be noted with NOT_FOR_PLATFORM. If the package is appropriate
 6636for only a small handful of platforms (often exactly one), set
 6637ONLY_FOR_PLATFORM instead. Both ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM are OS
 6638triples (OS-version-platform) that can use glob-style wildcards.
6622 6639
6623Some packages are tightly bound to a specific version of an operating system, 6640Some packages are tightly bound to a specific version of an operating system,
6624e.g. LKMs or sysutils/lsof. Such binary packages are not backwards compatible 6641e.g. LKMs or sysutils/lsof. Such binary packages are not backwards compatible
6625with other versions of the OS, and should be uploaded to a version specific 6642with other versions of the OS, and should be uploaded to a version specific
6626directory on the FTP server. Mark these packages by setting OSVERSION_SPECIFIC 6643directory on the FTP server. Mark these packages by setting OSVERSION_SPECIFIC
6627to "yes". This variable is not currently used by any of the package system 6644to "yes". This variable is not currently used by any of the package system
6628internals, but may be used in the future. 6645internals, but may be used in the future.
6629 6646
6630If the package should be skipped (for example, because it provides 6647If the package should be skipped (for example, because it provides
6631functionality already provided by the system), set PKG_SKIP_REASON to a 6648functionality already provided by the system), set PKG_SKIP_REASON to a
6632descriptive message. If the package should fail because some preconditions are 6649descriptive message. If the package should fail because some preconditions are
6633not met, set PKG_FAIL_REASON to a descriptive message. 6650not met, set PKG_FAIL_REASON to a descriptive message.
6634 6651
@@ -7086,26 +7103,27 @@ should use the following code. @@ -7086,26 +7103,27 @@ should use the following code.
7086/* non-BSD-specific code goes here */ 7103/* non-BSD-specific code goes here */
7087#endif 7104#endif
7088 7105
7089If this distinction is not fine enough, you can also test for the following 7106If this distinction is not fine enough, you can also test for the following
7090macros. 7107macros.
7091 7108
7092Cygwin __CYGWIN__ 7109Cygwin __CYGWIN__
7093DragonFly __DragonFly__ 7110DragonFly __DragonFly__
7094FreeBSD __FreeBSD__ 7111FreeBSD __FreeBSD__
7095Haiku __HAIKU__ 7112Haiku __HAIKU__
7096Interix __INTERIX 7113Interix __INTERIX
7097IRIX __sgi (TODO: get a definite source for this) 7114IRIX __sgi (TODO: get a definite source for this)
7098Linux linux, __linux, __linux__ 7115Linux linux, __linux, __linux__
 7116Mac OS X __APPLE__
7099MirBSD __MirBSD__ (__OpenBSD__ is also defined) 7117MirBSD __MirBSD__ (__OpenBSD__ is also defined)
7100Minix3 __minix 7118Minix3 __minix
7101NetBSD __NetBSD__ 7119NetBSD __NetBSD__
7102OpenBSD __OpenBSD__ 7120OpenBSD __OpenBSD__
7103Solaris sun, __sun 7121Solaris sun, __sun
7104 7122
710519.5.1.2. C preprocessor macros to identify the hardware architecture 712319.5.1.2. C preprocessor macros to identify the hardware architecture
7106 7124
7107i386 i386, __i386, __i386__ 7125i386 i386, __i386, __i386__
7108MIPS __mips 7126MIPS __mips
7109SPARC sparc, __sparc 7127SPARC sparc, __sparc
7110 7128
711119.5.1.3. C preprocessor macros to identify the compiler 712919.5.1.3. C preprocessor macros to identify the compiler
@@ -7367,27 +7385,27 @@ If a package installs .schemas or .entri @@ -7367,27 +7385,27 @@ If a package installs .schemas or .entri
7367take some extra steps to make sure they get registered in the database: 7385take some extra steps to make sure they get registered in the database:
7368 7386
7369 1. Include ../../devel/GConf/schemas.mk instead of its buildlink3.mk file. 7387 1. Include ../../devel/GConf/schemas.mk instead of its buildlink3.mk file.
7370 This takes care of rebuilding the GConf database at installation and 7388 This takes care of rebuilding the GConf database at installation and
7371 deinstallation time, and tells the package where to install GConf data 7389 deinstallation time, and tells the package where to install GConf data
7372 files using some standard configure arguments. It also disallows any access 7390 files using some standard configure arguments. It also disallows any access
7373 to the database directly from the package. 7391 to the database directly from the package.
7374 7392
7375 2. Ensure that the package installs its .schemas files under ${PREFIX}/share/ 7393 2. Ensure that the package installs its .schemas files under ${PREFIX}/share/
7376 gconf/schemas. If they get installed under ${PREFIX}/etc, you will need to 7394 gconf/schemas. If they get installed under ${PREFIX}/etc, you will need to
7377 manually patch the package. 7395 manually patch the package.
7378 7396
7379 3. Check the PLIST and remove any entries under the etc/gconf directory, as 7397 3. Check the PLIST and remove any entries under the etc/gconf directory, as
7380 they will be handled automatically. See Section 9.13, "How do I change the 7398 they will be handled automatically. See Section 9.14, "How do I change the
7381 location of configuration files?" for more information. 7399 location of configuration files?" for more information.
7382 7400
7383 4. Define the GCONF_SCHEMAS variable in your Makefile with a list of all 7401 4. Define the GCONF_SCHEMAS variable in your Makefile with a list of all
7384 .schemas files installed by the package, if any. Names must not contain any 7402 .schemas files installed by the package, if any. Names must not contain any
7385 directories in them. 7403 directories in them.
7386 7404
7387 5. Define the GCONF_ENTRIES variable in your Makefile with a list of all 7405 5. Define the GCONF_ENTRIES variable in your Makefile with a list of all
7388 .entries files installed by the package, if any. Names must not contain any 7406 .entries files installed by the package, if any. Names must not contain any
7389 directories in them. 7407 directories in them.
7390 7408
739119.6.10. Packages installing scrollkeeper/rarian data files 740919.6.10. Packages installing scrollkeeper/rarian data files
7392 7410
7393If a package installs .omf files, used by scrollkeeper/rarian, you need to take 7411If a package installs .omf files, used by scrollkeeper/rarian, you need to take