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

packages/kata-image: specify correct fs-type in error message #1051

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion packages/by-name/kata/kata-image/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ let
runHook preBuild

# Check if filesystem is ext.*
fstype=$(stat -f -c %T .)
fstype=$(df -T . | awk '{print $2}' | tail -n 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand, the issue with stat is that the superblock magic of ext4 is the same as for ext2 and ext3, so it lacks details to understand the diff and nobody bothered to upgrade the type string (or maybe it needs to stay like that for backwards compatibility). For our purposes, this does not really matter, since all ext* are affected. Could we just replace the $fstype in the error message with a literal ext2/ext3/ext4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just thought that this will be superfluous with #1019 anyways. Closing this one in favor of that.

if [[ $fstye == "ext4" || $fstype == "ext2/ext3" ]]; then
echo "Due to a bug in the image build, kata-image can unfortunately not be built on $fstype filesystems."
echo "As a workaround, you can build the derivation on a different filesystem with the following:"
Expand Down
Loading