Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465956 - net-fs/samba-4.0.4 tries to move ldb modules from nonexistant location
Summary: net-fs/samba-4.0.4 tries to move ldb modules from nonexistant location
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 447022
  Show dependency tree
 
Reported: 2013-04-15 07:52 UTC by Torsten Kurbad
Modified: 2013-07-22 17:11 UTC (History)
4 users (show)

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


Attachments
Patch for sys-libs/ldb-1.1.15.ebuild to correct --with-modulesdir line (ldb-1.1.15-modulesdir.patch,422 bytes, patch)
2013-04-15 07:53 UTC, Torsten Kurbad
Details | Diff
Patch for net-fs/samba-4.0.4 ebuild to correctly move the ldb modules. (samba-4.0.4-move-ldb-modules.patch,498 bytes, patch)
2013-04-15 09:12 UTC, Torsten Kurbad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Kurbad 2013-04-15 07:52:03 UTC
The problem:

To operate on the databases samba 4.0.x creates, the utilities that come with sys-libs/ldb (e.g. ldbsearch) need additional "plugin" modules that are not part of sys-libs/ldb itself.

Per >=net-fs/samba-4.0.0, these modules are installed in '/usr/$(get_libdir)/samba/ldb'.

Additionally, ldb needs its own modules, which are installed in '/usr/$(get_libdir)/ldb/modules/ldb'.

Sadly, the ldb utils can not be given a search path for their modules. Instead, all modules have to reside in the same directory. If they don't, you cannot browse, modify, etc. ldb files or URL's with tools like ldbsearch, ldbdelete, ldbmodify and so on. Instead, you get error messages like:


# ldbsearch -H /var/lib/samba/private/sam.ldb
WARNING: Module [samba_dsdb] not found - do you need to set LDB_MODULES_PATH?
Unable to load modules for /var/lib/samba/private/sam.ldb: (null)
Failed to connect to /var/lib/samba/private/sam.ldb - (null)


Thus, it would be advisable to change the ebuild for sys-libs/ldb according to the attached patch. By doing so, the ldb modules are placed in '/usr/$(get_libdir)/samba/ldb' (note that the 'ldb' path component is appended automatically).

Doing so won't affect ldb uses outside samba, but will make operating on samba's ldb files possible (again).

Best,
Torsten

Reproducible: Always
Comment 1 Torsten Kurbad 2013-04-15 07:53:13 UTC
Created attachment 345596 [details, diff]
Patch for sys-libs/ldb-1.1.15.ebuild to correct --with-modulesdir line
Comment 2 Torsten Kurbad 2013-04-15 09:12:16 UTC
Created attachment 345600 [details, diff]
Patch for net-fs/samba-4.0.4 ebuild to correctly move the ldb modules.

I just found that the problem lies with net-fs/samba:

In the net-fs/samba-4.0.4 ebuild, line 132 is wrong and needs to be changed according to the attached patch.

No changes to the sys-libs/ldb ebuild are necessary.
Comment 3 Rafał Mużyło 2013-04-15 12:42:44 UTC
IMHO, the former explanation was better - see what I've wrote in bug 447022.
Comment 4 Torsten Kurbad 2013-04-15 12:54:02 UTC
(In reply to comment #3)
> IMHO, the former explanation was better - see what I've wrote in bug 447022.

Either way is fine with me. Only want it to be fixed... :-)
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-06-07 12:54:50 UTC
+*ldb-1.1.15-r1 (07 Jun 2013)
+
+  07 Jun 2013; Lars Wendler <polynomial-c@gentoo.org> -ldb-1.1.13.ebuild,
+  -ldb-1.1.14.ebuild, +ldb-1.1.15-r1.ebuild:
+  Non-maintainer commit: Attempt to fix bug #465956. Removed old versions.
+

Please report back if this fixes the problem in combination with samba-4.0.6
Comment 6 Quetzaly Solano Gómez 2013-06-12 01:22:03 UTC
I just wanted to chime in here to let people know that this fix has caused sssd to fail because it can't find its module.  I've opened a separate bug for that issue <https://bugs.gentoo.org/show_bug.cgi?id=473046>.
Comment 7 Rafał Mużyło 2013-06-12 02:33:11 UTC
Well, the problem is all of ldb users need to be kept in sync and again short on people here.
Comment 8 Torsten Kurbad 2013-06-14 11:42:07 UTC
> Please report back if this fixes the problem in combination with samba-4.0.6

Works for me.

Thanks,
Torsten