#854047 autopkgtest-buildvm-ubuntu-cloud: Support file:// for --mirror

#854047#5
Date:
2017-02-03 12:54:17 UTC
From:
To:
Hi there,

I wanted to work on an autopkgtest bug in the qemu runner on the train.
I've got a full mirror around which is available on my system. Currently
autopkgtest-buildvm-ubuntu-cloud doesn't support file:// for --mirror
though - the mirror isn't made available inside the VM.

Maybe I could already achieve this by manually passing qemu parameters,
but it's possible to support this OOTB. That's what the attached patch
does. It makes it so that "--mirror file://foo" is mounted as
/mirrors/ubuntu inside the VM.

When you run the actual tests ("-- qemu foo.img"), you also have to tell
the qemu runner where to find the mirror so that it can mount it. For
that I added a new "--localmirror" option. This isn't DRY as you've
already given that information when building the VM, but I don't know
how to avoid that. I hope it's acceptable.

Review / ideas for improvement appreciated!

#854047#10
Date:
2018-04-26 18:13:45 UTC
From:
To:
Hi Iain,

Your patch doesn't apply cleanly (anymore?). If you are still interested
in this, could you please update the patch and create a merge request on
salsa mentioning this bug? That way reviewing and reworking the patch is
easier.

Paul

#854047#17
Date:
2025-01-24 09:10:25 UTC
From:
To:
Control: tags -1 + moreinfo
Hi Laney,

What I do not like of this proposal is that the built image is tied to
work with a specific invocation of the virt server. It is not only that
the approach isn't DRY, but it's also that the required --localmirror
value is not recorded anywhere: you just have to know that you have a
special image that has to be treated in a special way.

For your use case I think a better solution is:

- install a local proxy on the host machine (your laptop), apt-cacher-ng
or squid-deb-proxy

- configure your local apt to use the proxy, this may be automatic (I
don't recall for sure)

- autopkgtest-buildvm-ubuntu-cloud should auto-detect the proxy and
configure the VM to use it; if this doesn't happen, or if it is clunky
for some reason, then we have a bug.

Would you be happy with this solution?

[OT: Hi, I hope you are doing well and still doing Debian stuff!]

Cheers,

Paride