Couldn’t use snapcore/action-build to build snap on GitHub with snapcraft 7.0 beta or candidate (reported in action hangs forever with snapcraft beta/7.0 · Issue #37 · snapcore/action-build (github.com)
I found a bug either in snapcraft 7 or in the documentation: Cannot use adapter: none with snapcraft 7.0.1 and base: core22
@mchinoune, thanks for finding this. core22
is including the dependencies of libpng16-16
, which is causing some directory conflicts. I’m not aware of any workaround right now, let me get back to you with a solution.
@zyga, good catch, thanks. It’s not clear in the migration guide or documentation that adapter
has been deprecated for core22
.
Are adapters entirely gone now? Is there a way to do something similar?
The adapter:
key and the runner script are gone (and should have left some kind of explanatory message), but the functionality is still there. The migration guide should cover the details on how to override the variables.
I have removed that dependency as a workaround (since gl2ps is just a part, and libpng16-16 is already a dependency of the app), but still get the same error.
Note that I start getting this message when building gl2ps that I don’t see with snapcraft 6.1:
fix symlink: path='/home/runner/work/makhber/makhber/parts/gl2ps/install/lib64/ld-linux-x86-64.so.2', unpack_dir='/home/runner/work/makhber/makhber/parts/gl2ps/install', root='/home/runner/work/makhber/makhber/parts/gl2ps/install/lib64'
A workaround is to not install pyqt5-sip using python plugin
pyqt5-sip:
source: .
plugin: make
build-packages:
- python3-pip
override-build: |
pip3 install pyqt5-sip --target=$CRAFT_PART_INSTALL/usr/lib/python3.10/site-packages
This is a debug message from the parts processing library and shouldn’t appear to Snapcraft users in non-debug modes (@facundobatista, I believe this is another issue to address in craft-cli).
Another issue: It seems like snapcraft no longer check and warn about missing runtime libraries.
7.0.2 on candidate should address this issue
Do you mind trying 7.0.2 in candidate now?
7.0.2 now in candidate should address this issue
You are spot on and I missed this in the release notes, we are working on a snapcraft lint
command to address all these warnings and errors.
7.0.2 is giving me errors while building the core22 snap using https://github.com/snapcore/core-base/pull/45 :
$ snapcraft
Launching instance...
Installed package repositories
Executed: pull probert-deb
Executed: pull consoleconf-deb
/root/project/parts/bootstrap/install/var/cache/apt/archives/lock: Permission denied
Full execution log: '/tmp/snapcraft.log'
Failed to execute pack in instance.
Full execution log: '/home/abeato/.cache/snapcraft/log/snapcraft-20220531-112755.736487.log'
Successive builds now work flawlessly on 7.0.2 with no shutil.SameFileError
issues. Thanks!
This seems to be caused by extra files in the project directory that shouldn’t be there (maybe leftovers from a previous execution in destructive mode?). Note that inside the container our work directory is /root/part
instead of /root/project/part
– the latter is considered part of the project. To solve this, remove directories parts
, stage
, prime
from the project directory, run snapcraft clean
to start from a well-defined state and pack again.
I managed to build our uc22 version of the network-manager snap with snapcraft 7.0.2 after making the suggested changes (https://git.launchpad.net/~awe/snappy-hwe-snaps/+git/network-manager/log/?h=snap-22-craft7x). The only thing I ran into that wasn’t mentioned in the migration guide was the removal of filesets
, which I just replaced with prime filtering.
Maybe I’m misunderstanding the migration guide? A command-chain
allowed for more than just control over the app’s environment. In the past I’ve used it for running snapcraft_preload
, providing a wrapper script that dynamically sets env vars for a number of apps based on snap configuration, or using setpriv
from a script to run postgresql as the snap_daemon user (these are all examples from the edgexfoundry snap).
Are any of these use cases still possible?