TheSin- / rpi-img-builder

Scripts to create custom images for RaspberryPi
MIT License
107 stars 30 forks source link

possible issues when building from a local apt mirror #9

Closed mzemb closed 7 years ago

mzemb commented 7 years ago

For reproducibility, I've created a local apt mirror, and I have encountered issues I report here only in order to help someone with the same problem:

I had edited the files repos/Debian/multistrap.list.in and repos/Raspbian/multistrap.list.in by changing the line source=http://http.debian.net/debian to the line source=file:///mnt/bigdrive/mirror/archive.raspberrypi.org/debian

This created an issue with multistrap which was not installing the packages correctly.

I then tried with: source=copy:///mnt/bigdrive/mirror/archive.raspberrypi.org/debian as stated by multistrap documentation ( https://wiki.debian.org/Multistrap/PartialMirrors )

But with that I had issues later when the line was transmitted to apt sources.list.d/* where apt said it was malformed.

So instead of adding a sed cmd in the makefile to change them, I'm simply accessing my local mirror through ftp (by installing proftpd), which allows me to use

source=ftp://<myip>/archive.raspberrypi.org/debian
source=ftp://<myip>/archive.raspbian.org/raspbian

which works everywhere. :)

Just in case, my /etc/apt/mirror.list used by apt-mirror:

set base_path   /mnt/bigdrive/raspbian_mirror
set nthreads     4
set _tilde 0
set limit_rate 100k
deb-armhf http://archive.raspbian.org/raspbian          jessie main contrib non-free
deb-armhf http://archive.raspbian.org/raspbian          jessie main firmware rpi
deb-armhf http://archive.raspberrypi.org/debian         jessie main ui
TheSin- commented 7 years ago

this is a good point, I'll add your apt-mirror ideas to the README.

That being said, there are a few net calls that would still happen during the build, one is to get the repo key for the foundation since they do not have. package for it. As well as the RPI3 wifi firmware, which again isn't in a package.

Otherwise that should work perfectly I also have my own local repo that I use, I do not use apt-mirror but same idea.

Not just so I'm clear I didn't miss anything, this is meant more for info there is no actual bug here right?

mzemb commented 7 years ago

Indeed, it's not a bug and it should have been a readme. Do you want me to write it there and issue a pull request ?

I prevent network communication by simply removing the dns in my environment, and it works (emitting warnings about not being able to get the keys though).

TheSin- commented 7 years ago

sure in the repo dir add a README.md file and all the info there. I've been meaning to make READMEs per dir anyhow to go into more depth in all the dirs and how to use them.

But both finding this, figuring it out are appreciated helping with docu is even more appreciated since I suck at docu ;)

mzemb commented 7 years ago

It will be done.