summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2020-09-02 10:50:04 +0200
committerKarolin Seeger <kseeger@samba.org>2020-09-04 12:37:35 +0000
commitbe07e26807bf3c126a0417f16480ed03ed9776aa (patch)
treeeb927333bbddaa7a91d19cf3bf657a4a07dcb7fc
parentdf1ff55deb92827eb502c1857a0039743752c6b3 (diff)
downloadsamba-be07e26807bf3c126a0417f16480ed03ed9776aa.tar.gz
build: toggle vfs_snapper using --with-shared-modules
7ae03a19b3c ("build: add configure option to control vfs_snapper build") added new --enable-snapper and --disable-snapper configure parameters to control whether the vfs_snapper module was built. The new parameters conflicted with existing --with-shared-modules=[!]vfs_snapper behaviour. This change reinstates working --with-shared-modules=[!]vfs_snapper functionality. vfs_snapper stays enabled by default, but only on Linux. Linux systems lacking the dbus library and header files should explicitly disable the module via --with-shared-modules=!vfs_snapper as documented. Bug: https://bugzilla.samba.org/show_bug.cgi?id=14437 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Sep 2 16:24:50 UTC 2020 on sn-devel-184 (cherry picked from commit b6805d5e0bcf1716f87e84bcbb2fd8f93c38a8a3) Autobuild-User(v4-13-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-13-test): Fri Sep 4 12:37:35 UTC 2020 on sn-devel-184
-rw-r--r--source3/wscript27
1 files changed, 12 insertions, 15 deletions
diff --git a/source3/wscript b/source3/wscript
index 5e94c6f6c71..335cfd797f1 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -95,7 +95,6 @@ def options(opt):
opt.samba_add_onoff_option('glusterfs', with_name="enable", without_name="disable", default=True)
opt.samba_add_onoff_option('cephfs', with_name="enable", without_name="disable", default=True)
- opt.samba_add_onoff_option('snapper', with_name="enable", without_name="disable", default=True)
opt.add_option('--enable-vxfs',
help=("enable support for VxFS (default=no)"),
@@ -1774,17 +1773,6 @@ main() {
if Options.options.enable_vxfs:
conf.DEFINE('HAVE_VXFS', '1')
- if Options.options.with_snapper:
- if conf.CHECK_CFG(package='dbus-1', args='--cflags --libs',
- msg='Checking for dbus', uselib_store="DBUS-1"):
- if (conf.CHECK_HEADERS('dbus/dbus.h', lib='dbus-1')
- and conf.CHECK_LIB('dbus-1', shlib=True)):
- conf.DEFINE('HAVE_DBUS', '1')
- else:
- conf.fatal("vfs_snapper is enabled but prerequisite DBUS libraries "
- "or headers not found. Use --disable-snapper to disable "
- "vfs_snapper support.");
-
if conf.CHECK_CFG(package='liburing', args='--cflags --libs',
msg='Checking for liburing package', uselib_store="URING"):
if (conf.CHECK_HEADERS('liburing.h', lib='uring')
@@ -1954,6 +1942,9 @@ main() {
vfs_commit vfs_worm vfs_crossrename vfs_linux_xfs_sgid
vfs_time_audit vfs_offline vfs_virusfilter vfs_widelinks
'''))
+ if host_os.rfind('linux') > -1:
+ default_shared_modules.extend(['vfs_snapper'])
+
default_shared_modules.extend(TO_LIST('idmap_tdb2 idmap_script'))
# these have broken dependencies
forced_shared_modules.extend(TO_LIST('idmap_autorid idmap_rid idmap_hash'))
@@ -2023,9 +2014,6 @@ main() {
if conf.CONFIG_SET('HAVE_VXFS'):
default_shared_modules.extend(TO_LIST('vfs_vxfs'))
- if conf.CONFIG_SET('HAVE_DBUS'):
- default_shared_modules.extend(TO_LIST('vfs_snapper'))
-
explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',')
explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',')
@@ -2146,4 +2134,13 @@ main() {
Logs.info("%s: %s" % (static_env, ','.join(conf.env[static_env])))
Logs.info("%s: %s" % (shared_env, ','.join(conf.env[shared_env])))
+ if (('vfs_snapper' in shared_list.get('vfs', []) or 'vfs_snapper' in static_list.get('vfs', []))
+ and not (conf.CHECK_CFG(package='dbus-1', args='--cflags --libs',
+ msg='Checking for dbus', uselib_store="DBUS-1")
+ and conf.CHECK_HEADERS('dbus/dbus.h', lib='dbus-1')
+ and conf.CHECK_LIB('dbus-1', shlib=True))):
+ conf.fatal("vfs_snapper is enabled but prerequisite dbus-1 package not "
+ "found. Use --with-shared-modules=!vfs_snapper to disable "
+ "vfs_snapper support.")
+
conf.SAMBA_CONFIG_H('include/config.h')