Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 815169 - econf: Ensure proper end of string in configure --help output
Summary: econf: Ensure proper end of string in configure --help output
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Package Manager Specification
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-27 17:38 UTC by Ulrich Müller
Modified: 2023-04-14 13:00 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2021-09-27 17:38:13 UTC
We have learned in bug 814368 that packages can have configure options whose name starts with the same string as one of the options that econf recognises (e.g. --enable-static-openssl instead of --enable-static). This causes false positives in option match.

Let's add something like "The string must not be immediately followed by any of the characters [A-Za-z0-9+_.-]." when matching configure --help output, for all econf options where it applies.
Comment 1 Larry the Git Cow gentoo-dev 2022-11-25 17:59:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/pms.git/commit/?id=e0aa80cc0d28a25bfc68b4671771083e282f6ba2

commit e0aa80cc0d28a25bfc68b4671771083e282f6ba2
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2022-11-19 20:22:34 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2022-11-19 20:22:34 +0000

    pkg-mgr-commands.tex: Update condition for econf --disable-static (again)
    
    The intention is to pass --disable-static, in order to (only) disable
    static libtool archive building. The current condition asks for either
    of --{disable,enable}-static in configure --help output, which causes
    false positives:
    https://archives.gentoo.org/gentoo-portage-dev/message/efc3f424d1dffd3415da538ec25532a9
    
    Therefore, narrow the condition to require both --enable-static and
    --enable-shared. In addition, backport the check for proper end of
    string from the EAPI 9 feature list, but restrict it to this option
    for now.
    
    Bug: https://bugs.gentoo.org/814368
    Bug: https://bugs.gentoo.org/815169
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 pkg-mgr-commands.tex | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2023-04-10 06:33:10 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/pms.git/commit/?id=0e311ca4ac75be6ebea2a0b3c1b46f4daac75190

commit 0e311ca4ac75be6ebea2a0b3c1b46f4daac75190
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-02-26 17:46:29 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-02-27 11:02:43 +0000

    pkg-mgr-commands.tex: econf matches configure --help output better
    
    Following the previous change for --disable-static (commit e0aa80c),
    check for proper end of string for all option names beginning with
    "with", "disable" or "enable". This will mainly affect --with-sysroot,
    where false positives have been observed.
    
    Bug: https://bugs.gentoo.org/815169
    Suggested-by: David Seifert <soap@gentoo.org>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 pkg-mgr-commands.tex | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 3 Ulrich Müller gentoo-dev 2023-04-10 06:42:17 UTC
Fixed retroactively for all option names beginning with "with-", "disable-" or "enable-".