GNU bug report logs - #19481
package.el: support .tar archives featuring a pax_global_header entry

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Thu, 1 Jan 2015 17:59:02 UTC

Severity: minor

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19481 <at> debbugs.gnu.org
Subject: bug#19481: package.el: support .tar archives featuring a pax_global_header entry
Date: Thu, 13 Aug 2020 11:01:03 +0200
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> It doesn't look like these changes were applied -- are they still of
>> interest, or is the pax_global_header entry not supported any more?
>
> Yes, they are definitely still relevant and should be applied.  I think
> they've not been applied simply because we were waiting for the tests.

I think this was fixed in a different way in 2016 by Noam:

(defun tar--describe-as-link (descriptor)
  (let ((link-p (tar-header-link-type descriptor)))
    (if link-p
	(cond ((eq link-p 5) "a directory")
              ((eq link-p 20) "a tar directory header")
              ((eq link-p 28) "a next has longname")
              ((eq link-p 29) "a multivolume-continuation")
              ((eq link-p 35) "a sparse entry")
              ((eq link-p 38) "a volume header")
              ((eq link-p 55) "a pax global extended header")
              ((eq link-p 72) "a pax extended header")
              (t "a link")))))

(defun tar--check-descriptor (descriptor)
  (let ((link-desc (tar--describe-as-link descriptor)))
    (when link-desc
      (error "This is %s, not a real file" link-desc))))

So tar-mode displays these headers like this:

 Hrw-rw-rw-    root/root         52 pax_global_header
 drwxrwxr-x    root/root          0 pax-test/
 -rw-rw-r--    root/root          5 pax-test/foo

Which isn't unreasonable...

For reference, I've included a tar file that has one of these headers
here.

So is this still something that should be applied?  If I read Ivan's
patch correctly, it will make tar-mode just ignore those pax headers,
which seems a bit heavy-handed...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no
[pax-test.tar (application/x-tar, attachment)]

This bug report was last modified 4 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.