commit:     7cead118afb53b22923e581340d3e0c8d279a5bc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  1 06:38:43 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun  1 06:38:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cead118

net-nds/gssproxy: fix configure w/o systemd

Closes: https://bugs.gentoo.org/848909
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/gssproxy-0.9.0-configure-systemd.patch   | 38 ++++++++++++++++++++++
 net-nds/gssproxy/gssproxy-0.9.0.ebuild             | 22 ++++++++++++-
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/net-nds/gssproxy/files/gssproxy-0.9.0-configure-systemd.patch 
b/net-nds/gssproxy/files/gssproxy-0.9.0-configure-systemd.patch
new file mode 100644
index 000000000000..501fe3896666
--- /dev/null
+++ b/net-nds/gssproxy/files/gssproxy-0.9.0-configure-systemd.patch
@@ -0,0 +1,38 @@
+https://github.com/gssapi/gssproxy/commit/325869a33cb923ab2123ab4179399a37503ed3b5.patch
+https://bugs.gentoo.org/848909
+
+From: Simo Sorce <[email protected]>
+Date: Tue, 31 May 2022 11:09:14 -0400
+Subject: [PATCH] Move some configure checks out of a condition
+
+I was too aggressive in moving all systemd checks, some of them need to
+be performed at all times because there are conditionals ependent on the
+detection.
+
+The actual build for gss-only module is controlled by the BUILD_PROXY
+guard anyway, so the checking unconditionally should not cause any
+change for that configuration even when unused.
+
+Signed-off-by: Simo Sorce <[email protected]>
+--- a/configure.ac
++++ b/configure.ac
+@@ -164,13 +164,13 @@ if test x$only_gss_module != xyes; then
+                          [AC_MSG_ERROR([Could not find libcap headers])])
+     fi
+ 
+-    if test x$initscript = xsystemd; then
+-        WITH_SYSTEMD_UNIT_DIR
+-        WITH_SYSTEMD_USER_UNIT_DIR
+-        AM_CHECK_SYSTEMD
+-    fi
+ fi
+ AM_CONDITIONAL([BUILD_PROXY], [test x$only_gss_module != xyes ])
++if test x$initscript = xsystemd; then
++    WITH_SYSTEMD_UNIT_DIR
++    WITH_SYSTEMD_USER_UNIT_DIR
++fi
++AM_CHECK_SYSTEMD
+ 
+ AC_ARG_ENABLE([always-interpose],
+               [AC_HELP_STRING([--enable-always-interpose],
+

diff --git a/net-nds/gssproxy/gssproxy-0.9.0.ebuild 
b/net-nds/gssproxy/gssproxy-0.9.0.ebuild
index ac3daab25f48..3a9749f43991 100644
--- a/net-nds/gssproxy/gssproxy-0.9.0.ebuild
+++ b/net-nds/gssproxy/gssproxy-0.9.0.ebuild
@@ -3,6 +3,9 @@
 
 EAPI=7
 
+# Can drop after 0.9.0, just for patch
+inherit autotools
+
 DESCRIPTION="Daemon to proxy GSSAPI context establishment and channel handling"
 HOMEPAGE="https://github.com/gssapi/gssproxy";
 SRC_URI="https://github.com/gssapi/${PN}/releases/download/v${PV}/${P}.tar.gz";
@@ -30,6 +33,10 @@ BDEPEND="
 # unfeasible.
 RESTRICT="test"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-configure-systemd.patch
+)
+
 # pkg_setup() {
 #      # Here instead of flag-logic in DEPEND, since virtual/krb5 does not
 #      # allow to specify the openldap use flag, which heimdal doesn't
@@ -55,6 +62,13 @@ RESTRICT="test"
 #              "${S}/tests/testlib.py" || die
 # }
 
+src_prepare() {
+       default
+
+       # Just for 0.9.0 systemd patch
+       eautoreconf
+}
+
 src_configure() {
        local myeconfargs=(
                # The build assumes localstatedir is /var and takes care of
@@ -65,7 +79,13 @@ src_configure() {
                --with-initscript=$(usex systemd systemd none)
                $(use_with selinux)
                $(use_with debug gssidebug)
-               $(use_with hardened hardening)
+
+               # We already set FORTIFY_SOURCE by default along with the
+               # other bits. But setting it on each compile line interferes
+               # with efforts to try e.g. FORTIFY_SOURCE=3. So, disable it,
+               # but there's no actual difference to the safety of the binaries
+               # because of Gentoo's configuration/patches to the toolchain.
+               --without-hardening
        )
 
        econf "${myeconfargs[@]}"

Reply via email to