RPM

RPM is a repository for storing and managing RPM packages. In RHEL and Centos systems, Yum is a repository of RPM packages. JFrogArtifactory is a full-fledged RPM and YUM repository manager. JFrog’s official Wiki page provides detailed information about the Artifactory RPM repository.

Artifactory The process of indexing RPM packages

Artifactory 5.5.0 and later offers significant improvements to YUM metadata processing, including concurrent and incremental computing capabilities. The new indexing process:

  • The performance is better than the asynchronous calculation triggered automatically before
  • There is also no need to develop a separate plug-in that triggers the calculation of metadata
  • You can monitor and know exactly the status of new metadata computations

Select “Auto Calculate RPM Metadata” when creating the RPM repository and Artifactory will intercept it
Copy or Move operations, and automatically trigger calculation steps. Ensure that users are provided with the latest metadata to obtain the software package version in a timely manner

 

Metadata in two ways

  • Asynchronous:

Normally, if the above option is enabled, when you use the REAT API or UI deployment package, asynchronous computation will intercept file operations and add index operations to the queue inside the Artifactory for computation.

  • Synchronous:

Only close
In this case, you can manually trigger metadata calculation.

Ex. :

A CI task that can upload many versions to a large repository can add an additional build step to the pipeline. The following is a repository named “rpM-release-local” that manually triggers metadata calculations via Rest API requests

curl -uadmin:password -XPOST “localhost:8081/artifactory/api/yum/rpm-release-local? async=0” -i -Lvv

* Connected to localhost (::1) port 8081 (#0)

* Server auth using Basic with user ‘admin’

> POST /artifactory/api/yum/rpm-release-local? Async HTTP / 1.1 = 0

> Host: localhost:8081

> Authorization: Basic YWRtaW46cGFzc3dvcmQ=

> the user-agent: curl / 7.54.0

> Accept: */*

< HTTP / 1.1 200 OK

“Server: Artifactory / 6.3.2

< X-Artifactory-Id: a9116dfeb1f6dac4:449dde33:1658a295e45:-8000

< Content-Type: text/plain

< Transfer-Encoding: chunked

< Date: Sun, 02 Sep 2018 12:19:56 GMT

Artifactory RPM System Properties integral options (5.5.0 and later)

Artifactory. RPM. Metadata. Calculation. Workers (the default value is 8)

– The local RPM metadata counts the number of threads.

Artifactory. RPM. Metadata. History. Cycles. Keep (the default value of 3)

– Retain metadata records, including those that have been calculated

Yum. Virtual. Metadata. Calculation. Workers (the default 5)

– The number of threads calculated by the virtual library

The log

  • The RPM logging org. Artifactory. Addon. Yum. YumAddonImpl:
INFO level: Starting to Calculate Rpm metadata for

You can enable debug/trace level logging (modify $ARTIFACTORY_HOME /etc/logback.xml) on the following packages in Artifactory to track/debug your calculations:

Automatic calculation (asynchronous) :

DEBUG level: Asynchronous RPMS of {path}

Calculation trigger (synchronization) :

DEBUG level: {path} synchronization Rpm calculation

  • Virtual RPM repository calculation:

For org. Artifactory. Addon. Yum. Virtual. The index to enable each log level:

DBUG level: Starts virtual YUM metadata calculations for {path}

Trace level for the entire package logic process:

For org. Jfrog. Metadata. The indexer. RpmRepoIndexer enable each log level:

TRACE level: Prepares indexed RPM repository metadata

DEBUG level: The metadata of the RPM repository is indexed