Browse Source

Updated to new version.

master
Franco Masotti 6 years ago
parent
commit
b2fb71f6b2
  1. 8
      .SRCINFO
  2. 10
      .install
  3. 12
      PKGBUILD
  4. 10
      rserve-sandbox-docker.service
  5. 4
      run.sh

8
.SRCINFO

@ -1,6 +1,6 @@
pkgbase = rserve-sandbox-docker
pkgdesc = Docker spec for running Rserve in a sandbox
pkgver = r31.d7e1235
pkgver = r32.a0040e2
pkgrel = 1
url = https://github.com/frnmst/rserve-sandbox
install = .install
@ -8,9 +8,13 @@ pkgbase = rserve-sandbox-docker
license = BSD
makedepends = git
makedepends = sed
depends = bash
depends = coreutils
depends = docker
depends = gawk
depends = make
depends = sed
depends = r
depends = docker
conflicts = rserve-sandbox-docker-bin
source = git+https://github.com/frnmst/rserve-sandbox#branch=distro-package
md5sums = SKIP

10
.install

@ -1,14 +1,16 @@
post_install() {
# Add rserve user and group.
getent group rserve &>/dev/null || groupadd -g 32749 -r rserve >/dev/null
getent passwd rserve &>/dev/null || useradd -u 32749 -m -d /home/rserve \
getent group rserve 1>/dev/null 2>/dev/null \
|| groupadd -g 32749 -r rserve >/dev/null
getent passwd rserve 1>/dev/null 2>/dev/null \
|| useradd -u 32749 -m -d /home/rserve \
-s /bin/false -r -g rserve rserve >/dev/null
# Exec the chmod just like in the Makefile.
chmod 750 /home/rserve
# Add rsd user and group.
getent group rsd &>/dev/null || groupadd -r rsd >/dev/null
getent passwd rsd &>/dev/null || useradd -s /bin/false \
getent group rsd 1>/dev/null 2>/dev/null || groupadd -r rsd >/dev/null
getent passwd rsd 1>/dev/null 2>/dev/null || useradd -s /bin/false \
-r -g rsd rsd >/dev/null
# This is explained in the Arch Wiki. It seems that anyone belonging to the

12
PKGBUILD

@ -1,15 +1,19 @@
# Maintainer: Franco Masotti <franco dot masotti at student dot unife dot it>
# Contributor: Franco Masotti <franco dot masotti at student dot unife dot it>
pkgname=rserve-sandbox-docker
pkgver=r31.d7e1235
pkgver=r32.a0040e2
pkgrel=1
pkgdesc="Docker spec for running Rserve in a sandbox"
arch=('x86_64')
url="https://github.com/frnmst/rserve-sandbox"
license=('BSD')
depends=('sed'
'r'
'docker')
depends=('bash'
'coreutils'
'docker'
'gawk'
'make'
'sed'
'r')
makedepends=('git'
'sed')
conflicts=('rserve-sandbox-docker-bin')

10
rserve-sandbox-docker.service

@ -3,24 +3,26 @@
#
# Copyright (C) 2016 frnmst (Franco Masotti) <franco.masotti@student.unife.it>
#
# This file is part of cplint-installer.
# This file is part of swish-installer.
#
# cplint-installer is free software: you can redistribute it and/or modify
# swish-installer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cplint-installer is distributed in the hope that it will be useful,
# swish-installer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cplint-installer. If not, see <http://www.gnu.org/licenses/>.
# along with swish-installer. If not, see <http://www.gnu.org/licenses/>.
#
#
# To be placed in /usr/lib/systemd/system/rserve-sandbox-docker.service
# or /lib/systemd/system/rserve-sandbox-docker.service
# depending on your GNU/Linux distribution
[Unit]
Description=Docker spec for running Rserve in a sandbox

4
run.sh

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# run.sh
@ -77,7 +77,7 @@ killd()
# kill action only if process exists.
if [ -f "$pid_file" ]; then
pid=$(cat "$pid_file")
ps -q $pid > /dev/null
ps -p $pid > /dev/null
if [ $? -eq 0 ]; then
make -C "$pkg_dir" stop
fi

Loading…
Cancel
Save