btnx and gentoo

Bug #200055 reported by n00ris
2
Affects Status Importance Assigned to Milestone
btnx
Fix Released
Medium
Olli Salonen

Bug Description

Hi,
maybe you are glad to hear that I invested some time in btnx and btnx-config in order that it runs with gentoo. I don't know if this bug is interesting for the ubuntu community.
Further informations here:
http://bugs.gentoo.org/show_bug.cgi?id=188265
http://forums.gentoo.org/viewtopic-p-4877237.html#4877237

For the gentoo portage system I had to modify your install-script because it seems to me that the btnx installation does not use a typical (e.g. automake) makefile and thats why it does not respect the DESTDIR variable and the installation with the gentoo portage system fails. I had to convert your installation script for the gentoo ebuild so that the installtaion works.
I had to modify your init-script too (gentoo uses the start-stop-deamon, "start_deamon" is not sufficient as command) (I don't posted this modification yet)

Do you plan to support more linux distributions than ubuntu (from your side) in the future, e.g. gentoo? With other words do you plan to customize your installation routine and init-script?

Greetings
Norris, alias Jan

Revision history for this message
Olli Salonen (daou) wrote :

I'm always interested in knowing how btnx works on other distros.
I started converting btnx to use GNU autotools two days ago because many people have been requesting it. I should have this ready in a few days.
Ubuntu also uses start-stop-daemon, but I removed it because most other distros don't have it and start_daemon should be an LSB compliant command.

However, btnx does not need start_daemon on start-stop-daemon. It can be started with "btnx -b" and optionally a configuration name.
It can be stopped with "btnx -k". I will probably clean up the init script to use these for better cross-distro compatibility.

Right now, btnx should work with update-rc.d and chkconfig utilities for init script registration. The configure.ac script will look for these and attempt to use them.
I will add more checks if people let me know what works on other distros.

Revision history for this message
Olli Salonen (daou) wrote :

The SVN repo has btnx revision 128 which uses GNU autotools. If you test it, let me know how it works.
Address of trunk: http://svn.ollisalonen.com/btnx/trunk

Revision history for this message
Olli Salonen (daou) wrote :

revision 128 tries to use rc-update to install the init script. Correct me if I'm wrong, but this is what Gentoo uses. I am not able to test it myself.

Revision history for this message
Olli Salonen (daou) wrote :

Also note that you have to use the btnx-config (v.0.4.7-rc) from SVN trunk with this btnx.
revision 128 is a release candidate for 0.4.7, which breaks backward compatibility for btnx-config.
Address of btnx-config trunk: http://svn.ollisalonen.com/btnx-config/trunk

Revision history for this message
n00ris (jb-faq) wrote :

thanks,
I hope I have the time to test it in a few days. Maybe next weekend. (And you are right, gentoo uses rc-update...)

Revision history for this message
n00ris (jb-faq) wrote :

Hi,
I invested some time again and tried to write an ebuild which check out the newest svn.
But I doesn't get this managed because gentoo pre-install the programs in a environment. Thats the reason why rc-update fails and the installation aborts. It want to install in the real system.
I don't find any other program which calls rc-update and hence I cannot look up other ebuilds how they manage this.
In this moment I only know the following solution(s):
Remove the installation of the init script again or give me a patch which does this.

BTW: For me, it is not the job for the installation routine (e.g. make install) to register the init-script, because it is the job of the system admin to decide this, e.g. I don't want to start btnx every time on startup. I want decide myself if I install a script or not. For example I only want to test the init-script a few times to avoid bugs, otherwise my system crashes on boot with a wrong init-script (in a bad case, maybe the worst case get worse).
I'm sorry, but for me its not really a feature that btnx want to register the init-script.

Revision history for this message
Olli Salonen (daou) wrote :

You can run
./configure init_tool=no
to disable the init script installation.

Revision history for this message
n00ris (jb-faq) wrote :

problem: this prevent that the init script is copied to the init.d directory too, thats not fine.
The init script is not fixed yet, right? The problem is, that gentoo does not respect the LSB standard and hence /lib/lsb/init-functions does not exists

Besides my ebuilds which check out the svn of btnx and btnx-config works, but I won't load it up yet, I want to beautify it first...

Revision history for this message
n00ris (jb-faq) wrote :

Its done.

http://bugs.gentoo.org/show_bug.cgi?id=188265

Following the link you can find the ebuild for the current versions of btnx and btnx-config, a svn edition for each of them, and some patches. (I write a patch for the init-script, since it uses the start_deamon). Maybe you want to have a look at it and if you faith in my work you can make a hint or upload on your webside (just a suggestion).
The gentoo community knows how to use an external ebuild, otherwise they can get help here (and you give a hint on your webside, too):
http://de.gentoo-wiki.com/Portage_Overlay_konfigurieren (GERMAN)
or here
http://gentoo-wiki.com/Portage_Overlay (ENGLISH)

Greetings
Jan Bücken as Norris

Revision history for this message
Olli Salonen (daou) wrote :

The init script did not use start_daemon any more. I replaced them with straight calls to the btnx executable.

However, the latest in SVN fixes some issues. Most notable is the libdaemon requirement. It uses libdaemon to fix a lot of the PID file, signals, and logging functions. It removes the lsb-init-functions requirement from the init script. It also does as you suggested: init_tool=no still installs the init script, but it doesn't use any tools to register it. Also, output_syslog=yes configures the init script to call "btnx -l", which redirects all btnx output to syslog. This is useful if you want a relatively quiet btnx startup.

Changed in btnx:
assignee: nobody → daou
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Olli Salonen (daou) wrote :

btnx 0.4.8 has been released (no significant changes in trunk for the past 2 weeks).

Changed in btnx:
status: Fix Committed → Fix Released
Revision history for this message
n00ris (jb-faq) wrote :

new ebuilds are available in the gentoo bugzilla

Revision history for this message
n00ris (jb-faq) wrote :

you can find the ebuild for btnx-0.4.9 in the gentoo bugzilla

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.