Page tree
Skip to end of metadata
Go to start of metadata

Overview

From version 3.3, on top of Artifactory's existing support for advanced artifact management, Artifactory supports Debian repositories whether they use the current Automatic Debian architecture or the deprecated Trivial architecture. As a fully-fledged Debian repository, Artifactory generates index files that are fully compliant with Debian clients.

Artifactory support for Debian provides:

  1. The ability to provision Debian packages from Artifactory to a Debian client from local and remote repositories.
  2. Calculation of Metadata for Debian packages hosted in Artiafctory's local repositories.
  3. Access to remote Debian resources (such as us.archive.ubuntu.com) through Remote Repositories which provide the usual proxy and caching functionality.
  4. Providing GPG signatures that can be used by Debian clients to verify packages.
  5. Complete management of GPG signatures using the Artifactory UI and the REST API.

Page Contents


Configuration

You can only deploy Debian packages to a local repository that has been specified to support Debian.

You can download packages from a local or a remote Debian repository.

Local Repositories

To specify Debian support for a local repository, create a new local repository, or select one to edit.

Under the Packages tab, scroll down and check Enable Debian Support.

If you are using Debian with a Trivial layout, set the Trivial Layout checkbox.

Deploying a package using the UI

To deploy a Debian package to Artifactory, go to the Deploy tab and select the package you want to upload.

After you select the "Upload" button, Artifactory will display the Artifact Deployer.

Select your Debian repository as the Target Repository (If necessary, unset the Deploy as Maven Artifact checkbox).

Set the Target Path and select the "Deploy Artifact" button. Note that the Target Path specifies both the target location of the Debian file being uploaded, as well as where the corresponding index files should be created.

Deploying a Debian artifact

For example, to upload package libatk1.0_i386.deb, and specify that its layout is from the wheezy distribution, in the main component and the i386 architecture, you would enter:

Specifying the Target Path
pool/libatk1.0_i386.deb;deb.distribution=wheezy;deb.component=main;deb.architecture=i386

Be careful with spaces

Make sure you don't enter any superfluous spaces in the Target Path specification.

After you deploy the artifact, you need to wait about one minute for Artifactory to recalculate the repository index and display your upload in the Repository Browser.

Once you have deployed your Debian package, and Artifactory has recalculated the repository index, your repository should be organized as displayed below:

Debian Repository

Deploying a package using Matrix Parameters

You can also deploy Debian packages to Artifactory with an explicit URL using Matrix Parameters.

The URL is built similarly to the Target Path format as follows:

 

Deploying a package using Matrix Parameters
PUT "http://$ARTIFACTORY_HOME/{debianRepoKey}/pool/{debianPackageName};deb.distribution={distribution};deb.component={component};deb.architecture={architecture}" 

For example, to upload package libatk1.0_i386.deb, and specify that its layout is from the wheezy distribution, in the main component and the i386 architecture, you would enter:

Example
PUT "http://localhost:8080/artifactory/debian-local/pool/libatk1.0_i386.deb;deb.distribution=wheezy;deb.component=main;deb.architecture=i386"

Setting the Target Path

The Target Path needs to be entered in a strict and specific format that uses system properties to define where the artifact will be stored and its specific layout as follows:

Target Path Format
[path];deb.distribution=[distribution];deb.component=[component];deb.architecture=[architecture]

path

The repository path where the package should be stored.

Artifactory supports storing Debian packages anywhere within the repository. The examples on this page show Debian packages stored under the pool folder in accordance with the Debian convention.

distribution

The value to assign to the deb.distribution property used to specify the Debian package distribution

component

The value to assign to the deb.component property used to specify the Debian package component name

architecture

The value to assign to the deb.architecture property used to specify the Debian package architecture

Adding Architecture Independent Packages

Uploading a Debian package with deb.architecture=all will cause it to appear in the Packages index of all the other architectures under the same Distribution and Component, as well as under a new index branch called binary-all which holds all Debian packages that are marked as "all'.
Removing an "all' Debian package will also remove it from all other indexes under the same Distribution and Component.
When the last Debian package in an architecture is removed but the Packages index still contains an "all" Debian package, it is preserved in the index. 
If you want such an architecture index removed you may do so via the UI or using Calculate Debian Repository Metadata in the REST API, which cleans up orphaned package files from the index.

Specifying multiple layouts

Whether uploading a package using the UI or Matrix Parameters, you can specify multiple layouts for any Debian package you upload, by including additional values for the distribution, component or architecture separated by a comma, 

For example, to upload package libatk1.0_i386.deb to both wheezy and trusty distributions, in both main and contrib components and both i386 and 64bit-arm architectures you would specify the following Target Path to upload using the UI:

Target path for multiple layouts
pool/libatk1.0_i386.deb;deb.distribution=wheezy;deb.distribution=trusty;deb.component=main;deb.component=contrib;deb.architecture=i386;deb.architecture=64bit-arm

Correspondingly, to upload the file using Matrix Parameters, you would use the following:

Multiple layouts using Matrix Parameters
PUT "http://localhost:8080/artifactory/debian-local/pool/libatk1.0_i386.deb;deb.distribution=wheezy;deb.distribution=trusty;deb.component=main;deb.component=contrib;deb.architecture=i386;deb.architecture=64bit-arm"

Remote Repositories

You can download Debian packages from Local Debian Repositories as described above, or from Remote Repositories specified as supporting Debian packages.

To specify that a Remote Repository supports Debian packages, in the Admin tab under Repositories | Configuration, select the repository to edit.

In the repository Packages tab set the Enable Debian Support checkbox.

Enable Debian Support in a Remote Repository

Note that the index files for remote Debian repositories are stored and renewed according to the Retrieval Cache Period setting.


Signing Debian Packages

Artifactory manages public and private keys that are used to sign and verify Debian packages.

However, you first need to generate the keys and upload them to Artifactory.

Generating Keys

They way to generate keys is platform dependent. 

The example below shows how to generate the public and private keys on Linux:

Generating PGP keys
# generate the keys
gpg --gen-key
 
# list all keys in your system and select the pair you want to use in Artifactory
gpg --list-keys

# resolve the key-id from the lists-keys by selecting the relevant license
pub   2048R/8D463A47 2015-01-19      
uid                  JonSmith (Jon) <jon.smith@jfrog.com>
key-id =  8D463A47

#export the private key with the specified id to a file
gpg --output {private key file name and path} --armor --export-secret-keys {key-id}
 
#export the public key with the specified id to a file
gpg --output {public key file name and path} --armor --export {key-id}

You also need to specify a pass phrase that must be used together with the Debian Signing Keys. The pass phrase can be saved, or passed in with a REST API call.

Uploading Keys

To upload your Debian signing keys, in the Admin tab, go to Security | Signing Keys.


Once you have specified the key file, select the "Upload" button for the corresponding field.

Artifactory will indicate when keys are installed, and you can click on the Public key is installed link to download the public key.

Uploading the pass phrase through the UI is optional. If you chose to do so, you may use the "Verify" button to verify that the uploaded keys and pass phrase match.

If you prefer not to upload your pass phrase using the UI, you can set it  using the REST API.

Downloading the Public Key

As described above, you can download the public key using the Public key is installed link under Signing Keys Management.

In addition, the Repository Browser conveniently displays an example showing how you can configure APT to use the public key.


Authenticated Access to Servers

If you need to access a secured Artifactory server that requires a username and password, you can specify these in your Debian source.list file by prefixing the artifactory host name with the required credentials as follows:

Accessing Artifactory with credentials
http://user:password@$ARTIFACTORY_HOME/{repoKey} {distribution} {components}
For example:
http://admin:password@localhost:8081/artifactory/debian-local wheezy main restricted

Encrypting your password

You can use your encrypted password as described in Using Your Secure Password.


REST API Support

The Artifactory REST API provides extensive support for Debian signing keys and recalculating the repository index as follows:


Watch the Screencast

 

 

 

 

 

  • No labels