Created attachment 215993 [details]
fix hardlinking with spaces in names
rdist6 fails to distribute hardlinks when there are spaces in their names. This is because the corresponding command looks like
k3000000 /path/to/srcfile targetfile
and is parsed by strtok() using space as separator :-(.
The patch changes this command to the form
k3000000 srcpathlen /path/to/srcfile targetfile
where srcpathlen contains the length of /path/to/srcfile and replaces strtok() parsing by something which honours srcpathlen.
Can you produce this as a patch against the ports instead of a patch against the original source in the tarball?
Will try. Apart from adding the patch file to files is there anything else to do? Bump PORTREVISION? Sorry for asking stupid questions but I do this one or two times in a decade...
Created attachment 216024 [details]
patch against port
That's not quite what I had in mind. The existing patch files will need to be updated. I'll fix it up. It'll take more time.
OK, you mean changing those files, that already modify server.c and client.c, right (as written in 4.4.1. of the porters handbook)? I thought of doing this but this way it is difficult to identify what parts of the patch belong together. Additionally, there are already patches (e.g. patch-rdist.c) which modify multiple files (which is also allowed according to 4.4.1.).
And to which of the patches already modifying client.c (patch-client.c, patch-rdist.c) and server.c (patch-mkstemp, patch-rdist.c) should I add them?
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/183663675
(In reply to Andre Albsmeier from comment #5)
The port is a mess anyway. I'll commit the patch then do makepatch.
Created attachment 217678 [details]
Regenerated patches to conform to standard
Please give this patch a spin. It updates the port to conform to standard.
A commit references this bug:
Date: Tue Sep 1 19:24:22 UTC 2020
New revision: 547289
rdist6 fails to hardlink files with whitespace in them. This
patch fixes that.
Submitted by: Andre Albsmeier <firstname.lastname@example.org>
Reported by: Andre Albsmeier <email@example.com>