-
Notifications
You must be signed in to change notification settings - Fork 237
Feature: add option --disable-apt-cacher (following #249) #253
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
Conversation
Do not work on lxc, within the container, source.list is done between following lines : gitian-builder/libexec/make-clean-vm Line 66 in 32b1145
The file bootstrap-fixup.in contain source.list configuration, and expect to use a mirror. Fix needed |
Just added some code to configure lxc container Within a running container, I ended up with :
instead of :
Actually, it's removing references to apt cacher server, but I'm unable to test it. It looks like having lxc container connected to Internet is a bit tricky, I crash because of the internet connection on I'm not sure if lxc containers are more used without internet, or packages installed when building base, I don't know the software and ignore how a configuration like that should work... |
Add bug fix for apt cacher configuration within the Dockerfile, see following comment for details. |
if [ $APT_CACHER = "1" ]; then | ||
sed "s;HOSTIP;$MIRROR_HOST;g" < target-bin/bootstrap-fixup.in > target-bin/bootstrap-fixup | ||
else | ||
sed "s;HOSTIP:3142/;;g" < target-bin/bootstrap-fixup.in > target-bin/bootstrap-fixup | ||
fi |
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.
This is actually not working.
config-boostrap-fixup
is called with bin/make-base-vm
, which have APT_CACHER
variable through --disable-apt-cacher
.
It is called also with bin/gbuild
, who use it with make-clean-vm
. At this moment, they do not have APT_CACHER
variable anymore.
Creating the following error :
bash: [: =: unary operator expected
APT_CACHER
will be replaced by an unquoted empty value.
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.
As a possible solution, would it be possible to configure bootstrap-fixup.in only when using make-base-vm
? And then reuse generated bootstrap-fixup
file instead of recreating one in make-clean-vm
.
The feature was implemented by commit 5785dfc, I suppose we can do it as I suggest in the case GITIAN_HOST_IP
doesn't change between make-base-vm
& gbuild
.
Actually, without this situation, it looks like it's creating twice the same file.
It can make sure configuration is more done through make-base-vm
.
Maybe deleting the following line can do the job (?) :
gitian-builder/libexec/make-clean-vm
Line 65 in 4609325
libexec/config-bootstrap-fixup |
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.
Not sure if it's the right solution, but if it is I just added the commit d8d370d to implement this fix.
@@ -193,12 +199,19 @@ if [ $DOCKER = "1" ]; then | |||
base_image="$DISTRO:$SUITE" | |||
fi | |||
|
|||
apt_cacher="" |
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.
Variable declaration useless
Hi 👋, I wanted to know if you are planning to review this PR ? You were really reactive for the feature, but I do not have any reply since September. Actually, the PR need tests for LXC & KVM, both with and without We did it while working on Dogecoin, there is a pending PR reworking the gitian process and it uses this feature, would be great to know what you want to do 🙃 |
I do intend to review, but have to allocate some time for testing with the different configurations... |
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.
I found a couple of issues right away.
@@ -12,4 +12,8 @@ if [ -z "$MIRROR_HOST" ] || [ "$MIRROR_HOST" == "127.0.0.1" ]; then | |||
MIRROR_HOST=$GITIAN_HOST_IP | |||
fi | |||
|
|||
sed "s;HOSTIP;$MIRROR_HOST;g" < target-bin/bootstrap-fixup.in > target-bin/bootstrap-fixup | |||
if [ $APT_CACHER = "1" ]; then |
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.
two issues:
- missing quotes around
$APT_CACHER
APT_CACHER
is not actually exported as an environment variable
Thinking about this further, and given that Bitcoin is moving to a different build system, I am planning to move this repo to maintenance mode. Only serious bugs and security issues will be considered going forward. |
Can you tell me what is this new build system, please ? I do not find information related to this change, in the current gitian docs from bitcoin-core repo is still related to your repo, and it's redirecting to a EDIT: saw your readme indicating |
Following #249 from @micaelmalta, this PR creates the option
--disable-apt-cacher
,to disable the use of apt cacher for dependencies cache.
It also adds some documentation on the README about the option. Documentation would need at least an update for none ubuntu/debian distros.