diff options
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/resilio-sync/Manifest | 2 | ||||
-rw-r--r-- | net-p2p/resilio-sync/files/resilio-sync-user.confd | 12 | ||||
-rw-r--r-- | net-p2p/resilio-sync/files/resilio-sync-user.initd | 27 | ||||
-rw-r--r-- | net-p2p/resilio-sync/files/resilio-sync-user.service | 13 | ||||
-rw-r--r-- | net-p2p/resilio-sync/files/resilio-sync.confd | 12 | ||||
-rw-r--r-- | net-p2p/resilio-sync/files/resilio-sync.initd | 18 | ||||
-rw-r--r-- | net-p2p/resilio-sync/files/resilio-sync.service | 17 | ||||
-rw-r--r-- | net-p2p/resilio-sync/files/resilio-sync.tmpfile | 1 | ||||
-rw-r--r-- | net-p2p/resilio-sync/metadata.xml | 24 | ||||
-rw-r--r-- | net-p2p/resilio-sync/resilio-sync-2.5.12.ebuild | 78 |
10 files changed, 204 insertions, 0 deletions
diff --git a/net-p2p/resilio-sync/Manifest b/net-p2p/resilio-sync/Manifest new file mode 100644 index 000000000000..6e35938ad7c1 --- /dev/null +++ b/net-p2p/resilio-sync/Manifest @@ -0,0 +1,2 @@ +DIST resilio-sync_2.5.12-1_amd64.deb 10467196 BLAKE2B e900ac4e8b3862b29674db09d469013a5d12791c090bfd6ecae8f95af6f8ff2f990b8b9cab176b301b7625d6fcee1fcbe33b497f09bca045497a6765ccbb313c SHA512 4056df3d2cbafdb881f1d2929fca13efd258fb7af2cbdc390eae4820af1f5b2b46d410daf2a1ad1233d105edc46c4d5a8e9259e4557c0695b3392884429d95f9 +DIST resilio-sync_2.5.12-1_i386.deb 10333948 BLAKE2B 7a7a6e2bf8375bf5428c27053c22de98e598de07d8709f870152a8b9e2d7254a954b3ceebad69bebf286ef29b3d44b9955f33c4f396a7831041c34b9bd585dd2 SHA512 c15276bbe8818e30cab254a7b1f1222e3a25912d99a05287441548ea3ee3de8964d23a5aed56fd547ee3369f9943129cf7d3a5bd410ce28a9fbd45e13def56b4 diff --git a/net-p2p/resilio-sync/files/resilio-sync-user.confd b/net-p2p/resilio-sync/files/resilio-sync-user.confd new file mode 100644 index 000000000000..040da8bdf843 --- /dev/null +++ b/net-p2p/resilio-sync/files/resilio-sync-user.confd @@ -0,0 +1,12 @@ +# Config file for /etc/init.d/resilio-sync + +# Various options. +# run `rslsync --help` for valid cmdline options +#OPTS="--log /var/log/resilio-sync/resilio-sync.log" + +# User and group daemon runs as +#USER="rslsync" +#GROUP="rslsync" + +# Resilio Sync config file +#CONFIG="/etc/resilio-sync/config.json" diff --git a/net-p2p/resilio-sync/files/resilio-sync-user.initd b/net-p2p/resilio-sync/files/resilio-sync-user.initd new file mode 100644 index 000000000000..efcaa2d7778c --- /dev/null +++ b/net-p2p/resilio-sync/files/resilio-sync-user.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +USER="${RC_SVCNAME##*.}" +command="/usr/bin/rslsync" +name="Resilio Sync for $USER" +description="Resilio Sync" +command_user="${USER:-rslsync}:${GROUP:-rslsync}" +pidfile="${PIDFILE:-/home/$USER/.config/resilio-sync/resilio-sync.pid}" +config=${CONFIG:-/home/$USER/.config/resilio-sync/config.json} +command_args="--config $config ${OPTS}" +start_stop_daemon_args="-q" +retry="10" + +depend() { + need net +} + +start_pre() { + if [ "$USER" = "resilio-sync-user" ]; then + eerror "You are not supposed to run this script directly." + eerror "Create a symlink for this script:" + eerror " ln -s $RC_SVCNAME /etc/init.d/$RC_SVCNAME.<user>" + return 1 + fi +} diff --git a/net-p2p/resilio-sync/files/resilio-sync-user.service b/net-p2p/resilio-sync/files/resilio-sync-user.service new file mode 100644 index 000000000000..6c82440ac679 --- /dev/null +++ b/net-p2p/resilio-sync/files/resilio-sync-user.service @@ -0,0 +1,13 @@ +[Unit] +Description=Resilio Sync service +Documentation=http://help.getsync.com/ +After=network.target network-online.target + +[Service] +Type=forking +Restart=on-failure +PIDFile=%h/.config/resilio-sync/resilio-sync.pid +ExecStart=/usr/bin/rslsync --config %h/.config/resilio-sync/config.json + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/resilio-sync/files/resilio-sync.confd b/net-p2p/resilio-sync/files/resilio-sync.confd new file mode 100644 index 000000000000..08c4255fe296 --- /dev/null +++ b/net-p2p/resilio-sync/files/resilio-sync.confd @@ -0,0 +1,12 @@ +# Config file for /etc/init.d/resilio-sync + +# Various options. +# run `rslsync --help` for valid cmdline options +OPTS="--log /var/log/resilio-sync/resilio-sync.log" + +# User and group daemon runs as +USER="rslsync" +GROUP="rslsync" + +# Resilio Sync config file +#CONFIG="/etc/resilio-sync/config.json" diff --git a/net-p2p/resilio-sync/files/resilio-sync.initd b/net-p2p/resilio-sync/files/resilio-sync.initd new file mode 100644 index 000000000000..b9f0380a773a --- /dev/null +++ b/net-p2p/resilio-sync/files/resilio-sync.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/rslsync" +name="Resilio Sync" +description="Resilio Sync" +command_user="${USER:-rslsync}::${GROUP:-rslsync}" +pidfile="/run/resilio-sync/resilio-sync.pid" +config=${CONFIG:-/etc/resilio-sync/config.json} +command_args="--config $config ${OPTS}" +start_stop_daemon_args="-q" +retry="10" + +depend() { + need net + provide resilio-sync +} diff --git a/net-p2p/resilio-sync/files/resilio-sync.service b/net-p2p/resilio-sync/files/resilio-sync.service new file mode 100644 index 000000000000..32f24a95aa84 --- /dev/null +++ b/net-p2p/resilio-sync/files/resilio-sync.service @@ -0,0 +1,17 @@ +[Unit] +Description=Resilio Sync service +Documentation=http://help.getsync.com/ +After=network.target network-online.target + +[Service] +Type=forking +User=rslsync +Group=rslsync +UMask=0002 +Restart=on-failure +PermissionsStartOnly=true +PIDFile=/var/run/resilio-sync/resilio-sync.pid +ExecStart=/usr/bin/rslsync --config /etc/resilio-sync/config.json + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/resilio-sync/files/resilio-sync.tmpfile b/net-p2p/resilio-sync/files/resilio-sync.tmpfile new file mode 100644 index 000000000000..d0f6e0adc420 --- /dev/null +++ b/net-p2p/resilio-sync/files/resilio-sync.tmpfile @@ -0,0 +1 @@ +d /run/resilio-sync 0755 rslsync rslsync diff --git a/net-p2p/resilio-sync/metadata.xml b/net-p2p/resilio-sync/metadata.xml new file mode 100644 index 000000000000..35827ed4235b --- /dev/null +++ b/net-p2p/resilio-sync/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>spiderx@spiderx.dp.ua</email> + <name>Vladimir Pavljuchenkov</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + Resilio Sync is a proprietary peer-to-peer multiplatform file synchronization tool + It can sync files between devices on a local network, or between remote devices + over the Internet via a modified version of the BitTorrent protocol. + </longdescription> + <use> + <flag name="pax_kernel">Use paxctl to mark binaries</flag> + </use> + <upstream> + <doc>https://help.getsync.com/</doc> + <bugs-to>https://help.getsync.com/hc/en-us/requests/new?ticket_form_id=91563</bugs-to> + </upstream> +</pkgmetadata> diff --git a/net-p2p/resilio-sync/resilio-sync-2.5.12.ebuild b/net-p2p/resilio-sync/resilio-sync-2.5.12.ebuild new file mode 100644 index 000000000000..908b87b2209d --- /dev/null +++ b/net-p2p/resilio-sync/resilio-sync-2.5.12.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +BASE_URI="http://linux-packages.resilio.com/${PN}/deb/pool/non-free/r/${PN}/${PN}_${PV}-1_@arch@.deb" + +inherit pax-utils readme.gentoo-r1 systemd tmpfiles unpacker user + +NAME="rslsync" +QA_PREBUILT="usr/bin/${NAME}" + +DESCRIPTION="Resilient, fast and scalable file synchronization tool" +HOMEPAGE="https://getsync.com/" +SRC_URI="amd64? ( ${BASE_URI/@arch@/amd64} ) + x86? ( ${BASE_URI/@arch@/i386} )" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pax_kernel" +RESTRICT="mirror" + +S="${WORKDIR}" + +DOC_CONTENTS="You may need to review /etc/${PN}/config.json\n +Default metadata path is /var/lib/${PN}/.sync\n +Default web-gui URL is http://localhost:8888/\n\n" + +pkg_setup() { + enewgroup ${NAME} + enewuser ${NAME} -1 -1 /var/lib/${PN} ${NAME} +} + +src_unpack() { + unpacker_src_unpack + + unpack usr/share/man/man1/${PN}.1.gz +} + +src_install() { + dobin usr/bin/${NAME} + use pax_kernel && pax-mark m "${ED%/}"/usr/bin/${NAME} + + doman ${PN}.1 + + dodir /var/log/${PN} + keepdir /etc/${PN} /var/lib/${PN}/ /var/lib/${PN}/.sync + fperms 0700 /etc/${PN} /var/lib/${PN} /var/lib/${PN}/.sync /var/log/${PN} + fowners -R ${NAME}:${NAME} /etc/${PN} /var/lib/${PN} /var/log/${PN} + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}-user.initd ${PN}-user + newconfd "${FILESDIR}"/${PN}-user.confd ${PN}-user + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_douserunit "${FILESDIR}"/${PN}-user.service + newtmpfiles "${FILESDIR}"/resilio-sync.tmpfile resilio-sync.conf + + readme.gentoo_create_doc + + # Generate sample config + "${ED%/}"/usr/bin/${NAME} --dump-sample-config > \ + "${ED%/}"/etc/${PN}/config.json || die "generate config failed" + fowners ${NAME}:${NAME} /etc/${PN}/config.json + # Uncomment config directives and change their values + sed -i \ + -e "/storage_path/s|//| |g" \ + -e "/pid_file/s|//| |g" \ + -e "/storage_path/s|/home/user/.sync|/var/lib/${PN}/.sync|g" \ + -e "/pid_file/s|resilio/resilio|${PN}/${PN}|g" \ + "${ED%/}"/etc/${PN}/config.json || die "sed failed for config.json" +} + +pkg_postinst() { + tmpfiles_process resilio-sync.conf + readme.gentoo_print_elog +} |