From 15b2c9218315ebb8b8b8c9f66b53fab3999c4f39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 03:43:47 +0000 Subject: [PATCH 1/2] Update rsync to v3.4.3 --- rsync-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsync-version b/rsync-version index 56bde7a..fb6e94b 100644 --- a/rsync-version +++ b/rsync-version @@ -1 +1 @@ -v3.4.2 +v3.4.3 From b08b17524865b8eee69b95c841a3a3302eb1f22e Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Thu, 21 May 2026 20:51:06 +0100 Subject: [PATCH 2/2] Patch compile failure with rsync v3.4.3 Compilation of v3.4.3 fails due to mkfifoat() being referenced but it is not available on Android until API level 23 (we are targeting 21 and above). Add patch (submitted at https://github.com/RsyncProject/rsync/pull/901 for the consideration of upstream) to test specifically for the existence of mkfifoat() before trying to call it. Extend the build script and workflow to automatically apply patches in the root of the repository to the fetched source and reference the number of patches in the version number of the release. --- .github/workflows/build.yml | 6 +-- .overcommit.yml | 2 + ...alling-back-to-mkfifoat-if-available.patch | 44 +++++++++++++++++++ build | 12 ++++- 4 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 0001-Only-try-falling-back-to-mkfifoat-if-available.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff3e4bc..1d1bf60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,5 @@ --- -# Copyright © 2020-2024 Matt Robinson +# Copyright © 2020-2026 Matt Robinson # # SPDX-License-Identifier: GPL-3.0-or-later @@ -79,8 +79,8 @@ jobs: - name: Extract version to environment vars run: | echo "BUILD_RELEASE=$(cat buildinfo/release)" >> "$GITHUB_ENV" - echo "JAR_VERSION=$(cat buildinfo/release | sed -e 's/^v//')" \ - >> "$GITHUB_ENV" + echo "JAR_VERSION=$(cat buildinfo/release | \ + sed 's/^v//;s/p/-/')" >> "$GITHUB_ENV" - name: Latest release tag name id: latest_release diff --git a/.overcommit.yml b/.overcommit.yml index 03305af..5911aae 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -6,6 +6,8 @@ PreCommit: TrailingWhitespace: enabled: true + exclude: + - '*.patch' FileEncoding: description: Check text files are valid UTF-8 diff --git a/0001-Only-try-falling-back-to-mkfifoat-if-available.patch b/0001-Only-try-falling-back-to-mkfifoat-if-available.patch new file mode 100644 index 0000000..e58802f --- /dev/null +++ b/0001-Only-try-falling-back-to-mkfifoat-if-available.patch @@ -0,0 +1,44 @@ +From 99bc66813be58d7c16810b179e53b574e88ac591 Mon Sep 17 00:00:00 2001 +From: Matt Robinson +Date: Wed, 20 May 2026 20:19:12 +0100 +Subject: [PATCH] Only try falling back to mkfifoat() if available + +If MKNOD_CREATES_FIFOS is not defined by configure (such as when +cross-compiling), mkfifo() is available but mkfifoat() is not then +compilation fails since 30656c5e35. + +Add a function check for mkfifoat and update the preprocessor +conditional that wraps the call to it to reference HAVE_MKFIFOAT. +--- + configure.ac | 2 +- + syscall.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4062651d..b0b5d201 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -886,7 +886,7 @@ dnl AC_FUNC_MEMCMP + + AC_FUNC_UTIME_NULL + AC_FUNC_ALLOCA +-AC_CHECK_FUNCS(waitpid wait4 getcwd chown chmod lchmod mknod mkfifo \ ++AC_CHECK_FUNCS(waitpid wait4 getcwd chown chmod lchmod mknod mkfifo mkfifoat \ + fchmod fstat ftruncate strchr readlink link utime utimes lutimes strftime \ + chflags getattrlist mktime innetgr linkat \ + memmove lchown vsnprintf snprintf vasprintf asprintf setsid strpbrk \ +diff --git a/syscall.c b/syscall.c +index e317bccc..eee96d46 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -597,7 +597,7 @@ int do_mknod_at(const char *pathname, mode_t mode, dev_t dev) + return ret; + } + +-#if !defined MKNOD_CREATES_FIFOS && defined HAVE_MKFIFO ++#if !defined MKNOD_CREATES_FIFOS && defined HAVE_MKFIFOAT + if (S_ISFIFO(mode)) + ret = mkfifoat(dfd, bname, mode); + else +-- +2.53.0 diff --git a/build b/build index cf0ba51..4bf92bb 100755 --- a/build +++ b/build @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright © 2020-2025 Matt Robinson +# Copyright © 2020-2026 Matt Robinson # # SPDX-License-Identifier: GPL-3.0-or-later @@ -14,16 +14,24 @@ PLATFORM=21 toolchain=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64 version=$(cat rsync-version) +patches=$(find . -maxdepth 1 -name "*.patch" | wc -l) +[ "$patches" -lt 1 ] && unset -v patches [ -d buildinfo ] || mkdir buildinfo echo $PLATFORM > buildinfo/minsdk -echo "$version" > buildinfo/release +echo "$version${patches+p$patches}" > buildinfo/release grep Pkg.Revision "$ANDROID_NDK_HOME/source.properties" | \ cut -d ' ' -f 3 >> buildinfo/ndkver git clone -b "$version" --depth 1 https://github.com/RsyncProject/rsync.git cd rsync +if [ "$patches" ]; then + for patch in ../*.patch; do + patch -p1 < "$patch" + done +fi + ./configure --host="$TARGET" --disable-md2man \ --disable-lz4 --disable-openssl --disable-xxhash --disable-zstd \ AR="$toolchain/bin/llvm-ar" \