summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2022-05-14 10:44:59 -0700
committerSam James <sam@gentoo.org>2022-05-15 00:05:31 +0000
commit1843f84e6b30d338ad004baed919ef6313fe0e4f (patch)
tree6f4133ffc4a992a6c81d997eff02d8b57d39114c /app-admin
parentprofiles: mask USE=rdma on mips, rdma-core not keyworded (diff)
downloadgentoo-1843f84e6b30d338ad004baed919ef6313fe0e4f.tar.gz
gentoo-1843f84e6b30d338ad004baed919ef6313fe0e4f.tar.bz2
gentoo-1843f84e6b30d338ad004baed919ef6313fe0e4f.zip
app-admin/radmind: Fix build with cyrus-sasl
When radmind is build while cyrus-sasl is installed on the system the libsnet submodule will enable it and then radmind will fail to compile with undefined refererenes for sasl. This was caused by my earlier patches that accidentally dropped that part in radmind that disabled sasl support during the libsnet configure process. I also added missing dependencies and USE flags. Bug: https://bugs.gentoo.org/844160 Upstream-PR: https://github.com/Radmind/radmind/pull/336 Upstream-PR: https://github.com/voretaq7/radmind/pull/1 Upstream-PR: https://sourceforge.net/p/libsnet/patches/7/ Fixes: https://github.com/gentoo/gentoo/commit/601775bd1dbb2e6f87c8eb39bee18a8964324e22 Signed-off-by: orbea <orbea@riseup.net> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/radmind/files/radmind-1.15.4-autoreconf-libsnet.patch109
-rw-r--r--app-admin/radmind/files/radmind-1.15.4-autoreconf.patch176
-rw-r--r--app-admin/radmind/radmind-1.15.4-r1.ebuild57
3 files changed, 342 insertions, 0 deletions
diff --git a/app-admin/radmind/files/radmind-1.15.4-autoreconf-libsnet.patch b/app-admin/radmind/files/radmind-1.15.4-autoreconf-libsnet.patch
index 211342d0bd83..a33003b33424 100644
--- a/app-admin/radmind/files/radmind-1.15.4-autoreconf-libsnet.patch
+++ b/app-admin/radmind/files/radmind-1.15.4-autoreconf-libsnet.patch
@@ -165,3 +165,112 @@ index 0000000..88a421b
--
2.35.1
+From 4ea29130382b5ae8b9cf3e3dc8962da764f65377 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Fri, 13 May 2022 13:41:49 -0700
+Subject: [PATCH 2/2] Add AC_ARG_ENABLE options for ssl, sasl and zlib
+
+---
+ configure.ac | 83 +++++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 66 insertions(+), 17 deletions(-)
+
+diff --git a/libsnet/configure.ac b/libsnet/configure.ac
+index 83f7e59..9cd16c7 100644
+--- a/libsnet/configure.ac
++++ b/libsnet/configure.ac
+@@ -11,26 +11,75 @@ AC_PROG_AWK
+ AC_PROG_CC
+ AC_PROG_INSTALL
+
+-PKG_CHECK_MODULES([zlib], [zlib],
+- [AC_DEFINE([HAVE_ZLIB], [1], [zlib])],
+- [AC_MSG_WARN(zlib.pc not found, building without zlib support)])
+-AC_SUBST([zlib_LIBS])
+-AC_SUBST([zlib_CFLAGS])
++# Enable features
++AC_ARG_ENABLE([sasl],
++ AS_HELP_STRING([--enable-sasl], [Build with crypto_sasl @<:@default=yes@:>@]),
++ [AS_CASE(${enableval}, [yes], [], [no], [],
++ [AC_MSG_ERROR([bad value '${enableval}' for --enable-sasl])])],
++ [enable_sasl=check])
+
+-# Checks for libraries.
+-if test \! x_$with_ssl = x_no; then
+- PKG_CHECK_MODULES([ssl], [openssl],
+- [AC_DEFINE([HAVE_LIBSSL], [1], [libssl])],
+- [AC_MSG_WARN(openssl.pc not found, building without libssl support)])
+- AC_SUBST([ssl_LIBS])
+- AC_SUBST([ssl_CFLAGS])
+-fi
++AC_ARG_ENABLE([ssl],
++ AS_HELP_STRING([--enable-ssl], [Build with openssl @<:@default=yes@:>@]),
++ [AS_CASE(${enableval}, [yes], [], [no], [],
++ [AC_MSG_ERROR([bad value '${enableval}' for --enable-ssl])])],
++ [enable_ssl=check])
+
+-PKG_CHECK_MODULES([sasl], [libsasl2],
+- [AC_DEFINE([HAVE_LIBSASL], [1], [libsasl])],
+- [AC_MSG_WARN(libsasl2.pc not found, building without libsasl support)])
+-AC_SUBST([sasl_LIBS])
++AC_ARG_ENABLE([zlib],
++ AS_HELP_STRING([--enable-zlib], [Build with zlib @<:@default=yes@:>@]),
++ [AS_CASE(${enableval}, [yes], [], [no], [],
++ [AC_MSG_ERROR([bad value '${enableval}' for --enable-zlib])])],
++ [enable_zlib=check])
++
++# Checks for crypto_sasl.
++AS_IF([test x$enable_sasl != xno],
++ [PKG_CHECK_MODULES([sasl], [libsasl2],
++ [AC_DEFINE([HAVE_LIBSASL], [1], [libsasl])],
++ [AS_IF([test x$enable_sasl != xyes],
++ [AC_MSG_WARN([cannot find libsasl2.pc, disabling libsasl support])],
++ [enable_sasl=error])
++ ])
++ ])
++
++AS_IF([test x$enable_sasl = xerror],
++ [AC_MSG_ERROR([cannot find libsasl2.pc and libsasl support requested])])
++
++AM_CONDITIONAL([ENABLE_LIBSASL], [test x$enable_sasl = xyes])
+ AC_SUBST([sasl_CFLAGS])
++AC_SUBST([sasl_LIBS])
++
++# Checks for openssl.
++AS_IF([test x$enable_ssl != xno],
++ [PKG_CHECK_MODULES([ssl], [openssl],
++ [AC_DEFINE([HAVE_LIBSSL], [1], [libssl])],
++ [AS_IF([test x$enable_ssl != xyes],
++ [AC_MSG_WARN([cannot find openssl.pc, disabling libssl support])],
++ [enable_ssl=error])
++ ])
++ ])
++
++AS_IF([test x$enable_ssl = xerror],
++ [AC_MSG_ERROR([cannot find openssl.pc and libssl support requested])])
++
++AM_CONDITIONAL([ENABLE_LIBSSL], [test x$enable_ssl = xyes])
++AC_SUBST([ssl_CFLAGS])
++AC_SUBST([ssl_LIBS])
++
++# Checks for zlib.
++AS_IF([test x$enable_zlib != xno],
++ [PKG_CHECK_MODULES([zlib], [zlib],
++ [AC_DEFINE([HAVE_ZLIB], [1], [zlib])],
++ [AS_IF([test x$enable_zlib != xyes],
++ [AC_MSG_WARN([cannot find zlib.pc, disabling zlib support])],
++ [enable_zlib=error])
++ ])
++ ])
++
++AS_IF([test x$enable_zlib = xerror],
++ [AC_MSG_ERROR([cannot find zlib.pc and zlib support requested])])
++
++AM_CONDITIONAL([ENABLE_ZLIB], [test x$enable_zlib = xyes])
++AC_SUBST([zlib_CFLAGS])
++AC_SUBST([zlib_LIBS])
+
+ # Checks for header files.
+ #AC_HEADER_STDC
+--
+2.35.1
+
diff --git a/app-admin/radmind/files/radmind-1.15.4-autoreconf.patch b/app-admin/radmind/files/radmind-1.15.4-autoreconf.patch
index f266a386c95b..df983d074709 100644
--- a/app-admin/radmind/files/radmind-1.15.4-autoreconf.patch
+++ b/app-admin/radmind/files/radmind-1.15.4-autoreconf.patch
@@ -217,3 +217,179 @@ index 3bbdabb..8a96de3 100644
# HPUX lacks wait4 and strtoll
AC_CHECK_FUNCS(wait4 strtoll)
+From d31a1c234e7d4f4d630c720024df8bdf911b1de4 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 14 May 2022 03:30:35 -0700
+Subject: [PATCH 5/6] Disable sasl for libsnet
+
+This was previously set in aclocal.m4
+---
+ configure.ac | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8a96de3..60a56fb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -113,7 +113,9 @@ if test x_"$OPTOPTS" = x_; then
+ fi
+ AC_SUBST(OPTOPTS)
+
+-SET_NO_SASL
++ac_configure_args="$ac_configure_args --enable-sasl=no";
++AC_MSG_RESULT([Disabling SASL for libsnet])
++
+ AC_CONFIG_SUBDIRS(libsnet)
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+--
+2.35.1
+
+From 66e0cb1c85e16ff70cf68c27e39ae2ec31487183 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sat, 14 May 2022 09:33:31 -0700
+Subject: [PATCH 6/6] Add AC_ARG_ENABLE options for pam, ssl and zlib
+
+---
+ Makefile.in | 4 +--
+ configure.ac | 89 ++++++++++++++++++++++++++++++++++++++++------------
+ 2 files changed, 71 insertions(+), 22 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index ca01832..b2ef2b6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -39,12 +39,12 @@ INCPATH= @CPPFLAGS@ -I${srcdir}/libsnet -I.
+ OPTOPTS= @OPTOPTS@
+ CC= @CC@
+ DEFS=
+-LIBS= -lsnet @LIBS@ @ssl_LIBS@ @zlib_LIBS@
++LIBS= -lsnet @LIBS@ @pam_LIBS@ @ssl_LIBS@ @zlib_LIBS@
+ LDFLAGS= -Llibsnet/.libs @LDFLAGS@ ${LIBS}
+ INSTALL= @INSTALL@
+
+ CFLAGS= ${DEFS} ${OPTOPTS} ${INCPATH} \
+- @ssl_CFLAGS@ @zlib_CFLAGS@ @CFLAGS@
++ @pam_CFLAGS@ @ssl_CFLAGS@ @zlib_CFLAGS@ @CFLAGS@
+
+ BINTARGETS= fsdiff ktcheck lapply lcksum lcreate lmerge lfdiff repo \
+ twhich lsort
+diff --git a/configure.ac b/configure.ac
+index 60a56fb..8c9b916 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,6 +56,25 @@ CFLAGS="$HOST_CFLAGS -Werror"
+ AC_HEADER_MAJOR
+ CFLAGS="$SAVED_CFLAGS"
+
++# Enable features.
++
++AC_ARG_ENABLE([pam],
++ AS_HELP_STRING([--enable-pam], [Build with pam @<:@default=yes@:>@]),
++ [AS_CASE(${enableval}, [yes], [], [no], [],
++ [AC_MSG_ERROR([bad value '${enableval}' for --enable-pam])])],
++ [enable_pam=check])
++
++AC_ARG_ENABLE([ssl],
++ AS_HELP_STRING([--enable-ssl], [Build with openssl @<:@default=yes@:>@]),
++ [AS_CASE(${enableval}, [yes], [], [no], [],
++ [AC_MSG_ERROR([bad value '${enableval}' for --enable-ssl])])],
++ [enable_ssl=check])
++
++AC_ARG_ENABLE([zlib],
++ AS_HELP_STRING([--enable-zlib], [Build with zlib @<:@default=yes@:>@]),
++ [AS_CASE(${enableval}, [yes], [], [no], [],
++ [AC_MSG_ERROR([bad value '${enableval}' for --enable-zlib])])],
++ [enable_zlib=check])
+
+ # Checks for libraries.
+ AC_CHECK_LIB(c, inet_aton, libc_inet_aton=yes)
+@@ -69,35 +88,65 @@ fi
+ AC_CHECK_LIB(nsl, gethostbyaddr)
+ AC_CHECK_LIB([socket], [socket])
+
+-PKG_CHECK_MODULES([ssl], [openssl],
+- [AC_DEFINE([HAVE_LIBSSL], [1], [libssl])])
+-AC_SUBST([ssl_LIBS])
+-AC_SUBST([ssl_CFLAGS])
++# Checks for pam.
++AS_IF([test x$enable_pam != xno],
++ [PKG_CHECK_MODULES([pam], [pam],
++ [AC_CHECK_HEADERS([pam/pam_appl.h],
++ [], [AC_CHECK_HEADERS([security/pam_appl.h])])]
++ [AC_DEFINE([HAVE_LIBPAM], [1], [libpam])],
++ [AS_IF([test x$enable_pam != xyes],
++ [AC_MSG_WARN([cannot find pam.pc, disabling pam support])],
++ [enable_pam=error])
++ ])
++ ])
++
++AS_IF([test x$enable_pam = xerror],
++ [AC_MSG_ERROR([cannot find pam.pc and pam support requested])])
++
++AM_CONDITIONAL([ENABLE_PAM], [test x$enable_pam = xyes])
++AC_SUBST([pam_CFLAGS])
++AC_SUBST([pam_LIBS])
++
++# Checks for openssl.
++AS_IF([test x$enable_ssl != xno],
++ [PKG_CHECK_MODULES([ssl], [openssl],
++ [AC_DEFINE([HAVE_LIBSSL], [1], [libssl])],
++ [AS_IF([test x$enable_ssl != xyes],
++ [AC_MSG_WARN([cannot find openssl.pc, disabling libssl support])],
++ [enable_ssl=error])
++ ])
++ ])
+
+ AC_CHECK_HEADER([openssl/ssl.h], [], [AC_MSG_ERROR([header file <openssl/ssl.h>
+ is required for this software. You may be running RedHat 9. If so, see the FAQ or the README for further instructions.])])
+ AC_CHECK_LIB([crypto], [X509_VERIFY_PARAM_set_flags], [AC_DEFINE([HAVE_X509_VERIFY_PARAM], [], [X509_verify_param])])
+
+-# PAM
+-AC_ARG_WITH([pam], AC_HELP_STRING([--with-pam=PATH], [Pluggable Authentication Module support (default: /usr)]), [], with_pam=/usr)
+-if test x_"$with_pam" != x_no; then
+- CPPFLAGS="${CPPFLAGS} -I$with_pam/include"
+- AC_CHECK_LIB([pam], [pam_start],
+- [
+- AC_CHECK_HEADERS(pam/pam_appl.h, , [AC_CHECK_HEADERS(security/pam_appl.h)])
+- AC_DEFINE([HAVE_LIBPAM], [], [libpam])
+- LIBS="$LIBS -lpam";
+- ]
+- )
+-fi
++AS_IF([test x$enable_ssl = xerror],
++ [AC_MSG_ERROR([cannot find openssl.pc and libssl support requested])])
++
++AM_CONDITIONAL([ENABLE_LIBSSL], [test x$enable_ssl = xyes])
++AC_SUBST([ssl_CFLAGS])
++AC_SUBST([ssl_LIBS])
++
+ AC_CHECK_HEADER([dns_sd.h], [AC_DEFINE([HAVE_DNSSD], [], [dnssd])])
+ AC_CHECK_LIB(dns_sd, DNSServiceRegister)
+
+-PKG_CHECK_MODULES([zlib], [zlib],
+- [AC_DEFINE([HAVE_ZLIB], [1], [zlib])],
+- [AC_MSG_WARN(zlib.pc not found, building without zlib support)])
+-AC_SUBST([zlib_LIBS])
++# Checks for zlib.
++AS_IF([test x$enable_zlib != xno],
++ [PKG_CHECK_MODULES([zlib], [zlib],
++ [AC_DEFINE([HAVE_ZLIB], [1], [zlib])],
++ [AS_IF([test x$enable_zlib != xyes],
++ [AC_MSG_WARN([cannot find zlib.pc, disabling zlib support])],
++ [enable_zlib=error])
++ ])
++ ])
++
++AS_IF([test x$enable_zlib = xerror],
++ [AC_MSG_ERROR([cannot find zlib.pc and zlib support requested])])
++
++AM_CONDITIONAL([ENABLE_ZLIB], [test x$enable_zlib = xyes])
+ AC_SUBST([zlib_CFLAGS])
++AC_SUBST([zlib_LIBS])
+
+ # HPUX lacks wait4 and strtoll
+ AC_CHECK_FUNCS(wait4 strtoll)
+--
+2.35.1
+
diff --git a/app-admin/radmind/radmind-1.15.4-r1.ebuild b/app-admin/radmind/radmind-1.15.4-r1.ebuild
new file mode 100644
index 000000000000..0f568b6c08d0
--- /dev/null
+++ b/app-admin/radmind/radmind-1.15.4-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Command-line tools and server to remotely administer multiple Unix filesystems"
+HOMEPAGE="https://github.com/Radmind https://sourceforge.net/projects/radmind/"
+SRC_URI="https://github.com/voretaq7/radmind/releases/download/${P}/${P}.tar.gz"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pam zlib"
+
+DEPEND="
+ dev-libs/openssl:0=
+ net-libs/libnsl
+ pam? ( sys-libs/pam )
+ zlib? ( sys-libs/zlib )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.0-gentoo.patch
+ "${FILESDIR}"/${PN}-1.14.1-glibc225.patch
+ # 779664
+ "${FILESDIR}"/${PN}-1.15.4-autoreconf.patch
+ "${FILESDIR}"/${PN}-1.15.4-autoreconf-libsnet.patch
+)
+
+src_prepare() {
+ default
+
+ # We really don't want these
+ # https://github.com/Radmind/radmind/pull/336
+ # https://sourceforge.net/p/libsnet/patches/7/
+ rm -f {,libsnet/}aclocal.m4 || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ $(use_enable pam)
+ $(use_enable zlib)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ keepdir /var/radmind/{cert,client,postapply,preapply}
+}