Bug 740079 - libtool says it fails copying when it works
Summary: libtool says it fails copying when it works
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libtool
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-20 20:52 UTC by Eric Paris
Modified: 2013-06-20 07:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-20 07:29:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Possible fix. (1.15 KB, patch)
2013-04-23 14:27 UTC, Pavel Raiskup
no flags Details | Diff

Description Eric Paris 2011-09-20 20:52:43 UTC
I have the code for a project (systemd) on my git server.  The git server exports the share *(rw,all_squash,anonuid=500,anongid=500).  All files in the share are owned by uid 500.  Root on my client tries to run autogen against this source tree and fails with:

libtoolize: putting auxiliary files in `.'.
libtoolize: can not copy `/usr/share/libtool/config/ltmain.sh' to `./'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: can not copy `/usr/share/aclocal/libtool.m4' to `m4/'
libtoolize: can not copy `/usr/share/aclocal/ltoptions.m4' to `m4/'
libtoolize: can not copy `/usr/share/aclocal/ltsugar.m4' to `m4/'

I see in an strace (but no idea where this statement went):

27793 write(2, "tar: ", 5)              = 5
27793 write(2, "ltoptions.m4: Cannot change ownership to uid 0, gid 0", 53) = 53
27793 write(2, ": Invalid argument", 18) = 18
27793 write(2, "\n", 1)

But I don't care that you couldn't set the uid/gid.  The file copied just fine.  How can we make this not fail?

Comment 1 Fedora End Of Life 2013-01-16 14:28:49 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Fedora End Of Life 2013-02-13 21:25:00 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 Pavel Raiskup 2013-02-14 16:41:42 UTC
I was unable to reproduce this before.. but I talked with Eric and the
trigger was NFS.

Command 'libtoolize' uses (because it want's to preserve timestamps
probably and copy targets of links) the program 'tar' as a copy tool -
there is (during 'libtoolize --copy') done something like this:

  tar -chf - FILE | tar -xf -

The problem is that tar is trying to store/restore also uid/gid (when ran
under root! only).  If NFS does not allow 'chown'-like operations, tar
fails to do what basically promises.

The solution would be (for GNU tar/bsdtar):

   tar -chf - FILE | tar -x --no-same-owner -f -

Which is not upstream-able due to limited portability.  I also don't know, how
usable libtool is on NFS at all.

I'll definitely think about this, re-opening and assigning to rawhide,
Pavel

Comment 4 Fedora End Of Life 2013-04-03 19:40:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 5 Pavel Raiskup 2013-04-23 14:27:29 UTC
Created attachment 739033 [details]
Possible fix.

I have looked at upstream code and the relevant code was completely
removed/re-written.  Libtool seems to be fixed in 'master' branch, but
backporting of the patches does not look like a good idea (too big changes, and
not yet released..).

As the new libtool release will fix this automatically, I will apply something
like attached fix for Fedora as an workaround.  This will be safe.. by default,
the tar utility will be run with --no-same-owner during extraction.  This
option can be overwritten e.g. when 'star' is used instead of 'tar':

  $ TAR=star TAR_NO_OWNER=--no-same-owner libtoolize ..

Pavel

Comment 6 Pavel Raiskup 2013-04-23 14:32:19 UTC
> $ TAR=star TAR_NO_OWNER=--no-same-owner libtoolize ..

Argh, this is bad of course:

  $ TAR=star TAR_NO_OWNER=-nochown libtoolize ..

Comment 7 Pavel Raiskup 2013-04-24 06:54:54 UTC
Change is committed f19/rawhide:

http://pkgs.fedoraproject.org/cgit/libtool.git/commit/?id=ff35f7147754313eeec7703ac46c00a56195b2e8

Comment 8 Fedora Update System 2013-04-26 18:11:57 UTC
libtool-2.4.2-14.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libtool-2.4.2-14.fc19

Comment 9 Fedora Update System 2013-04-27 17:27:36 UTC
Package libtool-2.4.2-14.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libtool-2.4.2-14.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6802/libtool-2.4.2-14.fc19
then log in and leave karma (feedback).


Note You need to log in before you can comment on or make changes to this bug.