summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_comp
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2002-09-25 18:57:30 +0000
committerwiz <wiz@pkgsrc.org>2002-09-25 18:57:30 +0000
commit514fdd80c99de60260b558bc2f2b5e29eea24f9a (patch)
tree98851fe60be50e8727c16b34c21151ed3b9ee324 /pkgtools/pkg_comp
parent8c4a3b0cccb2fd43ff368669ee43fcccd37307da (diff)
downloadpkgsrc-514fdd80c99de60260b558bc2f2b5e29eea24f9a.tar.gz
Update Dd. Fix description of some options per PR 18344 and included
patch from Julio Merino. Begin new sentences on new lines.
Diffstat (limited to 'pkgtools/pkg_comp')
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.8163
1 files changed, 98 insertions, 65 deletions
diff --git a/pkgtools/pkg_comp/files/pkg_comp.8 b/pkgtools/pkg_comp/files/pkg_comp.8
index 5dd7956840c..614cd44b59f 100644
--- a/pkgtools/pkg_comp/files/pkg_comp.8
+++ b/pkgtools/pkg_comp/files/pkg_comp.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_comp.8,v 1.2 2002/09/07 13:54:55 wiz Exp $
+.\" $NetBSD: pkg_comp.8,v 1.3 2002/09/25 18:57:30 wiz Exp $
.\"
.\" pkg_comp - Build packages inside a clean chroot environment
.\" Copyright (c) 2002, Julio Merino <jmmv@hispabsd.org>
@@ -26,8 +26,8 @@
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
-.\"/
-.Dd July 26, 2002
+.\"
+.Dd September 25, 2002
.Dt PKG_COMP 8
.Os
.Sh NAME
@@ -41,23 +41,27 @@
.Sh DESCRIPTION
.Nm
is a tool that makes easy the compilation of packages inside a clean
-chroot environment. This allows an easy tracking of exact dependencies
+chroot environment.
+This allows an easy tracking of exact dependencies
and the correct behavior of a package in a fresh system installation.
.Pp
The behavior of
.Nm
is controlled through a small configuration file and a target (keep
-reading to learn more). The configuration file tells
+reading to learn more).
+The configuration file tells
.Nm
how to configure the new chroot environment, and the target specifies
which action to take.
.Ss What to use it for?
You can use
.Nm
-to achieve many goals when building packages. Here are some ideas:
+to achieve many goals when building packages.
+Here are some ideas:
.Bl -bullet -item
.It
-Build packages for other system versions. For example, build packages for
+Build packages for other system versions.
+For example, build packages for
.Nx 1.5
while you are running
.Nx current .
@@ -76,30 +80,33 @@ project, like one for GNOME2 and another one for KDE3.
.El
.Sh CONTROL DIRECTORY
.Nm
-needs to store several information when it is running. Instead of
-using normal system trees, it uses a special directory inside the
-chroot to avoid polluting the system. It stores there scripts, object
-files, built packages, etc. This directory is located by default in
+needs to store several information when it is running.
+Instead of using normal system trees, it uses a special directory inside the
+chroot to avoid polluting the system.
+It stores there scripts, object files, built packages, etc.
+This directory is located by default in
.Pa $DESTDIR/pkg_comp .
.Sh CONFIGURATION
With
.Nm
you can maintain several configuration files so you can work with
-different chroot jails easily. To make this easy, configuration files
-are stored inside
+different chroot jails easily.
+To make this easy, configuration files are stored inside
.Pa $HOME/pkg_comp ,
-followed by the configuration file name and the .conf suffix. The default
-configuration file is
+followed by the configuration file name and the .conf suffix.
+The default configuration file is
.Pa $HOME/pkg_comp/default.conf ,
and is always used if you do not specify another one.
.Pp
Configuration files are simple shell scripts that define
-variables. The default values shown here are those written in the
-template when issuing a maketemplate.
+variables.
+The default values shown here are those written in the template when
+issuing a maketemplate.
.Bl -tag -width indent
.It BUILD_TARGET
-The target to use when building packages. It can contain any target
-supported by the pkgsrc system, but reasonable values are:
+The target to use when building packages.
+It can contain any target supported by the pkgsrc system, but
+reasonable values are:
.Ql install
and
.Ql package .
@@ -115,12 +122,14 @@ are copied to
Defaults to
.Ql no .
.It DESTDIR
-The chroot jail directory. Defaults to
+The chroot jail directory.
+Defaults to
.Pa /var/chroot/pkg_comp/default .
.It DISTRIBDIR
This is the directory which holds
.Nb
-binary sets and X sets. Its structure is the same as official release
+binary sets and X sets.
+Its structure is the same as official release
distributions, that is, tgz files must reside inside
.Pa $DISTRIBDIR/binary/sets .
Defaults to
@@ -130,20 +139,23 @@ A list of packages to automatically install after the
.Sy makeroot
and after installing
.Sy MAKE_PACKAGES .
-Each name must be the full package name, including the tgz suffix. Packages
-are searched inside
+Each name must be the full package name, including the tgz suffix.
+Packages are searched inside
.Pa $REAL_PACKAGES/All .
Defaults to nothing.
.It MAKE_PACKAGES
A list of packages to automatically build after the
.Sy makeroot
-target. A package is in the form section/name, like
-misc/colorls. Defaults to nothing.
+target.
+A package is in the form section/name, like misc/colorls.
+Defaults to nothing.
.It PTHREAD_TYPE
-The threading type to use when building packages. Defaults to
+The threading type to use when building packages.
+Defaults to
.Ql pth .
.It ROOTSHELL
-The shell of the root user. Defaults to
+The shell of the root user.
+Defaults to
.Pa /bin/sh .
.It SETS
A list of binary sets to be extracted inside
@@ -151,33 +163,40 @@ A list of binary sets to be extracted inside
Defaults to
.Ql base.tgz comp.tgz etc.tgz text.tgz .
.It SETS_X11
-A list of binary sets of the X Window system. This has the same behavior
+A list of binary sets of the X Window system.
+This has the same behavior
as
.Sy SETS .
If this variable is empty, no X Window is configured inside the chroot
-jail and no other X variables take effect. Default to
+jail and no other X variables take effect.
+Defaults to
.Ql xbase.tgz xcomp.tgz xcontrib.tgz xfont.tgz xmisc.tgz xserver.tgz .
.It USE_XF86_4
If set to
.Ql yes ,
-sets specified in SETS_X11 contain X Window version 4. Has no effect if
-X is unconfigured. Defaults to
+sets specified in SETS_X11 contain X Window version 4.
+Has no effect if X is unconfigured.
+Defaults to
.Ql yes .
.It USE_XPKGWEDGE
If set to
.Ql yes ,
you want xpkgwedge to be compiled and installed automatically inside the
-chroot. This takes care of setting up
+chroot.
+This takes care of setting up
.Pa /etc/profile
and
.Pa /etc/csh.login
-for xpkgwedge to work. Has no effect if X is unconfigured. Defaults to
+for xpkgwedge to work.
+Has no effect if X is unconfigured.
+Defaults to
.Ql yes .
.El
.Ss Mounted file systems
In order to avoid duplicating huge system trees,
.Nm
-takes advantage of file system layers. By default, it uses
+takes advantage of file system layers.
+By default, it uses
.Xr mount_null 8 ,
which duplicates a file system tree into another directory; although
you may want to use
@@ -191,49 +210,59 @@ You can control which layer to use and which options you want with
special configuration options, as explained below.
.Pp
These file systems are mounted before entering the chroot and unmounted
-after exiting. In order to know if file systems are mounted or not, the
+after exiting.
+In order to know if file systems are mounted or not, the
program uses a temporary file, called
.Pa $DESTDIR/pkg_comp/tmp/mount.stat ,
which controls the number of
.Nm
-processes using the chroot environment. If some of them crashes
-unexpectedly and you notice it does not try to unmount the
-file systems, this status file may get out of sync. Be sure to check if
-NO file systems are mounted when issuing a
+processes using the chroot environment.
+If some of them crashes unexpectedly and you notice it does not try
+to unmount the file systems, this status file may get out of sync.
+Be sure to check if NO file systems are mounted when issuing a
.Sy removeroot .
.Bl -tag -width indent
.It REAL_DISTFILES
-Specifies where distfiles reside in the real system. Defaults to
+Specifies where distfiles reside in the real system.
+Defaults to
.Pa /usr/pkgsrc/distfiles .
.It REAL_DISTFILES_OPTS
-Mount options. Defaults to
-.Sy -t null -o ro .
+Mount options.
+Defaults to
+.Sy -t null -o rw .
.It REAL_PACKAGES
-Specifies where to build binary packages. This variable is specially useful.
+Specifies where to build binary packages.
+This variable is specially useful.
Defaults to
.Pa /usr/pkgsrc/packages .
.It REAL_PACKAGES_OPTS
-Mount options. Defaults to
-.Sy -t null -o ro .
+Mount options.
+Defaults to
+.Sy -t null -o rw .
.It REAL_PKGSRC
-The pkgsrc tree. This can be useful if you want to use several pkgsrc trees
-independently. Defaults to
+The pkgsrc tree.
+This can be useful if you want to use several pkgsrc trees independently.
+Defaults to
.Pa /usr/pkgsrc .
.It REAL_PKGSRC_OPTS
-Mount options. Defaults to
-.Sy -t null -o rw .
+Mount options.
+Defaults to
+.Sy -t null -o ro .
.It REAL_SRC
-The src system tree. Usually useless, but may be needed by some packages,
-like sysutils/aperture. Defaults to
+The src system tree.
+Usually useless, but may be needed by some packages, like sysutils/aperture.
+Defaults to
.Pa /usr/src .
.It REAL_SRC_OPTS
-Mount options. Defaults to
-.Sy -t null -o rw .
+Mount options.
+Defaults to
+.Sy -t null -o ro .
.El
.Sh TARGETS
A target specifies what
.Nm
-should do (as in make). The following list describes all supported targets,
+should do (as in make).
+The following list describes all supported targets,
in the logical order you should call them.
.Bl -tag -width indent
.It maketemplate
@@ -245,33 +274,37 @@ the default configuration, specially paths.
Create the chroot environment, based on the specs of the configuration file.
This step is required before trying any other, except maketemplate .
.It build
-Builds the specified packages inside the chroot. You need to pass their
-names as relative paths inside pkgsrc, like
+Builds the specified packages inside the chroot.
+You need to pass their names as relative paths inside pkgsrc, like
.Pa pkgtools/pkg_comp .
.It install
-Install the specified binary packages into the chroot. You must specify
-the full name of the package and they must be reside inside
+Install the specified binary packages into the chroot.
+You must specify the full name of the package and they must be reside inside
.Sy REAL_PACKAGES .
.It chroot
Enters the chroot environment.
.It removepkgs
-Remove all the packages in the chroot environment. It starts deleting
-packages with
+Remove all the packages in the chroot environment.
+It starts deleting packages with
.Xr pkg_delete 1
-and then cleans the package tree and the database. This will rebuild
+and then cleans the package tree and the database.
+This will rebuild
.Sy MAKE_PACKAGES ,
reinstall
.Sy INSTALL_PACKAGES
and xpkgwedge if they are specified in the configuration file.
.It removeroot
-Remove the entire chroot tree. You should do it with this target because it
+Remove the entire chroot tree.
+You should do it with this target because it
will take care to umount needed mount points.
.It auto
This executes several targets automatically, setting
.Sy BUILD_TARGET
-to package. The order is: makeroot, build and removeroot. This is
-useful to create binary packages of several pkgsrc and their
-dependencies automatically. For this to be useful, you need to set
+to package.
+The order is: makeroot, build and removeroot.
+This is useful to create binary packages of several pkgsrc and their
+dependencies automatically.
+For this to be useful, you need to set
.Sy REAL_PACKAGES
and use
.Sy MAKE_PACKAGES