Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 814380 - sys-apps/portage EAPI 8 --disable-static logic
Summary: sys-apps/portage EAPI 8 --disable-static logic
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 830690 830695 833025 (view as bug list)
Depends on: 882643 883437
Blocks:
  Show dependency tree
 
Reported: 2021-09-22 15:37 UTC by Mike Gilbert
Modified: 2022-12-25 19:39 UTC (History)
7 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 Mike Gilbert gentoo-dev 2021-09-22 15:37:22 UTC
Portage's econf implementation passes "--disable-static" to configure if the configure --help output matches either of these patterns:

> *--disable-static*
> *--enable-static*

This is problematic for packages that define options like "--enable-static-foo", but do not define "--enable-static". For example, net-vpn/tor has these options:

>   --enable-static-openssl link against a static openssl library. Requires
>   --enable-static-libevent
>                           link against a static libevent library. Requires
>   --enable-static-zlib    link against a static zlib library. Requires
>   --enable-static-tor     create an entirely static Tor binary. Requires
>                           Build without support for zstd's "static-only" APIs.

A possible solution would be to update the patterns to look for whitespace or specific special characters at the end. For example:

> *--enable-static[[:space:]=[]*
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-06 17:12:04 UTC
*** Bug 830690 has been marked as a duplicate of this bug. ***
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-07 05:33:42 UTC
*** Bug 830695 has been marked as a duplicate of this bug. ***
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-26 01:16:32 UTC
*** Bug 833025 has been marked as a duplicate of this bug. ***
Comment 4 Larry the Git Cow gentoo-dev 2022-11-30 22:29:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=669b3d757cd287e193c04f910b5ebc8b74ad35b7

commit 669b3d757cd287e193c04f910b5ebc8b74ad35b7
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2022-11-30 11:24:49 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-30 22:28:58 +0000

    Make EAPI 8 `--disable-static` logic libtool-specific
    
    * The intention has always been to only target `configure` scripts that use
      libtool, not just any script with a `--disable-static*` option.
    
    * libtool has been using the same `configure` format for at least
      the past 15 years (going back to libtool 1.5.22):
    
      1. shared and static libraries enabled (the main use case):
           --enable-shared[=PKGS]  build shared libraries [default=yes]
           --enable-static[=PKGS]  build static libraries [default=yes]
    
      2. shared libraries enabled and static libraries disabled:
           --enable-static[=PKGS]  build static libraries [default=no]
           --enable-shared[=PKGS]  build shared libraries [default=yes]
    
      3. shared libraries disabled and static libraries enabled:
           --enable-shared[=PKGS]  build shared libraries [default=no]
           --enable-static[=PKGS]  build static libraries [default=yes]
    
    Bug: https://bugs.gentoo.org/814380
    Signed-off-by: David Seifert <soap@gentoo.org>
    Closes: https://github.com/gentoo/portage/pull/936
    Signed-off-by: Sam James <sam@gentoo.org>

 NEWS                 | 4 ++++
 bin/phase-helpers.sh | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-12-01 05:17:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=457170222d9a1133406b90955269580e4db2ee2b

commit 457170222d9a1133406b90955269580e4db2ee2b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-01 05:16:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-01 05:16:52 +0000

    sys-apps/portage: add 3.0.40
    
    Closes: https://bugs.gentoo.org/814380
    Closes: https://bugs.gentoo.org/850127
    Closes: https://bugs.gentoo.org/881383
    Closes: https://bugs.gentoo.org/883071
    Closes: https://bugs.gentoo.org/883307
    Closes: https://bugs.gentoo.org/883437
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.40.ebuild | 283 +++++++++++++++++++++++++++++++++
 2 files changed, 284 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2022-12-25 19:39:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=52c15d2fc8ccb10b07c9172da69f9de459ee91b7

commit 52c15d2fc8ccb10b07c9172da69f9de459ee91b7
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2022-12-25 19:37:16 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2022-12-25 19:38:55 +0000

    Make EAPI 8 `--disable-static` logic libtool-specific
    
    * The intention has always been to only target `configure` scripts that use
      libtool, not just any script with a `--disable-static*` option.
    
    * libtool has been using the same `configure` format for at least
      the past 15 years (going back to libtool 1.5.22):
    
      1. shared and static libraries enabled (the main use case):
           --enable-shared[=PKGS]  build shared libraries [default=yes]
           --enable-static[=PKGS]  build static libraries [default=yes]
    
      2. shared libraries enabled and static libraries disabled:
           --enable-static[=PKGS]  build static libraries [default=no]
           --enable-shared[=PKGS]  build shared libraries [default=yes]
    
      3. shared libraries disabled and static libraries enabled:
           --enable-shared[=PKGS]  build shared libraries [default=no]
           --enable-static[=PKGS]  build static libraries [default=yes]
    
    Bug: https://bugs.gentoo.org/814380
    Signed-off-by: David Seifert <soap@gentoo.org>
    Closes: https://github.com/pkgcore/pkgcore/pull/386
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 data/lib/pkgcore/ebd/eapi/8/src_configure.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)