root@vladiom:/usr/ports # make index Generating INDEX-11 - please wait..--- describe.accessibility --- […] --- describe.x11 --- --- describe.www --- make[5]: "/usr/ports/Mk/Uses/gecko.mk" line 48: warning: "/usr/local/bin/firefox --version 2>/dev/null" returned non-zero status make[5]: "/usr/ports/Mk/Uses/gecko.mk" line 48: warning: "/usr/local/bin/firefox --version 2>/dev/null" returned non-zero status --- describe.x11-clocks --- --- describe.x11-drivers --- […] --- describe.x11-toolkits --- --- describe.x11-wm --- Done. # uname -srm FreeBSD 11.1-RELEASE-p10 amd64 # pkg version -v | grep firefox firefox-60.0.2,1 = up-to-date with index
There is a new behaviour of www/firefox, introduced since version 60.x, see [1][2]. Running Firefox as root is not supported any more. So, gecko.mk fails, when it tries to run 'firefox --version'. If you use the same command as a regular (non root) user, it does not fail. I think we have to find another way to do the version check in /usr/ports/Mk/Uses/gecko.mk:48 as root. For me, the following patch helps as a workaround: --- gecko.mk.orig 2018-05-01 08:57:58.482882000 +0200 +++ gecko.mk 2018-05-23 20:20:53.518158000 +0200 @@ -45,7 +45,7 @@ 60_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:www/firefox .if exists(${LOCALBASE}/bin/firefox) -_GECKO_INSTALLED_VER!= ${LOCALBASE}/bin/firefox --version 2>/dev/null +_GECKO_INSTALLED_VER!= su -m www -c '${LOCALBASE}/bin/firefox --version' 2>/dev/null _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9][0-9]*:C/([0-9][0-9]).*/\1/g} .endif Of course, that's not optimal and I am not sure, if it brings in new security issues(?). [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1323302 [2] https://hg.mozilla.org/integration/autoland/rev/90a06cdcb48f
(In reply to Rainer Hurling from comment #1) I understood. Thanks for clarifying.
I think it is better to change the line to something like (I don't look in the moment for correct syntax): _GECKO_INSTALLED_VER!= /usr/local/sbin/pkg query %v firefox|sed -E 's/([0-9][0-9]).*/\1/g' This command has not the problem with root.
(In reply to w.schwarzenfeld from comment #3) But this would be only for 'pkg' users and not for others, who build from sources, wouldN't it?
Pkg query gives information of all installed packages, don't matter if it was compiled or installed with pkg.
Look in the code of portmaster. It works with pkg commands.
(In reply to w.schwarzenfeld from comment #6) Of course, you are right. Very nice solution :)
A commit references this bug: Author: jbeich Date: Sun Jun 17 16:50:31 UTC 2018 New revision: 472612 URL: https://svnweb.freebsd.org/changeset/ports/472612 Log: gecko: check app compatibility for -i18n via package registry make[5]: "/usr/ports/Mk/Uses/gecko.mk" line 48: warning: "/usr/local/bin/firefox --version 2>/dev/null" returned non-zero status $ sudo firefox --version Running Nightly as root in a regular user's session is not supported. ($XAUTHORITY is /home/foo/.Xauthority which is owned by foo.) https://bugzilla.mozilla.org/show_bug.cgi?id=1323302 PR: 229064 Reported by: Vladimir Omelchuk Analyzed by: Rainer Hurling Submitted by: Walter Schwarzenfeld (based on) Changes: head/Mk/Uses/gecko.mk
(In reply to Rainer Hurling from comment #1) > Running Firefox as root is not supported any more. Works fine here. Try proper root login. $ sudo su -l root -c '/usr/local/bin/firefox --version' Mozilla Firefox 61.0
(In reply to Jan Beich from comment #9) Yes, you are right. Firefox complains, when running it as root in user's session: #firefox --version Running Firefox as root in a regular user's session is not supported. ($HOME is /home/xxx which is owned by xxx.) Running as 'real' root works. Thanks for the clarification.