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

powerdns-admin: init at 0.2.3 #109841

Merged
merged 7 commits into from Mar 8, 2021
Merged

Conversation

zhaofengli
Copy link
Member

Motivation for this change

PowerDNS-Admin is a web interface for PowerDNS. This PR also adds new Python modules required by the application.

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.

@zhaofengli
Copy link
Member Author

Rebased with stdenv.lib fixes for #108938. Also fixed font copying in asset packaging.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/468

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

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

16 packages built:
  • powerdns-admin
  • python37Packages.flask-seasurf
  • python37Packages.flask-sslify
  • python37Packages.lima
  • python37Packages.python3-saml
  • python37Packages.xmlsec
  • python38Packages.flask-seasurf
  • python38Packages.flask-sslify
  • python38Packages.lima
  • python38Packages.python3-saml
  • python38Packages.xmlsec
  • python39Packages.flask-seasurf
  • python39Packages.flask-sslify
  • python39Packages.lima
  • python39Packages.python3-saml
  • python39Packages.xmlsec

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

powerdns-admin:

patchPhase should not be overridden, use postPatch instead.

Near pkgs/applications/networking/powerdns-admin/default.nix:80:3:

   |
80 |   patchPhase = ''
   |   ^

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/patch-phase.md
installPhase should probably contain runHook preInstall and runHook postInstall.

Near pkgs/applications/networking/powerdns-admin/default.nix:84:3:

   |
84 |   installPhase = ''
   |   ^

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/missing-phase-hooks.md

python37Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/flask-seasurf/default.nix:1:8:

  |
1 | { lib, stdenv, fetchFromGitHub, buildPythonPackage, flask }:
  |        ^
python37Packages.flask-sslify:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;' and a pythonImportsCheck.

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/flask-sslify/default.nix:1:8:

  |
1 | { lib, stdenv, fetchPypi, buildPythonPackage, flask }:
  |        ^
python37Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/python3-saml/default.nix:1:8:

  |
1 | { lib, stdenv, fetchFromGitHub, buildPythonPackage, isPy3k,
  |        ^
python37Packages.xmlsec:

Unused argument: stdenv.
Near pkgs/development/python-modules/xmlsec/default.nix:1:14:

  |
1 | { pkgs, lib, stdenv, fetchPypi, buildPythonPackage, pytestCheckHook,
  |              ^
python38Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/flask-seasurf/default.nix:1:8:

  |
1 | { lib, stdenv, fetchFromGitHub, buildPythonPackage, flask }:
  |        ^
python38Packages.flask-sslify:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;' and a pythonImportsCheck.

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/flask-sslify/default.nix:1:8:

  |
1 | { lib, stdenv, fetchPypi, buildPythonPackage, flask }:
  |        ^
python38Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/python3-saml/default.nix:1:8:

  |
1 | { lib, stdenv, fetchFromGitHub, buildPythonPackage, isPy3k,
  |        ^
python38Packages.xmlsec:

Unused argument: stdenv.
Near pkgs/development/python-modules/xmlsec/default.nix:1:14:

  |
1 | { pkgs, lib, stdenv, fetchPypi, buildPythonPackage, pytestCheckHook,
  |              ^
python39Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/flask-seasurf/default.nix:1:8:

  |
1 | { lib, stdenv, fetchFromGitHub, buildPythonPackage, flask }:
  |        ^
python39Packages.flask-sslify:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;' and a pythonImportsCheck.

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/flask-sslify/default.nix:1:8:

  |
1 | { lib, stdenv, fetchPypi, buildPythonPackage, flask }:
  |        ^
python39Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md
Unused argument: stdenv.
Near pkgs/development/python-modules/python3-saml/default.nix:1:8:

  |
1 | { lib, stdenv, fetchFromGitHub, buildPythonPackage, isPy3k,
  |        ^
python39Packages.xmlsec:

Unused argument: stdenv.
Near pkgs/development/python-modules/xmlsec/default.nix:1:14:

  |
1 | { pkgs, lib, stdenv, fetchPypi, buildPythonPackage, pytestCheckHook,
  |              ^

@zhaofengli
Copy link
Member Author

zhaofengli commented Feb 19, 2021

Ok, force-pushed with the requested changes. For xmlsec, I agree it's a little messy, but I'm not entirely sure how to get it to compile without having the native packages pulled in (both pkgs.pkg-config as well as pythonPackages.pkgconfig are required in my testing).

@SuperSandro2000
Copy link
Member

Ok, force-pushed with the requested changes. For xmlsec, I agree it's a little messy, but I'm not entirely sure how to get it to compile without having the native packages pulled in (both pkgs.pkg-config as well as pythonPackages.pkgconfig are required in my testing).

Probably the package is using pkg-config somewhere directly instead of through pkgconfig. Should not be a blocker.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 109841 run on x86_64-darwin 1

15 packages built:
  • python37Packages.flask-seasurf
  • python37Packages.flask-sslify
  • python37Packages.lima
  • python37Packages.python3-saml
  • python37Packages.xmlsec
  • python38Packages.flask-seasurf
  • python38Packages.flask-sslify
  • python38Packages.lima
  • python38Packages.python3-saml
  • python38Packages.xmlsec
  • python39Packages.flask-seasurf
  • python39Packages.flask-sslify
  • python39Packages.lima
  • python39Packages.python3-saml
  • python39Packages.xmlsec

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python37Packages.flask-sslify:

Unused argument: pytestCheckHook.
Near pkgs/development/python-modules/flask-sslify/default.nix:1:39:

  |
1 | { lib, fetchPypi, buildPythonPackage, pytestCheckHook, flask }:
  |                                       ^
python37Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python38Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python38Packages.flask-sslify:

Unused argument: pytestCheckHook.
Near pkgs/development/python-modules/flask-sslify/default.nix:1:39:

  |
1 | { lib, fetchPypi, buildPythonPackage, pytestCheckHook, flask }:
  |                                       ^
python38Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python39Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python39Packages.flask-sslify:

Unused argument: pytestCheckHook.
Near pkgs/development/python-modules/flask-sslify/default.nix:1:39:

  |
1 | { lib, fetchPypi, buildPythonPackage, pytestCheckHook, flask }:
  |                                       ^
python39Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

@zhaofengli
Copy link
Member Author

Thanks! I removed the unused parameter from flask-sslify. The other "Add a checkPhase for tests" errors seem to be false-positives because tests are indeed run when they are built.

@zhaofengli zhaofengli force-pushed the powerdns-admin branch 2 times, most recently from dd18300 to f711134 Compare February 21, 2021 17:11
@zhaofengli
Copy link
Member Author

Well, I was looking at the wrong place 🤦 Fix applied.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Feb 22, 2021

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 109841 run on x86_64-darwin 1

15 packages built:
  • python37Packages.flask-seasurf
  • python37Packages.flask-sslify
  • python37Packages.lima
  • python37Packages.python3-saml
  • python37Packages.xmlsec
  • python38Packages.flask-seasurf
  • python38Packages.flask-sslify
  • python38Packages.lima
  • python38Packages.python3-saml
  • python38Packages.xmlsec
  • python39Packages.flask-seasurf
  • python39Packages.flask-sslify
  • python39Packages.lima
  • python39Packages.python3-saml
  • python39Packages.xmlsec

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python37Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python38Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python38Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python39Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python39Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

The always helpfull nixpkgs-hammering reminded me that we should add pythonImportsCheck and then I think this is done or almost done.

@zhaofengli
Copy link
Member Author

Alright, added. I thought those were not necessary as tests are run already, but doesn't hurt to have them I guess 😛

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

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

16 packages built:
  • powerdns-admin
  • python37Packages.flask-seasurf
  • python37Packages.flask-sslify
  • python37Packages.lima
  • python37Packages.python3-saml
  • python37Packages.xmlsec
  • python38Packages.flask-seasurf
  • python38Packages.flask-sslify
  • python38Packages.lima
  • python38Packages.python3-saml
  • python38Packages.xmlsec
  • python39Packages.flask-seasurf
  • python39Packages.flask-sslify
  • python39Packages.lima
  • python39Packages.python3-saml
  • python39Packages.xmlsec

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python37Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python38Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python38Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python39Packages.flask-seasurf:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

python39Packages.python3-saml:

Add a checkPhase for tests, or at least pythonImportsCheck.

See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/python-include-tests.md

@zhaofengli
Copy link
Member Author

python38Packages.flask-seasurf:
Add a checkPhase for tests, or at least pythonImportsCheck.

Hmm, the pythonImportsChecks are definitely there. Not sure what's happening here.

@SuperSandro2000
Copy link
Member

python38Packages.flask-seasurf:
Add a checkPhase for tests, or at least pythonImportsCheck.

Hmm, the pythonImportsChecks are definitely there. Not sure what's happening here.

It probably used the changes before you added the checks. I want to add a link to the commit that was used to generate the report but that maybe takes a bit. Taking a look at the other changes later.

@SuperSandro2000
Copy link
Member

@zhaofengli please resolve the merge conflict.

@zhaofengli
Copy link
Member Author

Sure, rebased and applied suggested changes.

@SuperSandro2000
Copy link
Member

error: build of '/nix/store/75q369al977y8q8h9b1cgj6a5frn6vxn-python3.8-python3-saml-1.10.0.drv' on 'ssh://clara.r' failed: error: --- Error --- nix-daemon
builder for '/nix/store/75q369al977y8q8h9b1cgj6a5frn6vxn-python3.8-python3-saml-1.10.0.drv' failed with exit code 1; last 10 log lines:
  adding 'python3_saml-1.10.0.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
  Finished executing setuptoolsBuildPhase
  installing
  Executing pipInstallPhase
  /build/source/dist /build/source
  Processing ./python3_saml-1.10.0-py3-none-any.whl
  Requirement already satisfied: xmlsec>=1.0.5 in /nix/store/gknwvwa2g06r9l2469km6yb6qva8ffvj-python3.8-xmlsec-1.3.9/lib/python3.8/site-packages (from python3-saml==1.10.0) (1.3.9)
  ERROR: Could not find a version that satisfies the requirement defusedxml==0.6.0 (from python3-saml)
  ERROR: No matching distribution found for defusedxml==0.6.0
builder for '/nix/store/75q369al977y8q8h9b1cgj6a5frn6vxn-python3.8-python3-saml-1.10.0.drv' failed with exit code 1
cannot build derivation '/nix/store/61dykksav9ih12pa0bms62a7rlyj4s9z-powerdns-admin-assets-0.2.3.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/g9rpjamn7hmlcrq9fimmz2d03pvb50vf-powerdns-admin-0.2.3.drv': 2 dependencies couldn't be built
error: build of '/nix/store/g9rpjamn7hmlcrq9fimmz2d03pvb50vf-powerdns-admin-0.2.3.drv' failed

I think you need to relax the version requirement.

@zhaofengli
Copy link
Member Author

@SuperSandro2000 Ok, looks like the upstream has removed the dependency and the commit doesn't introduce any API/functionality changes, so I've added the patch. Also took the liberty to bump it to 1.10.1.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

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

11 packages built:
  • powerdns-admin
  • python38Packages.flask-seasurf
  • python38Packages.flask-sslify
  • python38Packages.lima
  • python38Packages.python3-saml
  • python38Packages.xmlsec
  • python39Packages.flask-seasurf
  • python39Packages.flask-sslify
  • python39Packages.lima
  • python39Packages.python3-saml
  • python39Packages.xmlsec

@SuperSandro2000 SuperSandro2000 merged commit 05c92a5 into NixOS:master Mar 8, 2021
@zhaofengli zhaofengli deleted the powerdns-admin branch March 8, 2021 21:10
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