All Projects → artipie → rpm-adapter

artipie / rpm-adapter

Licence: MIT license
Turns your data storage into an RPM repository

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to rpm-adapter

copr-build-bazel
copr build of bazel | https://copr.fedorainfracloud.org/coprs/vbatts/bazel/
Stars: ✭ 14 (-33.33%)
Mutual labels:  rpm, rpm-packages
vrms-rpm
Reports non-free software installed on an RPM-based GNU/Linux system.
Stars: ✭ 13 (-38.1%)
Mutual labels:  rpm, rpm-packages
ganeti-rpm
Ganeti RPM Packaging
Stars: ✭ 23 (+9.52%)
Mutual labels:  rpm, rpm-packages
Bodhi
Bodhi is a web-system that facilitates the process of publishing updates for a Fedora-based software distribution.
Stars: ✭ 114 (+442.86%)
Mutual labels:  rpm, repository-management
openssl-RPM-Builder
Build latest OpenSSL binary
Stars: ✭ 46 (+119.05%)
Mutual labels:  rpm, rpm-packages
spec-cleaner
spec-cleaner
Stars: ✭ 26 (+23.81%)
Mutual labels:  rpm, rpm-packages
artifact-resolver
Standalone jar executable client Maven 2 artifact resolver based on Eclipse Aether.
Stars: ✭ 13 (-38.1%)
Mutual labels:  repository-management
ungoogled-chromium-fedora
RPM build for ungoogled-chromium
Stars: ✭ 24 (+14.29%)
Mutual labels:  rpm
rabbitmq-server-release
RabbitMQ packaging and release engineering bits that do not belong to the Concourse pipelines.
Stars: ✭ 13 (-38.1%)
Mutual labels:  rpm
cleanup
Remove gone Git branches with ease.
Stars: ✭ 21 (+0%)
Mutual labels:  repository-management
n3dr
Nexus3 Disaster Recovery (N3DR) is a tool that is capable of downloading all artifacts from a Nexus3 server and to migrate them to another Nexus3 server. Note that some repository formats are not supported at the moment.
Stars: ✭ 110 (+423.81%)
Mutual labels:  artifact-management
repobee
CLI tool for managing Git repositories on GitHub and GitLab in the context of education
Stars: ✭ 51 (+142.86%)
Mutual labels:  repository-management
toolbox
Unified kit with all the scripts required for maintaining the repository 🧰
Stars: ✭ 60 (+185.71%)
Mutual labels:  repository-management
nginx-more
Development repository for nginx-more package
Stars: ✭ 96 (+357.14%)
Mutual labels:  rpm
deezer-linux
An universal linux port of deezer, supporting both Flatpak and AppImage
Stars: ✭ 141 (+571.43%)
Mutual labels:  rpm
awx-rpm
RPM specs for ansible-awx project
Stars: ✭ 41 (+95.24%)
Mutual labels:  rpm
comptroller
A simple and lightweight tool to manage your monorepo.
Stars: ✭ 26 (+23.81%)
Mutual labels:  repository-management
Boostnote-packages
Repo containing .rpm, .deb and Boostnote app folder
Stars: ✭ 31 (+47.62%)
Mutual labels:  rpm
indy
Simple artifact proxy for maven and similar build tools
Stars: ✭ 27 (+28.57%)
Mutual labels:  repository-management
rpm-rs
A pure rust library for building and parsing RPM's
Stars: ✭ 32 (+52.38%)
Mutual labels:  rpm

Join our Telegramm group

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

Javadoc License codecov Hits-of-Code Maven Central PDD status

This Java library turns your binary storage (files, S3 objects, anything) into an RPM repository. You may add it to your binary storage and it will become a fully-functionable RPM repository, which yum and dnf will perfectly understand.

Similar solutions:

Some valuable references:

If you have any question or suggestions, do not hesitate to create an issue or contact us in Telegram.
Artipie roadmap.

How to use

This is the dependency you need:

<dependency>
  <groupId>com.artipie</groupId>
  <artifactId>rpm-adapter</artifactId>
  <version>[...]</version>
</dependency>

Use one of the existing com.artipie.asto.Storage implementations to create the Storage. Artipie/asto supports FileStorage, S3 and other storages. Or you can implement com.artipie.asto.Storage by yourself.

Then, you make an instance of Rpm class with your storage as an argument. Finally, you put your artifacts to the storage specifying repository key (rpm-repo in our example) and instruct Rpm to update the meta info:

import com.artipie.rpm.Rpm;
final Storage storage = new FileStorage(Paths.get("my-artipie"));
final String name = "rpm-repo";
storage.save(
    new Key.From(name, "pkg.rpm"), 
    new Content.From(Files.readAllBytes(Paths.get("pkg.rpm")))
).join();
final Rpm rpm = new Rpm(storage);
rpm.batchUpdate(new Key.From(name));

Read the Javadoc for more technical details.

Naming policy and checksum computation algorithm

RPM may use different names to store metadata files in the package, by default we use StandardNamingPolicy.PLAIN. To change naming policy use secondary constructor of Rpm to configure it. For instance to add SHA1 prefixes for metadata files use StandardNamingPolicy.SHA1.

RPM may use different algorithms to calculate rpm packages checksum for metadata. By default, we use sha-256 algorithms for hashing. To change checksum calculation algorithm use secondary constructor of Rpm and Digest enum to specify the algorithm:

Rpm rpm = new Rpm(storage, StandardNamingPolicy.SHA1, Digest.SHA256);

Include filelists.xml metadata

RPM repository may include filelists.xml metadata, this metadata is not required by all rpm package managers. By default, we do not generate this metadata file but this behaviour can be configured with the help of Rpm secondary constructor.

How it works?

First, you upload your .rpm artifact to the repository. Then, you call batchUpdate() and these four system XML files are updated in the repodata directory: repomd.xml, primary.xml.gz, filelists.xml.gz, and others.xml.gz.

Examples of these files you can find in this repo.

Cli

Build the Cli tool using mvn clean package -Pcli. You can run it as following

java -jar target/rpm-adapter.jar ./repo-dir/

Options are:

  • naming-policy - (optional, default simple) configures NamingPolicy for Rpm
  • digest - (optional, default sha256) configures Digest instance for Rpm
  • filelists - (optional, default true) includes File Lists for Rpm
  • update - (optional, default empty, no update) allows to set schedule to update repository in cron format. This option allows performing repository update periodically, according to schedule.

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

To avoid build errors use Maven 3.2+ and please read contributing rules.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].