Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 691712 - net-dns/bind-tools-9.14.4 needs a caps USE flag to compile correctly where caps not supported
Summary: net-dns/bind-tools-9.14.4 needs a caps USE flag to compile correctly where ca...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
: 691870 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-07 18:38 UTC by Kevin Korb
Modified: 2019-08-22 19:22 UTC (History)
4 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 Kevin Korb 2019-08-07 18:38:45 UTC
This package does not have a dependency for sys-libs/libcap but will not compile without it.  While this could be handled by simply adding the dependency I believe it should be part of a USE flag since configure makes it optional and other packages work that way.

The compile failure (during configure phase) is:
checking for sys/capability.h... no
configure: error: sys/capability.h header is required for Linux capabilities support. Either install libcap or use --disable-linux-caps.

I have made the following patch which works for me in either case of the new USE flag:
--- /usr/portage/net-dns/bind-tools/bind-tools-9.14.4.ebuild    2019-08-07 09:02:23.340896953 -0400
+++ bind-tools-9.14.4.ebuild    2019-08-07 13:53:48.872779723 -0400
@@ -17,10 +17,11 @@
 LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
 SLOT="0"
 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc gssapi idn ipv6 libedit libressl readline ssl xml"
+IUSE="caps doc gssapi idn ipv6 libedit libressl readline ssl xml"
 # no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
 
 CDEPEND="
+       caps? ( sys-libs/libcap )
        ssl? (
                !libressl? ( dev-libs/openssl:0= )
                libressl? ( dev-libs/libressl:0= )
@@ -77,6 +78,9 @@
        else
                myeconfargs+=( --without-readline )
        fi
+       if ! use caps ; then
+               myeconfargs+=( --disable-linux-caps )
+       fi
 
        # bug 344029
        append-cflags "-DDIG_SIGCHASE"
Comment 1 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-08-16 22:01:19 UTC
*** Bug 691870 has been marked as a duplicate of this bug. ***
Comment 2 Niklaus 'vimja' Hofer 2019-08-18 18:20:54 UTC
I can confirm this bug. I was getting this error message when trying to emerge net-dns/bind-tools on a system without sys-libs/libcap

configure: error: sys/capability.h header is required for Linux capabilities support. Either install libcap or use --disable-linux-caps.

Installing sys-libs/libcap manually solved the problem.
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-08-18 22:38:09 UTC
[snip]
>  
>  CDEPEND="
> +       caps? ( sys-libs/libcap )
>         ssl? (
>                 !libressl? ( dev-libs/openssl:0= )
>                 libressl? ( dev-libs/libressl:0= )
> @@ -77,6 +78,9 @@
>         else
>                 myeconfargs+=( --without-readline )
>         fi
> +       if ! use caps ; then
> +               myeconfargs+=( --disable-linux-caps )
> +       fi
>  
>         # bug 344029
>         append-cflags "-DDIG_SIGCHASE"


well, the patch is wrong, where caps is not supported you are supposed to disable caps flag, so reverse options logic is just not needed.
Comment 4 Kevin Korb 2019-08-19 00:48:11 UTC
(In reply to Mikle Kolyada from comment #3)
 
> well, the patch is wrong, where caps is not supported you are supposed to
> disable caps flag, so reverse options logic is just not needed.

I don't understand this comment.  There was no caps flag to disable.  That is what the patch adds as well as a conditional dependency.