From 4666acd25bc4b2402b97dedfa535cdfa9c61b64f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:31:11 +0000 Subject: import rsync-3.0.9-18.el7 --- diff --git a/SOURCES/rsync-3.1.0-sigterm-handle.patch b/SOURCES/rsync-3.1.0-sigterm-handle.patch new file mode 100644 index 0000000..2e665d5 --- /dev/null +++ b/SOURCES/rsync-3.1.0-sigterm-handle.patch @@ -0,0 +1,33 @@ +diff --git a/rsync.c b/rsync.c +index 104b274..b50146c 100644 +--- a/rsync.c ++++ b/rsync.c +@@ -37,6 +37,7 @@ extern int preserve_times; + extern int copy_devices; + extern int am_root; + extern int am_server; ++extern int am_daemon; + extern int am_sender; + extern int am_receiver; + extern int am_generator; +@@ -537,7 +538,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, + return updated; + } + +-RETSIGTYPE sig_int(UNUSED(int val)) ++RETSIGTYPE sig_int(int sig_num) + { + /* KLUGE: if the user hits Ctrl-C while ssh is prompting + * for a password, then our cleanup's sending of a SIGUSR1 +@@ -548,6 +549,11 @@ RETSIGTYPE sig_int(UNUSED(int val)) + * not ssh waiting for a password, then this tiny delay + * shouldn't hurt anything. */ + msleep(400); ++ ++ /* If we're an rsync daemon listener (not a daemon server), ++ * we'll exit with status 0 if we received SIGTERM. */ ++ if (am_daemon && !am_server && sig_num == SIGTERM) ++ exit_cleanup(0); + exit_cleanup(RERR_SIGNAL); + } + diff --git a/SPECS/rsync.spec b/SPECS/rsync.spec index cc5dda1..85b01f2 100644 --- a/SPECS/rsync.spec +++ b/SPECS/rsync.spec @@ -8,7 +8,7 @@ Summary: A program for synchronizing files over a network Name: rsync Version: 3.0.9 -Release: 17%{?prerelease}%{?dist} +Release: 18%{?prerelease}%{?dist} Group: Applications/Internet URL: http://rsync.samba.org/ @@ -31,6 +31,7 @@ Patch1: rsync-man.patch Patch2: rsync-3.1.0-protect_args.patch Patch3: rsync-3.0.6-iconv-logging.patch Patch4: rsync-3.0.9-ineffective-owner.patch +Patch5: rsync-3.1.0-sigterm-handle.patch %description Rsync uses a reliable algorithm to bring remote and host files into @@ -66,6 +67,7 @@ patch -p1 -i patches/copy-devices.diff %patch2 -p1 -b .protect_args %patch3 -p1 -b .iconv-logging %patch4 -p1 -b .ineffective-owner +%patch5 -p1 -b .sigterm-handle %build rm -fr autom4te.cache @@ -113,6 +115,9 @@ rm -rf $RPM_BUILD_ROOT %systemd_postun_with_restart rsyncd.service %changelog +* Tue Jan 24 2017 Michal Ruprich - 3.0.9-18 +- Resolves: #1324754 - rsyncd unit enters failed state on exit + * Tue Jun 23 2015 Luboš Uhliarik - 3.0.9-17 - Resolves: #1082496 - socket activation for rsync doesn't work (added missing rsyncd@.service file)