← Back to issue list

autotools plugin failed with env: ‘./bootstrap’: Permission denied

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1621700
Type
issue
State
closed
Author
~elopio
Labels
bitesize plugin
Created
Updated
Closed

Current evaluation

Autotools now ignores a bootstrap directory instead of executing it, fixing the permission-denied failure in canonical/snapcraft#803 via commit eee1b84dd.

Resolution: closed resolved

Reason: PR canonical/snapcraft#803 was merged and commit eee1b84dd changed the plugin so it no longer attempts to run a bootstrap directory as a script.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I was trying to snap erlang, which has a bootstrap directory in the source: https://github.com/erlang/otp/tree/maint/bootstrap So when I run the autotools plugin, it finds that bootstrap exists, and tries to run it. In addition to checking if it exists, the plugin should check if it is a file. To reproduce: $ mkdir /tmp/test $ cd /tmp/test $ snapcraft init Edit the plugin to be autotools, and add: source: . $ mkdir bootstrap $ snapcraft Preparing to pull my-part Pulling my-part Preparing to build my-part Building my-part env NOCONFIGURE=1 ./bootstrap env: ‘./bootstrap’: Permission denied Command '['/bin/sh', '/tmp/tmp285x9r0j', 'env', 'NOCONFIGURE=1', './bootstrap']' returned non-zero exit status 126

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Autotools now ignores a bootstrap directory instead of executing it, fixing the permission-denied failure in canonical/snapcraft#803 via commit eee1b84dd.
stealth/space-bunny-alpha — closed resolved Fixed by snapcore/snapcraft#803, which updated the autotools plugin to avoid executing a bootstrap directory.
stealth/space-bunny-alpha — closed resolved Autotools no longer executes a bootstrap directory as a script; PR canonical/snapcraft#803 fixed the check in commit eee1b84dd.
stealth/space-bunny-alpha — closed resolved Fixed by snapcraft#803 (commit eee1b84dd), which prevents the autotools plugin from executing a bootstrap directory as a script.
qwen/qwen3.6-35b-a3b — — The autotools plugin crashes on a bootstrap directory instead of a file. The report was closed without comments or a fix.
qwen/qwen3.6-35b-a3b — — Abandoned. The autotools plugin failed when a bootstrap directory existed instead of a file. The proposed fix was to verify the bootstrap entry is a file before execution.
qwen/qwen3.6-35b-a3b — — Closed without documented resolution. The autotools plugin fails when ./bootstrap is a directory. The proposed fix adds a file type check before execution.
qwen3.6-35b-a3b-mtp-q6 — — Fixed. The autotools plugin now verifies the bootstrap script is a file before execution, resolving the permission denied error when a bootstrap directory exists.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#803 (confidence 100%)

    Merged fix titled "Do not run the bootstrap directory as a script (autotools plugin)."

Related issues

Issue Project State Summary Similarity
#1882425 autotools plugin should still honour autogen.sh if present snapcraft (launchpad) closed Autotools v2 gained autogen.sh/bootstrap fallback support in canonical/snapcraft#3398, merged as 3fabd01b9 and released before the issue was closed.
75%
#1951645 chmod 777 in autotools plugin snapcraft (launchpad) closed Fixed in snapcore/snapcraft#3601 (commit 08a347754), replacing the autotools v1 plugin's overly broad permissions with correct permissions for scripts.
73%
#3694 autotools v1 plugin: fix fatal crash when running autogen.sh or bootstrap snapcraft closed Closed unmerged as superseded by snapcraft#3739, which merged the broader legacy-plugin Path-to-string fix in commit e4725e466.
73%
#3601 autotools v1 plugin: set correct file permissions for scripts (CRAFT-666) snapcraft merged Merged PR #3601 in commit 43eb836d8, fixing Autotools v1 permissions for non-executable autogen.sh and bootstrap scripts and simplifying the implementation.
71%