Add python2 location to RPMs

Patch by Mck Semb Wever; reviewed by brandonwilliams for
CASSANDRA-16822
This commit is contained in:
Mick Semb Wever 2021-08-02 11:36:36 +02:00 committed by Brandon Williams
parent d3ddb190ee
commit 2e547dfbc4
2 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
2.2.20
* Add python2 location to RPMs (CASSANDRA-16822)
* CQL shell should prefer newer TLS version by default (CASSANDRA-16695)
* Fix Debian init start/stop (CASSANDRA-15770)
* Remove ant targets list-jvm-dtests and ant list-jvm-upgrade-dtests (CASSANDRA-16519)

View File

@ -85,6 +85,9 @@ mkdir -p %{buildroot}/var/lib/%{username}/saved_caches
mkdir -p %{buildroot}/var/run/%{username}
mkdir -p %{buildroot}/var/log/%{username}
( cd pylib && %{__python} setup.py install --no-compile --root %{buildroot}; )
# cqlsh before Cassandra version 4.0 still requires python2
mkdir -p %{buildroot}/usr/lib/python2.7/site-packages
cp -r %{buildroot}%{python_sitelib}/cqlshlib %{buildroot}/usr/lib/python2.7/site-packages/
# patches for data and log paths
patch -p1 < debian/patches/001cassandra_yaml_dirs.dpatch
@ -158,6 +161,8 @@ exit 0
%attr(755,%{username},%{username}) /var/run/%{username}*
%{python_sitelib}/cqlshlib/
%{python_sitelib}/cassandra_pylib*.egg-info
# cqlsh before Cassandra version 4.0 still requires python2
/usr/lib/python2.7/site-packages/cqlshlib
%post
alternatives --install /%{_sysconfdir}/%{username}/conf %{username} /%{_sysconfdir}/%{username}/default.conf/ 0