[blfs-dev] libnotify-0.7.6 in Seamonkey, Thunderbird and Firefox

Fernando de Oliveira famobr at yahoo.com.br
Wed Sep 30 10:22:59 PDT 2015


This is bothering me for years, perhaps. Have asked long ago, no reply.

It is always there in the pages and scripts. It does nothing, for me, at
runtime. Or does it?

I'm almost 100% sure that SM, TB and FF do not use libnotify, because
there were times in which I I had a notification with the same
configurations (color, position) as the ones for notify send:

notify-send Test "Hello World"

I've found some references out of "testing" directory to libnotify.so.4
and libnotify.so.1 in comments, but outside that, only the following
files (out of "testing" directory) refer to it:

{{{
[ /tmp/seamonkey-2.38/comm-release ]$ grep --exclude-dir testing -rl
libnotif
mozilla/python/mozboot/mozboot/debian.py
mozilla/webapprt/gtk/webapprt.cpp
mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
mozilla/toolkit/system/gnome/nsAlertsIconListener.h
mailnews/base/src/nsMessengerUnixIntegration.cpp
mail/components/activity/modules/alertHook.js

fernando [ /tmp/thunderbird-38.3.0/comm-esr38 ]$ grep --exclude-dir
testing -rl libnotif
mozilla/python/mozboot/mozboot/debian.py
mozilla/webapprt/gtk/webapprt.cpp
mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
mozilla/toolkit/system/gnome/nsAlertsIconListener.h
mailnews/base/src/nsMessengerUnixIntegration.cpp
mail/components/activity/modules/alertHook.js

fernando [ /tmp/firefox-41.0/mozilla-release ]$ grep --exclude-dir
testing -rl libnotif
python/mozboot/mozboot/debian.py
webapprt/gtk/webapprt.cpp
toolkit/system/gnome/nsAlertsIconListener.cpp
toolkit/system/gnome/nsAlertsIconListener.h
}}}

I have difficulty believing that those applications in gnome would
benefit from libnotify. Suspect those are left-overs needed to be
cleaned up.

In FF, webapprt/gtk/webapprt.cp, for example:

{{{
  char uninstallMsg[MAXPATHLEN];
  if (NS_SUCCEEDED(parser.GetString("Webapp", "UninstallMsg",
uninstallMsg, MAXPATHLEN))) {
    /**
     * The only difference between libnotify.so.4 and libnotify.so.1 for
these symbols
     * is that notify_notification_new takes three arguments in
libnotify.so.4 and
     * four in libnotify.so.1.
     * Passing the fourth argument as nullptr is binary compatible.
     */
    typedef void  (*notify_init_t)(const char*);
    typedef void* (*notify_notification_new_t)(const char*, const char*,
const char*, const char*);
    typedef void  (*notify_notification_show_t)(void*, void**);

    void *handle = dlopen("libnotify.so.4", RTLD_LAZY);
    if (!handle) {
      handle = dlopen("libnotify.so.1", RTLD_LAZY);
      if (!handle)
        return;
    }
}}}

I don't know enough to completely understand this code, worse yet the
entire file, but it seems to me this is a left over code.

Then, I searched in the configure* files:

{{{
# ls firefox-41.0/ seamonkey-2.38/ thunderbird-38.3.0/
firefox-41.0/:
mozilla-release

seamonkey-2.38/:
comm-release

thunderbird-38.3.0/:
comm-esr38
}}}

Just  to show that SM, TB and FF source code are in the directory where
I searched before and will search below.

{{{
root [ /tmp ]# find -type f -name configure\* -exec grep notify-send \{} \;
root [ /tmp ]# find -type f -name configure\* -exec grep libnotify \{} \;
}}}

No reference to libnotify. I also searcched in the millions of
mozconfigs inside the directories: nada (this is in my native language).

{{{
root [ /tmp ]# find -type f -name configure\* -exec grep
libstartup-notification \{} \; | wc -l
21
}}}

This is to show what happens when something is tested by configure.


These results seem to demonstrate that from the three mozconfigs
libnotify can be removed.

I am not 100% sure if it can be remove from the dependencies.

Please, some opinions? Should it be completely removed?


-- 
[]s,
Fernando, aka Sísifo


More information about the blfs-dev mailing list