Files
lotherk b654bf74a2 docs: add The Makronix Guide and its four installed forms
One DocBook source in docs/guide produces the manual pages, one HTML
file, the PDF and an MCDE information library.  The guide follows the
structure of The NetBSD Guide, describes Makronix 0.99.10
(Camouflage), and has its own chapters for MCDE, the Information
Manager and the display.

The forms are installed by the release:

  /usr/share/doc/makronix/makronix-guide.html
  /usr/share/doc/makronix/makronix-guide.pdf
  /usr/share/doc/makronix/infolib/makronix.dti/   (base-sys-share)
  /usr/share/man/man7/makronix-guide*.7           (man-reference-man)
  /etc/dt/config/Xsession.d/0000makronix          (etc-sys-etc)
  /etc/dt/infolib/en_US.UTF-8/makronix.dti        (symlink)

The information library is built with MCDE's dtdocbook2infolib from a
small Lua writer for the CDE DocBook SGML dialect; tools/test-tools.sh
runs docs/guide/check.sh on the installed copies and proves that a
missing manual page falls red.
2026-11-15 21:21:49 +00:00

114 lines
5.0 KiB
XML

<!-- License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. -->
<chapter id="pkgsrc">
<title>Packages and pkgsrc</title>
<para>Makronix has two kinds of software: what NetBSD's build puts in the
base system, and what pkgsrc installs under <filename>/usr/pkg</filename>.
The desktop, Firefox, Thunderbird and the games are pkgsrc packages. The
package tools are NetBSD's; the packages on the medium are built for
Makronix or taken from the NetBSD project.</para>
<sect1 id="pkgsrc-tools">
<title>The package tools</title>
<para><citerefentry><refentrytitle>pkg_add</refentrytitle><manvolnum>1</manvolnum></citerefentry>
installs, <citerefentry><refentrytitle>pkg_delete</refentrytitle><manvolnum>1</manvolnum></citerefentry>
removes, and <citerefentry><refentrytitle>pkg_info</refentrytitle><manvolnum>1</manvolnum></citerefentry>
asks questions. The package database is
<filename>/usr/pkg/pkgdb</filename>.</para>
<screen>$ pkg_info | less
$ pkg_info -L firefox | less
$ pkg_info -D firefox
$ pkg_info -W /usr/pkg/bin/firefox</screen>
<para><option>-L</option> lists the files of a package,
<option>-D</option> prints the message that came with it (where its
documentation is, which service to enable), and <option>-W</option>
answers which package owns a file.</para>
</sect1>
<sect1 id="pkgsrc-install">
<title>Installing a package</title>
<para><filename>/etc/pkg_install.conf</filename> names the repository in
<envar>PKG_PATH</envar>. The installer writes it when the machine is
installed; it points at the package repository on the installation
medium or at the NetBSD project's repository for the release the packages
were built for. With the path set, a package is one command:</para>
<screen># pkg_add firefox
# pkg_add -u firefox
# pkg_delete firefox</screen>
<para><command>pkg_add -u</command> updates an installed package to the
newest version the repository has. Without an argument it updates
everything that has a newer version:</para>
<screen># pkg_add -uu
# pkg_admin rebuild</screen>
<para>An update can replace a library that another program needs. Read
the messages <command>pkg_add</command> prints, and keep the previous
package until the new one has started.</para>
</sect1>
<sect1 id="pkgsrc-set">
<title>The makronix set and the package database</title>
<para>The packages that Makronix itself ships are in the
<quote>makronix</quote> set, which the installer unpacks as part of the
system. They are not registered in the package database: they change
with a Makronix release, and <command>pkg_add -u</command> does not
touch them. A program that is in the base set or in the
<quote>makronix</quote> set is therefore updated by installing a new
Makronix release, not by a package update. The programs that were
installed with <command>pkg_add</command> (Firefox, Thunderbird, QEMU,
the games) are registered and do update.</para>
<para><command>pkg_info</command> shows the registered packages. If it
does not list MCDE, that is not a defect: MCDE came with the release.</para>
</sect1>
<sect1 id="pkgsrc-build">
<title>Building from source</title>
<para>The source set carries pkgsrc in <filename>/usr/pkgsrc</filename>.
A package is built in its own directory with the NetBSD make:</para>
<screen># cd /usr/pkgsrc/www/firefox
# make install clean</screen>
<para>The build needs the distfiles for the package and its
dependencies. The source set carries the distfiles of the packages
Makronix ships, not the whole pkgsrc archive; a package outside that set
fetches what it needs, which requires a network connection. The
authoritative description of pkgsrc is <citetitle>The pkgsrc
Guide</citetitle>, installed with the tree and available on the NetBSD
project's web site.</para>
<para>A build on the installed machine writes into
<filename>/usr/pkg</filename> and its work directories under
<filename>/usr/pkgsrc</filename>. It needs free space &#x2014; a browser
can take several gigabytes while it builds &#x2014; and it is the wrong
thing to do on a machine with a nearly full disk.</para>
</sect1>
<sect1 id="pkgsrc-security">
<title>Security updates</title>
<para><citerefentry><refentrytitle>pkg_admin</refentrytitle><manvolnum>1</manvolnum></citerefentry>
can compare the installed packages with the published vulnerability
list:</para>
<screen># pkg_admin audit
# pkg_admin fetch-pkg-vulnerabilities</screen>
<para>Makronix enables <literal>fetch_pkg_vulnerabilities=YES</literal>
in <filename>/etc/daily.conf</filename>, so the list is fetched daily
and <citerefentry><refentrytitle>security</refentrytitle><manvolnum>8</manvolnum></citerefentry>
reports what it finds to root's mail. The report is only as good as the
list; read it, and update the packages it names.</para>
</sect1>
</chapter>