Closed ghost closed 5 years ago
That text seems to be incorrect. That is, on debian stable (stretch) the file /usr/share/bitlbee/mastodon-help.txt is created even without changing the prefix. So I'm expecting it to work. After sudo make install I did systemctl restart bitlbee, then launched into irssi and ran help mastodon. It displayed the general top-level bitlbee help page (same as if I type help anynonsensehere).
Hm. What change would you propose? On my system, that’s what I see. If I don’t set the prefix, make install will say that it can’t find bitlbee’s help.text file in /usr/local/share/bitlbee and refuse to install mastodon-help.txt.
@libBletchley I see the same problem here. Are you using bitlbee-libpurple?
@stettberger
I see the same problem here. Are you using bitlbee-libpurple?
No, that's not installed. Should it be?
@kensanata
Hm. What change would you propose?
I don't know what the fix is, because I don't understand why I even have a problem. Everything appears to be in the right place AFAIK. So it's not clear why it's not working.
On my system, that’s what I see. If I don’t set the prefix, make install will say that it can’t find bitlbee’s help.text file in /usr/local/share/bitlbee and refuse to install mastodon-help.txt.
That didn't happen in my case. I got no error that I can recall, and no attempt to write to /usr/local/share/bitlbee
(which does not exist on my system). The installer seems to have actually found the proper path (/usr/share/bitlbee
). So I don't know why the plugin is not getting loaded.
Some questions:
help.txt
in the same directory and with the same permissions as mastodon-help.txt
?config.h
for bitlbee itself and compare that with where the plugin ended up in?@kensanata
is bitlbee's help.txt in the same directory and with the same permissions as mastodon-help.txt?
# find /usr/share/bitlbee/ /usr/share/bitlbee/ /usr/share/bitlbee/mastodon-help.txt /usr/share/bitlbee/help.txt
Does the log say "Error opening helpfile: ..." anywhere?
# ls /var/log/*bitlbee*
ls: cannot access '/var/log/*bitlbee*': No such file or directory
It's unclear from /etc/bitlbee/bitlbee.conf
how to turn on logging.
Can you discover the value of PLUGINDIR in config.h for bitlbee itself and compare that with where the plugin ended up in?
# aptitude source bitlbee
...
# cd bitlbee-3.5.1
# grep -i PLUGINDIR conf*
conf.c: conf->plugindir = g_strdup(PLUGINDIR);
conf.c: g_free(conf->plugindir);
conf.c: } else if (g_strcasecmp(ini->key, "plugindir") == 0) {
conf.c: g_free(conf->plugindir);
conf.c: conf->plugindir = g_strdup(ini->value);
conf.h: char *plugindir;
configure:plugindir='$prefix/lib/bitlbee/'
configure:--plugindir=... $plugindir
configure:plugindir=$(eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g')
configure:PLUGINDIR=$plugindir
configure:#define PLUGINDIR "$plugindir"
configure: plugindir=""
configure:plugindir=$plugindir
# find /usr/lib/bitlbee/
/usr/lib/bitlbee/
/usr/lib/bitlbee/mastodon.la
/usr/lib/bitlbee/mastodon.so
Looks like the plugins are where they are expected to be, although I suppose the debian project could have messed with $prefix
.
I guess you could stop the Bitlbee service and start it manually without daemonizing it. Then you should definitely see all the output.
@kensanata
I guess you could stop the Bitlbee service and start it manually without daemonizing it. Then you should definitely see all the output.
It's rather brain-dead the way they designed the bitlbee CLI. Turning on verbosity (-v
) requires the option to inhibit forking (-n
), and then the -n
option requires daemon mode. So by extension, verbosity requires daemon mode.
So I tried: sudo -u bitlbee bitlbee
as well as sudo -u bitlbee bitlbee -Dnv
. Neither of them produced any interesting output.
I guess the next step would be gdb and stepping through the function looking for plugins in plugindir? :(
This problem remains unresolved?
I don't have gdb installed, but if I run sudo -u bitlbee strace -e trace=file bitlbee -Dnv
, among the output is:
stat("/usr/lib/bitlbee/mastodon.so", {st_mode=S_IFREG|0755, st_size=252776, ...}) = 0
open("/usr/lib/bitlbee/mastodon.so", O_RDONLY|O_CLOEXEC) = 7
open("/usr/share/bitlbee/help.txt", O_RDONLY) = 6
So we know the plugin is being found and read, as well as the help.txt
file, but not the mastodon-help.txt
file that's in the same directory as help.txt
.
It remains a mystery. :(
My laptop runs PureOS which is a Debian derivative and installing help worked just fine. Then again, sudo system restart bitlbee
or sudo systemctl restart bitlbee.service
both seem to be unable to restart Bitlbee. ps aux | grep bitlbee
keeps showing a bitlbee -I
which I have to kill myself before a new bitlbee -F -n
shows up and the new help is available. Weird.
If I execute this in irssi: /msg -Bitlbee &bitlbee plugins
, I get:
"bitlbee-mastodon 0.1.0"
So it's getting loaded enough to be listed as a plugin. Yet these commands still simply show bitlbee generic help: /msg -Bitlbee &bitlbee help mastodon
, /msg -Bitlbee &bitlbee help mregister
Looks like the binary file for the library was found but the text file with the additional help entries was not...
If I run /msg -Bitlbee &bitlbee mregister
the output is:
Unknown command: mregister. Please use help commands to get a list of available commands.
So the binary is only loaded enough to be listed as a plugin, but not enough to function.
Actually "mregister" is just the name of the page explaining how to register. The bitlbee wiki page has a copy of the relevant content. Management summary:
account add mastodon kensanata
account mastodon set base_url https://octodon.social/api/v1
account mastodon on
As for the location of the help file, this is what I see:
$ ls /usr/share/bitlbee/
discord-help.txt help.txt mastodon-help.txt
Thus, help.txt
by bitlbee and mastodon-help.txt
but bitlbee-mastodon are in the same directory. How does that look on your system?
I have help.txt
and mastodon-help.txt
in that directory, both root owned w/perms 644.
When you say "by bitlbee", are you saying the owner of that file is bitlbee?
No, I just wanted to say that installing bitlbee will install help.txt and installing the bitlbee-mastodon plugin will install mastodon-help.txt. I still don't know why bitlbee's help pages are available and bitlbee-mastodon's help pages are not.
When I look at mastodon_help_init
it would seem to me that it can either return with a log message saying "Error finding the directory of helpfile ..." or it will run help_init
which run open
which you should have seen in your trace. The entire thing remains a mystery.
it works! And maybe it worked all along.. the broken help and the unknown cmd reply to mregister
lead me to think the plugin was not loaded.
The help is still missing, but it seems I can rely on the wiki.
I'm on Gentoo. The help text is not working here, either.
The plugin does work.
EDIT: Actually, help does work...after the plugin is loaded, apparently. Before turning the account on, though, all I got back is the general help.
Hm, interesting. I guess it makes sense, though: the plugin can only modify the help function once it's loaded, right? Looks like all I need to do is document that fact?
Hm, interesting. I guess it makes sense, though: the plugin can only modify the help function once it's loaded, right?
Right. It is not enough for it be installed. It also has to be invoked (account on
).
Looks like all I need to do is document that fact?
Yes.
86e23d4 adds the necessary info. See README. I hope that allows us to close this issue?
Looks good to me. I think we'd be able to close it.
The readme.md now contains:
That text seems to be incorrect. That is, on debian stable (stretch) the file
/usr/share/bitlbee/mastodon-help.txt
is created even without changing the prefix. So I'm expecting it to work. Aftersudo make install
I didsystemctl restart bitlbee
, then launched into irssi and ranhelp mastodon
. It displayed the general top-level bitlbee help page (same as if I typehelp anynonsensehere
). If I typehelp mregister
, that too just gives the top-level help page with nothing that is particular to mastodon.If I simply type
mregister
I get "Unknown command: mregister. Please use help commands to get a list of available commands."It's as if no plugin was installed. Yet there exists
/usr/lib/bitlbee/mastodon.(so|la)