[SCM] The rsync repository. - branch master updated

2020-04-07 Thread Rsync CVS commit messages
The branch, master has been updated
   via  9dea2ae8 Make use of the new RSYNC_PORT env var.
   via  795268bb Replace mkproto.pl with mkproto.awk
  from  70cbc66b Set RSYNC_PORT in the env for a daemon-over-rsh 
connection. Fixes bug #14163.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit 9dea2ae87cd2da25e4f39864808c8f6aeb98086a
Author: Wayne Davison 
Date:   Tue Apr 7 13:29:29 2020 -0700

Make use of the new RSYNC_PORT env var.

commit 795268bb7cf5c077320243d7f037836adf19aa41
Author: Ethan Sommer via rsync 
Date:   Tue Apr 7 13:01:45 2020 -0700

Replace mkproto.pl with mkproto.awk

This replaces the build dependency on perl with one on awk which is
already used throughout the build system and is much more ubiquitous
than perl.

---

Summary of changes:
 Makefile.in  |  2 +-
 mkproto.awk  | 39 +++
 mkproto.pl   | 48 
 stunnel-rsync.in |  9 +++--
 4 files changed, 47 insertions(+), 51 deletions(-)
 create mode 100644 mkproto.awk
 delete mode 100644 mkproto.pl


Changeset truncated at 500 lines:

diff --git a/Makefile.in b/Makefile.in
index f912f312..d7ddbc41 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -210,7 +210,7 @@ proto.h: proto.h-tstamp
@if test -f proto.h; then :; else cp -p $(srcdir)/proto.h .; fi
 
 proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c config.h
-   perl $(srcdir)/mkproto.pl $(srcdir)/*.c $(srcdir)/lib/compat.c
+   awk -f $(srcdir)/mkproto.awk $(srcdir)/*.c $(srcdir)/lib/compat.c
 
 man: rsync.1 rsyncd.conf.5 man-copy
 
diff --git a/mkproto.awk b/mkproto.awk
new file mode 100644
index ..ab97d54f
--- /dev/null
+++ b/mkproto.awk
@@ -0,0 +1,39 @@
+#!/usr/bin/awk -f
+
+BEGIN {
+while ((getline i < "proto.h") > 0) old_protos = old_protos ? old_protos 
"\n" i : i
+protos = "/* This file is automatically generated with \"make proto\". DO 
NOT EDIT */\n"
+}
+
+inheader {
+protos = protos "\n" ((inheader = /\)[ \t]*$/ ? 0 : 1) ? $0 : $0 ";")
+next
+}
+
+/^FN_(LOCAL|GLOBAL)_[^(]+\([^,()]+/ {
+local = /^FN_LOCAL/
+gsub(/^FN_(LOC|GLOB)AL_|,.*$/, "")
+sub(/^BOOL\(/, "BOOL ")
+sub(/^CHAR\(/, "char ")
+sub(/^INTEGER\(/, "int ")
+sub(/^STRING\(/, "char *")
+protos = protos "\n" $0 (local ? "(int module_id);" : "(void);")
+next
+}
+
+/^static|^extern|;/||!/^[A-Za-z][A-Za-z0-9_]* / { next }
+
+/\(.*\)[ \t]*$/ {
+protos = protos "\n" $0 ";"
+next
+}
+
+/\(/ {
+inheader = 1
+protos = protos "\n" $0
+}
+
+END {
+if (old_protos != protos) print protos > "proto.h"
+printf "" > "proto.h-tstamp"
+}
diff --git a/mkproto.pl b/mkproto.pl
deleted file mode 100644
index cdeb2ea3..
--- a/mkproto.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-# generate prototypes for rsync
-
-$old_protos = '';
-if (open(IN, 'proto.h')) {
-$old_protos = join('', );
-close IN;
-}
-
-%FN_MAP = (
-BOOL => 'BOOL ',
-CHAR => 'char ',
-INTEGER => 'int ',
-STRING => 'char *',
-);
-
-$inheader = 0;
-$protos = qq|/* This file is automatically generated with "make proto". DO NOT 
EDIT */\n\n|;
-
-while (<>) {
-if ($inheader) {
-   if (/[)][ \t]*$/) {
-   $inheader = 0;
-   s/$/;/;
-   }
-   $protos .= $_;
-} elsif (/^FN_(LOCAL|GLOBAL)_([^(]+)\(([^,()]+)/) {
-   $ret = $FN_MAP{$2};
-   $func = $3;
-   $arg = $1 eq 'LOCAL' ? 'int module_id' : 'void';
-   $protos .= "$ret$func($arg);\n";
-} elsif (/^static|^extern/ || /[;]/ || !/^[A-Za-z][A-Za-z0-9_]* /) {
-   ;
-} elsif (/[(].*[)][ \t]*$/) {
-   s/$/;/;
-   $protos .= $_;
-} elsif (/[(]/) {
-   $inheader = 1;
-   $protos .= $_;
-}
-}
-
-if ($old_protos ne $protos) {
-open(OUT, '>proto.h') or die $!;
-print OUT $protos;
-close OUT;
-}
-
-open(OUT, '>proto.h-tstamp') and close OUT;
diff --git a/stunnel-rsync.in b/stunnel-rsync.in
index fdd8bfd1..ca702ae9 100755
--- a/stunnel-rsync.in
+++ b/stunnel-rsync.in
@@ -16,14 +16,19 @@ if [ x"$RSYNC_SSL_CERT" = x ]; then
 else
 cert="cert = $RSYNC_SSL_CERT"
 fi
-if [ x"$RSYNC_SSL_CA_CERT" ]; then
+
+if [ x"$RSYNC_SSL_CA_CERT" = x ]; then
 cafile=""
 verify=0
 else
 cafile="CAfile = $RSYNC_SSL_CA_CERT"
 verify=3
 fi
-port=${RSYNC_SSL_PORT:-874}
+
+port="${RSYNC_PORT:-0}"
+if [ "$port" = 0 ]; then
+port="${RSYNC_SSL_PORT:-874}"
+fi
 
 # If the user specified USER@HOSTNAME::module, then rsync passes us
 # the -l USER option too, so we must be prepared to ignore it.


-- 
The rsync repository.

___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs


[SCM] The rsync repository. - branch master updated

2020-04-07 Thread Rsync CVS commit messages
The branch, master has been updated
   via  5e4a1441 Avoid the include warnings for major().
  from  9dea2ae8 Make use of the new RSYNC_PORT env var.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit 5e4a1441cb339214fa9520f6607288865fd2aa2d
Author: Wayne Davison 
Date:   Tue Apr 7 15:16:19 2020 -0700

Avoid the include warnings for major().

---

Summary of changes:
 configure.ac |  2 +-
 m4/header_major_fixed.m4 | 27 +++
 prepare-source.mak   |  2 +-
 3 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 m4/header_major_fixed.m4


Changeset truncated at 500 lines:

diff --git a/configure.ac b/configure.ac
index 2752b6a4..5ca7a55e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -351,7 +351,7 @@ AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h 
sys/time.h sys/unistd.h \
 sys/acl.h acl/libacl.h attr/xattr.h sys/xattr.h sys/extattr.h \
 popt.h popt/popt.h linux/falloc.h netinet/in_systm.h netinet/ip.h \
 zlib.h)
-AC_HEADER_MAJOR
+AC_HEADER_MAJOR_FIXED
 
 AC_CACHE_CHECK([if makedev takes 3 args],rsync_cv_MAKEDEV_TAKES_3_ARGS,[
 AC_RUN_IFELSE([AC_LANG_SOURCE([[
diff --git a/m4/header_major_fixed.m4 b/m4/header_major_fixed.m4
new file mode 100644
index ..395889cd
--- /dev/null
+++ b/m4/header_major_fixed.m4
@@ -0,0 +1,27 @@
+AC_DEFUN([AC_HEADER_MAJOR_FIXED],
+[AC_CACHE_CHECK(whether sys/types.h defines makedev,
+   ac_cv_header_sys_types_h_makedev,
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]],
+[[return makedev(0, 0);]])],
+   [if grep 'historical compatibility' conftest.err >/dev/null; 
then
+  ac_cv_header_sys_types_h_makedev=no
+else
+  ac_cv_header_sys_types_h_makedev=yes
+fi],
+   [ac_cv_header_sys_types_h_makedev=no])
+])
+
+if test $ac_cv_header_sys_types_h_makedev = no; then
+AC_CHECK_HEADER(sys/mkdev.h,
+   [AC_DEFINE(MAJOR_IN_MKDEV, 1,
+  [Define to 1 if `major', `minor', and `makedev' are
+   declared in .])])
+
+  if test $ac_cv_header_sys_mkdev_h = no; then
+AC_CHECK_HEADER(sys/sysmacros.h,
+   [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
+  [Define to 1 if `major', `minor', and `makedev'
+   are declared in .])])
+  fi
+fi
+])
diff --git a/prepare-source.mak b/prepare-source.mak
index ad291feb..bc1938de 100644
--- a/prepare-source.mak
+++ b/prepare-source.mak
@@ -1,6 +1,6 @@
 conf: configure.sh config.h.in
 
-aclocal.m4:
+aclocal.m4: m4/*.m4
aclocal -I m4
 
 configure.sh: configure.ac aclocal.m4


-- 
The rsync repository.

___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs


[SCM] The rsync repository. - branch master updated

2020-04-07 Thread Rsync CVS commit messages
The branch, master has been updated
   via  e2aee6c4 Switch RSYNC_PORT to -1 in check_for_hostspec().
  from  2598ca66 Fix the default skip-compress list.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit e2aee6c4afcae8f05d92cbf27741981b259f2b21
Author: Wayne Davison 
Date:   Tue Apr 7 19:21:37 2020 -0700

Switch RSYNC_PORT to -1 in check_for_hostspec().

---

Summary of changes:
 options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/options.c b/options.c
index 2db357e2..99d3627a 100644
--- a/options.c
+++ b/options.c
@@ -2937,7 +2937,7 @@ char *check_for_hostspec(char *s, char **host_ptr, int 
*port_ptr)
 
if (*path == ':') {
if (port_ptr && !*port_ptr)
-   *port_ptr = RSYNC_PORT;
+   *port_ptr = -1;
return path + 1;
}
if (port_ptr)


-- 
The rsync repository.

___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs


[SCM] The rsync repository. - branch master updated

2020-04-07 Thread Rsync CVS commit messages
The branch, master has been updated
   via  2598ca66 Fix the default skip-compress list.
   via  cd7ad50b Tweak the grep to look for sys/sysmacros.h.
  from  5e4a1441 Avoid the include warnings for major().

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -
commit 2598ca668b739c50f4206c06dc1c8d3a561b0866
Author: Wayne Davison 
Date:   Tue Apr 7 18:08:05 2020 -0700

Fix the default skip-compress list.

The default value of the skip-compress list actually comes from the
daemon's default lp_dont_compress() value, but a while back the vars
stopped getting default values in a non-daemon run. I added a call to
reset_daemon_vars() so that the "Vars" values get set from "Defaults".

commit cd7ad50bc85e7696724da59f2689ef2050e41189
Author: Wayne Davison 
Date:   Tue Apr 7 15:32:06 2020 -0700

Tweak the grep to look for sys/sysmacros.h.

---

Summary of changes:
 loadparm.c   | 4 ++--
 m4/header_major_fixed.m4 | 2 +-
 main.c   | 4 
 3 files changed, 7 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/loadparm.c b/loadparm.c
index 029f358f..534e7b63 100644
--- a/loadparm.c
+++ b/loadparm.c
@@ -449,7 +449,7 @@ static struct parm_struct parm_table[] =
 };
 
 /* Initialise the Default all_vars structure. */
-static void reset_all_vars(void)
+void reset_daemon_vars(void)
 {
memcpy(, , sizeof Vars);
 }
@@ -872,7 +872,7 @@ int lp_load(char *pszFname, int globals_only)
 {
bInGlobalSection = True;
 
-   reset_all_vars();
+   reset_daemon_vars();
 
/* We get sections first, so have to start 'behind' to make up. */
iSectionIndex = -1;
diff --git a/m4/header_major_fixed.m4 b/m4/header_major_fixed.m4
index 395889cd..0f156aa0 100644
--- a/m4/header_major_fixed.m4
+++ b/m4/header_major_fixed.m4
@@ -3,7 +3,7 @@ AC_DEFUN([AC_HEADER_MAJOR_FIXED],
ac_cv_header_sys_types_h_makedev,
 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]],
 [[return makedev(0, 0);]])],
-   [if grep 'historical compatibility' conftest.err >/dev/null; 
then
+   [if grep sys/sysmacros.h conftest.err >/dev/null; then
   ac_cv_header_sys_types_h_makedev=no
 else
   ac_cv_header_sys_types_h_makedev=yes
diff --git a/main.c b/main.c
index 1328c504..9af9e5d3 100644
--- a/main.c
+++ b/main.c
@@ -1681,6 +1681,10 @@ int main(int argc,char *argv[])
 
memset(, 0, sizeof(stats));
 
+   /* Even a non-daemon runs needs the default config values to be set, 
e.g.
+* lp_dont_compress() is queried when no --skip-compress option is set. 
*/
+   reset_daemon_vars();
+
if (argc < 2) {
usage(FERROR);
exit_cleanup(RERR_SYNTAX);


-- 
The rsync repository.

___
rsync-cvs mailing list
rsync-cvs@lists.samba.org
https://lists.samba.org/mailman/listinfo/rsync-cvs