On 2026/01/13 14:57, Giovanni Bechis wrote:
> On Tue, Jan 13, 2026 at 10:57:37AM +0000, Stuart Henderson wrote:
> > why not patch the command line to use tar-compatible flags instead?
> > --no-same-owner is the default for our tar, and --directory is just the
> > same as -C
> >
> good catch, diff follows.
> Cheers
> Giovanni
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/ruby-puppet/8/Makefile,v
> diff -u -p -r1.9 Makefile
> --- Makefile 22 Sep 2025 12:35:15 -0000 1.9
> +++ Makefile 13 Jan 2026 13:56:04 -0000
> @@ -1,7 +1,7 @@
> PORTROACH= limit:^8
>
> VERSION= 8.10.0
> -REVISION= 3
> +REVISION= 4
>
> RUN_DEPENDS+=
> converters/ruby-multi_json,${MODRUBY_FLAVOR}>=1.13,<2 \
> devel/ruby-concurrent-ruby,${MODRUBY_FLAVOR}>=1,<2 \
> Index: patches/patch-lib_puppet_module_tool_tar_gnu_rb
> ===================================================================
> RCS file: patches/patch-lib_puppet_module_tool_tar_gnu_rb
> diff -N patches/patch-lib_puppet_module_tool_tar_gnu_rb
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-lib_puppet_module_tool_tar_gnu_rb 13 Jan 2026 13:56:04
> -0000
> @@ -0,0 +1,12 @@
> +Index: lib/puppet/module_tool/tar/gnu.rb
> +--- lib/puppet/module_tool/tar/gnu.rb.orig
> ++++ lib/puppet/module_tool/tar/gnu.rb
> +@@ -8,7 +8,7 @@ class Puppet::ModuleTool::Tar::Gnu
> + destdir = File.expand_path(destdir)
> + safe_destdir = Shellwords.shellescape(destdir)
> +
> +- Puppet::Util::Execution.execute("gzip -dc #{safe_sourcefile} | tar
> --extract --no-same-owner --directory #{safe_destdir} --file -")
> ++ Puppet::Util::Execution.execute("gzip -dc #{safe_sourcefile} | tar
> --extract -C #{safe_destdir} --file -")
I think this needs to be
... | tar xf - -C #{safe_destdir}
> + Puppet::Util::Execution.execute(['find', destdir, '-type', 'd',
> '-exec', 'chmod', '755', '{}', '+'])
> + Puppet::Util::Execution.execute(['find', destdir, '-type', 'f',
> '-exec', 'chmod', 'u+rw,g+r,a-st', '{}', '+'])
> + Puppet::Util::Execution.execute(['chown', '-R', owner, destdir])