hooks should be made executable instead of erroring out
Metadata
Current evaluation
Fixed by merged PR snapcore/snapcraft#2440 (commit c2f5a0dc0), which packages recognized hooks as executable instead of rejecting non-executable source files.
Resolution: closed resolved
Reason: PR snapcore/snapcraft#2440 implemented the requested behavior and was merged as commit c2f5a0dc0, setting known hook files executable during packaging.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Related to bug #1792078 in some way.
snapcraft today complains if a hook isn't executable. It should just make it executable instead.
PR up here: https://github.com/snapcore/snapcraft/pull/2440
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR snapcore/snapcraft#2440 (commit c2f5a0dc0), which packages recognized hooks as executable instead of rejecting non-executable source files. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2440 (commit c2f5a0dc0) so Snapcraft makes recognized hooks executable; PR #2441 cherry-picked the fix to legacy. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #2440 (c2f5a0dc0): Snapcraft now makes hooks executable instead of rejecting missing executable permissions; #2441 cherry-picked it to legacy. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2440 (c2f5a0dc0), making hooks executable instead of erroring over missing permissions; #2441 cherry-picked the fix to legacy. | |
| qwen/qwen3.6-35b-a3b | — | — | Automatic executable permission for hooks was implemented via merged pull request #2440. Snapcraft now sets hook permissions automatically instead of raising an error. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after merging PR #2440. Snapcraft now automatically applies the executable permission to hooks instead of failing with an error. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after merging PR #2440. Snapcraft now automatically applies executable permissions to hooks instead of raising an error. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | snapcraft automatically sets hooks as executable instead of throwing an error. The fix was merged via PR #2440, resolving the issue. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#2440
(confidence 100%)
Merged PR whose title describes the exact resolution; it was committed as c2f5a0dc0.
-
Related To:
snapcraft (launchpad)#1792078
(confidence 90%)
The issue explicitly identified Launchpad bug #1792078 as related.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2440 meta: make hooks executable instead of complaining they're not | snapcraft | merged | PR #2440 by Saviq merged to master as commit c2f5a0dc0: snapcraft's meta no longer errors on non-executable hook scripts and instead chmods them +x. Fixes Launchpad bug #1812003. | |
| #1816555 snapcraft traceback stat-ing symlink trying to enforce exec | snapcraft (launchpad) | closed | Fixed executable-bit handling for symlinked hooks in merged PR snapcore/snapcraft#2478, commit 496ebba10; PR #2481 was also linked. | |
| #1980089 Compiled snap hooks not executed when packaging with Snapcraft 7 | snapcraft (launchpad) | closed | Compiled snap hooks are supported again by merged PR snapcore/snapcraft#3837 (commit c77e3a07a), which processes generated hooks and restores the expected meta/hooks entries. | |
| #1026 Add support for hooks. | snapcraft | merged | PR #1026 merged as commit 01880ee8d ('core: add support for hooks'), adding hook support: executables in snap/hooks/ are copied into the snap, and parts can install hooks into snap/hooks/. Docs followed in #1042 (10c58b652). | |
| #2441 legacy/meta: make hooks executable instead of complaining they're not | snapcraft | merged | Merged into legacy in #2441, cherry-picking #2440 (c2f5a0dc0), so hook files are made executable instead of causing a permissions error; fixes Launchpad bug #1812003. | |
| #6433 Generated hooks are not included in the Snap | snapcraft | closed | Generated part hooks now replace stubs correctly; commit 271462658 prevents premature stub creation and was targeted for Snapcraft 9.1.3. | |
| #3837 fix: hooks: process generated hooks | snapcraft | merged | Merged as commit c77e3a07a (CRAFT-1159): core22 now includes lifecycle-generated hooks in the snap via meta/hooks wrappers, with snap/hooks taking priority; adds spread tests for core18/20/22. | |
| #3659 meta: add support for hooks | snapcraft | merged | Merged snapcraft#3659 via commit 00eed7dc9 (merge 795294fd5) into snapcraft/7.0, adding hooks support in snapcraft.yaml for CRAFT-808. | |
| #1586465 Add support for hooks | snapcraft (launchpad) | closed | Hook support was added in snapcore/snapcraft#1026 via commit 01880ee8d, packaging hook files and snapcraft.yaml hook definitions. | |
| #1824255 snapcraft should use command-chain for hooks | snapcraft (launchpad) | closed | Fixed hook environment setup in merged #2897 (bfac28cea) by embedding the generated snap environment in hook wrappers; released in Snapcraft 3.10. |