[Privoxy-devel] [PATCH] Remove ./ prefix from tarball-dist files
Fabian Keil
fk at fabiankeil.de
Tue Jan 2 07:41:38 CET 2024
Roland Rosenfeld <roland at spinnaker.de> wrote on 2024-01-01 at 17:57:21:
> Hi and Happy New Year!
Happy New Year!
> Current tarball releases always contain an useless "./" in the path
> of all files like this:
>
> privoxy-3.0.34-stable/./acconfig.h
> privoxy-3.0.34-stable/./actionlist.h
> privoxy-3.0.34-stable/./actions.c
> ...
>
> This is a little annoying when packaging privoxy in Debian, since the
> debian/copyright file contains a machine readable list of files and
> their copyright and I currently have to prefix all filenames with "./"
> because they are otherwise not found when checking the original
> tarball. On the other hand this fails when using git or an unpacked
> file tree (where the "./" disappears).
>
> So I'd suggest to remove this (in my eyes) superfluous prefix from the
> dist tarball. I assume that the "./" is a result of using "find .",
> which prefixes all files with "./" automatically and nobody except me
> had a problem with this before, so everybody is just ignoring the
> behavior.
I was aware of the issue but so far didn't spend the time
and energy to investigate the cause of the problem.
Thanks for looking into this.
> Are you okay with the following patch, which removes the "./" using
> sed in GNUmakefile.in. As far as I can see, this should just work.
I've tested your patch and can confirm that it works as advertised
on the ElectroBSD system where I usually use the tarball-dist target.
I'd prefer a slightly modified version to be committed, though.
> diff --git a/GNUmakefile.in b/GNUmakefile.in
> index 9476426c..50f581a1 100644
> --- a/GNUmakefile.in
> +++ b/GNUmakefile.in
> @@ -440,7 +440,7 @@ tarball-dist: dist-check clean clobber
> for i in `find . -type f -a -not \( -path "*/CVS*" -o -name ".*" \
> -o -path "*/debian/*" -o -path "*/actions/*" -o -name "*.php" -o \
> -name "PACKAGERS" -o -path "*.git/*" \
> - -o -path "*/doc/webserver/feeds*" \) | sort`; do \
> + -o -path "*/doc/webserver/feeds*" \) | sort | sed 's/^\.\///'`; do \
Here I'd prefer:
+ -o -path "*/doc/webserver/feeds*" \) | sort | $(SED) 's/^\.\///'`; do \
to be consistent with the rest of the file and to allow to overwrite
the sed version with a single line change.
I've successfully tested this version as well and finally successfully tested:
+ -o -path "*/doc/webserver/feeds*" \) | sort | $(SED) 's@^\./@@'`; do \
In my opinion it's slightly easier to understand without the escaped "/".
Please commit whatever version you prefer.
> It would be great if we could apply this before the next release.
Given that we don't even have a release date yet I don't see a
problem here.
Happy hacking
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-devel/attachments/20240102/644a36de/attachment.bin>
More information about the Privoxy-devel
mailing list