diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2015-05-25 00:20:55 +0000 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2015-05-25 00:20:55 +0000 |
commit | 1df11dc8297f207f17396fdbdfc929a7c8538cc4 (patch) | |
tree | e117c0c91b115cf34a5811f2d71ed6bba2a54ecb /app-admin/clsync | |
parent | Remove old. (diff) | |
download | gentoo-2-1df11dc8297f207f17396fdbdfc929a7c8538cc4.tar.gz gentoo-2-1df11dc8297f207f17396fdbdfc929a7c8538cc4.tar.bz2 gentoo-2-1df11dc8297f207f17396fdbdfc929a7c8538cc4.zip |
Remove old.
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
(Portage version: 2.2.20/cvs/Linux i686, signed Manifest commit with key 565953B95372756C)
Diffstat (limited to 'app-admin/clsync')
-rw-r--r-- | app-admin/clsync/ChangeLog | 11 | ||||
-rw-r--r-- | app-admin/clsync/clsync-0.4-r1.ebuild | 115 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-direct_mode.patch | 61 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-gio.patch | 32 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-handler_path.patch | 30 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-hl_locks.patch | 37 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-retries-arg.patch | 13 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-strtol.patch | 179 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-unset_env.patch | 43 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-unshare-configure.patch | 38 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-unshare-ifdef.patch | 34 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-unused-deps.patch | 140 | ||||
-rw-r--r-- | app-admin/clsync/files/clsync-0.4-version.patch | 19 |
13 files changed, 10 insertions, 742 deletions
diff --git a/app-admin/clsync/ChangeLog b/app-admin/clsync/ChangeLog index 7b994670d857..bedcb60a1427 100644 --- a/app-admin/clsync/ChangeLog +++ b/app-admin/clsync/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-admin/clsync # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/clsync/ChangeLog,v 1.5 2015/05/25 00:11:52 bircoph Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/clsync/ChangeLog,v 1.6 2015/05/25 00:20:54 bircoph Exp $ + + 25 May 2015; Andrew Savchenko <bircoph@gentoo.org> -clsync-0.4-r1.ebuild, + -files/clsync-0.4-direct_mode.patch, -files/clsync-0.4-gio.patch, + -files/clsync-0.4-handler_path.patch, -files/clsync-0.4-hl_locks.patch, + -files/clsync-0.4-retries-arg.patch, -files/clsync-0.4-strtol.patch, + -files/clsync-0.4-unset_env.patch, -files/clsync-0.4-unshare-configure.patch, + -files/clsync-0.4-unshare-ifdef.patch, -files/clsync-0.4-unused-deps.patch, + -files/clsync-0.4-version.patch: + Remove old. *clsync-0.4.1 (25 May 2015) diff --git a/app-admin/clsync/clsync-0.4-r1.ebuild b/app-admin/clsync/clsync-0.4-r1.ebuild deleted file mode 100644 index d386b3213fc3..000000000000 --- a/app-admin/clsync/clsync-0.4-r1.ebuild +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/clsync/clsync-0.4-r1.ebuild,v 1.1 2015/02/20 18:36:49 bircoph Exp $ - -EAPI=5 - -if [[ ${PV} == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/xaionaro/${PN}.git" -else - SRC_URI="https://github.com/xaionaro/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - 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 doc +examples -extra-hardened gio hardened +highload-locks +inotify mhash -namespaces seccomp" - -REQUIRED_USE=" - || ( gio inotify ) - extra-hardened? ( hardened ) - mhash? ( cluster )" - -RDEPEND=" - dev-libs/glib:2 - cgroups? ( dev-libs/libcgroup ) - mhash? ( app-crypt/mhash ) -" -DEPEND="${RDEPEND} - virtual/pkgconfig - doc? ( ~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 - epatch \ - "${FILESDIR}/${P}-gio.patch" \ - "${FILESDIR}/${P}-unshare-configure.patch" \ - "${FILESDIR}/${P}-unshare-ifdef.patch" \ - "${FILESDIR}/${P}-version.patch" \ - "${FILESDIR}/${P}-direct_mode.patch" \ - "${FILESDIR}/${P}-handler_path.patch" \ - "${FILESDIR}/${P}-hl_locks.patch" \ - "${FILESDIR}/${P}-unset_env.patch" \ - "${FILESDIR}/${P}-unused-deps.patch" \ - "${FILESDIR}/${P}-retries-arg.patch" \ - "${FILESDIR}/${P}-strtol.patch" - eautoreconf -} - -src_configure() { - local harden_level=0 - use hardened && harden_level=1 - use extra-hardened && harden_level=2 - - econf \ - --docdir="${EPREFIX}/usr/share/doc/${PF}" \ - --disable-socket-library \ - --enable-clsync \ - --enable-paranoid=${harden_level} \ - --without-bsm \ - --without-kqueue \ - $(use_enable caps capabilities) \ - $(use_enable cluster) \ - $(use_enable control-socket socket) \ - $(use_enable debug) \ - $(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 - - # remove unwanted docs - rm "${ED}/usr/share/doc/${PF}/LICENSE" || die "failed to cleanup docs" - use examples || rm -r "${ED}/usr/share/doc/${PF}/examples" || die "failed to remove examples" - - 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-0.4-direct_mode.patch b/app-admin/clsync/files/clsync-0.4-direct_mode.patch deleted file mode 100644 index 2a9c06e96322..000000000000 --- a/app-admin/clsync/files/clsync-0.4-direct_mode.patch +++ /dev/null @@ -1,61 +0,0 @@ -commit 1fe2a05438de390dc12a653bc50ddf591fa79733 -Author: Dmitry Yu Okunev <dyokunev@ut.mephi.ru> -Date: Wed Jan 28 11:39:09 2015 +0300 - - Fixed the path '' in direct mode. - - '' -> '.' - - Thanks for bugreport to: Andrew A Savchenko <bircoph@gentoo.org> - -diff --git a/sync.c b/sync.c -index b6d3341..490ea39 100644 ---- a/sync.c -+++ b/sync.c -@@ -1959,6 +1959,25 @@ int fileischanged(ctx_t *ctx_p, indexes_t *indexes_p, const char *path_rel, stat - return 1; - } - -+static inline int sync_indexes_fpath2ei_addfixed(ctx_t *ctx_p, indexes_t *indexes_p, const char *fpath, eventinfo_t *evinfo) { -+ static const char fpath_dot[] = "."; -+ const char *fpath_fixed; -+ -+ fpath_fixed = fpath; -+ switch (ctx_p->flags[MODE]) { -+ case MODE_DIRECT: -+ -+ // If fpath is empty (that means CWD) then assign it to "." -+ if (!*fpath) -+ fpath_fixed = fpath_dot; -+ break; -+ default: -+ break; -+ } -+ -+ return indexes_fpath2ei_add(indexes_p, strdup(fpath_fixed), evinfo); -+} -+ - int sync_prequeue_loadmark - ( - int monitored, -@@ -2145,7 +2164,8 @@ int sync_prequeue_loadmark - ); - - if (isnew) -- indexes_fpath2ei_add(indexes_p, strdup(path_rel), evinfo); -+ // Fix the path (if required) and call indexes_fpath2ei_add() to remeber the new object to be synced -+ sync_indexes_fpath2ei_addfixed(ctx_p, indexes_p, path_rel, evinfo); - - return 0; - } -@@ -2288,7 +2308,9 @@ void _sync_idle_dosync_collectedevents(gpointer fpath_gp, gpointer evinfo_gp, gp - - if (isnew) { - debug(4, "Collecting \"%s\"", fpath); -- indexes_fpath2ei_add(indexes_p, strdup(fpath), evinfo_idx); -+ -+ // Fix the path (if required) and call indexes_fpath2ei_add() to remeber the new object to be synced -+ sync_indexes_fpath2ei_addfixed(ctx_p, indexes_p, fpath, evinfo_idx); - } else - free(fpath); - diff --git a/app-admin/clsync/files/clsync-0.4-gio.patch b/app-admin/clsync/files/clsync-0.4-gio.patch deleted file mode 100644 index cdcbbc2ebc8c..000000000000 --- a/app-admin/clsync/files/clsync-0.4-gio.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 4eea85337a3358baae0b4f0626d63a9626778a01 -Author: Andrew Savchenko <bircoph@gmail.com> -Date: Wed Jan 28 02:50:36 2015 +0300 - - Add GIO to the list of allowed file monitors. - - This allows to compile clsync ONLY with GIO support. - -diff --git a/configure.ac b/configure.ac -index f497c67..a3f0324 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -262,7 +262,7 @@ dnl tre check - # ;; - #esac - --dnl kqueue/inotify/bsm -+dnl kqueue/inotify/gio/bsm - - AC_ARG_WITH(kqueue, - AS_HELP_STRING(--with-kqueue, -@@ -476,7 +476,9 @@ AM_CONDITIONAL([HAVE_SECCOMP], [test "x$HAVE_SECCOMP" != "x"]) - AM_CONDITIONAL([HAVE_TRE], [test "x$HAVE_TRE" != "x"]) - AM_CONDITIONAL([HAVE_LIBCGROUP], [test "x$HAVE_LIBCGROUP" != "x"]) - --AS_IF([test "$HAVE_KQUEUE" = '' -a "$HAVE_INOTIFY" = '' -a "$HAVE_FANOTIFY" = '' -a "$HAVE_BSM" = '' ], [AC_MSG_FAILURE([kqueue, inotify and bsm are not supported on this system])]) -+AS_IF([test "$HAVE_KQUEUE" = '' -a "$HAVE_INOTIFY" = '' -a "$HAVE_FANOTIFY" = '' -a "$HAVE_BSM" = '' -a "$HAVE_GIO" = ''], -+[AC_MSG_FAILURE([At least one monitoring engine must be enabled! -+Available (depending on system): inotify, kqueue, gio, bsm])]) - - LIBS="${GLIB_LIBS} ${LIBS}" - AM_CPPFLAGS="${GLIB_CFLAGS}" diff --git a/app-admin/clsync/files/clsync-0.4-handler_path.patch b/app-admin/clsync/files/clsync-0.4-handler_path.patch deleted file mode 100644 index 5a61544149fe..000000000000 --- a/app-admin/clsync/files/clsync-0.4-handler_path.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit a747384216597df71c99453dc5161100e1b41181 -Author: Dmitry Yu Okunev <dyokunev@ut.mephi.ru> -Date: Wed Jan 28 11:46:57 2015 +0300 - - Fixed setting sync-handler without absoulte path - - For example "-Secho" - -diff --git a/main.c b/main.c -index 53e71ae..792f1e4 100644 ---- a/main.c -+++ b/main.c -@@ -2526,12 +2526,16 @@ int main(int _argc, char *_argv[]) { - - if (ctx_p->handlerfpath != NULL) { - char *rhandlerfpath = realpath(ctx_p->handlerfpath, NULL); -+/* - if (rhandlerfpath == NULL) { - error("Got error while realpath() on \"%s\" [#0].", ctx_p->handlerfpath); - ret = errno; - } - debug(5, "rhandlerfpath == \"%s\"", rhandlerfpath); -- ctx_p->handlerfpath = rhandlerfpath; -+ ctx_p->handlerfpath = rhandlerfpath;*/ -+ -+ if (rhandlerfpath != NULL) -+ ctx_p->handlerfpath = rhandlerfpath; - - } - diff --git a/app-admin/clsync/files/clsync-0.4-hl_locks.patch b/app-admin/clsync/files/clsync-0.4-hl_locks.patch deleted file mode 100644 index f0279353a01b..000000000000 --- a/app-admin/clsync/files/clsync-0.4-hl_locks.patch +++ /dev/null @@ -1,37 +0,0 @@ -commit 76c75f8180a7e7592da927e8b4c8f5f067470d05 -Author: Dmitry Yu Okunev <dyokunev@ut.mephi.ru> -Date: Wed Jan 28 12:19:11 2015 +0300 - - [hl_locks] A try to fix a segfault on one core PC - - Thanks for the bugreport to: Andrew A Savchenko <bircoph@gentoo.org> - -diff --git a/privileged.c b/privileged.c -index fafd5b7..668a536 100644 ---- a/privileged.c -+++ b/privileged.c -@@ -1680,11 +1680,6 @@ int privileged_init(ctx_t *ctx_p) - #endif - - #ifdef CAPABILITIES_SUPPORT --# ifdef HL_LOCKS -- if (ncpus == 1) -- hl_shutdown(HLLOCK_HANDLER); --# endif -- - if (ctx_p->flags[SPLITTING] == SM_OFF) { - #endif - -@@ -1792,6 +1787,12 @@ int privileged_init(ctx_t *ctx_p) - default: - critical("Invalid ctx_p->flags[SPLITTING]: %i", ctx_p->flags[SPLITTING]); - } -+ -+# ifdef HL_LOCKS -+ if (ncpus == 1) -+ hl_shutdown(HLLOCK_HANDLER); -+# endif -+ - critical_on(!helper_isalive()); - - # ifdef UNSHARE_SUPPORT diff --git a/app-admin/clsync/files/clsync-0.4-retries-arg.patch b/app-admin/clsync/files/clsync-0.4-retries-arg.patch deleted file mode 100644 index 575a53edf486..000000000000 --- a/app-admin/clsync/files/clsync-0.4-retries-arg.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/main.c b/main.c -index 176e1f4..48aee6a 100644 ---- a/main.c -+++ b/main.c -@@ -116,7 +116,7 @@ static const struct option long_options[] = - {"cgroup-group-name", required_argument, NULL, CG_GROUPNAME}, - #endif - {"threading", required_argument, NULL, THREADING}, -- {"retries", optional_argument, NULL, RETRIES}, -+ {"retries", required_argument, NULL, RETRIES}, - {"ignore-failures", optional_argument, NULL, IGNOREFAILURES}, - {"exit-on-sync-skipping",optional_argument, NULL, EXITONSYNCSKIP}, - {"output", required_argument, NULL, OUTPUT_METHOD}, diff --git a/app-admin/clsync/files/clsync-0.4-strtol.patch b/app-admin/clsync/files/clsync-0.4-strtol.patch deleted file mode 100644 index 9e95bbb3290b..000000000000 --- a/app-admin/clsync/files/clsync-0.4-strtol.patch +++ /dev/null @@ -1,179 +0,0 @@ -commit 41283d1359b652c728ca37406a33e62e8541bdda -Author: Andrew Savchenko <bircoph@gmail.com> -Date: Fri Feb 20 21:04:48 2015 +0300 - - parser: check correctness of str to int conversions. - -diff --git a/main.c b/main.c -index 48aee6a..d057489 100644 ---- a/main.c -+++ b/main.c -@@ -808,15 +808,33 @@ static int synchandler_arg1(char *arg, size_t arg_len, void *_ctx_p) { - return synchandler_arg(arg, arg_len, _ctx_p, SHARGS_INITIAL); - } - --int parse_customsignals(ctx_t *ctx_p, char *arg) { -+/* strtol wrapper with error checks */ -+static inline long xstrtol(const char *str, int *err) { -+ long res; -+ char *endptr; -+ -+ res = strtol(str, &endptr, 0); -+ if (errno || *endptr) { -+ error("argument \"%s\" can't be parsed as a number", str); -+ *err = EINVAL; -+ } -+ return res; -+} -+ -+static inline int parse_customsignals(ctx_t *ctx_p, char *arg) { - char *ptr = arg, *start = arg; -+ int ret = 0; - unsigned int signal; - do { - switch (*ptr) { - case 0: - case ',': - case ':': -- signal = (unsigned int)atoi(start); -+ signal = (unsigned int)xstrtol(start, &ret); -+ if (ret) { -+ errno = ret; -+ return errno; -+ } - if (signal == 0) { - // flushing the setting - int i = 0; -@@ -883,7 +901,8 @@ int parse_customsignals(ctx_t *ctx_p, char *arg) { - return 0; - } - --int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t paramsource) { -+static int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t paramsource) { -+ int ret = 0; - #ifdef _DEBUG_FORCE - fprintf(stderr, "Force-Debug: parse_parameter(): %i: %i = \"%s\"\n", paramsource, param_id, arg); - #endif -@@ -962,7 +981,7 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - ctx_p->flags[param_id]++; - - if (pwd == NULL) { -- ctx_p->uid = (unsigned int)atol(arg); -+ ctx_p->uid = (unsigned int)xstrtol(arg, &ret); - break; - } - -@@ -974,7 +993,7 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - ctx_p->flags[param_id]++; - - if (grp == NULL) { -- ctx_p->gid = (unsigned int)atol(arg); -+ ctx_p->gid = (unsigned int)xstrtol(arg, &ret); - break; - } - -@@ -1028,7 +1047,7 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - ctx_p->flags[param_id]++; - - if (pwd == NULL) { -- ctx_p->synchandler_uid = (unsigned int)atol(arg); -+ ctx_p->synchandler_uid = (unsigned int)xstrtol(arg, &ret); - break; - } - -@@ -1040,7 +1059,7 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - ctx_p->flags[param_id]++; - - if (grp == NULL) { -- ctx_p->synchandler_gid = (unsigned int)atol(arg); -+ ctx_p->synchandler_gid = (unsigned int)xstrtol(arg, &ret); - break; - } - -@@ -1233,7 +1252,7 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - ctx_p->pidfile = arg; - break; - case RETRIES: -- ctx_p->retries = (unsigned int)atol(arg); -+ ctx_p->retries = (unsigned int)xstrtol(arg, &ret); - break; - case THREADING: { - char *value, *arg_orig = arg; -@@ -1279,22 +1298,22 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - ctx_p->cluster_mcastipaddr = arg; - break; - case CLUSTERMCASTIPPORT: -- ctx_p->cluster_mcastipport = (uint16_t)atoi(arg); -+ ctx_p->cluster_mcastipport = (uint16_t)xstrtol(arg, &ret); - break; - case CLUSTERTIMEOUT: -- ctx_p->cluster_timeout = (unsigned int)atol(arg); -+ ctx_p->cluster_timeout = (unsigned int)xstrtol(arg, &ret); - break; - case CLUSTERNODENAME: - ctx_p->cluster_nodename = arg; - break; - case CLUSTERHDLMIN: -- ctx_p->cluster_hash_dl_min = (uint16_t)atoi(arg); -+ ctx_p->cluster_hash_dl_min = (uint16_t)xstrtol(arg, &ret); - break; - case CLUSTERHDLMAX: -- ctx_p->cluster_hash_dl_max = (uint16_t)atoi(arg); -+ ctx_p->cluster_hash_dl_max = (uint16_t)xstrtol(arg, &ret); - break; - case CLUSTERSDLMAX: -- ctx_p->cluster_scan_dl_max = (uint16_t)atoi(arg); -+ ctx_p->cluster_scan_dl_max = (uint16_t)xstrtol(arg, &ret); - break; - #endif - case OUTLISTSDIR: -@@ -1334,16 +1353,16 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - break; - } - case SYNCDELAY: -- ctx_p->syncdelay = (unsigned int)atol(arg); -+ ctx_p->syncdelay = (unsigned int)xstrtol(arg, &ret); - break; - case DELAY: -- ctx_p->_queues[QUEUE_NORMAL].collectdelay = (unsigned int)atol(arg); -+ ctx_p->_queues[QUEUE_NORMAL].collectdelay = (unsigned int)xstrtol(arg, &ret); - break; - case BFILEDELAY: -- ctx_p->_queues[QUEUE_BIGFILE].collectdelay = (unsigned int)atol(arg); -+ ctx_p->_queues[QUEUE_BIGFILE].collectdelay = (unsigned int)xstrtol(arg, &ret); - break; - case BFILETHRESHOLD: -- ctx_p->bfilethreshold = (unsigned long)atol(arg); -+ ctx_p->bfilethreshold = (unsigned long)xstrtol(arg, &ret); - break; - case CANCEL_SYSCALLS: { - char *subopts = arg; -@@ -1412,10 +1431,10 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - break; - } - case RSYNCINCLIMIT: -- ctx_p->rsyncinclimit = (unsigned int)atol(arg); -+ ctx_p->rsyncinclimit = (unsigned int)xstrtol(arg, &ret); - break; - case SYNCTIMEOUT: -- ctx_p->synctimeout = (unsigned int)atol(arg); -+ ctx_p->synctimeout = (unsigned int)xstrtol(arg, &ret); - break; - case PREEXITHOOK: - if (strlen(arg)) { -@@ -1611,13 +1630,13 @@ int parse_parameter(ctx_t *ctx_p, uint16_t param_id, char *arg, paramsource_t pa - if (arg == NULL) - ctx_p->flags[param_id]++; - else -- ctx_p->flags[param_id] = atoi(arg); -+ ctx_p->flags[param_id] = xstrtol(arg, &ret); - #ifdef _DEBUG_FORCE - fprintf(stderr, "Force-Debug: flag %i is set to %i\n", param_id&0xff, ctx_p->flags[param_id]); - #endif - break; - } -- return 0; -+ return ret; - } - - int arguments_parse(int argc, char *argv[], struct ctx *ctx_p) { diff --git a/app-admin/clsync/files/clsync-0.4-unset_env.patch b/app-admin/clsync/files/clsync-0.4-unset_env.patch deleted file mode 100644 index 54a45d2fec37..000000000000 --- a/app-admin/clsync/files/clsync-0.4-unset_env.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 596f79fa65af66afdff4cf24b9135935bf511108 -Author: Dmitry Yu Okunev <dyokunev@ut.mephi.ru> -Date: Wed Jan 28 14:27:51 2015 +0300 - - Fixed a segfault on non-set "HOME" environment variable - -diff --git a/main.c b/main.c -index 792f1e4..176e1f4 100644 ---- a/main.c -+++ b/main.c -@@ -1731,18 +1731,18 @@ int configs_parse(ctx_t *ctx_p, paramsource_t paramsource) { - char **config_path_p = config_paths, *config_path_real = xmalloc(PATH_MAX); - size_t config_path_real_size=PATH_MAX; - -- char *homedir = getenv("HOME"); -- size_t homedir_len = strlen(homedir); -+ char *homedir = getenv("HOME"); -+ size_t homedir_len = (homedir == NULL ? 0 :strlen(homedir)); - -- while(*config_path_p != NULL) { -+ while (*config_path_p != NULL) { - size_t config_path_len = strlen(*config_path_p); - -- if(config_path_len+homedir_len+3 > config_path_real_size) { -+ if (config_path_len+homedir_len+3 > config_path_real_size) { - config_path_real_size = config_path_len+homedir_len+3; - config_path_real = xmalloc(config_path_real_size); - } - -- if(*config_path_p[0] != '/') { -+ if ((*config_path_p[0] != '/') && (homedir_len >= 0)) { - memcpy(config_path_real, homedir, homedir_len); - config_path_real[homedir_len] = '/'; - memcpy(&config_path_real[homedir_len+1], *config_path_p, config_path_len+1); -@@ -1750,7 +1750,7 @@ int configs_parse(ctx_t *ctx_p, paramsource_t paramsource) { - memcpy(config_path_real, *config_path_p, config_path_len+1); - - debug(1, "Trying config-file \"%s\" (case #1)", config_path_real); -- if(!g_key_file_load_from_file(gkf, config_path_real, G_KEY_FILE_NONE, NULL)) { -+ if (!g_key_file_load_from_file(gkf, config_path_real, G_KEY_FILE_NONE, NULL)) { - debug(1, "Cannot open/parse file \"%s\"", config_path_real); - config_path_p++; - continue; diff --git a/app-admin/clsync/files/clsync-0.4-unshare-configure.patch b/app-admin/clsync/files/clsync-0.4-unshare-configure.patch deleted file mode 100644 index 11d8f01d13e7..000000000000 --- a/app-admin/clsync/files/clsync-0.4-unshare-configure.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit a13f929cfe4a7fad58c7d814a139efff091601e0 -Author: Dmitry Yu Okunev <dyokunev@ut.mephi.ru> -Date: Tue Jan 27 15:51:18 2015 +0300 - - "unshare()" support is configurable now - -diff --git a/configure.ac b/configure.ac -index f474478..059ade0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -87,6 +87,17 @@ AS_HELP_STRING(--enable-socket-library, - [build libclsync socket library, default: no])) - AM_CONDITIONAL([LIBCLSYNC], [test "x$enable_socket_library" = "xyes"]) - -+dnl --enable-unshare -+AC_ARG_ENABLE(unshare, -+AS_HELP_STRING(--enable-unshare, -+[enable support of unshare(), default: yes]), [], [enable_unshare="yes"]) -+ -+HAVE_UNSHARE=0 -+AS_IF([ test "x$enable_unshare" = "xyes" ], -+[ -+ AC_CHECK_FUNC([unshare], [HAVE_UNSHARE=1], [AC_MSG_FAILURE([Cannot find function unshare()])]) -+]) -+ - dnl --enable-highload-locks - AC_ARG_ENABLE(highload-locks, - AS_HELP_STRING(--enable-highload-locks, -@@ -155,9 +166,6 @@ AC_CHECK_FUNC([getmntent], [HAVE_GETMNTENT=1]) - dnl searching for pivot_root - AC_CHECK_FUNC([pivot_root], [HAVE_PIVOTROOT=1]) - --dnl searching for unshare --AC_CHECK_FUNC([unshare], [HAVE_UNSHARE=1]) -- - dnl libcgroup check - AC_ARG_WITH(libcgroup, - AS_HELP_STRING(--with-libcgroup, diff --git a/app-admin/clsync/files/clsync-0.4-unshare-ifdef.patch b/app-admin/clsync/files/clsync-0.4-unshare-ifdef.patch deleted file mode 100644 index 84116dd2ba11..000000000000 --- a/app-admin/clsync/files/clsync-0.4-unshare-ifdef.patch +++ /dev/null @@ -1,34 +0,0 @@ -commit a437518de6813202ab9cef124a6ca085d3eb555d -Author: Dmitry Yu Okunev <dyokunev@ut.mephi.ru> -Date: Tue Jan 27 18:56:02 2015 +0300 - - Added missed "#ifdef"-s for unshare() - -diff --git a/privileged.c b/privileged.c -index 4b35514..fafd5b7 100644 ---- a/privileged.c -+++ b/privileged.c -@@ -1747,7 +1747,9 @@ int privileged_init(ctx_t *ctx_p) - - SAFE ( pthread_mutex_lock(pthread_mutex_runner_p), return errno;); - -+# ifdef UNSHARE_SUPPORT - unshare(CLONE_NEWIPC); -+# endif - - switch (ctx_p->flags[SPLITTING]) { - case SM_THREAD: { -@@ -1792,11 +1794,13 @@ int privileged_init(ctx_t *ctx_p) - } - critical_on(!helper_isalive()); - -+# ifdef UNSHARE_SUPPORT - // The rest routines - if (ctx_p->flags[DETACH_NETWORK] == DN_NONPRIVILEGED) { - SAFE ( cap_enable(CAP_TO_MASK(CAP_SYS_ADMIN)), return errno; ); - SAFE ( unshare(CLONE_NEWNET), return errno; ); - } -+# endif - SAFE ( cap_drop(ctx_p, 0), return errno; ); - - debug(4, "Waiting for the privileged thread to get prepared"); diff --git a/app-admin/clsync/files/clsync-0.4-unused-deps.patch b/app-admin/clsync/files/clsync-0.4-unused-deps.patch deleted file mode 100644 index db547fe6d5c7..000000000000 --- a/app-admin/clsync/files/clsync-0.4-unused-deps.patch +++ /dev/null @@ -1,140 +0,0 @@ -Adapted commit 756ae28750b514473ae235218d466dc6fa960c30 -Author: Dmitry Yu Okunev <dyokunev@ut.mephi.ru> -Date: Thu Jan 29 15:17:39 2015 +0300 - - [configure.ac] Removed dependency on libseccomp; renamed "--with-libseccomp" -> "--enable-seccomp", "--with-capabilities" -> "--enable-capabilities" - ---- clsync-0.4/configure.ac.orig 2015-02-11 01:52:54.104682884 +0300 -+++ clsync-0.4/configure.ac 2015-02-11 01:58:07.397580398 +0300 -@@ -145,6 +145,51 @@ - ) - AS_IF([test $paranoid -eq 2], [CPPFLAGS="${CPPFLAGS} -DVERYPARANOID"]) - -+dnl searching for seccomp -+AC_ARG_ENABLE(seccomp, -+ AS_HELP_STRING(--enable-seccomp, -+ [Enable seccomp support be able to forbid extra syscalls; values: no, check, yes; default: check]), -+ , -+ [enable_seccomp=check] -+) -+ -+case "$enable_seccomp" in -+ yes) -+ AC_CHECK_TYPES([struct seccomp_data], [HAVE_SECCOMP=1], [AC_MSG_FAILURE([Cannot find valid linux/seccomp.h])], [[#include <linux/seccomp.h>]]) -+ ;; -+ check) -+ AC_CHECK_TYPES([struct seccomp_data], [HAVE_SECCOMP=1], , [[#include <linux/seccomp.h>]]) -+ ;; -+esac -+ -+dnl capabilities check -+AC_ARG_ENABLE(capabilities, -+ AS_HELP_STRING(--enable-capabilities, -+ [Enable linux capabilities support; values: no, check, yes; default: check]), -+ , -+ [enable_capabilities=check] -+) -+ -+case "$enable_capabilities" in -+ yes) -+ AC_CHECK_FUNC([capset], -+ [ -+ AC_CHECK_HEADER(sys/capability.h, [HAVE_CAPABILITIES=2], [AC_MSG_FAILURE([Cannot find sys/capability.h])]) -+ ], -+ [ -+ AC_MSG_FAILURE([There is no capabilities support on this system]) -+ ] -+ ) -+ ;; -+ check) -+ AC_CHECK_FUNC([capset], -+ [ -+ AC_CHECK_HEADER(sys/capability.h, [HAVE_CAPABILITIES=2]) -+ ] -+ ) -+ ;; -+esac -+ - # Checks for programs. - AC_PROG_CC_C99 - AC_PROG_INSTALL -@@ -201,34 +246,6 @@ - ;; - esac - --dnl capabilities check --AC_ARG_WITH(capabilities, -- AS_HELP_STRING(--with-capabilities, -- [Enable linux capabilities support; values: no, check, yes; default: check]), -- [], -- [with_capabilities=check] --) -- --case "$with_capabilities" in -- yes) -- AC_CHECK_FUNC([capset], -- [ -- AC_CHECK_HEADER(sys/capability.h, [HAVE_CAPABILITIES=2], [AC_MSG_FAILURE([Cannot find sys/capability.h])]) -- ], -- [ -- AC_MSG_FAILURE([There is no capabilities support on this system]) -- ] -- ) -- ;; -- check) -- AC_CHECK_FUNC([capset], -- [ -- AC_CHECK_HEADER(sys/capability.h, [HAVE_CAPABILITIES=2]) -- ] -- ) -- ;; --esac -- - dnl tre check - - #AC_ARG_WITH(tre, -@@ -433,31 +450,6 @@ - - AS_IF([test "$HAVE_INOTIFY" != ""], [AC_CHECK_FUNC([inotify_init1], [], [INOTIFY_OLD=1])]) - --dnl searching for seccomp --AC_ARG_WITH(libseccomp, -- AS_HELP_STRING(--with-libseccomp, -- [Enable seccomp support be able to forbid extra syscalls; values: no, check, yes; default: check]), -- [], -- [with_libseccomp=check] --) -- --case "$with_libseccomp" in -- yes) -- AC_CHECK_TYPES([scmp_filter_ctx], [], [AC_MSG_FAILURE([Cannot find valid seccomp.h])], [[#include <seccomp.h>]]) -- AC_CHECK_DECLS([seccomp_syscall_resolve_name_arch], [], [AC_MSG_FAILURE([Cannot find valid seccomp.h])], [[#include <seccomp.h>]]) -- AC_CHECK_TYPES([struct seccomp_data], [HAVE_SECCOMP=1], [AC_MSG_FAILURE([Cannot find valid linux/seccomp.h])], [[#include <linux/seccomp.h>]]) -- ;; -- check) -- AC_CHECK_TYPES([scmp_filter_ctx], [ -- AC_CHECK_DECLS([seccomp_syscall_resolve_name_arch], [ -- AC_CHECK_TYPES([struct seccomp_data], [HAVE_SECCOMP=1], [], [[#include <linux/seccomp.h>]]) -- ], [], [[#include <seccomp.h>]]) -- ], [], [[#include <seccomp.h>]]) -- ;; --esac --AS_IF([test "$HAVE_CAPABILITIES" != ""], [ --]) -- - AM_CONDITIONAL([HAVE_KQUEUE], [test "x$HAVE_KQUEUE" != "x"]) - AM_CONDITIONAL([HAVE_INOTIFY], [test "x$HAVE_INOTIFY" != "x"]) - AM_CONDITIONAL([INOTIFY_OLD], [test "x$INOTIFY_OLD" != "x"]) -diff --git a/privileged.c b/privileged.c -index 668a536..0e773cc 100644 ---- a/privileged.c -+++ b/privileged.c -@@ -59,7 +59,7 @@ - #include "privileged.h" - - #ifdef SECCOMP_SUPPORT --# include <seccomp.h> // __NR_* -+# include <syscall.h> // __NR_* - # include <sys/prctl.h> // prctl() - # include <linux/filter.h> // struct sock_filter - # include <linux/seccomp.h> // SECCOMP_RET_* diff --git a/app-admin/clsync/files/clsync-0.4-version.patch b/app-admin/clsync/files/clsync-0.4-version.patch deleted file mode 100644 index 58eea5edb1b3..000000000000 --- a/app-admin/clsync/files/clsync-0.4-version.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit e9eeb552896a3ac3f4f1e9d72ecab6a200f3c70c -Author: Andrew Savchenko <bircoph@gmail.com> -Date: Tue Jan 27 21:54:21 2015 +0300 - - update package string - -diff --git a/configure.ac b/configure.ac -index 45f5a23..3e0b3cc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2,7 +2,7 @@ - # Process this file with autoconf to produce a configure script. - - AC_PREREQ([2.59]) --AC_INIT([clsync],[0.3],[Dmitry Yu Okunev <dyokunev@ut.mephi.ru>],,[https://github.com/xaionaro/clsync]) -+AC_INIT([clsync],[0.4],[Dmitry Yu Okunev <dyokunev@ut.mephi.ru>],,[https://github.com/xaionaro/clsync]) - AC_CONFIG_SRCDIR([sync.c]) - AC_CONFIG_MACRO_DIR([m4]) - AM_INIT_AUTOMAKE([1.11 foreign -Wall -Wno-portability]) |