[Samba] compile samba 4.10.2 centos 7.6

Nico Kadel-Garcia nkadel at gmail.com
Sun Apr 21 17:44:07 UTC 2019


On Sun, Apr 21, 2019 at 11:40 AM Igor Sousa <igorvolt at gmail.com> wrote:
>
> Hi Gabriel,
>
> I've compiled Samba 4.10.2 on CentOS 7 successfully. I've read the wiki that 4.10.2 version is full compatible with python 3, specifically python 3.4. Then I've install, use the yum command, the package python34-devel and I've added an environment variable at /etc/profile with export  PYTHON=python3.4.

You have just diverged your local system for all users, including the
root user, so far from the upstream RHEL standard that you may find it
very difficult to recover if something entirely unrelated to Samba
breaks. You've turned a stack of default python2.7 tools into using
python3.4, tools htat have nothing to do with Samba. I do *not*
recommend this. If you need to do this kind of step, I'd urge you to
do it in the build environment just for building Samba, not for
general use. It's as dangerous as doing "sudo pip install anything",
and it can really break working software.

Sorry if I seem a bit harsh about this: I'd had too many cases where
developers or new admins did something that worked well in their
personal development environment and broke servers when it was done to
production servers without my knowledge later, and having to clean up
a nasty mess.

> Thus, I've run ./configure, make and make install with no problems. If you have tried to install 4.10.2 version in your test environment, I recommend to you try the described above.
>
> --
> Igor Sousa

Good for you. Frankly, I'd use python36 from EPEL, not python34, just
to be closer to up-to-date Python. Unfortunately, unless you've done
some extra work, it won't include the eatures to provide a full domain
controller because the gnutls won't be recent enough. And it won't
replace any of the compiled RHEL 7 based libraries with the updated
talloc, tdb, tevent, or ldb libraries. Unpredictable hilarity may
ensue if you expect various features to work consistently, especially
if you weren't very careful to segregate your built Samba from the
default samba libraries built into RHEL 7 and CentOS 7.

The URL's I published include all the hooks for integrating your new
Samba services as RPM's, including systemd setups and man pages in
expected places, as did sergiomb2's work at
https://github.com/sergiomb2/SambaAD work. When you're replacing
system utilities, I really recommend replacing the entire system
utility so you get all the documentation and software configuration
control provided by the system's packaging utilities. Doing otherwise
can lead to.... adventures, when doing "yum update" of libraries that
might overwrite your deployment, unless you were *very* careful with
your deployment.



More information about the samba mailing list