Autotools Plugin (v1): Fix fatal crash when running autogen.sh or bootstrap
Metadata
Current evaluation
Merged in commit 8e2cf1a25, converting autogen.sh and bootstrap Path values to strings before shlex quoting. Follow-up #3739 generalized the legacy-plugin fix.
Resolution: closed resolved
Reason: PR #3628 was merged as commit 8e2cf1a25 and fixed direct Path-to-shlex crashes in the Autotools v1 plugin. Because reports showed other legacy plugins still failed, PR #3739 was later merged as e4725e466 to convert all v1 plugin command paths consistently.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The autotools plugin will attempt to run `autogen.sh` or `bootstrap` scripts if they are present in the part's source. However, the internal representation of these scripts is a `Path` object, not a string, so when passed to `shlex` it throws an exception stating that it was expecting a bytes-like object.
Signed-off-by: Dani Llewellyn <dani@bowlhat.net>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in commit 8e2cf1a25, converting autogen.sh and bootstrap Path values to strings before shlex quoting. Follow-up #3739 generalized the legacy-plugin fix. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #3628 (commit 8e2cf1a25), converting autogen.sh/bootstrap Path values to strings before shlex. A broader legacy-plugin fix followed in #3739 (e4725e466). | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix for the Autotools Plugin v1 that resolved a fatal crash when running autogen.sh or bootstrap scripts. Path objects were converted to strings before shlex processing to prevent a TypeError. Approved and merged, though excluded from the v6.1 release. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for a fatal crash in the Autotools Plugin v1 when running autogen.sh or bootstrap. Converts Path objects to strings for shlex, fixing the TypeError. Excluded from the 6.1 release, requiring a master build. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft#3739
(confidence 99%)
Merged follow-up generalized path-to-string conversion across legacy v1 plugins and added regression coverage.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #3398 autotools v2 plugin: support autogen.sh and bootstrap | snapcraft | merged | Merged into master in commit 3fabd01b9, adding autogen.sh and bootstrap script support to the autotools v2 plugin. | |
| #206 Autotools plugin: Set autogen.sh executable. | snapcraft | merged | Merged PR #206 fixed LP #1530995 by making autogen.sh executable when needed and adding Autotools plugin tests (commit 85405240f). | |
| #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. | |
| #208 Backport to 1.x: Autotools plugin: Set autogen.sh executable. | snapcraft | merged | Merged into 1.x: PR #208 backported #206, making the Autotools plugin set autogen.sh executable and adding tests. | |
| #533 autotools plugin: support bootstrap parameters | craft-parts | merged | Merged PR #533 in commit 45cbc684, adding autotools-bootstrap-parameters so the plugin can pass flags to ./bootstrap when generating configure. | |
| #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. | |
| #35 plugins: add autotools plugin | craft-parts | merged | Merged PR #35, adding an Autotools plugin for parts built through the ./configure script; implementation 54b124c8, merge commit 6140b8e6. |