distr1 / distri

a Linux distribution to research fast package management
https://distr1.org
Other
532 stars 28 forks source link

Local package repository #93

Open markusbkk opened 1 year ago

markusbkk commented 1 year ago

Just curious. If I wanted to set up a local package repository with custom packages not in the official repo, how would I best go about setting this up?

stapelberg commented 1 year ago

See distri help, specifically distri export, and possibly also distri mirror.

For installing a package, distri only needs the squashfs file itself (e.g. i3-amd64-4.18.1-12.squashfs) and the accompanying metadata file (i3-amd64-4.18.1-12.meta.textproto). Just make them available via HTTP, with any webserver you want. That’s all distri export does*.

For use-cases like debugfs, you also need a meta.binaryproto that combines the metadata of all packages. That’s what distri mirror produces. But if all you need is installing packages, you can skip this step.

[] For performance, you can optionally serve the .squashfs files gzip-compressed (or zstd once #77 is done). distri export serves these files if you manually create them (e.g. using `parallel gzip -9 --keep ::: .squashfs`), but if you use a different HTTP server you probably need to enable that explicitly.

markusbkk commented 1 year ago

See distri help, specifically distri export, and possibly also distri mirror.

For installing a package, distri only needs the squashfs file itself (e.g. i3-amd64-4.18.1-12.squashfs) and the accompanying metadata file (i3-amd64-4.18.1-12.meta.textproto). Just make them available via HTTP, with any webserver you want. That’s all distri export does*.

For use-cases like debugfs, you also need a meta.binaryproto that combines the metadata of all packages. That’s what distri mirror produces. But if all you need is installing packages, you can skip this step.

[] For performance, you can optionally serve the .squashfs files gzip-compressed (or zstd once #77 is done). distri export serves these files if you manually create them (e.g. using `parallel gzip -9 --keep ::: .squashfs`), but if you use a different HTTP server you probably need to enable that explicitly.

Awesome! Sounds fairly easy.

I assume I can create my own frontend too, by using distri-repobrowser as an example

Will try all of that tonight when I get back from my day job.