Feature #12272

Add support to Vagrant for building offline

Added by anonym 2017-02-28 13:06:16 . Updated 2017-04-17 09:14:02 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Build system
Target version:
Start date:
2017-02-28
Due date:
% Done:

100%

Feature Branch:
feature/12272-vagrant-offline-builds
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

At least when using the VM’s proxy; for external ones it’s up to the user, and it’s incompatible with noproxy.


Subtasks


History

#1 Updated by anonym 2017-02-28 17:36:47

  • Status changed from Confirmed to In Progress
  • Target version set to Tails_2.11
  • % Done changed from 0 to 40
  • QA Check set to Info Needed
  • Feature Branch set to feature/12272-vagrant-offline-builds

If this doesn’t break Jenkins I think I’ll merge this myself and ask for a post-merge review. I badly need this at my current location and currently git merge --no-cimmit this branch before building other branches.

So, let’s see what Jenkins thinks.

#2 Updated by anonym 2017-03-01 11:57:11

  • Status changed from In Progress to Fix committed
  • Assignee changed from anonym to intrigeri
  • % Done changed from 40 to 100
  • QA Check changed from Info Needed to Ready for QA

Jenkins was happy so => merged! intrigeri, can you please do a post-merge review?

#3 Updated by anonym 2017-03-01 12:24:06

BTW, that is only commit:

  • commit:33f5cd48d7 Vagrant: add ‘offline’ option for building offline.

#4 Updated by anonym 2017-03-01 18:38:43

anonym wrote:
> BTW, that is only commit:
> * commit:33f5cd48d7 Vagrant: add ‘offline’ option for building offline.

Actually I had to push some more stuff, so now it is commits:

  • commit:33f5cd48d7 Vagrant: add ‘offline’ option for building offline.
  • commit:7e388a92e7 Vagrant: add sanity check for offline mode vs first run.
  • commit:719bd471bf Vagrant: fixup on offline mode.

#5 Updated by intrigeri 2017-03-02 07:33:25

  • Status changed from Fix committed to In Progress
  • Assignee changed from intrigeri to anonym
  • % Done changed from 100 to 90
  • QA Check changed from Ready for QA to Dev Needed

Looks good!

My only concern is:
sed -i "s/^Offlinemode:.*$/Offlinemode: ${TAILS_OFFLINE_MODE}/" "${ACNG_CONF}"

… which could be implemented by having a /etc/apt-cacher-ng/offline.conf file that we create or delete as needed. This would be cleaner than modifying acng.conf, no?

#6 Updated by anonym 2017-03-02 10:04:31

  • Assignee changed from anonym to intrigeri
  • QA Check changed from Dev Needed to Info Needed

Sure, I admit to not knowing acng.conf well enough, mostly because I haven’t found good docs (any idea?). So, would it be enough to just drop an offline.conf with appropriate Offline: X into the directory? I mean, it reads all .conf files?

#7 Updated by intrigeri 2017-03-02 11:35:50

  • Assignee changed from intrigeri to anonym
  • QA Check changed from Info Needed to Dev Needed

> So, would it be enough to just drop an offline.conf with appropriate Offline: X into the directory? I mean, it reads all .conf files?

Yes. Details are in the “CONFIGURATION” section of apt-cacher-ng(8).

#8 Updated by anonym 2017-03-05 16:21:19

intrigeri wrote:
> > So, would it be enough to just drop an offline.conf with appropriate Offline: X into the directory? I mean, it reads all .conf files?
>
> Yes. Details are in the “CONFIGURATION” section of apt-cacher-ng(8).

If you have the package from Debian testing/unstable…. :) Thanks!

#9 Updated by anonym 2017-03-05 16:39:06

  • Status changed from In Progress to Fix committed
  • Assignee deleted (anonym)
  • % Done changed from 90 to 100
  • QA Check changed from Dev Needed to Pass

Fixed in commit:4292c701ed07208a12c662795aa3f839f1577dac which was ACKed by intrigeri.

#10 Updated by anonym 2017-03-09 13:59:11

  • Status changed from Fix committed to Resolved

#11 Updated by arnaud 2017-04-17 07:52:48

Thanks for this feature, very helpful for me as well. Building offline works great, however when my VM gets too old (a few days, I don’t know how many), apt-get update fails because the cached files are too old. This can be worked around with -o Acquire::Check-Valid-Until=false. I have a patch for that, should I open a new ticket ?

#12 Updated by intrigeri 2017-04-17 08:27:56

> Thanks for this feature, very helpful for me as well. Building offline works great,
> however when my VM gets too old (a few days, I don’t know how many), apt-get update
> fails because the cached files are too old. This can be worked around with -o > Acquire::Check-Valid-Until=false. I have a patch for that, should I open a new
> ticket ?

Yes, please.

#13 Updated by arnaud 2017-04-17 09:14:02

OK, this is now discussed in Bug #12452