* Preparing rlocate module mv Makefile Makefile.automake cp ./Makefile.kernel ./Makefile make -C /usr/src/linux SUBDIRS=`cd . && pwd` modules \ KBUILD_VERBOSE=1 make[1]: Entering directory `/usr/src/linux-2.6.24-gentoo' test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \ echo; \ echo " ERROR: Kernel configuration is invalid."; \ echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \ echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo; \ /bin/false) mkdir -p /var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/.tmp_versions ; rm -f /var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/.tmp_versions/* make -f scripts/Makefile.build obj=/var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module i686-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/.rlocate.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -pipe -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=athlon -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -Iinclude/asm-x86/mach-default -fomit-frame-pointer -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -DIRCTL_DEV_MAJOR=254 -DRL_VERSION=\"0.5.6\" -DEXPORT_SYMTAB -DHAVE_CONFIG_H -I. -I. -I../.. -I ./ -I /usr/src/linux/include/ -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(rlocate)" -D"KBUILD_MODNAME=KBUILD_STR(rlocate)" -c -o /var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/rlocate.o /var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/rlocate.c /var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/rlocate.c: In function ‘init_rlocate’: /var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/rlocate.c:1046: error: implicit declaration of function ‘mod_unreg_security’ /var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/rlocate.c:1048: error: implicit declaration of function ‘unregister_security’ make[2]: *** [/var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module/rlocate.o] Error 1 make[1]: *** [_module_/var/tmp/portage/sys-apps/rlocate-0.5.6/work/rlocate-0.5.6/src/rlocate-module] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.24-gentoo' make: *** [rlocate.o] Error 2 * * ERROR: sys-apps/rlocate-0.5.6 failed.
Portage 2.1.4 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo-r6 i686) ================================================================= System uname: 2.6.23-gentoo-r6 i686 AMD Athlon(tm) XP 1600+ Timestamp of tree: Fri, 25 Jan 2008 20:00:03 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.3 dev-lang/python: 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0_rc6-r1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.17, 2.18, 2.18.50.0.2, 2.18.50.0.3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d /usr/share/X11/xkb" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--alphabetical --with-bdeps=y" FEATURES="ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="ftp://gentoo.mirror.web4u.cz/ http://gentoo.tiscali.nl/distfiles/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,--hash-style=gnu" LINGUAS="cs en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--progress --prune-empty-dirs" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/beryl /usr/local/overlays/enlightenment /usr/local/overlays/php-overlay/testing /usr/local/overlays/php-overlay/experimental /usr/local/overlays/vmware" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 7zip X X509 a52 aac aalib acl acpi alsa amr ao asf audiofile avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cddb cdparanoia cdr chroot cli cpudetection cracklib crypt cscope css cups curl curlwrappers daap dbus dbx dga directfb dri dts dv dvb dvd dvdr dvdread encode exif expat fam fame fbcon ffmpeg fftw firefox flac flash flatfile foomaticdb ftp fuse gd gdbm geoip ggi gif gimp glitz glut gmp gphoto2 gpm graphviz gs gstreamer gtk hal ical iconv icq idn imagemagick imap imlib inifile ipv6 irda jack javascript jbig joystick jpeg jpeg2k kdeenablefinal kdehiddenvisibility kipi lame lcms libcaca libnotify libsamplerate lirc live lm_sensors logrotate lzo mad maildir matroska midi mikmod mime mjpeg mmap mmx mmxext mng modplug moznopango mp3 mp4 mpeg mplayer mudflap multiuser musepack musicbrainz ncurses network network-cron nfs nls nodrm nptl nptlonly nsplugin nvidia odbc offensive ogg openal opengl openmp pam pcre pdf perl php png portaudio ppds python qt3 qt3support qt4 quicktime rar readline real reflection rle ruby samba sdl sdl-image session skey sms sndfile speex spell spl sqlite sqlite3 sse ssl startup-notification subtitles svg symlink syslog tcpd theora threads threadsafe thumbnail tiff truetype unicode urandom usb v4l v4l2 vcd vim-syntax vim-with-x vorbis wavpack win32codecs wmf x264 x86 xattr xcomposite xine xinerama xinetd xml xmlrpc xorg xosd xpm xscreensaver xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="emu10k1 bt87x" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs en" LIRC_DEVICES="cph06x devinput" USERLAND="GNU" VIDEO_CARDS="fbdev nv nvidia v4l vesa vmware" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
This would seem to be needing a fix upstream as well, since those functions do not exist in the kernel >=2.6.24 anymore. From the kernel change log: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=cbfee34520666862f8ff539e580c48958fbb7706 quote Adrian Bunk [Wed, 17 Oct 2007 06:31:38 +0000 (23:31 -0700)] This patch contains the following cleanups that are now possible: - remove the unused security_operations->inode_xattr_getsuffix - remove the no longer used security_operations->unregister_security - remove some no longer required exit code - remove a bunch of no longer used exports /quote I don't run a security model enabled kernel myself so I cannot even emerge this, but it would seem to me that no unregistering is needed in the kernel anymore. If so, the following patch should be enough.
Created attachment 141816 [details, diff] Remove obsoleted unreg security calls under kernel 2.6.24
Created attachment 141817 [details, diff] Remove obsoleted unreg security calls under kernel 2.6.24 Sorry about that, forgot to correct the comparison operator.
Well, that compiles but doesn't work... I'm afraid this got completely fubared by latest kernel changes... :( * Updating module dependencies for 2.6.24-gentoo ... WARNING: //lib/modules/2.6.24-gentoo/misc/rlocate.ko needs unknown symbol register_security WARNING: //lib/modules/2.6.24-gentoo/misc/rlocate.ko needs unknown symbol mod_reg_security ... rlocated[7639]: segfault at 00000000 eip 0804a810 esp bff25940 error 4 rlocate: Unknown symbol register_security rlocate: Unknown symbol mod_reg_security
Well, so it seems. It appears that support for out-of-tree LSM modules was dropped altogether: http://lkml.org/lkml/2007/10/17/532 A part of that change that I did not notice earlier was removal of these lines from security/security.c: EXPORT_SYMBOL_GPL(register_security); EXPORT_SYMBOL_GPL(unregister_security); EXPORT_SYMBOL_GPL(mod_reg_security); EXPORT_SYMBOL_GPL(mod_unreg_security); EXPORT_SYMBOL(security_ops); So, not only are the unreg functions nonexistent, the register functions are not visible to out-of-tree modules. It appears that there's no way to do this apart from changing the kernel itself - a patch to do this adding a new kernel configuration option "SECURITY_MODULAR" was offered in http://lkml.org/lkml/2007/10/23/3 but does not seem to have made it to the kernel tree, so it may be unsafe to use. With a kernel compiled with that option rlocate should work unpatched. This change would probably also work for bug #207537 .
Created attachment 141826 [details, diff] 2.6.24-LSM-revert-static.patch (In reply to comment #6) > - a patch to do this adding a new kernel configuration option > "SECURITY_MODULAR" was offered in http://lkml.org/lkml/2007/10/23/3 > > but does not seem to have made it to the kernel tree, so it may be unsafe to > use. > With a kernel compiled with that option rlocate should work unpatched. Yeah, that indeed works... Attached above, you can apply this from /usr/src/linux via patch -p0, set CONFIG_SECURITY=y and CONFIG_SECURITY_MODULAR=y and all works again.
i'll just mask for removal
(In reply to comment #8) > i'll just mask for removal So much for kernel progres... There's no viable *locate alternative that'd have realtime indexing. Oh well, I can maintain this in overlay with a custom kernel patch. Sigh :/
i'll leave it masked in the tree
Submitted this to upstream: http://sourceforge.net/tracker/index.php?func=detail&aid=1882565&group_id=129555&atid=715563 Hope they come up with a solution.
Kernel Bugzilla now has a report of this, too. http://bugzilla.kernel.org/show_bug.cgi?id=10193
(In reply to comment #10) > i'll leave it masked in the tree So finally rlocate has been removed from the tree. Packages that should have their dependencies fixed: emacs@gentoo.org: app-emacs/fff-20050517 vim@gentoo.org: app-vim/locateopen-1.3 kde@gentoo.org: kde-misc/kio-locate-0.4.5
app-emacs/fff done.
kde-misc/kio-locate done. Note aside is there working alternative anywhere for rlocate?
build rlocate into the kernel and it should work fine
http://sources.gentoo.org/app-vim/locateopen/locateopen-1.3.ebuild?r1=1.8&r2=1.9