[gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/

2022-08-24 Thread Louis Sautier
commit: c1be114570a325d593fcc30c72e197e7fa015c52
Author: Louis Sautier  gentoo  org>
AuthorDate: Wed Aug 24 10:35:25 2022 +
Commit: Louis Sautier  gentoo  org>
CommitDate: Wed Aug 24 10:39:32 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1be1145

net-nntp/nzbget: fix build with OpenSSL 3, bump to EAPI 8

Closes: https://bugs.gentoo.org/805896
Signed-off-by: Louis Sautier  gentoo.org>

 net-nntp/nzbget/files/nzbget-21.1-openssl-3.patch |  28 +
 net-nntp/nzbget/nzbget-21.1-r2.ebuild | 118 ++
 2 files changed, 146 insertions(+)

diff --git a/net-nntp/nzbget/files/nzbget-21.1-openssl-3.patch 
b/net-nntp/nzbget/files/nzbget-21.1-openssl-3.patch
new file mode 100644
index ..d1d89e9260c0
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget-21.1-openssl-3.patch
@@ -0,0 +1,28 @@
+From f76e804e3af4cf8dd4a8c8e374b3ca025099 Mon Sep 17 00:00:00 2001
+From: Simon Chopin 
+Date: Tue, 7 Dec 2021 13:23:21 +0100
+Subject: [PATCH] daemon:connect: don't use FIPS_mode_set with OpenSSL 3
+
+This function has been removed in OpenSSL 3, replaced by
+EVP_default_properties_enable_fips. See
+https://www.openssl.org/docs/man3.0/man7/migration_guide.html
+---
+ daemon/connect/TlsSocket.cpp | 4 
+ 1 file changed, 4 insertions(+)
+
+diff --git a/daemon/connect/TlsSocket.cpp b/daemon/connect/TlsSocket.cpp
+index 544bf6850..831da0dc0 100644
+--- a/daemon/connect/TlsSocket.cpp
 b/daemon/connect/TlsSocket.cpp
+@@ -189,7 +189,11 @@ void TlsSocket::Final()
+ 
+ #ifdef HAVE_OPENSSL
+ #ifndef LIBRESSL_VERSION_NUMBER
++#if OPENSSL_VERSION_NUMBER < 0x3000L
+   FIPS_mode_set(0);
++#else
++  EVP_default_properties_enable_fips(NULL, 0);
++#endif
+ #endif
+ #ifdef NEED_CRYPTO_LOCKING
+   CRYPTO_set_locking_callback(nullptr);

diff --git a/net-nntp/nzbget/nzbget-21.1-r2.ebuild 
b/net-nntp/nzbget/nzbget-21.1-r2.ebuild
new file mode 100644
index ..a7d5afecaf9a
--- /dev/null
+++ b/net-nntp/nzbget/nzbget-21.1-r2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd
+
+MY_PV=${PV/_pre/-r}
+MY_P=${PN}-${PV/_pre/-testing-r}
+
+DESCRIPTION="A command-line based binary newsgrabber supporting .nzb files"
+HOMEPAGE="https://nzbget.net/;
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}-src.tar.gz
 -> ${P}.tar.gz"
+S=${WORKDIR}/${PN}-${PV/_pre*/-testing}
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="debug gnutls ncurses +parcheck ssl test zlib"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+   dev-libs/libxml2:=
+   ncurses? ( sys-libs/ncurses:0= )
+   ssl? (
+   gnutls? (
+   net-libs/gnutls:=
+   dev-libs/nettle:=
+   )
+   !gnutls? ( dev-libs/openssl:0=[-bindist(-)] )
+   )
+   zlib? ( sys-libs/zlib:= )"
+RDEPEND="
+   ${DEPEND}
+   acct-user/nzbget
+   acct-group/nzbget
+"
+BDEPEND="
+   test? (
+   || (
+   app-arch/rar
+   app-arch/unrar
+   )
+   )
+   virtual/pkgconfig
+"
+
+DOCS=( ChangeLog README nzbget.conf )
+
+PATCHES=(
+   # https://bugs.gentoo.org/805896
+   # https://github.com/nzbget/nzbget/pull/793
+   "${FILESDIR}/${P}-openssl-3.patch"
+)
+
+src_prepare() {
+   default
+   eautoreconf
+
+   sed -i 's:^ScriptDir=.*:ScriptDir=/usr/share/nzbget/ppscripts:' 
nzbget.conf || die
+
+   sed \
+   -e 's:^MainDir=.*:MainDir=/var/lib/nzbget:' \
+   -e 's:^LogFile=.*:LogFile=/var/log/nzbget/nzbget.log:' \
+   -e 's:^WebDir=.*:WebDir=/usr/share/nzbget/webui:' \
+   -e 
's:^ConfigTemplate=.*:ConfigTemplate=/usr/share/nzbget/nzbget.conf:' \
+   -e 's:^DaemonUsername=.*:DaemonUsername=nzbget:' \
+   nzbget.conf > nzbgetd.conf || die
+}
+
+src_configure() {
+   local myconf=(
+   $(use_enable debug)
+   $(use_enable ncurses curses)
+   $(use_enable parcheck)
+   $(use_enable ssl tls)
+   $(use_enable zlib gzip)
+   $(use_enable test tests)
+   --with-tlslib=$(usex gnutls GnuTLS OpenSSL)
+   )
+   econf "${myconf[@]}"
+}
+
+src_test() {
+   ./nzbget --tests || die "Tests failed"
+}
+
+src_install() {
+   default
+
+   insinto /etc
+   doins nzbget.conf
+   doins nzbgetd.conf
+
+   keepdir /var/log/nzbget
+
+   newinitd "${FILESDIR}"/nzbget.initd-r1 nzbget
+   newconfd "${FILESDIR}"/nzbget.confd nzbget
+   systemd_dounit "${FILESDIR}"/nzbget.service
+}
+
+pkg_preinst() {
+   fowners nzbget:nzbget /var/log/nzbget
+   fperms 750 /var/log/nzbget
+
+   fowners nzbget:nzbget /etc/nzbgetd.conf
+   fperms 640 /etc/nzbgetd.conf
+}
+
+pkg_postinst() {
+   

[gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/

2017-10-05 Thread Sven Wegener
commit: 2b41864cd150b5dd1c5c45478c287ec87676f6e3
Author: Louis Sautier  gmail  com>
AuthorDate: Wed Oct  4 10:11:42 2017 +
Commit: Sven Wegener  gentoo  org>
CommitDate: Thu Oct  5 21:35:44 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b41864c

net-nntp/nzbget: improve init script to use a pid file, add depend

It seems that the older behaviour did not work with recent openrc
versions. The process could not be found when running the stop command.
We don't need to override LockFile in the configuration file any more
since we set it when we start the daemon.

Package-Manager: Portage-2.3.8, Repoman-2.3.3
[swegener: separate init script revision]

 net-nntp/nzbget/files/nzbget.initd-r1  | 28 ++
 ...re2108.ebuild => nzbget-20.0_pre2108-r1.ebuild} |  3 +--
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/net-nntp/nzbget/files/nzbget.initd-r1 
b/net-nntp/nzbget/files/nzbget.initd-r1
new file mode 100644
index 000..2a9fae6c32b
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget.initd-r1
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+description="A command-line based binary newsgrabber supporting .nzb files"
+pidfile=/run/nzbget/nzbget.pid
+command=/usr/bin/nzbget
+command_args="--configfile \"${NZBGET_CONFIGFILE}\" \
+  --daemon --option LockFile=${pidfile} \
+  ${NZBGET_OPTS}"
+start_stop_daemon_args="--user \"${NZBGET_USER}\" \
+  --group \"${NZBGET_GROUP}\""
+
+depend() {
+  need localmount net
+}
+
+start_pre() {
+  checkpath -d -m 0755 -o "${NZBGET_USER}":"${NZBGET_GROUP}" /run/nzbget
+}
+
+reload() {
+  ebegin "Reloading ${RC_SVCNAME}"
+  ${command} --configfile "${NZBGET_CONFIGFILE}" --reload >/dev/null
+  eend $?
+}

diff --git a/net-nntp/nzbget/nzbget-20.0_pre2108.ebuild 
b/net-nntp/nzbget/nzbget-20.0_pre2108-r1.ebuild
similarity index 96%
rename from net-nntp/nzbget/nzbget-20.0_pre2108.ebuild
rename to net-nntp/nzbget/nzbget-20.0_pre2108-r1.ebuild
index c6d86f04383..3e119a13d9e 100644
--- a/net-nntp/nzbget/nzbget-20.0_pre2108.ebuild
+++ b/net-nntp/nzbget/nzbget-20.0_pre2108-r1.ebuild
@@ -58,7 +58,6 @@ src_prepare() {
 
sed \
-e 's:^MainDir=.*:MainDir=/var/lib/nzbget:' \
-   -e 's:^LockFile=.*:LockFile=/run/nzbget/nzbget.pid:' \
-e 's:^LogFile=.*:LogFile=/var/log/nzbget/nzbget.log:' \
-e 's:^WebDir=.*:WebDir=/usr/share/nzbget/webui:' \
-e 
's:^ConfigTemplate=.*:ConfigTemplate=/usr/share/nzbget/nzbget.conf:' \
@@ -91,7 +90,7 @@ src_install() {
keepdir /var/lib/nzbget/{dst,nzb,queue,tmp}
keepdir /var/log/nzbget
 
-   newinitd "${FILESDIR}"/nzbget.initd nzbget
+   newinitd "${FILESDIR}"/nzbget.initd-r1 nzbget
newconfd "${FILESDIR}"/nzbget.confd nzbget
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/

2017-06-23 Thread Sven Wegener
commit: 3e279c58bee61b557823357a52b23c101902807d
Author: Louis Sautier  gmail  com>
AuthorDate: Fri Jun 23 21:32:22 2017 +
Commit: Sven Wegener  gentoo  org>
CommitDate: Fri Jun 23 22:29:28 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e279c58

net-nntp/nzbget: fix compilation of pre2021 with USE=-parcheck

Gentoo-Bug: 622532
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4977

 .../nzbget-19.0_pre2021-fix-no-parcheck.patch  | 46 ++
 net-nntp/nzbget/nzbget-19.0_pre2021.ebuild |  2 +
 2 files changed, 48 insertions(+)

diff --git a/net-nntp/nzbget/files/nzbget-19.0_pre2021-fix-no-parcheck.patch 
b/net-nntp/nzbget/files/nzbget-19.0_pre2021-fix-no-parcheck.patch
new file mode 100644
index 000..e87fb7ced1a
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget-19.0_pre2021-fix-no-parcheck.patch
@@ -0,0 +1,46 @@
+From 928e0a60061d33252de0b490c80477e77dde0627 Mon Sep 17 00:00:00 2001
+From: Andrey Prygunkov 
+Date: Fri, 23 Jun 2017 23:22:49 +0200
+Subject: [PATCH] fixed #399: error when compiling without par-check
+
+---
+ daemon/queue/DirectRenamer.cpp | 5 -
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/daemon/queue/DirectRenamer.cpp b/daemon/queue/DirectRenamer.cpp
+index 585ce941..2dd0f95b 100644
+--- a/daemon/queue/DirectRenamer.cpp
 b/daemon/queue/DirectRenamer.cpp
+@@ -51,6 +51,7 @@ class RenameContentAnalyzer : public ArticleContentAnalyzer
+   bool m_parFile = false;
+ };
+ 
++#ifndef DISABLE_PARCHECK
+ class DirectParRepairer : public Par2::Par2Repairer
+ {
+ public:
+@@ -161,7 +162,7 @@ void DirectParLoader::LoadParFile(const char* parFile)
+   m_parHashes.emplace_back(filename.c_str(), hash.c_str());
+   }
+ }
+-
++#endif
+ 
+ std::unique_ptr 
DirectRenamer::MakeArticleContentAnalyzer()
+ {
+@@ -219,6 +220,7 @@ void DirectRenamer::FileDownloaded(DownloadQueue* 
downloadQueue, FileInfo* fileI
+ 
+ void DirectRenamer::CheckState(DownloadQueue* downloadQueue, NzbInfo* nzbInfo)
+ {
++#ifndef DISABLE_PARCHECK
+   if (nzbInfo->GetDirectRenameStatus() > NzbInfo::tsRunning)
+   {
+   return;
+@@ -270,6 +272,7 @@ void DirectRenamer::CheckState(DownloadQueue* 
downloadQueue, NzbInfo* nzbInfo)
+   return;
+   }
+   }
++#endif
+ }
+ 
+ // Unpause smallest par-files from each par-set

diff --git a/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild 
b/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild
index c6d86f04383..6abcc452e54 100644
--- a/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild
+++ b/net-nntp/nzbget/nzbget-19.0_pre2021.ebuild
@@ -33,6 +33,8 @@ DOCS=( ChangeLog README nzbget.conf )
 
 S=${WORKDIR}/${PN}-${PV/_pre*/-testing}
 
+PATCHES=( "${FILESDIR}/${P}-fix-no-parcheck.patch" )
+
 check_compiler() {
if [[ ${MERGE_TYPE} != binary ]] && ! test-flag-CXX -std=c++14; then
eerror "${P} requires a C++14-capable compiler. Your current 
compiler"



[gentoo-commits] repo/gentoo:master commit in: net-nntp/nzbget/files/, net-nntp/nzbget/

2016-03-24 Thread Sven Wegener
commit: 9a73152f596d1c7895c02436204386c755141cc0
Author: Louis Sautier  gmail  com>
AuthorDate: Sun Mar 20 03:55:32 2016 +
Commit: Sven Wegener  gentoo  org>
CommitDate: Thu Mar 24 08:14:19 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a73152f

net-nntp/nzbget: bump to 17.0_pre1660, EAPI=6

- add tests
- drop the dependency on libpar2 and libsigc++ as the package provides its
  own modified libpar2 (see
  
https://github.com/nzbget/nzbget/commit/2e0ba0e3d10a63316670fad4dd1c052b7583afe9)
- this versions requires a C++14-compatible compiler, add a pkg_pretend check 
and a
  missing macro

Package-Manager: portage-2.2.28

 net-nntp/nzbget/Manifest   |   1 +
 .../nzbget-17.0_pre1660-add-missing-macro.patch| 583 +
 net-nntp/nzbget/nzbget-17.0_pre1660.ebuild | 126 +
 3 files changed, 710 insertions(+)

diff --git a/net-nntp/nzbget/Manifest b/net-nntp/nzbget/Manifest
index b7988a4..8c584ac 100644
--- a/net-nntp/nzbget/Manifest
+++ b/net-nntp/nzbget/Manifest
@@ -2,3 +2,4 @@ DIST nzbget-14.1.tar.gz 1332334 SHA256 
a16b816b61f7035cc373e9b77094ca474d5b7b7f7
 DIST nzbget-14.2.tar.gz 1332612 SHA256 
bb24afb47dc01766c5e5c02d7565190082c6e13ffed565969a2ec52e21104677 SHA512 
0e1e9c1307927f6ac4772d9138901893a9782fad137756ca40617ea7e8dd7946f2927f3f5303d676d09920de0a005cb1313292fda0c5d0288d73fc8e0f949516
 WHIRLPOOL 
7fb9c5c44515e1ed4a02213af6f8a13e41452a85a710ba9e59483c8c95b9d9bc1f2c475f81d0a75ab982292fccd5ce797f2396fe09ec7339d31ea551f3c36a4e
 DIST nzbget-15.0.tar.gz 1466814 SHA256 
3ef13f3e5917e4cda19c4fc0cd37e79967a19b4e3448c239ff24e37712a6cc0a SHA512 
7233bea56f99e541155eac3e1d31f2603a407aee7055492c2bf20efc9b40a58e9e5f3b7ee7dada9278cb4bdc8b30a0e62f377235e12ac43c88f9111864d3a706
 WHIRLPOOL 
f8d53ef7637a09f1e98fe5866693bc99c96212f460b00072d5ac8164c59c9053ab8805262d97e136eccc14f6af9be220541b2ea22d01bd2ed191114cbfdcfac0
 DIST nzbget-16.4-src.tar.gz 1585908 SHA256 
8e9e3ee75d2d08a8e438b2809f504a627a9334ed239579a540b75fa97bff4d0f SHA512 
12ebde277abac5f719f374861013fa391f4698d850ac57c55787609fec54490fb09437c6a803fc0ca935c482ed5ccd16c525e17ba40a514f7a54316dc04ee874
 WHIRLPOOL 
2d1c21d45a74eaea7dcb1c99c9b409f506547189c832b432331ae2b64ee67050245acb8ff1cd522bd64460d9d7ac806b344fd0f3bbc21de4bfca12dcc815692d
+DIST nzbget-17.0_pre1660.tar.gz 1596763 SHA256 
3f54ccf915572b7a1db5f5bd0188ef4eb631fe03a41efeec8b29572bbada7c5d SHA512 
bd385713207166f3847ed3f50d250d809ca53ac4a267f22859c8bdb0b9be0235c94401db13fe721a16ff011b51bfaaee9b177078877b5faf8b8563633a40bd15
 WHIRLPOOL 
bb7bddc8a7f597da01e33de8075d21bf3008cc9d08d02393e9e1719cded8ab903575997942bab389f71a4d95ccdc4602a1d099cb013d76c8c22bc8ef510835e2

diff --git a/net-nntp/nzbget/files/nzbget-17.0_pre1660-add-missing-macro.patch 
b/net-nntp/nzbget/files/nzbget-17.0_pre1660-add-missing-macro.patch
new file mode 100644
index 000..6b99fc1
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget-17.0_pre1660-add-missing-macro.patch
@@ -0,0 +1,583 @@
+diff --git a/configure.ac b/configure.ac
+index 96cb50b..aa15148 100644
+--- a/configure.ac
 b/configure.ac
+@@ -29,6 +29,7 @@ AC_CONFIG_SRCDIR([daemon/main/nzbget.cpp])
+ AC_CONFIG_HEADERS([config.h])
+ AM_MAINTAINER_MODE
+ 
++m4_include([posix/ax_cxx_compile_stdcxx.m4])
+ 
+ dnl
+ dnl Set default library path, if not specified in environment variable 
"LIBPREF".
+diff --git a/posix/ax_cxx_compile_stdcxx.m4 b/posix/ax_cxx_compile_stdcxx.m4
+new file mode 100644
+index 000..f387b87
+--- /dev/null
 b/posix/ax_cxx_compile_stdcxx.m4
+@@ -0,0 +1,565 @@
++# ===
++#   http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
++# ===
++#
++# SYNOPSIS
++#
++#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
++#
++# DESCRIPTION
++#
++#   Check for baseline language coverage in the compiler for the specified
++#   version of the C++ standard.  If necessary, add switches to CXXFLAGS to
++#   enable support.  VERSION may be '11' (for the C++11 standard) or '14'
++#   (for the C++14 standard).
++#
++#   The second argument, if specified, indicates whether you insist on an
++#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
++#   -std=c++11).  If neither is specified, you get whatever works, with
++#   preference for an extended mode.
++#
++#   The third argument, if specified 'mandatory' or if left unspecified,
++#   indicates that baseline support for the specified C++ standard is
++#   required and that the macro should error out if no mode with that
++#   support is found.  If specified 'optional', then configuration proceeds
++#   regardless, after defining HAVE_CXX${VERSION} if and only if a
++#   supporting mode is found.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Benjamin Kosnik 
++#   Copyright (c) 2012 Zack Weinberg