Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#41117 - [devtools] [PATCH] makechrootpkg: Add -P for --private-network
Attached to Project:
Arch Linux
Opened by Olivier Brunel (jjacky) - Sunday, 06 July 2014, 17:17 GMT
Last edited by freswa (frederik) - Sunday, 13 September 2020, 11:31 GMT
Opened by Olivier Brunel (jjacky) - Sunday, 06 July 2014, 17:17 GMT
Last edited by freswa (frederik) - Sunday, 13 September 2020, 11:31 GMT
|
DetailsThis allows to build a package in a chroot without network connectivity. The
point for me being mainly that I don't want pacman to download anything when installing {make,}dependencies, i.e. everything needed must already be in pacman's cache. If it's not the case, it means I missed something/did something wrong somewhere, and this makes it easy to notice. This is notably useful because I have a few packages I build myself w/ different options/dependencies, and so when building packages I don't want pacman to e.g. pull a dependency of foo (instead, I'll have to have my foo-jjk package, which conflicts & provides foo, to be installed before hand), otherwise this could lead to issues, e.g. built package being linked to bar when it shouldn't, because bar was installed as a dependency of foo. |
This task depends upon
And I'm not saying a dependency being pulled would be a bug, just something that I don't want happening here. (Or, a bug on my end only.) E.g. if the package to be built depends on gtk3 (or has a dependency that does), I don't want pacman to end up downloading/installing it, I'd want to have another package, providing gtk3 but with maybe a different set of dependencies as the official gtk3 package, to be installed instead.
Using --private-network, in case e.g. I missed the gtk3 dependency and failed to install my gtk3-jjk package in the chroot, I simply get pacman erroring out as it failed to download the gtk3 package. Everything is fast, clear, obvious. (This also happens without any flag, when building on a computer with no internet.)
Without the flag, either I see it as it is being downloaded and I get a chance to kill pacman and fix things; or I don't and it's only afterwards, after the whole package was successfully built in the chroot, that I need to go over things & realize what happened and need to start everything all over again.
(Also, I quickly just tried bind mounting an empty resolv.conf and the network remained functional in the container.)
Also, if you want to build packages against foo-jjk instead of foo, the best way to do this is via makedepends+=('foo-jjk').
...
OTOH if makepkg supported a --confirm flag to negate a previous --noconfirm flag, you'd have the option of manually approving things.
So I really feel this is an xyproblem.