=net-fs/samba-4.1.0-r1 ebuild seems not to provide samba.schema for openldap causing it to be deleted during install.
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)
slapd can't be started because samba.schema has been deleted.
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) ..."
Created attachment 363120 [details]
Samba schema file
Samba schema file from examples/LDAP-subfolder of samba-4.1.1
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.
seems that the samba-4-ebuilds are missing the part to copy the samba.schema (even when you use the ldap flag)
if use ldap ; then
Created attachment 364606 [details, diff]
This is the ebuild patch as suggested.
Created attachment 364612 [details, diff]
update wrong path
+ 06 Dec 2013; Lars Wendler <firstname.lastname@example.org> samba-4.0.12.ebuild,
+ Install ldap schema. Thanks to Chan Min Wai for providing an ebuild patch in
+ bug #491002.