Merge pull request #82509 from Izorkin/samba4

samba: build with profiling enabled
This commit is contained in:
Jan Tojnar 2020-03-29 18:30:41 +02:00 committed by GitHub
commit 22ada10aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 83 additions and 29 deletions

View File

@ -1,18 +1,23 @@
{ stdenv, fetchurl, wafHook, pkgconfig, readline, libxslt { stdenv, fetchurl, pkgconfig
, docbook_xsl, docbook_xml_dtd_42 , wafHook, python3, readline
, libxslt, docbook_xsl, docbook_xml_dtd_45
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "tdb-1.3.18"; name = "tdb-1.4.3";
src = fetchurl { src = fetchurl {
url = "mirror://samba/tdb/${name}.tar.gz"; url = "mirror://samba/tdb/${name}.tar.gz";
sha256 = "1drnsdh1w0px35r0y7l7g59yvyr67mvcsdrli4wab0mwi07b8mn1"; sha256 = "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8";
}; };
nativeBuildInputs = [ pkgconfig wafHook ]; nativeBuildInputs = [
pkgconfig wafHook
libxslt docbook_xsl docbook_xml_dtd_45
];
buildInputs = [ buildInputs = [
readline libxslt docbook_xsl docbook_xml_dtd_42 python3 readline
]; ];
wafPath = "buildtools/bin/waf"; wafPath = "buildtools/bin/waf";

View File

@ -1,22 +1,44 @@
{ lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl, rpcgen { stdenv
, fetchurl
, python
, pkgconfig
, bison
, flex
, perl
, libxslt
, docbook_xsl
, rpcgen
, fixDarwinDylibNames , fixDarwinDylibNames
, docbook_xml_dtd_42, readline , docbook_xml_dtd_45
, popt, iniparser, libbsd, libarchive, libiconv, gettext , readline
, krb5Full, zlib, openldap, cups, pam, avahi, acl, libaio, liburing, fam, libceph, glusterfs , popt
, gnutls, ncurses, libunwind, systemd, jansson, lmdb, gpgme, libuuid , libbsd
, libarchive
, zlib
, liburing
, fam
, gnutls
, libunwind
, systemd
, jansson
, libtasn1
, tdb
, cmocka
, enableLDAP ? false , enableLDAP ? false, openldap
, enablePrinting ? false , enablePrinting ? false, cups
, enableMDNS ? false , enableProfiling ? true
, enableDomainController ? false , enableMDNS ? false, avahi
, enableRegedit ? true , enableDomainController ? false, gpgme, lmdb
, enableCephFS ? false , enableKerberos ? true, krb5Full
, enableGlusterFS ? false , enableRegedit ? true, ncurses
, enableAcl ? (!stdenv.isDarwin) , enableCephFS ? false, libceph
, enablePam ? (!stdenv.isDarwin) , enableGlusterFS ? false, glusterfs, libuuid
, enableAcl ? (!stdenv.isDarwin), acl
, enablePam ? (!stdenv.isDarwin), pam
}: }:
with lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "samba"; pname = "samba";
@ -36,17 +58,40 @@ stdenv.mkDerivation rec {
./4.x-fix-makeflags-parsing.patch ./4.x-fix-makeflags-parsing.patch
]; ];
nativeBuildInputs = [ pkgconfig perl perl.pkgs.ParseYapp libxslt docbook_xsl docbook_xml_dtd_42 ] nativeBuildInputs = [
++ optionals stdenv.isDarwin [ rpcgen fixDarwinDylibNames ]; pkgconfig
bison
flex
perl
perl.pkgs.ParseYapp
libxslt
docbook_xsl
docbook_xml_dtd_45
cmocka
] ++ optionals stdenv.isDarwin [
rpcgen
fixDarwinDylibNames
];
buildInputs = [ buildInputs = [
python readline popt iniparser jansson python
libbsd libarchive zlib fam libiconv gettext libunwind krb5Full gnutls readline
] ++ optionals stdenv.isLinux [ libaio liburing systemd ] popt
jansson
libbsd
libarchive
zlib
fam
libunwind
gnutls
libtasn1
tdb
] ++ optionals stdenv.isLinux [ liburing 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 [ gpgme lmdb ] ++ optionals enableDomainController [ gpgme lmdb ]
++ optional enableKerberos krb5Full
++ optional enableRegedit ncurses ++ optional enableRegedit ncurses
++ optional (enableCephFS && stdenv.isLinux) libceph ++ optional (enableCephFS && stdenv.isLinux) libceph
++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ] ++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ]
@ -66,8 +111,6 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--with-static-modules=NONE" "--with-static-modules=NONE"
"--with-shared-modules=ALL" "--with-shared-modules=ALL"
"--with-system-mitkrb5"
"--with-system-mitkdc" krb5Full
"--enable-fhs" "--enable-fhs"
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
@ -75,7 +118,13 @@ stdenv.mkDerivation rec {
] ++ singleton (if enableDomainController ] ++ singleton (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 enableKerberos [
"--with-system-mitkrb5"
"--with-system-mitkdc=${krb5Full}"
] ++ optionals (!enableLDAP) [
"--without-ldap"
"--without-ads"
] ++ optional enableProfiling "--with-profiling-data"
++ optional (!enableAcl) "--without-acl-support" ++ optional (!enableAcl) "--without-acl-support"
++ optional (!enablePam) "--without-pam"; ++ optional (!enablePam) "--without-pam";