Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work
@ 2021-04-27 12:09 loreb
  2021-04-27 12:32 ` paper42
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: loreb @ 2021-04-27 12:09 UTC (permalink / raw)
  To: ml

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

New issue by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  
  (both musl and glibc)
* package:  
  recutils-1.8_1

### Expected behavior
recins works

### Actual behavior
Affected by https://git.savannah.gnu.org/cgit/recutils.git/commit/utils/recutl.c?id=86f662a8202408134a235572ec60141d3082f975

### Steps to reproduce the behavior
try any example in the manual, eg
```
$ touch contacts.rec
$ recins -f Name -v "Mr Foo" -f Email -v foo@bar.baz contacts.rec
```

Works in /tmp, fails anywhere else with EXDEV;

For some deep GNU reasons https://ftp.gnu.org/gnu/recutils/?C=M;O=A stops at 1.8,
while https://alpha.gnu.org/gnu/recutils/ has the version with the bugfix included

cfr https://lists.gnu.org/archive/html/bug-recutils/2021-04/msg00001.html

(I'm reporting this here because it's not 100% clear to me if the GNU folks messed up updating the tarball
or there's a problem with the update script; fwiw the exact same issue happens on debian/sid)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
@ 2021-04-27 12:32 ` paper42
  2021-04-27 14:29 ` loreb
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: paper42 @ 2021-04-27 12:32 UTC (permalink / raw)
  To: ml

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

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-827570226

Comment:
> For some deep GNU reasons https://ftp.gnu.org/gnu/recutils/?C=M;O=A stops at 1.8,
> while https://alpha.gnu.org/gnu/recutils/ has the version with the bugfix included

1.8 is the latest version, 1.8.90 is a pre release before 1.9.

> (I'm reporting this here because it's not 100% clear to me if the GNU folks messed up updating the tarball
> or there's a problem with the update script; fwiw the exact same issue happens on debian/sid)

No one messed anything up I think, there just wasn't a release which fixes this bug yet. I am not sure what the update script you are talking about is, but debian packages recutils v1.8 without any patches just like void, so it's expected to not work there.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
  2021-04-27 12:32 ` paper42
@ 2021-04-27 14:29 ` loreb
  2021-04-27 22:10 ` ericonr
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-27 14:29 UTC (permalink / raw)
  To: ml

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

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-827651547

Comment:
Oh, ok, now it makes sense, thank you.
The update script is mentioned when you submit a new issue - something like "please don't request a new version, there's an update script for that"; the message on the mailing list said it was a known bug fixed in 1.8, so I thought that 1.8.90 was their latest release in the 1.8 series and it was missed for some reason, my bad.

Can we import the patch at https://git.savannah.gnu.org/cgit/recutils.git/commit/utils/recutl.c?id=86f662a8202408134a235572ec60141d3082f975 until a proper release is made?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work 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
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ericonr @ 2021-04-27 22:10 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-827969137

Comment:
Should be ok. Are you interested in making a PR?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (2 preceding siblings ...)
  2021-04-27 22:10 ` ericonr
@ 2021-04-28 12:19 ` loreb
  2021-04-28 12:56 ` loreb
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-28 12:19 UTC (permalink / raw)
  To: ml

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

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828407945

Comment:
I'm preparing it (and probably screwing it up somehow of course)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (3 preceding siblings ...)
  2021-04-28 12:19 ` loreb
@ 2021-04-28 12:56 ` loreb
  2021-04-28 13:04 ` ericonr
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-28 12:56 UTC (permalink / raw)
  To: ml

[-- 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"
```

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (4 preceding siblings ...)
  2021-04-28 12:56 ` loreb
@ 2021-04-28 13:04 ` ericonr
  2021-04-28 14:41 ` loreb
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ericonr @ 2021-04-28 13:04 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828438790

Comment:
xbps-src uses `-Np0` by default. Add `patch_args=-Np1` to the template.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (5 preceding siblings ...)
  2021-04-28 13:04 ` ericonr
@ 2021-04-28 14:41 ` loreb
  2021-04-28 15:08 ` ericonr
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-28 14:41 UTC (permalink / raw)
  To: ml

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

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828512050

Comment:
OK, thank you.
Do you happen to know if there's an automatic way to import missing files from gnulib, or should I temporatily make a patch to add them?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (6 preceding siblings ...)
  2021-04-28 14:41 ` loreb
@ 2021-04-28 15:08 ` ericonr
  2021-04-28 16:00 ` loreb
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ericonr @ 2021-04-28 15:08 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828534295

Comment:
I think you need a patch.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (7 preceding siblings ...)
  2021-04-28 15:08 ` ericonr
@ 2021-04-28 16:00 ` loreb
  2021-04-28 16:18 ` ericonr
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-28 16:00 UTC (permalink / raw)
  To: ml

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

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828574217

Comment:
GNU autotools are driving me insane - now I remember why I hate them... anyway, after cleaning and rebuilding it complains that it can't run automake, which is needed because I added copy-file to Makefile.am - without killing me, is there a way to tell xbps-src "run automake" or should I just be a horrible person and `#include` copy-file.h *and* copy-file.c?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (8 preceding siblings ...)
  2021-04-28 16:00 ` loreb
@ 2021-04-28 16:18 ` ericonr
  2021-04-28 21:26 ` loreb
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ericonr @ 2021-04-28 16:18 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828588508

Comment:
`pre_configure` will allow you to run commands before the configure phase.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (9 preceding siblings ...)
  2021-04-28 16:18 ` ericonr
@ 2021-04-28 21:26 ` loreb
  2021-04-28 21:28 ` ericonr
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-28 21:26 UTC (permalink / raw)
  To: ml

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

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828791106

Comment:
Adding the missing gnulib files made the patch a bit bigger than I thought;
the GNU autotools did something useful and noticed that the manpages are now out of date
(they are generated from the `--help` option with `help2man`), I chose to be dirty and simply
updated their timestamps as there is no functional change; this is also noted in the template.

That being said, I did all the work on my debian computer, and the xbps tooling was surprisingly comfortable.
Issuing a pull request now.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (10 preceding siblings ...)
  2021-04-28 21:26 ` loreb
@ 2021-04-28 21:28 ` ericonr
  2021-04-28 21:34 ` loreb
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ericonr @ 2021-04-28 21:28 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828791806

Comment:
A 1.9k line patch isn't very encouraging D:

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (11 preceding siblings ...)
  2021-04-28 21:28 ` ericonr
@ 2021-04-28 21:34 ` loreb
  2021-04-28 21:40 ` loreb
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-28 21:34 UTC (permalink / raw)
  To: ml

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

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828795237

Comment:
I know and I hate it!
The problem is that fixing one single issue (copy the file instead of using rename(2)) pulled in one function (copyfile) which needs *several* small files, that's why I asked if there was a way to pull in stuff from gnulib without copying it all.

That being said, 99% of the patch is:
add copy-file.[ch]
compile, see what is missing, loop

The C & m4 files were taken from gnulib's repository, hopefully there's a way to check that the bulk of the patch is an exact copy of those...

what is left is
- add the dependencies to Makefile.am
- torture the template to make it work, by running aclocal & automake, adding an additional (temporary!) dependency on automake, and the horrible thing I did to avoid help2man

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (12 preceding siblings ...)
  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
  15 siblings, 0 replies; 17+ messages in thread
From: loreb @ 2021-04-28 21:40 UTC (permalink / raw)
  To: ml

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

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-828798182

Comment:
Basically if I were in your shoes (assuming you'll be reviewing it) I would grab the gnulib files mentioned in the patch,
check that the patch creates those EXACTLY, and then look at the rest which is thankfully small enough that you
can look at it and either trust it or criticize it in a reasonable amount of time.

Touching the manpage is a trick because they are automatically generated, and it will have to go away;
`xbps-query -Rvs help2man` showed nothing, that's why I did it.

Now that I think about it I should have added in the template something like
```
if test x"$version.$revision" != 1.8.2
 echo remove that automake crap and do not touch the manpages
 exit 1
fi
```


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (13 preceding siblings ...)
  2021-04-28 21:40 ` loreb
@ 2022-05-18  2:09 ` github-actions
  2022-05-21 18:40 ` [ISSUE] [CLOSED] " paper42
  15 siblings, 0 replies; 17+ messages in thread
From: github-actions @ 2022-05-18  2:09 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/issues/30546#issuecomment-1129493074

Comment:
Issues become stale 90 days after last activity and are closed 14 days after that.  If this issue is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [ISSUE] [CLOSED] please update recutils - I know there's a script for that, in this case it didn't work
  2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work loreb
                   ` (14 preceding siblings ...)
  2022-05-18  2:09 ` github-actions
@ 2022-05-21 18:40 ` paper42
  15 siblings, 0 replies; 17+ messages in thread
From: paper42 @ 2022-05-21 18:40 UTC (permalink / raw)
  To: ml

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

Closed issue by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/30546

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  
  (both musl and glibc)
* package:  
  recutils-1.8_1

### Expected behavior
recins works

### Actual behavior
Affected by https://git.savannah.gnu.org/cgit/recutils.git/commit/utils/recutl.c?id=86f662a8202408134a235572ec60141d3082f975

### Steps to reproduce the behavior
try any example in the manual, eg
```
$ touch contacts.rec
$ recins -f Name -v "Mr Foo" -f Email -v foo@bar.baz contacts.rec
```

Works in /tmp, fails anywhere else with EXDEV;

For some deep GNU reasons https://ftp.gnu.org/gnu/recutils/?C=M;O=A stops at 1.8,
while https://alpha.gnu.org/gnu/recutils/ has the version with the bugfix included

cfr https://lists.gnu.org/archive/html/bug-recutils/2021-04/msg00001.html

(I'm reporting this here because it's not 100% clear to me if the GNU folks messed up updating the tarball
or there's a problem with the update script; fwiw the exact same issue happens on debian/sid)

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-05-21 18:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 12:09 [ISSUE] please update recutils - I know there's a script for that, in this case it didn't work 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
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

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).