Skip to content

Commit 804411b

Browse files
committed
Get rid of gensend target & cached git version.
- 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]
1 parent 0b1b2a3 commit 804411b

8 files changed

Lines changed: 22 additions & 49 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
ubuntu-build:
1414
runs-on: ubuntu-20.04
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
17+
fetch-depth: 0
1718
- name: prep
1819
run: |
19-
sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl wget
20-
wget -O git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
20+
sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl
2121
echo "/usr/local/bin" >>$GITHUB_PATH
2222
- name: configure
2323
run: ./configure --with-rrsync
@@ -51,12 +51,12 @@ jobs:
5151
macos-build:
5252
runs-on: macos-latest
5353
steps:
54-
- uses: actions/checkout@v3
54+
- uses: actions/checkout@v4
55+
fetch-depth: 0
5556
- name: prep
5657
run: |
57-
brew install automake openssl xxhash zstd lz4 wget
58+
brew install automake openssl xxhash zstd lz4
5859
sudo pip3 install commonmark
59-
wget -O git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
6060
echo "/usr/local/bin" >>$GITHUB_PATH
6161
- name: configure
6262
run: CPPFLAGS=-I/usr/local/opt/openssl/include/ LDFLAGS=-L/usr/local/opt/openssl/lib/ ./configure --with-rrsync
@@ -87,13 +87,13 @@ jobs:
8787
runs-on: windows-2022
8888
if: (github.event_name == 'schedule' || contains(github.event.head_commit.message, '[buildall]'))
8989
steps:
90-
- uses: actions/checkout@v3
90+
- uses: actions/checkout@v4
91+
fetch-depth: 0
9192
- name: cygwin
9293
run: choco install -y --no-progress cygwin cyg-get
9394
- name: prep
9495
run: |
9596
cyg-get make autoconf automake gcc-core attr libattr-devel python39 python39-pip libzstd-devel liblz4-devel libssl-devel libxxhash0 libxxhash-devel
96-
curl.exe -o git-version.h https://gist.githubusercontent.com/WayneD/c11243fa374fc64d4e42f2855c8e3827/raw/rsync-git-version.h
9797
echo "C:/tools/cygwin/bin" >>$Env:GITHUB_PATH
9898
- name: commonmark
9999
run: bash -c 'python3 -mpip install --user commonmark'

.github/workflows/freebsd-build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,25 @@ jobs:
1212
name: Test rsync on FreeBSD
1313
steps:
1414
- uses: actions/checkout@v4
15+
fetch-depth: 0
1516
- name: Test in FreeBSD
1617
id: test
1718
uses: vmactions/freebsd-vm@v1
1819
with:
1920
usesh: true
2021
prepare: |
21-
pkg install -y bash autotools m4 devel/xxhash zstd liblz4 wget python3 archivers/liblz4
22+
pkg install -y bash autotools m4 devel/xxhash zstd liblz4 python3 archivers/liblz4
2223
run: |
2324
freebsd-version
24-
./configure --with-rrsync -disable-zstd --disable-md2man --disable-xxhash --disable-lz4
25+
./configure --with-rrsync --disable-md2man
2526
make
2627
./rsync --version
2728
./rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
29+
- name: save artifact
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: freebsd-bin
33+
path: |
34+
rsync
35+
rsync-ssl
36+
rrsync

.github/workflows/solaris-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ jobs:
1212
name: Test rsync on Solaris
1313
steps:
1414
- uses: actions/checkout@v4
15+
fetch-depth: 0
1516
- name: Test in Solaris
1617
id: test
1718
uses: vmactions/solaris-vm@v1
1819
with:
1920
usesh: true
2021
prepare: |
21-
pkg install bash automake gnu-m4 wget pkg://solaris/runtime/python-35 autoconf gcc
22+
pkg install bash automake gnu-m4 pkg://solaris/runtime/python-35 autoconf gcc
2223
run: |
2324
uname -a
2425
./configure --with-rrsync -disable-zstd --disable-md2man --disable-xxhash --disable-lz4

Makefile.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,6 @@ conf: configure.sh config.h.in
184184
.PHONY: gen
185185
gen: conf proto.h man git-version.h
186186

187-
.PHONY: gensend
188-
gensend: gen
189-
if ! diff git-version.h $(srcdir)/gists/rsync-git-version.h >/dev/null; then \
190-
./rsync -ai git-version.h $(srcdir)/gists/rsync-git-version.h && \
191-
(cd $(srcdir)/gists && git commit --allow-empty-message -m '' rsync-git-version.h && git push) ; \
192-
fi
193-
rsync -aic $(GENFILES) git-version.h $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/ || true
194-
195187
aclocal.m4: $(srcdir)/m4/*.m4
196188
aclocal -I $(srcdir)/m4
197189

packaging/auto-Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TARGETS := all install install-ssl-daemon install-all install-strip conf gen gensend reconfigure restatus \
1+
TARGETS := all install install-ssl-daemon install-all install-strip conf gen reconfigure restatus \
22
proto man clean cleantests distclean test check check29 check30 installcheck splint \
33
doxygen doxygen-upload finddead rrsync
44

packaging/pkglib.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,6 @@ def get_patch_branches(base_branch):
170170
return branches
171171

172172

173-
def mandate_gensend_hook():
174-
hook = '.git/hooks/pre-push'
175-
if not os.path.exists(hook):
176-
print('Creating hook file:', hook)
177-
cmd_chk(['./rsync', '-a', 'packaging/pre-push', hook])
178-
else:
179-
ct = cmd_txt(['grep', 'make gensend', hook], discard='output')
180-
if ct.rc:
181-
die('Please add a "make gensend" into your', hook, 'script.')
182-
183-
184173
# Snag the GENFILES values out of the Makefile file and return them as a list.
185174
def get_gen_files(want_dir_plus_list=False):
186175
cont_re = re.compile(r'\\\n')

packaging/pre-push

Lines changed: 0 additions & 16 deletions
This file was deleted.

packaging/release-rsync

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ def main():
2727
ztoday = now.strftime('%d %b %Y')
2828
today = ztoday.lstrip('0')
2929

30-
mandate_gensend_hook()
31-
3230
curdir = os.getcwd()
3331

3432
signal.signal(signal.SIGINT, signal_handler)

0 commit comments

Comments
 (0)