-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
prepare-host: add squid-deb-proxy-client to host dependencies #8027
base: main
Are you sure you want to change the base?
Conversation
squid-deb-proxy-client is a small script to transparently detect and use a caching packages proxy in the LAN like apt-cacher-ng. It is incredibly convenient and useful to cut down on unnecessary downloads and speed up the build.
WalkthroughThe changes modify the Suggested labels
Suggested reviewers
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
lib/functions/host/prepare-host.sh (1)
200-200
: Dependency Addition: Squid-Deb-Proxy-Client
The new package entrysquid-deb-proxy-client
is correctly added to the array of host dependencies. This change straightforwardly fulfills the PR objective of enhancing the caching mechanism for package downloads.It would be helpful to add an inline comment explaining the role of this package (e.g., "Client utility for detecting and leveraging local caching proxies") so that future maintainers understand its inclusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. This ignores the fact we handle our own apt through chroot, and that we still have aptcacherng lying around. Sounds like a nice idea that needs a bit developing?
Guess my point is: make this an extension for now; once very well proven and the rest clean-ed up, we can consider core-ing it. |
Docstrings generation was requested by @leggewie. * #8027 (comment) The following files were modified: * `lib/functions/host/prepare-host.sh`
Note Generated docstrings for this pull request at #8028 |
thank you for your review. I hope I don't misunderstand you but this change does in fact not ignore the fact that the chroot/docker image handles their own apt pulls and local caching at all. Indeed, that is the very "problem" this PR tries to address. My laptop host already has squid-deb-proxy-client installed, of course. But the armbian docker build container will not benefit from the LAN acng instance, nonetheless. Yet, it should, there is no downside to it. squid-deb-proxy-client is completely transparent. if no acng instance is present in the LAN at run-time of the chroot, nothing changes. if there is, it currently is ignored, loosing the benefits from local LAN-wide caching. all this change will do is that acng instances in the LAN will automatically start working. as such, I don't think that increasing complexity through an extension and making it optional is a good idea at all. having this package installed is a sane default and does not add all that much to the footprint. |
I really appreciate your argument. So please don't misunderstand, caching is an area Armbian has been working on for many years, we've a long trail of tears with acng, squid, etc until we got to the point we are at, which works reasonably-ish for "most cases". (We've still a lot of cleanups to do, ref acng, dead code, etc). Adding
And finally: I must insist any changes will need to be proven in different environments (CI, build farm, local dev workstations, Docker, lxc, etc) before they land in core -- we've been burned too many times. That's why I suggested extension: it's a way you can land your change, I can get my clean core (lol.), time goes by, proof is established, and we can decide. |
Good point on squid-deb-proxy-client being dropped from unstable because squid-deb-proxy was in such bad shape. Ubuntu has reintroduced it and I kept it around. But it's probably best to start looking for an alternative to this transparent discovery mechanism like auto-apt-proxy. Too bad, the way things are currently set up in armbuild/build don't allow an easy way to set up an alternative dependency like I can do with a real package at "Depends: auto-apt-proxy | squid-deb-proxy-client" |
auto-apt-proxy does not detect my LAN acng instance when squid-deb-proxy-client has no issue :-( |
good point also on the caching not propagating further down into the chroot. I do have a hook for pbuilder to do this when building debian packages, so I guess, we might want to try and do this for armbian, too. |
squid-deb-proxy-client is a small script to transparently detect and use a caching packages proxy in the LAN like apt-cacher-ng. It is incredibly convenient and useful to cut down on unnecessary downloads and speed up the build.