From 282a4d554e2cc45086151a51a1f8e66cf0b7ad62 Mon Sep 17 00:00:00 2001 From: Maxine Aubrey Date: Mon, 31 May 2021 18:41:25 +0200 Subject: [PATCH 1/2] samba: add missing python dependencies for ldap and domain controller (cherry picked from commit b760ab8cfbac9894b8b8e472c2810f8d4ea60b91) --- pkgs/servers/samba/4.x.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index 7beaeb20943..3ae30699546 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -26,6 +26,7 @@ , tdb , cmocka , rpcsvc-proto +, python3Packages , nixosTests , enableLDAP ? false, openldap @@ -91,10 +92,10 @@ stdenv.mkDerivation rec { libtasn1 tdb ] ++ optionals stdenv.isLinux [ liburing systemd ] - ++ optional enableLDAP openldap + ++ optionals enableLDAP [ openldap.dev python3Packages.markdown ] ++ optional (enablePrinting && stdenv.isLinux) cups ++ optional enableMDNS avahi - ++ optionals enableDomainController [ gpgme lmdb ] + ++ optionals enableDomainController [ gpgme lmdb python3Packages.dnspython ] ++ optional enableRegedit ncurses ++ optional (enableCephFS && stdenv.isLinux) libceph ++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ] From 58bf12dbbf03aaa74ade3162e924eb40d464d9d5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 3 Jun 2021 04:34:04 +0200 Subject: [PATCH 2/2] samba4Full: disable glusterfs support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The samba package was marked as broken, when enableGlusterFS is true. The samba build with glusterfs fails due to API breakage that I am unable to debug: [3562/4088] Compiling source3/modules/vfs_virusfilter.c ../../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pread’: ../../source3/modules/vfs_glusterfs.c:856:8: error: too few arguments to function ‘glfs_pread’ 856 | ret = glfs_pread(glfd, data, n, offset, 0); | ^~~~~~~~~~ In file included from ../../source3/modules/vfs_glusterfs.c:41: /nix/store/0gzaf6fqgfxfns19zlc07dyjqigj7ak7-glusterfs-9.0/include/glusterfs/api/glfs.h:713:1: note: declared here 713 | glfs_pread(glfs_fd_t *fd, void *buf, size_t count, off_t offset, int flags, | ^~~~~~~~~~ ../../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pread_do’: ../../source3/modules/vfs_glusterfs.c:938:16: error: too few arguments to function ‘glfs_pread’ 938 | state->ret = glfs_pread(state->fd, state->buf, state->count, | ^~~~~~~~~~ In file included from ../../source3/modules/vfs_glusterfs.c:41: /nix/store/0gzaf6fqgfxfns19zlc07dyjqigj7ak7-glusterfs-9.0/include/glusterfs/api/glfs.h:713:1: note: declared here 713 | glfs_pread(glfs_fd_t *fd, void *buf, size_t count, off_t offset, int flags, | ^~~~~~~~~~ ../../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pwrite_do’: ../../source3/modules/vfs_glusterfs.c:1077:16: error: too few arguments to function ‘glfs_pwrite’ 1077 | state->ret = glfs_pwrite(state->fd, state->buf, state->count, | ^~~~~~~~~~~ In file included from ../../source3/modules/vfs_glusterfs.c:41: /nix/store/0gzaf6fqgfxfns19zlc07dyjqigj7ak7-glusterfs-9.0/include/glusterfs/api/glfs.h:717:1: note: declared here 717 | glfs_pwrite(glfs_fd_t *fd, const void *buf, size_t count, off_t offset, | ^~~~~~~~~~~ ../../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_pwrite’: ../../source3/modules/vfs_glusterfs.c:1161:8: error: too few arguments to function ‘glfs_pwrite’ 1161 | ret = glfs_pwrite(glfd, data, n, offset, 0); | ^~~~~~~~~~~ In file included from ../../source3/modules/vfs_glusterfs.c:41: /nix/store/0gzaf6fqgfxfns19zlc07dyjqigj7ak7-glusterfs-9.0/include/glusterfs/api/glfs.h:717:1: note: declared here 717 | glfs_pwrite(glfs_fd_t *fd, const void *buf, size_t count, off_t offset, | ^~~~~~~~~~~ ../../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_fsync_do’: ../../source3/modules/vfs_glusterfs.c:1287:16: error: too few arguments to function ‘glfs_fsync’ 1287 | state->ret = glfs_fsync(state->fd); | ^~~~~~~~~~ In file included from ../../source3/modules/vfs_glusterfs.c:41: /nix/store/0gzaf6fqgfxfns19zlc07dyjqigj7ak7-glusterfs-9.0/include/glusterfs/api/glfs.h:790:1: note: declared here 790 | glfs_fsync(glfs_fd_t *fd, struct glfs_stat *prestat, | ^~~~~~~~~~ ../../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_ftruncate’: ../../source3/modules/vfs_glusterfs.c:1621:8: error: too few arguments to function ‘glfs_ftruncate’ 1621 | ret = glfs_ftruncate(glfd, offset); | ^~~~~~~~~~~~~~ In file included from ../../source3/modules/vfs_glusterfs.c:41: /nix/store/0gzaf6fqgfxfns19zlc07dyjqigj7ak7-glusterfs-9.0/include/glusterfs/api/glfs.h:768:1: note: declared here 768 | glfs_ftruncate(glfs_fd_t *fd, off_t length, struct glfs_stat *prestat, | ^~~~~~~~~~~~~~ ../../source3/modules/vfs_virusfilter.c: In function ‘quarantine_create_dir’: ../../source3/modules/vfs_virusfilter.c:132:13: warning: implicit declaration of function ‘strlcat’; did you mean ‘strncat’? [-Wimplicit-function-declaration] 132 | cat_len = strlcat(new_dir, "/", len + 1); | ^~~~~~~ | strncat Waf: Leaving directory `/build/samba-4.14.4/bin/default' Build failed -> task in 'vfs_glusterfs.objlist' failed with exit status 1 (run with -v to display more information) (cherry picked from commit fac761a55ad4d6c6a8498c468ec7e5c43b984264) --- pkgs/top-level/all-packages.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 59ccdefe724..0fbbc9b5633 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19680,7 +19680,6 @@ in enableDomainController = true; enableRegedit = true; enableCephFS = !pkgs.stdenv.hostPlatform.isAarch64; - enableGlusterFS = true; }); sambaFull = samba4Full;