glenux / docker-debian-repository

A local repository for publishing deb files for use with apt.
Other
63 stars 34 forks source link

Auto-configure reprepro-distributions from environment variables #5

Closed glenux closed 1 year ago

glenux commented 3 years ago

Use environment variables plus a template to generate the reprepro-distributions file.

We need :

That should generate something like :

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: unstable
Codename: sid
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Unstable

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: testing
Codename: jessie
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Testing

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: stable
Codename: buster
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Stable
delta523 commented 3 years ago

Hi, thank you for this project.

I implemented a configuration generator using sed. However, in the env variable EASYREPO_SUITES, the codename for each suite must be specified since they are symlinked.

I have not yet implemented warnings should there be errors in the inputs of environment variables.

EASYREPO_SUITES=unstable,sid/stable,buster/testing,bullseye

This will generate something like:

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: unstable
Codename: sid
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Unstable

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: stable
Codename: buster
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Stable

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: testing
Codename: bullseye
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Testing
glenux commented 3 years ago

Wow! Thanks for the contribution!

Indeed it is missing a few tests and a couple of other things, but it's a great base for this new feature. I'm opening a pull request.

Thanks :)