{"id":20564326,"url":"https://github.com/tarantool/mkrepo","last_synced_at":"2025-05-06T18:05:45.600Z","repository":{"id":39285282,"uuid":"68709874","full_name":"tarantool/mkrepo","owner":"tarantool","description":"Maintain DEB and RPM repositories on S3","archived":false,"fork":false,"pushed_at":"2023-12-06T14:12:30.000Z","size":2044,"stargazers_count":70,"open_issues_count":21,"forks_count":25,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-06T18:05:40.260Z","etag":null,"topics":["deb","rpm","s3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarantool.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-20T12:32:01.000Z","updated_at":"2024-09-12T09:06:05.000Z","dependencies_parsed_at":"2024-01-12T19:48:05.621Z","dependency_job_id":"55c290aa-104c-44b8-b2c4-cc9d7329fa92","html_url":"https://github.com/tarantool/mkrepo","commit_stats":{"total_commits":126,"total_committers":16,"mean_commits":7.875,"dds":0.7619047619047619,"last_synced_commit":"6a392348afe74da25894dcd6aa73f2a1948629b2"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmkrepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmkrepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmkrepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fmkrepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarantool","download_url":"https://codeload.github.com/tarantool/mkrepo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741373,"owners_count":21797027,"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":["deb","rpm","s3"],"created_at":"2024-11-16T04:25:40.920Z","updated_at":"2025-05-06T18:05:45.563Z","avatar_url":"https://github.com/tarantool.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create RPM and DEB repositories in S3\n\n`mkrepo` is a repository generator with pluggable backends,\nwhich allows you to maintain an RPM or DEB repository on various\nstorages, like local filesystem or S3, and periodically regenerate metadata.\n\nUse it in tandem with your favourite CI system to produce a better pipeline.\n`mkrepo` helps you to get rid of ad-hoc cron jobs.\n\nAs a bonus, `mkrepo` supports on-premises S3 servers like [Minio](http://minio.io).\n\nWorks on Linux and OS X. Should also work on BSD and Windows, but I haven't checked.\n\n## Quickstart\n\nCreate an s3 bucket named e.g. `builds` and put a sample package `package.rpm` to `s3://builds/rpmrepo/Packages`. Then do the following:\n\n``` bash\n./mkrepo.py s3://builds/rpmrepo\n```\n\nAfter this, you will find all metadata generated in `s3://builds/rpmrepo/repodata`\n\n## Run tests\n\nTo run the tests, use the following command::\n\n``` bash\nmake test\n```\n\n## Dependencies\n\nPython libraries:\n\n* boto3\n\n## Command-line reference\n\n`mkrepo` parses your `~/.aws/config` and reads secret key and region settings.\nSo you may skip them in command line invocation in case you have aws config.\n\n``` bash\n  mkrepo.py [-h] \n            [--temp-dir TEMP_DIR]\n            [--s3-access-key-id S3_ACCESS_KEY_ID]\n            [--s3-secret-access-key S3_SECRET_ACCESS_KEY]\n            [--s3-endpoint S3_ENDPOINT]\n            [--s3-region S3_REGION]\n            [--s3-public-read]\n            [--sign]\n            [--force]\n            path [path ...]\n```\n\n* `--temp-dir` - /(optional)/directory used to store temporary artifacts (default is .mkrepo)\n* `--s3-access-key-id` - /(optional)/ specify S3 access key ID\n* `--s3-secret-access-key` - /(optional)/ specify S3 secret key\n* `--s3-endpoint` - /(optional)/ specify S3 server URI\n* `--s3-region` - /(optional)/ specify S3 region (default is us-east-1)\n* `--s3-public-read` - /(optional)/ set read-only permission on files uploaded\n  to S3 for anonymous users\n* `--sign` - /(optional) sign package metadata\n* `--force` - /(optional) when adding packages to the index, the malformed one\n  will be skipped. By default, a malformed package will cause the utility to\n  stop working. The malformed_list.txt file will also be added to the repository\n* `path` - specify list of path to scan for repositories\n\n## Environment variables reference\n\n* `GPG_SIGN_KEY` - the name of the key that will be used to sign package metadata.\n\n\u003cdetails\u003e\u003csummary\u003eTips for working with GPG keys\u003c/summary\u003e\n\n   * Create a new key:\n   ``` bash\n   gpg --full-generate-key\n   ```\n   * To view all your keys, you can use:\n   ``` bash\n   gpg --list-secret-keys --keyid-format LONG\n   ```\n   * Scripts can use something like this to get the Key ID:\n   ``` bash\n   export GPG_SIGN_KEY=\"$(gpg --list-secret-keys --with-colons | grep ^sec: | cut -d: -f5)\"\n   ```\n   * Export the key in ASCII armored format:\n   ``` bash\n   gpg --armor --export-secret-keys MYKEYID \u003e mykeys.asc\n   ```\n   * Import the key:\n   ``` bash\n   cat mykeys.asc | gpg --batch --import\n   ```\n\n\u003c/details\u003e\n\n* `MKREPO_DEB_ORIGIN` - the value of the [\"Origin\"](https://wiki.debian.org/DebianRepository/Format#Origin)\n  field of the \"Release\" file.\n* `MKREPO_DEB_LABEL` - the value of the [\"Label\"](https://wiki.debian.org/DebianRepository/Format#Label)\n  field of the \"Release\" file.\n* `MKREPO_DEB_DESCRIPTION` - the value of the \"Description\" field of the \"Release\" file.\n\n## How it works\n\n`mkrepo` searches the supplied path for either `Packages` or `pool` subdir. If\nit finds `Packages`, it assumes an rpm repo. If it finds `pool`, it assumes a\ndeb repo.\n\nThen it parses existing metadata files (if any) and compares timestamps recorded\nthere with timestamps of all package files in the repo. Any packages that have\ndifferent timestamps or that don't exist in metadata, are parsed and added to\nmetadata.\n\nThen new metadata is uploaded to S3, replacing previous one.\n\n## Credits\n\nThanks to [Cyril Rohr](https://github.com/crohr) and [Ken Robertson](https://github.com/krobertson), authors of the following awesome tools:\n\n* [rpm-s3](https://github.com/crohr/rpm-s3)\n* [deb-s3](https://github.com/krobertson/deb-s3)\n\nUnfortunately, we needed a solution that is completely decoupled from CI pipeline,\nand the mentioned tools only support package push mode, when you have to use a\ntool to actually push packages to s3, insted of native s3 clients.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Fmkrepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarantool%2Fmkrepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Fmkrepo/lists"}