source3/wscript: Announce deprecation of old Ceph version support
authorAnoop C S <anoopcs@samba.org>
Thu, 25 Jan 2024 17:26:26 +0000 (22:56 +0530)
committerGünther Deschner <gd@samba.org>
Fri, 26 Jan 2024 15:53:33 +0000 (15:53 +0000)
*at() variants for various libcephfs APIs were added with Ceph v17.x.
Any other version less than v17.x is soon to be considered EOL[1] which
we will now indicate with the help of a warning message during configure
time. Going further such a situation will result in disabling the module
altogether with the next major Samba version after v4.20.

[1] https://docs.ceph.com/en/latest/releases/#ceph-releases-index

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/wscript

index 12394ef84b162c5951f1bed7f53667dc163ad240..060e8d3ffe0e7b56f7f64d267b5755cb5bf8e9c5 100644 (file)
@@ -1679,16 +1679,19 @@ int main(void) {
             conf.DEFINE('HAVE_CEPH', '1')
             conf.CHECK_FUNCS_IN('ceph_select_filesystem', 'cephfs',
                                 headers='cephfs/libcephfs.h')
-            conf.CHECK_FUNCS_IN('ceph_mkdirat', 'cephfs',
-                                headers='cephfs/libcephfs.h')
-            conf.CHECK_FUNCS_IN('ceph_openat', 'cephfs',
-                                headers='cephfs/libcephfs.h')
-            conf.CHECK_FUNCS_IN('ceph_unlinkat', 'cephfs',
-                                headers='cephfs/libcephfs.h')
-            conf.CHECK_FUNCS_IN('ceph_symlinkat', 'cephfs',
-                                headers='cephfs/libcephfs.h')
-            conf.CHECK_FUNCS_IN('ceph_readlinkat', 'cephfs',
-                                headers='cephfs/libcephfs.h')
+            conf.DEFINE('HAVE_MANDATORY_CEPH_API', '1')
+            for api in ['ceph_mkdirat', 'ceph_openat', 'ceph_unlinkat',
+                        'ceph_symlinkat', 'ceph_readlinkat']:
+                if not conf.CHECK_FUNCS_IN(api, 'cephfs',
+                                           headers='cephfs/libcephfs.h'):
+                    conf.undefine('HAVE_MANDATORY_CEPH_API')
+            if not conf.env.HAVE_MANDATORY_CEPH_API:
+                Logs.warn("Installed Ceph version support is at the verge of "
+                          "deprecation due to the absence of some mandatory "
+                          "libcephfs APIs. This warning there shall result in "
+                          "disabling the Ceph VFS module altogether with the "
+                          "next major Samba version. It is highly recommended "
+                          "to update to a more recent/active version of Ceph.")
         else:
             Logs.warn('''Ceph support disabled due to --without-acl-support
                       or lack of ceph_statx support''')