Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 17:26:21 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r405476 - in head/net-p2p/sonarr: . files
Message-ID:  <201601071726.u07HQLvg076047@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Thu Jan  7 17:26:21 2016
New Revision: 405476
URL: https://svnweb.freebsd.org/changeset/ports/405476

Log:
  net-p2p/sonarr: Fix $sonarr_data_dir creation
  
  Now that $sonarr_data_dir is configurable, move creation from package to
  rc script to prevent sonarr from failing to start successfully.
  
  PR:		205986
  MFH:		2016Q1

Modified:
  head/net-p2p/sonarr/Makefile
  head/net-p2p/sonarr/files/sonarr.in
  head/net-p2p/sonarr/pkg-plist

Modified: head/net-p2p/sonarr/Makefile
==============================================================================
--- head/net-p2p/sonarr/Makefile	Thu Jan  7 16:57:21 2016	(r405475)
+++ head/net-p2p/sonarr/Makefile	Thu Jan  7 17:26:21 2016	(r405476)
@@ -2,7 +2,7 @@
 
 PORTNAME=	sonarr
 PORTVERSION=	2.0.0.3645
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	net-p2p
 MASTER_SITES=	http://download.sonarr.tv/v2/master/mono/
 DISTNAME=	NzbDrone.master.${PORTVERSION}.mono
@@ -27,6 +27,5 @@ USERS=	sonarr
 do-install:
 	${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR}
 	cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}
-	${MKDIR} ${STAGEDIR}/${PREFIX}/sonarr
 
 .include <bsd.port.mk>

Modified: head/net-p2p/sonarr/files/sonarr.in
==============================================================================
--- head/net-p2p/sonarr/files/sonarr.in	Thu Jan  7 16:57:21 2016	(r405475)
+++ head/net-p2p/sonarr/files/sonarr.in	Thu Jan  7 17:26:21 2016	(r405476)
@@ -27,6 +27,15 @@ pidfile="${sonarr_data_dir}/nzbdrone.pid
 procname="%%PREFIX%%/bin/mono"
 command="/usr/sbin/daemon"
 command_args="-f ${procname} %%DATADIR%%/NzbDrone.exe --nobrowser --data=${sonarr_data_dir}"
-start_precmd="export XDG_CONFIG_HOME=${sonarr_data_dir}"
+start_precmd=sonarr_precmd
+
+sonarr_precmd()
+{
+	export XDG_CONFIG_HOME=${sonarr_data_dir}
+
+	if [ ! -d ${sonarr_data_dir} ]; then
+		install -d -o ${sonarr_user} ${sonarr_data_dir}
+	fi
+}
 
 run_rc_command "$1"

Modified: head/net-p2p/sonarr/pkg-plist
==============================================================================
--- head/net-p2p/sonarr/pkg-plist	Thu Jan  7 16:57:21 2016	(r405475)
+++ head/net-p2p/sonarr/pkg-plist	Thu Jan  7 17:26:21 2016	(r405476)
@@ -148,4 +148,3 @@
 %%DATADIR%%/UI/templates.js
 %%DATADIR%%/UI/vendor.js
 %%DATADIR%%/UI/vendor.map
-@dir(sonarr,wheel,755) sonarr



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601071726.u07HQLvg076047>