GNUTar AmigaOS 68k port of V1.11.2 (no ixemul)
(originally dating back to 25 Mar 1993)
AmigaOS 68k port release version: V1.8
Release Date: 03.12.2006
1995-98 rework, SAS/C V6.58 recompilation, GNUTar V1.11+ adaption,
and 68030, 040, 060 version by Andreas R. Kleinert (email below).
Original port of GNUTar V1.09 done by Ed Berger (email below).
NOTE: Under MorphOS instead please use the "tar" program coming
with the Developer SDK, if you have it.
When extracting TAR archives on the AMIGA there always had been a problem:
the only available GNUTar port was hard to find and if you got it
finally, it was quite old and just unoptimized for higher 68k CPUs.
On the other hand, a simple recompilation wasn't easy for most people,
since the GNU-C (GCC) Compiler isn't very widely used and adaptions
for other compilers aren't that easy (as I finally found out ;-)
My first step to solve this problem was porting the nice, small and
handy "DeTar" utility from MS-DOS to Amiga (still on Aminet as
util/arc/DeTar.LHA and util/arc/PPCDeTar.lha).
The usage was really simple and easy, since you'd just had to call
"DeTar [archive]" and the whole archive would have been unpacked.
While searching for Bugs within DeTar (thus using the available GNUTar
port) I decided to port GNUTar directly (since there actually appeared
some effects I thought of as bugs of DeTar, but as well possibly
could have been bugs of the Amiga version of GNUTar ;-)
So there suddenly was a new SAS/C V6.55 port of GNUTar for the Amiga,
which wasn't perfect at all, but was thought as a base for further
actions by other people (or me :-)
People greatly reacted on this new GNUTar port and reported bugs
as well as requested updates, which should make use of features
of newer GNUTar versions.
So I dropped the old V1.09 sources ported by Ed Berger and began
porting V1.11.2 (a beta test release) to the Amiga. Later other
code fragments from different people have been added to improve
the code quality, also parts of V1.16 have been ported and merged
Source (of all original GNU versions):
GNUtar website: http://www.gnu.org/software/tar/
- SAS/C did report about some actually uninitialized variables
and such a stuff. I did not fix that, since perhaps the concerned
routines are not often used, and since it might soon become too
much work actually digging in that code. Maybe it has been fixed
for newer versions - if not, one perhaps should report it to
(they don't seem to have so attentive compilers ;-))
- some of the defines and/or functions, which hadn't be present
for the GCC are actually available for SAS/C and vice versa.
So there are still some dummy-functions or (hopefully)
equivalent replacements for such things.
See the files "sas_amiga.c" and "sas_amiga2.c" for code-replacements
and the headers within "sasinclude/" and "sasinclude/sys/"
for additional defines.
I went this way, since this prevented me from changing _much_
within the original source - altough sometime it looks a little
bit like a hack.
But the most important thing to be done was setting definitions
and compiler options in the best way and then fill in the missing
parts (sounds easier, than it was %-)
See source/CHANGES.AMIGA for more actual changes to the source.
- automatic compression/decompression as follows won't work:
gnutar -c --block-size=16 --block-compress -z -f ram:x -v T:
This is because the source in rtape_lib.c (rtapelib.c) isn't aware
about the special Amiga environment. There's no "/dev/...", there's
no "rsh", no "fork" and so on - that's why the pipe() function has
been disabled. It will always return -1 which means the user will
get an error reporting "can't open pipe" or similar.
There's another non-ixemul GNUtar port on Aminet, which claims
to have solved this problem: it's called GNUtar-1.11.8.lha and
can be found in the same directory as this one.
- while compiling there occured several problems
(warnings, missing functions, which had to be substituted
by well-enough-dummies, etc.). So remember: it works, but
there's really no guarantee for anything !
There's no guarantee or responsability taken for anything.
I.e. the porter does not take any responsibility for any kind of
damage, data loss, inconvenience, headaches of your girlfriend
or anything potentially being annoying whatsoever...
For the rest, please take a look into the included GNU license.
Who did the port
Andreas R. Kleinert, infoar-kleinert.de
- Ed Berger - Stefan Becker - Christopher P. Parris
- Kjell Irgens - Osma Ahvenlampi - Regis Rampnoux
- Christian Bauernfeind - David Balazic
Port Version History
V1.8 (3.12.20006): - removed PPC/powerUp code
- replaced regex code with version
from GnuTAR 1.16
- added some new header stubs etc.
- updated .readme and other
V1.7 (12.4.1998): - recompiled with SAS/C 7.00 beta 21
- added note about pipe problems
- removed temporary/redundant files
- merged 68k and PPC version again
- renamed archive
- fixed some minor bugs and problems
(mainly makefile related)
- removed 060 version since there wasn't
actually a noticeable difference to the
- moved all binaries to "bin" directory,
source directory renamed to "src"
V1.6 (7.2.1998): - recompilation with SAS/C for powerUP (TM)
PPC boards; hopefully everything still
works as with the V1.5 version for 68k
V1.5 (23.8.1997): - completely recompiled with SAS/C V6.58
- better optimization
- updated eMail adresses
- there's another version on Aminet,
check it out (maybe it's better ;)
V1.4 (12.11.1996): - completely recompiled with SAS/C V6.57
- now different versions for
68000, 030, 040 and 060
- optimizing for time, not size
- new GST
- updated eMail adresses
V1.3 (19.04.1996): - V1.1/1.2 had a serious bug in archive creation,
since I did not insert the "#ifdef AMIGA" code
fragments, which Ed Berger added to access
devices and paths in an AmigaDOS-conformeous way
(-> Stefan Becker, stefanbyello.ping.de,
who seemed to be the only one actually
*creating* archives with GNUtar ?!)
Fixed by adding the specific parts of 1.09-create.c
to 1.11.2.-"create.c" only
- GNUtar could not extract any files containing
":" in their names, since AmigaDOS would think
these were actually devices (or bad device-names
containing more than one ":").
Fixed within "extract.c" where these additional
":" will be replaced by "_", also giving a
(-> Christopher P. Parris, CPP1233tntech.edu)
V1.2 (11.03.1996): - fully recompiled with SAS/C V6.56
- added Osma Ahvenlampi's fix for the
1.0.2 protection bit problem (archive appeared
as "util/shell/GNUTar-fix.lha" on AmiNet).
I adapted it to the new 1.11.2 source and
changed the way binding it into the source
(fully via REDEFINES.WTH, no changes to tar.h,
thus had to call lstat() from sas_amiga.c instead
of stat() to avoid recursion).
Here's what Osma originally said:
'This patch makes an attempt to translate Amiga
protection bits to the closest UNIX equivalents.
When extracting UNIX archives, it also sets the
group and world bits as specified in the archive,
for those with multiuser filesystems.
When creating an archive, these bits are
unfortunately not retained, since SAS/C's stat()
function ignores them.'
V1.1 (16.09.1995): - did change version counting: it's too
confusing the old way.
The original version number of the GNUTar
we base on, still is mentioned at the top of
- completely redid the port: we now do use
the original GNUTar 1.11.2 (a so-called beta
test release) instead of the AMIGA/GCC-adapted
Kind of an update: I simply copied the new
source over the old one, changed the compiler
settings, added some more include files and
resolved all inconsistencies - of course
*without directly changing any piece* of
the original GNU C-Sources!
(-> Regis Rampnoux, ...)
- README and GNU-License (COPYING) also have been
updated - old GNU license replaced by newer one.
There was no update to Tar.man - sorry
(but I added a specific note to it, to cover this).
- removed some GCC-addon's, which Ed Berger had
designed for V1.09, but which won't work with
V1.11.2 any longer. You may take them from
Amiga release V1.0.2 (23.07.1995) and adapt them
- if you like or need them for GCC.
- again did change chmod() - there was a mysterious
effect, which caused it to be restored to the
old, wrong way
- replaced 68030 and 68040 versions by a combined
68030/040 version, since SAS/C does not
actually make any differences for our code.
V1.0.2 (23.07.1995): - hey, found out that the base version actually
had been released as V1.09.
Added note to this readme.
- two people complained, that my GNUTar port did
not set correct flags out of "hsparwed" for the
amiga files when extracting from archives, as the
old GNUTar did.
Well, foudn out, that the old one just _did_ _not_
_change_ the default flags (always "rwed") and
we're now just doing the same, since the mode
field of unix TARs is either broken ("hpw" always
after conversion Unix->Amiga) or SAS/C's definition
for the S_IREAD (and so on) flags aren't compatible.
Now "rwed" will be set always.
You may change this behaviour within "sas_chmod()"
- mkdir(), which needs only one argument with SAS/C
had been called with two (got warnings).
Now we're doing this:
#define mkdir(x, y) mkdir(x)
Well, it works ;-)
V1.0.1 (07.07.1995): - re-compiled with SAS/C V6.55
- added 68040 version
- removed object files from archive due to size
- fixed bug note in documentation; was not a bug
(-> David Balazic, david.balazicuni-mb.si)
V1.00 (23.03.1995): - first release, compiled with SAS/C V6.51
Following is, what Ed Berger originally wrote in "readme.1st"
for V1.09. As with Amiga release V1.1 (GNUTar V1.11.2, first port release)
I re-switched to the original GNU-sources in combination with some
of the old code-workarounds:
I was looking for a tar program for the Amiga, since the gcc distribution,
and minix distribution files are often in this format. Tarsplit from an
old fish disk was not sufficient. I kept hearing about gnu-tar, but
never saw it archived anywhere, until now.
Since I was not able to find gnu-tar, under any separate archive on the
fish disks, or on my favorite ftp-sites, I pulled this out of the UUCP
distribution from uunet. The binary and man page were on disk 2, and
the source files were on disk 3. I hope that I didn't miss anything
important. I apologize for any inconvenience this may cause. If in doubt
go back to the UUCP distribution.