From owner-svn-ports-all@freebsd.org Sun Feb 7 05:42:14 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D449C4F8CD8; Sun, 7 Feb 2021 05:42:14 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DYJ2G5k8Dz3kmH; Sun, 7 Feb 2021 05:42:14 +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 B77701F23D; Sun, 7 Feb 2021 05:42:14 +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 1175gEdv078064; Sun, 7 Feb 2021 05:42:14 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 1175gETb078061; Sun, 7 Feb 2021 05:42:14 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <202102070542.1175gETb078061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sun, 7 Feb 2021 05:42:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r564604 - in head/devel/RStudio: . files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/devel/RStudio: . files X-SVN-Commit-Revision: 564604 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2021 05:42:14 -0000 Author: yuri Date: Sun Feb 7 05:42:13 2021 New Revision: 564604 URL: https://svnweb.freebsd.org/changeset/ports/564604 Log: devel/RStudio: Add rc script for the 'server' flavor/mode Also * Remove redundant dependencies for the 'server' flavor * Improve COMMENT for the 'desktop' flavor * Remove unnecessary shebang and file in the 'server' flavor Added: head/devel/RStudio/files/rstudio-server.in (contents, props changed) Modified: head/devel/RStudio/Makefile head/devel/RStudio/pkg-message Modified: head/devel/RStudio/Makefile ============================================================================== --- head/devel/RStudio/Makefile Sun Feb 7 05:19:58 2021 (r564603) +++ head/devel/RStudio/Makefile Sun Feb 7 05:42:13 2021 (r564604) @@ -6,7 +6,7 @@ PORTNAME= RStudio DISTVERSIONPREFIX= v DISTVERSION= 1.3.1093 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel math java MASTER_SITES= https://s3.amazonaws.com/rstudio-buildtools/dictionaries/:dictionaries \ https://s3.amazonaws.com/rstudio-buildtools/:buildtools @@ -36,9 +36,7 @@ FLAVORS= desktop server FLAVOR?= ${FLAVORS:[1]} server_PKGNAMESUFFIX= -server -USES= cmake fortran localbase:ldflags pkgconfig qt:5 ssl -USE_QT= core dbus declarative gui location network opengl printsupport quickcontrols sensors \ - sql svg webchannel webengine webkit widgets xml xmlpatterns buildtools_build qmake_build +USES= cmake fortran localbase:ldflags pkgconfig ssl USE_JAVA= yes JAVA_VERSION= 8 JAVA_BUILD= yes @@ -63,7 +61,10 @@ GWT_VERSION= 2.8.1 GIN_VERSION= 2.1.2 .if ${FLAVOR:U} == desktop -USES+= desktop-file-utils shared-mime-info +COMMENT+= (desktop UI version) +USES+= desktop-file-utils qt:5 shared-mime-info +USE_QT= core dbus declarative gui location network opengl printsupport quickcontrols sensors \ + sql svg webchannel webengine webkit widgets xml xmlpatterns buildtools_build qmake_build CMAKE_ARGS+= -DRSTUDIO_TARGET=Desktop INSTALL_SUBDIR= ${PORTNAME:tl} EXECUTABLE= ${PORTNAME:tl} @@ -71,12 +72,12 @@ EXECUTABLE= ${PORTNAME:tl} .if ${FLAVOR:U} == server COMMENT+= (web UI version) -USES+= shebangfix -SHEBANG_FILES= src/cpp/server/extras/admin/rstudio-server.in CMAKE_ARGS+= -DRSTUDIO_TARGET=Server INSTALL_SUBDIR= ${PORTNAME:tl}-server EXECUTABLE= rserver -RUN_DEPENDS+= bash:shells/bash +USER= nobody +SUB_LIST= USER=${USER} +USE_RC_SUBR= ${PORTNAME:tl}-server .endif post-extract: @@ -117,7 +118,10 @@ post-install: ) > ${STAGEDIR}${PREFIX}/bin/${EXECUTABLE} @${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${EXECUTABLE} .if ${FLAVOR:U} == desktop - @${REINPLACE_CMD} -e 's|^Exec=.*/rstudio|Exec=${PREFIX}/bin/${EXECUTABLE}|' ${STAGEDIR}${PREFIX}/share/applications/${EXECUTABLE}.desktop + ${REINPLACE_CMD} -e 's|^Exec=.*/rstudio|Exec=${PREFIX}/bin/${EXECUTABLE}|' ${STAGEDIR}${PREFIX}/share/applications/${EXECUTABLE}.desktop +.endif +.if ${FLAVOR:U} == server + ${RM} ${STAGEDIR}${LOCALBASE}/lib/${INSTALL_SUBDIR}/bin/rstudio-server # not compatible with FreeBSD .endif # Some functions expect the pandoc symlink. @${MKDIR} ${STAGEDIR}${PREFIX}/lib/${INSTALL_SUBDIR}/bin/pandoc Added: head/devel/RStudio/files/rstudio-server.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/RStudio/files/rstudio-server.in Sun Feb 7 05:42:13 2021 (r564604) @@ -0,0 +1,35 @@ +#!/bin/sh +# +# $FreeBSD: head/net/dhcpd/files/dhcpd.in 470842 2018-05-25 14:04:06Z tz $ +# +# PROVIDE: rstudio-server +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable rstudio_server: +# rstudio_server_enable : set to "YES" to enable theb daemon, default is "NO" +# rstudio_server_flags : any extra flags, default is "" + +. /etc/rc.subr + +name=rstudio_server +rcvar=rstudio_server_enable + +load_rc_config $name + +rstudio_server_enable=${rstudio_server_enable:-"NO"} +rstudio_server_flags=${rstudio_server_flags:-""} + +procname=%%PREFIX%%/lib/rstudio-server/bin/rserver +command=%%PREFIX%%/lib/rstudio-server/bin/rserver +command_args="--server-user %%USER%% ${rstudio_server_flags}" + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + # workaround for https://github.com/rstudio/rstudio/issues/8917 + killall rsession rworkspaces 2>/dev/null # process list is taken from src/cpp/server/extras/admin/rstudio-server.in +} + +run_rc_command "$1" Modified: head/devel/RStudio/pkg-message ============================================================================== --- head/devel/RStudio/pkg-message Sun Feb 7 05:19:58 2021 (r564603) +++ head/devel/RStudio/pkg-message Sun Feb 7 05:42:13 2021 (r564604) @@ -11,13 +11,15 @@ proc /proc procfs rw 0 0 and then run this command as root: # mount /proc -In order to run RStudio Server please run: -$ sudo rserver --server-daemonize 0 --server-user nobody +In order to enable RStudio Server service at startup and start it please run: +# sysrc rstudio_server_enable="YES" +# service rstudio-server start +and then navigate to http://localhost:8787/ in your browser. +You can also start the RStudio Server service once with: +# service rstudio-server onestart and then navigate to http://localhost:8787/ in your browser. -The rc script will be added later to start RStudio Server as -a service. EOM }