On Thu, Jun 15, 2006 at 12:49:21AM +1000, Vincent McIntyre wrote:
> Package: mozilla-firefox
> Version: 1.0.4-2sarge7
> Severity: minor
> 
> *** Please type your report below this line ***
> 
> Here's a little story for BTS readers. I hope it is helpful.
> 
> I kept getting these irritating messages from firefox on startup,
> as a normal user -
> 
>   Extension System Warning: Failed to set up default extensions files
>   probably because you do not have write privileges to this location.
>   While you can run Firefox like this, it is recommended that you run it
>   at least once with privileges that allow it to generate these initial
>   files to improve start performance. Running from a disk image on MacOS
>   X is not recommended.
> 
> So I tried to run the program as root, to fix the problem
>   $ su -
>   password:
>   # export DISPLAY=:0
>   # env
>   HZ=100
>   SHELL=/bin/bash
>   TERM=xterm
>   USER=root
>   MAIL=/var/mail/root
>   
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
>   PWD=/root
>   PS1=\h:\w\$
>   SHLVL=1
>   HOME=/root
>   LOGNAME=root
>   DISPLAY=:0
>   _=/usr/bin/env
>   # id
>   uid=0(root) gid=0(root) groups=0(root),1003(lpadmin)
>   # /bin/rm -rf .mozilla
>   # firefox
> 
> Now I get three copies of the warnings, not just one. Hm.
As root and the user both?

> Things I tried:
> 
>   # /bin/rm -rf .mozilla
/root/.mozilla or /home/~vmi/.mozilla?

>   This is definitely tied to getting 3 warnings instead of 1.
>   If I rerun firefox twice I go back to 1 warning; ie
>   # /bin/rm -rf .mozilla; firefox; firefox
Interesting..

>   # dpkg -L mozilla-firefox | grep -i extens |xargs ls -l
>   I could find no files or directories that were not owned by root
>   or were not writeable by root.
Actually, permissions checks should be bypassed for the root user
anyway.  access() is a special case, and uses the ruid not the euid.
This doesn't seem to be relevant here.

>   The only funny I noticed was that:
>    /etc/mozilla-firefox/profile/extensions/Extensions.rdf
How did you notice that?

>   # touch /etc/mozilla-firefox/profile/extensions/Extensions.rdf
>   # chmod 0644 /etc/mozilla-firefox/profile/extensions/Extensions.rdf
>   # chown root:root /etc/mozilla-firefox/profile/extensions/Extensions.rdf
> 
> This fixed the problem for the root user, and for the normal user.
> 
> So the actual problem is that somehow this extensions file got deleted.
> It would have been helpful for Firefox to report that, instead of the
> gibberish it gave me. Hopefully later releases from upstream have attended
> to this.
Indeed; it probably does

  FILE *fp;
  if (NULL==(fp=fopen(fn, s)))
        error_msg()

But since the error indicates that the file is missing, it is wrong;
either the message should be generalized, or the check should confirm
that errno==ENOENT before displaying that message, and use a different
message otherwise.

> That leaves why the file was missing in the first place.
> Perhaps that is something that the package postinst or postrm scripts
> could do, on a bad day? Or an incomplete purge after an
>  apt-get remove mozilla-firefox?
This might be the case, see below.

> It may be worth checking the package pre- & post- scripts to see if
> this is something that could possibly happen.
FYI these are stored in /var/lib/dpkg/info/mozilla-firefox.p*

> Perhaps also it is something to do with the plugin set I have;
>  libmozsvgdec.so, libjavaplugin_oji.so, libflashplayer.so
Would you try disabling those extensions by running mozilla-firefox
-safe-mode and see if that changes anything?

/var/lib/mozilla-firefox/extensions/Extensions.rdf is a link to
/usr/lib/mozilla-firefox/extensions/Extensions.rdf.

/var/lib/mozilla-firefox/extensions/Extensions.rdf and
/usr/lib/mozilla-firefox/defaults/profile/extensions/Extensions.rdf
are removed on prerm remove.

The postinst and postrm all call
update-mozilla-firefox-chrome, which does:

cat <<EOF > ${LIBDIR}/extensions/Extensions.rdf
[...]
mv ${LIBDIR}/extensions/Extensions.rdf ${VARDIR}/extensions/
ln -fs ${VARDIR}/extensions/Extensions.rdf ${LIBDIR}/extensions/

So reconfiguring *should* have fixed it.  If prerm remove fails, this
could have been deleted, but, if postinst returned successfully, they
should have been recreated.  Can you check what package state
mozilla-firefox is in?  dpkg -l mozilla-firefox

I see the following changelog entry:
|  * debian/update-mozilla-firefox-chrome: Re-initialize Extensions.rdf
|    inside the script instead of relying on mozilla-firefox's default
|    behaviour, which just fails when defaults/profile/extensions/ \
|    Extensions.rdf doesn't exist (and it seems some people like to remove
|    files in /etc). (Closes: #294175)

Justin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to