Page MenuHomePhabricator

use of local cache to build iso
Closed, ResolvedPublic

Description

I have a machine running apt-cacher-ng which caches all .deb packages to be served locally.
I would like to be able, when building an iso, to get all deb's from my local source.

In normal debian machines you either set:

/etc/apt/apt.conf with the contents
**Acquire::http::Proxy "http://cache:3142/";**
of course in my case local dns is able to resolve the host "cache"

Or you could put the diversion in /etc/apt/sources.list like this
**deb http://cache:3142/deb.debian.org/debian/**

This would save both traffic and speed when compiling vyos iso images.

Anyone willing to add this to the build process ?

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
fromport created this task.Jan 4 2019, 6:16 PM
fromport created this object in space S1 VyOS Public.
fromport updated the task description. (Show Details)Jan 4 2019, 7:41 PM
c-po added a subscriber: c-po.Jan 5 2019, 9:58 AM

@fromport there is an option in the ./configure script tomspecify the Debian mirror you use. You should be able to simply point it to your mirror.

configure -h is a bit "cryptic" (imo)
It doesn't show the defaults, so i ran a regular configure and then editted the build/build-config.json

diff -u

-    "debian_mirror": "http://deb.debian.org/debian",
-    "debian_security_mirror": "http://deb.debian.org/debian-security",
+    "debian_mirror": "http://cache:3142/deb.debian.org/debian",
+    "debian_security_mirror": "http://cache:3142/deb.debian.org/debian-security",
-    "pbuilder_debian_mirror": "http://deb.debian.org/debian",
-    "salt_mirror": "http://repo.saltstack.com/apt/debian/8/amd64/2017.7",
+    "pbuilder_debian_mirror": "http://cache:3142/deb.debian.org/debian",
+    "salt_mirror": "http://cache:3142/repo.saltstack.com/apt/debian/8/amd64/2017.7",
-    "vyos_mirror": "http://dev.packages.vyos.net/repositories/current"
+    "vyos_mirror": "http://cache:3142/dev.packages.vyos.net/repositories/current"

That did the trick and I think shaved more than 5 minutes of my build time

fromport closed this task as Resolved.Feb 10 2019, 5:26 PM
syncer added a project: Restricted Project.Mar 16 2019, 7:03 PM
syncer added subscribers: rob, syncer.

@rob probably good to add to KB this one