Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 563146 - net-fs/samba-4.2.4-r1 - automagic dep/linking on sys-cluster/ceph - libcephfs.so.1
Summary: net-fs/samba-4.2.4-r1 - automagic dep/linking on sys-cluster/ceph - libcephfs...
Status: RESOLVED FIXED
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:
Depends on:
Blocks:
 
Reported: 2015-10-15 14:32 UTC by Ben Kohler
Modified: 2017-10-26 07:53 UTC (History)
3 users (show)

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


Attachments
Ebuild with added USE=ceph. (samba-4.2.14.ebuild.patch,1.25 KB, patch)
2017-01-18 22:39 UTC, Sławomir Nizio
Details | Diff
Patch to make the option --with/without-cephfs take effect. (samba-4.2.14-cephfs-switch-fix.patch,694 bytes, patch)
2017-01-18 22:40 UTC, Sławomir Nizio
Details | Diff
example patch that adds IUSE+=ceph to 4.5.10 (samba-4.5.10.ebuild.patch,1.57 KB, patch)
2017-05-26 17:09 UTC, Sławomir Nizio
Details | Diff
ebuild patch (samba-optional-ceph.patch,1.02 KB, patch)
2017-10-24 16:59 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2015-10-15 14:32:06 UTC
I briefly had sys-cluster/ceph-0.94.3 installed and it seems like the samba build system picked up on it and linked to it.  I noticed when I went to "emerge -cav ceph" that it showed it could safely unmerge (no reverse deps) but then preserve-libs kicked in.


# emerge -cav ceph

Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 sys-cluster/ceph
    selected: 0.94.3 
   protected: none
     omitted: none

All selected packages: =sys-cluster/ceph-0.94.3

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No] y
>>> Unmerging (1 of 1) sys-cluster/ceph-0.94.3...
Packages installed:   1084
Packages in world:    184
Packages in system:   44
Required packages:    1084
Number removed:       1

 * GNU info directory index is up-to-date.

!!! existing preserved libs:
>>> package: sys-cluster/ceph-0.94.3
 *  - /usr/lib64/libcephfs.so.1
 *  - /usr/lib64/libcephfs.so.1.0.0
 *      used by /usr/lib64/samba/vfs/ceph.so (net-fs/samba-4.2.4-r1)
Use emerge @preserved-rebuild to rebuild packages using these libraries
# objdump -p /usr/lib64/samba/vfs/ceph.so | grep NEED
  NEEDED               libpthread.so.0
  NEEDED               libsamba-util.so.0
  NEEDED               libsmbd-base-samba4.so
  NEEDED               libsamba-debug-samba4.so
  NEEDED               libsmbconf.so.0
  NEEDED               libtalloc.so.2
  NEEDED               libcephfs.so.1
  NEEDED               libc.so.6
  VERNEED              0x0000000000001038
  VERNEEDNUM           0x0000000000000007
#
Comment 1 Joost Ruis 2016-06-19 16:25:00 UTC
In addition to this:

# libgfapi.so.0, 2
sys-cluster/glusterfs:0
# libcephfs.so.1, 2
sys-cluster/ceph:0

It also links with libgfapi.so.0 if sys-cluster/glusterfs is installed in the system.
Comment 2 Joost Ruis 2016-06-19 16:26:12 UTC
Forgot to mention that I tested this with net-fs/samba-4.2.12 on an amd64 chroot.
Comment 3 Joost Ruis 2016-06-19 16:35:13 UTC
I had a quick look at the samba 4.2.12 source tarball and did:

./configure --help | grep cluster
  --with-cluster-support
            Build with cluster-support support (default=auto)

In the ebuild we see this:

$(use_with cluster cluster-support)

I think it should be:

$(use_with cluster with-cluster-support)
Comment 4 Joost Ruis 2016-06-19 16:42:19 UTC
My bad. It does seem to be right in the ebuild. Guess the flaw is somewhere in the buildsystem.
Comment 5 Sławomir Nizio 2017-01-18 22:39:41 UTC
Created attachment 460576 [details, diff]
Ebuild with added USE=ceph.

samba-4.2.14-cephfs-switch.patch is https://git.samba.org/?p=samba.git;a=commit;h=38bb993657f8eb6c49899de0d741ed5186ca5022 (not attached)

samba-4.2.14-cephfs-switch-fix.patch is based on https://git.samba.org/?p=samba.git;a=commit;h=14f29c4f560f1b3942245a6fa43924a8ce45d99d
Comment 6 Sławomir Nizio 2017-01-18 22:40:38 UTC
Created attachment 460578 [details, diff]
Patch to make the option --with/without-cephfs take effect.
Comment 7 Sławomir Nizio 2017-01-18 22:42:35 UTC
Attached patches. Only USE=-ceph tested. USE=-ceph leads to /usr/lib64/samba/vfs/ceph.so not being installed. /usr/share/man/man8/vfs_ceph.8.bz2 is still installed but it's upstream build system's thing (I think).
Comment 8 Sławomir Nizio 2017-05-26 16:29:34 UTC
Looks like 4.5.10 finally has the change in the build system and only ebuild needs to be changed. I'll update the patch after testing.
Comment 9 Sławomir Nizio 2017-05-26 17:09:50 UTC
Created attachment 474394 [details, diff]
example patch that adds IUSE+=ceph to 4.5.10

The only change is added support to enabling/disabling ceph support. 4.5.10 was the first version in Gentoo (or at least the first one with the stable keyword) which doesn't need a patch to the build system.
Comment 10 Ben Kohler gentoo-dev 2017-10-24 15:18:05 UTC
I have tested this against 4.7.0-r1.  Works mostly as expected (tested with USE={,-}ceph, with and without ceph installed.

One minor caveat-- if you enable USE=ceph but ceph is still missing (due to --nodeps) or is otherwise broken/unusable, the samba build will succeed with ceph.so not built/installed.

Oh also the vfs_ceph.8 man page is still installed either way.

But even so, this would be a big improvement over the current situation.
Comment 11 Ben Kohler gentoo-dev 2017-10-24 16:59:13 UTC
Created attachment 499940 [details, diff]
ebuild patch

For good measure, here is the ebuild patch I tested with.  Same functionality as the previously attached one, but alpha-sorted & applies cleanly to 4.7.0-r1.

This change will need a local USE desc in metadata.xml as well.
Comment 12 Larry the Git Cow gentoo-dev 2017-10-26 07:53:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3863cb68ebf5709d2549ee278180c615f2288bc9

commit 3863cb68ebf5709d2549ee278180c615f2288bc9
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2017-10-26 07:52:57 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2017-10-26 07:52:57 +0000

    net-fs/samba: Fixed automagic linking against sys-cluster/ceph
    
    Closes: https://bugs.gentoo.org/563146
    Package-Manager: Portage-2.3.12, Repoman-2.3.4

 net-fs/samba/metadata.xml          | 1 +
 net-fs/samba/samba-4.6.9.ebuild    | 5 ++++-
 net-fs/samba/samba-4.7.0-r1.ebuild | 5 ++++-
 3 files changed, 9 insertions(+), 2 deletions(-)