flatpak-builder icon indicating copy to clipboard operation
flatpak-builder copied to clipboard

[Bug]: flatpak-builder --install fails when executing in an NTFS filesystem

Open KawanWeege opened this issue 3 years ago • 5 comments

Checklist

  • [X] I agree to follow the Code of Conduct that this project adheres to.
  • [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

flatpak-builder version

1.2.2

Flatpak version

1.12.6

How to reproduce

  1. Create a directory inside a NTFS partition
  2. Follow the Building your first Flatpak tutorial, until you reach step 5: Test the build. Attempt to run the command flatpak-builder --user --install --force-clean build-dir org.flatpak.Hello.yml specified in the step.

Expected Behavior

It should build the app normally. Following the rest of the steps should work without any problems.

Actual Behavior

The command will fail with the following error:

Emptying app dir 'build-dir'
Downloading sources
Starting build of org.flatpak.Hello
Cache hit for hello, skipping build
Cache hit for cleanup, skipping
Cache hit for finish, skipping
Everything cached, checking out from cache
Exporting org.flatpak.Hello to repo
Commit: 0c92279def49142521a7c01e8770878b7d72e17bda654fa066122da29ab16dea
Metadata Total: 9
Metadata Written: 2
Content Total: 3
Content Written: 1
Content Bytes Written: 137 (137 bytes)
Installing app/org.flatpak.Hello/x86_64/master
Error: Failed to install org.flatpak.Hello: While pulling app/org.flatpak.Hello/x86_64/master from remote hello-origin: Content object a64ecfbf0ae33ca0f9745c3e8015d1d5793e31afe1758df6ef0c03e2969d1bdc: invalid mode 0100777 with bits 00002
Install failed: Child process exited with code 1

Moving the project folder to an ext4 partition, removing build-dir and .flatpak-builder directories and following the tutorial from step 4 should work.

Additional Information

/etc/fstab for the drive I'm running the build UUID=144241DD4241C3E8 /media/data ntfs defaults,uid=1000,gid=1000,rw,user,exec,umask=000 0 0

Kernel Version: 5.16.13-arch1-1

KawanWeege avatar Mar 09 '22 18:03 KawanWeege

NTFS doesn't preserve permissions, and Flatpak uses libostree, which will fail integrity checks if the permissions are not what they should be. Those are not compatible.

Please use a Unix filesystem to build Flatpak apps.

smcv avatar Mar 09 '22 18:03 smcv

Maybe flatpak-builder could check for a unsupported filesystem and prints a error, that the current filesystem is unsupported and exit instead of crashing later.

JakobDev avatar Mar 16 '22 09:03 JakobDev

Maybe flatpak-builder could check for a unsupported filesystem and prints a error, that the current filesystem is unsupported and exit instead of crashing later.

Yeah, I think that would really help new users to find the problem.

Core447 avatar Feb 11 '24 10:02 Core447