Github messages for voidlinux
 help / color / mirror / Atom feed
From: loreb <loreb@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: please update recutils - I know there's a script for that, in this case it didn't work
Date: Wed, 28 Apr 2021 14:56:08 +0200	[thread overview]
Message-ID: <20210428125608.ZFqeXO2mTpgK9winp5-bop5oKB_EOu8mv6abZXEHBaw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30546@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 3537 bytes --]

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 <vc.net.loreb@gmail.com>
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" <jose.marchesi@oracle.com>
+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  <jose.marchesi@oracle.com>
+
+	* 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 <rec.h>
+ #include <recutl.h>
+ #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"
```

  parent reply	other threads:[~2021-04-28 12:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 12:09 [ISSUE] " loreb
2021-04-27 12:32 ` paper42
2021-04-27 14:29 ` loreb
2021-04-27 22:10 ` ericonr
2021-04-28 12:19 ` loreb
2021-04-28 12:56 ` loreb [this message]
2021-04-28 13:04 ` ericonr
2021-04-28 14:41 ` loreb
2021-04-28 15:08 ` ericonr
2021-04-28 16:00 ` loreb
2021-04-28 16:18 ` ericonr
2021-04-28 21:26 ` loreb
2021-04-28 21:28 ` ericonr
2021-04-28 21:34 ` loreb
2021-04-28 21:40 ` loreb
2022-05-18  2:09 ` github-actions
2022-05-21 18:40 ` [ISSUE] [CLOSED] " paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210428125608.ZFqeXO2mTpgK9winp5-bop5oKB_EOu8mv6abZXEHBaw@z \
    --to=loreb@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).