Bug#824902: tar: -X / --exclude-from silent failure

2016-05-24 Thread Ben Caradoc-Davies
Upstream indicates that that exclude options are now position dependent. 
Exchanging the order of the include and excludes options gives the 
desired behaviour with tar 1.29-1:


$ tar zcvvfXT - excludes includes > /dev/null
drwxrwx--- ben/ben 0 2016-05-21 14:39 base/
drwxrwx--- ben/ben 0 2016-05-21 14:40 base/dir-1/
-rw-rw ben/ben 0 2016-05-21 14:40 base/dir-1/file-1

See:
http://lists.gnu.org/archive/html/bug-tar/2016-05/msg00022.html
http://lists.gnu.org/archive/html/bug-tar/2016-05/msg00023.html

 Forwarded Message 
Subject: Re: [Bug-tar] tar 1.29 bug: tar ignores --exclude option
Date: Wed, 25 May 2016 15:35:30 +1200
From: Ben Caradoc-Davies 
To: Sergey Poznyakoff 
CC: bug-...@gnu.org

On 26/05/16 09:05, Sergey Poznyakoff wrote:
> Hi Ben,
> The --exclude option is position-sensitive, which means it applies to
> any arguments or options appearing after it in the command line.
> Therefore the correct tar invocation is:
>tar zcvvfXT - excludes includes
> Please see 3.4.4 "Position-Sensitive Options"[1], for details.
> Regards,
> Sergey
> [1] http://www.gnu.org/software/tar/manual/html_section/tar_22.html

Thanks very much Sergey. I can confirm that changing the order of the
excludes and includes, as you indicated above, gives me the desired
behaviour with tar 1.29:

$ tar zcvvfXT - excludes includes > /dev/null
drwxrwx--- ben/ben 0 2016-05-21 14:39 base/
drwxrwx--- ben/ben 0 2016-05-21 14:40 base/dir-1/
-rw-rw ben/ben 0 2016-05-21 14:40 base/dir-1/file-1

Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Bug#824902: tar: -X / --exclude-from silent failure

2016-05-22 Thread Ben Caradoc-Davies
There is a report on the upstream bug-tar mailing list that --exclude is 
also broken:

http://lists.gnu.org/archive/html/bug-tar/2016-05/msg00012.html

Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Bug#824902: tar: -X / --exclude-from silent failure

2016-05-20 Thread Ben Caradoc-Davies
And it makes no difference if "base/" is prepended to the patterns in 
"excludes", the same behaviour is observed: success in 1.28-2.2 and 
failure in 1.29-1.


Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Bug#824902: tar: -X / --exclude-from silent failure

2016-05-20 Thread Ben Caradoc-Davies
And although -X / --exclude-from is missing from the latest man page, it 
is still documented in the HTML manual:

https://www.gnu.org/software/tar/manual/html_section/tar_49.html

Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Bug#824902: tar: -X / --exclude-from silent failure

2016-05-20 Thread Ben Caradoc-Davies
Package: tar
Version: 1.29-1
Severity: normal

Dear Maintainer,

the -X / --exclude-from option silently fails in 1-29-1. Consider this example
(see attached tar file):

The file "includes" contains:

base

The file "excludes" contains:

dir-2
dir-glob-*

With tar 1.28-2.2, the patterns listed in "excludes" are applied:

$ tar zcvvfTX - includes excludes > /dev/null
drwxrwx--- ben/ben   0 2016-05-21 14:39 base/
drwxrwx--- ben/ben   0 2016-05-21 14:40 base/dir-1/
-rw-rw ben/ben   0 2016-05-21 14:40 base/dir-1/file-1

With tar 1.29-1, nothing is excluded:

$ tar zcvvfTX - includes excludes > /dev/null
drwxrwx--- ben/ben   0 2016-05-21 14:39 base/
drwxrwx--- ben/ben   0 2016-05-21 14:40 base/dir-glob-2/
-rw-rw ben/ben   0 2016-05-21 14:40 base/dir-glob-2/file-glob-2
drwxrwx--- ben/ben   0 2016-05-21 14:40 base/dir-glob-1/
-rw-rw ben/ben   0 2016-05-21 14:40 base/dir-glob-1/file-glob-1
drwxrwx--- ben/ben   0 2016-05-21 14:40 base/dir-2/
-rw-rw ben/ben   0 2016-05-21 14:40 base/dir-2/file-2
drwxrwx--- ben/ben   0 2016-05-21 14:40 base/dir-1/
-rw-rw ben/ben   0 2016-05-21 14:40 base/dir-1/file-1

I note that this option no longer appears in the 1.29-1 man page, but I could
not find anything in the upstream changelogs:
1.29: https://savannah.gnu.org/forum/forum.php?forum_id=8545
1.28 https://savannah.gnu.org/forum/forum.php?forum_id=8037

Kind regards,
Ben.



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.5.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages tar depends on:
ii  libacl1  2.2.52-3
ii  libc62.22-9
ii  libselinux1  2.5-3

tar recommends no packages.

Versions of packages tar suggests:
ii  bzip21.0.6-8
ii  ncompress4.2.4.4-15
pn  tar-scripts  
ii  xz-utils 5.1.1alpha+20120614-2.1

-- no debconf information


tar-exclude-from-file-silent-failure.tar.gz
Description: application/gzip