NetBSD Problem Report #55203

From tsutsui@ceres.dti.ne.jp  Fri Apr 24 02:54:23 2020
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3199F1A9218
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 24 Apr 2020 02:54:23 +0000 (UTC)
Message-Id: <202004240254.03O2sDW6001021@ceres.dti.ne.jp>
Date: Fri, 24 Apr 2020 11:54:13 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: pkgsrc firefox-75.0 patch has suspicious chunk
X-Send-Pr-Version: 3.95

>Number:         55203
>Category:       pkg
>Synopsis:       pkgsrc firefox-75.0 patch has suspicious chunk
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ryoon
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 24 02:55:00 +0000 2020
>Closed-Date:    
>Last-Modified:  Thu Jun 17 01:04:09 +0000 2021
>Originator:     Izumi Tsutsui
>Release:        NetBSD 9.0
>Organization:
>Environment:
System: NetBSD mirage 9.0 NetBSD 9.0 (GENERIC) #22: Sat Apr 4 05:28:10 JST 2020 tsutsui@mirage:/s/netbsd-9/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
pkgsrc/www/firefox/patches/patch-browser_app_profile_firefox.js has
the following chunk to add pkgsrc specific settings:
---
+// Select UI locale from LANG/LC_MESSAGE environmental variables
+pref("intl.locale.requested", "");
+
+// Enable system addons, for example langpacks from www/firefox-l10n
+pref("extensions.autoDisableScopes", 11);
+
+// Disable multiprocess window support. Workaround for PR 53273.
+pref("browser.tabs.remote.autostart", false);
+

---

but installed pkg/lib/firefox/browser/defaults/preferences/firefox.js
seems to have the same settings in different lines:
---
% grep -n autoDisableScopes /usr/pkg/lib/firefox/browser/defaults/preferences/firefox.js
55:pref("extensions.autoDisableScopes", 15);
1614:pref("extensions.autoDisableScopes", 11);
% grep -n autostart /usr/pkg/lib/firefox/browser/defaults/preferences/firefox.js
1414:pref("browser.tabs.remote.autostart", true);
1617:pref("browser.tabs.remote.autostart", false);
% 
---
Note fuzz number seems a bit large (~1610 vs 1865),
so it should be regenerated anyway?

>How-To-Repeat:
Patch inspection.

>Fix:
Explicitly override original settings?

---
Izumi Tsutsui

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Sat, 25 Apr 2020 15:10:04 +0000
Responsible-Changed-Why:
Ryo, can you please give it a look? (over to MAINTAINER)


From: Ryo ONODERA <ryo@tetera.org>
To: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Cc: 
Subject: Re: pkg/55203 (pkgsrc firefox-75.0 patch has suspicious chunk)
Date: Tue, 05 May 2020 15:23:18 +0900

 Recent changes by maya@ adds the reported chunk conditionally.
 However the resulting firefox.js does not fix this problem.

 -- 
 Ryo ONODERA // ryo@tetera.org
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: ryo@tetera.org
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/55203 (pkgsrc firefox-75.0 patch has suspicious chunk)
Date: Tue, 5 May 2020 17:24:35 +0900

 > Recent changes by maya@ adds the reported chunk conditionally.
 > However the resulting firefox.js does not fix this problem.

 I think it's better for readability to prepare pkgsrc specific
 preference files to override defaults, rather than patching
 the original firefox.js.
 (I'm afraid it's annoying for future readers to find patch lines
  in Makefile)

 ---
 Izumi Tsutsui

From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55203 (pkgsrc firefox-75.0 patch has suspicious chunk)
Date: Tue, 5 May 2020 11:22:21 +0000

 I was also not super-happy with the patch I made :-)
 The original self-justification was "it's just NetBSD 8, and with some
 extra testing I can get rid of most of the patch and leave just the
 prefs.js change", but the ksem locking issue means it's best to wait for
 NetBSD 9.1 to be released for it to reach release users.

 I am not sure if javascript has enough information about kernel versions
 to make a runtime check (probably not for privacy reasons).

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 13 Oct 2020 02:43:38 +0000
State-Changed-Why:
Stale problem, fortunately found a much better workaround for our multiprocess firefox problem which doens't involve version-specific-editing! let me know if there are still problems and I misunderstood it.


From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: maya@NetBSD.org
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: pkg/55203 (pkgsrc firefox-75.0 patch has suspicious chunk)
Date: Mon, 26 Oct 2020 01:31:19 +0900

 > Synopsis: pkgsrc firefox-75.0 patch has suspicious chunk
  :
 > State-Changed-Why:
 > Stale problem, fortunately found a much better workaround for our multiprocess firefox problem which doens't involve version-specific-editing! let me know if there are still problems and I misunderstood it.

 Ths PR was not intended to point out about
 "multiprocess problem" (i.e. browser.tabs.remote.autostart)
 but "seems to have the same settings in different lines."

 pkgsrc/www/firefox 82.0 still has fowlloing lines:
 ---
 % grep -n autoDisableScopes /usr/pkg/lib/firefox/browser/defaults/preferences/firefox.js
 23:pref("extensions.autoDisableScopes", 15);
 826:pref("extensions.autoDisableScopes", 11);
 ---

 so I'd rather suggest again:
 > I think it's better for readability to prepare pkgsrc specific
 > preference files to override defaults, rather than patching
 > the original firefox.js.

 as debian/ubuntu do:
  https://bazaar.launchpad.net/~mozillateam/firefox/firefox.bionic/view/head:/debian/vendor-firefox.js
  https://bazaar.launchpad.net/~mozillateam/firefox/firefox.bionic/view/head:/debian/vendor-gre.js

 ---
 Izumi Tsutsui

State-Changed-From-To: closed->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 17 Jun 2021 01:04:09 +0000
State-Changed-Why:
feedback came in


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.