From dd9eea00af826df1efedb4f132e448c1e9b51a69 Mon Sep 17 00:00:00 2001 From: Joseph Mingrone Date: Wed, 27 Sep 2017 15:31:06 +0000 Subject: [PATCH] net-im/mastodon: Remove Gemfile.lock in the rc scripts before starting web and worker services. There does not seem to be a simple way to prevent a removed Gemfile.lock from being re-generated when the web or worker services are started. This can cause startup errors when users upgrade dependencies and they no longer match what is in Gemfile.lock. --- net-im/mastodon/Makefile | 1 + net-im/mastodon/files/mastodon_web.in | 1 + net-im/mastodon/files/mastodon_workers.in | 1 + 3 files changed, 3 insertions(+) diff --git a/net-im/mastodon/Makefile b/net-im/mastodon/Makefile index eab6a199c9b8..2257f3a3abbd 100644 --- a/net-im/mastodon/Makefile +++ b/net-im/mastodon/Makefile @@ -3,6 +3,7 @@ PORTNAME= mastodon DISTVERSIONPREFIX= v DISTVERSION= 1.6.1 +PORTREVISION= 1 CATEGORIES= net-im www MAINTAINER= jrm@FreeBSD.org diff --git a/net-im/mastodon/files/mastodon_web.in b/net-im/mastodon/files/mastodon_web.in index ccdd3c53e038..edfbd2e1ace9 100644 --- a/net-im/mastodon/files/mastodon_web.in +++ b/net-im/mastodon/files/mastodon_web.in @@ -33,6 +33,7 @@ mastodon_web_user="mastodon" pidfile="%%WWWDIR%%/tmp/${name}.pid" procname="%%RUBY%%:" +start_precmd="rm -f %%WWWDIR%%/Gemfile.lock" command="%%PREFIX%%/bin/puma" command_flags="-C config/puma.rb" command_args=">> /var/log/mastodon/${name##mastodon_}.log 2>&1 &" diff --git a/net-im/mastodon/files/mastodon_workers.in b/net-im/mastodon/files/mastodon_workers.in index 365b7d8d523c..cb793deb0182 100644 --- a/net-im/mastodon/files/mastodon_workers.in +++ b/net-im/mastodon/files/mastodon_workers.in @@ -30,6 +30,7 @@ mastodon_workers_user="mastodon" pidfile="%%WWWDIR%%/tmp/${name}.pid" procname="%%RUBY%%:" +start_precmd="rm -f %%WWWDIR%%/Gemfile.lock" command="%%PREFIX%%/bin/sidekiq" command_flags="-c ${mastodon_workers_threads} -q default -q mailers -q pull -q push" command_args=">> /var/log/mastodon/${name##mastodon_}.log 2>&1 &"