# tell waf to install the right binary
bld.install_as(os.path.join(install_path, orig_target),
os.path.join(self.path.abspath(bld.env), self.target),
- chmod=0755)
+ chmod=MODE_755)
LIB_PATH="shared"
+# sigh, python octal constants are a mess
+MODE_644 = int('644', 8)
+MODE_755 = int('755', 8)
+
@conf
def SET_TARGET_TYPE(ctx, target, value):
'''set the target type of a target'''
value = split_line[1].strip('"')
version_dict[split_line[0]] = value
except:
- print "Failed to parse line %s from %s" % (line, version_file)
+ print("Failed to parse line %s from %s" % (line, version_file))
raise
super(samba_version_file, self).__init__(version_dict, have_git=have_git)
Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
-def install_file(bld, destdir, file, chmod=0644, flat=False,
+def install_file(bld, destdir, file, chmod=MODE_644, flat=False,
python_fixup=False, destname=None, base_name=None):
'''install a file'''
destdir = bld.EXPAND_VARIABLES(destdir)
bld.install_as(dest, file, chmod=chmod)
-def INSTALL_FILES(bld, destdir, files, chmod=0644, flat=False,
+def INSTALL_FILES(bld, destdir, files, chmod=MODE_644, flat=False,
python_fixup=False, destname=None, base_name=None):
'''install a set of files'''
for f in TO_LIST(files):
Build.BuildContext.INSTALL_FILES = INSTALL_FILES
-def INSTALL_WILDCARD(bld, destdir, pattern, chmod=0644, flat=False,
+def INSTALL_WILDCARD(bld, destdir, pattern, chmod=MODE_644, flat=False,
python_fixup=False, exclude=None, trim_path=None):
'''install a set of files matching a wildcard pattern'''
files=TO_LIST(bld.path.ant_glob(pattern))
#!/usr/bin/env python
import os
+from samba_utils import MODE_755
def set_options(opt):
opt.tool_options('perl')
conf.find_program('pod2man', var='POD2MAN')
def build(bld):
- bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=0755)
+ bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=MODE_755)
bld.RECURSE('lib')
#!/usr/bin/env python
+from samba_utils import MODE_755
+
bld.INSTALL_FILES('${SBINDIR}','bin/upgradeprovision bin/samba_dnsupdate bin/samba_spnupdate',
- chmod=0755, python_fixup=True, flat=True)
+ chmod=MODE_755, python_fixup=True, flat=True)
bld.INSTALL_FILES('${BINDIR}','bin/testparm',
- chmod=0755, python_fixup=True, flat=True)
-
+ chmod=MODE_755, python_fixup=True, flat=True)
#!/usr/bin/env python
+from samba_utils import MODE_755
+
bld.INSTALL_WILDCARD('${SETUPDIR}', 'ad-schema/*.txt')
bld.INSTALL_WILDCARD('${SETUPDIR}', 'display-specifiers/*.txt')
-bld.INSTALL_FILES('${SBINDIR}', 'provision', chmod=0755, python_fixup=True)
+bld.INSTALL_FILES('${SBINDIR}', 'provision', chmod=MODE_755, python_fixup=True)
bld.INSTALL_FILES('${SETUPDIR}', 'dns_update_list')
bld.INSTALL_FILES('${SETUPDIR}', 'spn_update_list')