diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/clsync | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/clsync')
-rw-r--r-- | app-admin/clsync/Manifest | 2 | ||||
-rw-r--r-- | app-admin/clsync/clsync-0.4.1.ebuild | 115 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync.conf | 18 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync.confd | 20 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync.initd | 18 | ||||
-rw-r--r-- | app-admin/clsync/metadata.xml | 31 |
6 files changed, 204 insertions, 0 deletions
diff --git a/app-admin/clsync/Manifest b/app-admin/clsync/Manifest new file mode 100644 index 000000000000..a815e0c547a5 --- /dev/null +++ b/app-admin/clsync/Manifest @@ -0,0 +1,2 @@ +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 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..88f6b6f9ae0b --- /dev/null +++ b/app-admin/clsync/clsync-0.4.1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 + http://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 ) +" +RDEPEND=" + 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/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..d350f3ddb40b --- /dev/null +++ b/app-admin/clsync/files/clsync.initd @@ -0,0 +1,18 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +[[ -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..1d11fa5416aa --- /dev/null +++ b/app-admin/clsync/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <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> + <flag name="seccomp">Enable seccomp for system call filtering.</flag> + </use> + <upstream> + <remote-id type="github">xaionaro/clsync</remote-id> + </upstream> +</pkgmetadata> |