Hi,
I’m attempting to port the home-assistant-snap from core20 to core22. It fails on the build stage about a permission denied and I can’t understand why:
2023-08-28 01:37:29.821 :: 🌎 Generated translation files for all integrations
2023-08-28 01:37:29.825 :: + cd /root/parts/homeassistant/build
2023-08-28 01:37:29.825 :: + craftctl default
2023-08-28 01:37:30.270 Executing PosixPath('/root/parts/homeassistant/run/build.sh')
2023-08-28 01:37:30.272 :: + python3.11 -m venv /root/parts/homeassistant/install
2023-08-28 01:37:30.289 :: Error: [Errno 13] Permission denied: '/root/parts/homeassistant/install/bin/python3.11'
2023-08-28 01:37:30.293 :: error: Failed to run the build script for part 'homeassistant'.
It doesn’t seem to be an executable problem:
snapcraft-home-assistant-snap-on-amd64-for-amd64-17738 ../project# ls -l /root/parts/homeassistant/install/bin/python3.11
lrwxrwxrwx 1 root root 54 Aug 27 21:58 /root/parts/homeassistant/install/bin/python3.11 -> ../root/parts/homeassistant/install/usr/bin/python3.11
snapcraft-home-assistant-snap-on-amd64-for-amd64-17738 ../project# ls -l /root/parts/homeassistant/install/usr/bin/python3.11
-rwxr-xr-x 1 root root 6695896 Aug 25 13:19 /root/parts/homeassistant/install/usr/bin/python3.11
I can invoke the /root/parts/homeassistant/install/usr/bin/python3.11 binary directly, and it runs fine. It seems to be something specifically related to creating the venv from the /root/parts/homeassistant/install directory.
snapcraft-home-assistant-snap-on-amd64-for-amd64-17738 ../project# ls -l /root/parts/homeassistant/
total 64
drwxr-xr-x 2 root root 4096 Aug 27 22:14 bin
drwxr-xr-x 14 root root 4096 Aug 28 01:37 build
drwxr-xr-x 3 root root 4096 Aug 27 22:14 include
drwxr-xr-x 9 root root 4096 Mar 24 2022 install
drwxr-xr-x 2 root root 4096 Aug 26 20:26 layer
drwxr-xr-x 4 root root 4096 Aug 27 22:14 lib
lrwxrwxrwx 1 root root 3 Aug 26 21:17 lib64 -> lib
-rw-r--r-- 1 root root 167 Aug 27 22:14 pyvenv.cfg
drwxr-xr-x 2 root root 4096 Aug 26 20:29 run
drwxr-xr-x 13 root root 4096 Aug 27 21:55 src
drwxr-xr-x 2 root root 20480 Aug 27 21:54 stage_packages
drwxr-xr-x 2 root root 4096 Aug 27 21:55 state