Giter Site home page Giter Site logo

createrepo-s3's Introduction

Create RPM repository on S3 storage

Using the traditional createrepo to create RPM repositories can be hard if you work with containers and S3 storage. Most solutions involve downloading the entire repository to update the metadata. This can be costly when dealing with large repositories.

createrepo-s3 is trying to solve this problem by allowing to add new files to a repository living in S3 while keeping all old metadata and packages as they are.

The script is basically a wrapper around s3cmd and createrepo.

How it works

The tool needs to be run on a directory which only contains the RPMs you want to add. It will then:

  1. Use s3cmd to list all RPM files in S3
  2. Touch all these files locally, creating an empty file for each RPM
  3. Launch createrepo, instructing it to only check for file existence
  4. Remove the empty files
  5. Upload everything else to S3

Prerequisites

  • createrepo installed

  • s3cmd installed and configured

    • Make sure s3cmd ls s3:// (no arguments) works
  • The S3 location must already contain a valid RPM repository. You can use createrepo for initialization:

      mkdir repository
      createrepo repository
      s3cmd put -r repository s3://my_bucket/
    

Example

Add xy-0.6.1-1.fc36.x86_64.rpm to the repository:

mkdir repository
cp /path/tp/xy-0.6.1-1.fc36.x86_64.rpm repository/
createrepo-s3 repository/ s3://my_bucket/repository

Limitations

  • Bucket names and paths may not contain #
  • This does not deal with concurrency. Simultaneous updates may overwrite each other.
  • This only allows for adding new packages. Updating existing ones does not work. You should release a new version anyway ;-)

createrepo-s3's People

Contributors

lkiesow avatar

Watchers

 avatar  avatar

Forkers

cgreweling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.