Well, once more this SILUG meeting had only two attendees: Steve and I. There was a tiny orchestra performing at Balance Coffee this afternoon, so more attendees might not have been able to fit in very well. :-)

Like last month, Steve and I continued to work on building a complete Samba package that will run under CentOS 8. We've learned some things since last time. For example, even though CentOS 8 was forked off Fedora 28, we can't really reach back and start with the Samba SRPM from Fedora 28. That's because Samba v4.8 from Fedora 28 has been deprecated. The current stable release is Samba 4.11 which is available from Fedora 31 and Rawhide. The fact that upstream Samba continues to evolve fairly rapidly, getting a working binary RPM generation process is more important than hacking together a single working result.

One major problem is that Fedora, Red Hat, and CentOS each have built Samba binary RPMs from version-specific components, and each requires different versions.

To see the problem up close, install a CentOS 8 Server VM under Fedora 31. Then from root's home directory, fetch the SRPM:

# wget https://dl.fedoraproject.org/pub/fedora/linux/updates/31/Everything/SRPMS/Packages/s/samba-4.11.2-1.fc31.src.rpm

Extract the spec file:

# rpm2cpio samba-4.11.2-1.fc31.src.rpm | cpio -iumd samba.spec

Now, try to rebuild a new SRPM. First, set up the required build tree:

# rpmdev-setuptree

Start caja to get a graphical view:

# caja

Navigate to /root, right-click on the samba src.rpm, and extract all to /root/rpmbuild/SOURCES/. Then run rpmbuild using the .spec file in root's home directory:

# rpmbuild -bc samba.spec
error: Failed build dependencies:
libldb-devel >= 2.0.7 is needed by samba-0:4.11.2-1.el8.x86_64
libtalloc-devel >= 2.2.0 is needed by samba-0:4.11.2-1.el8.x86_64
libtdb-devel >= 1.4.2 is needed by samba-0:4.11.2-1.el8.x86_64
libtevent-devel >= 0.10.0 is needed by samba-0:4.11.2-1.el8.x86_64
python3-ldb-devel >= 2.0.7 is needed by samba-0:4.11.2-1.el8.x86_64
python3-talloc-devel > 2.2.0 is needed by samba-0:4.11.2-1.el8.x86_64
python3-tdb >= 1.4.2 is needed by samba-0:4.11.2-1.el8.x86_64
python3=tevent >= 0.10.0 is needed by samba-0:4.11.2-1.el8.x86_64
quota-devel is needed by samba-0:4.11.2-1.el8.x86_64

These are just the first problems Steve and I must overcome. The ">=" versions are part of the .spec file in lines 12-15:

%define talloc_version 2.2.0
%define tdb_version 2.2.0
%define tevent_version 0.10.0
%define ldb_version 2.0.7

Starting at line 161 it checks to see if the required development and support packages are installed:

BuildRequires: gcc
BuildRequires: avahi-devel
BuildRequires: cups-devel
...
%if %{with_dc}
BuildRequires: bind
BuildRequires: gnutls-devel >= 3.4.7
BuildRequires: krb5-server >= %{required_mit_krb5}
...

The component package version requirements in lines 237-247 are indirectly set by the four %defines from lines 12-15:

BuildRequires: libtalloc-devel >= %{talloc_version}
BuildRequires: python3-talloc-devel >= %{talloc_version}

BuildRequires: libtevent-devel >= %{tevent_version}
BuildRequires: python3-tevent >= %{tevent_version}

BuildRequires: libtdb-devel >= %{tdb_version}
BuildRequires: python3-tbd >= %tbd_version}

BuildRequires: libldb-devel >= %{ldb_version}
BuildRequires: python3-ldb-devel >= %{ldb_version}

This is only the beginning. Samba is a BIG package. The working part of the .spec file ends at line 3469. The rest through line 5829 is a changelog.

At first you might think that editing lines 12-15 to match the actual installed versions might fix the problem. The samba.spec file is very complex. Unfortuntely the Fedora, Red Hat, and CentOS developers have built their versions of this file very narrowly for each distribution. Steve thinks he's getting close to a version that will run cleanly with the mock build utility under CentOS 8. If he's successful, that will be just the first hurdle. After that we need to test the samba-dc and other packages to see if they actually work together as an Active Directory Domain Controller.