Compiled snap hooks not executed when packaging with Snapcraft 7
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed without resolution. Snapcraft 7.0.3 omitted meta/hooks wrapper scripts for compiled snap hooks, breaking execution. The issue appears abandoned.
Suggested action: —
No scores available.
Issue body
I reported this on the call for testing snapcraft 7 (https://forum.snapcraft.io/t/call-for-testing-snapcraft-7/30201/43). Reporting it here again so that it is not forgotten.
I have my configure and install hooks as binary executables placed under `$SNAPCRAFT_PART_INSTALL/snap/hooks/` during the part's build. 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.
Source code: https://github.com/farshidtz/edgex-device-usb-camera/blob/4df80eefb8af4e7f598d31ac79e90a8636e25008/snap/snapcraft.yaml#L52-L60)
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" "$@"
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft 7.0.3 omitted meta/hooks wrapper scripts for compiled snap hooks, breaking execution. The issue appears abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or fix. The report detailed a Snapcraft 7 regression where compiled snap hooks failed to execute due to missing meta directory wrapper scripts. No comments or follow-up actions were recorded. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. Snapcraft 7 omitted meta/hooks wrappers, preventing compiled hook execution. No fix or superseding PR was merged. Issue abandoned after four years of inactivity. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1973197 snapcraft 7.x not running override-build | snapcraft (launchpad) | closed | snapcraft 7.x failing to execute override-build was closed without a fix or resolution. Zero comments were posted, indicating the report was abandoned. | |
| #1981979 snapcraft 7.0.8+ stopped working on non debian systems | snapcraft (launchpad) | closed | Closed without resolution or comments. The reported apt_pkg error blocking snapcraft 7.0.8+ builds on non-Debian systems remains unfixed and the issue appears abandoned. | |
| #1569041 ERROR: could not find required 'hooks' in manifest | snapcraft (launchpad) | closed | Closed, likely abandoned. The report details a snapcraft-generated snap failing click-review due to a missing 'hooks' field in the manifest. No comments or resolution steps were provided. | |
| #1746403 snapcraft fails to find hooks if ran from snap directory. | snapcraft (launchpad) | open | 2017 report: running snapcraft from the snap/ directory builds without error but omits hooks, causing confusing install failures; proposes enforcing project-root CWD. No maintainer activity in 8+ years; likely obsolete after the core22 rewrite. | |
| #1973173 snapcraft 7.x/edge generates command-chain executables even when all apps and hooks use adapter:none | snapcraft (launchpad) | closed | Abandoned and closed without resolution. The issue reported snapcraft 7.x/edge generates unnecessary command-chain wrappers despite adapter:none configuration. Zero comments and no linked fixes confirm no action was taken. | |
| #3730 Snapcraft/7.0 | snapcraft | closed | Closed without merging. The Snapcraft 7.0 pull request received zero reviews, comments, or CI checks, and was abandoned. | |
| #1742373 Zip packages are not extracted properly with snapcraft 2.35 | snapcraft (launchpad) | closed | Closed without documented resolution. Author provided a code workaround. Likely abandoned or resolved in a later release. |