about summary refs log tree commit diff
path: root/pkgs/servers/samba
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-03-04 13:46:20 -0800
committerWilliam A. Kennington III <william@wkennington.com>2015-03-04 17:17:26 -0800
commit936fdc7b68335a32b6c29df774044d46d46ff2ca (patch)
tree70e1aeed1c214c904005c847ef8cca236152d79a /pkgs/servers/samba
parente15cd2375e534ae31c85962210ecb88630ff5f0a (diff)
downloadnixlib-936fdc7b68335a32b6c29df774044d46d46ff2ca.tar
nixlib-936fdc7b68335a32b6c29df774044d46d46ff2ca.tar.gz
nixlib-936fdc7b68335a32b6c29df774044d46d46ff2ca.tar.bz2
nixlib-936fdc7b68335a32b6c29df774044d46d46ff2ca.tar.lz
nixlib-936fdc7b68335a32b6c29df774044d46d46ff2ca.tar.xz
nixlib-936fdc7b68335a32b6c29df774044d46d46ff2ca.tar.zst
nixlib-936fdc7b68335a32b6c29df774044d46d46ff2ca.zip
samba4: 4.1.17 -> 4.2.0 YOLO
Diffstat (limited to 'pkgs/servers/samba')
-rw-r--r--pkgs/servers/samba/4.x-heimdal-compat.patch16
-rw-r--r--pkgs/servers/samba/4.x-no-persistent-install.patch42
-rw-r--r--pkgs/servers/samba/4.x.nix40
3 files changed, 83 insertions, 15 deletions
diff --git a/pkgs/servers/samba/4.x-heimdal-compat.patch b/pkgs/servers/samba/4.x-heimdal-compat.patch
new file mode 100644
index 000000000000..35f01e4001ec
--- /dev/null
+++ b/pkgs/servers/samba/4.x-heimdal-compat.patch
@@ -0,0 +1,16 @@
+diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
+index bb476e1..0a407a4 100644
+--- a/source4/kdc/kdc.c
++++ b/source4/kdc/kdc.c
+@@ -967,9 +967,9 @@ static void kdc_task_init(struct task_server *task)
+ 	 * The old behavior in the _kdc_get_preferred_key()
+ 	 * function is use_strongest_server_key=TRUE.
+ 	 */
+-	kdc->config->as_use_strongest_session_key = false;
++	kdc->config->tgt_use_strongest_session_key = false;
++	kdc->config->svc_use_strongest_session_key = false;
+ 	kdc->config->preauth_use_strongest_session_key = false;
+-	kdc->config->tgs_use_strongest_session_key = false;
+ 	kdc->config->use_strongest_server_key = true;
+ 
+ 	/* Register hdb-samba4 hooks for use as a keytab */
diff --git a/pkgs/servers/samba/4.x-no-persistent-install.patch b/pkgs/servers/samba/4.x-no-persistent-install.patch
index 68d0cf76aa55..c3e013f7862b 100644
--- a/pkgs/servers/samba/4.x-no-persistent-install.patch
+++ b/pkgs/servers/samba/4.x-no-persistent-install.patch
@@ -16,3 +16,45 @@ index aa4e66e..d53f433 100755
      # these might be on non persistent storage
 -    bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}")
 +    #bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}")
+diff --git a/ctdb/wscript b/ctdb/wscript
+index 3e2a992..1b93a4d 100755
+--- a/ctdb/wscript
++++ b/ctdb/wscript
+@@ -473,10 +473,10 @@ def build(bld):
+     for t in etc_subdirs:
+         files = SUBDIR_MODE('%s/%s' % (configdir, t), trim_path=configdir)
+         for fmode in files:
+-            bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/%s' % fmode[0],
++            bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/%s' % fmode[0],
+                               destname=fmode[0], chmod=fmode[1])
+ 
+-    bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/functions',
++    bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/functions',
+                       destname='functions')
+ 
+     etc_scripts = [
+@@ -489,18 +489,18 @@ def build(bld):
+     ]
+ 
+     for t in etc_scripts:
+-        bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/%s' % t,
++        bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/%s' % t,
+                           destname=t, chmod=0755)
+ 
+-    bld.INSTALL_FILES('${SYSCONFDIR}/sudoers.d', 'config/ctdb.sudoers',
++    bld.INSTALL_FILES('${EXEC_PREFIX}${SYSCONFDIR}/sudoers.d', 'config/ctdb.sudoers',
+                       destname='ctdb')
+ 
+-    bld.INSTALL_FILES('${CTDB_ETCDIR}/notify.d', 'config/notify.d.README',
++    bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}/notify.d', 'config/notify.d.README',
+                       destname='README')
+ 
+-    bld.install_dir(bld.env.CTDB_LOGDIR)
+-    bld.install_dir(bld.env.CTDB_RUNDIR)
+-    bld.install_dir(bld.env.CTDB_VARDIR)
++    #bld.install_dir(bld.env.CTDB_LOGDIR)
++    #bld.install_dir(bld.env.CTDB_RUNDIR)
++    #bld.install_dir(bld.env.CTDB_VARDIR)
+ 
+     sed_expr = 's/@PACKAGE_VERSION@/%s/g' % VERSION
+     t = bld.SAMBA_GENERATOR('ctdb-pc',
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index eca6c31478f9..610ca73cc1cc 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -1,9 +1,9 @@
 { stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl_ns
 , docbook_xml_dtd_42, readline, talloc, ntdb, tdb, tevent, ldb, popt, iniparser
-, pythonPackages, libbsd
+, pythonPackages, libbsd, nss_wrapper, socket_wrapper, uid_wrapper, libarchive
 
 # source3/wscript optionals
-, heimdal ? null # Samba only supports heimdal for kerberos although mit-krb5 is being worked on
+, kerberos ? null
 , openldap ? null
 , cups ? null
 , pam ? null
@@ -11,7 +11,6 @@
 , acl ? null
 , libaio ? null
 , fam ? null
-, ctdb ? null
 , ceph ? null
 , glusterfs ? null
 
@@ -31,21 +30,24 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "samba-4.1.17";
+  name = "samba-4.2.0";
 
   src = fetchurl {
     url = "mirror://samba/pub/samba/stable/${name}.tar.gz";
-    sha256 = "07fban97xmf4r5y48jp6ajfdki6vx4239lwq9gmvwjy8x44mvsvs";
+    sha256 = "03s9pjdgq6nlv2lcnlmxlhhj8m5drgv6z4xy9zkgwwd92mw0b9k6";
   };
 
-  patches = [ ./4.x-no-persistent-install.patch ];
+  patches = [
+    ./4.x-no-persistent-install.patch
+    ./4.x-heimdal-compat.patch
+  ];
 
   buildInputs = [
     python pkgconfig perl libxslt docbook_xsl_ns docbook_xml_dtd_42
     readline talloc ntdb tdb tevent ldb popt iniparser pythonPackages.subunit
-    libbsd
+    libbsd nss_wrapper socket_wrapper uid_wrapper libarchive
 
-    heimdal openldap cups pam avahi acl libaio fam ctdb ceph glusterfs
+    kerberos openldap cups pam avahi acl libaio fam ceph glusterfs
 
     libiconv gettext
 
@@ -61,7 +63,7 @@ stdenv.mkDerivation rec {
     "--with-static-modules=NONE"
     "--with-shared-modules=ALL"
     "--with-winbind"
-  ] ++ (if heimdal != null then [ "--with-ads" ] else [ "--without-ads" ])
+  ] ++ (if kerberos != null then [ "--with-ads" ] else [ "--without-ads" ])
     ++ (if openldap != null then [ "--with-ldap" ] else [ "--without-ldap" ])
     ++ (if cups != null then [ "--enable-cups" ] else [ "--disable-cups" ])
     ++ (if pam != null then [ "--with-pam" "--with-pam_smbpass" ]
@@ -77,27 +79,35 @@ stdenv.mkDerivation rec {
     "--with-syslog"
     "--with-automount"
   ] ++ (if libaio != null then [ "--with-aio-support" ] else [ "--without-aio-support" ])
-    ++ (if fam != null then [ "--with-fam" ] else [ "--without-fam" ])
-    ++ (if ctdb != null then [ "--with-cluster-support" "--with-ctdb-dir=${ctdb}" ]
-        else [ "--without-cluster-support" ])
-    ++ (if ceph != null then [ "--with-libcephfs=${ceph}" ] else [ ])
+    ++ (if fam != null then [ "--with-fam" ] else [ "--without-fam" ]) ++ [
+    "--with-cluster-support"
+  ] ++ (if ceph != null then [ "--with-libcephfs=${ceph}" ] else [ ])
     ++ (if glusterfs != null then [ "--enable-glusterfs" ] else [ "--disable-glusterfs" ]) ++ [
+
     # dynconfig/wscript options
     "--enable-fhs"
     "--sysconfdir=/etc"
     "--localstatedir=/var"
 
     # buildtools/wafsamba/wscript options
-    "--bundled-libraries=${if heimdal != null then "NONE" else "com_err"}"
+    "--bundled-libraries=${if kerberos.implementation == "heimdal" then "NONE" else "com_err"}"
     "--private-libraries=NONE"
     "--builtin-libraries=replace"
   ] ++ (if libiconv != null then [ "--with-libiconv=${libiconv}" ] else [ ])
     ++ (if gettext != null then [ "--with-gettext=${gettext}" ] else [ "--without-gettext" ]) ++ [
+
     # source4/lib/tls/wscript options
   ] ++ (if gnutls != null && libgcrypt != null && libgpgerror != null
         then [ "--enable-gnutls" ] else [ "--disable-gnutls" ]) ++ [
+
     # wscript options
-  ] ++ stdenv.lib.optional (heimdal == null) "--without-ad-dc";
+  ] ++ stdenv.lib.optional (kerberos.implementation == "krb5") "--with-system-mitkrb5"
+    ++ stdenv.lib.optional (kerberos == null) "--without-ad-dc" ++ [
+
+    # ctdb/wscript
+    "--enable-infiniband"
+    "--enable-pmda"
+  ];
 
   stripAllList = [ "bin" "sbin" ];