Call for testing: Snapcraft 7

Are you logged in? list-keys requires store credentials

Talk about a rookie mistake, that fixed it. Sorry for the noise.

1 Like

Has there been a change on how the hooks should be staged? I have my configure/install hooks as binary executables placed under $SNAPCRAFT_PART_INSTALL/snap/hooks/ during the part’s build (see source). When using snapcraft 7.0.3, the resulting snap doesn’t run the install/configure hooks and snap set fails due to the lack of a configure hook.

Inside the package, the hooks are under snap/hooks as they used to be, but there are no longer any scripts calling them from meta/hooks/configure and meta/hooks/configure .

Package built with snapcraft 7.0.3:

$ tree squashfs-root_7/snap/hooks/
squashfs-root_7/snap/hooks/
β”œβ”€β”€ configure
└── install

0 directories, 2 files
$ tree squashfs-root_7/meta/
squashfs-root_7/meta/
β”œβ”€β”€ gui
β”‚   └── icon.png
└── snap.yaml

1 directory, 2 files

Package built with snapcraft 6:

$ tree squashfs-root_6/snap/hooks/
squashfs-root_6/snap/hooks/
β”œβ”€β”€ configure
└── install

0 directories, 2 files
$ tree squashfs-root_6/meta/
squashfs-root_6/meta/
β”œβ”€β”€ gui
β”‚   └── icon.png
β”œβ”€β”€ hooks
β”‚   β”œβ”€β”€ configure
β”‚   └── install
└── snap.yaml

2 directories, 4 files
$ cat squashfs-root_6/meta/hooks/configure 
#!/bin/sh
PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin${PATH:+:$PATH}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$SNAP/usr/lib:$SNAP/usr/lib/x86_64-linux-gnu"
export LD_LIBRARY_PATH="$SNAP_LIBRARY_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
exec "$SNAP/snap/hooks/configure" "$@"

I still haven’t hooked up login prompts for key related commands

@cmatsuoka, mind looking into this one?

7.0.4 https://github.com/snapcore/snapcraft/releases/tag/7.0.4 is now on latest/stable and 7.x/stable