commit:     cfe91b2bbc8bf7091051fbc1e14937338651e570
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 03:28:30 2018 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Mar  5 23:26:38 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfe91b2b

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 <AT> gentoo.org>

 app-admin/conserver/Manifest                       |   1 +
 app-admin/conserver/conserver-8.2.2.ebuild         | 100 +++++++++++++++++++++
 .../files/conserver-8.2.2-ssl-compat.patch         |  40 +++++++++
 .../files/conserver-8.2.2-time-argument.patch      |  22 +++++
 app-admin/conserver/files/conserver.confd-r1       |   5 ++
 app-admin/conserver/files/conserver.initd-r1       |  14 +++
 app-admin/conserver/metadata.xml                   |   7 ++
 7 files changed, 189 insertions(+)

diff --git a/app-admin/conserver/Manifest b/app-admin/conserver/Manifest
index a6e85102fc3..fdc9c763ec8 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 00000000000..ceb5c721f56
--- /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 00000000000..f3054a9a0da
--- /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 00000000000..0a42987135b
--- /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 <ema...@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 00000000000..119ceb06006
--- /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 00000000000..839aae6825d
--- /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 06b3d82363f..3b1ff77779c 100644
--- a/app-admin/conserver/metadata.xml
+++ b/app-admin/conserver/metadata.xml
@@ -5,6 +5,10 @@
                <email>d...@danweeks.net</email>
                <name>Dan Weeks</name>
        </maintainer>
+       <maintainer type="person">
+               <email>gyakov...@gentoo.org</email>
+               <name>Georgy Yakovlev</name>
+       </maintainer>
        <maintainer type="project">
                <email>proxy-ma...@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>

Reply via email to