summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2018-11-10 19:28:30 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2019-03-05 15:26:38 -0800
commitcfe91b2bbc8bf7091051fbc1e14937338651e570 (patch)
treeb4fb9681e97c62bcffcbc06c87be8f7c18653b9b /app-admin/conserver
parentprofiles: base-mask/arch-unmask freeipmi flag for conserver (diff)
downloadgentoo-cfe91b2bbc8bf7091051fbc1e14937338651e570.tar.gz
gentoo-cfe91b2bbc8bf7091051fbc1e14937338651e570.tar.bz2
gentoo-cfe91b2bbc8bf7091051fbc1e14937338651e570.zip
app-admin/conserver: version bump to 8.2.2
Bump EAPI to 6 Added freeipmi useflag modernized ebuild and initsripts Bug: https://bugs.gentoo.org/674420 Closes: https://bugs.gentoo.org/488312 Package-Manager: Portage-2.3.51, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-admin/conserver')
-rw-r--r--app-admin/conserver/Manifest1
-rw-r--r--app-admin/conserver/conserver-8.2.2.ebuild100
-rw-r--r--app-admin/conserver/files/conserver-8.2.2-ssl-compat.patch40
-rw-r--r--app-admin/conserver/files/conserver-8.2.2-time-argument.patch22
-rw-r--r--app-admin/conserver/files/conserver.confd-r15
-rw-r--r--app-admin/conserver/files/conserver.initd-r114
-rw-r--r--app-admin/conserver/metadata.xml7
7 files changed, 189 insertions, 0 deletions
diff --git a/app-admin/conserver/Manifest b/app-admin/conserver/Manifest
index a6e85102fc3c..fdc9c763ec88 100644
--- a/app-admin/conserver/Manifest
+++ b/app-admin/conserver/Manifest
@@ -1 +1,2 @@
DIST conserver-8.1.18.tar.gz 323247 BLAKE2B 48176ba8be648df16ddb18c1a760af8069f7d926d2e0767e3b7ef903276d6104cfa9464a6ebdce009720fe5118862d89cf5371e104d17b967e11fe8e8968e8f9 SHA512 a8029aef5fd84f93eb3ae56ba7f751d79a6065c012bfd805e050f8c9edf09fd660c272d3f3ce0a47cfb17678574babbecad63f8bfd50ad4fdccdbabc2249435f
+DIST conserver-8.2.2.tar.gz 329048 BLAKE2B 0148a5b5b11fcc75a071b9759e129a94f1fe623df35e7549e967d0037ddb378447623070ce43429daf4868308be150f5ba318354e3181d94ccb1199655231373 SHA512 7c59dc59e59e3ee0172b2a52214cd8dd83383168fe0f145870d128b900a012cfa38c2f1ae85769c226d941ca1a764f93ec3bf353da896537ae1be5b6bc17e6c6
diff --git a/app-admin/conserver/conserver-8.2.2.ebuild b/app-admin/conserver/conserver-8.2.2.ebuild
new file mode 100644
index 000000000000..ceb5c721f569
--- /dev/null
+++ b/app-admin/conserver/conserver-8.2.2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools pam ssl-cert
+
+DESCRIPTION="Serial Console Manager"
+HOMEPAGE="https://www.conserver.com"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="BSD BSD-with-attribution"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug ipv6 freeipmi kerberos libressl pam ssl test tcpd"
+
+DEPEND="debug? ( dev-libs/dmalloc:= )
+ freeipmi? ( sys-libs/freeipmi:= )
+ kerberos? (
+ virtual/krb5
+ net-libs/libgssglue
+ )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ pam? ( virtual/pam )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+RDEPEND="${DEPEND}
+ pam? ( sys-auth/pambase )"
+
+DOCS=( CHANGES FAQ PROTOCOL README conserver/Sun-serial contrib/maketestcerts)
+
+PATCHES=(
+ "${FILESDIR}/${P}-time-argument.patch"
+ "${FILESDIR}/${P}-ssl-compat.patch"
+)
+
+src_prepare() {
+ default
+ sed -e '/^INSTALL_PROGRAM/s:-s::' \
+ -i {console,conserver,autologin,contrib/chat}/Makefile.in || die
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ $(use_with debug dmalloc)
+ $(use_with ipv6)
+ $(use_with freeipmi)
+ $(use_with kerberos gssapi)
+ $(use_with ssl openssl)
+ $(use_with pam)
+ $(use_with tcpd libwrap)
+ --with-cffile=conserver/conserver.cf
+ --with-logfile=/var/log/conserver.log
+ --with-master=localhost
+ --with-pidfile=/run/conserver.pid
+ --with-port=7782
+ --with-pwdfile=conserver/conserver.passwd
+ )
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" exampledir="/usr/share/doc/${PF}/examples" install
+
+ keepdir /var/consoles
+ fowners daemon:daemon /var/consoles
+ fperms 700 /var/consoles
+
+ newinitd "${FILESDIR}"/conserver.initd-r1 conserver
+ newconfd "${FILESDIR}"/conserver.confd-r1 conserver
+
+ dodir /etc/conserver
+ fperms 700 /etc/conserver
+ insinto /etc/conserver
+ newins "${S}"/conserver.cf/conserver.cf conserver.cf.sample
+ newins "${S}"/conserver.cf/conserver.passwd conserver.passwd.sample
+
+ einstalldocs
+ docinto examples
+ dodoc -r conserver.cf/samples/.
+
+ newpamd "${FILESDIR}"/conserver.pam-pambase conserver
+}
+
+src_test() {
+ # hangs without -j1
+ emake -j1 test
+}
+
+pkg_postinst() {
+ if use ssl; then
+ if [[ ! -f "${EROOT}"/etc/ssl/conserver/conserver.key ]]; then
+ install_cert /etc/ssl/conserver/conserver
+ fi
+ fi
+}
diff --git a/app-admin/conserver/files/conserver-8.2.2-ssl-compat.patch b/app-admin/conserver/files/conserver-8.2.2-ssl-compat.patch
new file mode 100644
index 000000000000..f3054a9a0dac
--- /dev/null
+++ b/app-admin/conserver/files/conserver-8.2.2-ssl-compat.patch
@@ -0,0 +1,40 @@
+diff --git a/configure.in b/configure.in
+index a060811..00b7f8b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -535,7 +535,7 @@ AC_ARG_WITH(openssl,
+ [LIBS="$LIBS -lssl -lcrypto"
+ AC_MSG_CHECKING(for openssl libraries -lssl and -lcrypto)
+ AC_TRY_LINK([#include <openssl/ssl.h>
+- ],[SSL_library_init()],
++ ],[SSL_CTX_new(NULL)],
+ [AC_MSG_RESULT(yes)
+ cons_with_openssl="YES"
+ AC_DEFINE(HAVE_OPENSSL)
+diff --git a/conserver/cutil.c b/conserver/cutil.c
+index af8196c..dcfe333 100644
+--- a/conserver/cutil.c
++++ b/conserver/cutil.c
+@@ -57,7 +57,9 @@ Bye(int status)
+ {
+ DestroyDataStructures();
+ #if HAVE_OPENSSL
++# if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_free_strings();
++# endif
+ #endif
+ exit(status);
+ }
+diff --git a/conserver/cutil.h b/conserver/cutil.h
+index 899da7a..63aef65 100644
+--- a/conserver/cutil.h
++++ b/conserver/cutil.h
+@@ -7,6 +7,8 @@
+ #include <stdarg.h>
+ #if HAVE_OPENSSL
+ # include <openssl/ssl.h>
++# include <openssl/bn.h>
++# include <openssl/dh.h>
+ # include <openssl/err.h>
+ # if OPENSSL_VERSION_NUMBER < 0x10100000L
+ # define TLS_method SSLv23_method
diff --git a/app-admin/conserver/files/conserver-8.2.2-time-argument.patch b/app-admin/conserver/files/conserver-8.2.2-time-argument.patch
new file mode 100644
index 000000000000..0a42987135b1
--- /dev/null
+++ b/app-admin/conserver/files/conserver-8.2.2-time-argument.patch
@@ -0,0 +1,22 @@
+From 3d9d5509c90524256861dd7cf0b7c0c6fdf5424a Mon Sep 17 00:00:00 2001
+From: Ed Maste <emaste@freebsd.org>
+Date: Wed, 10 Oct 2018 12:56:26 -0400
+Subject: [PATCH] Correct argument type passed to time()
+
+---
+ conserver/readcfg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/conserver/readcfg.c b/conserver/readcfg.c
+index 949b9bf..d5bb90a 100644
+--- a/conserver/readcfg.c
++++ b/conserver/readcfg.c
+@@ -3116,7 +3116,7 @@ ConsoleAdd(CONSENT *c)
+ pCEmatch->logfilemax = c->logfilemax;
+ if (pCEmatch->logfilemax != (off_t) 0 &&
+ timers[T_ROLL] == (time_t)0)
+- timers[T_ROLL] = time((time_t)0);
++ timers[T_ROLL] = time((time_t *)0);
+
+ SwapStr(&pCEmatch->motd, &c->motd);
+ SwapStr(&pCEmatch->idlestring, &c->idlestring);
diff --git a/app-admin/conserver/files/conserver.confd-r1 b/app-admin/conserver/files/conserver.confd-r1
new file mode 100644
index 000000000000..119ceb060063
--- /dev/null
+++ b/app-admin/conserver/files/conserver.confd-r1
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/conserver
+# check CONSERVER(8) for details
+
+#CONSERVER_LOG="/var/log/conserver.log"
+#CONSERVER_OPTS=""
diff --git a/app-admin/conserver/files/conserver.initd-r1 b/app-admin/conserver/files/conserver.initd-r1
new file mode 100644
index 000000000000..839aae6825df
--- /dev/null
+++ b/app-admin/conserver/files/conserver.initd-r1
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need clock localmount
+ use net
+}
+
+command="/usr/sbin/conserver"
+command_args="-d -L ${CONSERVER_LOG:-/var/log/${RC_SVCNAME}.log} ${CONSERVER_OPTS}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
+required_files="/etc/conserver/${RC_SVCNAME}.cf /etc/conserver/${RC_SVCNAME}.passwd"
diff --git a/app-admin/conserver/metadata.xml b/app-admin/conserver/metadata.xml
index 06b3d82363fe..3b1ff77779ce 100644
--- a/app-admin/conserver/metadata.xml
+++ b/app-admin/conserver/metadata.xml
@@ -5,6 +5,10 @@
<email>dan@danweeks.net</email>
<name>Dan Weeks</name>
</maintainer>
+ <maintainer type="person">
+ <email>gyakovlev@gentoo.org</email>
+ <name>Georgy Yakovlev</name>
+ </maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
@@ -22,4 +26,7 @@
that, assuming you have a network connection, you can interact with any
of the equipment from home or wherever.
</longdescription>
+ <use>
+ <flag name="freeipmi">Compile in FreeIPMI support via sys-libs/freeipmi</flag>
+ </use>
</pkgmetadata>