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

[WIP] palemoon: init at 27.0.3 #21726

Merged
merged 1 commit into from Jan 21, 2017
Merged

[WIP] palemoon: init at 27.0.3 #21726

merged 1 commit into from Jan 21, 2017

Conversation

rnhmjoj
Copy link
Contributor

@rnhmjoj rnhmjoj commented Jan 7, 2017

Motivation for this change

See #20693

Things done
  • Tested using sandboxing
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change (new package)
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

I could build and run it fine from a nix-shell but the build fails with this error in a clean environment:

0:17.54 js/src> creating ./config.status
0:17.54 js/src> /nix/store/3wyrnmp1bjfqg7njx6kzj6fnzyampbf5-bash-4.3-p46/bin/bash: ./config.status: /tmp/nix-build-palemoon-27.0.3.drv-0/Pale-Moon-c09119484da17c682a66e32bacbffb: bad interpreter: No such file or directory

There must be something needing to be patched.

@7c6f434c
Copy link
Member

7c6f434c commented Jan 9, 2017

«build fine in a nix-shell» — on non-NixOS Linux, right?

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jan 9, 2017

No, on NixOS. I think it fails when building with nix-build because of sandboxing.

@rnhmjoj rnhmjoj changed the title [WIP] palemoon: init at 27.9 [WIP] palemoon: init at 27.0.3 Jan 9, 2017
@7c6f434c
Copy link
Member

Oh, nice!

I now know what went wrong.

config.status is written in Python and uses virtualenv. It has a #! line referencing the local copy of Python. The shell script is executed by shell and only the first 80 bytes are read. Of course, the path to python is way longer than 80 characters. So the interpreter as read doesn't exist.

Apparently, Linux kernel sometimes limits the length in case of direct execve at 128 bytes, which may still be not enough… Not sure what is the most convenient way of patching this.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jan 10, 2017

The shell script is executed by shell and only the first 80 bytes are read.

The truncated path was somewhat suspicious but I had no idea there was such a limitation.

Not sure what is the most convenient way of patching this.

The file is generated by mach so we can't simply replace the string. Maybe mach can be configured to use a specific python, in that case a symlink with a shorter path will do.

@7c6f434c
Copy link
Member

7c6f434c commented Jan 10, 2017 via email

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jan 10, 2017

Found a workaround: I renamed the source directory using the name attribute of fetch*.
The build succeeds now but the install process fails (I didn't try that before):

Error: /tmp/nix-build-palemoon-27.0.3.drv-0/palemoon-src/obj-x86_64-unknown-linux-gnu/browser/installer/package-manifest:197: Missing file(s): bin/browser/components/status4evar.xpt
Error: /tmp/nix-build-palemoon-27.0.3.drv-0/palemoon-src/obj-x86_64-unknown-linux-gnu/browser/installer/package-manifest:349: Missing file(s): bin/browser/components/status4evar.js
Error: /tmp/nix-build-palemoon-27.0.3.drv-0/palemoon-src/obj-x86_64-unknown-linux-gnu/browser/installer/package-manifest:350: Missing file(s): bin/browser/components/status4evar.manifes

@7c6f434c
Copy link
Member

Just great. status4evar is mentioned in two places: default preferences, and installation manifest. Not anywhere else. Upstream packaging bug? Maybe just sed it out?

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jan 12, 2017

Maybe just sed it out?

That works but it requires to copy the entire source (about 1GB unpacked) because the store is read only.

@7c6f434c
Copy link
Member

Well, the source gets copied into the build dir in /tmp/ anyway, so you can chmod u+w and sed it as you wish in, say, postPatch.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jan 13, 2017

Thanks for the tips: It build finally. I should just add a desktop entry and tweak a few options now.

@FRidh
Copy link
Member

FRidh commented Jan 21, 2017

status?

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jan 21, 2017

There's still a small issue to fix but I don't really have time right now.

@7c6f434c
Copy link
Member

Well, if it runnable now, I could merge now and consider further fixes later…

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Jan 21, 2017

It's definitely runnable.

@7c6f434c 7c6f434c merged commit 46eecaf into NixOS:master Jan 21, 2017
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.

None yet

3 participants