{"id":20910475,"url":"https://github.com/artipie/rpm-adapter","last_synced_at":"2025-07-12T11:13:26.012Z","repository":{"id":37097440,"uuid":"219726578","full_name":"artipie/rpm-adapter","owner":"artipie","description":"Turns your data storage into an RPM repository","archived":false,"fork":false,"pushed_at":"2024-05-22T01:55:52.000Z","size":20440,"stargazers_count":5,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T07:41:15.462Z","etag":null,"topics":["artifact-management","dnf","java","private-rpm-repository","repository-management","rpm","rpm-packages","yum"],"latest_commit_sha":null,"homepage":"https://www.artipie.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artipie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.header","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-05T11:15:27.000Z","updated_at":"2024-09-07T18:31:30.000Z","dependencies_parsed_at":"2024-04-22T13:29:07.501Z","dependency_job_id":"cfec08bf-13d1-4341-8fc8-0683aa210542","html_url":"https://github.com/artipie/rpm-adapter","commit_stats":null,"previous_names":["yegor256/rpm-files"],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/artipie/rpm-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Frpm-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Frpm-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Frpm-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Frpm-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artipie","download_url":"https://codeload.github.com/artipie/rpm-adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artipie%2Frpm-adapter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262376080,"owners_count":23301343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artifact-management","dnf","java","private-rpm-repository","repository-management","rpm","rpm-packages","yum"],"created_at":"2024-11-18T14:15:24.667Z","updated_at":"2025-06-28T04:33:46.112Z","avatar_url":"https://github.com/artipie.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"http://artipie.com\"\u003e\u003cimg src=\"https://www.artipie.com/logo.svg\" width=\"64px\" height=\"64px\"/\u003e\u003c/a\u003e\n\n[![Join our Telegramm group](https://img.shields.io/badge/Join%20us-Telegram-blue?\u0026logo=telegram\u0026?link=http://right\u0026link=http://t.me/artipie)](http://t.me/artipie)\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](http://www.rultor.com/b/artipie/rpm-adapter)](http://www.rultor.com/p/artipie/rpm-adapter)\n[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)\n\n[![Javadoc](http://www.javadoc.io/badge/com.artipie/rpm-adapter.svg)](http://www.javadoc.io/doc/com.artipie/rpm-adapter)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/artipie/rpm-adapter/blob/master/LICENSE.txt)\n[![codecov](https://codecov.io/gh/artipie/rpm-adapter/branch/master/graph/badge.svg)](https://codecov.io/gh/artipie/rpm-adapter)\n[![Hits-of-Code](https://hitsofcode.com/github/artipie/rpm-adapter)](https://hitsofcode.com/view/github/artipie/rpm-adapter)\n[![Maven Central](https://img.shields.io/maven-central/v/com.artipie/rpm-adapter.svg)](https://maven-badges.herokuapp.com/maven-central/com.artipie/rpm-adapter)\n[![PDD status](http://www.0pdd.com/svg?name=artipie/rpm-adapter)](http://www.0pdd.com/p?name=artipie/rpm-adapter)\n\nThis Java library turns your binary storage\n(files, S3 objects, anything) into an RPM repository.\nYou may add it to your binary storage and it will become\na fully-functionable RPM repository, which\n[`yum`](https://en.wikipedia.org/wiki/Yum_%28software%29) and\n[`dnf`](https://en.wikipedia.org/wiki/DNF_%28software%29)\nwill perfectly understand.\n\nSimilar solutions:\n\n  * [Artifactory](https://www.jfrog.com/confluence/display/RTF/RPM+Repositories)\n  * [Pulp](https://pulp-rpm.readthedocs.io/en/latest/)\n\nSome valuable references:\n\n  * [RPM format](https://rpm-packaging-guide.github.io/)\n  * [Yum repository internals](https://blog.packagecloud.io/eng/2015/07/20/yum-repository-internals/) (blog post)\n  * [YUM repository and package management: Complete Tutorial](https://www.slashroot.in/yum-repository-and-package-management-complete-tutorial) (blog post)\n  * [The Origin of RPM Content](https://docs.pulpproject.org/en/2.9/plugins/pulp_rpm/tech-reference/rpm.html)\n\nIf you have any question or suggestions, do not hesitate to [create an issue](https://github.com/artipie/rpm-adapter/issues/new) \nor contact us in [Telegram](https://t.me/artipie).  \nArtipie [roadmap](https://github.com/orgs/artipie/projects/3).\n\n## How to use\n\nThis is the dependency you need:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.artipie\u003c/groupId\u003e\n  \u003cartifactId\u003erpm-adapter\u003c/artifactId\u003e\n  \u003cversion\u003e[...]\u003c/version\u003e\n\u003c/dependency\u003e\n```\n \nUse one of the existing `com.artipie.asto.Storage` implementations to create the `Storage`. \n[`Artipie/asto`](https://github.com/artipie/asto) supports\n[`FileStorage`](https://github.com/artipie/asto/blob/master/src/main/java/com/artipie/asto/fs/FileStorage.java), \n[`S3`](https://github.com/artipie/asto/blob/master/src/main/java/com/artipie/asto/s3/S3Storage.java) \nand other storages. Or you can implement `com.artipie.asto.Storage` by yourself.\n\nThen, you make an instance of `Rpm` class with your storage\nas an argument. Finally, you put your artifacts to the storage specifying repository key \n(`rpm-repo` in our example) and instruct `Rpm` to update the meta info:\n\n```java\nimport com.artipie.rpm.Rpm;\nfinal Storage storage = new FileStorage(Paths.get(\"my-artipie\"));\nfinal String name = \"rpm-repo\";\nstorage.save(\n    new Key.From(name, \"pkg.rpm\"), \n    new Content.From(Files.readAllBytes(Paths.get(\"pkg.rpm\")))\n).join();\nfinal Rpm rpm = new Rpm(storage);\nrpm.batchUpdate(new Key.From(name));\n```\n\nRead the [Javadoc](https://www.javadoc.io/doc/com.artipie/rpm-adapter/latest/index.html)\nfor more technical details.\n\n### Naming policy and checksum computation algorithm\n\nRPM may use different names to store metadata files in the package,\nby default we use `StandardNamingPolicy.PLAIN`. To change naming policy use\nsecondary constructor of `Rpm` to configure it. For instance to add `SHA1` prefixes for metadata \nfiles use `StandardNamingPolicy.SHA1`. \n\nRPM may use different algorithms to calculate rpm packages checksum for metadata. By default, we use \n`sha-256` algorithms for hashing. To change checksum calculation algorithm use secondary \nconstructor of `Rpm` and `Digest` enum to specify the algorithm:\n\n```java\nRpm rpm = new Rpm(storage, StandardNamingPolicy.SHA1, Digest.SHA256);\n```\n\n### Include filelists.xml metadata\n\nRPM repository may include `filelists.xml` metadata, this metadata is not required by all rpm package\nmanagers. By default, we do not generate this metadata file but this behaviour can be configured \nwith the help of `Rpm` secondary constructor.\n\n## How it works?\n\nFirst, you upload your `.rpm` artifact to the repository. Then,\nyou call `batchUpdate()` and these four system XML files are updated\nin the `repodata` directory:\n`repomd.xml`, `primary.xml.gz`, `filelists.xml.gz`, and `others.xml.gz`.\n\nExamples of these files you can find in\n[this repo](https://download.docker.com/linux/centos/7/source/stable/repodata/).\n\n## Cli\n\nBuild the Cli tool using `mvn clean package -Pcli`.\nYou can run it as following\n```bash\njava -jar target/rpm-adapter.jar ./repo-dir/\n```\n\nOptions are:\n- `naming-policy` - (optional, default `simple`) configures NamingPolicy for Rpm\n- `digest` - (optional, default `sha256`) configures Digest instance for Rpm\n- `filelists` - (optional, default `true`) includes File Lists for Rpm\n- `update` - (optional, default empty, no update) allows to set schedule to update repository in \ncron format. This option allows performing repository update periodically, according to schedule.\n\n## How to contribute\n\nFork repository, make changes, send us a pull request. We will review\nyour changes and apply them to the `master` branch shortly, provided\nthey don't violate our quality standards. To avoid frustration, before\nsending us your pull request please run full Maven build:\n\n```\n$ mvn clean install -Pqulice\n```\n\nTo avoid build errors use Maven 3.2+ and please read [contributing rules](https://github.com/artipie/artipie/blob/master/CONTRIBUTING.md). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartipie%2Frpm-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartipie%2Frpm-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartipie%2Frpm-adapter/lists"}