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

Clean up & update samba things #83832

Merged
merged 8 commits into from Mar 31, 2020
Merged

Clean up & update samba things #83832

merged 8 commits into from Mar 31, 2020

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Mar 31, 2020

Motivation for this change

Closes: #58380, #82489

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)
    • nixosTests.samba
  • 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.

* format with nixpkgs-fmt
* quote homepage as per RFC 0045
* split name → pname & version
* do not use aliases
* format with nixpkgs-fmt
* do not use aliases
* format with nixpkgs-fmt
* quote homepage as per RFC 0045
* split name → pname & version
* do not use aliases
* switch to wafHook
* format with nixpkgs-fmt
* quote homepage as per RFC 0045
* split name → pname & version
* do not use aliases
* switch to wafHook
Half of the Samba libraries needs it now
* Move build tools to nativeBuildInputs
* Switch to Python 3 as it is required by most Samba libraries
* Do not yet enable the experimental lmdb backend introduced in 1.4.0

Changes:
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=4e2eb5660a11cea215d39495844aa76ffb5a1a2e
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=3eecdbcc38dbe084b285c9720443d819304f7b97
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=b7f0ee93f58e663bb8fc0b39985aa49b254582d9
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=bdbb9422c0430d74c3173822257e23a9dfb2713e
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=340cb9ca97bc2a23f102f80897a8d8f4809f0072
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=de3bb5cd5236565f2b79644d99e55d03b254b65e
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=09d281d69b668a71e4457889bb5e949414a664fb
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=81648d576d56e924945b2214ac12ca6a40679db8
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=86d480ade25953a175b0837667ce5efb8b7e65df
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=80bd467affbda1d962f4deb3caa8a42c6531425d
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=bc0d16c9d8eacd254552ff28726a2ba5f2a1c8c0
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=c37b94fd0a7b24df93b664ad4c2d197c516c9dce
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=79460b1b9f3452d6d68014b84f4a9dc3988bd916
* https://git.samba.org/samba.git/?p=samba.git;a=commit;h=0ca46a37268c8219192abc3ab5f2546a02ed8862
* format with nixpkgs-fmt
* quote homepage as per RFC 0045
* split name → pname & version
* do not use aliases
* switch to wafHook
* move build tools to nativeBuildInputs
@jtojnar
Copy link
Contributor Author

jtojnar commented Mar 31, 2020

On darwin ldb still does not build but it is still an improvement:

Checking for system tdb (>=1.4.3)                                                 : yes
ERROR: Python module pytdb of version 1.4.3 not found, and bundling disabled

I saw the same error on Linux when python3 was after wafHook in nativeBuildnputs, which I fixed by swapping the order. Unfortunately, that does not seem to be enough for Darwin. I even tried overriding the wafHook’s python2 with null without success.

@Izorkin
Copy link
Contributor

Izorkin commented Mar 31, 2020

Checked samba on home server - working.
And used this patch:

diff --git a/pkgs/development/libraries/ldb/default.nix b/pkgs/development/libraries/ldb/default.nix
index 7ee869b53c3..b29a4790032 100644
--- a/pkgs/development/libraries/ldb/default.nix
+++ b/pkgs/development/libraries/ldb/default.nix
@@ -9,7 +9,7 @@
 , popt
 , libxslt
 , docbook-xsl-nons
-, docbook_xml_dtd_42
+, docbook_xml_dtd_45
 , cmocka
 , wafHook
 }:
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
     wafHook
     libxslt
     docbook-xsl-nons
-    docbook_xml_dtd_42
+    docbook_xml_dtd_45
   ];

   buildInputs = [
diff --git a/pkgs/development/libraries/ntdb/default.nix b/pkgs/development/libraries/ntdb/default.nix
index de0db887d4b..dae3ba5fcbe 100644
--- a/pkgs/development/libraries/ntdb/default.nix
+++ b/pkgs/development/libraries/ntdb/default.nix
@@ -6,7 +6,7 @@
 , gettext
 , libxslt
 , docbook-xsl-nons
-, docbook_xml_dtd_42
+, docbook_xml_dtd_45
 , wafHook
 }:

@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
     gettext
     libxslt
     docbook-xsl-nons
-    docbook_xml_dtd_42
+    docbook_xml_dtd_45
     wafHook
   ];

diff --git a/pkgs/development/libraries/talloc/default.nix b/pkgs/development/libraries/talloc/default.nix
index f464364e8a0..31004f30ef8 100644
--- a/pkgs/development/libraries/talloc/default.nix
+++ b/pkgs/development/libraries/talloc/default.nix
@@ -5,7 +5,7 @@
 , readline
 , libxslt
 , docbook-xsl-nons
-, docbook_xml_dtd_42
+, docbook_xml_dtd_45
 , fixDarwinDylibNames
 , wafHook
 }:
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
     python
     wafHook
     docbook-xsl-nons
-    docbook_xml_dtd_42
+    docbook_xml_dtd_45
   ];

   buildInputs = [
diff --git a/pkgs/development/libraries/tevent/default.nix b/pkgs/development/libraries/tevent/default.nix
index 66d65e63951..058830bbc4d 100644
--- a/pkgs/development/libraries/tevent/default.nix
+++ b/pkgs/development/libraries/tevent/default.nix
@@ -6,7 +6,7 @@
 , talloc
 , libxslt
 , docbook-xsl-nons
-, docbook_xml_dtd_42
+, docbook_xml_dtd_45
 , which
 , wafHook
 }:
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     python3
     libxslt
     docbook-xsl-nons
-    docbook_xml_dtd_42
+    docbook_xml_dtd_45
     wafHook
   ];

diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index 1d6951bb8c1..571c3d99654 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -24,6 +24,8 @@
 , libtasn1
 , tdb
 , cmocka
+, talloc
+, tevent

 , enableLDAP ? false, openldap
 , enablePrinting ? false, cups
@@ -86,6 +88,8 @@ stdenv.mkDerivation rec {
     gnutls
     libtasn1
     tdb
+    talloc
+    tevent
   ] ++ optionals stdenv.isLinux [ liburing systemd ]
     ++ optional enableLDAP openldap
     ++ optional (enablePrinting && stdenv.isLinux) cups

@jtojnar jtojnar merged commit 08306f3 into NixOS:master Mar 31, 2020
@jtojnar jtojnar deleted the samba-things branch March 31, 2020 18:38
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