libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: be careful to follow links during libltdl install [libtool--rel


From: Gary V. Vaughan
Subject: Re: FYI: be careful to follow links during libltdl install [libtool--release--2.0--patch-51]
Date: Thu, 03 Mar 2005 12:55:29 +0000
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

Hi Noah!

Noah Misch wrote:
> On Wed, Mar 02, 2005 at 10:34:19AM +0000, Gary V. Vaughan wrote:
> 
>>   ## with libtoolize, we have to preserve their timestamps carefully:
>>   install-data-local:
>>      $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
>>  -   ( cd $(srcdir) && $(AMTAR) cf - $(ltdldatafiles); ) \
>>  +   ( cd $(srcdir) && $(AMTAR) chof - $(ltdldatafiles); ) \
>>        | ( cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
> 
> 
> Why `o'?  On archive creation, that makes GNU and Tru64 tar produce a V7-style
> tar archive; it means nothing to most tar programs.

Following the Automake idiom rather blindly...

> On the other hand, the extraction invocation probably does need `o' to make 
> Unix
> tar reset file ownership (e.g., when an unprivileged user builds libtool and
> then installs it as root).

D'oh, yes you're exactly right.  I didn't think it through deeply enough.
Thanks for the prod!

> One more consideration: tar copies the modes of the files, so the modes of the
> installed files will depend on the umask of the user who unpacked the libtool
> distribution.

Good catch!  I'll add a 'umask 0' to the extraction process.

> BTW, why is `tar c | tar x' superior to `cp -Rp'?  Both have the same time 
> stamp
> truncation issues on GNU/Linux:

Really?  I thought the opposite was true. We still can't use 'cp -pR' though,
because it might copy symlinks maliciously left in the installed libltdl 
subtree.

> $ touch foo; mkdir dir
> $ cp -p foo bar
> $ tar cf - foo | (cd dir && tar xf -)
> $ ls -l --time-style=full foo bar dir/foo
> -rw-------    1 nm       nm              0 2005-03-02 20:49:10.000000000 
> -0500 bar
> -rw-------    1 nm       nm              0 2005-03-02 20:49:10.000000000 
> -0500 dir/foo
> -rw-------    1 nm       nm              0 2005-03-02 20:49:10.338929609 
> -0500 foo
> 
> I do not know how it works out on other platforms.  It may also be the case 
> that
> newer coreutils `cp' copy time stamps to their full precision; I vaguely 
> recall
> something about that.

That is a shame :-( However, in practice the timestamp difference between
dependent files ought to be way larger than the granularity of the file mtime
field.

That said, I see that the installed libltdl tree is still wrong, because
someone who uses libtoolize --ltdl still needs to bootstrap the libltdl
directory... requiring Automake, Autoconf and Libtool to be installed.  I
also need to copy those files into $prefix/share/libtool/libltdl.

Thanks for the sanity check!

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]