From owner-svn-ports-head@freebsd.org Sun Jan 27 04:28:29 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A75BB14BE491; Sun, 27 Jan 2019 04:28:29 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E0AB85FCF; Sun, 27 Jan 2019 04:28:28 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CE6029B3; Sun, 27 Jan 2019 04:28:28 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0R4SSvP021448; Sun, 27 Jan 2019 04:28:28 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0R4SR4U021440; Sun, 27 Jan 2019 04:28:27 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201901270428.x0R4SR4U021440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sun, 27 Jan 2019 04:28:27 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r491324 - in head: . net-p2p/qbittorrent net-p2p/qbittorrent/files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head: . net-p2p/qbittorrent net-p2p/qbittorrent/files X-SVN-Commit-Revision: 491324 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6E0AB85FCF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2019 04:28:29 -0000 Author: yuri Date: Sun Jan 27 04:28:26 2019 New Revision: 491324 URL: https://svnweb.freebsd.org/changeset/ports/491324 Log: net-p2p/qbittorrent: Add rc.d support for nox flavor qbittorrent-nox can now be run as service. Submitted by: Daniel Engberg Differential Revision: D18814 Added: head/net-p2p/qbittorrent/files/ head/net-p2p/qbittorrent/files/qbittorrent.in (contents, props changed) head/net-p2p/qbittorrent/pkg-plist-nox (contents, props changed) Modified: head/GIDs head/UIDs head/net-p2p/qbittorrent/Makefile Modified: head/GIDs ============================================================================== --- head/GIDs Sun Jan 27 04:15:45 2019 (r491323) +++ head/GIDs Sun Jan 27 04:28:26 2019 (r491324) @@ -790,7 +790,7 @@ sogod:*:846: domoticz:*:847: graylog:*:848: chronyd:*:849: -# free: 850 +qbittorrent:*:850: # free: 851 # free: 852 _geodns:*:853: Modified: head/UIDs ============================================================================== --- head/UIDs Sun Jan 27 04:15:45 2019 (r491323) +++ head/UIDs Sun Jan 27 04:28:26 2019 (r491324) @@ -796,7 +796,7 @@ sogod:*:846:846::0:0:SOGo groupware:/nonexistent:/usr/ domoticz:*:847:847::0:0:domoticz user:/nonexistent:/usr/sbin/nologin graylog:*:848:848::0:0:Graylog user:/nonexistent:/usr/sbin/nologin chronyd:*:849:849::0:0:chronyd user:/nonexistent:/usr/sbin/nologin -# free: 850 +qbittorrent:*:850:850::0:0:qBittorrent Daemon User:/var/db/qbittorrent/conf:/usr/sbin/nologin # free: 851 # free: 852 _geodns:*:853:853::0:0:GeoDNS User:/var/empty:/usr/sbin/nologin Modified: head/net-p2p/qbittorrent/Makefile ============================================================================== --- head/net-p2p/qbittorrent/Makefile Sun Jan 27 04:15:45 2019 (r491323) +++ head/net-p2p/qbittorrent/Makefile Sun Jan 27 04:28:26 2019 (r491324) @@ -3,7 +3,7 @@ PORTNAME= qbittorrent DISTVERSION= 4.1.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-p2p ipv6 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} @@ -19,7 +19,7 @@ LIB_DEPENDS= libtorrent-rasterbar.so:net-p2p/libtorren FLAVORS= default nox FLAVOR?= ${FLAVORS:[1]} nox_PKGNAMESUFFIX= -nox -nox_PLIST= ${NONEXISTENT} +nox_PLIST= ${MASTERDIR}/pkg-plist-nox USES= compiler:c++11-lib pkgconfig qmake:no_env qt:5 tar:xz GNU_CONFIGURE= yes @@ -37,8 +37,11 @@ USE_GL= gl SUFFIX= -nox COMMENT+= (web UI version) CONFIGURE_ARGS+= --disable-gui -PLIST_FILES= bin/qbittorrent${SUFFIX} \ - man/man1/qbittorrent${SUFFIX}.1.gz +USERS= qbittorrent +GROUPS= qbittorrent +USE_RC_SUBR= qbittorrent +SUB_LIST= USER=${USERS} GROUP=${GROUPS} +PLIST_SUB= USER=${USERS} GROUP=${GROUPS} .endif OPTIONS_DEFINE= DBUS DEBUG DOCS @@ -55,6 +58,9 @@ post-install: ${INSTALL_MAN} ${WRKSRC}/doc/qbittorrent${SUFFIX}.1 \ ${STAGEDIR}${MAN1PREFIX}/man/man1/ @${RM} -r ${STAGEDIR}${PREFIX}/share/man +.if ${FLAVOR} == nox + @${MKDIR} ${STAGEDIR}/var/db/qbittorrent/conf ${STAGEDIR}/var/db/qbittorrent/Downloads +.endif post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} Added: head/net-p2p/qbittorrent/files/qbittorrent.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/qbittorrent/files/qbittorrent.in Sun Jan 27 04:28:26 2019 (r491324) @@ -0,0 +1,44 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: qbittorrent +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable this service: +# +# qbittorrent_enable: Set to NO by default. Set it to YES to enable it. +# qbittorrent_conf_dir: Directory where qbittorrent configuration +# data is stored. +# Default: /var/db/qbittorrent/conf +# qbittorrent_download_dir: Directory to store downloaded data. +# Default: /var/db/qbittorrent/Downloads +# qbittorrent_user: The user account transmission daemon runs as. +# Default is 'qbittorrent' +# qbittorrent_group: The group associated with username qbittorrent +# daemon runs as. Default is 'qbittorrent' +# + +. /etc/rc.subr + +name=qbittorrent +rcvar=qbittorrent_enable + +load_rc_config $name + +: ${qbittorrent_enable="NO"} +: ${qbittorrent_conf_dir="/var/db/qbittorrent/conf"} +: ${qbittorrent_download_dir="/var/db/qbittorrent/Downloads"} +: ${qbittorrent_user=%%USER%%} +: ${qbittorrent_group=%%GROUP%%} + +command="%%PREFIX%%/bin/qbittorrent-nox" +command_args="--daemon" + +qbittorrent_flags=" \ + ${qbittorrent_conf_dir:+--profile=${qbittorrent_conf_dir}} \ + ${qbittorrent_download_dir:+--save-path=${qbittorrent_download_dir}} \ + ${qbittorrent_flags}" + +run_rc_command $1 Added: head/net-p2p/qbittorrent/pkg-plist-nox ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/qbittorrent/pkg-plist-nox Sun Jan 27 04:28:26 2019 (r491324) @@ -0,0 +1,7 @@ +bin/qbittorrent-nox +man/man1/qbittorrent-nox.1.gz +@owner %%USER%% +@group %%GROUP%% +@dir /var/db/qbittorrent/conf +@dir /var/db/qbittorrent/Downloads +@dir /var/db/qbittorrent