git.iko.soy/typeable/nixpkgs
on master help sign in
samba: Revert style changes and get rid of some dependencies

Packages like glusterfs are now optional dependencies. A bunch of dependencies like subunit are gone: as far as I can tell, these are only used by Samba's test suite, which we're not even running, so they're pointless. Fixes #8067.

commit0645f5eab7b98e57cbbf51cab7fc77b4762b44b7 authorEelco Dolstra <eelco.dolstra@logicblox.com> dateMon 1 Jun 2015, 15:28 (12 years ago) parent789f20e
3 files changed+63−162
pkgs/os-specific/gnu/default.nix+1−2 pkgs/servers/samba/4.x.nix+50−120 pkgs/top-level/all-packages.nix+12−40
pkgs/os-specific/gnu/default.nix+1−2
@@ -1,7 +1,7 @@
11# Packages that make up the GNU/Hurd operating system (aka. GNU).
22
33args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
4−, texinfo, glibcCross, hurdPartedCross, libuuid, samba_light
4+, texinfo, glibcCross, hurdPartedCross, libuuid, samba
55, gccCrossStageStatic, gccCrossStageFinal
66, forceNativeDrv, forceSystem, newScope, platform, config, crossSystem
77, overrides ? {} }:
@@ -91,7 +91,6 @@ let
9191 mig_raw = callPackage ./mig {};
9292
9393 smbfs = callPackage ./smbfs {
94− samba = samba_light;
9594 hurd = gnu.hurdCross;
9695 };
9796
pkgs/servers/samba/4.x.nix+50−120
@@ -1,48 +1,23 @@
1−{ stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl
1+{ lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl
22, docbook_xml_dtd_42, docbook_xml_dtd_45, readline, talloc, ntdb, tdb, tevent
3−, ldb, popt, iniparser, subunit, libbsd, nss_wrapper, socket_wrapper
4−, uid_wrapper, libarchive
5−
6−# source3/wscript optionals
7−, kerberos ? null
8−, zlib ? null
9−, openldap ? null
10−, cups ? null
11−, pam ? null
12−, avahi ? null
13−, acl ? null
14−, libaio ? null
15−, fam ? null
16−, libceph ? null
17−, glusterfs ? null
18−
19−# buildtools/wafsamba/wscript optionals
20−, libiconv ? null
21−, gettext ? null
22−
23−# source4/lib/tls/wscript optionals
24−, gnutls ? null
25−, libgcrypt ? null
26−, libgpgerror ? null
27−
28−# other optionals
29−, ncurses ? null
30−, libunwind ? null
31−, dbus ? null
32−, libibverbs ? null
33−, librdmacm ? null
34−, systemd ? null
3+, ldb, popt, iniparser, libbsd, libarchive, libiconv, gettext
4+, kerberos, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs
5+, gnutls, libgcrypt, libgpgerror
6+, ncurses, libunwind, libibverbs, librdmacm, systemd
7+
8+, enableKerberos ? false
9+, enableInfiniband ? false
10+, enableLDAP ? false
11+, enablePrinting ? false
12+, enableMDNS ? false
13+, enableDomainController ? false
14+, enableRegedit ? true
15+, enableCephFS ? false
16+, enableGlusterFS ? false
3517}:
3618
37−assert kerberos != null -> zlib != null;
19+with lib;
3820
39−let
40− bundledLibs = if kerberos != null && kerberos.implementation == "heimdal" then "NONE" else "com_err";
41− hasGnutls = gnutls != null && libgcrypt != null && libgpgerror != null;
42− isKrb5OrNull = if kerberos != null && kerberos.implementation == "krb5" then true else null;
43− hasInfinibandOrNull = if libibverbs != null && librdmacm != null then true else null;
44−in
45−with stdenv.lib;
4621stdenv.mkDerivation rec {
4722 name = "samba-4.2.1";
4823
@@ -51,25 +26,26 @@ stdenv.mkDerivation rec {
5126 sha256 = "1hsakc8h6rs48xr6i55m90pd53hpxcqjjnlwq8i2rp0nq4ws5sip";
5227 };
5328
54− patches = [
55− ./4.x-no-persistent-install.patch
56− ./4.x-fix-ctdb-deps.patch
57− ] ++ optional (kerberos != null) ./4.x-heimdal-compat.patch;
58−
59− buildInputs = [
60− python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42
61− docbook_xml_dtd_45 readline talloc ntdb tdb tevent ldb popt iniparser
62− subunit libbsd nss_wrapper socket_wrapper uid_wrapper
63− libarchive
64−
65− kerberos zlib openldap cups pam avahi acl libaio fam libceph glusterfs
66−
67− libiconv gettext
68−
69− gnutls libgcrypt libgpgerror
70−
71− ncurses libunwind dbus libibverbs librdmacm systemd
72− ];
29+ patches =
30+ [ ./4.x-no-persistent-install.patch
31+ ./4.x-fix-ctdb-deps.patch
32+ ] ++ stdenv.lib.optional enableKerberos ./4.x-heimdal-compat.patch;
33+
34+ buildInputs =
35+ [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
36+ docbook_xml_dtd_45 */ readline talloc ntdb tdb tevent ldb popt iniparser
37+ libbsd libarchive zlib acl fam libiconv gettext libunwind
38+ ]
39+ ++ optionals stdenv.isLinux [ libaio pam systemd ]
40+ ++ optional enableKerberos kerberos
41+ ++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
42+ ++ optional enableLDAP openldap
43+ ++ optional (enablePrinting && stdenv.isLinux) cups
44+ ++ optional enableMDNS avahi
45+ ++ optional enableDomainController gnutls
46+ ++ optional enableRegedit ncurses
47+ ++ optional (enableCephFS && stdenv.isLinux) libceph
48+ ++ optional (enableGlusterFS && stdenv.isLinux) glusterfs;
7349
7450 postPatch = ''
7551 # Removes absolute paths in scripts
@@ -79,70 +55,24 @@ stdenv.mkDerivation rec {
7955 sed -i "s,\(XML_CATALOG_FILES=\"\),\1$XML_CATALOG_FILES ,g" buildtools/wafsamba/wafsamba.py
8056 '';
8157
82− enableParallelBuilding = true;
83−
84− configureFlags = [
85− # source3/wscript options
86− (mkWith true "static-modules" "NONE")
87− (mkWith true "shared-modules" "ALL")
88− (mkWith true "winbind" null)
89− (mkWith (openldap != null) "ads" null)
90− (mkWith (openldap != null) "ldap" null)
91− (mkEnable (cups != null) "cups" null)
92− (mkEnable (cups != null) "iprint" null)
93− (mkWith (pam != null) "pam" null)
94− (mkWith (pam != null) "pam_smbpass" null)
95− (mkWith true "quotas" null)
96− (mkWith true "sendfile-support" null)
97− (mkWith true "utmp" null)
98− (mkWith true "utmp" null)
99− (mkEnable true "pthreadpool" null)
100− (mkEnable (avahi != null) "avahi" null)
101− (mkWith true "iconv" null)
102− (mkWith (acl != null) "acl-support" null)
103− (mkWith true "dnsupdate" null)
104− (mkWith true "syslog" null)
105− (mkWith true "automount" null)
106− (mkWith (libaio != null) "aio-support" null)
107− (mkWith (fam != null) "fam" null)
108− (mkWith (libarchive != null) "libarchive" null)
109− (mkWith true "cluster-support" null)
110− (mkWith (ncurses != null) "regedit" null)
111− (mkWith libceph "libcephfs" libceph)
112− (mkEnable (glusterfs != null) "glusterfs" null)
113−
114− # dynconfig/wscript options
115− (mkEnable true "fhs" null)
116− (mkOther "sysconfdir" "/etc")
117− (mkOther "localstatedir" "/var")
118−
119− # buildtools/wafsamba/wscript options
120− (mkOther "bundled-libraries" bundledLibs)
121− (mkOther "private-libraries" "NONE")
122− (mkOther "builtin-libraries" "replace")
123− (mkWith libiconv "libiconv" libiconv)
124− (mkWith (gettext != null) "gettext" gettext)
125−
126− # source4/lib/tls/wscript options
127− (mkEnable hasGnutls "gnutls" null)
58+ configureFlags =
59+ [ "--with-static-modules=NONE"
60+ "--with-shared-modules=ALL"
61+ "--enable-fhs"
62+ "--sysconfdir=/etc"
63+ "--localstatedir=/var"
64+ "--bundled-libraries=${if enableKerberos && kerberos.implementation == "heimdal" then "NONE" else "com_err"}"
65+ "--private-libraries=NONE"
66+ "--builtin-libraries=replace"
67+ ]
68+ ++ optional (enableKerberos != null && kerberos.implementation == "krb5") "--with-system-mitkrb5"
69+ ++ optional (!enableDomainController) "--without-ad-dc"
70+ ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ];
12871
129− # wscript options
130− (mkWith isKrb5OrNull "system-mitkrb5" null)
131− (if hasGnutls then null else "--without-ad-dc")
132−
133− # ctdb/wscript
134− (mkEnable hasInfinibandOrNull "infiniband" null)
135− (mkEnable null "pmda" null)
136− ];
72+ enableParallelBuilding = true;
13773
13874 stripAllList = [ "bin" "sbin" ];
13975
140− postInstall = ''
141− # Remove unecessary components
142− rm -r $out/{lib,share}/ctdb-tests
143− rm $out/bin/ctdb_run{_cluster,}_tests
144− '';
145−
14676 postFixup = ''
14777 export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)"
14878 read -r -d "" SCRIPT << EOF
pkgs/top-level/all-packages.nix+12−40
@@ -8986,15 +8986,7 @@ let
89868986 python = python2;
89878987 kerberos = heimdal;
89888988 gnutls = gnutls33;
8989− cups = if stdenv.isDarwin then null else cups;
8990− pam = if stdenv.isDarwin then null else pam;
8991− libaio = if stdenv.isDarwin then null else libaio;
8992− libceph = if stdenv.isDarwin then null else libceph;
8993− glusterfs = if stdenv.isDarwin then null else glusterfs;
8994− dbus = if stdenv.isLinux then dbus else null;
8995− libibverbs = if stdenv.isLinux then libibverbs else null;
8996− librdmacm = if stdenv.isLinux then librdmacm else null;
8997− systemd = if stdenv.isLinux then systemd else null;
8989+ # enableLDAP
89988990 };
89998991
90008992 samba = samba4;
@@ -9012,39 +9004,19 @@ let
90129004 libunwind = null;
90139005 });
90149006
9015− samba4_light = lowPrio (samba4.override {
9016− # source3/wscript optionals
9017− kerberos = null;
9018− zlib = null;
9019− openldap = null;
9020− cups = null;
9021− pam = null;
9022− avahi = null;
9023− acl = null;
9024− libaio = null;
9025− fam = null;
9026− libceph = null;
9027− glusterfs = null;
9028−
9029− # buildtools/wafsamba/wscript optionals
9030− libiconv = null;
9031− gettext = null;
9032−
9033− # source4/lib/tls/wscript optionals
9034− gnutls = null;
9035− libgcrypt = null;
9036− libgpgerror = null;
9037−
9038− # other optionals
9039− ncurses = null;
9040− libunwind = null;
9041− dbus = null;
9042− libibverbs = null;
9043− librdmacm = null;
9044− systemd = null;
9007+ samba4Full = lowPrio (samba4.override {
9008+ enableKerberos = true;
9009+ enableInfiniband = true;
9010+ enableLDAP = true;
9011+ enablePrinting = true;
9012+ enableMDNS = true;
9013+ enableDomainController = true;
9014+ enableRegedit = true;
9015+ enableCephFS = true;
9016+ enableGlusterFS = true;
90459017 });
90469018
9047− samba_light = samba4_light;
9019+ sambaFull = samba4Full;
90489020
90499021 shairport-sync = callPackage ../servers/shairport-sync { };
90509022