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.
This commit is contained in:
parent
789f20eba8
commit
0645f5eab7
@ -1,7 +1,7 @@
|
|||||||
# Packages that make up the GNU/Hurd operating system (aka. GNU).
|
# Packages that make up the GNU/Hurd operating system (aka. GNU).
|
||||||
|
|
||||||
args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
|
args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
|
||||||
, texinfo, glibcCross, hurdPartedCross, libuuid, samba_light
|
, texinfo, glibcCross, hurdPartedCross, libuuid, samba
|
||||||
, gccCrossStageStatic, gccCrossStageFinal
|
, gccCrossStageStatic, gccCrossStageFinal
|
||||||
, forceNativeDrv, forceSystem, newScope, platform, config, crossSystem
|
, forceNativeDrv, forceSystem, newScope, platform, config, crossSystem
|
||||||
, overrides ? {} }:
|
, overrides ? {} }:
|
||||||
@ -91,7 +91,6 @@ let
|
|||||||
mig_raw = callPackage ./mig {};
|
mig_raw = callPackage ./mig {};
|
||||||
|
|
||||||
smbfs = callPackage ./smbfs {
|
smbfs = callPackage ./smbfs {
|
||||||
samba = samba_light;
|
|
||||||
hurd = gnu.hurdCross;
|
hurd = gnu.hurdCross;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,48 +1,23 @@
|
|||||||
{ stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl
|
{ lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl
|
||||||
, docbook_xml_dtd_42, docbook_xml_dtd_45, readline, talloc, ntdb, tdb, tevent
|
, docbook_xml_dtd_42, docbook_xml_dtd_45, readline, talloc, ntdb, tdb, tevent
|
||||||
, ldb, popt, iniparser, subunit, libbsd, nss_wrapper, socket_wrapper
|
, ldb, popt, iniparser, libbsd, libarchive, libiconv, gettext
|
||||||
, uid_wrapper, libarchive
|
, kerberos, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs
|
||||||
|
, gnutls, libgcrypt, libgpgerror
|
||||||
|
, ncurses, libunwind, libibverbs, librdmacm, systemd
|
||||||
|
|
||||||
# source3/wscript optionals
|
, enableKerberos ? false
|
||||||
, kerberos ? null
|
, enableInfiniband ? false
|
||||||
, zlib ? null
|
, enableLDAP ? false
|
||||||
, openldap ? null
|
, enablePrinting ? false
|
||||||
, cups ? null
|
, enableMDNS ? false
|
||||||
, pam ? null
|
, enableDomainController ? false
|
||||||
, avahi ? null
|
, enableRegedit ? true
|
||||||
, acl ? null
|
, enableCephFS ? false
|
||||||
, libaio ? null
|
, enableGlusterFS ? false
|
||||||
, fam ? null
|
|
||||||
, libceph ? null
|
|
||||||
, glusterfs ? null
|
|
||||||
|
|
||||||
# buildtools/wafsamba/wscript optionals
|
|
||||||
, libiconv ? null
|
|
||||||
, gettext ? null
|
|
||||||
|
|
||||||
# source4/lib/tls/wscript optionals
|
|
||||||
, gnutls ? null
|
|
||||||
, libgcrypt ? null
|
|
||||||
, libgpgerror ? null
|
|
||||||
|
|
||||||
# other optionals
|
|
||||||
, ncurses ? null
|
|
||||||
, libunwind ? null
|
|
||||||
, dbus ? null
|
|
||||||
, libibverbs ? null
|
|
||||||
, librdmacm ? null
|
|
||||||
, systemd ? null
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert kerberos != null -> zlib != null;
|
with lib;
|
||||||
|
|
||||||
let
|
|
||||||
bundledLibs = if kerberos != null && kerberos.implementation == "heimdal" then "NONE" else "com_err";
|
|
||||||
hasGnutls = gnutls != null && libgcrypt != null && libgpgerror != null;
|
|
||||||
isKrb5OrNull = if kerberos != null && kerberos.implementation == "krb5" then true else null;
|
|
||||||
hasInfinibandOrNull = if libibverbs != null && librdmacm != null then true else null;
|
|
||||||
in
|
|
||||||
with stdenv.lib;
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "samba-4.2.1";
|
name = "samba-4.2.1";
|
||||||
|
|
||||||
@ -51,25 +26,26 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1hsakc8h6rs48xr6i55m90pd53hpxcqjjnlwq8i2rp0nq4ws5sip";
|
sha256 = "1hsakc8h6rs48xr6i55m90pd53hpxcqjjnlwq8i2rp0nq4ws5sip";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches =
|
||||||
./4.x-no-persistent-install.patch
|
[ ./4.x-no-persistent-install.patch
|
||||||
./4.x-fix-ctdb-deps.patch
|
./4.x-fix-ctdb-deps.patch
|
||||||
] ++ optional (kerberos != null) ./4.x-heimdal-compat.patch;
|
] ++ stdenv.lib.optional enableKerberos ./4.x-heimdal-compat.patch;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs =
|
||||||
python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42
|
[ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
|
||||||
docbook_xml_dtd_45 readline talloc ntdb tdb tevent ldb popt iniparser
|
docbook_xml_dtd_45 */ readline talloc ntdb tdb tevent ldb popt iniparser
|
||||||
subunit libbsd nss_wrapper socket_wrapper uid_wrapper
|
libbsd libarchive zlib acl fam libiconv gettext libunwind
|
||||||
libarchive
|
]
|
||||||
|
++ optionals stdenv.isLinux [ libaio pam systemd ]
|
||||||
kerberos zlib openldap cups pam avahi acl libaio fam libceph glusterfs
|
++ optional enableKerberos kerberos
|
||||||
|
++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
|
||||||
libiconv gettext
|
++ optional enableLDAP openldap
|
||||||
|
++ optional (enablePrinting && stdenv.isLinux) cups
|
||||||
gnutls libgcrypt libgpgerror
|
++ optional enableMDNS avahi
|
||||||
|
++ optional enableDomainController gnutls
|
||||||
ncurses libunwind dbus libibverbs librdmacm systemd
|
++ optional enableRegedit ncurses
|
||||||
];
|
++ optional (enableCephFS && stdenv.isLinux) libceph
|
||||||
|
++ optional (enableGlusterFS && stdenv.isLinux) glusterfs;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Removes absolute paths in scripts
|
# Removes absolute paths in scripts
|
||||||
@ -79,70 +55,24 @@ stdenv.mkDerivation rec {
|
|||||||
sed -i "s,\(XML_CATALOG_FILES=\"\),\1$XML_CATALOG_FILES ,g" buildtools/wafsamba/wafsamba.py
|
sed -i "s,\(XML_CATALOG_FILES=\"\),\1$XML_CATALOG_FILES ,g" buildtools/wafsamba/wafsamba.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
configureFlags =
|
||||||
|
[ "--with-static-modules=NONE"
|
||||||
|
"--with-shared-modules=ALL"
|
||||||
|
"--enable-fhs"
|
||||||
|
"--sysconfdir=/etc"
|
||||||
|
"--localstatedir=/var"
|
||||||
|
"--bundled-libraries=${if enableKerberos && kerberos.implementation == "heimdal" then "NONE" else "com_err"}"
|
||||||
|
"--private-libraries=NONE"
|
||||||
|
"--builtin-libraries=replace"
|
||||||
|
]
|
||||||
|
++ optional (enableKerberos != null && kerberos.implementation == "krb5") "--with-system-mitkrb5"
|
||||||
|
++ optional (!enableDomainController) "--without-ad-dc"
|
||||||
|
++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
configureFlags = [
|
|
||||||
# source3/wscript options
|
|
||||||
(mkWith true "static-modules" "NONE")
|
|
||||||
(mkWith true "shared-modules" "ALL")
|
|
||||||
(mkWith true "winbind" null)
|
|
||||||
(mkWith (openldap != null) "ads" null)
|
|
||||||
(mkWith (openldap != null) "ldap" null)
|
|
||||||
(mkEnable (cups != null) "cups" null)
|
|
||||||
(mkEnable (cups != null) "iprint" null)
|
|
||||||
(mkWith (pam != null) "pam" null)
|
|
||||||
(mkWith (pam != null) "pam_smbpass" null)
|
|
||||||
(mkWith true "quotas" null)
|
|
||||||
(mkWith true "sendfile-support" null)
|
|
||||||
(mkWith true "utmp" null)
|
|
||||||
(mkWith true "utmp" null)
|
|
||||||
(mkEnable true "pthreadpool" null)
|
|
||||||
(mkEnable (avahi != null) "avahi" null)
|
|
||||||
(mkWith true "iconv" null)
|
|
||||||
(mkWith (acl != null) "acl-support" null)
|
|
||||||
(mkWith true "dnsupdate" null)
|
|
||||||
(mkWith true "syslog" null)
|
|
||||||
(mkWith true "automount" null)
|
|
||||||
(mkWith (libaio != null) "aio-support" null)
|
|
||||||
(mkWith (fam != null) "fam" null)
|
|
||||||
(mkWith (libarchive != null) "libarchive" null)
|
|
||||||
(mkWith true "cluster-support" null)
|
|
||||||
(mkWith (ncurses != null) "regedit" null)
|
|
||||||
(mkWith libceph "libcephfs" libceph)
|
|
||||||
(mkEnable (glusterfs != null) "glusterfs" null)
|
|
||||||
|
|
||||||
# dynconfig/wscript options
|
|
||||||
(mkEnable true "fhs" null)
|
|
||||||
(mkOther "sysconfdir" "/etc")
|
|
||||||
(mkOther "localstatedir" "/var")
|
|
||||||
|
|
||||||
# buildtools/wafsamba/wscript options
|
|
||||||
(mkOther "bundled-libraries" bundledLibs)
|
|
||||||
(mkOther "private-libraries" "NONE")
|
|
||||||
(mkOther "builtin-libraries" "replace")
|
|
||||||
(mkWith libiconv "libiconv" libiconv)
|
|
||||||
(mkWith (gettext != null) "gettext" gettext)
|
|
||||||
|
|
||||||
# source4/lib/tls/wscript options
|
|
||||||
(mkEnable hasGnutls "gnutls" null)
|
|
||||||
|
|
||||||
# wscript options
|
|
||||||
(mkWith isKrb5OrNull "system-mitkrb5" null)
|
|
||||||
(if hasGnutls then null else "--without-ad-dc")
|
|
||||||
|
|
||||||
# ctdb/wscript
|
|
||||||
(mkEnable hasInfinibandOrNull "infiniband" null)
|
|
||||||
(mkEnable null "pmda" null)
|
|
||||||
];
|
|
||||||
|
|
||||||
stripAllList = [ "bin" "sbin" ];
|
stripAllList = [ "bin" "sbin" ];
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
# Remove unecessary components
|
|
||||||
rm -r $out/{lib,share}/ctdb-tests
|
|
||||||
rm $out/bin/ctdb_run{_cluster,}_tests
|
|
||||||
'';
|
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)"
|
export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)"
|
||||||
read -r -d "" SCRIPT << EOF
|
read -r -d "" SCRIPT << EOF
|
||||||
|
@ -8986,15 +8986,7 @@ let
|
|||||||
python = python2;
|
python = python2;
|
||||||
kerberos = heimdal;
|
kerberos = heimdal;
|
||||||
gnutls = gnutls33;
|
gnutls = gnutls33;
|
||||||
cups = if stdenv.isDarwin then null else cups;
|
# enableLDAP
|
||||||
pam = if stdenv.isDarwin then null else pam;
|
|
||||||
libaio = if stdenv.isDarwin then null else libaio;
|
|
||||||
libceph = if stdenv.isDarwin then null else libceph;
|
|
||||||
glusterfs = if stdenv.isDarwin then null else glusterfs;
|
|
||||||
dbus = if stdenv.isLinux then dbus else null;
|
|
||||||
libibverbs = if stdenv.isLinux then libibverbs else null;
|
|
||||||
librdmacm = if stdenv.isLinux then librdmacm else null;
|
|
||||||
systemd = if stdenv.isLinux then systemd else null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
samba = samba4;
|
samba = samba4;
|
||||||
@ -9012,39 +9004,19 @@ let
|
|||||||
libunwind = null;
|
libunwind = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
samba4_light = lowPrio (samba4.override {
|
samba4Full = lowPrio (samba4.override {
|
||||||
# source3/wscript optionals
|
enableKerberos = true;
|
||||||
kerberos = null;
|
enableInfiniband = true;
|
||||||
zlib = null;
|
enableLDAP = true;
|
||||||
openldap = null;
|
enablePrinting = true;
|
||||||
cups = null;
|
enableMDNS = true;
|
||||||
pam = null;
|
enableDomainController = true;
|
||||||
avahi = null;
|
enableRegedit = true;
|
||||||
acl = null;
|
enableCephFS = true;
|
||||||
libaio = null;
|
enableGlusterFS = true;
|
||||||
fam = null;
|
|
||||||
libceph = null;
|
|
||||||
glusterfs = null;
|
|
||||||
|
|
||||||
# buildtools/wafsamba/wscript optionals
|
|
||||||
libiconv = null;
|
|
||||||
gettext = null;
|
|
||||||
|
|
||||||
# source4/lib/tls/wscript optionals
|
|
||||||
gnutls = null;
|
|
||||||
libgcrypt = null;
|
|
||||||
libgpgerror = null;
|
|
||||||
|
|
||||||
# other optionals
|
|
||||||
ncurses = null;
|
|
||||||
libunwind = null;
|
|
||||||
dbus = null;
|
|
||||||
libibverbs = null;
|
|
||||||
librdmacm = null;
|
|
||||||
systemd = null;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
samba_light = samba4_light;
|
sambaFull = samba4Full;
|
||||||
|
|
||||||
shairport-sync = callPackage ../servers/shairport-sync { };
|
shairport-sync = callPackage ../servers/shairport-sync { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user