From 5b60da4f94e92f6f28a698e9e4b12f87875d06d3 Mon Sep 17 00:00:00 2001 From: Emanuel Haupt Date: Tue, 22 Dec 2015 10:09:19 +0000 Subject: Restore SIGINFO patch with new rsync version. Notified by: des --- net/rsync/Makefile | 5 ++- net/rsync/files/extrapatch-siginfo | 62 ------------------------------------- net/rsync/files/patch-siginfo | 63 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 net/rsync/files/extrapatch-siginfo create mode 100644 net/rsync/files/patch-siginfo diff --git a/net/rsync/Makefile b/net/rsync/Makefile index 13efc32a6e9f..c42aa416aa12 100644 --- a/net/rsync/Makefile +++ b/net/rsync/Makefile @@ -4,6 +4,7 @@ PORTNAME= rsync PORTVERSION= 3.1.2 CATEGORIES= net ipv6 +PORTREVISION= 1 MASTER_SITES= http://rsync.samba.org/ftp/rsync/ \ ftp://ftp.samba.org/pub/rsync/ \ ftp://ftp.sunet.se/pub/unix/admin/rsync/ \ @@ -35,7 +36,7 @@ CONFIGURE_ARGS= --disable-debug --enable-ipv6 \ PORTDOCS= NEWS README csprotocol.txt tech_report.tex # define options -OPTIONS_DEFINE= DOCS POPT_PORT ZLIB_BASE SSH ICONV SIGINFO +OPTIONS_DEFINE= DOCS POPT_PORT ZLIB_BASE SSH ICONV OPTIONS_RADIO= PTS OPTIONS_RADIO_PTS= TIMELIMIT RENAMED FLAGS ATIMES ACL @@ -46,7 +47,6 @@ SSH_DESC= Use SSH instead of RSH # options provided by patch (mutually exclusive) PTS_DESC= Functionality provided by third party patches -SIGINFO_DESC= Show file name and progress following SIGINFO (BROKEN) TIMELIMIT_DESC= Time limit patch RENAMED_DESC= Add support for renamed file detection FLAGS_DESC= File system flags support patch, adds --fileflags @@ -64,7 +64,6 @@ FLAGS_EXTRA_PATCHES= ${WRKSRC}/patches/fileflags.diff \ RENAMED_EXTRA_PATCHES= ${WRKSRC}/patches/detect-renamed.diff ACL_EXTRA_PATCHES= ${WRKSRC}/patches/acls.diff \ ${FILESDIR}/extrapatch-acl -SIGINFO_EXTRA_PATCHES= ${FILESDIR}/extrapatch-siginfo ICONV_USES= iconv ICONV_CPPFLAGS= -I${LOCALBASE}/include diff --git a/net/rsync/files/extrapatch-siginfo b/net/rsync/files/extrapatch-siginfo deleted file mode 100644 index 369e093c473d..000000000000 --- a/net/rsync/files/extrapatch-siginfo +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/main.c b/main.c -index 4613c96..3d47f3a 100644 ---- a/main.c -+++ b/main.c -@@ -81,6 +81,7 @@ - extern unsigned int module_dirlen; - extern BOOL flist_receiving_enabled; - extern BOOL shutting_down; -+extern BOOL want_progress_now; - extern int basis_dir_cnt; - extern struct stats stats; - extern char *stdout_format; -@@ -1447,6 +1448,15 @@ - _exit(0); - } - -+#ifdef SIGINFO -+static RETSIGTYPE siginfo_handler(UNUSED(int val)) -+{ -+ -+ if (!am_server) -+ want_progress_now = True; -+} -+#endif -+ - RETSIGTYPE remember_children(UNUSED(int val)) - { - #ifdef WNOHANG -@@ -1546,6 +1556,9 @@ - SIGACTMASK(SIGABRT, rsync_panic_handler); - SIGACTMASK(SIGBUS, rsync_panic_handler); - #endif -+#ifdef SIGINFO -+ SIGACTMASK(SIGINFO, siginfo_handler); -+#endif - - starttime = time(NULL); - our_uid = MY_UID(); -index 4ea4c09..1c255ef 100644 ---- a/receiver.c -+++ b/receiver.c -@@ -62,6 +62,8 @@ extern char sender_file_sum[MAX_DIGEST_LEN]; - extern struct file_list *cur_flist, *first_flist, *dir_flist; - extern filter_rule_list daemon_filter_list; - -+BOOL want_progress_now; -+ - static struct bitbag *delayed_bits = NULL; - static int phase = 0, redoing = 0; - static flist_ndx_list batch_redo_list; -@@ -302,6 +304,11 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, - while ((i = recv_token(f_in, &data)) != 0) { - if (INFO_GTE(PROGRESS, 1)) - show_progress(offset, total_size); -+ else if (want_progress_now) { -+ rprintf(FINFO, "%s\n", fname); -+ end_progress(offset); -+ } -+ want_progress_now = False; - - if (allowed_lull) - maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER); diff --git a/net/rsync/files/patch-siginfo b/net/rsync/files/patch-siginfo new file mode 100644 index 000000000000..13acc656ddba --- /dev/null +++ b/net/rsync/files/patch-siginfo @@ -0,0 +1,63 @@ +diff --git a/main.c b/main.c +index 4613c96..3d47f3a 100644 +--- a/main.c ++++ b/main.c +@@ -76,6 +76,7 @@ extern size_t bwlimit_writemax; + extern unsigned int module_dirlen; + extern BOOL flist_receiving_enabled; + extern BOOL shutting_down; ++extern BOOL want_progress_now; + extern int backup_dir_len; + extern int basis_dir_cnt; + extern struct stats stats; +@@ -1439,6 +1440,15 @@ static void sigusr2_handler(UNUSED(int val)) + _exit(0); + } + ++#ifdef SIGINFO ++static void siginfo_handler(UNUSED(int val)) ++{ ++ ++ if (!am_server) ++ want_progress_now = True; ++} ++#endif ++ + void remember_children(UNUSED(int val)) + { + #ifdef WNOHANG +@@ -1538,6 +1548,9 @@ int main(int argc,char *argv[]) + SIGACTMASK(SIGABRT, rsync_panic_handler); + SIGACTMASK(SIGBUS, rsync_panic_handler); + #endif ++#ifdef SIGINFO ++ SIGACTMASK(SIGINFO, siginfo_handler); ++#endif + + starttime = time(NULL); + our_uid = MY_UID(); +diff --git a/receiver.c b/receiver.c +index 4ea4c09..1c255ef 100644 +--- a/receiver.c ++++ b/receiver.c +@@ -62,6 +62,8 @@ extern char sender_file_sum[MAX_DIGEST_LEN]; + extern struct file_list *cur_flist, *first_flist, *dir_flist; + extern filter_rule_list daemon_filter_list; + ++BOOL want_progress_now; ++ + static struct bitbag *delayed_bits = NULL; + static int phase = 0, redoing = 0; + static flist_ndx_list batch_redo_list; +@@ -302,6 +304,11 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, + while ((i = recv_token(f_in, &data)) != 0) { + if (INFO_GTE(PROGRESS, 1)) + show_progress(offset, total_size); ++ else if (want_progress_now) { ++ rprintf(FINFO, "%s\n", fname); ++ end_progress(offset); ++ } ++ want_progress_now = False; + + if (allowed_lull) + maybe_send_keepalive(time(NULL), MSK_ALLOW_FLUSH | MSK_ACTIVE_RECEIVER); -- cgit v1.2.3