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

samba4: Properly use Python 3 and fix PYTHONPATH #108177

Closed
wants to merge 1 commit into from

Conversation

dasJ
Copy link
Member

@dasJ dasJ commented Jan 1, 2021

Some tools (especially AD tools) don't work without dnspython and tdb.
This change adds them to $PYTHONPATH.

Also this PR fixes the ugly Python 3 override.

To test this, it's not enough to just build the package, but you should
rather try a tool (like samba_dnsupdate) which is built on Python. If it
does not return an ImportError, this change worked.

Motivation for this change
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.

Some tools (especially AD tools) don't work without dnspython and tdb.
This change adds them to $PYTHONPATH.

Also this PR fixes the ugly Python 3 override.

To test this, it's not enough to just build the package, but you should
rather try a tool (like samba_dnsupdate) which is built on Python. If it
does not return an ImportError, this change worked.
@dasJ dasJ requested review from Izorkin and bachp and removed request for Izorkin January 1, 2021 22:49
@dasJ dasJ closed this Jan 1, 2021
@dasJ dasJ deleted the fix/samba-pythonpath branch January 1, 2021 22:54
@ofborg ofborg bot requested a review from aneeshusa January 1, 2021 23:01
@kwaerner
Copy link

@dasJ Did you find another way to do this? I tried your solution in #105486 (comment) and it works, but I am running on ARM and recompiling on every new Samba version is not feasible. Since samba-tool crashes without these changes, I think something needs fixing in the package right?

@dasJ
Copy link
Member Author

dasJ commented Jul 28, 2021

Well I'm overlaying and building it every time it changes 🤷

@kwaerner
Copy link

Ok - thank you for replying so quickly. Would you consider reopening this? :) Or if you do not feel like it is important enough or have the time, would you mind me opening a new pull request with these changes (crediting you of course)? I am also trying to provision a domain, but simply running samba-tool without any commands is enough to make it crash.

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

2 participants