Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34902 - madwifi-driver violates sandbox: need to first run modpost vmlinux
Summary: madwifi-driver violates sandbox: need to first run modpost vmlinux
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-02 10:08 UTC by Michael Leuchtenburg
Modified: 2003-12-19 17:51 UTC (History)
1 user (show)

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


Attachments
2.6.0 test ebuild (madwifi-driver-0.1_pre20031213-r1.ebuild,1.51 KB, text/plain)
2003-12-19 14:49 UTC, Stephen Diener (RETIRED)
Details
second attempt... (madwifi-driver-0.1_pre20031213-r1.ebuild,1.52 KB, text/plain)
2003-12-19 15:27 UTC, Stephen Diener (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Leuchtenburg 2003-12-02 10:08:27 UTC
When I tried to merge madwifi-driver on my just-installed system running 2.6, it
violated the sandbox. It had three of the following lines:
open_wr:   /lib/modules/2.6.0-test10-mm1/build/vmlinux.mod.c

It was calling scripts/modpost vmlinux [one of its own files]. I'm not sure what
this script does, but it was trying to create vmlinux.mod.c, which violated
sandbox. If I first ran modpost vmlinux by hand, it would create this file, and
then I could merge madwifi-driver. I haven't tested to see if this problem
exists with 2.4 kernels.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Gentoo Base System version 1.4.3.10
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.21-gss)
=================================================================
System uname: 2.4.21-gss i686 Intel(R) Pentium(R) M processor 1000MHz
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi
g /usr/kde/3/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="rsync://gentoo.seren.com/gentoo ftp://mirrors.tds.net/gentoo ftp
://gentoo.noved.org/ ftp://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm arts foomaticdb gpm imlib kde libg++ libwww mad mikmod motif mp
eg ncurses nls pdflib qt quicktime sdl svga xml2 zlib gdbm berkdb slang readline
 tcpd pam X gtk gnome -alsa aalib acpi avi cdr cjk crypt cscope cups doc dvd ema
cs encode esd ethereal ggi gif gps gtk2 joystick jpeg ldap leim maildir mbox mmx
 mozilla nocd oggvorbis opengl pcmcia pda perl png pnp python samba scanner spel
l slp snmp ssl truetype unicode usb videos xmms xv"
Comment 1 flo 2003-12-04 04:45:26 UTC
if i manually do:
"scripts/modpost ./vmlinux"
in /usr/src/linux
then the requested vmlinux.mod.c file is generated

but emerge madwifi-driver doesn't generate modules then here but it continues:

error is
>>> Install madwifi-driver-0.1_pre20031110 into /var/tmp/portage/madwifi-driver-0.1_pre20031110/image/ category net-wireless
install: cannot stat `/var/tmp/portage/madwifi-driver-0.1_pre20031110/work/wlan/wlan.o': No such file or directory
install: cannot stat `/var/tmp/portage/madwifi-driver-0.1_pre20031110/work/ath_hal/ath_hal.o': No such file or directory
install: cannot stat `/var/tmp/portage/madwifi-driver-0.1_pre20031110/work/driver/ath_pci.o': No such file or directory
man:
prepallstrip:
strip:
>>> Completed installing into /var/tmp/portage/madwifi-driver-0.1_pre20031110/image/

>>> Merging net-wireless/madwifi-driver-0.1_pre20031110 to /
--- /lib/
--- /lib/modules/
--- /lib/modules/2.6.0-test11/
--- /lib/modules/2.6.0-test11/net/
--- /usr/
--- /usr/share/
--- /usr/share/doc/
--- /usr/share/doc/madwifi-driver-0.1_pre20031110/
>>> /usr/share/doc/madwifi-driver-0.1_pre20031110/README.gz


when looking at modpost.c it seems that vmlinux as argument is just continued and not processed, thats why
"scripts/modpost vmlinux"
(without ./) doesnt work here.

----------

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0-test11)
=================================================================
System uname: 2.6.0-test11 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.4.3.10p1
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb alsa gdbm berkdb slang readline arts tetex aalib nas bonobo svga ggi tcltk java guile ruby mysql postgres X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk qt kde motif opengl mozilla gphoto2 ldap cdr scanner acl acpi apache2 artswrappersuid clanJavaScript clanVoice curl dga doc dv dvd emacs ethereal evo fbcon firebird flash freetds gb gd gnomedb gps gstreamer gtk2 gtkhtml imap innodb jack javascript joystick justify kerberos krb4 ladcca lcms libgda lirc maildir mbox mcal mdb mmx modif mpi mule oav odbc parse-clocks pcmcia pda plotutils pnp ppds radeon ruby18 samba sasl slp snmp socks5 sqlite sse tiff usb wmf Xaw3d xinerama xml zeo"
Comment 2 Stephen Diener (RETIRED) gentoo-dev 2003-12-13 14:13:23 UTC
Is there any way that you could write a patch to the makefile to fix this behavior?  I'll try and get to it in the near future but don't have a 2.6 box running.

2.4 kernels merge fine.

- Steve
Comment 3 Stephen Diener (RETIRED) gentoo-dev 2003-12-19 14:49:19 UTC
Created attachment 22445 [details]
2.6.0 test ebuild

This should fix at least some of the problems you guys are having but it is not
tested on a 2.6 system yet so I cannot promise anything.  Check it out and let
me know if it helps.  If it works for you, I'll commit it.

- Steve
Comment 4 flo 2003-12-19 15:01:26 UTC
errors out with:

gcc -include ../include/compat.h -I../include -I. -I../hal -I../hal/linux -I../ath_hal -I../wlan -I/lib/modules/2.6.0/build/include -I/lib/modules/2.6.0/build/arch/x86 -I/lib/modules/2.6.0/build/include/asm/mach-default -I.. -DKBUILD_BASENAME=ath_pci -DKBUILD_MODNAME=ath_pci -Wall -O2 -D__KERNEL__ -DMODULE -D__linux__ -fomit-frame-pointer -DAH_BYTE_ORDER=AH_LITTLE_ENDIAN -fomit-frame-pointer   -c -o if_ath_pci.mod.o if_ath_pci.mod.c
ld -o ath_pci.ko -r  if_ath.o if_ath_pci.o if_ath.mod.o if_ath_pci.mod.o
make[1]: Leaving directory `/var/tmp/portage/madwifi-driver-0.1_pre20031213-r1/work/driver'

>>> Install madwifi-driver-0.1_pre20031213-r1 into /var/tmp/portage/madwifi-driver-0.1_pre20031213-r1/image/ category net-wireless
/usr/sbin/ebuild.sh: line 44: [[: 2.6.0: syntax error in expression (error token is ".6.0")
 * Kernel Version under 2.5
install: cannot stat `/var/tmp/portage/madwifi-driver-0.1_pre20031213-r1/work/wlan/wlan.o': No such file or directory
install: cannot stat `/var/tmp/portage/madwifi-driver-0.1_pre20031213-r1/work/ath_hal/ath_hal.o': No such file or directory
install: cannot stat `/var/tmp/portage/madwifi-driver-0.1_pre20031213-r1/work/driver/ath_pci.o': No such file or directory
man:
prepallstrip:
strip:
>>> Completed installing into /var/tmp/portage/madwifi-driver-0.1_pre20031213-r1/image/

>>> Merging net-wireless/madwifi-driver-0.1_pre20031213-r1 to /
--- /lib/
--- /lib/modules/
--- /lib/modules/2.6.0/
--- /lib/modules/2.6.0/net/
--- /usr/
--- /usr/share/
--- /usr/share/doc/
>>> /usr/share/doc/madwifi-driver-0.1_pre20031213-r1/
>>> /usr/share/doc/madwifi-driver-0.1_pre20031213-r1/README.gz
Comment 5 flo 2003-12-19 15:13:42 UTC
i'm no developer, but should the following part

if [[ "${KV}" -gt "2.4" ]] ; then 
		cd /usr/src/linux
		./scripts/modpost ./vmlinux
fi

be done before compilation instead inside pkg_postinst()?
Comment 6 Stephen Diener (RETIRED) gentoo-dev 2003-12-19 15:27:11 UTC
Created attachment 22447 [details]
second attempt...

you're right,  I misread the report and probably fixed my type error in the
comparison, try this one ....

-steve
Comment 7 flo 2003-12-19 16:01:17 UTC
it now compiles and iwlist scan shows results...

so kill this bug! :)

thanks.
Comment 8 flo 2003-12-19 16:03:37 UTC
btw. i'm using kernel 2.6.0 release by now, no test version or stuff.
Comment 9 Stephen Diener (RETIRED) gentoo-dev 2003-12-19 17:51:31 UTC
squashed as of madwifi-driver-0.1_pre20031213-r1.ebuild