Deploy a Debian Package Using curl

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

You can deploy a Debian package using curl, leveraging the Matrix Parameters to specify the distribution, component, and architecture parameters as relevant.

Deploy Debian Binary Packages

To deploy a Debian binary package with curl:

  • Run the following command:

    curl -u <USERNAME>:<TOKEN> -XPUT "http://<HOST>/artifactory/<REPO_NAME>/pool/<PACKAGE_NAME>;deb.distribution=<DISTRIBUTION>;deb.component=<COMPONENT>;deb.architecture=<ARCHITECTURE>" -T <PATH_TO_FILE>

    Where:

    • <USERNAME>: Your Artifactory username.

    • <TOKEN>: Your Artifactory identity token.

    • <HOST>: The hostname of your JFrog Platform.

    • <REPO_NAME>: The name of the target repository.

    • <PACKAGE_NAME>: The name of the package you want to deploy.

    • <DISTRIBUTION>: The target Debian distribution.

    • <COMPONENT>: The component of the distribution.

    • <ARCHITECTURE>: The package architecture.

      To add an architecture-independent layout, use deb.architecture=all.

    For example:

    curl -u jeffry:Random_TokenEFh83Wf00ESbkhge388 "http://company.jfrog.io/artifactory/debian-local/pool/libatk1.0_i386.deb;deb.distribution=wheezy;deb.component=main;deb.architecture=i386"

Tip

You can specify multiple layouts by adding duplicate parameters separated by semicolons. For example, deb.architecture=<ARCHITECTURE1>;deb.architecture=<ARCHITECTURE2>.

Deploy Debian Source Packages

Note

Deploying Debian source packages is supported for local repositories only. Debian source packages are not supported with Trivial repository layout.

To deploy Debian source packages, you must upload all three files that make up the total source package:

  • .dsc: Tells build tools which files to look for and updates Debian local metadata when deployed

  • debian.tar: Turns base code into a Debian package

  • orig.tar: Provides base code

To deploy a Debian source package:

  1. Run the following command to upload the .dsc file:

    curl -u <USERNAME>:<TOKEN> -XPUT "http://<HOST>/artifactory/<REPO_NAME>/pool/<PACKAGE_NAME>;dsc.distribution=<DISTRIBUTION>;dsc.component=<COMPONENT>" -T <PATH_TO_FILE>

    Where:

    • <USERNAME>: Your Artifactory username

    • <TOKEN>: Your Artifactory identity token

    • <HOST>: The hostname of your JFrog Platform

    • <REPO_NAME>: The name of the target repository

    • <PACKAGE_NAME>: The name of the package you want to deploy

    • <DISTRIBUTION>: The target Debian distribution

    • <COMPONENT>: The component of the distribution

    For example:

    curl -u jeffry:Random_Token87cmVwb3NpdG9yeS1rZXkK -XPUT "http://company.jfrog.io/artifactory/debian-local/pool/myapp-1.0.deb;dsc.distribution=bullseye;dsc.component=main" -T ./myapp-1.0.deb
  2. Run the following command to upload the orig.tar file:

    curl -u <USERNAME>:<TOKEN> -XPUT "http://<HOST>/artifactory/<REPO_NAME>/pool/<PACKAGE_NAME>" -T <PATH_TO_ORIG_TAR_FILE>

    Where:

    • <USERNAME>: Your Artifactory username

    • <TOKEN>: Your Artifactory identity token

    • <HOST>: The hostname of your JFrog Platform

    • <REPO_NAME>: The name of the target repository

    • <PACKAGE_NAME>: The name of the package you want to deploy

    • <PATH_TO_ORIG_TAR>: The path to the orig.tar file on your local machine

    For example:

    curl -u jeffry:Random_Token87cmVwb3NpdG9yeS1rZXkK -XPUT "http://company.jfrog.io/artifactory/debian-local/pool/myapp_1.0.orig.tar.gz" -T ./myapp_1.0.orig.tar.gz
  3. Run the following command to upload the debian.tar file:

    curl -u <USERNAME>:<TOKEN> -XPUT "http://<HOST>/artifactory/<REPO_NAME>/pool/<PACKAGE_NAME>" -T <PATH_TO_DEBIAN_TAR_FILE>

    Where:

    • <USERNAME>: Your Artifactory username

    • <TOKEN>: Your Artifactory identity token

    • <HOST>: The hostname of your JFrog Platform

    • <REPO_NAME>: The name of the target repository

    • <PACKAGE_NAME>: The name of the package you want to deploy

    • <PATH_TO_DEBIAN_TAR_FILE>: The path to the debian.tar file on your local machine

    For example:

    curl -u jeffry:Random_Token87cmVwb3NpdG9yeS1rZXkK -XPUT "http://company.jfrog.io/artifactory/debian-local/pool/myapp_1.0-1.debian.tar.xz" -T ./myapp_1.0-1.debian.tar.xz