1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

sysutils/linux-crashplan: make sure poll selector is set from rc

- CrashPlan in place update can overwrite our run.conf preventing it
  from working [1]
- Update to 3.6.4

PR:		194465 [1]
This commit is contained in:
William Grzybowski 2014-10-23 00:36:47 +00:00
parent 270d775d40
commit 040166cdb7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=371372
3 changed files with 22 additions and 13 deletions

View File

@ -2,11 +2,10 @@
# $FreeBSD$
PORTNAME= linux-crashplan
DISTVERSION= 3.6.3
PORTREVISION= 1
DISTVERSION= 3.6.4
CATEGORIES= sysutils linux
MASTER_SITES= http://download.crashplan.com/installs/linux/install/CrashPlan/
DISTNAME= CrashPlan_3.6.3_Linux
DISTNAME= CrashPlan_${DISTVERSION}_Linux
MAINTAINER= wg@FreeBSD.org
COMMENT= Backs up data to remote servers or hard drives
@ -29,10 +28,6 @@ NO_BUILD= yes
CRASHDIR= ${PREFIX}/share/crashplan
post-patch:
@${REINPLACE_CMD} 's/SRV_JAVA_OPTS="/SRV_JAVA_OPTS="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider /' ${WRKSRC}/scripts/run.conf
@${REINPLACE_CMD} 's/GUI_JAVA_OPTS="/GUI_JAVA_OPTS="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider /' ${WRKSRC}/scripts/run.conf
do-install:
@${MKDIR} ${STAGEDIR}${CRASHDIR}
cd ${STAGEDIR}${CRASHDIR} && ${CAT} ${WRKSRC}/CrashPlan_${DISTVERSION}.cpi | ${GZIP_CMD} -d -c - | ${CPIO} -i --no-preserve-owner

View File

@ -1,2 +1,2 @@
SHA256 (CrashPlan_3.6.3_Linux.tgz) = 605580cfc6aecb3acdc10baa6afc448ac07d960dafdbaa2e35b92f61d877016c
SIZE (CrashPlan_3.6.3_Linux.tgz) = 21188654
SHA256 (CrashPlan_3.6.4_Linux.tgz) = 63b3d2c11bc74221d20dbae136d2bdc14f1b1e3f2678294a99f06d545dbfbf76
SIZE (CrashPlan_3.6.4_Linux.tgz) = 21213313

View File

@ -10,13 +10,27 @@
name="crashplan"
rcvar=${name}_enable
command="/usr/bin/cpuset -l 0 %%PREFIX%%/share/crashplan/bin/CrashPlanEngine"
crashplan_bin="%%PREFIX%%/share/crashplan/bin"
command="${crashplan_bin}/CrashPlanEngine"
pidfile="/var/run/CrashPlanEngine.pid"
start_precmd="install -d /var/log/crashplan"
start_cmd="${command} start"
crashplan_start() {
local crashplan_poll_selector
crashplan_poll_selector="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider"
/usr/bin/install -d /var/log/crashplan || exit 1
sed -E -e "s/-Djava.nio.channels.spi.SelectorProvider=[^[:blank:]]+//" \
-e "s/SRV_JAVA_OPTS=\"/SRV_JAVA_OPTS=\"${crashplan_poll_selector} /" \
-e "s/GUI_JAVA_OPTS=\"/GUI_JAVA_OPTS=\"${crashplan_poll_selector} /" \
-i bak "${crashplan_bin}/run.conf" || exit 1
/usr/bin/cpuset -l 0 ${command} start
}
start_cmd="${name}_start"
stop_cmd="${command} stop"
status_cmd="${command} status"
load_rc_config ${name}
run_rc_command "$1"