FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-27-2011, 07:57 PM
Magnus Holmgren
 
Default Suggestion to remove (eventually) libtar from Debian

libtar popped up on wnpp-alert, so I ITAd it, but now I'm having second
thoughts. I've done one upload now though.

- No new releases since 2003. Upstream hasn't bothered building a dynamic
library, that's a Debian patch (and a corresponding patch in other distros).

- libarchive is superior (I suppose).

- The API has some problems: th_get_pathname() sometimes returns a pointer
into the TAR struct passed to it and sometimes a pointer to malloc()ed memory
(a strdup() of a local buffer). It has been suggested to always strdup() the
result instead, but it's also been suggested to return a pointer to a static
buffer in applicable cases, which I think may be better (you have to copy the
returned string anyway since the TAR struct is updated as you iterate over the
tar contents). Thoughts?

- Another problem is the tartype_t struct that you can pass to tar_open() to
provide your own functions for opening, reading and writing the underlying
file, e.g. to handle compressed tar files. Unfortunately you have to put your
context in an int instead of a more versatile void*.

- It is riddled with MAXPATHLEN, so getting it to build on HURD doesn't seem
worthwile.

- It has few rdepends:
barry - uses th_get_pathname() (with the comment "FIXME (leak) - someday,
when all distros use a patched version of libtar, we may be able to
avoid this memory leak, but th_get_pathname() does not consistently
return a user-freeable string on all distros."
composite - already supports libarchive, it seems.
lordsawar - Not sure about this one.
osmo - Uses libtar very simply to make and restore backups. Should be easy
to convert to libarchive.
stopmotion - Not sure about this one.
vlc - The skins2 UI module uses libtar to unpack skins. Should be easy
to convert to libarchive.

Any thoughts?

--
Magnus Holmgren holmgren@debian.org
Debian Developer
 
Old 03-28-2011, 08:19 AM
Goswin von Brederlow
 
Default Suggestion to remove (eventually) libtar from Debian

Magnus Holmgren <holmgren@debian.org> writes:

> libtar popped up on wnpp-alert, so I ITAd it, but now I'm having second
> thoughts. I've done one upload now though.
>
> - No new releases since 2003. Upstream hasn't bothered building a dynamic
> library, that's a Debian patch (and a corresponding patch in other distros).
>
> - libarchive is superior (I suppose).
>
> - The API has some problems: th_get_pathname() sometimes returns a pointer
> into the TAR struct passed to it and sometimes a pointer to malloc()ed memory
> (a strdup() of a local buffer). It has been suggested to always strdup() the
> result instead, but it's also been suggested to return a pointer to a static
> buffer in applicable cases, which I think may be better (you have to copy the
> returned string anyway since the TAR struct is updated as you iterate over the
> tar contents). Thoughts?

Thread safety and rentrancy is a problem there.

A third option is to pass a buffer to the function (plus its size) and
fill it with the name. I would probide both a strdup() and a buffer
passing version of the function so people can choose.

> - Another problem is the tartype_t struct that you can pass to tar_open() to
> provide your own functions for opening, reading and writing the underlying
> file, e.g. to handle compressed tar files. Unfortunately you have to put your
> context in an int instead of a more versatile void*.
>
> - It is riddled with MAXPATHLEN, so getting it to build on HURD doesn't seem
> worthwile.
>
> - It has few rdepends:
> barry - uses th_get_pathname() (with the comment "FIXME (leak) - someday,
> when all distros use a patched version of libtar, we may be able to
> avoid this memory leak, but th_get_pathname() does not consistently
> return a user-freeable string on all distros."
> composite - already supports libarchive, it seems.
> lordsawar - Not sure about this one.
> osmo - Uses libtar very simply to make and restore backups. Should be easy
> to convert to libarchive.
> stopmotion - Not sure about this one.
> vlc - The skins2 UI module uses libtar to unpack skins. Should be easy
> to convert to libarchive.
>
> Any thoughts?
>
> --
> Magnus Holmgren holmgren@debian.org
> Debian Developer

I guess the maintainers of the rdepends should make the choice (and do
the work .

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87bp0virmp.fsf@frosties.localnet">http://lists.debian.org/87bp0virmp.fsf@frosties.localnet
 

Thread Tools




All times are GMT. The time now is 01:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org