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" \ 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