When building a package with sbuild, some packages (dependencies of package being built) are internally downloaded and installed by apt. After the build finished, schroot is cleaned again (while everything is done in overlay)A caching proxy is indeed a good answer for this question but if for some reason you don't want to use it, you can bind-mount some directory from
I need to cache outside of schroot these .deb files that were downloaded by apt.
When building a package with sbuild, some packages (dependencies of package being built) are internally downloaded and installed by apt. After the build finished, schroot is cleaned again (while everything is done in overlay)
I need to cache outside of schroot these .deb files that were downloaded by apt. They are supposed to be used for creaing a local partial debian repository, so that the second build will use this local repo instead of internet one.
Currently it's done by parsing dependencies and downloading them independently, but I suppose there should be some more straightforward way to
get them using sbuild.
I investigated and tried several options for sbuild (like --purge-build=never,
--purge-deps=never, --purge-session=never), tried to find .deb files during the build using at some stages (--pre-build-commands="ls -la /var/cache/apt/ archives/", --starting-build-commands="ls -la /var/cache/apt/archives/", -- finished-build-commands="ls -la /var/cache/apt/archives/") - but I couldn't see any .deb files inside the schroot.
I previously asked in debian-user maillist (https://lists.debian.org/debian-user/2021/10/msg01044.html), but the tips I got (like using caching proxy) are
not what I really need. While sbuild already does the thing (downloading/ installing dependencies), I suppose there should be a way to (at least) see the *.deb files downloaded in '/var/cache/apt/archives' inside schroot.
You have not explained why you don't want to use a caching proxy like apt-cacher-ng.
Thanks for the answer
You have not explained why you don't want to use a caching proxy like apt-cacher-ng.
The question appeared while developing for Isar, a tool build create debian- based distro for embedded systems. In two words, it's similar to Buildroot, Yocto and others, but it uses official Debian packages plus allows to build own customer packages.
Currently it uses some own set of scripts to download dependencies, install them is build chroot and build the package. Every .deb that was downloaded during system build is cached internally. So, for the second build it's possible to create a local repo from these stored files and do everything (e.g
bootstrapping, building custom packages, rootfs generation) not from some remote repo (e.g. http://ftp.debian.org), but from this local one (file:// foo).
I'm currently trying to switch our custom build system to sbuild one, but I faced a problem that the dependencies downloaded by sbuild scripts are not available in form of .deb files.
I need to cache outside of schroot these .deb files that were downloaded by apt. They are supposed to be used for creaing a local partial debian repository, so that the second build will use this local repo instead of internet one.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 61:51:40 |
Calls: | 6,654 |
Files: | 12,200 |
Messages: | 5,331,620 |