Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

palemoon: 27.9.4 -> 28.2.1 #51161

Closed
wants to merge 5 commits into from
Closed

palemoon: 27.9.4 -> 28.2.1 #51161

wants to merge 5 commits into from

Conversation

develCuy
Copy link

@develCuy develCuy commented Nov 28, 2018

Motivation for this change

Update palemoon to latest releases, which includes security updates. I reported this as an issue as well (#51160).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I changed the compile settings according to: http://developer.palemoon.org/Developer_Guide:Build_Instructions/Pale_Moon/Linux. I don't know what to do with this:
mk_add_options MOZ_OBJDIR=/home/$USER/pmbuild/, so I removed it, also, I guess that the following options should be reviewed carefully:

ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1

Also, I don't know what is the right way to add gconf-2.0 as dependency, in my local I add this: pkgs.gnome.Gconf but inside buildInputs, otherwise nix-build can't find it.

Finally, compilation never finished because it was too much for my old laptop.

closes #51160

@kalbasit
Copy link
Member

@develCuy thank you for your contribution!

  • I added closes #51160 to your description so Github closes that issue automatically when the PR is merged.
  • Please review CONTRIBUTING.md carefully, the title of your PR should not start with a capital letter.
  • I'll ask the CI to build the package to make sure all good, although we have to figure out if the flags you've mentioned should to be removed.

@GrahamcOfBorg build palemoon

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: palemoon

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: palemoon

Partial log (click to expand)

 0:52.55 DEBUG: configure:13169: checking MOZ_GIO_CFLAGS
 0:52.55 DEBUG: configure:13174: checking MOZ_GIO_LIBS
 0:52.56 DEBUG: configure:13249: checking for gconf-2.0 >= 1.2.1 gobject-2.0
 0:52.56 DEBUG: configure: error: * * * Could not find gconf-2.0
 0:52.56 ERROR: old-configure failed
 0:52.60 *** Fix above errors and then restart with\
 0:52.60                "/nix/store/b4h22fjd7hsvsb3r07mnqy1v8kjf84n4-gnumake-4.2.1/bin/make -f client.mk build"
 0:52.60 make: *** [client.mk:378: configure] Error 1
builder for '/nix/store/b1cff6iqpkv72nhfsf8ssb767zlipk3b-palemoon-28.2.1.drv' failed with exit code 2
error: build of '/nix/store/b1cff6iqpkv72nhfsf8ssb767zlipk3b-palemoon-28.2.1.drv' failed

@kalbasit
Copy link
Member

kalbasit commented Nov 28, 2018

0:52.56 DEBUG: configure: error: * * * Could not find gconf-2.0

@develCuy you're missing gconf. I believe the build has worked for you but not for borg because you do not have sandbox enabled, and the build has picked up a dependency already on your system.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: palemoon

Partial log (click to expand)

 0:30.15 DEBUG: int main() {
 0:30.15 DEBUG: pthread_create()
 0:30.15 DEBUG: ; return 0; }
 0:30.15 DEBUG: configure: error:  --with-pthreads specified for a system without pthread support
 0:30.15 ERROR: old-configure failed
 0:30.23 *** Fix above errors and then restart with\
 0:30.23                "/nix/store/2rnw4pxq934hf0yazdrszs91rf7v7kjg-gnumake-4.2.1/bin/make -f client.mk build"
 0:30.23 make: *** [client.mk:378: configure] Error 1
builder for '/nix/store/4v5alpcbcy73zqfk62ah3hlhgr8ka6lw-palemoon-28.2.1.drv' failed with exit code 2
error: build of '/nix/store/4v5alpcbcy73zqfk62ah3hlhgr8ka6lw-palemoon-28.2.1.drv' failed

@develCuy develCuy changed the title Palemoon: 27.9.4 -> 28.2.1 palemoon: 27.9.4 -> 28.2.1 Nov 28, 2018
@develCuy
Copy link
Author

@develCuy you're missing gconf.

Just added a note about my troubles with gconf to the description of this PR.

@kalbasit
Copy link
Member

@develCuy try gnome2.GConf.

@develCuy
Copy link
Author

Thanks @kalbasit! I'll retry the build now.

@GrahamcOfBorg build palemoon

@kalbasit
Copy link
Member

@develCuy You need to request access to ofborg to be able to invoke it. Please see https://github.com/NixOS/ofborg

@GrahamcOfBorg build palemoon

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: palemoon

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: palemoon

Partial log (click to expand)

 0:19.14 DEBUG: int main() {
 0:19.14 DEBUG: pthread_create()
 0:19.14 DEBUG: ; return 0; }
 0:19.14 DEBUG: configure: error:  --with-pthreads specified for a system without pthread support
 0:19.14 ERROR: old-configure failed
 0:19.19 *** Fix above errors and then restart with\
 0:19.19                "/nix/store/2rnw4pxq934hf0yazdrszs91rf7v7kjg-gnumake-4.2.1/bin/make -f client.mk build"
 0:19.19 make: *** [client.mk:378: configure] Error 1
builder for '/nix/store/75zdw7amparpj4k42zlb61ym4jqi5ydi-palemoon-28.2.1.drv' failed with exit code 2
error: build of '/nix/store/75zdw7amparpj4k42zlb61ym4jqi5ydi-palemoon-28.2.1.drv' failed

@kalbasit
Copy link
Member

kalbasit commented Nov 28, 2018

@develCuy I get the following error:

15:31.30 /build/palemoon-src/services/sync/modules/service.js: WARNING: no preprocessor directives found
15:38.07 /build/palemoon-src/application/palemoon/base/content/autocomplete.xml: WARNING: no preprocessor directives found
15:39.14 /build/palemoon-src/application/palemoon/themes/linux/autocomplete.css: WARNING: no preprocessor directives found
15:39.34 Packaging quitter@mozilla.org.xpi...
15:39.45 331 compiler warnings present.
15:39.90 Notification center failed: Install the python dbus module to get a notification when the build finishes.
15:39.90 We know it took a while, but your build finally finished successfully!
To view resource usage of the build, run |mach resource-usage|.
To take your build for a test drive, run: |mach run|
glibPreInstallPhase
installing
cp: cannot stat '/nix/store/lzg5ysvkjb1h9p93pqfx1j06b8wzgsg1-palemoon-src/browser/branding/official/default16.png': No such file or directory
builder for '/nix/store/cmppnmxwk9x29kj76ww5dgzqkdp6qvlv-palemoon-28.2.1.drv' failed with exit code 1
error: build of '/nix/store/cmppnmxwk9x29kj76ww5dgzqkdp6qvlv-palemoon-28.2.1.drv' on 'ssh://yl@zeus.home.nasreddine.com' failed: builder for '/nix/store/cmppnmxwk9x29kj76ww5dgzqkdp6qvlv-palemoon-28.2.1.drv' failed with exit code 1
builder for '/nix/store/cmppnmxwk9x29kj76ww5dgzqkdp6qvlv-palemoon-28.2.1.drv' failed with exit code 1
error: build of '/nix/store/cmppnmxwk9x29kj76ww5dgzqkdp6qvlv-palemoon-28.2.1.drv' failed
h

This looks to be coming from here

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: palemoon

Partial log (click to expand)

25:34.92 In file included from /build/palemoon-src/obj-x86_64-pc-linux-gnu/js/src/Unified_cpp_js_src40.cpp:11:0:
25:34.92 /build/palemoon-src/js/src/wasm/WasmTextToBinary.cpp:1898:11: note: 'result' was declared here
25:34.92      Float result;
25:34.92            ^
25:53.92 libjs_static.a
25:58.46 libxul_s.a.desc
25:58.46 libxul.so
26:08.94 js
building of '/nix/store/cmppnmxwk9x29kj76ww5dgzqkdp6qvlv-palemoon-28.2.1.drv' timed out after 1800 seconds
error: build of '/nix/store/cmppnmxwk9x29kj76ww5dgzqkdp6qvlv-palemoon-28.2.1.drv' failed

@develCuy
Copy link
Author

@kalbasit, just pushed an update, can you invoke @GrahamcOfBorg?

@kalbasit
Copy link
Member

sure, @GrahamcOfBorg build palemoon

@develCuy
Copy link
Author

develCuy commented Dec 3, 2018

@kalbasit the build doesn't run :(

@kalbasit
Copy link
Member

kalbasit commented Dec 3, 2018

I'll try again.

@GrahamcOfBorg build palemoon

@Mic92
Copy link
Member

Mic92 commented Dec 3, 2018

seems to timeout now. Note that ofborg now logs into the checkbox below instead of writing comments.

@kalbasit
Copy link
Member

kalbasit commented Dec 3, 2018

ok np, I’ll build it manually and based on that I’ll change the meta timeout.

@kalbasit
Copy link
Member

kalbasit commented Dec 3, 2018

@develCuy the build is still failing.

$ nix build -f . palemoon
error: build of '/nix/store/vcs6np2sp57wwf0ipdskvjpmfsaxjiiq-palemoon-28.2.1.drv' on 'ssh://yl@zeus.home.nasreddine.com' failed: builder for '/nix/store/vcs6np2sp57wwf0ipdskvjpmfsaxjiiq-palemoon-28.2.1.drv' failed with exit code 1
builder for '/nix/store/vcs6np2sp57wwf0ipdskvjpmfsaxjiiq-palemoon-28.2.1.drv' failed with exit code 1; last 10 log lines:
  14:58.06 Packaging quitter@mozilla.org.xpi...
  14:58.17 331 compiler warnings present.
  14:58.57 Notification center failed: Install the python dbus module to get a notification when the build finishes.
  14:58.57 We know it took a while, but your build finally finished successfully!
  To view resource usage of the build, run |mach resource-usage|.
  To take your build for a test drive, run: |mach run|
  glibPreInstallPhase
  installing
  cp: cannot stat '/nix/store/lzg5ysvkjb1h9p93pqfx1j06b8wzgsg1-palemoon-src/application/palemoon/branding/official/16.png': No such file or directory
  builder for '/nix/store/vcs6np2sp57wwf0ipdskvjpmfsaxjiiq-palemoon-28.2.1.drv' failed with exit code 1
[0 built (1 failed), 60 copied (288.5 MiB), 68.6 MiB DL]
error: build of '/nix/store/vcs6np2sp57wwf0ipdskvjpmfsaxjiiq-palemoon-28.2.1.drv' failed

Can you please attempt to build it yourself and let me know when it's ready and is building correctly? Thanks!

@vcunat
Copy link
Member

vcunat commented Dec 9, 2018

I tried to build but I've been unable to.

That's probably just unchanged by this PR, but it could be improved if you care about the package. It eats very much RAM per thread and it doesn't respect $NIX_BUILD_CORES – instead it detects how many threads the machine can run. Note that this is very unfriendly also for our build farm where we have machines with dozens of threads and yet we'd like to run e.g. a dozen derivation builds at once on such a machine; our default make -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES has worked reasonably well. Example: I retried with 4-threaded machine with 8 GiB RAM, unsuccessfully, knowing that my 16/16 combination could be considered unbalanced.

@ghost
Copy link

ghost commented Apr 26, 2019

I was able to build palemoon 28.4.1 just fine on a machine with 8 threads and it was never using more than 8GB of RAM.

@Ekleog
Copy link
Member

Ekleog commented Jul 4, 2019

(triage) @develCuy Are you still interested in moving this PR forward?
@petabyteboy Do you have a PR up somewhere with the bump to 28.4.1?

@develCuy
Copy link
Author

develCuy commented Jul 4, 2019

(triage) @develCuy Are you still interested in moving this PR forward?
Yes @Ekleog! I just need to learn how to fix it for NixOS, because currently I'm using nix on Ubuntu, and the build works just fine. But it requires patching all the binaries as long as the compilation is broken

@Ekleog
Copy link
Member

Ekleog commented Jul 5, 2019

@develCuy Hopefully if you turn on sandbox in nix.conf (cf. PR template for more details), it should be enough to make nix-on-ubuntu look enough like NixOS to reproduce the issue :)

@OPNA2608
Copy link
Contributor

OPNA2608 commented Jul 5, 2019

That's probably just unchanged by this PR, but it could be improved if you care about the package. It […] doesn't respect $NIX_BUILD_CORES – instead it detects how many threads the machine can run.

If that is still an issue, adding

mk_add_options MOZ_MAKE_FLAGS="-j$NIX_BUILD_CORES"

to the .mozconfig appears to solve that.

I'll try building 28.6.0.1 and open a new PR once/if I get it to work, if nobody minds - might take awhile to get my local test compilations done though.

EDIT: 28.6.0.1 isn't working for me, maybe I'm doing something wrong in my expression. buildPhase goes fine, installPhase aborts. complains about missing files expected in the package-manifest. tried to have the configuration and build process as close to the docs and Arch PKGBUILD but no luck

EDIT 2: 28.4.1 and 28.2.1 give same build error. 😕

Error: /build/palemoon-src/obj-x86_64-pc-linux-gnu/application/palemoon/installer/package-manifest:90: Missing file(s): bin/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest
Error: /build/palemoon-src/obj-x86_64-pc-linux-gnu/application/palemoon/installer/package-manifest:102: Missing file(s): bin/browser/chrome/webide
Error: /build/palemoon-src/obj-x86_64-pc-linux-gnu/application/palemoon/installer/package-manifest:103: Missing file(s): bin/browser/chrome/webide.manifest
Error: /build/palemoon-src/obj-x86_64-pc-linux-gnu/application/palemoon/installer/package-manifest:104: Missing file(s): bin/browser/defaults/preferences/webide-prefs.js
Error: /build/palemoon-src/obj-x86_64-pc-linux-gnu/application/palemoon/installer/package-manifest:107: Missing file(s): bin/browser/chrome/devtools
Error: /build/palemoon-src/obj-x86_64-pc-linux-gnu/application/palemoon/installer/package-manifest:108: Missing file(s): bin/browser/chrome/devtools.manifest
Error: /build/palemoon-src/obj-x86_64-pc-linux-gnu/application/palemoon/installer/package-manifest:109: Missing file(s): bin/browser/defaults/preferences/devtools.js

Those files do exist on Arch at least, wonder what's different…


Someone should review if the official branding option should be kept though. My understanding of this statement is "yes, as long as we don't replace the bundled libraries"?
Then I'd assume copying their settings for official builds, possibly pointing to slightly different dirs for mk_add_options MOZ_OBJDIR and ac_add_options --x-libraries, will be fine.

@develCuy
Copy link
Author

develCuy commented Jul 7, 2019

(triage) @develCuy Are you still interested in moving this PR forward?

Yes @Ekleog! Actually, it works well from nix-shell --pure --option sandbox true

What else is required?

@@ -10,14 +10,14 @@

stdenv.mkDerivation rec {
name = "palemoon-${version}";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name gets auto-constructed if you supply pname now, best to change that while we're already here.

Suggested change
name = "palemoon-${version}";
pname = "palemoon";

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that a lot of other packages use this formula instead:

pname = "myname";
name = "${pname}-${version}";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For convenience, you can also use pname and version attributes and mkDerivation will automatically set name to "${pname}-${version}" by default. Since RFC 0035, this is preferred for packages in Nixpkgs, as it allows us to reuse the version easily
902952d

@OPNA2608
Copy link
Contributor

OPNA2608 commented Jul 8, 2019

What else is required?

Not required, but the link in homepage should be quoted now. The deprecation of the unquoted style is being discussed in an RFC.

    homepage = "https://www.palemoon.org/";

Besides that, does this build on NixOS? I tried a very similar expression, changing:
· name -> pname,
· quoted homepage,
· $n.png -> default$n.png (maybe doesn't apply for 28.2.1 but was needed for the latest release)
Attempted to nix-build 28.2.1 and well as several newer releases in a VM but got the error from my earlier comment. 😕

Deleting those files from the manifest lets the packaging finish, but that is most definitely not gonna be desired by upstream if we include the official branding.

@develCuy
Copy link
Author

develCuy commented Jul 8, 2019

@OPNA2608, branding is being discussed in #36917 already. I think we should merge that PR back to this one that is older

@ghost
Copy link

ghost commented Jul 8, 2019

I am having this devtools issue in the install phase OPNA2608 was describing when building on NixOS.
I can not find my old changes anymore unfortunately, but I'm still interested in a more up-to-date version of pale moon built from source.

@ofborg ofborg bot requested a review from AndersonTorres July 8, 2019 21:37
@OPNA2608
Copy link
Contributor

OPNA2608 commented Jul 9, 2019

Had me lost for awhile, but I think I got it figured out [for the most part]. Expect a PR to the latest release version with fixed NixOS compilation and some slight expression changes/simplifications later this day.

Screenshot_NixOS_19 03_2019-07-09_08:36:04

@worldofpeace
Copy link
Contributor

obsoleted by #64499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Update] Palemoon 28.2.1