Skip to content

Commit

Permalink
Get rid of gensend target & cached git version.
Browse files Browse the repository at this point in the history
- 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]
  • Loading branch information
WayneD committed Apr 10, 2024
1 parent 0b1b2a3 commit 804411b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 49 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/freebsd-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion .github/workflows/solaris-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packaging/auto-Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
11 changes: 0 additions & 11 deletions packaging/pkglib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
16 changes: 0 additions & 16 deletions packaging/pre-push

This file was deleted.

2 changes: 0 additions & 2 deletions packaging/release-rsync
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 804411b

Please sign in to comment.