GoogleCloudPlatform / artifact-registry-apt-transport

Apache License 2.0
9 stars 15 forks source link

Provide alternate/redundant binary for apt method #8

Open amilstead opened 1 year ago

amilstead commented 1 year ago

I use Ubuntu Landscape to manage internal apt package mirroring and have had some trouble integrating with Google Cloud Artifact Registry, specifically because of the way landscape manages another tool (reprepro) to maintain those caches.

After some hacking/experimenting, I found that the reprepro's Method field inside the conf/updates file has trouble using ar+https as a valid scheme.

This ultimately results in reprepro being unable to use any ar+https based apt sources as a valid mirror.

Would it be possible to provide a redundant or alternative method program for the nicer-for-reprepro schemes?

For example; I have compiled and tested a version of this library using the scheme gcp-ar://... and reprepro + landscape are completely happy with this.

hopkiw commented 1 year ago

Hi @amilstead thanks for filing this issue. I think right now we don't want to rename ar+https for a few reasons, including supporting our existing users. I think you can probably file an issue with reprepro instead, as the name format we are using with the + sign is a supported scheme documented for use in the mirror transport, which is distributed with apt by default. See it on your system, or referenced in documentation in sources.list(5). This naming scheme implies a behavior over an existing transport type, as opposed to e.g. apt-transport-tor, which uses an entirely distinct protocol.

One thing we might be able to do to help you in the meantime is make the binary check its own name rather than setting ar+https as a constant; in this way you could rename the transport and the repo references in sources.list, instead of having to compile it with a different constant. I've filed #13 to investigate this.

amilstead commented 1 year ago

Awesome, thank you!