Personal tools
     DOCUMENTATION

Conary:conary config

From rPath Wiki

Jump to: navigation, search
Conary --> Conary Commands --> conary config
conary config
conary config [--show-passwords]
Example> conary config --show-passwords


Conary's behavior is controlled by a set of options present in one or more configuration files:

  • Any file specified using the --config-file option during a single execution of the conary command
  • ./conaryrc (a conaryrc file in the current directory)
  • $HOME/.conaryrc (a .conaryrc file in the user's home directory)
  • /etc/conaryrc (the system-wide conaryrc file)

The configuration within each smaller scope override the same directives that cover the larger scrope. For example, if ./conaryrc includes one value for buildLabel, and /etc/conaryrc includes another value for buildLabel, Conary will use the directive value from ./conaryrc.

Because of this hierarchy, it is possible to configure Conary on a system-wide basis using /etc/conaryrc while still allowing individual users to make user-specific changes in $HOME/.conaryrc and project-specific changes using ./conaryrc.

Use conary config with no arguments to display Conary's configuration settings:

$ conary config
archDirs                  /etc/conary/arch:/etc/conary/distro/arch:~/.conary/arch
autoResolve               False
autoResolvePackages       True
buildFlavor               ~X, ~!alternatives, !bootstrap, ~builddocs,
                          ...
buildLabel                example.rpath.org@rpl:devel
buildPath                 /home/testuser/conary/build
...
showComponents            False
showLabels                False
signatureKeyMap           []
siteConfigPath            /etc/conary/site:/etc/conary/distro/site:~/.conary/site
sourceSearchDir           .
threaded                  True
tmpDir                    /var/tmp
trustThreshold            0
updateThreshold           10
uploadRateLimit           0
useDirs                   /etc/conary/use:/etc/conary/distro/use:~/.conary/use
user                      *.rpath.org testuser <password>
user                      *.rpath.com testuser

In the example, some information has been truncated. If the list is lengthy, you may choose to pipe the command through less (conary config | less). Compare the output to the conaryrc configuration directives to learn what each directive is used to configure.

The conary config output can be helpful when identifying problems with your Conary configuration. The conary config output is one of the first things Conary developers ask for when discussing Conary-related issues.

Secure Passwords

When conary config output includes a username and password for repository authentication (the user directive), the password is masked by the string <password>, providing safe sharing of your configuration information. When you want to include the actual authentication information, use --show-passwords with the command to bypass this masking:

$ conary config --show-passwords
...
user                      *.rpath.org testuser p@ssw0rd
...

Specify a Directive

View a specific directive in the configuration by piping the command with grep for the string representing that directive:

$ conary config | grep entitlementDirectory
entitlementDirectory      /etc/conary/entitlements

$ conary config | grep installLabelPath
installLabelPath          example.rpath.org@rpl:devel conary.rpath.com@rpl:1 contrib.rpath.org@rpl:1

When you attempt to install a trove without specifying a full version string, or when you use conary repquery without the --install-label option, Conary configuration is necessary to indicate where to locate the requested software. The labels listed for installLabelPath reflect all the repositories and branches to be searched as well as the order in which they will be searched. By adding a label to this list, a user can install troves from the branch and repository specified without specifying the trove's location. Check the installLabelPath values when troubleshooting conary queries and updates.

Conary Command Options (--config, --config-file)

In addition to this command, the --config and --config-file options used with other Conary commands can force an override to the configuration in the current scope.

--config
Use this to override one line in the configuration file
--config-file
Use this to specify a different configuration file

These options could use more usage information and examples. Contributions are welcome.