[SCM] The rsync repository. - branch master updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Wed Jun 10 16:33:04 UTC 2020
The branch, master has been updated
via 58e8ecf4 Improvements for release process; a gensend hook.
from c5e44330 Fix double-gen of manpages.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 58e8ecf48f40fe2cc0837edf48e1ef5551dfcdbd
Author: Wayne Davison <wayne at opencoder.net>
Date: Wed Jun 10 09:21:21 2020 -0700
Improvements for release process; a gensend hook.
-----------------------------------------------------------------------
Summary of changes:
Makefile.in | 8 ++++----
md2man | 15 ++++++++++-----
packaging/nightly-rsync | 4 +++-
packaging/pkglib.py | 11 +++++++++++
packaging/pre-push | 3 +++
packaging/release-rsync | 19 +++++++------------
6 files changed, 38 insertions(+), 22 deletions(-)
create mode 100755 packaging/pre-push
Changeset truncated at 500 lines:
diff --git a/Makefile.in b/Makefile.in
index e7f2f644..33f78538 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -150,7 +150,7 @@ t_unsafe$(EXEEXT): $(T_UNSAFE_OBJ)
gen: conf proto.h man
gensend: gen
- rsync -aivzc $(GENFILES) $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/
+ rsync -aic $(GENFILES) $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/
conf:
cd $(srcdir) && $(MAKE) -f prepare-source.mak conf
@@ -217,13 +217,13 @@ proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c config.h
man: rsync.1 rsync-ssl.1 rsyncd.conf.5
-rsync.1: rsync.1.md md2man latest-year.h Makefile
+rsync.1: rsync.1.md md2man NEWS.md Makefile
@$(srcdir)/maybe-make-man $(srcdir) rsync.1.md
-rsync-ssl.1: rsync-ssl.1.md md2man latest-year.h Makefile
+rsync-ssl.1: rsync-ssl.1.md md2man NEWS.md Makefile
@$(srcdir)/maybe-make-man $(srcdir) rsync-ssl.1.md
-rsyncd.conf.5: rsyncd.conf.5.md md2man latest-year.h Makefile
+rsyncd.conf.5: rsyncd.conf.5.md md2man NEWS.md Makefile
@$(srcdir)/maybe-make-man $(srcdir) rsyncd.conf.5.md
clean: cleantests
diff --git a/md2man b/md2man
index a84154fc..c623efb9 100755
--- a/md2man
+++ b/md2man
@@ -15,7 +15,7 @@
#
# This program is freely redistributable.
-import sys, os, re, argparse, time
+import sys, os, re, argparse, subprocess, time
from html.parser import HTMLParser
CONSUMES_TXT = set('h1 h2 p li pre'.split())
@@ -78,16 +78,21 @@ def main():
fi.srcdir = './'
fi.title = fi.prog + '(' + fi.sect + ') man page'
- fi.date = None
+ fi.mtime = None
- chk_files = 'latest-year.h Makefile'.split()
+ if os.path.lexists(fi.srcdir + '.git'):
+ fi.mtime = int(subprocess.check_output('git log -1 --format=%at'.split()))
+
+ chk_files = 'NEWS.md Makefile'.split()
for fn in chk_files:
try:
st = os.lstat(fi.srcdir + fn)
except:
die('Failed to find', fi.srcdir + fn)
- if not fi.date:
- fi.date = time.strftime('%d %b %Y', time.localtime(st.st_mtime))
+ if not fi.mtime:
+ fi.mtime = st.st_mtime
+
+ fi.date = time.strftime('%d %b %Y', time.localtime(fi.mtime))
env_subs = { }
diff --git a/packaging/nightly-rsync b/packaging/nightly-rsync
index 021a2c58..4b4695c1 100755
--- a/packaging/nightly-rsync
+++ b/packaging/nightly-rsync
@@ -37,9 +37,11 @@ def main():
if not os.path.exists('rsyncd.conf.5.md'):
die("There is no rsync checkout in the current directory.")
+ mandate_gensend_hook()
+
if args.make_tar:
check_git_state('master')
- cmd_chk(['touch', 'latest-year.h'])
+ cmd_chk(['touch', 'NEWS.md'])
cmd_chk(['make', gen_target])
cmd_chk(['rsync', '-a', *glob.glob('*.[1-9].html'), dest])
diff --git a/packaging/pkglib.py b/packaging/pkglib.py
index 69fdfd47..838aac9f 100644
--- a/packaging/pkglib.py
+++ b/packaging/pkglib.py
@@ -169,6 +169,17 @@ def get_patch_branches(base_branch):
return branches
+def mandate_gensend_hook():
+ hook = '.git/hooks/pre-push'
+ if not os.path.exists(hook):
+ print('Creating hook file:', hook)
+ cmd_chk(['./rsync', '-a', 'packaging/pre-push', hook])
+ else:
+ out, rc = cmd_txt_status(['fgrep', 'make gensend', hook], discard='output')
+ if rc:
+ die('Please add a "make gensend" into your', hook, 'script.')
+
+
# Snag the GENFILES values out of the Makefile.in file and return them as a list.
def get_extra_files():
cont_re = re.compile(r'\\\n')
diff --git a/packaging/pre-push b/packaging/pre-push
new file mode 100755
index 00000000..04b0d20b
--- /dev/null
+++ b/packaging/pre-push
@@ -0,0 +1,3 @@
+#!/bin/sh
+cat >/dev/null # Just discard stdin data
+make gensend
diff --git a/packaging/release-rsync b/packaging/release-rsync
index 611d77a3..e84a2830 100755
--- a/packaging/release-rsync
+++ b/packaging/release-rsync
@@ -15,11 +15,6 @@ from pkglib import *
dest = os.environ['HOME'] + '/samba-rsync-ftp'
ORIGINAL_PATH = os.environ['PATH']
-MAKE_GEN_CMDS = [
- 'make -f prepare-source.mak conf'.split(),
- './config.status'.split(),
- 'make gen'.split(),
- ]
def main():
now = datetime.now()
@@ -28,6 +23,8 @@ def main():
ztoday = now.strftime('%d %b %Y')
today = ztoday.lstrip('0')
+ mandate_gensend_hook()
+
curdir = os.getcwd()
signal.signal(signal.SIGINT, signal_handler)
@@ -157,7 +154,6 @@ About to:
- tweak the version in configure.ac and the spec files
- tweak NEWS.md and OLDNEWS.md to ensure header values are correct
- generate configure.sh, config.h.in, and proto.h
- - touch the latest-year.h file and generate the manpages
- page through the differences
""")
ans = input("<Press Enter to continue> ")
@@ -213,9 +209,6 @@ About to:
fh.write(txt)
cmd_chk(['packaging/year-tweak'])
- cmd_chk([touch, 'latest-year.h']) # This file's date is put in the generated manpages.
- cmd_chk(['make', 'reconfigure'])
- cmd_chk(['make', 'man'])
print(dash_line)
cmd_run("git diff --color | less -p '^diff .*'")
@@ -233,7 +226,8 @@ About to:
{dash_line}
About to:
- - commit all version changes
+ - git commit all changes
+ - generate the manpages
- merge the {args.master_branch} branch into the patch/{args.master_branch}/* branches
- update the files in the "patches" dir and OPTIONALLY
(if you type 'y') to launch a shell for each patch
@@ -244,6 +238,9 @@ About to:
if s.returncode:
die('Aborting')
+ cmd_chk(['make', 'reconfigure'])
+ cmd_chk(['make', 'gen'])
+
print(f'Creating any missing patch branches.')
s = cmd_run(f'packaging/branch-from-patch --branch={args.master_branch} --add-missing')
if s.returncode:
@@ -301,8 +298,6 @@ About to:
os.rename(rsync_lastver, 'a')
print(f"Creating {diff_file} ...")
- for cmd in MAKE_GEN_CMDS:
- cmd_chk(cmd)
cmd_chk(['rsync', '-a', *extra_files, 'b/'])
sed_script = r's:^((---|\+\+\+) [ab]/[^\t]+)\t.*:\1:' # CAUTION: must not contain any single quotes!
--
The rsync repository.
More information about the rsync-cvs
mailing list