Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 491002

Summary: =net-fs/samba-4.1.0-r1 deletes /etc/openldap/schema/samba.schema breaking compatibility
Product: Gentoo Linux Reporter: Huemi <gentoobugs>
Component: [OLD] ServerAssignee: Gentoo's SAMBA Team <samba>
Severity: normal CC: dcmwai, Florian.Steinel
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 489762    
Attachments: Samba schema file
Ebuild Patch
Ebuild Patch

Description Huemi 2013-11-11 09:17:20 UTC
=net-fs/samba-4.1.0-r1 ebuild seems not to provide samba.schema for openldap causing it to be deleted during install.

Reproducible: Always

Steps to Reproduce:
Install =net-fs/samba-3.6.x packages and configure them to work with openldap (in fact you would only need to check if the samba.schema exists). When everything works fine, try to upgrade to =net-fs/samba-4.1.0-r1. 
Then try /etc/init.d/slapd restart (or check what has happened to the samba.schema file)

Actual Results:  
slapd can't be started because samba.schema has been deleted.

Expected Results:  
The ebuild claims that I can expect samba-4.1.0-r1 to upgrade without breaking things (and without need to migrate to Samba's AD support now). So the samba.schema should be left where it is (or be copied from the running system into the ebuilds working environment, so that it is copied back during install).

"Be aware the this release contains the best of all of Samba's technology parts, both a file server (that you can reasonably expect to upgrade existing Samba 3.x releases to) ..."
Comment 1 Huemi 2013-11-12 14:42:51 UTC
Created attachment 363120 [details]
Samba schema file

Samba schema file from examples/LDAP-subfolder of samba-4.1.1
Comment 2 Huemi 2013-11-12 14:47:24 UTC
If someone else runs into this trouble: the samba.schema seems to be included in the examples/LDAP-subfolder of the samba tarball.

I think it is rather critical (slapd don't starting up is like crashing as the result is that the service doesn't work ...) when you don't know above fix and the ebuild has just deleted the old samba.schema-file and after a server reboot you find that your whole samba domain is not working (because of no ldap service working).

Notice that the samba.schema from 4.1.1 contains some more contents than the samba.schema-3.6.x-version.
Comment 3 Huemi 2013-11-12 14:55:48 UTC
seems that the samba-4-ebuilds are missing the part to copy the samba.schema (even when you use the ldap flag) 

samba-3-ebuilds contained:
if use ldap ; then
	insinto /etc/openldap/schema
	doins ../examples/LDAP/samba.schema
Comment 4 Chan Min Wai 2013-12-04 18:09:14 UTC
Created attachment 364606 [details, diff]
Ebuild Patch

This is the ebuild patch as suggested.
Comment 5 Chan Min Wai 2013-12-04 19:23:04 UTC
Created attachment 364612 [details, diff]
Ebuild Patch

update wrong path
Comment 6 Lars Wendler (Polynomial-C) gentoo-dev 2013-12-06 17:56:17 UTC
+  06 Dec 2013; Lars Wendler <> samba-4.0.12.ebuild,
+  samba-4.1.2.ebuild:
+  Install ldap schema. Thanks to Chan Min Wai for providing an ebuild patch in
+  bug #491002.