I have written a userspace tool that handles the wlan button on some notebooks via the kernel event structure. I have tested it on three different notebooks with success. For details see at my project page: http://www.roessner-net.com/wlan_button/ The only problem I have is the ebuild itself. I get violation errors from the sandbox, so maybe wants to look at my very little Makefile and give me a hint. Thanks Christian Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 58809 [details] Makefile This Makefile uses "install" which seems to colide with the sandbox
Created attachment 58810 [details] wlan_button-1.40.ebuild Use FEATURES="-sandbox" emerge wlan_button to install the package (Please note: The -sandbox is just a workaround) I would put the ebuild inside of app-laptop/wlan_button
I have modified the ebuild and the Makefile with the help of Spock, so it should work now.
Created attachment 58857 [details] wlan_button-1.50.ebuild This new release makes the setup very much easier. Check out the project website.
Created attachment 59197 [details] wlan_button-2.00.ebuild Please see the Changelog on the project website
Created attachment 59260 [details] wlan-button-2.01.ebuild Changed the underscore in wlan_button to wlan-button. The ebuild now handles the initd and confd script installaton.
Created attachment 59261 [details] wlan_button.conf Put this in app-laptop/wlan-button/files
Created attachment 59262 [details] wlan_button.init Put this in app-laptop/wlan-button/files
Created attachment 60270 [details] wlan-button-2.10.ebuild
Created attachment 60271 [details] wlan-button.conf
Created attachment 60272 [details] wlan-button.init
Created attachment 60672 [details] wlan-button-2.20.ebuild New release includes config file support and more. See homepage for more information
Created attachment 60673 [details] wlan-button.conf This file has changed very much. You only need to specify a path to the config file
Created attachment 60674 [details] wlan-button.init The init script now tries to load a config file instead of specifying each supported option.
Created attachment 61166 [details] wlan-button.init Removed the config file parameter, because /etc/wlan-button.conf is a default now.
Created attachment 61167 [details] wlan-button-2.22.ebuild New release. The version fixes minor bugs and replaces the newly introduced config file parser with libxml2 support.
Created attachment 64385 [details] wlan-button-2.23.ebuild Minor fixes to the ebuild and minor fixes in the code.
This is my emerge info: Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.12-gentoo-r4 i686) ================================================================= System uname: 2.6.12-gentoo-r4 i686 Mobile AMD Sempron(tm) Processor 2800+ Gentoo Base System version 1.6.12 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.10 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -m3dnow -msse -fPIC" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -m3dnow -msse -fPIC" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/ebuilds" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups dvd emboss encode fam foomaticdb fortran gdbm gif gnome gpm gtk gtk2 gui i8x0 imagemagick imlib ipv6 jpeg kde libg++ libwww live mad mikmod mmx mmxext motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl spell sse sse2 ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS And this is the error that I get: gcc -Wall -pedantic -std=gnu99 -pthread `xml2-config --cflags` -D_KERNEL26 -march=athlon-xp -O2 -pipe -m3dnow -msse -fPIC -c wlan-button.c gcc -Wall -pedantic -std=gnu99 -pthread `xml2-config --cflags` -D_KERNEL26 -march=athlon-xp -O2 -pipe -m3dnow -msse -fPIC -c xmlparseconfig.c gcc -pthread `xml2-config --libs` -lsysfs -o wlan-button wlan-button.o xmlparseconfig.o wlan-button.o(.text+0x673): In function `get_sysfs_attr_value': : undefined reference to `sysfs_find_driver_bus' wlan-button.o(.text+0x691): In function `get_sysfs_attr_value': : undefined reference to `sysfs_get_mnt_path' wlan-button.o(.text+0x752): In function `get_sysfs_attr_value': : undefined reference to `sysfs_open_driver_path' wlan-button.o(.text+0x76e): In function `get_sysfs_attr_value': : undefined reference to `sysfs_get_driver_devices' wlan-button.o(.text+0x77c): In function `get_sysfs_attr_value': : undefined reference to `dlist_start' wlan-button.o(.text+0x78c): In function `get_sysfs_attr_value': : undefined reference to `_dlist_mark_move' wlan-button.o(.text+0x7a0): In function `get_sysfs_attr_value': : undefined reference to `sysfs_get_device_attributes' wlan-button.o(.text+0x7ae): In function `get_sysfs_attr_value': : undefined reference to `dlist_start' wlan-button.o(.text+0x7be): In function `get_sysfs_attr_value': : undefined reference to `_dlist_mark_move' wlan-button.o(.text+0x7ef): In function `get_sysfs_attr_value': : undefined reference to `_dlist_mark_move' wlan-button.o(.text+0x806): In function `get_sysfs_attr_value': : undefined reference to `sysfs_close_driver' collect2: ld returned 1 exit status make: *** [wlan-button] Error 1 >>> Test phase [not enabled]: app-laptop/wlan-button-2.23 >>> Install wlan-button-2.23 into /var/tmp/portage/wlan-button-2.23/image/ category app-laptop gcc -pthread `xml2-config --libs` -lsysfs -o wlan-button wlan-button.o xmlparseconfig.o wlan-button.o(.text+0x673): In function `get_sysfs_attr_value': : undefined reference to `sysfs_find_driver_bus' wlan-button.o(.text+0x691): In function `get_sysfs_attr_value': : undefined reference to `sysfs_get_mnt_path' wlan-button.o(.text+0x752): In function `get_sysfs_attr_value': : undefined reference to `sysfs_open_driver_path' wlan-button.o(.text+0x76e): In function `get_sysfs_attr_value': : undefined reference to `sysfs_get_driver_devices' wlan-button.o(.text+0x77c): In function `get_sysfs_attr_value': : undefined reference to `dlist_start' wlan-button.o(.text+0x78c): In function `get_sysfs_attr_value': : undefined reference to `_dlist_mark_move' wlan-button.o(.text+0x7a0): In function `get_sysfs_attr_value': : undefined reference to `sysfs_get_device_attributes' wlan-button.o(.text+0x7ae): In function `get_sysfs_attr_value': : undefined reference to `dlist_start' wlan-button.o(.text+0x7be): In function `get_sysfs_attr_value': : undefined reference to `_dlist_mark_move' wlan-button.o(.text+0x7ef): In function `get_sysfs_attr_value': : undefined reference to `_dlist_mark_move' wlan-button.o(.text+0x806): In function `get_sysfs_attr_value': : undefined reference to `sysfs_close_driver' collect2: ld returned 1 exit status make: *** [wlan-button] Error 1 man: prepallstrip: strip: i686-pc-linux-gnu-strip --strip-unneeded strip: i686-pc-linux-gnu-strip --strip-unneeded >>> Completed installing wlan-button-2.23 into /var/tmp/portage/wlan-button-2.23/image/ >>> Merging app-laptop/wlan-button-2.23 to / --- /etc/ >>> /etc/wlan-button.conf --- /etc/init.d/ >>> /etc/init.d/wlan-button --- /usr/ --- /usr/share/ --- /usr/share/doc/ --- /usr/share/doc/wlan-button-2.23/ >>> /usr/share/doc/wlan-button-2.23/README.gz --- /usr/share/man/ --- /usr/share/man/man5/ >>> /usr/share/man/man5/wlan-button.conf.5.gz --- /usr/share/man/man8/ >>> /usr/share/man/man8/wlan-button.8.gz >>> Safely unmerging already-installed instance... --- !mtime obj /usr/share/man/man8/wlan-button.8.gz --- !mtime obj /usr/share/man/man5/wlan-button.conf.5.gz --- !mtime obj /usr/share/doc/wlan-button-2.23/README.gz --- cfgpro obj /etc/wlan-button.conf --- cfgpro dir /etc/init.d --- !empty dir /usr/share/man/man8 --- !empty dir /usr/share/man/man5 --- !empty dir /usr/share/man --- !empty dir /usr/share/doc/wlan-button-2.23 --- !empty dir /usr/share/doc --- !empty dir /usr/share --- !empty dir /usr --- !empty dir /etc >>> original instance of package unmerged safely. * Attention! Major changes have been made since version 1.50, * so please check the config file. * * A sample configuration is in /etc/wlan-button.conf. Adapt it * to your needs. See wlan-button.conf(5) for more information >>> Regenerating /etc/ld.so.cache... >>> app-laptop/wlan-button-2.23 merged. >>> clean: No packages selected for removal. >>> Auto-cleaning packages ... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date.
What version of sysfsutils are you using?
Please check latest binutils package, currently 2.16.1.
Same problem here with: binutils-2.15.92.0.2-r10 sysfsutils-1.2.0-r2 with: sys-devel/binutils-2.16.1 [0106]firebird ~ # ebuild /usr/local/portage/app-laptop/wlan-button/wlan-button-2.23.ebuild clean [0106]firebird ~ # ebuild /usr/local/portage/app-laptop/wlan-button/wlan-button-2.23.ebuild unpack >>> md5 files ;-) wlan-button-2.23.ebuild >>> md5 files ;-) files/digest-wlan-button-2.23 >>> md5 src_uri ;-) wlan-button-2.23.tar.bz2 >>> Unpacking source... >>> Unpacking wlan-button-2.23.tar.bz2 to /var/tmp/portage/wlan-button-2.23/work >>> Source unpacked. [0106]firebird ~ # ebuild /usr/local/portage/app-laptop/wlan-button/wlan-button-2.23.ebuild compile >>> md5 files ;-) wlan-button-2.23.ebuild >>> md5 files ;-) files/digest-wlan-button-2.23 >>> md5 src_uri ;-) wlan-button-2.23.tar.bz2 >>> Checking wlan-button-2.23.tar.bz2's mtime... >>> WORKDIR is up-to-date, keeping... gcc -Wall -pedantic -std=gnu99 -pthread `xml2-config --cflags` -D_KERNEL26 -O2 -march=pentium4 -pipe -fomit-frame-pointer -c wlan-button.c gcc -Wall -pedantic -std=gnu99 -pthread `xml2-config --cflags` -D_KERNEL26 -O2 -march=pentium4 -pipe -fomit-frame-pointer -c xmlparseconfig.c gcc -pthread `xml2-config --libs` -lsysfs -o wlan-button wlan-button.o xmlparseconfig.o wlan-button.o: In function `get_sysfs_attr_value': wlan-button.c:(.text+0x546): undefined reference to `sysfs_find_driver_bus' wlan-button.c:(.text+0x55e): undefined reference to `sysfs_get_mnt_path' wlan-button.c:(.text+0x5ed): undefined reference to `sysfs_open_driver_path' wlan-button.c:(.text+0x5ff): undefined reference to `sysfs_get_driver_devices' wlan-button.c:(.text+0x60d): undefined reference to `dlist_start' wlan-button.c:(.text+0x61d): undefined reference to `_dlist_mark_move' wlan-button.c:(.text+0x62d): undefined reference to `sysfs_get_device_attributes' wlan-button.c:(.text+0x63b): undefined reference to `dlist_start' wlan-button.c:(.text+0x64b): undefined reference to `_dlist_mark_move' wlan-button.c:(.text+0x67b): undefined reference to `_dlist_mark_move' wlan-button.c:(.text+0x68c): undefined reference to `sysfs_close_driver' collect2: ld returned 1 exit status make: *** [wlan-button] Error 1 [0106]firebird ~ #
I am still working on this bug. Could you please check that your system is consistent? Please do a 1. revdep-rebuild --pretend Check your compiler setup. 2. gcc-config -l Which compiler are you using? I asked some people to check my code, but they can not reproduce the bug either. So at the moment it seems there is some inconcitency on your system. At the moment I only can say: Check you gcc, binutils, libxml2, sysfsutils and run revdep-rebuild. Please let me know, if you get it running. Thanks in advance Christian
I have switched my hole system to gcc-4.0.1 with latest glibc snapshot and even with this, the package builds fine here. I also gave the source to my uncle (he uses latest SuSE) and even there the stuff compiled without warnings, errors. So if you get errors like these above, check your system. Your libs might be broken. Hello developers: Why is nobody interested in adding wlan-button to portage? Do I have to change something to fit some specs? Is it the name? Do you have a better idea than wlan-button? I would be happy to have a feedback here. Thanks Christian
I must admit that I fail to understand the need for this application? Your instructions say to modprobe acerhk with autowlan=1 - shouldn't this be enough to control the wireless LAN? The ebuild looks good, but please use 'emake || die "emake failed"' and 'make DESTDIR="${D}" install' instead. Should the ebuild depend on acerhk?
acerhk does not support all wlan adapters. In some cases, the only thing that is working with acerhk is activating support for the buttons email, www, favourite, etc. and the wlan-button. But this only causes a key event which is not handled by acerhk but by wlan-button ;-) I contacted the acerhk author and he confirms this (you may find my link on his page at the bottom). Also even if you would not need wlan-button, it might be useful, because it removes the wlan driver and therfor the net-up-down scripts are working automatically. No need for starting/stopping the wlan network by hand. Thanks Christian
Created attachment 69202 [details] wlan-button-2.23-r1.ebuild Changed ebuild. I added acerhk as a runtime dependency. Also fixed emake and make install stuff as suggested (Thanks for the hints)
(In reply to comment #21) > Same problem here with: > binutils-2.15.92.0.2-r10 > sysfsutils-1.2.0-r2 > > with: > sys-devel/binutils-2.16.1 > > [0106]firebird ~ # ebuild > /usr/local/portage/app-laptop/wlan-button/wlan-button-2.23.ebuild clean > [0106]firebird ~ # ebuild > /usr/local/portage/app-laptop/wlan-button/wlan-button-2.23.ebuild unpack > >>> md5 files ;-) wlan-button-2.23.ebuild > >>> md5 files ;-) files/digest-wlan-button-2.23 > >>> md5 src_uri ;-) wlan-button-2.23.tar.bz2 > >>> Unpacking source... > >>> Unpacking wlan-button-2.23.tar.bz2 to /var/tmp/portage/wlan-button-2.23/work > >>> Source unpacked. > [0106]firebird ~ # ebuild > /usr/local/portage/app-laptop/wlan-button/wlan-button-2.23.ebuild compile > >>> md5 files ;-) wlan-button-2.23.ebuild > >>> md5 files ;-) files/digest-wlan-button-2.23 > >>> md5 src_uri ;-) wlan-button-2.23.tar.bz2 > >>> Checking wlan-button-2.23.tar.bz2's mtime... > >>> WORKDIR is up-to-date, keeping... > gcc -Wall -pedantic -std=gnu99 -pthread `xml2-config --cflags` -D_KERNEL26 -O2 > -march=pentium4 -pipe -fomit-frame-pointer -c wlan-button.c > gcc -Wall -pedantic -std=gnu99 -pthread `xml2-config --cflags` -D_KERNEL26 -O2 > -march=pentium4 -pipe -fomit-frame-pointer -c xmlparseconfig.c > gcc -pthread `xml2-config --libs` -lsysfs -o wlan-button wlan-button.o > xmlparseconfig.o > wlan-button.o: In function `get_sysfs_attr_value': > wlan-button.c:(.text+0x546): undefined reference to `sysfs_find_driver_bus' > wlan-button.c:(.text+0x55e): undefined reference to `sysfs_get_mnt_path' > wlan-button.c:(.text+0x5ed): undefined reference to `sysfs_open_driver_path' > wlan-button.c:(.text+0x5ff): undefined reference to `sysfs_get_driver_devices' > wlan-button.c:(.text+0x60d): undefined reference to `dlist_start' > wlan-button.c:(.text+0x61d): undefined reference to `_dlist_mark_move' > wlan-button.c:(.text+0x62d): undefined reference to `sysfs_get_device_attributes' > wlan-button.c:(.text+0x63b): undefined reference to `dlist_start' > wlan-button.c:(.text+0x64b): undefined reference to `_dlist_mark_move' > wlan-button.c:(.text+0x67b): undefined reference to `_dlist_mark_move' > wlan-button.c:(.text+0x68c): undefined reference to `sysfs_close_driver' > collect2: ld returned 1 exit status > make: *** [wlan-button] Error 1 > [0106]firebird ~ # I had the same problem. Upgrading sysfsutils from version 1.2.0-r2 to version 1.3.0 solved the problem.
(In reply to comment #24) > I must admit that I fail to understand the need for this application? Your > instructions say to modprobe acerhk with autowlan=1 - shouldn't this be enough > to control the wireless LAN? > > The ebuild looks good, but please use 'emake || die "emake failed"' and 'make > DESTDIR="${D}" install' instead. Should the ebuild depend on acerhk? As Christian Roessner said, it removes and loads the modules automatically so Actually this seems like a rather usefull app to me. I'm using netplug, but when i boot my laptop with wireless disabled and then enable it afterwards, netplug doesn't detect a change so it doesn't try to assosiate. This is no problem for me as i'm a sudoer so i can restart the net script, but my girlfriends account is not so she cant connect to the wireless without me fixing it up for her. So automatically loading and unloading the modules would yield a net script start/restart.
Created attachment 86187 [details] wlan-button-2.24.ebuild New version fixes sysfsutils-2.0.0 problems
Why does no one include wlan-button into portage? As far as I know, there are people using it successfully (Me included). Regards Christian
I do not use Gentoo anymore, so I do not provide any newer ebuilds. I know that there still are users, running wlan-button on there notebook. So if you want to provide a package for Gentoo, please maintain this piece of software Regards Christian Actual version is 3.22
Project released at sourceforge.net See http://wlan-button.sourceforge.net
(this is an automated message based on filtering criteria that matched this bug) 'EBUILD' is in the KEYWORDS which should mean that there is a ebuild attached to this bug. This bug is assigned to maintainer-wanted which means that it is not in the main tree. Hello, The Gentoo Team would like to firstly thank you for your ebuild submission. We also apologize for not being able to accommodate you in a timely manner. There are simply too many new packages. Allow me to use this opportunity to introduce you to Gentoo Sunrise. The sunrise overlay[1] is a overlay for Gentoo which we allow trusted users to commit to and all users can have ebuilds reviewed by Gentoo devs for entry into the overlay. So, the sunrise team is suggesting that you look into this and submit your ebuild to the overlay where even *you* can commit to. =) Because this is a mass message, we are also asking you to be patient with us. We anticipate a large number of requests in a short time. Thanks, On behalf of the Gentoo Sunrise Team, Jeremy. [1]: http://www.gentoo.org/proj/en/sunrise/ [2]: http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq
Hi, it is 12 years ago that I had written this stuff. At this time there did exist laptops that required such a tool. I am pretty unsure if there is still a use case for this. So in my opinion it could also be removed from Gentoo, if it is in the portage tree (did not check this while writing) Christian