samba4Full: fix build

The pkgconfig requirements for glusterfs-api were not satisfied without
uuid, resulting in Waf not setting the correct API version for glusterfs
during the build and consequently incompatible function calls in samba.

Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
This commit is contained in:
WilliButz 2019-09-13 20:54:14 +02:00
parent 761b3a0640
commit 9378ff1cb5
No known key found for this signature in database
GPG Key ID: 92582A10F1179CB2

View File

@ -3,7 +3,7 @@
, docbook_xml_dtd_42, readline , docbook_xml_dtd_42, readline
, popt, iniparser, libbsd, libarchive, libiconv, gettext , popt, iniparser, libbsd, libarchive, libiconv, gettext
, krb5Full, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs , krb5Full, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs
, gnutls, ncurses, libunwind, systemd, jansson, lmdb, gpgme , gnutls, ncurses, libunwind, systemd, jansson, lmdb, gpgme, libuuid
, enableLDAP ? false , enableLDAP ? false
, enablePrinting ? false , enablePrinting ? false
@ -29,28 +29,27 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "man" ]; outputs = [ "out" "dev" "man" ];
patches = patches = [
[ ./4.x-no-persistent-install.patch ./4.x-no-persistent-install.patch
./patch-source3__libads__kerberos_keytab.c.patch ./patch-source3__libads__kerberos_keytab.c.patch
./4.x-no-persistent-install-dynconfig.patch ./4.x-no-persistent-install-dynconfig.patch
./4.x-fix-makeflags-parsing.patch ./4.x-fix-makeflags-parsing.patch
]; ];
nativeBuildInputs = optionals stdenv.isDarwin [ rpcgen fixDarwinDylibNames ]; nativeBuildInputs = optionals stdenv.isDarwin [ rpcgen fixDarwinDylibNames ];
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 popt iniparser jansson docbook_xml_dtd_45 */ readline popt iniparser jansson
libbsd libarchive zlib fam libiconv gettext libunwind krb5Full libbsd libarchive zlib fam libiconv gettext libunwind krb5Full
] ] ++ optionals stdenv.isLinux [ libaio systemd ]
++ optionals stdenv.isLinux [ libaio systemd ]
++ optional enableLDAP openldap ++ optional enableLDAP openldap
++ optional (enablePrinting && stdenv.isLinux) cups ++ optional (enablePrinting && stdenv.isLinux) cups
++ optional enableMDNS avahi ++ optional enableMDNS avahi
++ optionals enableDomainController [ gnutls gpgme lmdb ] ++ optionals enableDomainController [ gnutls gpgme lmdb ]
++ optional enableRegedit ncurses ++ optional enableRegedit ncurses
++ optional (enableCephFS && stdenv.isLinux) libceph ++ optional (enableCephFS && stdenv.isLinux) libceph
++ optional (enableGlusterFS && stdenv.isLinux) glusterfs ++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ]
++ optional enableAcl acl ++ optional enableAcl acl
++ optional enablePam pam; ++ optional enablePam pam;
@ -67,25 +66,24 @@ stdenv.mkDerivation rec {
--replace "bld.SAMBA_BINARY('resolvconftest'" "True or bld.SAMBA_BINARY('resolvconftest'" --replace "bld.SAMBA_BINARY('resolvconftest'" "True or bld.SAMBA_BINARY('resolvconftest'"
''; '';
configureFlags = configureFlags = [
[ "--with-static-modules=NONE" "--with-static-modules=NONE"
"--with-shared-modules=ALL" "--with-shared-modules=ALL"
"--with-system-mitkrb5" "--with-system-mitkrb5"
"--with-system-mitkdc" krb5Full "--with-system-mitkdc" krb5Full
"--enable-fhs" "--enable-fhs"
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
"--disable-rpath" "--disable-rpath"
] ] ++ singleton (if enableDomainController
++ [(if enableDomainController
then "--with-experimental-mit-ad-dc" then "--with-experimental-mit-ad-dc"
else "--without-ad-dc")] else "--without-ad-dc")
++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ] ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ]
++ optional (!enableAcl) "--without-acl-support" ++ optional (!enableAcl) "--without-acl-support"
++ optional (!enablePam) "--without-pam"; ++ optional (!enablePam) "--without-pam";
preBuild = '' preBuild = ''
export MAKEFLAGS="-j $NIX_BUILD_CORES" export MAKEFLAGS="-j $NIX_BUILD_CORES"
''; '';
# Some libraries don't have /lib/samba in RPATH but need it. # Some libraries don't have /lib/samba in RPATH but need it.
@ -105,7 +103,7 @@ stdenv.mkDerivation rec {
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.samba.org/; homepage = "https://www.samba.org";
description = "The standard Windows interoperability suite of programs for Linux and Unix"; description = "The standard Windows interoperability suite of programs for Linux and Unix";
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.unix; platforms = platforms.unix;