Get rid of gensend target & cached git version.
authorWayne Davison <wayne@opencoder.net>
Wed, 10 Apr 2024 19:15:49 +0000 (12:15 -0700)
committerWayne Davison <wayne@opencoder.net>
Wed, 10 Apr 2024 19:23:58 +0000 (12:23 -0700)
- Change the developer flow to not require updating the git-version repo
  that the builds used to download a git-version.h file. The Actions now
  do a full repo fetch so that the .h file can be generated via the git
  history.
- Get rid of the gensend Makefile target that was used for the above.
- Get rid of the pre-push git hook file that called "Make gensend".
- Change the FreeBSD build to save an artifact with its built binaries.

[buildall]

.github/workflows/build.yml
.github/workflows/freebsd-build.yml
.github/workflows/solaris-build.yml
Makefile.in
packaging/auto-Makefile
packaging/pkglib.py
packaging/pre-push [deleted file]
packaging/release-rsync

index 9273e11a96718887a75df762bb51673e42475fb2..09a8ce247964f6693c9445e5415749f4db2bd8d2 100644 (file)
@@ -13,11 +13,11 @@ jobs:
   ubuntu-build:
     runs-on: ubuntu-20.04
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
+      fetch-depth: 0
     - name: prep
       run: |
-        sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl wget
-        wget -O git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
+        sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl
         echo "/usr/local/bin" >>$GITHUB_PATH
     - name: configure
       run: ./configure --with-rrsync
@@ -51,12 +51,12 @@ jobs:
   macos-build:
     runs-on: macos-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
+      fetch-depth: 0
     - name: prep
       run: |
-        brew install automake openssl xxhash zstd lz4 wget
+        brew install automake openssl xxhash zstd lz4
         sudo pip3 install commonmark
-        wget -O git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
         echo "/usr/local/bin" >>$GITHUB_PATH
     - name: configure
       run: CPPFLAGS=-I/usr/local/opt/openssl/include/ LDFLAGS=-L/usr/local/opt/openssl/lib/ ./configure --with-rrsync
@@ -87,13 +87,13 @@ jobs:
     runs-on: windows-2022
     if: (github.event_name == 'schedule' || contains(github.event.head_commit.message, '[buildall]'))
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
+      fetch-depth: 0
     - name: cygwin
       run: choco install -y --no-progress cygwin cyg-get
     - name: prep
       run: |
         cyg-get make autoconf automake gcc-core attr libattr-devel python39 python39-pip libzstd-devel liblz4-devel libssl-devel libxxhash0 libxxhash-devel
-        curl.exe -o git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
         echo "C:/tools/cygwin/bin" >>$Env:GITHUB_PATH
     - name: commonmark
       run: bash -c 'python3 -mpip install --user commonmark'
index 747bc35b27eb7e745927a42d22da0fa2b34d9125..0fb5adb09fd3007f30d911e2f85d64e725960793 100644 (file)
@@ -12,16 +12,25 @@ jobs:
     name: Test rsync on FreeBSD
     steps:
     - uses: actions/checkout@v4
+      fetch-depth: 0
     - name: Test in FreeBSD
       id: test
       uses: vmactions/freebsd-vm@v1
       with:
         usesh: true
         prepare: |
-          pkg install -y bash autotools m4 devel/xxhash zstd liblz4 wget python3 archivers/liblz4
+          pkg install -y bash autotools m4 devel/xxhash zstd liblz4 python3 archivers/liblz4
         run: |
           freebsd-version
-          ./configure --with-rrsync -disable-zstd --disable-md2man --disable-xxhash --disable-lz4
+          ./configure --with-rrsync --disable-md2man
           make
           ./rsync --version
           ./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
+    - name: save artifact
+      uses: actions/upload-artifact@v3
+      with:
+        name: freebsd-bin
+        path: |
+          rsync
+          rsync-ssl
+          rrsync
index 4ef3b2cf65f29ea850ccc42676009a2c7eefe35f..feb4ad0b2d05b7a3498f8b1497ca7448ecbd1e23 100644 (file)
@@ -12,13 +12,14 @@ jobs:
     name: Test rsync on Solaris
     steps:
     - uses: actions/checkout@v4
+      fetch-depth: 0
     - name: Test in Solaris
       id: test
       uses: vmactions/solaris-vm@v1
       with:
         usesh: true
         prepare: |
-          pkg install bash automake gnu-m4 wget pkg://solaris/runtime/python-35 autoconf gcc
+          pkg install bash automake gnu-m4 pkg://solaris/runtime/python-35 autoconf gcc
         run: |
           uname -a
           ./configure --with-rrsync -disable-zstd --disable-md2man --disable-xxhash --disable-lz4
index 6bf304d1bb648ea777a77da06816caea97b71e11..d5fefe0456b25b2563247cf393263feebb9bc50c 100644 (file)
@@ -184,14 +184,6 @@ conf: configure.sh config.h.in
 .PHONY: gen
 gen: conf proto.h man git-version.h
 
-.PHONY: gensend
-gensend: gen
-       if ! diff git-version.h $(srcdir)/gists/rsync-git-version.h >/dev/null; then \
-           ./rsync -ai git-version.h $(srcdir)/gists/rsync-git-version.h && \
-           (cd $(srcdir)/gists && git commit --allow-empty-message -m '' rsync-git-version.h && git push) ; \
-       fi
-       rsync -aic $(GENFILES) git-version.h $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/ || true
-
 aclocal.m4: $(srcdir)/m4/*.m4
        aclocal -I $(srcdir)/m4
 
index 7f2e2585c674d3ebb8f78c7a9fdfa7a0dae6610f..032913d571e91b0a17dff743d5015974b675bee5 100644 (file)
@@ -1,4 +1,4 @@
-TARGETS := all install install-ssl-daemon install-all install-strip conf gen gensend reconfigure restatus \
+TARGETS := all install install-ssl-daemon install-all install-strip conf gen reconfigure restatus \
        proto man clean cleantests distclean test check check29 check30 installcheck splint \
        doxygen doxygen-upload finddead rrsync
 
index c4c5741df1d690115bc342e3e0088075b2ffb7bc..c2b2930748b75ecbfa77bc29fb00cb3c9f81f03c 100644 (file)
@@ -170,17 +170,6 @@ 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:
-        ct = cmd_txt(['grep', 'make gensend', hook], discard='output')
-        if ct.rc:
-            die('Please add a "make gensend" into your', hook, 'script.')
-
-
 # Snag the GENFILES values out of the Makefile file and return them as a list.
 def get_gen_files(want_dir_plus_list=False):
     cont_re = re.compile(r'\\\n')
diff --git a/packaging/pre-push b/packaging/pre-push
deleted file mode 100755 (executable)
index 8a71369..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash -e
-
-cat >/dev/null # Just discard stdin data
-
-if [[ -f /proc/$PPID/cmdline ]]; then
-    while read -d $'\0' arg ; do
-       if [[ "$arg" == '--tags' ]] ; then
-           exit 0
-       fi
-    done </proc/$PPID/cmdline
-fi
-
-branch=`git rev-parse --abbrev-ref HEAD`
-if [[ "$branch" = master && "$*" == *github* ]]; then
-    make gensend
-fi
index 511e90f1ed3fc0ce98057c44986a50f1cc28e666..03d9f6a3ec4ecdf510ded45eac4179a3ecae30dc 100755 (executable)
@@ -27,8 +27,6 @@ def main():
     ztoday = now.strftime('%d %b %Y')
     today = ztoday.lstrip('0')
 
-    mandate_gensend_hook()
-
     curdir = os.getcwd()
 
     signal.signal(signal.SIGINT, signal_handler)