Bug 203103 - [patch] archivers/xarchiver: convert some GNU tar options, add few optional compression formats
Summary: [patch] archivers/xarchiver: convert some GNU tar options, add few optional c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo Egea Gondolfo
URL:
Keywords: patch
Depends on:
Blocks: 197296
  Show dependency treegraph
 
Reported: 2015-09-14 18:47 UTC by Andriy Voskoboinyk
Modified: 2015-09-17 13:58 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (danilo)


Attachments
Patch.diff (9.57 KB, patch)
2015-09-14 18:47 UTC, Andriy Voskoboinyk
no flags Details | Diff
portlint.log (186 bytes, text/plain)
2015-09-14 18:48 UTC, Andriy Voskoboinyk
no flags Details
poudriere-9.3-i386.log (87.72 KB, text/plain)
2015-09-14 18:48 UTC, Andriy Voskoboinyk
no flags Details
poudriere-10.2-amd64.log (88.87 KB, text/plain)
2015-09-14 18:58 UTC, Andriy Voskoboinyk
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-09-14 18:47:38 UTC
Created attachment 161041 [details]
Patch.diff

- Replace '--touch' option with '-m'.
- Fix '--use-compress-program' usage with bsdtar where needed.
- Improve LZMA detection.
- Add missing dependency to zipinfo (required to view contents of ZIP archives).
- Add ARJ and LZO options.
- Sort USES.
- Bump PORTREVISION.
Comment 1 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-09-14 18:48:34 UTC
Created attachment 161042 [details]
portlint.log
Comment 2 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-09-14 18:48:51 UTC
Created attachment 161043 [details]
poudriere-9.3-i386.log
Comment 3 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-09-14 18:58:46 UTC
Created attachment 161044 [details]
poudriere-10.2-amd64.log
Comment 4 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2015-09-16 21:20:57 UTC
Thanks for your work.

Just one question (for now): is the change in src/window.c necessary? The magic number of lzma files is \x5d\x00\x00\x80.
Comment 5 Andriy Voskoboinyk freebsd_committer freebsd_triage 2015-09-16 21:30:55 UTC
(In reply to Danilo Egea Gondolfo from comment #4)
I think that yes, because first four bytes of curl distfile (curl-7.44.0.tar.lzma) are 5d 00 00 00, not 5d 00 00 80 - and it is correctly identified by file(1) and still extractable by tar(1).
Comment 6 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2015-09-16 23:16:08 UTC
Actually the 4th byte depends on the compression level. Try this:
$ lzma -z -9 a
$ lzma -z -0 b
$ dd if=a.lzma bs=1 count=10 | hd
...
00000000  5d 00 00 00 04 ff ff ff  ff ff                    |].........|
$ dd if=b.lzma bs=1 count=10 | hd
...
00000000  5d 00 00 04 00 ff ff ff  ff ff                    |].........|

Your patch seems to be right.
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-09-17 00:12:41 UTC
A commit references this bug:

Author: danilo
Date: Thu Sep 17 00:12:21 UTC 2015
New revision: 397093
URL: https://svnweb.freebsd.org/changeset/ports/397093

Log:
  - Replace '--touch' option with '-m'
  - Fix '--use-compress-program' usage with bsdtar where needed
  - Improve LZMA detection
  - Add missing dependency to zipinfo (required to view contents of ZIP archives)
  - Add ARJ and LZO options
  - Sort USES
  while here
  - Add RAR option

  PR:		203103
  Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
  MFH:		2015Q3

Changes:
  head/archivers/xarchiver/Makefile
  head/archivers/xarchiver/files/
  head/archivers/xarchiver/files/patch-src_bzip2.c
  head/archivers/xarchiver/files/patch-src_tar.c
  head/archivers/xarchiver/files/patch-src_window.c
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-09-17 13:56:36 UTC
A commit references this bug:

Author: danilo
Date: Thu Sep 17 13:55:49 UTC 2015
New revision: 397113
URL: https://svnweb.freebsd.org/changeset/ports/397113

Log:
  MFH: r397093

  - Replace '--touch' option with '-m'
  - Fix '--use-compress-program' usage with bsdtar where needed
  - Improve LZMA detection
  - Add missing dependency to zipinfo (required to view contents of ZIP archives)
  - Add ARJ and LZO options
  - Sort USES
  while here
  - Add RAR option

  PR:		203103
  Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2015Q3/
  branches/2015Q3/archivers/xarchiver/Makefile
  branches/2015Q3/archivers/xarchiver/files/
Comment 9 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2015-09-17 13:58:36 UTC
Committed. Thanks!