Setup an optional cygwin build that is currently triggered when a [buildall] is in the commit message (the build is currently quite slow).
name: FreeBSD
freebsd_instance:
image: freebsd-12-1-release-amd64
+ env:
+ PATH: /usr/local/bin:$PATH
prep_script:
- dd if=/dev/zero of=/tmp/zpool bs=1M count=1024
- zpool create -m `pwd`/testtmp zpool /tmp/zpool
install_script:
- make install
info_script:
- - /usr/local/bin/rsync --version
+ - rsync --version
test_script:
- make check
ssl_file_list_script:
- - /usr/local/bin/rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
+ - rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
steps:
- uses: actions/checkout@v2
- name: prep
- run: sudo apt-get install acl libacl1-dev attr libattr1-dev
- liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl
+ run: |
+ sudo apt-get install acl libacl1-dev attr libattr1-dev liblz4-dev libzstd-dev libxxhash-dev python3-cmarkgfm openssl
+ echo "::add-path::/usr/local/bin"
- name: configure
run: ./configure --with-included-popt --with-included-zlib
- name: make
- name: install
run: sudo make install
- name: info
- run: /usr/local/bin/rsync --version
+ run: rsync --version
- name: check
run: sudo make check
- name: check30
- name: check29
run: sudo make check29
- name: ssl file list
- run: /usr/local/bin/rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
+ run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
macos-build:
runs-on: macos-latest
run: |
brew install automake openssl xxhash zstd lz4
sudo pip3 install commonmark
+ echo "::add-path::/usr/local/bin"
- name: configure
run: CPPFLAGS=-I/usr/local/opt/openssl/include/ LDFLAGS=-L/usr/local/opt/openssl/lib/ ./configure
- name: make
- name: install
run: sudo make install
- name: info
- run: /usr/local/bin/rsync --version
+ run: rsync --version
- name: check
run: sudo make check
- name: ssl file list
- run: /usr/local/bin/rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
+ run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
+
+ cygwin-build:
+ runs-on: windows-latest
+ if: "contains(github.event.head_commit.message, '[buildall]')"
+ steps:
+ - uses: actions/checkout@v2
+ - uses: crazy-max/ghaction-chocolatey@v1.2.2
+ with:
+ args: install -y --no-progress cygwin cyg-get
+ - name: prep
+ run: |
+ cyg-get make autoconf automake gcc-core libssl-devel libzstd-devel liblz4-devel
+ echo "::add-path::C:/tools/cygwin/bin"
+ - name: configure
+ run: bash -c './configure --disable-md2man --disable-xxhash'
+ - name: make
+ run: bash -c 'make'
+ - name: install
+ run: bash -c 'make install'
+ - name: info
+ run: bash -c '/usr/local/bin/rsync --version'
+ - name: check
+ run: bash -c 'make check'
+ - name: ssl file list
+ run: bash -c 'PATH="/usr/local/bin:$PATH" rsync-ssl --no-motd download.samba.org::rsyncftp/ || true'
mkdir "$fromdir"
mkdir "$todir"
-cp -p "$srcdir"/rsync.c "$fromdir"/rsync.c
+cp_p "$srcdir"/rsync.c "$fromdir"/rsync.c
cp_touch "$fromdir"/rsync.c "$todir"/rsync2.c
sleep 1
makepath "$fromdir/foo"
makepath "$fromdir/bar/baz"
-cp -p "$srcdir/configure.ac" "$fromdir/foo/config1"
-cp -p "$srcdir/config.sub" "$fromdir/foo/config2"
-cp -p "$srcdir/rsync.h" "$fromdir/bar/baz/rsync"
+cp_p "$srcdir/configure.ac" "$fromdir/foo/config1"
+cp_p "$srcdir/config.sub" "$fromdir/foo/config2"
+cp_p "$srcdir/rsync.h" "$fromdir/bar/baz/rsync"
chmod 600 "$fromdir"/foo/config? "$fromdir/bar/baz/rsync"
umask 0
ln -s ../bar/baz/rsync "$fromdir/foo/sym"
# Ensure there are no accidental directory-time problems.
$RSYNC -a -f '-! */' "$fromdir/" "$todir"
-cp -p "$srcdir/configure.ac" "$fromdir/foo/config2"
+cp_p "$srcdir/configure.ac" "$fromdir/foo/config2"
chmod 601 "$fromdir/foo/config2"
$RSYNC -iplrH "$fromdir/" "$todir/" \
| tee "$outfile"
diff $diffopt "$chkfile" "$outfile" || test_fail "test 2 failed"
$RSYNC -a -f '-! */' "$fromdir/" "$todir"
-cp -p "$srcdir/config.sub" "$fromdir/foo/config2"
+cp_p "$srcdir/config.sub" "$fromdir/foo/config2"
sleep 1 # For directory mod below to ensure time difference
rm "$todir/foo/sym"
umask 0
EOT
diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed"
-cp -p "$srcdir/configure.ac" "$fromdir/foo/config2"
+cp_p "$srcdir/configure.ac" "$fromdir/foo/config2"
chmod 600 "$fromdir/foo/config2"
# Lack of -t is for unchanged hard-link stress-test!
$RSYNC -vvplrH "$fromdir/" "$todir/" \
-#! /bin/sh
+#!/bin/sh
# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
# Perform a "cp -p", making sure that timestamps are really the same,
# even if the copy rounded microsecond times on the destination file.
cp_touch() {
- cp -p "${@}" || test_fail "cp -p failed"
+ cp_p "${@}"
if test $# -gt 2 -o -d "$2"; then
set_cp_destdir "${@}" # sets destdir var
while test $# -gt 1; do
esac
}
+# When copying via "cp -p", we want to ensure that a non-root user does not
+# preserve ownership (we want our files to be created as the testing user).
+# For instance, a Cygwin CI run might have git files owned by a different
+# user than the (admin) user running the tests.
+cp_cmd="cp -p"
+if test x`get_testuid` != x0; then
+ case `cp --help 2>/dev/null` in
+ *--no-preserve=*) cp_cmd="cp -p --no-preserve=ownership" ;;
+ esac
+fi
+cp_p() {
+ $cp_cmd "${@}" || test_fail "$cp_cmd failed"
+}
+
check_perms() {
perms=`"$TOOLDIR/tls" "$1" | sed 's/^[-d]\(.........\).*/\1/'`
if test $perms = $2; then