New comment by loreb on void-packages repository https://github.com/void-linux/void-packages/issues/30546#issuecomment-828432466 Comment: Either my patch-fu is rusty or I made some xbps-newbie mistake... I can apply the patch by hand to 1.18 with "patch -p1 < $patch", but when I try under xbps-src it doesn't apply. The package also needs copy-file.[ch] from gnulib, which were imported in a previous commit, but until I don't know why patching fails... can you look at it? The command I ran to test if the program builds was "./xbps-src pkg recutils"; srcpkgs/recutils/patches/exdev.patch is simply downloaded from upstream, and the failed attempt is below ``` commit 06fb077891fb85315f472d5fbf3ef9bc909a5b4a Author: Lorenzo Beretta Date: Wed Apr 28 14:20:53 2021 +0200 recutils: patch to fix recins not working outside of $TMPDIR Details at https://git.savannah.gnu.org/cgit/recutils.git/commit/utils/recutl.c?id=86f662a8202408134a235572ec60141d3082f975 Will no longer be necessary once 1.9 is released; fixes bug #30546 diff --git a/srcpkgs/recutils/patches/exdev.patch b/srcpkgs/recutils/patches/exdev.patch new file mode 100644 index 0000000000..6d1f8bb213 --- /dev/null +++ b/srcpkgs/recutils/patches/exdev.patch @@ -0,0 +1,53 @@ +From 86f662a8202408134a235572ec60141d3082f975 Mon Sep 17 00:00:00 2001 +From: "Jose E. Marchesi" +Date: Tue, 28 Jan 2020 12:13:42 +0100 +Subject: utils: make utilitis to work with temporary files in a different + filesystem + +2020-01-28 Jose E. Marchesi + + * bootstrap.conf (gnulib_modules): Import the modules copy-file + and remove. + * utils/recutl.c (recutl_write_db_to_file): Copy and remove + instead of rename temporary files. +--- + utils/recutl.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +(limited to 'utils/recutl.c') + +diff --git a/utils/recutl.c b/utils/recutl.c +index 9cf823d..a814fd8 100644 +--- a/utils/recutl.c ++++ b/utils/recutl.c +@@ -58,6 +58,7 @@ + #include + #include + #include "read-file.h" ++#include "copy-file.h" + + /* + * Global variables. +@@ -432,12 +433,13 @@ recutl_write_db_to_file (rec_db_t db, + + if (file_name) + { +- /* Rename the temporary file to file_name. */ +- if (rename (tmp_file_name, file_name) == -1) +- { +- remove (tmp_file_name); +- recutl_fatal (_("renaming file %s to %s\n"), tmp_file_name, file_name); +- } ++ /* Rename the temporary file to file_name. We copy and remove ++ instead of renaming because the later doesn't work across ++ different mount points, and it is getting common for /tmp to ++ be mounted in its own filesystem. */ ++ if (qcopy_file_preserving (tmp_file_name, file_name) != 0) ++ recutl_fatal (_("renaming file %s to %s\n"), tmp_file_name, file_name); ++ remove (tmp_file_name); + + /* Restore the attributes of the original file. */ + if (stat_result != -1) +-- +cgit v1.2.1 + diff --git a/srcpkgs/recutils/template b/srcpkgs/recutils/template index 3e71312c4e..eeae6aa5aa 100644 --- a/srcpkgs/recutils/template +++ b/srcpkgs/recutils/template @@ -1,7 +1,7 @@ # Template file for 'recutils' pkgname=recutils version=1.8 -revision=1 +revision=2 build_style=gnu-configure configure_args="--with-bash-headers --disable-rpath" hostmakedepends="pkg-config" ```