From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-admin/clsync/Manifest | 9 +++ app-admin/clsync/clsync-0.4.1.ebuild | 114 +++++++++++++++++++++++++++++++++++ app-admin/clsync/clsync-0.4.2.ebuild | 103 +++++++++++++++++++++++++++++++ app-admin/clsync/files/clsync.conf | 18 ++++++ app-admin/clsync/files/clsync.confd | 20 ++++++ app-admin/clsync/files/clsync.initd | 17 ++++++ app-admin/clsync/metadata.xml | 30 +++++++++ 7 files changed, 311 insertions(+) create mode 100644 app-admin/clsync/Manifest create mode 100644 app-admin/clsync/clsync-0.4.1.ebuild create mode 100644 app-admin/clsync/clsync-0.4.2.ebuild create mode 100644 app-admin/clsync/files/clsync.conf create mode 100644 app-admin/clsync/files/clsync.confd create mode 100644 app-admin/clsync/files/clsync.initd create mode 100644 app-admin/clsync/metadata.xml (limited to 'app-admin/clsync') diff --git a/app-admin/clsync/Manifest b/app-admin/clsync/Manifest new file mode 100644 index 000000000000..4f5a18638f12 --- /dev/null +++ b/app-admin/clsync/Manifest @@ -0,0 +1,9 @@ +AUX clsync.conf 589 BLAKE2B fb7736b0972c91916770c6cfca693267bdf0cb3f6ad540388967c80fe609579fe458c40d71622fde0c2a3709530419536d1c358035637b2309ecde71892ee448 SHA512 46d8d786378eed0bfa46195e45f764015258ba55b35a5acf2685967e9fbd1fc7656c6aeba26b06889fa2f7c62cb11ecb84b10b856356ea3c0d463eaa4980c33d +AUX clsync.confd 645 BLAKE2B f2e2f70f5a88ea3a416f4151637d63f79cce483b499ee0c1b5005ef8e9d16558f0d1c23ddd182335f7e963172bafaf4b41a37c1288f7fe55e7a57e2868418ae1 SHA512 75dcc49d51f6da94d42eb501f1ad2868f163405dd7aa933f4c8078ec18f5b54eb6c66ff796ee744f7751699162627af843edbe5de5adf99c23712cedaebaddc5 +AUX clsync.initd 555 BLAKE2B 18b3f0e1e8e079eb306709d2b55b99100ce3efa852f285d7ac9acd4269fe41e0fe5d1b7c12fa966dc01f60a598d6178cf5c8b6a2cd21410bdcf0f66c1facf1d2 SHA512 a5ee987466dec0e8ca7ce2502bd71d000419e03f33e1585e47fa5d91fdb5321f949f3d3ca566e68a0aedcc50ab6a84a92210aa866520d1703805958a2bfa270a +DIST clsync-0.4.1-20150524-v2.patch.xz 13632 BLAKE2B 422ec7dc05c2f21aa96c397efa7ce1079b882d5ec4ce14beb8ce5e308e134142dcc557857ff8162b5fba84d8eaa078016794ed26433427d6a80e4e4f81fd90a8 SHA512 d39c3c4f116eff2365668374ef62f4dfd8e5926267cbbf36b430f97ad5306f92cf6be3164c0e1c3d959db55453f5ded00d98d48af62f9eacde39a9f9667cfbf9 +DIST clsync-0.4.1.tar.gz 253890 BLAKE2B c8aada690635f1cac355a1eaa51f4379688b0005869c5dcd6edccf5ae8e86abddf9ff99ccfcffeb165ccc80f407087a3f0863d1b78279894ff410daf25467740 SHA512 875280f706026d44806b92c22fa58d016136b2792f67a6b7e77f932465081da7a1ebaf22c25e538e4b58bfe04cd1cd5450ecab99c3df53ddd2a0fa966442d444 +DIST clsync-0.4.2.tar.gz 256042 BLAKE2B 28474fc66341b93705a502fcff390e3affcd89a9e1eb272dce9b28be709562e09c03e9c300cfeb5371e2e618a2239468a58c46212a39d751fbbfddeaab12bcf6 SHA512 d14a2efc4bf58d9d5c7a3fe5634cacdd182cd7cd814b0e9ebd99024a7282b056d1f7ceeec6903666391c3572d599a18e205af818b098ed7768d5c0e0f4cd1200 +EBUILD clsync-0.4.1.ebuild 3051 BLAKE2B c70ff1c28fe6e5ad077d00e004894e20f9a683da431191484bb9b6c6671637940a76255f2bb64382aeb08b67364f8b203159b5f51b6f622e965ce12722129656 SHA512 db6893a5290741d7d42225875c145cc9b783fb722f7484b5393752c43e64f65b53287c3e4a3156f46013a3045514df997e3f49501f82795715f71601e2a49ca2 +EBUILD clsync-0.4.2.ebuild 2793 BLAKE2B 4b72e721e319ec0187a6ca38b3d90cdbec4385a654ad97bbf26a55ebfa433650ac212cc33ca41481b434ce9dcb20245ce58ca2d47faf7a03cb9ffb1372c77a2e SHA512 380171a754b0d590a14c4977f811198168dbd7f47d735692d3df5766ebabbcf746126a54cb7b0181628ef787777db250f909230d662ab3badaa672c49236e191 +MISC metadata.xml 1757 BLAKE2B e907cb32524743bc5571eddc4d0c7a30b51b82f49f72405939110e3085a8561b55e5927950be83ae3a647418479183aeae8491092ba8e5432a7633365f769e2a SHA512 6f853983a4886bbacb2fe1e26b728ba5d86b05f348b6df2cf0779725ef11623f73274829605b88aacd4300b4cb28ff6fbeead916c8dd01f4a07c9780218f1bfa 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 @@ + + + + + bircoph@gentoo.org + Andrew Savchenko + + + 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. + + + Enable clustering support (allows master-master clsync on multiple hosts). Not fully implemented yet. + Enable AF_UNIX control socket support. + Use cgroups to limit /dev access. + Enable extra debugging. This will hurt performance badly. Be ready for tons of output. + Enable extra security checks. This will hurt performance. + Enable GIO for FS monitoring (glib based alternative to inotify interface, not recommended; if both are compiled, may be selected at runtime). + Allows to use spinlocks for short delays instead of mutexes, but only on SMP systems. + Enable namespaces isolation. + + + xaionaro/clsync + + -- cgit v1.2.3