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

bmaptool does not work on ecryptfs #22

Open
gschwaer opened this issue Apr 24, 2024 · 0 comments
Open

bmaptool does not work on ecryptfs #22

gschwaer opened this issue Apr 24, 2024 · 0 comments

Comments

@gschwaer
Copy link

Hi,

My home partition is encrypted with ecryptfs

$ mount | grep /home
/home/.ecryptfs/gschwaer/.Private on /home/gschwaer type ecryptfs (rw,nosuid,nodev,relatime,ecryptfs_fnek_sig=1234567890123456,ecryptfs_sig=1234567890123456,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs)

When I try to run bmaptool like so:

cd ~/.tmp
git clone [email protected]:yoctoproject/bmaptool.git
cd bmaptool
python3.9 -m venv .venv
source .venv/bin/activate
pip install .[dev]
bmaptool create README.md

I get the following error:

bmaptool create README.md 
bmaptool: ERROR: An error occurred, here is the traceback:
Traceback (most recent call last):
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 412, in _invoke_fiemap
    fcntl.ioctl(self._f_image, _FIEMAP_IOCTL, self._buf, 1)
OSError: [Errno 95] Operation not supported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 568, in filemap
    return FilemapFiemap(image)
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 376, in __init__
    self.block_is_mapped(0)
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 437, in block_is_mapped
    struct_fiemap = self._invoke_fiemap(block, 1)
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 422, in _invoke_fiemap
    raise ErrorNotSupp(errstr)
bmaptool.Filemap.ErrorNotSupp: FilemapFiemap: the FIEMAP ioctl is not supported by the file-system

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/BmapCreate.py", line 177, in __init__
    self.filemap = Filemap.filemap(self._f_image)
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 570, in filemap
    return FilemapSeek(image)
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 216, in __init__
    self._probe_seek_hole()
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/Filemap.py", line 253, in _probe_seek_hole
    raise ErrorNotSupp(
bmaptool.Filemap.ErrorNotSupp: the file-system does not support "SEEK_HOLE" and "SEEK_DATA" but only provides a stub implementation

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/CLI.py", line 640, in create_command
    creator = BmapCreate.BmapCreate(args.image, output, "sha256")
  File "/home/gschwaer/.tmp/bmaptool/.venv/lib/python3.9/site-packages/bmaptool/BmapCreate.py", line 179, in __init__
    raise Error(

bmaptool: ERROR: cannot generate bmap for file 'README.md': the file-system does not support "SEEK_HOLE" and "SEEK_DATA" but only provides a stub implementation

Is this expected behavior? Or is it an issue with my ecryptfs setup?

Versions:

  • bmaptool: main
  • uname -orm: 5.15.0-102-generic x86_64 GNU/Linux
  • ecryptfs: (builtin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant