Skip to content

autotools: improve version detection and add download from alpha URLs#24

Draft
dimakuv wants to merge 1 commit intomainfrom
dimakuv/autotools-version-better-match-and-alpha-download
Draft

autotools: improve version detection and add download from alpha URLs#24
dimakuv wants to merge 1 commit intomainfrom
dimakuv/autotools-version-better-match-and-alpha-download

Conversation

@dimakuv
Copy link
Contributor

@dimakuv dimakuv commented Oct 17, 2025

This commit adds two improvements to Autotools matching:

  • Flexible version detection: Replaces restrictive numeric-only regex patterns (\d+(?:\.\d+)*) with flexible patterns (\S+). This enables detection of complex version formats like git-based versions (2.4.6.42-b88ce-dirty) and alpha/beta versions (1.16b).

  • Downloads from alpha-version URLs: some source archives (tarballs) are built with alpha/beta versions of Autotools. These versions of Autotools are hosted on a separate website, so we need to add this fallback URL to download those archives too.

As a consequence, we validated the sudo package in Amazon Linux 2023 with a tarball sudo-1.9.15p5.tar.gz uses Autoconf 2.72c from the alpha-version URL. This Autoconf version required additional packages to be installed: hostname and perl-Time-HiRes. Thus, we updated the misc/ Dockerfiles.

The current Autotools matching logic still cannot do two things:

  • Download and install git-based versions, and
  • Apply downstream patches (other than an ad-hoc runstatedir backport in Autoconf 2.69).

These will be fixed in follow-up commits.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This commit adds two improvements to Autotools matching:

- Flexible version detection: Replaces restrictive numeric-only regex
  patterns (`\d+(?:\.\d+)*`) with flexible patterns (`\S+`). This
  enables detection of complex version formats like git-based versions
  (2.4.6.42-b88ce-dirty) and alpha/beta versions (1.16b).

- Downloads from alpha-version URLs: some source archives (tarballs) are
  built with alpha/beta versions of Autotools. These versions of
  Autotools are hosted on a separate website, so we need to add this
  fallback URL to download those archives too.

As a consequence, we validated the sudo package in Amazon Linux 2023
with a tarball sudo-1.9.15p5.tar.gz uses Autoconf 2.72c from the
alpha-version URL. This Autoconf version required additional packages to
be installed: hostname and perl-Time-HiRes. Thus, we updated the misc/
Dockerfiles.

The current Autotools matching logic still cannot do two things:
- Download and install git-based versions, and
- Apply downstream patches (other than an ad-hoc `runstatedir` backport
  in Autoconf 2.69).

These will be fixed in follow-up commits.

Signed-off-by: Dmitrii Kuvaiskii <dimakuv@amazon.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant