[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Thu Aug 24 07:30:03 UTC 2017
The branch, master has been updated
via 3a719dc dynconfig: Use INSTALL_DIR to create directories
via 4311332 wafsamba: Call INSTALL_DIR in INSTALL_DIRS
via 59dc9eb wafsamba: Add INSTALL_DIR function
from a475e1c tdb: Use posix_fallocate
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3a719dc68c80fe28f8fc6eb1bed3eb3e581a86da
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 10 11:42:46 2017 +0200
dynconfig: Use INSTALL_DIR to create directories
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12957
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Thu Aug 24 09:29:05 CEST 2017 on sn-devel-144
commit 4311332a073787f4ca24cd0b89685632cb29134c
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 10 11:40:06 2017 +0200
wafsamba: Call INSTALL_DIR in INSTALL_DIRS
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12957
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 59dc9eb776551ee73cc11e1c1215b311d5299d4d
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 10 11:36:52 2017 +0200
wafsamba: Add INSTALL_DIR function
The install_dir function in waf has been deprecated and it doesn't
support setting directory permissions. So we need to implement our own
function anyway.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12957
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/wafsamba.py | 22 ++++++++++++++++++++--
dynconfig/wscript | 9 ++++++---
2 files changed, 26 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 1bdabf6..57913af 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -885,13 +885,31 @@ def INSTALL_WILDCARD(bld, destdir, pattern, chmod=MODE_644, flat=False,
python_fixup=python_fixup, base_name=trim_path)
Build.BuildContext.INSTALL_WILDCARD = INSTALL_WILDCARD
+def INSTALL_DIR(bld, path, chmod=0o755):
+ """Install a directory if it doesn't exist, always set permissions."""
-def INSTALL_DIRS(bld, destdir, dirs):
+ if not path:
+ return []
+
+ if bld.is_install > 0:
+ path = bld.EXPAND_VARIABLES(path)
+ if not os.path.isdir(path):
+ try:
+ os.makedirs(path)
+ os.chmod(path, chmod)
+ except OSError, e:
+ if not os.path.isdir(path):
+ raise Utils.WafError("Cannot create the folder '%s' (error: %s)" % (path, e))
+ else:
+ os.chmod(path, chmod)
+Build.BuildContext.INSTALL_DIR = INSTALL_DIR
+
+def INSTALL_DIRS(bld, destdir, dirs, chmod=0o755):
'''install a set of directories'''
destdir = bld.EXPAND_VARIABLES(destdir)
dirs = bld.EXPAND_VARIABLES(dirs)
for d in TO_LIST(dirs):
- bld.install_dir(os.path.join(destdir, d))
+ INSTALL_DIR(bld, os.path.join(destdir, d), chmod)
Build.BuildContext.INSTALL_DIRS = INSTALL_DIRS
diff --git a/dynconfig/wscript b/dynconfig/wscript
index 4eaa4c0..7e9bde9 100644
--- a/dynconfig/wscript
+++ b/dynconfig/wscript
@@ -415,9 +415,12 @@ def build(bld):
cflags=cflags)
# install some extra empty directories
- bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}");
- bld.INSTALL_DIRS("", "${PRIVATE_DIR} ${PRIVILEGED_SOCKET_DIR}")
- bld.INSTALL_DIRS("", "${STATEDIR} ${CACHEDIR}");
+ bld.INSTALL_DIR("${CONFIGDIR}")
+ bld.INSTALL_DIR("${LOGFILEBASE}")
+ bld.INSTALL_DIR("${PRIVILEGED_SOCKET_DIR}")
+ bld.INSTALL_DIR("${PRIVATE_DIR}")
+ bld.INSTALL_DIR("${STATEDIR}")
+ bld.INSTALL_DIR("${CACHEDIR}")
# these might be on non persistent storage
bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}")
--
Samba Shared Repository
More information about the samba-cvs
mailing list