Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703466 - net-fs/samba-4.8.6-r2: glusterfs automagic
Summary: net-fs/samba-4.8.6-r2: glusterfs automagic
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-12-21 09:17 UTC by Tomáš Mózes
Modified: 2022-08-19 08:00 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.bz2 (build.log.bz2,66.50 KB, application/x-bzip)
2019-12-21 09:18 UTC, Tomáš Mózes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomáš Mózes 2019-12-21 09:17:50 UTC
Samba fails to build when sys-cluster/glusterfs-6.1 is installed.
Comment 1 Tomáš Mózes 2019-12-21 09:18:18 UTC
Created attachment 600270 [details]
build.log.bz2
Comment 2 Tomáš Mózes 2019-12-21 09:20:36 UTC
net-fs/samba-4.8.6-r2::gentoo was built with the following:
USE="acl ldap pam quota syslog system-mitkrb5 winbind -addc -addns -ads -ceph -client -cluster -cups -debug (-dmapi) (-fam) -gnutls -gpg -iprint -python (-selinux) (-system-heimdal) -systemd -test -zeroconf" ABI_X86="(64) -32 (-x32)" PYTH
ON_TARGETS="python2_7"
FEATURES="merge-sync ebuild-locks distlocks assume-digests sfperms fixlafiles usersandbox preserve-libs parallel-fetch news unknown-features-warn binpkg-logs userpriv unmerge-logs sandbox unmerge-orphans usersync xattr multilib-strict pro
tect-owned userfetch config-protect-if-modified strict"


...
Checking for glusterfs-api >= 4                                                                 : yes 
Checking for header glusterfs/api/glfs.h                                                        : yes 
Checking for library gfapi                                                                      : yes 
Checking for glusterfs-api >= 6                                                                 : yes 
...
VFS_SHARED: vfs_recycle,vfs_audit,vfs_extd_audit,vfs_full_audit,vfs_netatalk,vfs_fake_perms,vfs_default_quota,vfs_readonly,vfs_cap,vfs_expand_msdfs,vfs_shadow_copy,vfs_shadow_copy2,vfs_readahead,vfs_xattr_tdb,vfs_streams_xattr,vfs_streams
_depot,vfs_acl_xattr,vfs_acl_tdb,vfs_preopen,vfs_catia,vfs_media_harmony,vfs_unityed_media,vfs_fruit,vfs_shell_snap,vfs_commit,vfs_worm,vfs_crossrename,vfs_linux_xfs_sgid,vfs_time_audit,vfs_offline,vfs_virusfilter,vfs_syncops,vfs_dirsort,
vfs_fileid,vfs_aio_fork,vfs_aio_pthread,vfs_btrfs,vfs_glusterfs
...
In file included from ../source3/modules/vfs_glusterfs.c:41:
/usr/include/glusterfs/api/glfs.h:728:42: note: expected 'glfs_io_cbk' {aka 'void (*)(struct glfs_fd *, long int,  struct glfs_stat *, struct glfs_stat *, void *)'} but argument is of type 'void (*)(glfs_fd_t *, ssize_t,  void *)' {aka 'v
oid (*)(struct glfs_fd *, long int,  void *)'}
  728 |                   int flags, glfs_io_cbk fn, void *data) __THROW
      |                              ~~~~~~~~~~~~^~
../source3/modules/vfs_glusterfs.c: In function 'vfs_gluster_pwrite':
../source3/modules/vfs_glusterfs.c:900:9: error: too few arguments to function 'glfs_pwrite'
  900 |  return glfs_pwrite(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle, fsp), data, n, offset, 0);
      |         ^~~~~~~~~~~
In file included from ../source3/modules/vfs_glusterfs.c:41:
/usr/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':
../source3/modules/vfs_glusterfs.c:937:9: error: too few arguments to function 'glfs_fsync'
  937 |  return glfs_fsync(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle, fsp));
      |         ^~~~~~~~~~
In file included from ../source3/modules/vfs_glusterfs.c:41:
/usr/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_fsync_send':
../source3/modules/vfs_glusterfs.c:964:11: warning: passing argument 2 of 'glfs_fsync_async' from incompatible pointer type [-Wincompatible-pointer-types]
  964 |     fsp), aio_glusterfs_done, state);
      |           ^~~~~~~~~~~~~~~~~~
      |           |
      |           void (*)(glfs_fd_t *, ssize_t,  void *) {aka void (*)(struct glfs_fd *, long int,  void *)}
In file included from ../source3/modules/vfs_glusterfs.c:41:
/usr/include/glusterfs/api/glfs.h:794:45: note: expected 'glfs_io_cbk' {aka 'void (*)(struct glfs_fd *, long int,  struct glfs_stat *, struct glfs_stat *, void *)'} but argument is of type 'void (*)(glfs_fd_t *, ssize_t,  void *)' {aka 'v
oid (*)(struct glfs_fd *, long int,  void *)'}
  794 | glfs_fsync_async(glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW
      |                                 ~~~~~~~~~~~~^~
../source3/modules/vfs_glusterfs.c: In function 'vfs_gluster_ftruncate':
../source3/modules/vfs_glusterfs.c:1147:9: error: too few arguments to function 'glfs_ftruncate'
 1147 |  return glfs_ftruncate(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle, fsp), offset);
      |         ^~~~~~~~~~~~~~
In file included from ../source3/modules/vfs_glusterfs.c:41:
/usr/include/glusterfs/api/glfs.h:768:1: note: declared here
  768 | glfs_ftruncate(glfs_fd_t *fd, off_t length, struct glfs_stat *prestat,
      | ^~~~~~~~~~~~~~
In file included from ../lib/replace/system/filesys.h:126,
                 from ../source3/modules/vfs_worm.c:22:
/usr/include/attr/xattr.h:5:2: warning: #warning "Please change your <attr/xattr.h> includes to <sys/xattr.h>" [-Wcpp]
    5 | #warning "Please change your <attr/xattr.h> includes to <sys/xattr.h>"
      |  ^~~~~~~
Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.8.6-r2/work/samba-4.8.6-abi_x86_64.amd64/bin'
Build failed:  -> task failed (err #1): 
        {task: cc vfs_glusterfs.c -> vfs_glusterfs_86.o}
 * ERROR: net-fs/samba-4.8.6-r2::gentoo failed (compile phase):
 *   build failed
Comment 3 Tomáš Mózes 2019-12-21 09:26:50 UTC
There is a configure option in Samba:
  --enable-glusterfs
    Build with glusterfs support (default=yes)
Comment 4 seenxu 2020-01-30 16:01:50 UTC
I can confirm this bug, fail to build =net-fs/samba-4.8.6-r2 and has =sys-cluster/glusterfs-7.2 installed in the system.
Comment 5 Jaco Kroon 2022-08-18 15:34:38 UTC
Can this still be reproduced with the lastest glusterfs versions please?

I've got both glusterfs and samba installed on my laptop without problems.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 15:45:19 UTC
(In reply to Jaco Kroon from comment #5)
> Can this still be reproduced with the lastest glusterfs versions please?
> 
> I've got both glusterfs and samba installed on my laptop without problems.

Is the automagic part gone?
Comment 7 Ben Kohler gentoo-dev 2022-08-18 15:50:18 UTC
I think this probably got fixed when samba gained IUSE=glusterfs to explicitly enable or disable support
Comment 8 Jaco Kroon 2022-08-19 08:00:37 UTC
As far as I can tell, from samba with USE=-glusterfs (which says Enable support for Glusterfs filesystem via sys-cluster/glusterfs) the following glusterfs related files are still installed by samba:

/usr/lib/samba/vfs/glusterfs_fuse.so
/usr/lib64/samba/vfs/glusterfs_fuse.so

Neither of these has any files that cross-links to glusterfs installed files that I can find, but this is the case even with USE=glusterfs.  This seems to just sort some file id issues from the man page and should be used if you're exporting paths via samba that's mounted via fuse onto glusterfs, so it makes sense that these won't link libgfapi directly.

USE=glusterfs does additonally install:


/usr/lib64/samba/vfs/glusterfs.so

which DOES link libgfapi and thus should add an RDEPEND on sys-cluster/glusterfs which I cannot find in the ebuilds.  So need to add to RDEPEND:

glusterfs? ( sys-cluster/glusterfs )

No need for multilib support on glusterfs side since the vfs_glusterfs module is enabled for the native samba portions only (why is glusterfs_fuse enabled for both ABIs?)

And actually, thanks, this potentially just made progress for us w.r.t. a problem we're seeing on some production systems.