Skip to content

bup: allow disabling web support; disable on aarch64-darwin due to #172397#179924

Closed
andrew-d wants to merge 1 commit intoNixOS:masterfrom
andrew-d:andrew/bup-web-optional
Closed

bup: allow disabling web support; disable on aarch64-darwin due to #172397#179924
andrew-d wants to merge 1 commit intoNixOS:masterfrom
andrew-d:andrew/bup-web-optional

Conversation

@andrew-d
Copy link
Copy Markdown
Contributor

@andrew-d andrew-d commented Jul 2, 2022

Description of changes

Adds a new configuration flag that allows disabling web support in bup. This is enabled by default everywhere except aarch64-darwin, where it's disabled so that we're not affected by #172397. This should also unbreak stuff that depends on bup like git-annex, which I also tested along with another package fix that I'll submit shortly.

(note that I disabled this here, rather than doing something in tornado package, since bup will function just fine without tornado being installed as long as you don't try to run bup web, whereas the dependency on the tornado side comes from tornado -> twisted -> pyOpenSSL, which is harder to unwind since none of those are optional)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jul 2, 2022
@SuperSandro2000
Copy link
Copy Markdown
Member

SuperSandro2000 commented Jul 4, 2022

twisted only optionally depends on pyopenssl https://github.com/NixOS/nixpkgs/blob/staging-next/pkgs/development/python-modules/twisted/default.nix#L138

If this is fixed with #179844, then we don't need to do anything here. Can you check that?


Edit: I just checked this against staging-next and on linux there is no longer a pyopenssl dependency. So it is very likely that this is the same case on darwin and we don't need this PR at all.

@andrew-d
Copy link
Copy Markdown
Contributor Author

andrew-d commented Jul 4, 2022

@SuperSandro2000 - It's possible that I'm doing this wrong, but... I'm still seeing the evaluation error on staging-next, commit 33b3f97

$ nix build './#legacyPackages.aarch64-darwin.python3Packages.twisted'
error: Package ‘python3.10-pyopenssl-22.0.0’ in /nix/store/168rj5f62ajfsk1p75yjw8sxvxsqkgvs-source/pkgs/development/python-modules/pyopenssl/default.nix:73 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

        Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
        (Flake) command, `--impure` must be passed in order to read this
        environment variable.

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

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)

@SuperSandro2000
Copy link
Copy Markdown
Member

I was only looking at runtime packages. This means it is somewhere a checkInput only like here https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/twisted/default.nix#L122-L138

I would suggest to rather disable pyopenssl tests on darwin than this workaround here.

@andrew-d
Copy link
Copy Markdown
Contributor Author

andrew-d commented Jul 5, 2022

I would suggest to rather disable pyopenssl tests on darwin than this workaround here.

Do you mean removing pyopenssl from the checkInputs of twisted on aarch64-darwin? Something like this appears to work:

diff --git pkgs/development/python-modules/twisted/default.nix pkgs/development/python-modules/twisted/default.nix
index 59011ef1d64..9db5c7e3372 100644
--- pkgs/development/python-modules/twisted/default.nix
+++ pkgs/development/python-modules/twisted/default.nix
@@ -119,7 +119,7 @@ buildPythonPackage rec {
     pyhamcrest
   ]
   ++ passthru.optional-dependencies.conch
-  ++ passthru.optional-dependencies.tls;
+  ++ lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) passthru.optional-dependencies.tls;
 
   checkPhase = ''
     export SOURCE_DATE_EPOCH=315532800

I can submit this as another PR, if you like that approach better?

@andrew-d andrew-d closed this Jul 7, 2022
@andrew-d andrew-d deleted the andrew/bup-web-optional branch July 7, 2022 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants