Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

pkgtool (1)

Name

pkgtool - Helper Script for pkgbuild(1)

Synopsis

pkgtool [OPTIONS] command spec...

Description

PKGTOOL(1)                  General Commands Manual                 PKGTOOL(1)



NAME
       pkgtool - Helper Script for pkgbuild(1)


SYNOPSIS
       pkgtool [OPTIONS] command spec...


DESCRIPTION
       pkgtool  is a helper script for performing builds from pkgbuild(1) spec
       files (build recipes).


OPTIONS
   General
       -v or --verbose
              Increase verbosity: the more -v's the more diag messages.

       -q or --quiet
              Silent operation.

       --halt-on-errors
              Halt on the first build error, do not attempt to continue.

       --rcfile=file
              Read default configuration from  file.   Default:  ./.pkgtoolrc,
              ~/.pkgtoolrc

       --norc Ignore the default rc files.

       --dumprc
              Print  the  current configuration in a format suitable for an rc
              file, then exit.

       --download
              Automatically download sources if not found in the local  search
              paths  (requires  wget)   Specify  your  proxy servers using the
              http_proxy and ftp_proxy environment variables.

       --download-to=dir
              Save downloaded files in dir.  By default, files are  downloaded
              to /storage/pkgs/SOURCES.  Implies --download.

       --interactive     [EXPERIMENTAL]
              Interactive  mode:  pkgbuild(1) output is displayed on the stan-
              dard output; pkgbuild(1) is executed in interactive  mode  which
              makes it start a subshell if the build fails

       --ips  Install   IPS   packages   by   default   to   local  repository
              http://localhost:80/

       --svr4 Install SVr4 packages by default.

       --rmlog
              Automatically remove the log file with each build

       --dry-run
              (Download mode) test if the Source  urls  in  the  spec  file(s)
              point to existing files, but do not download them.


   Directories and search paths:
       --specdirs=path or --spec=path
              Specify a colon separated list of directories to search for spec
              files in

       --tarballdirs=path or --tarballs=path or --tar=path
              Specify a colon separated list of directories to search for tar-
              balls in

       --sourcedirs=path or --src=path
              Specify  a  colon  separated  list  of directories to search for
              additional source files in --patchdirs=path or --patches=path or
              --patch=path  Specify  a  colon separated list of directories to
              search for patches (source diffs) in --topdir=dir Use dir as the
              rpm base directory (aka %topdir, where the SPECS, SOURCES, RPMS,
              SRPMS, BUILD directories are found).  Default: ~/packages

       --logdir=dir or --log=dir
              Write build logs to dir.


   Options controlling the build:
       --update
              Update packages that are already installed.  The default  bevav-
              ior is to skip them.

       --update-if-newer
              Update  packages  that are already installed only if the version
              in the spec file (Version tag) is newer than the version of  the
              package.   The  default  bevavior  is  to skip packages that are
              already installed.

       --nodeps / --deps
              Ignore/verify  dependencies   before   building   a   component.
              Default: --deps

       --autodeps
              Attempt to find spec files for missing dependencies in spec file
              search path (see --specdirs)  and  add  them  to  the  build  as
              needed.

       --with foo or --with-foo / --without foo or --without-foo
              These options are passed on to pkgbuild(1) as is.  They are used
              for enabling/disabling conditional build options.

       --target=arch
              This option is passed on to pkgbuild(1) as is.

       --pkgformat=format
              Create packages in the specified format, where format is one of:

       ips    Image Packaging System package format (default on IPS-based sys-
              tems)

       filesystem or fs
              SVr4 filesystem package format (default on SVr4-based systems)

       datastream or ds
              SVr4 datastream package format


   Reporting:
       --notify / --nonotify
              Send  desktop notifications when the build of a spec file passes
              or fails.  Default: --notify

       --mail-errors-to=address
              Send the last few lines of the build log to address if the build
              fails

       --report=file
              Write  a build report to file (in HTML format) --prodname=string
              The name of the product as appears in the build report

       --full-path
              Print the full path to the package when running install-order


   Commands:
       build-install
              Build and install the specs listed  on  the  command  line.  The
              build  order  is  determined  by the dependencies defined in the
              spec files.

       build  Same as build-install

       build-only
              Build the specs listed on the command line, don't install them.

       prep   run the %prep section of the spec files listed  on  the  command
              line

       spkg   create source package(s) only (no build done)

       publish-pkgs
              publish the previously build packages to an IPS repository

       build-order
              Print the build order of the specs listed on the command line.

       install-order
              Print the rpms in the order they should be installed

       install-pkgs
              install  the  packages  defined  by the spec files listed on the
              command line from the PKGS directory.  No build is done.  Useful
              to  install  packages previously built using the build-only com-
              mand, or built manually using pkgbuild.

       uninstall-pkgs
              Uninstall all packages defined in the spec files listed  on  the
              command line.

       download
              Download  the  source  files from the URLs specified in the spec
              files listed on the command line.  Source  files  found  in  the
              local  search paths will not be downloaded.  (See --tarballdirs,
              --sourcedirs, --download-to)  Use the --dry-run option  to  test
              if  the  URLs  point  to  existing files but without downloading
              them.


   Spec Files
       specs...
              List of spec files to build. Either full path names or names  of
              spec files in the spec directory search path.

              Spec  files  are build recipes, similar to rpmbuild's spec files
              on Linux systems.  You can find detailed information about  spec
              files in /usr/share/doc/pkgbuild/spec-files.txt


   ENVIRONMENT VARIABLES
       PKGBUILD_IPS_SERVER
              Set  this variable to specify the URL for the IPS server to pub-
              lish binary packages to.  Example:
              PKGBUILD_IPS_SERVER=http://myserver:9000/;      export      PKG-
              BUILD_IPS_SERVER

       PKGBUILD_SRC_IPS_SERVER
              URL  for the IPS server to publish source packages to.  Defaults
              to PKGBUILD_IPS_SERVER.


CONFIGURATION
       All command line options can be configured in the .pkgtoolrc configura-
       tion  file.   pkgtool  looks  for  .pkgtoolrc  in the current directory
       first, then in the user's home directory.  A well documented configura-
       tion file template can be generated using the --dumprc option:

       pkgtool --dumprc > ~/.pkgtoolrc

       Lines  starting with # are comments.  Configuration settings are colon-
       separated key-value pairs, for example:

       tarballdirs: /export/tarballs:/net/otherhost/export/tarballs

       Use the --dumprc option to obtain a list of configuration  options  and
       their documentation.

       Values  can  use  the  ${MYDIR} variable to reference the directory the
       .pkgtoolrc file is located in.


EXAMPLES
       Example 1: given a directory full of spec files,  download  all  source
       URLs defined in the spec files:

       pkgtool download *.spec

       Example 2: build and install all spec files in the current directory:

       pkgtool -v build *.spec

       Example  3:  download  a  sources and build foo.spec with debug options
       (note: assumes that foo.spec  supports  --with-debug).   The  resulting
       package(s) will not be installed.

       pkgtool build-only --download --with-debug foo.spec


EXIT STATUS
       The following exit values are returned:


       0      SUCCESS (command passed for all spec files)

       >0     FAILURE (the number of spec files that failed)


FILES
       /usr/bin/pkgtool
              executable for pkgtool

       configuration  file  for  pkgtool,  see  the  CONFIGURATION section for
       details
              %macro_name value


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +--------------------+------------------+
       |  ATTRIBUTE TYPE    | ATTRIBUTE VALUE  |
       +--------------------+------------------+
       |Availability        | package/pkgbuild |
       +--------------------+------------------+
       |Interface Stability | Volatile         |
       +--------------------+------------------+


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | package/pkgbuild |
       +---------------+------------------+
       |Stability      | Uncommitted      |
       +---------------+------------------+

SEE ALSO
       Spec file description in /usr/share/doc/pkgbuild/spec-files.txt

       attributes(7), pkgbuild(1), spectool(1), pkg(7), pkgmk(1)


NOTES
       Written by Laszlo (Laca) Peter, Oracle Corporation, 2010



       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source  was  downloaded  from   http://prdownloads.sourceforge.net/pkg-
       build/pkgbuild-1.3.105.tar.bz2.

       Further information about this software can be found on the open source
       community website at http://pkgbuild.sourceforge.net/.



                                 May 18, 2010                       PKGTOOL(1)