OpenSolaris 2009.06 Image Packaging System Guide
Previous Next

Overview of the pkg.depotd Depot Server

The pkg(1) command makes requests of the repository, also called the depot server, for catalogs and packages. The pkgsend(1) command sends new versions of packages to the depot server. The depot server is typically run as a service on the system. Package and software developers can run private copies for various testing purposes. The pkg.depotd service is managed by the service management facility, smf(5), under the service identifier: svc:/application/pkg/server. Because the depot server expects to be run by a smf(5) restarter, it does not run as a daemon process. Error messages are generally sent to standard display, or to the syslogd(1) system.

The pkg.depotd(1M) command is also used with the SMF commands to set up a mirror repository. For an example of the pkg.depotd(1M) options and its usage with the SMF commands, see How to Set Up a Mirror.

The pkg.depotd server is usually configured through the smf(1) properties associated with its service instance. The following properties are recognized.

Table 5-7 pkg.depotd(1M) Properties

Property

Description

pkg/inst_root

The file system path where this instance of the depot server should look for its repository data. The default value is /var/pkg/repo.

pkg/port

The port number on which this instance of the depot server should listen for incoming package requests.

pkg/proxy_base

This property is used to change the base URL for the depot server. This is useful when the depot server is running behind a web server in a reverse proxy configuration.

pkg/socket_timeout

The maximum number of seconds the server should wait for a response from a client before closing a connection.

pkg/threads

The number of threads that the depot server will initiate to serve requests from the client. The default value is 10.

pkg/log_access

The destination for any access—related information logged by the depot server. The destination could be one of the following:

  • stdout

  • stderr

  • No destination. This is the default value.

  • An absolute path name.

pkg/log_errors

The destination for any errors or other related information logged by the depot server. The destination could be one of the following :

  • stdout

  • stderr. This is the default value.

  • No destination

  • An absolute path name.

pkg/mirror (boolean)

This property indicates whether package mirror mode is used. When true, publishing and metadata operations are disabled and only a limited browser user interface is provided. This property may not be true when pkg/readonly is true . The default value is false.

The pkg.depotd(1M) command has the following options to alter the default settings from the service instance.

Table 5-8 pkg.depotd(1M) Options

Option

Description

-d repo_dir

Specifies a different repository directory. Overrides pkg/inst_root with the value given by repo_dir.

-p port

Specifies a different port number. Overrides pkg/port with the value given by port.

-sthreads

Overrides pkg/threadswith the value given by threads.

-t socket_timeout

Overrides pkg/socket_timeoutwith the value given by socket_timeout.

--cfg-file cfg_file

Overrides pkg/cfg_filewith the value given by cfg_file.

--content-root root_dir

Overrides pkg/content_rootwith the value given by root_dir.

--debug features

Overrides pkg/debugwith the value given by features.

--log-access dest

Overrides pkg/log_access with the value given by dest.

--log-errors destination

Overrides pkg/log_errors with the value given by destination.

--proxy-base url

Overrides pkg/proxy_base with the value given by url.

--mirror

Overrides pkg/mirror and sets the value to True.

--readonly

Disables modifying operations, such as those initiated by pkgsend(1M). Retrieval operations are still available.

--rebuild

Destroys any existing repository catalog and then recreates on startup.

--writable-root

Overrides pkg/writable_root with the value given by path.

--ssl-key-file

Overrides pkg/ssl_key_file with the value given by source.

--ssl-dialog

Overrides pkg/ssl_dialog with the value given by type.

--ssl-cert-file

Overrides pkg/ssl_cert_file with the value given by source.

For further information, see the pkg.depotd(1M) man page.

Example 5-1 Enabling the Depot Server

Type the following command as root user to enable the depot server. In this example, application/pkg/server is the depot server.

# svcadm enable application/pkg/server
Example 5-2 Changing the Listening Port of The Depot Server

Type the following sequence of commands as root user to change the listening port of the depot server. This example sets the listening port of the depot server to 9999.

# svccfg -s application/pkg/server set pkg/port = 9999
# svcadm refresh application/pkg/server
# svcadm restart application/pkg/server
Previous Next