Skip to content
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

Fix owner group ids #135

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pkgs/bundle-image/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cp "${env["upgrade-maps"]}/recommend-upgrade.json" $root/etc/nixmodules/recommen
cp "${env["active-modules"]}" $root/etc/nixmodules/active-modules.json
cp -a --reflink=auto "${env[registry]}" "$root/etc/nixmodules/modules.json"

diskImage=disk.raw
diskImage=$out/disk.raw

# Compute required space in filesystem blocks
diskUsage=$(find . ! -type d -print0 | du --files0-from=- --apparent-size --block-size "${env[blockSize]}" | cut -f1 | sum_lines)
Expand Down Expand Up @@ -69,8 +69,6 @@ echo "copying to image..."
cptofs -p \
-t ext4 \
-i "$diskImage" \
--owner 11000 --group 11000 \
"$root"/* / ||
(echo >&2 "ERROR: cptofs failed. diskSize might be too small for closure."; exit 1)

echo "moving image to out..."
mv "$diskImage" "$out/disk.raw"
16 changes: 11 additions & 5 deletions pkgs/bundle-image/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@
, jq
, upgrade-maps
, active-modules
,
, fetchFromGitHub
}:

let

label = "nixmodules-${revstring}";

registry = ../../modules.json;

# wating for upstream to include our patch: https://github.com/lkl/linux/pull/532 and https://github.com/lkl/linux/pull/534
lkl' = lkl.overrideAttrs (oldAttrs: {
src = fetchFromGitHub {
owner = "numtide";
repo = "linux-lkl";
rev = "2cbcbd26044f72e47740588cfa21bf0e7b698262";
sha256 = "sha256-i7uc69bF84kkS7MahpgJ2EnWZLNah+Ees2oRGMzIee0=";
};
});
in

derivation {
Expand All @@ -34,7 +40,7 @@ derivation {
PATH = lib.makeBinPath [
coreutils
findutils
lkl
lkl'
e2fsprogs
jq
];
Expand Down