-
Notifications
You must be signed in to change notification settings - Fork 64
rpm
Alena edited this page Mar 31, 2023
·
5 revisions
Rpm repository is a linux binary packages repository, which yum
and dnf
can understand. Try the following
configuration to add rpm repository:
repo:
type: rpm
storage:
type: fs
path: /var/artipie/centos
settings:
digest: sha256 # packages digest algorithm
naming-policy: sha1 # naming policy for metadata files
filelists: true # is filelist metadata file required
# repository update mode:
update:
# update metadata on package upload
on: upload
# or schedule the update
on:
cron: 0 2 * * *
Section setting
allows to configure repository-specific parameters and is not required:
-
digest
- digest algorithm for rpm packages checksum calculation, sha256 (default) and sha1 are supported -
naming-policy
- naming policy for metadata files: plain, sha1 or sha256 (default) prefixed -
filelists
- Calculate metadatafilelists.xml
, true by default -
update
section allows to set update mode: either update the repository when the package is uploaded via HTTP or schedule the update via cron
In order to use Artipie rpm
repository with yum
follow the steps:
- Install
yum-utils
if needed:yum install yum-utils
- Add Artipie repository:
yum-config-manager --add-repo=http://{host}:{port}/{repository-name}
where{host}
and{port}
are Artipie service host and port,{repository-name}
is the name ofrpm
repository - Refresh the local repository:
yum upgrade all
- Install the packages:
yum install package-name
No yum
nether dnf
support packages upload, but you can upload rpm
file into Artipie rpm
repository with HTTP PUT
request:
curl -X PUT --data-binary "@my-pkg.rpm" http://{host}:{port}/{repository-name}/my-pkg.rpm?override=true&skip_update=true
The request supports the following parameters:
-
override
allows to override existingrpm
file in the repository, not required, false by default -
skip_update
can be used to skip repository metadata update, not required, false by default. In update modecron
this parameter is ignored (as repository metadata are updated by schedule).