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

build-fhs-userenv: fixes for mount points #110825

Merged
merged 3 commits into from Feb 3, 2021

Conversation

andresilva
Copy link
Member

@andresilva andresilva commented Jan 26, 2021

Motivation for this change

Fixes #110636.

/etc/profiles was not being mounted, which meant that any user-installed package would not be available under the FHS environment. This change alone fixes all the issues reported in #110636 since the AppImage environment can now find the browser executable and the correct cursor.

/etc/fonts was also broken since we were mounting the host's /etc/fonts but it was getting overriden by the default /etc/fonts from fontconfig that was part of the FHS environment.

I only tested these changes on AppImages and it solved all the issues I reported in #110636.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@andresilva
Copy link
Member Author

/marvin opt-in
/status needs_reviewer

@marvin-mk2
Copy link

marvin-mk2 bot commented Jan 26, 2021

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@thiagokokada
Copy link
Contributor

thiagokokada commented Jan 26, 2021

Result of nixpkgs-review pr 110825 run on x86_64-linux 1

2 packages failed to build:
  • houdini
  • quartus-prime-lite
74 packages built:
  • Sylk
  • android-studio (androidStudioPackages.stable)
  • androidStudioPackages.beta
  • androidStudioPackages.canary
  • androidStudioPackages.dev
  • anki-bin
  • appimage-run
  • appimage-run-tests
  • apple-music-electron
  • arduino-ci
  • arduino-cli
  • bitscope.chart
  • bitscope.console
  • bitscope.display
  • bitscope.dso
  • bitscope.logic
  • bitscope.meter
  • bitscope.proto
  • bitscope.server
  • chrysalis
  • clonehero
  • conda
  • deltachat-electron
  • devdocs-desktop
  • dropbox
  • dropbox-cli
  • electronplayer
  • esphome
  • fahclient
  • flutter (flutterPackages.stable)
  • flutter-beta (flutterPackages.beta)
  • flutter-dev (flutterPackages.dev)
  • hover
  • irccloud
  • joplin-desktop
  • keeweb
  • kodiPlugins.steam-launcher
  • ledger-live-desktop
  • left4gore-bin
  • lens
  • lightworks
  • lunar-client
  • lutris
  • lutris-free
  • marktext
  • mate.caja-dropbox
  • minetime
  • molotov
  • mycrypto
  • notable
  • nuclear
  • p3x-onenote
  • platformio
  • plex
  • plexamp
  • protontricks
  • radicle-upstream
  • rambox-pro
  • runwayml
  • sidequest
  • ssb-patchwork
  • standardnotes
  • station
  • steam
  • steam-run
  • steam-run-native
  • steamcmd
  • timeular
  • tusk
  • unityhub
  • vmware-horizon-client
  • wootility
  • zettlr
  • zulip

Quartus and Houdini failed to build because they're proprietary applications with non-public links to download their application and/or dependency, generating an error like this:

builder for '/nix/store/dvjhy3jw3ada0qmngl824nrf864k649q-QuartusLiteSetup-20.1.0.711-linux.run.drv' failed with exit code 1; last 10 log
lines:
  ***
  Unfortunately, we cannot download file QuartusLiteSetup-20.1.0.711-linux.run automatically.
  Please go to https://fpgasoftware.intel.com/20.1/?edition=lite&platform=linux to download it yourself, and add it to the Nix store
  using either
    nix-store --add-fixed sha256 QuartusLiteSetup-20.1.0.711-linux.run
  or
    nix-prefetch-url --type sha256 file:///path/to/QuartusLiteSetup-20.1.0.711-linux.run

  ***
builder for '/nix/store/yn339vhzjihjx9gy1dfcm8qc2g0h2j61-houdini-17.5.327-linux_x86_64_gcc6.3.tar.gz.drv' failed with exit code 1; last 1
0 log lines:
  Download it from https://www.sidefx.com and add it to the nix store with:

      nix-prefetch-url <URL>

  This can't be done automatically because you need to create an account on
  their website and agree to their license terms before you can download
  it. That's what you get for using proprietary software.

  ***

So it seems fine.

@thiagokokada
Copy link
Contributor

Links in rambox-pro still doesn't work for me, but this may be related to #108995 since I use release-20.09.

My only issue with this PR is that it affects everything that uses buildFHSUserEnv, so the implications are probably bigger than I have as context.

Maybe @Atemu or @abbradar can help reviewing here 🤔 ?

@andresilva
Copy link
Member Author

I am only using two appimage apps: rambox and ledger-live-desktop. I had issues on both which are fixed by this PR. I think besides appimages the other big user of FHS is Steam, which I don't use and therefore haven't tested. Probably makes sense to test manually before merging this PR.

@andresilva
Copy link
Member Author

Links in rambox-pro still doesn't work for me, but this may be related to #108995 since I use release-20.09.

Maybe you have some other issue related to XDG then. For me the issue was that my browser was not on the FHS's path since it is symlinked in /etc/profiles/per-user/{username}.

@andresilva
Copy link
Member Author

Happy to report that I have installed Steam and played some games, everything seemed to be working fine.

@andresilva andresilva requested a review from Atemu January 28, 2021 22:41
@marvin-mk2
Copy link

marvin-mk2 bot commented Feb 1, 2021

Reminder: Please review!

This Pull Request is awaiting review. If you are the assigned reviewer, please have a look. Try to find another reviewer if necessary. If you can't, please say so. If the status is not accurate, please change it. If nothing happens, this PR will be should be put back in the needs_reviewer queue in one day.


Note: This feature is currently broken. The bot will not actually change the status. If you see this message multiple times, please request a status change manually.

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.

AppImage xdg integration, fonts and cursor
3 participants