Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 159876
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Xake <xake@rymdraket.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 159876 depends on: 69021 Show dependency tree
Bug 159876 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-01-03 10:26 0000
...and it seems to be no workaround to this errormessage:

>>> Test phase [test]: sys-fs/dazuko-2.3.2-r3
!! you must be root !!
make: *** [test] Error 1

Portage 2.1.2_rc4-r5 (default-linux/x86/2006.1/desktop, gcc-4.1.1,
glibc-2.5-r1, 2.6.19-gentoo-r2 i686)
=================================================================
System uname: 2.6.19-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.12.8
Last Sync: Wed, 03 Jan 2007 15:00:03 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[enabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.5-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17.50.0.8
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -pipe -O2 -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo
/etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -pipe -O2 -ggdb -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" "
FEATURES="autoconfig ccache distcc distlocks parallel-fetch sandbox sfperms
splitdebug strict test userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.csbnet.se/pub/linux/distributions/gentoo/
http://trumpetti.atm.tut.fi/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/
http://mirror.pudas.net/gentoo"
LANG="sv"
LC_ALL="sv_SE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-znow -Wl,--hash-style=gnu"
LINGUAS="sv"
MAKEOPTS="-j5 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/portage /usr/local/overlays/nouveau
/usr/portage/local/layman/musicbrainz /usr/portage/local/layman/nxsty
/usr/portage/local/layman/gnome-experimental /usr/portage/local/layman/mozilla
/usr/portage/local/layman/gentopia"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi aiglx alsa asf audioscrobbler avahi bash bash-completion
beagle berkdb bitmap-fonts branding bzip2 cairo cdr cli cracklib crypt cups
dbus debug divx dlloader dmx dpms dri dvd dvdr eds eiglx emboss encode
evolution fam fat ffmpeg firefox flac fortran freetype gd gdbm gif gimp glitz
gmp gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal howl-compat iconv icu
inotify ipv6 irmc isdnlog ithreads java jikes joystick jpeg lcms ldap libg++
libnotify libsexy lm_sensors logrotate mad matroska matrox mikmod mmx mng mono
moznocompose moznoirc moznomail mp3 mpeg musepack musicbrainz nautilus ncurses
network nls nptl nptlonly ntfs ntp numeric offensive ogg opengl pam pam_console
pcre pdf perl pic png ppds pppd print pulseaudio python quicktime readline real
reflection reiserfs rtc samba sdl sensord session smp sox spell spf spl sse
sse2 ssh ssl startup-notification subtitles svg syslog tcltk tcpd test theora
threads tiff truetype truetype-fonts tth type1-fonts udev unicode usb
userlocales utf8 vorbis win32codecs wma wmf wv wxwindows x86 xcb xinerama
xinetd xml xml2 xorg xosd xprint xulrunner xv xvid zlib" ALSA_CARDS="emu10k1
intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty
extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null
plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev"
KERNEL="linux" LINGUAS="sv" USERLAND="GNU" VIDEO_CARDS="none nvidia nouveau"
Unset:  CTARGET, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Alon Bar-Lev (RETIRED) 2007-01-03 12:52:31 0000 -------
Well... It is right... You cannot test kernel module if you are not root...
What behavior do you expect?
I can remove the test support...
But I guess this is not the only package that require root for testing...
And people may want to test...

------- Comment #2 From Xake 2007-01-04 07:31:30 0000 -------
...or make it possible to have portage make some elements as root when
FEATURES="userpriv" is enabled? That would make this into a thing for the
portage-team...

------- Comment #3 From Alon Bar-Lev (RETIRED) 2007-01-04 11:56:33 0000 -------
Hello Portage team,
I will appreciate any thoughts on this one.

I think that if user specify userpriv, he should be ensured that testing cannot
damage his system...
And if the user specified test, and the test cannot be conducted, then we
should fail the test procedure, not ignore the issue.

So actually what I am saying is that I am happy with current implementation... 

Thanks!

------- Comment #4 From Alec Warner 2007-01-04 19:48:31 0000 -------
(In reply to comment #3)
> Hello Portage team,
> I will appreciate any thoughts on this one.
> 
> I think that if user specify userpriv, he should be ensured that testing cannot
> damage his system...
> And if the user specified test, and the test cannot be conducted, then we
> should fail the test procedure, not ignore the issue.
> 
> So actually what I am saying is that I am happy with current implementation... 
> 
> Thanks!
> 

We have a few options; one of course is not depriving during the test phase. 
We can add a finer grained RESTRICT to restrict to certain phases.

I don't like either of these to be honest, but kernel modules are an exception
to a normal build routine (where you can generally build and install as a
non-root user).

What if I'm building on SELINUX and I'm not in the correct security context to
load kernel modules (=failure) so I also agree with the current behavior.

Is there a way to patch the tests to run as a normal user (ie are there
non-root tests we can perform, and just exclude the others?)

------- Comment #5 From Alon Bar-Lev (RETIRED) 2007-01-05 01:39:32 0000 -------
Thanks for the reply!

(In reply to comment #4)
> Is there a way to patch the tests to run as a normal user (ie are there
> non-root tests we can perform, and just exclude the others?)

Not in this one... kernel module must be loaded in order to succeed in any
test...
And performing these test may cause system to be unusable...

So I am quite happy that test fails and not switch to root automatically...

------- Comment #6 From Xake 2007-01-05 02:51:10 0000 -------
Then maybe just restrict test if userpriv and leave a message telling no tests
was ran due to missing permissons?

------- Comment #7 From Zac Medico 2007-01-05 03:07:22 0000 -------
(In reply to comment #6)
> Then maybe just restrict test if userpriv and leave a message telling no tests
> was ran due to missing permissons?

The problem is that there is currently no way to make RESTRICT="test"
conditional on FEATURES="userpriv".  One possible solution would be to put
FEATURES into USE_EXPAND so that we could have RESTRICT="features_userpriv? (
test )" but that would require some changes to portage internals and some
people are opposed to the general idea of having FEATURES extend into the USE
conditional space (although it would be useful for this bug and in other cases
like bug #69021).

------- Comment #8 From Daniel Drake 2007-01-05 05:06:01 0000 -------
How about something like having both src_test() and src_test_root_only()  in
the ebuild API, and portage having the logic to decide when each one should be
invoked?

------- Comment #9 From Marius Mauch (RETIRED) 2007-01-05 07:21:18 0000 -------
As workaround you could do a 

if ! has userpriv $FEATURES; then
    # perform root only tests
else
    elog "Some tests skipped due to userpriv restrictions"
fi

Still not really comfortable with it (ebuilds shouldn't care about FEATURES)
but works without any portage changes.

How many packages share this problem anyway? If it's just a few it should be
handled via an eclass IMHO.

------- Comment #10 From Alon Bar-Lev (RETIRED) 2007-01-05 07:28:23 0000 -------
It means that the test will not be preformed... I don't think ewarn is
enough...

But it can be simpler... No need to look-up features...

if [ $(id -u) = 0 ]; then ...

------- Comment #11 From Alec Warner 2007-01-05 09:08:02 0000 -------
(In reply to comment #10)
> It means that the test will not be preformed... I don't think ewarn is
> enough...
> 
> But it can be simpler... No need to look-up features...
> 
> if [ $(id -u) = 0 ]; then ...
> 

+1, except try if [[ $EUID = 0 ]] ; then..

and save yourself a fork.

------- Comment #12 From Marius Mauch (RETIRED) 2007-01-10 01:27:49 0000 -------
(In reply to comment #10)
> It means that the test will not be preformed... I don't think ewarn is
> enough...

Well, replace ewarn with whatever you want. Point was that unless this is a
common problem it the solution should be in the tree, not in portage. Closing
this for now, reopen if it turns out to be a common problem (as in affects
several dozen packages or so).

> But it can be simpler... No need to look-up features...
> 
> if [ $(id -u) = 0 ]; then ...

That should work as well, yep.

------- Comment #13 From Xake 2007-01-10 17:22:24 0000 -------
Well this "bug" is not really fixed, so I think closing is wrong, better to
reassign it back to maintainer of dazuko.
If none of the fixes mentioned here does it right maybe go another way.

If you take for example sys-devel/gcc it passes the test phase with a comment
like "some test failed and it sucks" but it does not error out but merges the
package.
Maybe do the same for dazuko but give a message that the fails could be becouse
of you where running it with userpriv?

Apparently this is something that is not an error in the tests (as it needs
root) and it is not an error in portage (as userpriv forces user portage as
much as possible as it should) and I think it is wrong to RESTRICT the test but
also wrong to force users to disable test/userpriv for just this package (and
it is very annoying if you do a massive 'emerge world -uDN' for example.

------- Comment #14 From Alon Bar-Lev (RETIRED) 2007-01-10 17:50:29 0000 -------
OK.
Added ewarn if not root on test stage (dazuko).

------- Comment #15 From Philipp Riegger 2007-01-12 13:54:32 0000 -------
Maybe a "test" USE-flag in this case could be nice. The ebuild could behave
like it now does when the flag is disabled and it could die when "test" is
enabled. So the dying could be controlled by /ets/portage/*.

------- Comment #16 From Xake 2007-01-12 20:35:05 0000 -------
Thats not what the test flag is for.

Better as it is now, and for the people it matters for they have the reasons in
their ELOG.

------- Comment #17 From Zac Medico 2007-01-13 07:02:00 0000 -------
Note that FEATURES=test now implies USE=test for portage-2.1.2 (see bug
#69021).  Also note the relevant discussions happening on the gentoo-dev
mailing list:

http://thread.gmane.org/gmane.linux.gentoo.devel/45241
http://thread.gmane.org/gmane.linux.gentoo.devel/45354

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug