Nico Kadel-Garcia
2013-Feb-22 03:13 UTC
[Samba] RPM building tools for Samba 4.0.3 on RHEL 6 published bye me on Github
I've been spending some time backporting Samba 4.0.3 from Fedora 19 to RHEL 6, partly as proof of concept, partly to make it available to others. I've published my work at: https://github.com/nkadel/samba4repo/ The key RPM building tools are at: https://github.com/nkadel/samba-4.0.3-srpm/ And there are dependencies listed for libtalloc, libtevent, iniparser, etc. that I've also put up at https://github.com. It works in my basic testing, but I don't have a local set of Active Directory clients and servers to play with for full testing. This includes hooks for building all the components with "mock", including notes on where to get the necessary components from github.com. The README.md from that directory is below. I'm happy to make these as refined and idiot proof as anyone would like, since I'm between jobs right now, but but I don't want to confuse anyone. I've also noticed that several dependencies, such as "krb5-1.10", may be already available as part of RHEL 6.4 which was released *less than 24 hours ago*. ========================================Wrapper for SRPM building tools for Samba 4 on RHEL 6. These are rebuilt from Fedora rawhide releases, and need to be built and installed in the following order. samba4repo-6-x86_64.cfg - install in /etc/mock/ samba4repo.repo - install in /etc/yum.repos.d/. Then install and enable a yum repository on the local server, or a designated host, with this kind of layout: mkdir /var/www/linux mkdir /var/www/linux/samba4repo mkdir /var/www/linux/samba4repo/6 mkdir /var/www/linux/samba4repo/6/x86_64 createrepo /var/www/linux/samba4repo/6/x86_64 mkdir /var/www/linux/samba4repo/6/SRPMS createrepo /var/www/linux/samba4repo/6/SRPMS Set up symlinks for "$releasever" names in yum setups. ln -s -f -n 6 /var/www/linux/samba4repo/6.3 ln -s -f -n 6 /var/www/linux/samba4repo/6Server The "make" command will build all components. If they don't exist yet, they will be git cloned from https://github.com/nkadel/. The components there are somewhat interwoven with this "samba4repo" structure, so review it before building or deploying with it. *** NOTE: The git repos at github.com do not include the tarballs *** This is for basic security reasons: I do not want to become responsible for publishing the source code software for other people's compnents, and possibly getting hacked and corrupting your software. You'll need to get the tarballs manually, usually from the "Source:" locations designated in the .spec file. "make install" will attempt to deploy them in a designated directory for "yum" repository access, run "createrepo", to get the packages listeed, and and clear away old "mock" configurations. "createrepo --update" and "mock clean" are somewhat unreliable in their behavior, so actually re-running and createrepo and using "rm -rf" on the mock cache works better. Samba 4.0.3 has strong dependencies on additional components that are not part of RHEL 6, or are not recent enough in RHEL 6, and need to be built and deployed for local compilation or for "mock" compilation. These dependencies are detailed in the Makefile, but include: iniparser krb5 libtalloc libtdb libldb libtevent Nico Kadel-Garcia <nkadel at gmail.com>
Nico Kadel-Garcia
2013-Feb-22 18:01 UTC
[Samba] RPM building tools for Samba 4.0.3 on RHEL 6 published bye me on Github
On Fri, Feb 22, 2013 at 12:40 PM, Diego Remolina <diego.remolina at physics.gatech.edu> wrote:> I think a lot of your work was probably prior to RHEL 6.4, but have you > tried looking at their new SRPM for samba 4.0.0 and adapting it to 4.0.3?Unfortunately somewhere between 4.0.0 and 4.0.3. they introduced now related package dependencies on libtalloc, libtdb, libtevent, iniparser, and krb5. So the RHEL 6.4 inlcudes krb5-1.10, which eliminates one problem, but doesn't resolve the others. That's why I put updates for those as well up at https://github.com/nkadel/ and into the Samba repository building tools at https://github.com/nkadel/samba4repo/. Since building with "mock" relies on CentOS, or Scientific Linux or a local RHEL yum repo, to have the updated packages, it's going to be a while before the new RHEL 6.4 packages are broadly available anyway. I'll yank them from github.com if and as they become available as part of 6.4 releases.> http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/samba4-4.0.0-55.el6.rc4.src.rpm > > They have also posted the new SRPMS for the libtdb and libtalloc and other > software that may be required: > > http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/libtalloc-2.0.7-2.el6.src.rpm > http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/libtdb-1.2.10-1.el6.src.rpm > http://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/libtevent-0.9.8-8.el6.src.rpmThose are new enough for Samba 4.0.0, not for Samba 4.0.3.
Miguel Medalha
2013-Mar-20 19:37 UTC
[Samba] RPM building tools for Samba 4.0.3 on RHEL 6 published bye me on Github
I tested the .spec file you posted today. There's still a glitch remaining. If built with the file as it is ("%global with_dc 0") the packages build cleanly. However, if "%global with_dc 1" is used, the build fails with the following error: RPM build errors: Installed (but unpackaged) file(s) found: /usr/lib64/samba/ldb/ildap.so I can see that this file is excluded in the packging list pertaining to DC-LIBS, if "with_dc" is disabled but it is not one of the "# ldb libraries built with DC activated", contrary to the other file always excluded in the Fedora .spec (ldbsamba_extensions.so), which is listed in your file. When I do a rpm query for --whatrequires both files, the answer is that no package requires either file. As such, they should probably be always excluded, as happens with the Fedora .spec file. One more thing: since Samba 4.0.4 is out now, maybe you should update your files to match? This is just a security release that presents no problem whatsoever when built with the same specs as 4.0.3. I did it and all went well. I have an experimental AD domain controller working correctly it it. Thank you again