Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 183922 - emerge system fails in jail w/ chflags disallowed
Summary: emerge system fails in jail w/ chflags disallowed
Status: RESOLVED INVALID
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-07-02 03:12 UTC by Douglas Ward
Modified: 2008-07-02 21:24 UTC (History)
0 users

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 Douglas Ward 2007-07-02 03:12:31 UTC
some of the system ebuilds for freebsd fail in a freebsd jail because you can't use chflags.

Reproducible: Always

Steps to Reproduce:




the following wrapper solved my problem but a more permanent solution, like jail detection, is needed. (forgive my poor regex. i'm sure the job could be done with one search and replace rather than two.)

first rename /usr/bin/install to /usr/bin/install.real and enter the following as /usr/bin/install and chmod +x

#!/bin/bash

newargs=`echo $@ | sed -e "s/ \-f [^ ]* / /" -e "s/ \-f[^ ]* / /"`

/usr/bin/install.real $newargs
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-07-02 09:01:02 UTC
Not respecting flags is not really an option.
Comment 2 Douglas Ward 2007-07-02 19:03:51 UTC
this needs to be fixed. chflags is not required. if you want to have gentoo/freebsd matter AT ALL you need to make it's features work. I'm willing to continue to report bugs on gentoo/freebsd only if they are taken seriously. 

BOTTOM LINE: if it doesn't work in a jail, it isn't freebsd. Fix it or rename your project.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-07-02 19:15:21 UTC
(In reply to comment #0)
> some of the system ebuilds for freebsd fail in a freebsd jail because you can't
> use chflags.

Why? What's the error?
Comment 4 Douglas Ward 2007-07-02 19:37:34 UTC
not all jail providers allow chflags in their jails. The default setting for chflags in jails is OFF. as in DISALLOW.
Comment 5 Douglas Ward 2007-07-02 19:52:05 UTC
sysctl security.jail.chflags_allowed will return if chflags is allowed to be used.

if not allowed:
security.jail.chflags_allowed: 0

if allowed:
security.jail.chflags_allowed: 1

mind you even if it is allowed in a jail, it doesn't do anything... it just makes the function always return 0.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-07-02 22:15:27 UTC
(In reply to comment #4)
> not all jail providers allow chflags in their jails. 

That's kinda your problem.
Comment 7 Douglas Ward 2007-07-02 22:22:11 UTC
um... no... it's standard procedure in the freebsd world... freebsd itself works when chflags is off, gentoo/freebsd should too... or it can't really call itself freebsd at all...
Comment 8 Roy Marples (RETIRED) gentoo-dev 2007-07-02 22:31:56 UTC
(In reply to comment #5)
> mind you even if it is allowed in a jail, it doesn't do anything... it just
> makes the function always return 0.

Isn't that in effect what your above wrapper does?

(In reply to comment #7)
> um... no... it's standard procedure in the freebsd world... freebsd itself
> works when chflags is off, gentoo/freebsd should too... or it can't really call
> itself freebsd at all...

No, we call it Gentoo/FreeBSD. Or did you expect the FreeBSD rc system to work
here as well?