[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Fri Oct 1 21:33:13 UTC 2021


The branch, master has been updated
       via  c8e7c4b3 Avoid an issue where the size of st_dev != dev_t.
       via  bff084c1 Always run `mkgitver` prior to a build
      from  16c8b05f Add more NEWS updates.

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


- Log -----------------------------------------------------------------
commit c8e7c4b3522034f194243093d45c7f9b0e67a95d
Author: Wayne Davison <wayne at opencoder.net>
Date:   Fri Oct 1 14:21:26 2021 -0700

    Avoid an issue where the size of st_dev != dev_t.

commit bff084c10a90a77cf21cccd89e58b5efd5ed8d43
Author: Wayne Davison <wayne at opencoder.net>
Date:   Fri Oct 1 14:13:00 2021 -0700

    Always run `mkgitver` prior to a build
    
    Some hosts were not running `mkgitver` when they should, so tweak the
    script to only update the timestamp when the file's data changes and
    then always run the script when performing a build.

-----------------------------------------------------------------------

Summary of changes:
 Makefile.in |  8 ++++----
 generator.c | 22 +++++++++++-----------
 mkgitver    | 16 +++++++++++-----
 3 files changed, 26 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/Makefile.in b/Makefile.in
index 0b5973b1..c4c00e96 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -131,12 +131,12 @@ rounding.h: rounding.c rsync.h proto.h
 	fi
 	@rm -f rounding.out
 
-# While $(wildcard ...) is a GNU make idiom, at least other makes should just turn it into an
-# empty string (we need something that will vanish if we're not building a git checkout).
-# If you want an updated git version w/o GNU make, remove git-version.h after a pull.
-git-version.h: mkgitver $(wildcard $(srcdir)/.git/logs/HEAD)
+git-version.h: ALWAYS_RUN
 	$(srcdir)/mkgitver
 
+.PHONY: ALWAYS_RUN
+ALWAYS_RUN:
+
 simd-checksum-x86_64.o: simd-checksum-x86_64.cpp
 	@$(srcdir)/cmd-or-msg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp
 
diff --git a/generator.c b/generator.c
index dc457093..3287ae31 100644
--- a/generator.c
+++ b/generator.c
@@ -267,7 +267,7 @@ static void do_delayed_deletions(char *delbuf)
  * MAXPATHLEN buffer with the name of the directory in it (the functions we
  * call will append names onto the end, but the old dir value will be restored
  * on exit). */
-static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
+static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t fs_dev)
 {
 	static int already_warned = 0;
 	static struct hashtable *dev_tbl;
@@ -302,12 +302,12 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
 		if (!dev_tbl)
 			dev_tbl = hashtable_create(16, HT_KEY64);
 		if (file->flags & FLAG_TOP_DIR) {
-			hashtable_find(dev_tbl, *fs_dev+1, "");
-			filesystem_dev = *fs_dev;
-		} else if (filesystem_dev != *fs_dev) {
-			if (!hashtable_find(dev_tbl, *fs_dev+1, NULL))
+			hashtable_find(dev_tbl, fs_dev+1, "");
+			filesystem_dev = fs_dev;
+		} else if (filesystem_dev != fs_dev) {
+			if (!hashtable_find(dev_tbl, fs_dev+1, NULL))
 				return;
-			filesystem_dev = *fs_dev; /* it's a prior top-dir dev */
+			filesystem_dev = fs_dev; /* it's a prior top-dir dev */
 		}
 	}
 
@@ -376,9 +376,9 @@ static void do_delete_pass(void)
 		 || !S_ISDIR(st.st_mode))
 			continue;
 
-		delete_in_dir(fbuf, file, &st.st_dev);
+		delete_in_dir(fbuf, file, st.st_dev);
 	}
-	delete_in_dir(NULL, NULL, &dev_zero);
+	delete_in_dir(NULL, NULL, dev_zero);
 
 	if (INFO_GTE(FLIST, 2) && !am_server)
 		rprintf(FINFO, "                    \r");
@@ -1516,7 +1516,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
 		else if (delete_during && f_out != -1 && !phase
 		    && !(file->flags & FLAG_MISSING_DIR)) {
 			if (file->flags & FLAG_CONTENT_DIR)
-				delete_in_dir(fname, file, &real_sx.st.st_dev);
+				delete_in_dir(fname, file, real_sx.st.st_dev);
 			else
 				change_local_filter_dir(fname, strlen(fname), F_DEPTH(file));
 		}
@@ -2292,7 +2292,7 @@ void generate_files(int f_out, const char *local_name)
 						dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
 					} else
 						dirdev = MAKEDEV(0, 0);
-					delete_in_dir(fbuf, fp, &dirdev);
+					delete_in_dir(fbuf, fp, dirdev);
 				} else
 					change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
 			}
@@ -2339,7 +2339,7 @@ void generate_files(int f_out, const char *local_name)
 	} while ((cur_flist = cur_flist->next) != NULL);
 
 	if (delete_during)
-		delete_in_dir(NULL, NULL, &dev_zero);
+		delete_in_dir(NULL, NULL, dev_zero);
 	phase++;
 	if (DEBUG_GTE(GENR, 1))
 		rprintf(FINFO, "generate_files phase=%d\n", phase);
diff --git a/mkgitver b/mkgitver
index 8e76774c..49aa150b 100755
--- a/mkgitver
+++ b/mkgitver
@@ -3,12 +3,18 @@
 srcdir=`dirname $0`
 gitver=`git describe --abbrev=8 2>/dev/null`
 
+if [ ! -f git-version.h ]; then
+    touch git-version.h
+fi
+
 case "$gitver" in
     *.*)
-	echo "#define RSYNC_GITVER \"$gitver\"" >git-version.h
-	;;
-    *)
-	# We either create an empty file or update the time on what the user gave us.
-	touch git-version.h
+	echo "#define RSYNC_GITVER \"$gitver\"" >git-version.h.new
+	if ! diff git-version.h.new git-version.h >/dev/null; then
+	    echo "Updating git-version.h"
+	    mv git-version.h.new git-version.h
+	else
+	    rm git-version.h.new
+	fi
 	;;
 esac


-- 
The rsync repository.



More information about the rsync-cvs mailing list