Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339185 - sys-apps/coreutils: rm -R -> function not implemented when /proc not mounted
Summary: sys-apps/coreutils: rm -R -> function not implemented when /proc not mounted
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: s390 Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 00:32 UTC by Enrico 'nekrad' Weigelt
Modified: 2010-10-01 22:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrico 'nekrad' Weigelt 2010-09-30 00:32:46 UTC
coreutils's rm isn't able to recoursively remove directories (rm -R), tells "Function not implemented". That causes many ebuilds to fail.

I'm running an Gentoo chroot on an RHEL (2.6.9-42.EL) instance on S390 mainframe.

This might well be an upstream bug, as coreutils changed it's directory traversal to use procfs when it thinks certain functions (fchdir(), etc)
were not available. Using /proc obviously breaks chroot's. 

http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/6839
http://lists.gnu.org/archive/html/bug-coreutils/2008-08/msg00149.html
https://bugs.launchpad.net/ubuntu/hardy/+source/coreutils/+bug/192239
http://bugs.gentoo.org/show_bug.cgi?id=224483



Reproducible: Always
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-09-30 12:55:09 UTC
Which version of coreutils do you use (`emerge -pv coreutils`)? Michael
Comment 2 Michael Weber (RETIRED) gentoo-dev 2010-09-30 12:58:32 UTC
Can you use `mount --bind /proc /<chroot>/proc` in the outer system as a work-around? ps, wouldn't work w/o proc either.
Comment 3 Enrico Weigelt, metux ITS 2010-10-01 19:31:37 UTC
(In reply to comment #1)
> Which version of coreutils do you use (`emerge -pv coreutils`)? Michael
> 

[ebuild   R   ] sys-apps/coreutils-8.5 

Comment 4 Enrico Weigelt, metux ITS 2010-10-01 19:33:54 UTC
(In reply to comment #2)
> Can you use `mount --bind /proc /<chroot>/proc` in the outer system as a
> work-around? ps, wouldn't work w/o proc either.

No, that makes it even worse: it tries to use /proc/<pid>/fd/*, which
obviously gives wrong results in chroot environments.
Comment 5 SpanKY gentoo-dev 2010-10-01 19:47:35 UTC
running Gentoo without /proc mounted is not supported
Comment 6 Enrico Weigelt, metux ITS 2010-10-01 20:40:27 UTC
(In reply to comment #5)
> running Gentoo without /proc mounted is not supported

With /proc it doesn't work either. In fact, it's even worse then.


So, you have to options now: 

a) reopen the bug and accept it as valid
b) leave it and so confess that you don't care about critical bugs in base packages.


cu
Comment 7 SpanKY gentoo-dev 2010-10-01 20:42:04 UTC
you have provided 0 details as to how it breaks when /proc is not mounted.  you've only said "Using /proc obviously breaks chroot's" which is ridiculously incorrect.  no details -> bug still invalid.
Comment 8 Enrico Weigelt, metux ITS 2010-10-01 21:03:59 UTC
(In reply to comment #7)
> you have provided 0 details as to how it breaks when /proc is not mounted. 
> you've only said "Using /proc obviously breaks chroot's" which is ridiculously
> incorrect.  no details -> bug still invalid.

Perhaps you should read postings (including references) before judging on anything.

coreutils tries to traverse the tree by taking the cwd and fds from /proc.
This breaks chroot environment, as procfs has no special filename masking for chroots.
Comment 9 SpanKY gentoo-dev 2010-10-01 22:29:51 UTC
all the bugs you refer to are out of date and do not apply to coreutils-8.5, nor are they necessarily ones we care about.  if you're using such an old kernel that the *at funcs are not available, and you refuse to mount /proc, then it isnt our problem.  mount /proc or upgrade your kernel.