helm-gpg icon indicating copy to clipboard operation
helm-gpg copied to clipboard

tar error without --wildcards specified to enable pattern matching

Open TerraTech opened this issue 8 years ago • 3 comments

Ubuntu 16.04.2 tar 1.28 helm 2.5.1 helm-gpg 0.1.0

Using the tar command as written in gpg.sh: https://github.com/technosophos/helm-gpg/blob/973c2855c4e2e987206b9ee27b2f3cdb2d0023ef/gpg.sh#L76

$ ls
wordpress-0.6.10.tgz

#FAILS#
$ tar -zxf wordpress-0.6.10.tgz --exclude 'charts/' -O '*/Chart.yaml'
tar: Pattern matching characters used in file names
tar: Use --wildcards to enable pattern matching, or --no-wildcards to suppress this warning
tar: */Chart.yaml: Not found in archive
tar: Exiting with failure status due to previous errors

#WORKS#
$ tar -zxf wordpress-0.6.10.tgz --wildcards --exclude 'charts/' -O '*/Chart.yaml'
appVersion: 4.8.1
description: Web publishing platform for building blogs and websites.
engine: gotpl
home: http://www.wordpress.com/
icon: https://bitnami.com/assets/stacks/wordpress/img/wordpress-stack-220x234.png
[..snip..]
sources:
- https://github.com/bitnami/bitnami-docker-mariadb
version: 0.7.0

$ tar --version
tar (GNU tar) 1.28
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

TerraTech avatar Aug 28 '17 10:08 TerraTech

Hi,

This issue is still there on Debian based distributions.

Adding the "--wildcards" to the tar command will fix this issue, and make it compatible with all Linux distributions.

  • I tested it with RedHat and Debian distributions -

There is already an older pull request https://github.com/technosophos/helm-gpg/pull/2 to add "--wildcards" to the tar command (which has a merge conflict now).

Can the --wildcards argument be added to the tar command?

cheers,

-- staf

stafwag avatar Jul 11 '21 05:07 stafwag

A workaround to that is to export TAR_OPTIONS="--wildcard" as environment variable, but indeed, it would be nice to fix it.

potiuk avatar Jan 21 '24 17:01 potiuk

it was TAR_OPTIONS="--wildcards" with s in my case

Thanks anyway!!!

MartinLoeper avatar Dec 29 '24 01:12 MartinLoeper