mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
s4-dynconfig: override more paths when running from the build directory
this ensures consistency between binaries and scripts when testing as a developer
This commit is contained in:
parent
5d014cad08
commit
93d311c07e
@ -66,6 +66,7 @@ const char *dyn_##name = name; \
|
||||
|
||||
/* these are in common with s3 */
|
||||
DEFINE_DYN_CONFIG_PARAM(SBINDIR)
|
||||
DEFINE_DYN_CONFIG_PARAM(SCRIPTSBINDIR)
|
||||
DEFINE_DYN_CONFIG_PARAM(BINDIR)
|
||||
DEFINE_DYN_CONFIG_PARAM(SWATDIR)
|
||||
DEFINE_DYN_CONFIG_PARAM(CONFIGFILE) /**< Location of smb.conf file. **/
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
extern const char *dyn_BINDIR;
|
||||
extern const char *dyn_SBINDIR;
|
||||
extern const char *dyn_SCRIPTSBINDIR;
|
||||
extern const char *dyn_CONFIGFILE;
|
||||
extern const char *dyn_NCALRPCDIR;
|
||||
extern const char *dyn_LOGFILEBASE;
|
||||
|
@ -17,6 +17,7 @@ dir_options = {
|
||||
dyn_cflags = {
|
||||
'BINDIR' : '${BINDIR}',
|
||||
'SBINDIR' : '${SBINDIR}',
|
||||
'SCRIPTSBINDIR' : '${SBINDIR}',
|
||||
'CONFIGDIR' : '${SYSCONFDIR}',
|
||||
'CONFIGFILE' : '${SYSCONFDIR}/smb.conf',
|
||||
'LMHOSTSFILE' : '${SYSCONFDIR}/lmhosts',
|
||||
@ -47,6 +48,7 @@ dyn_cflags = {
|
||||
dyn_cflags_fhs = {
|
||||
'BINDIR' : '${BINDIR}',
|
||||
'SBINDIR' : '${SBINDIR}',
|
||||
'SCRIPTSBINDIR' : '${SBINDIR}',
|
||||
'CONFIGDIR' : '${SYSCONFDIR}/samba',
|
||||
'CONFIGFILE' : '${SYSCONFDIR}/samba/smb.conf',
|
||||
'LMHOSTSFILE' : '${SYSCONFDIR}/samba/lmhosts',
|
||||
@ -119,15 +121,18 @@ def configure(conf):
|
||||
def dynconfig_cflags(bld, list=None):
|
||||
'''work out the extra CFLAGS for dynconfig.c'''
|
||||
cflags = []
|
||||
# override some paths when running from the build directory
|
||||
override = { 'MODULESDIR' : 'bin/modules',
|
||||
'SCRIPTSBINDIR' : 'scripting/bin',
|
||||
'SETUPDIR' : 'setup' }
|
||||
for f in dyn_cflags.keys():
|
||||
if list and not f in list:
|
||||
continue
|
||||
if not Options.is_install and f == 'MODULESDIR':
|
||||
# we want binaries run from the source dir to use the current
|
||||
# modules, not the installed ones
|
||||
cflags.append('-DMODULESDIR="%s"' % os.path.join(os.getcwd(), 'bin/modules'))
|
||||
else:
|
||||
cflags.append('-D%s="%s"' % (f, bld.env[f]))
|
||||
value = bld.env[f]
|
||||
if not Options.is_install:
|
||||
if f in override:
|
||||
value = os.path.join(os.getcwd(), override[f])
|
||||
cflags.append('-D%s="%s"' % (f, value))
|
||||
return cflags
|
||||
Build.BuildContext.dynconfig_cflags = dynconfig_cflags
|
||||
|
||||
|
@ -2456,14 +2456,14 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
|
||||
lpcfg_do_global_parameter(lp_ctx, "tls certfile", "tls/cert.pem");
|
||||
lpcfg_do_global_parameter(lp_ctx, "tls cafile", "tls/ca.pem");
|
||||
lpcfg_do_global_parameter_var(lp_ctx, "setup directory", "%s",
|
||||
dyn_SETUPDIR);
|
||||
dyn_SETUPDIR);
|
||||
|
||||
lpcfg_do_global_parameter(lp_ctx, "prefork children:smb", "4");
|
||||
|
||||
lpcfg_do_global_parameter(lp_ctx, "ntp signd socket directory", dyn_NTP_SIGND_SOCKET_DIR);
|
||||
lpcfg_do_global_parameter(lp_ctx, "rndc command", "/usr/sbin/rndc");
|
||||
lpcfg_do_global_parameter_var(lp_ctx, "dns update command", "%s/samba_dnsupdate", dyn_SBINDIR);
|
||||
lpcfg_do_global_parameter_var(lp_ctx, "spn update command", "%s/samba_spnupdate", dyn_SBINDIR);
|
||||
lpcfg_do_global_parameter_var(lp_ctx, "dns update command", "%s/samba_dnsupdate", dyn_SCRIPTSBINDIR);
|
||||
lpcfg_do_global_parameter_var(lp_ctx, "spn update command", "%s/samba_spnupdate", dyn_SCRIPTSBINDIR);
|
||||
lpcfg_do_global_parameter(lp_ctx, "nsupdate command", "/usr/bin/nsupdate -g");
|
||||
|
||||
for (i = 0; parm_table[i].label; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user