System Administration Commands pkg.depotd(1M) NAME pkg.depotd - image packaging system depot server SYNOPSIS /usr/lib/pkg.depotd [-d repo_dir] [-p port] [-s threads] [-t socket_timeout] [--cfg-file] [--content-root] [--debug] [--disable-ops=[,...]] [--exit-ready] [--log-access] [--log-errors] [--mirror] [--set-property = ...] [--proxy-base url] [--readonly] [--rebuild] [--ssl-cert-file] [--ssl-dialog] [--ssl-key-file] [--writable-root] [--add-content] DESCRIPTION pkg.depotd is the depot server for the image packaging system. It provides clients access to the data contained within a package repository. pkg(1), the retrieval client, makes requests of the depot server for catalogs and packages. pkgsend(1), the publication client, sends new versions of packages to the depot server. pkg.depotd is typically run as a service on the system. Package and software developers may wish to run private copies for various testing purposes. The pkg.depot server is generally configured via the smf(5) properties associated with its service. The following properties are recognized: pkg/cfg_file (astring) The pathname of the file from which to read and to write configuration information. pkg/content_root (astring) The file system path at which the instance should find its static and other web content. The default value is /usr/share/lib/pkg. pkg/debug (astring) A comma-separated list of debug features to enable. Possible values are: headers Logs the headers of every request to the error log. pkg/inst_root (astring) The file system path at which the instance should find its repository data. The default value is /var/pkg/repo. pkg/log_access (astring) The destination for any access related information logged by the depot process. Possible values are: stderr, stdout, none, or an absolute pathname. The default value is stdout if stdout is a tty; otherwise the default value is none. pkg/log_errors (astring) The destination for any errors or other information logged by the depot process. Possible values are: stderr, stdout, none, or an absolute pathname. The default value is stderr. pkg/mirror (boolean) Sets 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. pkg/port (count) The port number on which the instance should listen for incoming package requests. The default value is 80 if ssl certificate and key information has not been provided; otherwise, the default value is 443. pkg/proxy_base (uri) This changes the base URL for the depot server and is most useful when running behind Apache or some other webserver in a reverse proxy configuration. pkg/readonly (boolean) Sets whether modifying operations, such as those initiated by pkgsend(1M) are disabled. Retrieval operations are still available. This property may not be true when pkg/mirror is true. The default value is false. pkg/socket_timeout (count) The maximum number of seconds the server should wait for a response from a client before closing a connection. The default value is 60. pkg/sort_file_max_size (count) The maximum size of the indexer sort file. Used to limit the amount of RAM the depot uses for indexing, or increase it for speed. pkg/ssl_cert_file (astring) The absolute pathname to a PEM- encoded Certificate file. The default value is none. This property must be used with ssl_key_file. The depot will only respond to SSL requests if provided. pkg/ssl_dialog (astring) Specifies what method should be used to obtain the passphrase needed to de- crypt the ssl_key_file. Possible values are: builtin, exec:/path/to/program or smf:fmri. builtin will prompt for the passphrase; exec will execute the specified external program to obtain the passphrase, which should be printed to stdout. The first argument to the program will be '', and is reserved. The second argument to the program will be the port number of the server. smf:fmri will attempt to retrieve the value of pkg_secure/ssl_key_passphrase from the service instance related to the fmri. The default value is builtin. pkg/ssl_key_file (astring) The absolute pathname to a PEM- encoded Private Key file. This property must be used with ssl_cert_file. The depot will only respond to SSL requests if provided. pkg/threads (count) The number of threads that will be started to serve requests. The default value is 10. pkg/writable_root (astring) The file system path to a directory to which the program has write access. Used with --readonly to allow server to create needed files, such as search indices, without needing write access to the package information. pkg_secure/ssl_key_passphrase (astring) The password to use to decrypt the pkg/ssl_key_file. This value is read-authorization protected. OPTIONS The following options alter the default behavior, if present, and will override the settings from the service instance when managed via an smf(5) restarter: -d repo_dir Overrides pkg/inst_root with the value given by repo_dir. -p port Overrides pkg/port with the value given by port. -s threads Overrides pkg/threads with the value given by threads. -t socket_timeout Overrides pkg/socket_timeout with the value given by socket_timeout. --add-content On startup, look for new packages and add them to the catalog; also updates the search indices synchronously. --cfg-file cfg_file Overrides pkg/cfg_file with the value given by cfg_file. --content-root root_dir Overrides pkg/content_root with the value given by root_dir. --disable-ops Select operations that should be disabled in the depot server. Operations are given as [ /] (e.g. catalog, catalog_1) in a comma-separated list. --debug features Overrides pkg/debug with the value given by features. --exit-ready Prepare for startup, but exit just before serving content. This is useful for making sure search indicies are built, new content cataloged, etc. --log-access dest Overrides pkg/log_access with the value given by dest. --log-errors dest Overrides pkg/log_errors with the value given by dest. --mirror Overrides pkg/mirror and sets it to be true. --proxy-base url Overrides pkg/proxy_base with the value given by url. Ignored if empty value is provided. --readonly Overrides pkg/readonly and sets it to be true. --rebuild Any existing repository catalog will be destroyed and then recreated on startup. Since the publication transaction history in the updatelog will be lost, this option resets the updatelog and associated syndication feeds. The --add-content option should be used if an incremental update is desired. --rebuild may not be combined with the --mirror or --readonly options. --set-property Used to specify initial repository configuration property values or to update existing ones; can be specified multiple times. If used with --readonly this acts as a temporary override. --sort-file-max-size bytes Overrides pkg/sort_file_max_size with the value given by bytes. --ssl-cert-file source Overrides pkg/ssl_cert_file with the value given by source. --ssl-dialog type Overrides pkg/ssl_dialog with the value given by type. --ssl-key-file source Overrides pkg/ssl_key_file with the value given by source. --writable-root path Overrides pkg/writable_root with the value given by path. EXAMPLES Example 1: Enabling the depot server. # svcadm enable application/pkg/server Example 2: Changing the listening port of the server. # svccfg -s application/pkg/server setprop pkg/port = 10000 # svcadm refresh application/pkg/server # svcadm restart application/pkg/server ENVIRONMENT VARIABLES PKG_DEPOT_CONTENT Specifies the directory containing static content served by the depot. The files listed below under FILES should be present in this directory, although their content may differ from the supplied default content. REPOSITORY CONFIGURATION PROPERTIES A package repository has the following configuration properties. They are categorized by section depending on their usage by the repository and can be set using the --set-property option. Section Property Description ========== ========== =============== feed description A descriptive paragraph for the feed. icon A filename of a small image that is used to visually represent the feed. logo A filename of a large image that is used to visually brand or identify the feed. name A short, descriptive name for RSS/Atom feeds generated by the depot serving the repository. window A numeric value representing the number of hours, before the feed for the repository was last generated, to include when generating the feed for the repository. publisher alias An alternative name for the default publisher of the packages in the repository. prefix The name of the default publisher for packages; required. repository collection_type A string value indicating the type of packages in the repository. See the pydoc for pkg.client.publisher.Repository for details. description A string value containing a descriptive paragraph for the repository. detailed_url A comma-separated list of URIs where more information about the repository can be found. legal_uris A comma-separated list of URIs where licensing, legal, and terms of service information for the repository can be found. maintainer A human readable string describing the entity maintaining the repository. For an individual, this string is expected to be their name or name and email. maintainer_url A URI associated with the entity maintaining the repository. mirrors A comma-separated list of URIs where package content can be retrieved. name A short, descriptive name for the repository. origins A comma-separated list of URIs where package metadata can be retrieved. refresh_seconds An integer value indicating the number of seconds clients should wait before refreshing cached repository catalog or repository metadata information. registration_uri A URI indicating a location clients can use to register or obtain credentials needed to access the repository. related_uris A comma-separated list of URIs of related repositories that a client may be interested in. EXIT STATUS The following exit values are returned: 0 Successful operation. 1 Error encountered. 2 Invalid command line options were specified. FILES /var/pkg/repo Default repository location; modify pkg/inst_root to select an alternate location. /usr/share/lib/pkg Default presentation content location; modify pkg/content_root to select an alternate location. ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWipkg | | | pkg:/package/pkg | |_____________________________|_____________________________| | Interface Stability | None / Under Development | |_____________________________|_____________________________| SEE ALSO pkg(1), pkgsend(1), syslogd(1M), attributes(5), smf(5) NOTES The image packaging system is an under-development feature. Command names, invocation, formats, and operations are all subject to change. Development is hosted in the OpenSolaris community at: http://hub.opensolaris.org/bin/view/Project+pkg/ The pkd.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 an smf(5) restarter, it does not daemonize. Error messages are generally sent to standard output, or to the syslogd(1M) system. Changes to configuration require a restart of the depot server process so that they can be reflected in operations and output. This must be done when the server is not operating in read-only or mirror mode.