the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: libarchive
Version: 2.7.0
Revision: 2
Description: Archiver library for tar, pax and others
BuildDepends: bzip2-dev, liblzma, fink (>= 0.24.12)
Depends: %N-shlibs (=%v-%r), bzip2-shlibs, liblzma-shlibs
BuildDependsOnly: true
Source: http://libarchive.googlecode.com/files/libarchive-%v.tar.gz
Source-MD5: a2103ca334037562ad327eb3aed54869
PatchFile: %n.patch
PatchFile-MD5: 2f795d81a3b7fcfc38c0e3e104cfa990
PatchScript: <<
%{default_script}
/usr/bin/sed -i.bak 's/^\.Fx/FreeBSD/' libarchive/*.[1-9]
<<
ConfigureParams: --enable-bsdtar=shared --enable-bsdcpio --without-lzmadec --with-lzma ACLOCAL=: AUTOCONF=: AUTOMAKE=: AUTOHEADER=:
InstallScript: DESTDIR=%d make install
DocFiles: COPYING README NEWS
SplitOff: <<
Package: %N-shlibs
Depends: bzip2-shlibs, liblzma-shlibs
Files: lib/libarchive.*.dylib
Shlibs: %p/lib/libarchive.2.dylib 10.0.0 %n (>= 2.7.0-1) 32
DocFiles: COPYING README NEWS
<<
SplitOff2: <<
Package: bsdtar
Description: FreeBSD's powerful tar and cpio
Depends: %N-shlibs (>= %v-%r)
Files: bin share/man/man1
DocFiles: COPYING README NEWS
DescDetail: <<
The bsdtar program is FreeBSD's modern implementation of tar based
on libarchive. It started as a test harness, but has grown into a
feature-competitive replacement for GNU tar.
Following formats are supported ('r' for reading and 'w' for writing).
On read, compression and format are always detected automatically.
[rw] gzip compression
[rw] bzip2 compression
[rw] compress/LZW compression
[rw] lzma and xz compression
[r ] GNU tar format (including GNU long filenames, long link names, and
sparse files)
[r ] Solaris 9 extended tar format (including ACLs)
[r ] Old V7 tar archives
[rw] POSIX 1003.1-1988 ustar
[rw] POSIX 1003.1-2001 pax interchange format (indeed extended ustar)
[ w] "restricted" pax format, which will create ustar archives except for
entries that require pax extensions (for long filenames, ACLs, etc).
[rw] POSIX octet-oriented cpio ("odc")
[rw] SVR4 ASCII cpio ("newc")
[r ] Binary cpio (big-endian or little-endian)
[r ] ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
[r ] ZIP archives (with uncompressed or "deflate" compressed entries)
[ w] shar archives
[rw] GNU and BSD 'ar' archives
[rw] 'mtree' format
<<
DescUsage: <<
You can usually use bsdtar and bsdcpio in the same way to GNU tar and cpio
but there are some differences. Read bsdtar(1) and bsdcpio(1) manpage for details.
<<
<<
DescDetail: <<
Libarchive is a stream-oriented library for variety of archives.
It focuses on tar format and its variants primarily, but can also
read and/or write other families of archive formats.
Following formats are supported ('r' for reading and 'w' for writing).
On read, compression and format are always detected automatically.
[rw] gzip compression
[rw] bzip2 compression
[rw] compress/LZW compression
[rw] lzma and xz compression
[r ] GNU tar format (including GNU long filenames, long link names, and
sparse files)
[r ] Solaris 9 extended tar format (including ACLs)
[r ] Old V7 tar archives
[rw] POSIX 1003.1-1988 ustar
[rw] POSIX 1003.1-2001 pax interchange format (indeed extended ustar)
[ w] "restricted" pax format, which will create ustar archives except for
entries that require pax extensions (for long filenames, ACLs, etc).
[rw] POSIX octet-oriented cpio ("odc")
[rw] SVR4 ASCII cpio ("newc")
[r ] Binary cpio (big-endian or little-endian)
[r ] ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
[r ] ZIP archives (with uncompressed or "deflate" compressed entries)
[ w] shar archives
[rw] GNU and BSD 'ar' archives
[rw] 'mtree' format
<<
DescUsage: <<
Guide to Documentation installed by this system:
* libarchive.3 gives an overview of the library as a whole
* archive_read.3, archive_write.3, and archive_write_disk.3 provide
detailed calling sequences for the read and write APIs
* archive_entry.3 details the "struct archive_entry" utility class
* libarchive-formats.5 documents the file formats supported by the library
* tar.5 provides some detailed information about a variety of different
"tar" formats.
<<
DescPort: <<
Since Darwin/MacOS X does not support any tape device, the default
device is changed to stdio. The manpage warns users not to rely on
this behaviour or they knock the real tape device on other platforms.
<<
License: BSD
Maintainer: AIDA Shinra
Homepage: http://people.freebsd.org/~kientzle/libarchive/
diff -Naur libarchive-2.7.0.orig/cpio/bsdcpio.1 libarchive-2.7.0/cpio/bsdcpio.1
--- libarchive-2.7.0.orig/cpio/bsdcpio.1 2009-04-08 07:09:29.000000000 +0000
+++ libarchive-2.7.0/cpio/bsdcpio.1 2009-08-10 13:58:34.000000000 +0000
@@ -128,10 +128,26 @@
The SVR4 portable cpio format.
.It Ar odc
The old POSIX.1 portable octet-oriented cpio format.
-.It Ar pax
-The POSIX.1 pax format, an extension of the ustar format.
-.It Ar ustar
-The POSIX.1 tar format.
+.It ustar
+standard tar archive compatible with the most of tar(1) implementations
+.It pax
+extended tar format introduced by POSIX 1003.1-2001 standard
+.It posix
+synonym of pax
+.It arbsd
+static library compatible with BSD ar(1)
+.It ar
+synonym of arbsd
+.It arsvr4
+static library compatible with SVR4 ar(1)
+.It argnu
+synonym of arsvr4
+.It shar
+shell archive composed of text files only
+.It shardump
+shell archive supporting binary files, but depends on uuencode and uudecode
+.It mtree
+not a true archive but a textual description of filesystem hierarchy
.El
.Pp
The default format is
diff -Naur libarchive-2.7.0.orig/tar/bsdtar.1 libarchive-2.7.0/tar/bsdtar.1
--- libarchive-2.7.0.orig/tar/bsdtar.1 2009-04-08 07:09:13.000000000 +0000
+++ libarchive-2.7.0/tar/bsdtar.1 2009-08-10 13:58:32.000000000 +0000
@@ -161,13 +161,37 @@
.It Fl -format Ar format
(c, r, u mode only)
Use the specified format for the created archive.
-Supported formats include
-.Dq cpio ,
-.Dq pax ,
-.Dq shar ,
-and
-.Dq ustar .
-Other formats may also be supported; see
+Following formats are supported. If none is specified,
+"restricted pax" (mostly compatible with ustar) is used.
+.Bl -tag -compact -width 8n -offset indent
+.It ustar
+standard tar archive compatible with the most of tar(1) implementations
+.It pax
+extended tar format introduced by POSIX 1003.1-2001 standard
+.It posix
+synonym of pax
+.It odc
+old POSIX.1 portable octet-oriented cpio format
+.It cpio
+synonym of odc
+.It newc
+The SVR4 portable cpio format
+.It arbsd
+static library compatible with BSD ar(1)
+.It ar
+synonym of arbsd
+.It arsvr4
+static library compatible with SVR4 ar(1)
+.It argnu
+synonym of arsvr4
+.It shar
+shell archive composed of text files only
+.It shardump
+shell archive supporting binary files, but depends on uuencode and uudecode
+.It mtree
+not a true archive but a textual description of filesystem hierarchy
+.El
+See
.Xr libarchive-formats 5
for more information about currently-supported formats.
In r and u modes, when extending an existing archive, the format specified
@@ -177,11 +201,14 @@
The filename can be
.Pa -
for standard input or standard output.
-If not specified, the default tape device will be used.
-(On
-.Fx ,
-the default tape device is
-.Pa /dev/sa0 . )
+If not specified,
+.Pa standard input
+or
+.Pa standard output
+will be used on Fink. Generally speaking, omitting the
+.Fl f
+option is a bad practice because the default is usually a tape device
+(such as /dev/sa0) in other UNIX-like platforms.
.It Fl H
(c and r mode only)
Symbolic links named on the command line will be followed; the
@@ -531,15 +558,6 @@
.Xr environ 7
for more information.
.El
-.Sh FILES
-.Bl -tag -width ".Ev BLOCKSIZE"
-.It Pa /dev/sa0
-The default tape device, if not overridden by the
-.Ev TAPE
-environment variable or the
-.Fl f
-option.
-.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
@@ -798,10 +816,7 @@
public-domain implementation (circa November, 1987)
was quite influential, and formed the basis of GNU tar.
GNU tar was included as the standard system tar
-in
-.Fx
-beginning with
-.Fx 1.0 .
+in FreeBSD beginning with FreeBSD 1.0 .
.Pp
This is a complete re-implementation based on the
.Xr libarchive 3
diff -Naur libarchive-2.7.0.orig/tar/bsdtar.c libarchive-2.7.0/tar/bsdtar.c
--- libarchive-2.7.0.orig/tar/bsdtar.c 2009-04-08 07:09:13.000000000 +0000
+++ libarchive-2.7.0/tar/bsdtar.c 2009-08-10 13:15:38.000000000 +0000
@@ -149,8 +149,10 @@
/* Default: open tape drive. */
bsdtar->filename = getenv("TAPE");
+#if !(defined(__APPLE__) && defined(__MACH__)) /* default to stdio on MacOS X/Fink */
if (bsdtar->filename == NULL)
bsdtar->filename = _PATH_DEFTAPE;
+#endif
/* Default: preserve mod time on extract */
bsdtar->extract_flags = ARCHIVE_EXTRACT_TIME;