Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirroring Debian repos #121

Open
dezeroku opened this issue Dec 20, 2024 · 1 comment
Open

Mirroring Debian repos #121

dezeroku opened this issue Dec 20, 2024 · 1 comment

Comments

@dezeroku
Copy link
Contributor

Hi,
thanks for the great work again!

Some time ago I've set up few Debian servers and I'd like to set up a caching update server for these, similar as I already have for my Arch machines.
Now, I'm aware that there are already multiple solutions that can do that for apt repos, but considering that I've already have pacoloco deployed and I'm happy with it I wondered if it could be used for that purpose.

Setting up a single repo as such:

repos:
  debian:
    url: https://mirrors.edge.kernel.org/debian

with the following node config:

deb https://<pacoloco-url>/repo/debian bookworm main non-free-firmware
deb https://<pacoloco-url>/repo/debian bookworm-updates main non-free-firmware

doesn't work nicely, as bookworm and bookworm-updates seem to fight over ownership of some common repo files.

That's ok, I suppose it's a similar case as with multiple architectures, so I've split these repos:

repos:
  debian:
    url: https://mirrors.edge.kernel.org/debian
  debian-updates:
    url: https://mirrors.edge.kernel.org/debian
  debian-security:
    url: https://security.debian.org/debian-security

and aligned the node config to the new setup:

deb https://<pacoloco-url>/repo/debian bookworm main non-free-firmware
deb https://<pacoloco-url>/repo/debian-updates bookworm-updates main non-free-firmware
deb https://<pacoloco-url>/repo/debian-security bookworm-security main non-free-firmware

and it seems to work fine and cache the packages correctly.

I guess I want to ask if it's a good idea to keep it that way.
Is there any "Arch Linux specific" stuff implemented that would not allow pacoloco to be used as a general caching proxy?

Of course I'm aware that supporting such scenario is not really in scope of this project, so any issues related to mirroring Debian I might run into I am on my own.

@anatol
Copy link
Owner

anatol commented Dec 20, 2024

I suppose it's a similar case as with multiple architectures, so I've split these repos

Yep, it needs splitting. Pacoloco uses flat repository directories as it is how Arch repos are structured.

Is there any "Arch Linux specific" stuff implemented that would not allow pacoloco to be used as a general caching proxy?

Pacoloco is Arch Linux centric, I've never thought about using it for Debian to be honest.

When it comes to 'what exactly Arch-specific there' the main thing I can think of is the way .db .sig and .files files are handled:

  • regular packages are considered fully cacheable, i.e. once a file with the name is downloaded it considered never changed at the server. In contrast .db files are always checked for modification time at the server and re-fetched if server has newer files.
  • prefetch code downloads .db, parses it and prefetches Arch packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants