Mail Archives: djgpp-workers/2012/09/28/20:25:49
Hi,
On Fri, Sep 28, 2012 at 4:56 PM, Juan Manuel Guerrero
<juan DOT guerrero AT gmx DOT de> wrote:
> Am Freitag, 28. September 2012 schrieb Eli Zaretskii:
>
>> > If someone wants a tar program with full pax/posix support
>> > it will be better to port latest GNU tar or GNU pax than trying to implement
>> > this support in djtar. I tested this patch with all formats produced by
>> > GNU tar 1.26.
>>
>> If we are looking at enhancing our Tar support beyond djtar, I'd
>> suggest to look at libarchive and the bsdtar and bsdcpio programs in
>> there. Unlike the current GNU Tar maintainers, who are quite
>> unfriendly to non-Posix platforms,
In fairness, most big projects seem to prefer POSIX (Mac, Linux) and
Windows only these days. They don't even check for other OSes nor try
to work. Half the stuff I try building with DJGPP never works.
Granted, not all GNU projects are actively against DJGPP per se, but
they more or less don't care.
>> libarchive is very friendly, and in
>> fact already supports a Windows port out of the box (well, almost: I
>> needed a few patches when I built it last year, which were readily
>> accepted by the maintainers).
http://libarchive.github.com/
Yes, they seem to support Cygwin, MingW, and MSVC (according to their webpage).
>> The advantage of bsdtar is that it
>> supports every archive format out there, including xz, rpm, rar, 7z,
>> etc. etc. -- you name it, it's already there.
It's mostly a backend, apparently, but it has a few frontends for
certain formats too (e.g. unzip). I think it's claimed to be used by
default for some *BSDs for tar, unzip, maybe others. Actually, I think
a pax frontend is in the works but still unfinished, so feel free to
volunteer (heh).
However, saying it "supports every archive" is a bit inaccurate. A lot
of changes seemed to have happened with latest major release 3.x
(including some removal and deprecation of APIs). Not only that but
some stuff doesn't work at all, or only barely (e.g. RAR support).
Granted, I'm not really surprised, esp. for RAR, but it's something to
consider. Also, some of their other support is apparently reliant upon
compile-time libraries found, e.g. liblzma.
BTW, I still never totally finished polishing up p7zip, esp. since it
has some bugs due to POSIX-isms (ugh), but it does at least support
tar, zip, gz, bz2, 7z, xz all correctly and can unpack cab (and old
"compress" .Z ??), too. Dunno about pax, that seems somewhat rare
(from my perspective), the only project I know of actively using that
is MirBSD (mksh, jupp).
>> Another advantage is
>> that it performs all the compression/decompression internally, instead
>> of invoking external programs via unportable pipes, which is a real
>> win for DOS ports, where pipes are synchronous.
>
> Sounds more promessing than trying to port GNU tar again to DJGPP.
> I will look at libarchive when I decide to start a tar port. Of course,
> anyone else is welcome to that job instead of me.
For laughs, I always try building various things with DJGPP. It often
doesn't work because of bad assumptions in the code, usually assuming
POSIX or Linux or Windows or whatever (pkg-config, mmap, XML crud,
pthreads, wchar.h, etc). It's really a shame that developers are so
sloppy or indifferent.
Anyways, earlier today for libarchive I ran "./configure && make", and
after waiting forever, when building it clashed upon some unknown
define (S_ITXS or something weird) twice, then later it choked upon
trying to link with libtool. Argh! Dunno if the libtool can be patched
or replaced or if it's just some minor quirk due to static linking,
but it didn't work beyond that, and I couldn't figure it out offhand.
Maybe cross compiling would work better, but I really doubt it. Good
luck if you want to investigate, but these days you just can't build
most things with DJGPP.
Oh, I almost forgot to mention unarchiver:
http://wakaba.c3.cx/s/apps/unarchiver.html
Yeah, I tried building that semi-recently too, but it uses ObjC (which
I don't grok) and GNUstep libs + tools, so it was way too complicated
to get working. Good luck on getting that working either, if you're
curious!
- Raw text -