Annotation of htdocs/docs/pkgsrc/faq.html, revision 1.2
1.1 dsieger 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2: <html>
3: <head>
4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5: <title>Chapter 8. Frequently Asked Questions</title>
1.2 ! rillig 6: <link rel="stylesheet" href="/global.css" type="text/css">
1.1 dsieger 7: <meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
8: <link rel="start" href="index.html" title="The pkgsrc guide">
9: <link rel="up" href="users-guide.html" title="Part I. The pkgsrc user's guide">
10: <link rel="prev" href="files.html" title="Chapter 7. Directory layout of the installed files">
11: <link rel="next" href="developers-guide.html" title="Part II. The pkgsrc developer's guide">
12: </head>
13: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14: <div class="navheader">
15: <table width="100%" summary="Navigation header">
16: <tr><th colspan="3" align="center">Chapter 8. Frequently Asked Questions</th></tr>
17: <tr>
18: <td width="20%" align="left">
19: <a accesskey="p" href="files.html">Prev</a> </td>
20: <th width="60%" align="center">Part I. The pkgsrc user's guide</th>
21: <td width="20%" align="right"> <a accesskey="n" href="developers-guide.html">Next</a>
22: </td>
23: </tr>
24: </table>
25: <hr>
26: </div>
27: <div class="chapter" lang="en">
28: <div class="titlepage"><div><div><h2 class="title">
29: <a name="faq"></a>Chapter 8. Frequently Asked Questions</h2></div></div></div>
30: <div class="toc">
31: <p><b>Table of Contents</b></p>
32: <dl>
33: <dt><span class="sect1"><a href="faq.html#mailing-list-pointers">8.1. Are there any mailing lists for pkg-related discussion?</a></span></dt>
34: <dt><span class="sect1"><a href="faq.html#pkgviews-docs">8.2. Where's the pkgviews documentation?</a></span></dt>
35: <dt><span class="sect1"><a href="faq.html#faq-pkgtools">8.3. Utilities for package management (pkgtools)</a></span></dt>
36: <dt><span class="sect1"><a href="faq.html#non-root-pkgsrc">8.4. How to use pkgsrc as non-root</a></span></dt>
37: <dt><span class="sect1"><a href="faq.html#resume-transfers">8.5. How to resume transfers when fetching distfiles?</a></span></dt>
38: <dt><span class="sect1"><a href="faq.html#XFree86-from-pkgsrc">8.6. How can I install/use XFree86 from pkgsrc?</a></span></dt>
39: <dt><span class="sect1"><a href="faq.html#x.org-from-pkgsrc">8.7. How can I install/use X.org from pkgsrc?</a></span></dt>
40: <dt><span class="sect1"><a href="faq.html#fetch-behind-firewall">8.8. How to fetch files from behind a firewall</a></span></dt>
41: <dt><span class="sect1"><a href="faq.html#passive-ftp">8.9. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</a></span></dt>
42: <dt><span class="sect1"><a href="faq.html#fetching-all-distfiles">8.10. How to fetch all distfiles at once</a></span></dt>
43: <dt><span class="sect1"><a href="faq.html#tmac.andoc-missing">8.11. What does “<span class="quote">Don't know how to make
44: /usr/share/tmac/tmac.andoc</span>” mean?</a></span></dt>
45: <dt><span class="sect1"><a href="faq.html#bsd.own.mk-missing">8.12. What does “<span class="quote">Could not find bsd.own.mk</span>” mean?</a></span></dt>
46: <dt><span class="sect1"><a href="faq.html#using-sudo-with-pkgsrc">8.13. Using 'sudo' with pkgsrc</a></span></dt>
47: <dt><span class="sect1"><a href="faq.html#faq.conf">8.14. How do I change the location of configuration files?</a></span></dt>
48: <dt><span class="sect1"><a href="faq.html#audit-packages">8.15. Automated security checks</a></span></dt>
49: <dt><span class="sect1"><a href="faq.html#ufaq-cflags">8.16. Why do some packages ignore my <code class="varname">CFLAGS</code>?</a></span></dt>
50: <dt><span class="sect1"><a href="faq.html#ufaq-fail">8.17. A package does not build. What shall I do?</a></span></dt>
51: <dt><span class="sect1"><a href="faq.html#faq.rcs-conflicts">8.18. What does “<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>” mean?</a></span></dt>
52: </dl>
53: </div>
54: <p>This section contains hints, tips & tricks on special things in
55: pkgsrc that we didn't find a better place for in the previous chapters, and
56: it contains items for both pkgsrc users and developers.</p>
57: <div class="sect1" lang="en">
58: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
59: <a name="mailing-list-pointers"></a>8.1. Are there any mailing lists for pkg-related discussion?</h2></div></div></div>
60: <p>The following mailing lists may be of interest to pkgsrc users:</p>
61: <div class="itemizedlist"><ul type="disc">
62: <li><p><a href="http://www.NetBSD.org/MailingLists/index.html#pkgsrc-users" target="_top">pkgsrc-users</a>:
63: This is a general purpose list for most issues regarding
64: pkgsrc, regardless of platform, e.g. soliciting user help
65: for pkgsrc configuration, unexpected build failures, using
66: particular packages, upgrading pkgsrc installations,
67: questions regarding the pkgsrc release branches, etc. General announcements or
68: proposals for changes that impact the pkgsrc user community,
69: e.g. major infrastructure changes, new features, package
70: removals, etc., may also be posted.</p></li>
71: <li><p><a href="http://www.NetBSD.org/MailingLists/index.html#pkgsrc-bulk" target="_top">pkgsrc-bulk</a>:
72: A list where the results of pkgsrc bulk builds are sent and
73: discussed.</p></li>
74: <li><p><a href="http://www.NetBSD.org/MailingLists/index.html#pkgsrc-changes" target="_top">pkgsrc-changes</a>:
75: This list is for those who are interested in getting a
76: commit message for every change committed to pkgsrc. It is
77: also available in digest form, meaning one daily message
78: containing all commit messages for changes to the package
79: source tree in that 24 hour period.</p></li>
80: </ul></div>
81: <p>To subscribe, do:</p>
82: <pre class="programlisting">
83: <code class="prompt">%</code> echo subscribe <em class="replaceable"><code>listname</code></em> | mail majordomo@NetBSD.org
84: </pre>
85: <p>Archives for all these mailing lists are available from
86: <a href="http://mail-index.NetBSD.org/" target="_top">http://mail-index.NetBSD.org/</a>.</p>
87: </div>
88: <div class="sect1" lang="en">
89: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
90: <a name="pkgviews-docs"></a>8.2. Where's the pkgviews documentation?</h2></div></div></div>
91: <p>Pkgviews is tightly integrated with buildlink. You can find a
92: pkgviews User's guide in
93: <code class="filename">pkgsrc/mk/buildlink3/PKGVIEWS_UG</code>.</p>
94: </div>
95: <div class="sect1" lang="en">
96: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
97: <a name="faq-pkgtools"></a>8.3. Utilities for package management (pkgtools)</h2></div></div></div>
98: <p>The directory <code class="filename">pkgsrc/pkgtools</code> contains
99: a number of useful utilities for both users and developers of pkgsrc. This
100: section attempts only to make the reader aware of the utilities and when
101: they might be useful, and not to duplicate the documentation that comes
102: with each package.</p>
103: <p>Utilities used by pkgsrc (automatically installed when needed):</p>
104: <div class="itemizedlist"><ul type="disc"><li><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>:
105: Symlinks for use by buildlink.</p></li></ul></div>
106: <p>OS tool augmentation (automatically installed when needed):</p>
107: <div class="itemizedlist"><ul type="disc">
108: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/digest/README.html" target="_top"><code class="filename">pkgtools/digest</code></a>:
109: Calculates various kinds of checksums (including SHA1).</p></li>
110: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/README.html" target="_top"><code class="filename">pkgtools/libnbcompat</code></a>:
111: Compatibility library for pkgsrc tools.</p></li>
112: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/mtree/README.html" target="_top"><code class="filename">pkgtools/mtree</code></a>: Installed on
113: non-BSD systems due to lack of native mtree.</p></li>
114: <li><p><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>:
115: Up-to-date replacement for
116: <code class="filename">/usr/sbin/pkg_install</code>, or for use on operating
117: systems where pkg_install is not present.</p></li>
118: </ul></div>
119: <p>Utilities used by pkgsrc (not automatically installed):</p>
120: <div class="itemizedlist"><ul type="disc">
121: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkg_tarup/README.html" target="_top"><code class="filename">pkgtools/pkg_tarup</code></a>:
122: Create a binary package from an
123: already-installed package. Used by <span><strong class="command">make replace</strong></span> to
124: save the old package.</p></li>
125: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/dfdisk/README.html" target="_top"><code class="filename">pkgtools/dfdisk</code></a>:
126: Adds extra functionality to pkgsrc, allowing it to fetch distfiles
127: from multiple locations. It currently supports the following
128: methods: multiple CD-ROMs and network FTP/HTTP connections.</p></li>
129: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/xpkgwedge/README.html" target="_top"><code class="filename">pkgtools/xpkgwedge</code></a>: Put X11
130: packages someplace else (enabled by default).</p></li>
131: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/devel/cpuflags/README.html" target="_top"><code class="filename">devel/cpuflags</code></a>: Determine the
132: best compiler flags to optimise code for your current CPU and
133: compiler.</p></li>
134: </ul></div>
135: <p>Utilities for keeping track of installed packages, being up to date,
136: etc:</p>
137: <div class="itemizedlist"><ul type="disc">
138: <li><p><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>: Reports on
139: packages whose installed versions do not match the latest pkgsrc
140: entries.</p></li>
141: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdep/README.html" target="_top"><code class="filename">pkgtools/pkgdep</code></a>: Makes
142: dependency graphs of packages, to aid in choosing a strategy for
143: updating.</p></li>
144: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdepgraph/README.html" target="_top"><code class="filename">pkgtools/pkgdepgraph</code></a>: Makes
145: graphs from the output of <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdep/README.html" target="_top"><code class="filename">pkgtools/pkgdep</code></a> (uses graphviz).</p></li>
146: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkglint/README.html" target="_top"><code class="filename">pkgtools/pkglint</code></a>: The
147: pkglint(1) program checks a pkgsrc entry for errors, lintpkgsrc(1)
148: does various checks on the complete pkgsrc system.</p></li>
149: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgsurvey/README.html" target="_top"><code class="filename">pkgtools/pkgsurvey</code></a>: Report what
150: packages you have installed.</p></li>
151: </ul></div>
152: <p>Utilities for people maintaining or creating individual packages:</p>
153: <div class="itemizedlist"><ul type="disc">
154: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/pkgdiff/README.html" target="_top"><code class="filename">pkgtools/pkgdiff</code></a>: Automate
155: making and maintaining patches for a package (includes pkgdiff,
156: pkgvi, mkpatches, etc.).</p></li>
157: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/rpm2pkg/README.html" target="_top"><code class="filename">pkgtools/rpm2pkg</code></a>,
158: <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/url2pkg/README.html" target="_top"><code class="filename">pkgtools/url2pkg</code></a>: Aids in
159: converting to pkgsrc.</p></li>
160: <li><p><a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/gensolpkg/README.html" target="_top"><code class="filename">pkgtools/gensolpkg</code></a>: Convert
161: pkgsrc to a Solaris package.</p></li>
162: </ul></div>
163: <p>Utilities for people maintaining pkgsrc (or: more obscure pkg
164: utilities)</p>
165: <div class="itemizedlist"><ul type="disc">
166: <li><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
167: packages in a chrooted area.</p></li>
168: <li><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
169: kernel version for chrooted cross builds.</p></li>
170: </ul></div>
171: </div>
172: <div class="sect1" lang="en">
173: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
174: <a name="non-root-pkgsrc"></a>8.4. How to use pkgsrc as non-root</h2></div></div></div>
175: <p>If you want to use pkgsrc as non-root user, you can set some
176: variables to make pkgsrc work under these conditions. At the very least,
177: you need to set <code class="varname">UNPRIVILEGED</code> to “<span class="quote">yes</span>”; this
178: will turn on unprivileged mode and set multiple related variables to allow
179: installation of packages as non-root.</p>
180: <p>In case the defaults are not enough, you may want to tune some other
181: variables used. For example, if the automatic user/group detection leads
182: to incorrect values (or not the ones you would like to use), you can change
183: them by setting <code class="varname">UNPRIVILEGED_USER</code> and
184: <code class="varname">UNPRIVILEGED_GROUP</code> respectively.</p>
185: <p>As regards bootstrapping, please note that the
186: <span><strong class="command">bootstrap</strong></span> script will ease non-root configuration when
187: given the “<span class="quote">--ignore-user-check</span>” flag, as it will choose and
188: use multiple default directories under <code class="filename">~/pkg</code> as the
189: installation targets. These directories can be overridden by the
190: “<span class="quote">--prefix</span>” flag provided by the script, as well as some others
191: that allow finer tuning of the tree layout.</p>
192: </div>
193: <div class="sect1" lang="en">
194: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
195: <a name="resume-transfers"></a>8.5. How to resume transfers when fetching distfiles?</h2></div></div></div>
196: <p>By default, resuming transfers in pkgsrc is disabled, but you can
197: enable this feature by adding the option
198: <code class="varname">PKG_RESUME_TRANSFERS=YES</code> into
199: <code class="filename">/etc/mk.conf</code>. If, during a fetch step, an incomplete
200: distfile is found, pkgsrc will try to resume it.</p>
201: <p>You can also
202: use a different program than the default <a href="http://netbsd.gw.com/cgi-bin/man-cgi?ftp+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">ftp</span>(1)</span></a> by changing the
203: <code class="varname">FETCH_CMD</code> variable. Don't forget to set
204: <code class="varname">FETCH_RESUME_ARGS</code> and
205: <code class="varname">FETCH_OUTPUT_ARGS</code> if you are not using default
206: values.</p>
207: <p>For example, if you want to use
208: <code class="filename">wget</code> to resume downloads, you'll have to use something
209: like:</p>
210: <pre class="programlisting">
211: FETCH_CMD= wget
212: FETCH_BEFORE_ARGS= --passive-ftp
213: FETCH_RESUME_ARGS= -c
214: FETCH_OUTPUT_ARGS= -O
215: </pre>
216: </div>
217: <div class="sect1" lang="en">
218: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
219: <a name="XFree86-from-pkgsrc"></a>8.6. How can I install/use XFree86 from pkgsrc?</h2></div></div></div>
220: <p>If you want to use XFree86 from pkgsrc instead of your system's own
221: X11 (<code class="filename">/usr/X11R6</code>, <code class="filename">/usr/openwin</code>,
222: ...), you will have to add the following line into
223: <code class="filename">/etc/mk.conf</code>:</p>
224: <pre class="programlisting">
225: X11_TYPE=XFree86
226: </pre>
227: </div>
228: <div class="sect1" lang="en">
229: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
230: <a name="x.org-from-pkgsrc"></a>8.7. How can I install/use X.org from pkgsrc?</h2></div></div></div>
231: <p>If you want to use X.org from pkgsrc instead of your system's own X11
232: (<code class="filename">/usr/X11R6</code>, <code class="filename">/usr/openwin</code>, ...)
233: you will have to add the following line into
234: <code class="filename">/etc/mk.conf</code>:</p>
235: <pre class="programlisting">
236: X11_TYPE=xorg
237: </pre>
238: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
239: <h3 class="title">Note</h3>
240: <p>The DragonFly operating system defaults to using
241: this X.org X11 implementation from pkgsrc.</p>
242: </div>
243: </div>
244: <div class="sect1" lang="en">
245: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
246: <a name="fetch-behind-firewall"></a>8.8. How to fetch files from behind a firewall</h2></div></div></div>
247: <p>If you are sitting behind a firewall which does not allow direct
248: connections to Internet hosts (i.e. non-NAT), you may specify the
249: relevant proxy hosts. This is done using an environment variable in the
250: form of a URL, e.g. in Amdahl, the machine
251: “<span class="quote">orpheus.amdahl.com</span>” is one of the firewalls, and it uses
252: port 80 as the proxy port number. So the proxy environment variables
253: are:</p>
254: <pre class="programlisting">
255: ftp_proxy=ftp://orpheus.amdahl.com:80/
256: http_proxy=http://orpheus.amdahl.com:80/
257: </pre>
258: </div>
259: <div class="sect1" lang="en">
260: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
261: <a name="passive-ftp"></a>8.9. How do I tell <span><strong class="command">make fetch</strong></span> to do passive FTP?</h2></div></div></div>
262: <p>This depends on which utility is used to retrieve distfiles. From
263: <code class="filename">bsd.pkg.mk</code>, <code class="varname">FETCH_CMD</code> is assigned
264: the first available command from the following list:</p>
265: <div class="itemizedlist"><ul type="disc">
266: <li><p><code class="filename">${LOCALBASE}/bin/ftp</code></p></li>
267: <li><p><code class="filename">/usr/bin/ftp</code></p></li>
268: </ul></div>
269: <p>On a default NetBSD installation, this will be
270: <code class="filename">/usr/bin/ftp</code>, which automatically tries passive
271: connections first, and falls back to active connections if the server
272: refuses to do passive. For the other tools, add the following to your
273: <code class="filename">/etc/mk.conf</code> file:
274: <code class="varname">PASSIVE_FETCH=1</code>.</p>
275: <p>Having that option present will prevent
276: <code class="filename">/usr/bin/ftp</code> from falling back to active
277: transfers.</p>
278: </div>
279: <div class="sect1" lang="en">
280: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
281: <a name="fetching-all-distfiles"></a>8.10. How to fetch all distfiles at once</h2></div></div></div>
282: <p>You would like to download all the distfiles in a single batch
283: from work or university, where you can't run a <span><strong class="command">make
284: fetch</strong></span>. There is an archive of distfiles on <a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/" target="_top">ftp.NetBSD.org</a>,
285: but downloading the entire directory may not be appropriate.</p>
286: <p>The answer here is to do a <span><strong class="command">make fetch-list</strong></span> in
287: <code class="filename">/usr/pkgsrc</code> or one of its subdirectories, carry the
288: resulting list to your machine at work/school and use it there. If you
289: don't have a NetBSD-compatible <a href="http://netbsd.gw.com/cgi-bin/man-cgi?ftp+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">ftp</span>(1)</span></a> (like tnftp) at work, don't
290: forget to set <code class="varname">FETCH_CMD</code> to something that fetches a
291: URL:</p>
292: <p>At home:</p>
293: <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>cd /usr/pkgsrc</code></strong>
294: <code class="prompt">%</code> <strong class="userinput"><code>make fetch-list FETCH_CMD=wget DISTDIR=/tmp/distfiles >/tmp/fetch.sh</code></strong>
295: <code class="prompt">%</code> <strong class="userinput"><code>scp /tmp/fetch.sh work:/tmp</code></strong></pre>
296: <p>At work:</p>
297: <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>sh /tmp/fetch.sh</code></strong></pre>
298: <p>then tar up <code class="filename">/tmp/distfiles</code> and take it
299: home.</p>
300: <p>If you have a machine running NetBSD, and you want to get
301: <span class="emphasis"><em>all</em></span> distfiles (even ones that aren't for your
302: machine architecture), you can do so by using the above-mentioned
303: <span><strong class="command">make fetch-list</strong></span> approach, or fetch the distfiles
304: directly by running:</p>
305: <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make mirror-distfiles</code></strong></pre>
306: <p>If you even decide to ignore
307: <code class="varname">NO_{SRC,BIN}_ON_{FTP,CDROM}</code>, then you can get everything
308: by running:</p>
309: <pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code>make fetch NO_SKIP=yes</code></strong></pre>
310: </div>
311: <div class="sect1" lang="en">
312: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
313: <a name="tmac.andoc-missing"></a>8.11. What does “<span class="quote">Don't know how to make
314: /usr/share/tmac/tmac.andoc</span>” mean?</h2></div></div></div>
315: <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>
316: package, you get the error from make that it doesn't know how to make
317: <code class="filename">/usr/share/tmac/tmac.andoc</code>? This indicates that
318: you don't have installed the “<span class="quote">text</span>” set (nroff, ...) from
319: the NetBSD base distribution on your machine. It is recommended to do
320: that to format man pages.</p>
321: <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
322: can get away with setting <code class="varname">NOMAN=YES</code> either in the
323: environment or in <code class="filename">/etc/mk.conf</code>.</p>
324: </div>
325: <div class="sect1" lang="en">
326: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
327: <a name="bsd.own.mk-missing"></a>8.12. What does “<span class="quote">Could not find bsd.own.mk</span>” mean?</h2></div></div></div>
328: <p>You didn't install the compiler set, <code class="filename">comp.tgz</code>,
329: when you installed your NetBSD machine. Please get and install it, by
330: extracting it in <code class="filename">/</code>:</p>
331: <pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cd /</code></strong>
332: <code class="prompt">#</code> <strong class="userinput"><code>tar --unlink -zxvpf .../comp.tgz</code></strong></pre>
333: <p><code class="filename">comp.tgz</code> is part of every NetBSD release. Get
334: the one that corresponds to your release (determine via <span><strong class="command">uname
335: -r</strong></span>).</p>
336: </div>
337: <div class="sect1" lang="en">
338: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
339: <a name="using-sudo-with-pkgsrc"></a>8.13. Using 'sudo' with pkgsrc</h2></div></div></div>
340: <p>When installing packages as non-root user and using the just-in-time
341: <a href="http://netbsd.gw.com/cgi-bin/man-cgi?su+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">su</span>(1)</span></a> feature of pkgsrc, it can become annoying to type in the root
342: password for each required package installed. To avoid this, the sudo
343: package can be used, which does password caching over a limited time. To
344: use it, install sudo (either as binary package or from
345: <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
346: following into your <code class="filename">/etc/mk.conf</code>, somewhere
347: <span class="emphasis"><em>after</em></span> the definition of the
348: <code class="varname">LOCALBASE</code> variable:</p>
349: <pre class="programlisting">
350: .if exists(${LOCALBASE}/bin/sudo)
351: SU_CMD= ${LOCALBASE}/bin/sudo /bin/sh -c
352: .endif
353: </pre>
354: </div>
355: <div class="sect1" lang="en">
356: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
357: <a name="faq.conf"></a>8.14. How do I change the location of configuration files?</h2></div></div></div>
358: <p>As the system administrator, you can choose where configuration files
359: are installed. The default settings make all these files go into
360: <code class="filename">${PREFIX}/etc</code> or some of its subdirectories; this may
361: be suboptimal depending on your expectations (e.g., a read-only,
362: NFS-exported <code class="varname">PREFIX</code> with a need of per-machine
363: configuration of the provided packages).</p>
364: <p>In order to change the defaults, you can modify the
365: <code class="varname">PKG_SYSCONFBASE</code> variable (in
366: <code class="filename">/etc/mk.conf</code>) to point to your preferred configuration
367: directory; some common examples include <code class="filename">/etc</code> or
368: <code class="filename">/etc/pkg</code>.</p>
369: <p>Furthermore, you can change this value on a per-package basis by
370: setting the <code class="varname">PKG_SYSCONFDIR.${PKG_SYSCONFVAR}</code> variable.
371: <code class="varname">PKG_SYSCONFVAR</code>'s value usually matches the name of the
372: package you would like to modify, that is, the contents of
373: <code class="varname">PKGBASE</code>.</p>
374: <p>Note that after changing these settings, you must rebuild and
375: reinstall any affected packages.</p>
376: </div>
377: <div class="sect1" lang="en">
378: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
379: <a name="audit-packages"></a>8.15. Automated security checks</h2></div></div></div>
380: <p>Please be aware that there can often be bugs in third-party software,
381: and some of these bugs can leave a machine vulnerable to exploitation by
382: attackers. In an effort to lessen the exposure, the NetBSD packages team
383: maintains a database of known-exploits to packages which have at one time
384: been included in pkgsrc. The database can be downloaded automatically, and
385: a security audit of all packages installed on a system can take place. To
386: do this, install the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/audit-packages/README.html" target="_top"><code class="filename">security/audit-packages</code></a> package. It has two
387: components:</p>
388: <div class="orderedlist"><ol type="1">
389: <li>
390: <p><span><strong class="command">download-vulnerability-list</strong></span>, an easy way to
391: download a list of the security vulnerabilities information. This list
392: is kept up to date by the NetBSD security officer and the NetBSD
393: packages team, and is distributed from the NetBSD ftp server:</p>
394: <p><a href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities" target="_top">ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities</a></p>
395: </li>
396: <li><p><span><strong class="command">audit-packages</strong></span>, an easy way to audit the
397: current machine, checking each vulnerability which is known. If a
398: vulnerable package is installed, it will be shown by output to stdout,
399: including a description of the type of vulnerability, and a URL
400: containing more information.</p></li>
401: </ol></div>
402: <p>Use of the <a href="ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc/security/audit-packages/README.html" target="_top"><code class="filename">security/audit-packages</code></a>
403: package is strongly recommended! After
404: “<span class="quote">audit-packages</span>” is installed, please read
405: the package's message, which you can get by running <strong class="userinput"><code>pkg_info -D
406: audit-packages</code></strong>.</p>
407: <p>If this package is installed, pkgsrc builds will use it to
408: perform a security check before building any package. See <a href="configuring.html#variables-affecting-build" title="5.2. Variables affecting the build process">Section 5.2, “Variables affecting the build process”</a> for ways to control this
409: check.</p>
410: </div>
411: <div class="sect1" lang="en">
412: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
413: <a name="ufaq-cflags"></a>8.16. Why do some packages ignore my <code class="varname">CFLAGS</code>?</h2></div></div></div>
414: <p>When you add your own preferences to the
415: <code class="varname">CFLAGS</code> variable in your
416: <code class="filename">mk.conf</code>, these flags are passed in
417: environment variables to the <code class="filename">./configure</code>
418: scripts and to <a href="http://netbsd.gw.com/cgi-bin/man-cgi?make+1+NetBSD-current"><span class="citerefentry"><span class="refentrytitle">make</span>(1)</span></a>. Some package authors ignore the
419: <code class="varname">CFLAGS</code> from the environment variable by
420: overriding them in the <code class="filename">Makefile</code>s of their
421: package.</p>
422: <p>Currently there is no solution to this problem. If you
423: really need the package to use your <code class="varname">CFLAGS</code>
424: you should run <span><strong class="command">make patch</strong></span> in the package
425: directory and then inspect any <code class="filename">Makefile</code> and
426: <code class="filename">Makefile.in</code> for whether they define
427: <code class="varname">CFLAGS</code> explicitly. Usually you can remove
428: these lines. But be aware that some “<span class="quote">smart</span>”
429: programmers write so bad code that it only works for the
430: specific combination of <code class="varname">CFLAGS</code> they have
431: chosen.</p>
432: </div>
433: <div class="sect1" lang="en">
434: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
435: <a name="ufaq-fail"></a>8.17. A package does not build. What shall I do?</h2></div></div></div>
436: <div class="procedure"><ol type="1">
437: <li><p>Make sure that your copy of pkgsrc is consistent. A
438: case that occurs often is that people only update pkgsrc in
439: parts, because of performance reasons. Since pkgsrc is one large
440: system, not a collection of many small systems, there are
441: sometimes changes that only work when the whole pkgsrc tree is
442: updated.</p></li>
443: <li><p>Make sure that you don't have any CVS conflicts.
444: Search for “<span class="quote"><<<<<<</span>” or
445: “<span class="quote">>>>>>></span>” in all your pkgsrc
446: files.</p></li>
447: <li><p>Make sure that you don't have old copies of the packages
448: extracted. Run <span><strong class="command">make clean clean-depends</strong></span> to
449: verify this.</p></li>
450: <li><p>If the problem still exists, write a mail to the
451: <code class="literal">pkgsrc-users</code> mailing list.</p></li>
452: </ol></div>
453: </div>
454: <div class="sect1" lang="en">
455: <div class="titlepage"><div><div><h2 class="title" style="clear: both">
456: <a name="faq.rcs-conflicts"></a>8.18. What does “<span class="quote">Makefile appears to contain unresolved cvs/rcs/??? merge conflicts</span>” mean?</h2></div></div></div>
457: <p>You have modified a file from pkgsrc, and someone else has
458: modified that same file afterwards in the CVS repository. Both changes
459: are in the same region of the file, so when you updated pkgsrc, the
460: <code class="literal">cvs</code> command marked the conflicting changes in the
461: file. Because of these markers, the file is no longer a valid
462: <code class="filename">Makefile</code>.</p>
463: <p>Have a look at that file, and if you don't need your local changes
464: anymore, you can remove that file and run <span><strong class="command">cvs -q update
465: -dP</strong></span> in that directory to download the current version.</p>
466: </div>
467: </div>
468: <div class="navfooter">
469: <hr>
470: <table width="100%" summary="Navigation footer">
471: <tr>
472: <td width="40%" align="left">
473: <a accesskey="p" href="files.html">Prev</a> </td>
474: <td width="20%" align="center"><a accesskey="u" href="users-guide.html">Up</a></td>
475: <td width="40%" align="right"> <a accesskey="n" href="developers-guide.html">Next</a>
476: </td>
477: </tr>
478: <tr>
479: <td width="40%" align="left" valign="top">Chapter 7. Directory layout of the installed files </td>
480: <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
481: <td width="40%" align="right" valign="top"> Part II. The pkgsrc developer's guide</td>
482: </tr>
483: </table>
484: </div>
485: </body>
486: </html>
CVSweb <webmaster@jp.NetBSD.org>