Autotools Plugin (v1): Fix fatal crash when running autogen.sh or bootstrap
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to fix a fatal crash in the Autotools Plugin (v1) when Path objects were passed to shlex during autogen.sh or bootstrap execution. The fix was not included in the 6.1 release, with users noting a related PR (#3739) also resolves the issue. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3694 autotools v1 plugin: fix fatal crash when running autogen.sh or bootstrap | snapcraft | closed | Superseded by pull request #3739. The autotools v1 plugin crash fix was closed without merging after three weeks of review inactivity. | |
| #3398 autotools v2 plugin: support autogen.sh and bootstrap | snapcraft | merged | Merged into master. Adds autogen.sh and bootstrap script support to the autotools v2 plugin. Approved by reviewer, passed CI, and maintained coverage. | |
| #3601 autotools v1 plugin: set correct file permissions for scripts (CRAFT-666) | snapcraft | merged | Merged fix for the autotools v1 plugin correcting file permissions on autogen.sh and bootstrap scripts when they lack executable flags. Code was simplified. Approved by one reviewer and passed CI checks. | |
| #533 autotools plugin: support bootstrap parameters | craft-parts | merged | Merged after approval by two reviewers, adding bootstrap parameter support to the autotools plugin. The update modifies four files with 109 additions and 3 deletions, extending build configuration capabilities. | |
| #208 Backport to 1.x: Autotools plugin: Set autogen.sh executable. | snapcraft | merged | Merged backport of #206 to the 1.x branch. The change sets autogen.sh as executable in the Autotools plugin, updating two files with 174 additions and one deletion. |