samba: Use /etc/samba as default configuration directory
svn path=/nixpkgs/trunk/; revision=15315
This commit is contained in:
parent
f7454eae9c
commit
8d6fd9cb2b
@ -1,5 +1,15 @@
|
|||||||
{ stdenv, fetchurl, readline, pam, openldap, kerberos, popt
|
{ stdenv, fetchurl, readline, pam, openldap, kerberos, popt
|
||||||
, iniparser, libunwind, fam, acl
|
, iniparser, libunwind, fam, acl
|
||||||
|
|
||||||
|
# Eg. smbclient and smbspool require a smb.conf file.
|
||||||
|
# If you set configDir to "" an empty configuration file
|
||||||
|
# $out/lib/smb.conf is is created for you.
|
||||||
|
#
|
||||||
|
# configDir defaults to "/etc/samba" so that smbpassword picks up
|
||||||
|
# the location of its passwd db files from the system configuration file
|
||||||
|
# /etc/samba/smb.conf. That's why nixos touches /etc/samba/smb.conf even if you
|
||||||
|
# don't enable the samba upstart service.
|
||||||
|
, configDir ? "/etc/samba"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -14,11 +24,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
preConfigure = "cd source";
|
preConfigure = "cd source";
|
||||||
|
|
||||||
# Provide a dummy smb.conf to shut up programs like smbclient and smbspool.
|
postInstall = if configDir == ""
|
||||||
postInstall = ''
|
then "touch $out/lib/smb.conf"
|
||||||
touch $out/lib/smb.conf
|
else "";
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
|
# Don't pass --with-private-dir=/var/samba/private
|
||||||
|
# --with-lockdir=/var/samba/lock
|
||||||
|
# the build system will try to create it.
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
--with-pam
|
--with-pam
|
||||||
--with-cifsmount
|
--with-cifsmount
|
||||||
@ -26,6 +39,7 @@ stdenv.mkDerivation rec {
|
|||||||
--with-pam_smbpass
|
--with-pam_smbpass
|
||||||
--disable-swat
|
--disable-swat
|
||||||
--enable-shared-libs
|
--enable-shared-libs
|
||||||
|
--with-configdir=${configDir}
|
||||||
${if stdenv.gcc.libc != null then "--with-libiconv=${stdenv.gcc.libc}" else ""}
|
${if stdenv.gcc.libc != null then "--with-libiconv=${stdenv.gcc.libc}" else ""}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -4482,7 +4482,7 @@ let
|
|||||||
inherit xmpppy python makeWrapper fetchcvs;
|
inherit xmpppy python makeWrapper fetchcvs;
|
||||||
};
|
};
|
||||||
|
|
||||||
samba = import ../servers/samba {
|
samba = makeOverridable (import ../servers/samba) {
|
||||||
inherit stdenv fetchurl readline openldap pam kerberos popt iniparser
|
inherit stdenv fetchurl readline openldap pam kerberos popt iniparser
|
||||||
libunwind acl fam;
|
libunwind acl fam;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user