-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
build: add ability to interactively run guix builds, use container that has unprivileged user #5449
Conversation
Makes me sad this had to get moved over to ubuntu, instead of alpine, but probably fine. Started my build, let's make sure it works, seems good so far |
For some reason my arm dash-qt binary doesn't match... everything else matches
|
arm-linux-gnueabihf dash-qt is non-deterministic... CI had
I have (twice)
|
I got 2 binaries: There's difference in disassembled code of function @kittywhiskers need to backport this one: https://github.com/bitcoin/bitcoin/pull/25643/files note for myself (and for further cases): need to install |
We can probably move forward with this PR then and backport that in the next set of guix backports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
I still have couple extra comments that I accidentally put to wrong PR.
|
Good thoughts, but I'm gonna merge this so we can move forward with guix part 3; feel free to do a PR with those changes |
The reason why we cannot de-duplicate is because both We could de-duplicate it but that would require the scripts to be modified to be relative, which defeats the point of embedding them into PATH since they won't "run-anywhere", which makes the interactive prompt harder to use. As for binding |
…#5464) ## Additional Information * Based on suggestions by @knst made [here](#5449 (comment)) and [here](#5426 (comment))
Additional Notes
/gnu/store
and/var/guix
are pre-populated when extracting the Guix archive, which is done during the image building process./gnu/store
as read-only for anything that isn't the daemonguix-start
) and will need to be updated if the SDK version is updatedThe container runs as privileged process and all operations are being done as the root user (no unprivileged user exists within the container due to its barebones nature)No longer true, as we're not inheriting the Alpine container. An unprivileged user is used for git-specific operations with a configurable UID/GID pair which should be matched with the host user.https://bordeaux.guix.gnu.org
andhttps://ci.guix.gnu.org
(seeentrypoint
) as it fetches substitutions from it to avoid re-building unpatched/unmodified packages by fetching them from a remote server.Motivation
@PastaPastaPasta was interested in the possibility of being able to run Guix builds as it is run by CI interactively with the fewest commands possible. Since my personal devenv is entirely defined using Docker, I had some experience with interactive containers.
We initially tried using the Alpine container (and earlier versions of this PR built upon this container) already available in
develop
but two problems arose:build-push-action@v2
is not particularly cooperative withedrevo/dockerfile-plus
(which is how we get theINCLUDE+
macro).dockerfile-plus
doubly so. Your context directory is loaded into the builder and therefore, it is imperative to keep the context as minimal as possible, at the risk of increased resource consumption and longer build times.build-push-action
would not cooperate despite efforts accepting the tradeoff and passing the repository root as the contextdockerfile-plus
The context problem still persisted after moving to the Ubuntu-based container (which matches the rest of our CI) but Docker implements something called "additional contexts" that allow you to do things like
COPY
operations with a different directory as the base.