Samba 4.10.2 for el7.6 (based on srcrpms TranquilIT)

Come here to share your tips and tricks for using Samba4
Locked
ElCoyote
Messages: 13
Registration: May 2, 2018 - 8:58 p.m.

April 17, 2019 - 6:01 PM

Hello,

After some effort, I've built and packaged (cleanly, I hope) the RPMs for Samba AD/DC 4.10.2.
They are partly based on Denis Cardon's specifications and some additions from Fedora.
I use these RPMs for my SOHO AD/DC which serves Win10 Pro laptops.
I would welcome any feedback (good or bad):

Binaries:
http://nova.polymtl.ca/~coyote/dist/sam ... EL7/x86_64
Source RPMs:
http://nova.polymtl.ca/~coyote/dist/sam ... HEL7/SRPMS
Specification files:
http://nova.polymtl.ca/~coyote/dist/sam ... EL7/SPECS
Best regards,

Vincent
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

May 3, 2019 - 5:01 PM

Hello Vincent,

Thank you so much for the links! You seem to be quite skilled with RPM packaging :-)

If you're interested, we could work on this together. I haven't really had time to look into the 4.10.2 RPMs yet. I noticed you haven't built the Python 3 bindings. I think that with EPEL's move from Python 3.4 to Python 3.6, there should be pretty much all the necessary dependencies for the build. This will become really important with the arrival of the upcoming 4.11 version, which will no longer support Python 2!

I took a look at your RPM 4.9.6. It seems there's an issue with the syntax of the spec file for libtalloc:

Code: Select all

# rpmbuild --rebuild  /root/cojot/libtalloc-2.1.16-6.el7.src.rpm 
Installing /root/cojot/libtalloc-2.1.16-6.el7.src.rpm
warning: /root/cojot/libtalloc-2.1.16-6.el7.src.rpm: Header V4 DSA/SHA1 Signature, key ID c825b4bb: NOKEY
error: line 163: Second %post
Was there a reason to change %post and %postun for ldconfig? With the patch, it builds correctly. %ldconfig_scriptlets is provided by the epel-rpm-macros package. This greatly simplifies compatibility with Fedora packages! In fact, the libldb/tdb/tevent/talloc f29 packages compile directly on CentOS 7, if I remember correctly.

Code: Select all

# diff -Naur libtalloc.spec libtalloc.spec.good 
--- libtalloc.spec	2019-04-05 18:52:45.000000000 +0200
+++ libtalloc.spec.good	2019-05-03 16:43:46.189000000 +0200
@@ -159,14 +159,11 @@
 %{_libdir}/libpytalloc-util.cpython*.so
 %endif
 
-#%ldconfig_scriptlets
-%post
-/sbin/ldconfig
+%ldconfig_scriptlets
 
-%postun
-/sbin/ldconfig
-
-#%ldconfig_scriptlets -n python2-talloc
+%if 0%{?with_python2}
+%ldconfig_scriptlets -n python2-talloc
+%endif
 
 %if 0%{?with_python3}
 %ldconfig_scriptlets -n python3-talloc

see you soon,

Denis

PS: I felt a touch of nostalgia with the homepage at the root of the site
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
ElCoyote
Messages: 13
Registration: May 2, 2018 - 8:58 p.m.

August 27, 2019 - 10:53 PM

Hello Denis,
I'm unfortunately not very good with forums and I didn't see your message until now. :(

Regarding ldconfig, yes, it's true that using EPEL macros simplifies things, but I wanted to avoid depending on EPEL.
As for %post, I didn't have that problem; I wonder what happened.
I see that for 4.10.6, you found Guenther's RPMs (probably from Fedora). I'll assess what I can merge from all of that. There are still a few things to improve in the SPEC file.

Thank you for sharing the src.rpms; I couldn't have done this work without you.

Best regards,

Vincent
User avatar
vcardon
WAPT Expert
Messages: 278
Registration: Oct 06, 2017 - 10:55 p.m.
Location: Nantes, France

August 28, 2019 - 00:06

Hi Vincent,

It's late, but Denis and I just read your forum post.

We're really pleased because we can see you're getting more and more involved, and it takes enthusiasts like you and us to make it all worthwhile.

When you mention Guenther, I immediately think of Guenther Deschner, a guy very involved with Samba and Fedora. We know him very well and have a mutual affection for him.

In your searches, you'll also often come across the name Andreas Schneider, also German and a great guy—very approachable, incredibly bright, and super friendly—also very involved with Samba and Fedora.

Thanks for your feedback.

Vincent C.
Vincent CARDON
Tranquil IT
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

August 28, 2019 - 3:10 PM

Hello Vincent el Coyote,
ElCoyote wrote: August 27, 2019 - 10:53 PM Unfortunately, I'm not very good with forums and I didn't see your message until now. :(

Regarding ldconfig, yes, it's true that using EPEL macros simplifies things, but I wanted to avoid depending on EPEL.
As for %post, I didn't have that problem; I wonder what happened.
I see that for 4.10.6, you found Guenther's RPMs (probably from Fedora). I'll assess what I can merge from all of that. There are still a few things to improve in the SPEC file.

Thank you for sharing the src.rpms; I couldn't have done this work without you.
Once I discovered that macros were available in epel packages, I tried basing my code on them to be as close as possible to the Fedora Git sources https://src.fedoraproject.org/rpms/samba.
Furthermore, I wanted to get the Python 3 part working in anticipation of the end of Python 2 support early next year. Switching to EPEL with Python 3.6 (replacing Python 3.4) and porting the various RPM packages of Python 2 libraries to Python 3 made this a truly feasible project.

Finally, with the right macros and the relatively comprehensive new support for Python 3.6, there are very few modifications to report compared to the Fedora packages (python3 -> python36, removal of some dependencies, switching to Heimdal instead of mit, etc.)

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
ElCoyote
Messages: 13
Registration: May 2, 2018 - 8:58 p.m.

August 28, 2019 - 6:52 PM

Hello Denis,

There is also a change on the RHEL7 side: the official python3 packages in the standard repos (no more need for Software Collections) are now present:
# yum list installed python3\*
Loaded plugins: aliases, auto-update-debuginfo, changelog, enabled_repos_upload, fastestmirror, filter-data, fs-snapshot, keys, langpacks, list-data, merge-conf, nvidia,
: package_upload, post-transaction-actions, priorities, product-id, protectbase, ps, remove-with-leaves, rpm-warm-cache, search-disabled-repos, show-leaves,
: subscription-manager, tmprepo, tracer_upload, tsflags, upgrade-helper, verify, versionlock
Loading mirror speeds from cached hostfile
0 packages excluded due to repository protections
Excluding 2 updates due to versionlock (use "yum versionlock status" to show them)
Installed Packages
python3.i686 3.6.8-10.el7 @rhel-7-server-optional-rpms
python3.x86_64 3.6.8-10.el7 @rhel-7-server-rpms
python3-devel.i686 3.6.8-10.el7 @rhel-7-server-optional-rpms
python3-devel.x86_64 3.6.8-10.el7 @rhel-7-server-optional-rpms
python3-libs.i686 3.6.8-10.el7 @rhel-7-server-rpms
python3-libs.x86_64 3.6.8-10.el7 @rhel-7-server-rpms
python3-pip.noarch 9.0.3-5.el7 @rhel-7-server-rpms
python3-rpm-generators.noarch 6-2.el7 @rhel-7-server-rpms
python3-rpm-macros.noarch 3-32.el7 @rhel-7-server-rpms
python3-setuptools.noarch 39.2.0-10.el7 @rhel-7-server-rpms

This will simplify the dependencies if python 3.6.8 is available as standard in RHEL7.
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

August 28, 2019 - 7:33 PM

Hello Vincent,
ElCoyote wrote: August 28, 2019 - 6:52 PM There are also changes on the RHEL7 side: the official python3 packages in the standard repositories (no more need for Software Collections) are now present:
# yum list installed python3\*
...
This will simplify dependencies if python 3.6.8 is available by default in RHEL7.
Indeed, if it can avoid having to rename the python3 dependencies to python36 in the Fedora specfile, that will be one less step :-) Next, we need to check if all the Python library packages are present!

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

September 4, 2019 - 5:27 PM

Hi Vincent,

I've updated the RPMs to 4.8.12, 4.9.13, and 4.10.8 (with the srcrpm :-) for CentOS 7 available at https://samba.tranquil.it/centos7/)

. See you soon,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
ElCoyote
Messages: 13
Registration: May 2, 2018 - 8:58 p.m.

September 6, 2019 - 2:18 PM

Hi Denis,
Ah, I just saw your message.
I worked last night in my spare time on a merge between Gunther's upstream SPEC and my changes for Python 2 (backward compatibility).
So I also posted version 4.10.8 without realizing you had done so on your end.
I'll take a look at your SPEC with great interest.
http://nova.polymtl.ca/~coyote/dist/samba/samba-4.10.8
Thank you for your activity in the community. Indeed, Gunther and Andreas seem to be very friendly people and truly excellent in their fields.
See you soon,
Vincent
Locked