net-misc/omnisync: Add new snapshot release
authorBrian Evans <grknight@gentoo.org>
Fri, 15 Jun 2018 01:47:22 +0000 (21:47 -0400)
committerBrian Evans <grknight@gentoo.org>
Fri, 15 Jun 2018 01:47:22 +0000 (21:47 -0400)
This snapshot incorporates Robin Johnson's (robbat2) patches.

A real configuration with cmake now exists.

Also, a move to GnuTLS to fill memory leaks due to improper use of OpenSSL,
and poorly documented on how to call it so a connecting client does not leak.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

net-misc/omnisync/Manifest
net-misc/omnisync/files/omnisync-1.0-openssl11.patch [new file with mode: 0644]
net-misc/omnisync/omnisync-1.0-r1.ebuild
net-misc/omnisync/omnisync-1.0_p20180614.ebuild [new file with mode: 0644]

index 176a959130c5ca0469114e3a3d9a35f52dc3bcd8..cae6a303707e23a4fe26c0cbebe787c366be0bf3 100644 (file)
@@ -1 +1,2 @@
 DIST omnisync-1.0.tgz 27725 BLAKE2B 00e546e3a04c8483f4a3995207fe6715e25526ca639f517220725c31d50d1c01fe0d15927e11e84143f3b2c8aa80ede1317c818945f0249147548bb03d27f744 SHA512 742ffc0a85bd923b99ae7e4f50a6aaa29107eaa987039e902797c78a9673e914e1fa61b2484c6777f62b0caf8b3110a071fd103c8b18456083883df534a1ef4d
+DIST omnisync-1.0_p20180614.tar.bz2 26335 BLAKE2B fbb6e4d39f16e307b5355c1e25c656bfdd3b280888468e64bed692c52af28b35d813e3e5a19c6dd4c13bfa8c64b62f01826bdb8a4a40f358cc665e5050ccfbf1 SHA512 fd21907574abe9801999efa8dae6e19e80198536cd79a1261cd2c006b7beaa3637f5b9da578659baa9e14eca1756fa41551458f14bad44f9636d76634031f262
diff --git a/net-misc/omnisync/files/omnisync-1.0-openssl11.patch b/net-misc/omnisync/files/omnisync-1.0-openssl11.patch
new file mode 100644 (file)
index 0000000..8c0d9c2
--- /dev/null
@@ -0,0 +1,24 @@
+diff -aurN a/mssl.c b/mssl.c
+--- a/mssl.c   2009-01-02 04:03:20.000000000 -0500
++++ b/mssl.c   2018-06-01 20:59:26.447052020 -0400
+@@ -136,14 +136,20 @@
+       if (!bio_err)
+       {
+               SSL_library_init();
++#if OPENSSL_API_COMPAT < 0x10100000L
+               SSL_load_error_strings();
++#endif
+               /* error write context */
+               bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
+       }
+       /* create context */
++#if OPENSSL_API_COMPAT < 0x10100000L
+       meth = SSLv23_method();
++#else
++      meth = TLS_method();
++#endif
+       return SSL_CTX_new(meth);
+ }
index 5875550ac80fc3881ffa547465bec69eb28e71c7..d82752e6f702bc765ab1b88b8263ffff5447a333 100644 (file)
@@ -21,6 +21,7 @@ PATCHES=(
        "${FILESDIR}"/omnisync-1.0-help.patch
        "${FILESDIR}"/omnisync-1.0-maxshm.patch
        "${FILESDIR}"/omnisync-1.0-statfile.patch
+       "${FILESDIR}"/omnisync-1.0-openssl11.patch
 )
 
 src_prepare() {
diff --git a/net-misc/omnisync/omnisync-1.0_p20180614.ebuild b/net-misc/omnisync/omnisync-1.0_p20180614.ebuild
new file mode 100644 (file)
index 0000000..c074a15
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils vcs-snapshot
+
+SNAPSHOT="b3a759af454552f4bbd3b1e097b41bd0d1d7fcf5"
+
+DESCRIPTION="A driver for NTPd for people who are firewall-challenged"
+HOMEPAGE="https://www.vanheusden.com/time/omnisync"
+LICENSE="GPL-2"
+SRC_URI="https://gitlab.com/grknight/omnisync/-/archive/${SNAPSHOT}/omnisync-${SNAPSHOT}.tar.bz2 -> ${P}.tar.bz2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-libs/gnutls:= net-analyzer/net-snmp:="
+DEPEND="${RDEPEND}"
+DOCS=( readme.txt Changes )
+
+src_install() {
+       cmake-utils_src_install
+       newinitd "${FILESDIR%/}/${PN}.initd" ${PN}
+       newconfd "${FILESDIR%/}/${PN}.confd" ${PN}
+       einstalldocs
+}
+
+pkg_postinst() {
+       local isConfigured=$(grep 'OMNISYNC_MODE=""' "${ROOT%/}/etc/conf.d/${PN}")
+       if [[ -n "${isConfigured}" ]] ; then
+               elog "Be sure to configure ${PN} in ${ROOT%/}/etc/conf.d before trying to start the service"
+       fi
+}