summaryrefslogtreecommitdiff
path: root/app-admin/clsync
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/clsync
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/clsync')
-rw-r--r--app-admin/clsync/Manifest11
-rw-r--r--app-admin/clsync/clsync-0.4.1.ebuild114
-rw-r--r--app-admin/clsync/clsync-0.4.2.ebuild103
-rw-r--r--app-admin/clsync/files/clsync.conf18
-rw-r--r--app-admin/clsync/files/clsync.confd20
-rw-r--r--app-admin/clsync/files/clsync.initd17
-rw-r--r--app-admin/clsync/metadata.xml30
7 files changed, 313 insertions, 0 deletions
diff --git a/app-admin/clsync/Manifest b/app-admin/clsync/Manifest
new file mode 100644
index 000000000000..9cb5455631f5
--- /dev/null
+++ b/app-admin/clsync/Manifest
@@ -0,0 +1,11 @@
+AUX clsync.conf 589 SHA256 1a8689b86cf9475ef72ef42a623a1bb1ae55abff31578dcfdf3537331c681815 SHA512 46d8d786378eed0bfa46195e45f764015258ba55b35a5acf2685967e9fbd1fc7656c6aeba26b06889fa2f7c62cb11ecb84b10b856356ea3c0d463eaa4980c33d WHIRLPOOL cd9a0800b75eab476d7feec079f23538295dca5067f979ce4280c3188b9a24adf7c78e0c2ec5e2e8cadd71d11be181d873bc462d9fe321ada85e4e11690272db
+AUX clsync.confd 645 SHA256 ae7e9cacf618f9a32a4a1580580a901831aaaa0abb9de9e0379fbcc6a7359b0d SHA512 75dcc49d51f6da94d42eb501f1ad2868f163405dd7aa933f4c8078ec18f5b54eb6c66ff796ee744f7751699162627af843edbe5de5adf99c23712cedaebaddc5 WHIRLPOOL 06289c7645430d10b242983daa9cd2d4c2f327b34ede308012354947c64c654a7864586743ae6de7c02770a8b1c22de04b63404a6431b317b328ac6ac1e121ce
+AUX clsync.initd 555 SHA256 f069ae391839cde8d9108f640967f53be237a05a8811ecc36ccac876076da1ce SHA512 a5ee987466dec0e8ca7ce2502bd71d000419e03f33e1585e47fa5d91fdb5321f949f3d3ca566e68a0aedcc50ab6a84a92210aa866520d1703805958a2bfa270a WHIRLPOOL c39ee0c82a2ed50dea4053595907d08eddbe7c8506ac449a471180d7c17ba85908d888fd65d7d10a9429faff25fe7ad98b04d4bf7fae55350a9d53a9914520a0
+DIST clsync-0.4.1-20150524-v2.patch.xz 13632 SHA256 90a1ef820c83629c528e8c6fe4da5183caf60f8079c4de01a6d26945734c92f7 SHA512 d39c3c4f116eff2365668374ef62f4dfd8e5926267cbbf36b430f97ad5306f92cf6be3164c0e1c3d959db55453f5ded00d98d48af62f9eacde39a9f9667cfbf9 WHIRLPOOL d22fc6a1f0a59514506377f26ab7d9c0f4faca0abab044f2ce2e61ffa973ff04b43da561a4dd5c69d99e21108baa71d77bb2ea524313661b3b2440ceddca56aa
+DIST clsync-0.4.1.tar.gz 253890 SHA256 3f14a72d7c3c1747ea908e373f25bd1918ce00450492fbb7094549db6bf21e27 SHA512 875280f706026d44806b92c22fa58d016136b2792f67a6b7e77f932465081da7a1ebaf22c25e538e4b58bfe04cd1cd5450ecab99c3df53ddd2a0fa966442d444 WHIRLPOOL 10ab11821766f7d16d03993069ac4da5fe362a1e5977ea6721e49ada7044d3659e59b507b03be4de09609b0a0ca9d7878407d7b6e1f40df5dbe1d041dac373cb
+DIST clsync-0.4.2.tar.gz 256042 SHA256 1af63b86c1d0bd663311f2129792446dc8fc4def5559f76658b51b69a8d0c3bd SHA512 d14a2efc4bf58d9d5c7a3fe5634cacdd182cd7cd814b0e9ebd99024a7282b056d1f7ceeec6903666391c3572d599a18e205af818b098ed7768d5c0e0f4cd1200 WHIRLPOOL a59446337282cb63455b43bbbf17ad1213e39713d9c267ca5ee8785d863bc90e7b99e5938e4d5be02f3103a98b1bb5d5a628580160952d821e6caaad72fa2679
+EBUILD clsync-0.4.1.ebuild 3051 SHA256 f22a4b9ab0d2cb322be86004658a1815c8e9a29a6196080a233b936820a8e3b5 SHA512 db6893a5290741d7d42225875c145cc9b783fb722f7484b5393752c43e64f65b53287c3e4a3156f46013a3045514df997e3f49501f82795715f71601e2a49ca2 WHIRLPOOL 0989fe54d28dc8c144b7622c48d72fbc7d3526486b1c2e94d2c54084066ddf405bf4a91d6a2782bbf050b4097eca208476eb1e9174da6930ebaf7c54dd219664
+EBUILD clsync-0.4.2.ebuild 2793 SHA256 3b79c7be3de56a0d6294492e46f342c7757cda6b87b4fea317880c9119ba874c SHA512 380171a754b0d590a14c4977f811198168dbd7f47d735692d3df5766ebabbcf746126a54cb7b0181628ef787777db250f909230d662ab3badaa672c49236e191 WHIRLPOOL 733ed7e0d0148783522d30899ba86fc3691130fda08997f1c49b33a3ecc5cfad7a43e51c808682d5a31786436cbb0676aa62bf05db75fb997a8c4a2a0da3dbf9
+MISC ChangeLog 2962 SHA256 d5b62034717437020f5058b8c468fa4119252593547922410b37b6a71f7068ef SHA512 0c90e875b0a2c0cd589da8e55958227c3f30c55cb679496529a08f887e7828efd009551596a82cb5097be0f6ca9a78858793dd49683169b01591f864df5f1215 WHIRLPOOL ac8f5a7ed481e4fbf8e719164b01d9dd87360831af32f984b50da796fab012b0f4aa331dcffb650d9af091418bb360b2ca9f277fb4a390f6fb9d6eb7e606e882
+MISC ChangeLog-2015 1982 SHA256 e10340a7e895ac6a9aafd46e26d343af58e4b88b3c74d6998d851d179444877d SHA512 91ffbc4f2dd905d17c96d4354dbe6193f8ea99ed2205611135ba3e9b03d8f39b2cc0258a84a4646939aa87802b5707ca4aa3fe726cc89f77edad2d875d9d1957 WHIRLPOOL fc0d1176857a30ee64325a76f501db82d5b29283f62acd0d771e5482f48c89ff417202ef6e2f66a43093a79b65c5e9e302d571f00972c44ae4683380045b7b67
+MISC metadata.xml 1757 SHA256 8afe98dcdcfdd808cb18fc3dcdde28a8f6039c6e276f58d69cdf6914a3133df8 SHA512 6f853983a4886bbacb2fe1e26b728ba5d86b05f348b6df2cf0779725ef11623f73274829605b88aacd4300b4cb28ff6fbeead916c8dd01f4a07c9780218f1bfa WHIRLPOOL f91a987b0431d0062b908a59ee2dd550c601a9b62d57c35838f8cdbb3260a6dc85a81b240e3a70c5d8dd966a080ec2282fea0cf72b5c487b836acf1b4d693005
diff --git a/app-admin/clsync/clsync-0.4.1.ebuild b/app-admin/clsync/clsync-0.4.1.ebuild
new file mode 100644
index 000000000000..c037951819d2
--- /dev/null
+++ b/app-admin/clsync/clsync-0.4.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/xaionaro/${PN}.git"
+else
+ PVER="20150524-v2"
+ SRC_URI="
+ https://github.com/xaionaro/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~bircoph/patches/${P}-${PVER}.patch.xz
+ "
+ KEYWORDS="~amd64 ~x86"
+fi
+
+inherit autotools eutils linux-info
+
+DESCRIPTION="Live sync tool based on inotify, written in GNU C"
+HOMEPAGE="https://github.com/xaionaro/clsync http://ut.mephi.ru/oss/clsync"
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="+caps cluster control-socket cgroups debug extra-debug
+extra-hardened gio hardened +highload-locks +inotify mhash
+namespaces seccomp"
+
+REQUIRED_USE="
+ || ( gio inotify )
+ extra-debug? ( debug )
+ extra-hardened? ( hardened )
+ mhash? ( cluster )
+ seccomp? ( caps )
+"
+CDEPEND="
+ dev-libs/glib:2
+ cgroups? ( dev-libs/libcgroup )
+ mhash? ( app-crypt/mhash )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ ~app-doc/clsync-docs-${PV}
+"
+
+pkg_pretend() {
+ use namespaces && CONFIG_CHECK="~NAMESPACES ~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP"
+ check_extra_config
+}
+
+src_prepare() {
+ # upstream fixes for 0.4.1
+ epatch "${WORKDIR}/${P}-${PVER}.patch"
+ eautoreconf
+}
+
+src_configure() {
+ local harden_level=0
+ use hardened && harden_level=1
+ use extra-hardened && harden_level=2
+
+ local debug_level=0
+ use debug && debug_level=1
+ use extra-debug && debug_level=2
+
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --disable-socket-library \
+ --enable-clsync \
+ --enable-debug=${debug_level} \
+ --enable-paranoid=${harden_level} \
+ --without-bsm \
+ --without-kqueue \
+ $(use_enable caps capabilities) \
+ $(use_enable cluster) \
+ $(use_enable control-socket socket) \
+ $(use_enable highload-locks) \
+ $(use_enable namespaces unshare) \
+ $(use_enable seccomp) \
+ $(use_with cgroups libcgroup) \
+ $(use_with gio gio lib) \
+ $(use_with inotify inotify native) \
+ $(use_with mhash)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # docs go into clsync-docs
+ rm -rf "${ED}/usr/share/doc" || die
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ # filter rules and sync scripts are supposed to be here
+ keepdir "${EPREFIX}/etc/${PN}"
+ insinto "/etc/${PN}"
+ newins "${FILESDIR}/${PN}.conf" "${PN}.conf"
+}
+
+pkg_postinst() {
+ einfo "${PN} is just a convenient way to run synchronization tools on live data,"
+ einfo "it doesn't copy data itself, so you need to install software to do actual"
+ einfo "data transfer. Usually net-misc/rsync is a good choise, but ${PN} is"
+ einfo "is flexible enough to use any user tool, see manual page for details."
+ einfo
+ einfo "${PN} init script can be multiplexed, to use symlink init script to"
+ einfo "othername and use conf.d/othername to configure it."
+ einfo
+ einfo "If you're interested in improved security, enable"
+ einfo "USE=\"caps cgroups hardened namespaces seccomp\""
+}
diff --git a/app-admin/clsync/clsync-0.4.2.ebuild b/app-admin/clsync/clsync-0.4.2.ebuild
new file mode 100644
index 000000000000..d0e9c3ece979
--- /dev/null
+++ b/app-admin/clsync/clsync-0.4.2.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils linux-info
+
+DESCRIPTION="Live sync tool based on inotify, written in GNU C"
+HOMEPAGE="https://github.com/xaionaro/clsync http://ut.mephi.ru/oss/clsync"
+SRC_URI="https://github.com/xaionaro/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+caps cluster control-socket cgroups debug extra-debug
+extra-hardened gio hardened +highload-locks +inotify mhash
+namespaces seccomp"
+
+REQUIRED_USE="
+ || ( gio inotify )
+ extra-debug? ( debug )
+ extra-hardened? ( hardened )
+ mhash? ( cluster )
+ seccomp? ( caps )
+"
+CDEPEND="
+ dev-libs/glib:2
+ cgroups? ( dev-libs/libcgroup )
+ mhash? ( app-crypt/mhash )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ ~app-doc/clsync-docs-${PV}
+"
+
+pkg_pretend() {
+ use namespaces && CONFIG_CHECK="~NAMESPACES ~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS"
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP"
+ check_extra_config
+}
+
+src_prepare() {
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ local harden_level=0
+ use hardened && harden_level=1
+ use extra-hardened && harden_level=2
+
+ local debug_level=0
+ use debug && debug_level=1
+ use extra-debug && debug_level=2
+
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --disable-socket-library \
+ --enable-clsync \
+ --enable-debug=${debug_level} \
+ --enable-paranoid=${harden_level} \
+ --without-bsm \
+ --without-kqueue \
+ $(use_enable caps capabilities) \
+ $(use_enable cluster) \
+ $(use_enable control-socket socket) \
+ $(use_enable highload-locks) \
+ $(use_enable namespaces unshare) \
+ $(use_enable seccomp) \
+ $(use_with cgroups libcgroup) \
+ $(use_with gio gio lib) \
+ $(use_with inotify inotify native) \
+ $(use_with mhash)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ # docs go into clsync-docs
+ rm -rf "${ED}/usr/share/doc" || die
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ # filter rules and sync scripts are supposed to be here
+ keepdir "${EPREFIX}/etc/${PN}"
+ insinto "/etc/${PN}"
+ newins "${FILESDIR}/${PN}.conf" "${PN}.conf"
+}
+
+pkg_postinst() {
+ einfo "${PN} is just a convenient way to run synchronization tools on live data,"
+ einfo "it doesn't copy data itself, so you need to install software to do actual"
+ einfo "data transfer. Usually net-misc/rsync is a good choise, but ${PN} is"
+ einfo "is flexible enough to use any user tool, see manual page for details."
+ einfo
+ einfo "${PN} init script can be multiplexed, to use symlink init script to"
+ einfo "othername and use conf.d/othername to configure it."
+ einfo
+ einfo "If you're interested in improved security, enable"
+ einfo "USE=\"caps cgroups hardened namespaces seccomp\""
+}
diff --git a/app-admin/clsync/files/clsync.conf b/app-admin/clsync/files/clsync.conf
new file mode 100644
index 000000000000..91f38f17cd5c
--- /dev/null
+++ b/app-admin/clsync/files/clsync.conf
@@ -0,0 +1,18 @@
+# clsync system configuration file
+#
+# General recommendations:
+# 1. Put --dir-lists on tmpfs.
+# 2. Use --uid and --gid to drop privileges whenever possible.
+# 3. Keeep your clsync rules and sync scripts in /etc/clsync/.
+
+[default]
+# Put your options here, see clsync man pages for a list of valid options.
+# Also check examples directory (/usr/share/doc/clsync-*/examples).
+#
+#watch-dir = /what/dir/to/sync
+#sync-handler = /etc/clsync/action.sh
+#rules-dir = /etc/clsync/rules
+#lists-dir = /tmp/clsync
+#threading = safe
+#delay-sync = 5
+#delay-collect = 5
diff --git a/app-admin/clsync/files/clsync.confd b/app-admin/clsync/files/clsync.confd
new file mode 100644
index 000000000000..389f84e5d4b9
--- /dev/null
+++ b/app-admin/clsync/files/clsync.confd
@@ -0,0 +1,20 @@
+# /etc/conf.d/clsync: config file for /etc/init.d/clsync
+
+# config file, default is /etc/clsync/clsync.conf.
+# to disable set to /dev/null
+#CLSYNC_CONF="/etc/clsync/clsync.conf"
+
+# clsync options, have precedence over config file,
+# see man clsync and $docdir/examples for details
+#CLSYNC_OPTS=""
+
+# Example of direct rsync usage:
+#CLSYNC_OPTS="--lists-dir /tmp/clsync --mode rsyncshell
+#--watch-dir /source/dir --sync-handler /usr/bin/rsync
+#--rules-file /etc/clsync/rules --distination-dir /destination/dir"
+
+# Change clsync nice level (default is unset)
+#CLSYNC_NICE="0"
+
+# Change clsync ionice level (default is unset)
+#CLSYNC_IONICE="2:7"
diff --git a/app-admin/clsync/files/clsync.initd b/app-admin/clsync/files/clsync.initd
new file mode 100644
index 000000000000..28175a5fb696
--- /dev/null
+++ b/app-admin/clsync/files/clsync.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -n "${CLSYNC_CONF}" ] && conffile="--config-file ${CLSYNC_CONF}"
+[ -n "${CLSYNC_NICE}" ] && cmd_nice="--nice ${CLSYNC_NICE}"
+[ -n "${CLSYNC_IONICE}" ] && cmd_ionice="--ionice ${CLSYNC_IONICE}"
+
+command="/usr/bin/clsync"
+pidfile="/var/run/${SVCNAME}.pid"
+command_args="--background --output=syslog --pid-file=${pidfile} \
+${conffile} ${CLSYNC_OPTS}"
+start_stop_daemon_args="${cmd_nice} ${cmd_ionice}"
+
+depend() {
+ use net
+}
diff --git a/app-admin/clsync/metadata.xml b/app-admin/clsync/metadata.xml
new file mode 100644
index 000000000000..9cbe60e8159c
--- /dev/null
+++ b/app-admin/clsync/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+ <longdescription>
+ Clsync recursively watches for source directory and executes external
+ program to sync the changes. Clsync is adapted to be used together with rsync.
+ This utility is much more lightweight than competitors and supports such
+ features as separate queue for big files, regex file filter, multi-threading
+ and multicast notifing clsync instances on another nodes to prevent loop
+ syncing. Clsync can use advanced features for isolation: capabilities, cgroups,
+ namespaces, seccomp, code hardening.
+</longdescription>
+ <use>
+ <flag name="cluster">Enable clustering support (allows master-master clsync on multiple hosts). Not fully implemented yet.</flag>
+ <flag name="control-socket">Enable AF_UNIX control socket support.</flag>
+ <flag name="cgroups">Use cgroups to limit /dev access.</flag>
+ <flag name="extra-debug">Enable extra debugging. This will hurt performance badly. Be ready for tons of output.</flag>
+ <flag name="extra-hardened">Enable extra security checks. This will hurt performance.</flag>
+ <flag name="gio">Enable GIO for FS monitoring (glib based alternative to inotify interface, not recommended; if both are compiled, may be selected at runtime).</flag>
+ <flag name="highload-locks">Allows to use spinlocks for short delays instead of mutexes, but only on SMP systems.</flag>
+ <flag name="namespaces">Enable namespaces isolation.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">xaionaro/clsync</remote-id>
+ </upstream>
+</pkgmetadata>