-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing feature to set apt sources through the config file #444
Comments
Why is that bad? It looks like the trend is to move all customisation into the config file, which is just not practical. |
Well, I'm not sure that another way is bad... I thought my suggestion was along the same lines as #391 If another change along these lines is not what you want, then maybe I should be asking something like: What is the best way to make that kind of modification in my workflow? (let me explain from a high level what that is...) I am trying to use pi-gen to build an image using a private mirror of the upstream raspbian repo (so that I can control and know what comes in). I don't really want to also maintain a version of the pi-gen git repository, but I would like to have the ability to set those custom apt sources. I am running the build currently using docker with Would you suggest I run a set of scripts/apply patches at some point to touch up those files or overwrite them? Should my patches be applied before I had created a feature branch with a single commit to implement what I was originally suggesting if you are interested: By the way - Thanks for the quick reply! |
The suggested code changes are in pull request #445 . @XECDesign , let me know what you think. If you do lean towards rejecting the pull request, please let me know what your thoughts are on a better way to solve this issue on my end (hopefully without suggestion that I should maintain my own version of pi-gen). Thanks! |
It becomes a bit awkward because I want to merge the arm64 branch into master and have an ARCH parameter which selects which set of source files to use. It may also make sense to have an additional repo added in a later stage. Pi-gen was never written as a tool to generate custom Raspberry Pi OS images, but people kept moving things from the stages into the config file. Despite some initial resistance, I'm okay with it, but I don't see a way to do it in this case without making things quite messy. I can't come up with a clean way to do this without getting in the way of what pi-gen is intended for (and how I have to use it) and still allow you to use it as a tool to create Raspberry Pi OS variants without editing any files other than |
Thanks for the background info. It always helps when there is a little more context to see where things fit in the bigger picture. Especially regarding the I will say as a side note that I was having trouble building an image for a while because the mirror that I was getting pushed to (local to me?) was timing out occasionally (even though the speeds were fine?). I was able to fix that when I started using a custom mirror. I'd like a little more time to think about what you've said before we close the issue. If not a code change to make it easier to make these kinds of project specific deviations, maybe I can come up with at least a suggestion for how (from the outside) to make these kinds of changes which are counter the configurations that the project would like to expose. Lastly, I certainly don't want to get in the way of how you guys have to use the tool. |
Internally, we use apt-cacher-ng to make things a little more reliable. When I was trying to come up with a solution, I was thinking of a |
Coming back to this now a few months later to try and get this resolved. @XECDesign, I took your suggestions for the most part to see how they'd work. Your I think I have most of the I think I'm going to have to create a new issues against My workflow right now looks like the following: I have a wrapping project folder to Dir structure:
I
Which doesn't really work because my custom I realize that you aren't obligated to support my particular workflow (I hate it myself, but this is what I'm allowed to do at my org for now), but within the docker-in-docker confines and all, do you see that I could be doing something else to get arbitrary files/dirs volume-mounted or otherwise accessible to the container that is running This last 20% is feeling more like a support issue now rather than a real issue against the |
Okay, I think I've figured out how best to make this stuff work and I have just now pushed up my latest changes to the PR. Please let me know if there are any issues with the proposed changes. |
Outside of modifying the stage0/00-configure-apt/files/{sources,raspi}.list files, there is not way to point all following apt calls as part of the Raspbian image build at custom mirrors.
I suggest that config items like RASPBIAN_MIRROR (Default: http://raspbian.raspberrypi.org/raspbian/) and DEBIAN_MIRROR (Default: http://archive.raspberrypi.org/debian/) be added.
I am not very good at names, so if anyone has better names, please comment and tell me your suggestions.
The text was updated successfully, but these errors were encountered: