git: 059791e8b180 - main - news/nzbget: update to 21.1
Fernando Apesteguía
fernape at FreeBSD.org
Thu Jun 24 17:26:02 UTC 2021
The branch main has been updated by fernape:
URL: https://cgit.FreeBSD.org/ports/commit/?id=059791e8b18030ccbe94b6e26f736d0b30930ad4
commit 059791e8b18030ccbe94b6e26f736d0b30930ad4
Author: Fernando Apesteguía <fernape at FreeBSD.org>
AuthorDate: 2021-06-24 08:43:43 +0000
Commit: Fernando Apesteguía <fernape at FreeBSD.org>
CommitDate: 2021-06-24 17:21:21 +0000
news/nzbget: update to 21.1
ChangeLog: https://github.com/nzbget/nzbget/releases/tag/v21.1
* Remove unused options
* Replace PYTHON option with USES flag
* Enable setting an unprivileged user in rc.conf
* Start daemon with "su -l" (allows "~" in config, fixes bug #243060)
* Fix pkg-message
PR: 256733
Reported by: thomas at beingboiled.info
---
news/nzbget/Makefile | 25 +++++++------------------
news/nzbget/distinfo | 6 +++---
news/nzbget/files/nzbget.in | 30 +++++++++++++++++++++---------
news/nzbget/files/pkg-message.in | 4 ++--
4 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/news/nzbget/Makefile b/news/nzbget/Makefile
index cf99325a7757..7cb3516fcab5 100644
--- a/news/nzbget/Makefile
+++ b/news/nzbget/Makefile
@@ -1,9 +1,8 @@
# Created by: Lewis Thompson <purple at lewiz.net>
PORTNAME= nzbget
-PORTVERSION= 21.0
+PORTVERSION= 21.1
DISTVERSIONPREFIX= v
-PORTREVISION= 2
CATEGORIES= news
MAINTAINER= ports at FreeBSD.org
@@ -13,9 +12,13 @@ LICENSE= GPLv2
LIB_DEPENDS= libxml2.so:textproc/libxml2
-USES= autoreconf compiler:c++14-lang gmake localbase ncurses pkgconfig shebangfix ssl
+USES= autoreconf compiler:c++14-lang gmake localbase ncurses \
+ pkgconfig python:build shebangfix ssl
+USE_GITHUB= yes
USE_RC_SUBR= nzbget
+SHEBANG_FILES= scripts/*.py
+
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libcurses-includes=${NCURSESINC} \
--with-libcurses-libraries=${NCURSESLIB} \
@@ -25,26 +28,12 @@ CONFIGURE_ARGS= --with-libcurses-includes=${NCURSESINC} \
BINMODE= 0755
-SHEBANG_FILES= scripts/*.py
SUB_FILES= pkg-message
-USE_GITHUB= yes
-
-OPTIONS_DEFINE= 7Z DOCS OPTIMIZED_FLAGS PYTHON RAR
-OPTIONS_DEFAULT= PAR PYTHON RAR 7Z
-7Z_DESC= Support extraction of 7z archives
+OPTIONS_DEFINE= DOCS OPTIMIZED_FLAGS
OPTIMIZED_FLAGS_DESC= Enable optimized CPU instructions (SSE2/SSE3/NEON/etc)
-PYTHON_DESC= Support for python post-processing scripts
-RAR_DESC= Support extraction of rar archives
-
-7Z_RUN_DEPENDS= 7z:archivers/p7zip
-
OPTIMIZED_FLAGS_EXTRA_PATCHES_OFF= ${FILESDIR}/extra-disable-optimized-flags.patch
-PYTHON_USES= python:run
-
-RAR_RUN_DEPENDS= unrar:archivers/unrar
-
.include <bsd.port.options.mk>
.if (${ARCH} == "i386")
diff --git a/news/nzbget/distinfo b/news/nzbget/distinfo
index e8e87d6196e0..e28cdd121659 100644
--- a/news/nzbget/distinfo
+++ b/news/nzbget/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1559757041
-SHA256 (nzbget-nzbget-v21.0_GH0.tar.gz) = c7d3ece53f9bf958011b05404bf4063d74bd73fc8140a63c334e9e767eff6d50
-SIZE (nzbget-nzbget-v21.0_GH0.tar.gz) = 2011852
+TIMESTAMP = 1623584109
+SHA256 (nzbget-nzbget-v21.1_GH0.tar.gz) = 79695ea503447f13911a9fe58d0ef3e860b2ff5d6fdfd351186ee5fda1ae8bdb
+SIZE (nzbget-nzbget-v21.1_GH0.tar.gz) = 2011505
diff --git a/news/nzbget/files/nzbget.in b/news/nzbget/files/nzbget.in
index b692c3889ade..ef661a5bd11b 100644
--- a/news/nzbget/files/nzbget.in
+++ b/news/nzbget/files/nzbget.in
@@ -4,22 +4,34 @@
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
-# to enable this service:
+# Add the following lines to /etc/rc.conf to enable the nzbget daemon:
#
-# nzbget_enable (bool): Set to NO by default.
-# Set it to YES to enable it.
+# nzbget_enable="YES"
+#
+# Following additional settings are available:
+#
+# nzbget_user: user to run nzbget as (recommended)
+# nzbget_conf: path to config if in a non-standard location (optional)
+
+command=%%PREFIX%%/bin/nzbget
. /etc/rc.subr
+load_rc_config nzbget
+
+nzbget_enable=${nzbget_enable:-NO}
+nzbget_user=${nzbget_user:-root}
+nzbget_conf=${nzbget_conf:+"-c $nzbget_conf"}
+
name=nzbget
rcvar=nzbget_enable
-load_rc_config ${name}
+start_cmd="nzbget_cmd -D"
+stop_cmd="nzbget_cmd -Q"
+reload_cmd="nzbget_cmd -O"
-: ${nzbget_enable:=NO}
-
-command=%%PREFIX%%/bin/nzbget
-command_args="-D"
+nzbget_cmd() {
+ /usr/bin/su -l $nzbget_user -c "exec $command $nzbget_conf $1"
+}
run_rc_command "$1"
diff --git a/news/nzbget/files/pkg-message.in b/news/nzbget/files/pkg-message.in
index e7f1bdf4aed1..81330591b98f 100644
--- a/news/nzbget/files/pkg-message.in
+++ b/news/nzbget/files/pkg-message.in
@@ -1,8 +1,8 @@
[
{ type: install
message: <<EOM
-To run nzbget as an unprivileged user you can set the Daemonuser
-variable in %%LOCALBASE%%/etc/nzbget.conf
+Set "nzbget_user" in rc.conf or "DaemonUsername" in your nzbget config
+to run the nzbget daemon as an unprivileged user.
EOM
}
]
More information about the dev-commits-ports-all
mailing list