-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve `locale` installation by prepopulating `/etc/locale.gen` This ensures that the list of valid locales is in-place when `debootstrap` starts configuring packages, such as `perl`. * Isolate build from host environment variables The build should not be influenced by things such as `LANG` set in the host; so we disable inheritance of `ENV` by manually calling `setenv()` every time. This unfortunately alters the signature of both the `do` block when calling `debootstrap()` and `chroot()`, but luckily Julia's dynamism makes it easy to work around. Co-authored-by: Dilum Aluthge <[email protected]>
- Loading branch information
1 parent
670bedf
commit 2d03f3a
Showing
7 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build/ | ||
temp/ | ||
tmp/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# Utility functions | ||
getuid() = ccall(:getuid, Cint, ()) | ||
getgid() = ccall(:getgid, Cint, ()) | ||
chroot(rootfs, cmds...; uid=getuid(), gid=getgid()) = run(`sudo chroot --userspec=$(uid):$(gid) $(rootfs) $(cmds)`) | ||
function chroot(rootfs, cmds...; ENV=copy(ENV), uid=getuid(), gid=getgid()) | ||
run(setenv(`sudo chroot --userspec=$(uid):$(gid) $(rootfs) $(cmds)`, ENV)) | ||
end |