Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 181638 - freebsd emerge: chown: operation not permitted
Summary: freebsd emerge: chown: operation not permitted
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: x86 FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-11 10:43 UTC by Sascha Lucas
Modified: 2013-08-26 21:44 UTC (History)
0 users

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


Attachments
install wrapper (install,2.00 KB, text/plain)
2007-07-03 12:05 UTC, Sascha Lucas
Details
install wrapper (install,2.08 KB, text/plain)
2007-07-03 12:40 UTC, Sascha Lucas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Lucas 2007-06-11 10:43:02 UTC
I share my PORTDIR and DISTDIR between linux and freebsd. The tree is on linux/reiserfs and mounted ro under freebsd. Curiously the ro-reiserfs has freebsd's flags: ls -ol shows uchg (see man chflags). 

Ebuilds calling doman, dobin etc. run INSTALL(1). The BSD version says that by default it preserves all file flags. In my case the uchg. Later portage runs chown on files in ${D} which is not permitted because of uchg-flag set.

possible solution would be in case of BSD running "install -f 0 ...". Or someone telling me how to mount reiserfs without flags.
Comment 1 Dan Coats 2007-06-11 15:02:08 UTC
Does "chflags -R nouchg $PORTDIR" not solve this?
Comment 2 Sascha Lucas 2007-06-11 15:32:54 UTC
(In reply to comment #1)
> Does "chflags -R nouchg $PORTDIR" not solve this?

No I don't think, because $PORTDIR is "ro" (reiserfs/linux), but haven't tried yet, will try it.

Comment 3 Sascha Lucas 2007-06-11 15:34:19 UTC
> possible solution would be in case of BSD running "install -f 0 ...". Or

correction: INSTALL(1) does not support -f <number> as discribe in CHFLAGS(1). For me the uchg flag should be removed and "install -f nouchg ..." works.

effected are all ebuilds that make use of {doman,dobin,doins,doexe,???} in src_install with files from ${FILESDIR}. examples: sys-devel/binutils-config, app-shells/bash...
Comment 4 Sascha Lucas 2007-06-13 09:16:23 UTC
(In reply to comment #1)
> Does "chflags -R nouchg $PORTDIR" not solve this?

doesn't help (operation not permitted), because $PORTDIR is a read only filesystem.

Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-06-18 11:36:34 UTC
I'm afraid there's little we can do about this; skipping over flags during do* commands is probably not a good idea as we might need to keep them when installing files from tarballs that have their flags set.
Comment 6 Sascha Lucas 2007-06-18 13:16:37 UTC
(In reply to comment #5)
> I'm afraid there's little we can do about this; skipping over flags during do*
> commands is probably not a good idea as we might need to keep them when
> installing files from tarballs that have their flags set.

understood. Working on my problem implies a solution for distinguishing between wanted and unwanted flags (for safety measure etc). An indicator may be if arguments of do{man,bin,ins,exe,doc,html} match ${FILESDIR}. Then any flag set is mostly unwanted.
Comment 7 Sascha Lucas 2007-07-03 12:05:46 UTC
Created attachment 123765 [details]
install wrapper

this script is a wrapper around /usr/bin/install. It devides all source files into those from ${FILESDIR} with uchg-flag and others. For files with uchg-flag it runs /usr/bin/install with "-f nouchg" option added. For others it does alter nothing.

It can work as a general wrapper for /usr/bin/install but would slow down "make install" etc. It should be at least replace install-calls from all do*.
Comment 8 Sascha Lucas 2007-07-03 12:40:45 UTC
Created attachment 123767 [details]
install wrapper

bugfix: accidentally used find ... -f instead of find ... -flags ... casing files with uchg to be skipped (not installed).
Comment 9 Alexis Ballier gentoo-dev 2013-08-26 21:44:04 UTC
should have been fixed long ago, and we shouldnt be installing with nouschg anymore anyway