This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch cassandra-2.2
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-2.2 by this push:
     new b41873d  Fix centos packaging for arm64, >=3.0 rpm's now require 
python3
b41873d is described below

commit b41873d671eb4bc42827e6b37ad0062837a906c3
Author: Mick Semb Wever <[email protected]>
AuthorDate: Sun Mar 7 19:30:03 2021 +0100

    Fix centos packaging for arm64, >=3.0 rpm's now require python3
    
     patch by Mick Semb Wever; reviewed by Brandon Williams for CASSANDRA-16477
---
 CHANGES.txt               | 1 +
 redhat/cassandra.spec     | 9 ++++++---
 tools/bin/token-generator | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 36a244a..cdb2def 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.20
+ * Fix centos packaging for arm64, >=3.0 rpm's now require python3 
(CASSANDRA-16477)
  * Make TokenMetadata's ring version increments atomic (CASSANDRA-16286)
  * Remove OpenJDK log warning (CASSANDRA-15563)
  * Fix the histogram merge of the table metrics (CASSANDRA-16259)
diff --git a/redhat/cassandra.spec b/redhat/cassandra.spec
index 07c3dc5..73d4a42 100644
--- a/redhat/cassandra.spec
+++ b/redhat/cassandra.spec
@@ -6,6 +6,9 @@
 # binary executable files in our 'noarch' package
 %define _binaries_in_noarch_packages_terminate_build   0
 
+# for python 2/3 support we rely on /usr/bin/python
+%define __python /usr/bin/python
+
 %global username cassandra
 
 %define relname apache-cassandra-%{version}
@@ -63,7 +66,7 @@ mkdir -p %{buildroot}/var/lib/%{username}/data
 mkdir -p %{buildroot}/var/lib/%{username}/saved_caches
 mkdir -p %{buildroot}/var/run/%{username}
 mkdir -p %{buildroot}/var/log/%{username}
-( cd pylib && python2.7 setup.py install --no-compile --root %{buildroot}; )
+( cd pylib && %{__python} setup.py install --no-compile --root %{buildroot}; )
 
 # patches for data and log paths
 patch -p1 < debian/patches/001cassandra_yaml_dirs.dpatch
@@ -135,8 +138,8 @@ exit 0
 %attr(755,%{username},%{username}) %config(noreplace) /var/lib/%{username}/*
 %attr(755,%{username},%{username}) /var/log/%{username}*
 %attr(755,%{username},%{username}) /var/run/%{username}*
-/usr/lib/python2.7/site-packages/cqlshlib/
-/usr/lib/python2.7/site-packages/cassandra_pylib*.egg-info
+%{python_sitelib}/cqlshlib/
+%{python_sitelib}/cassandra_pylib*.egg-info
 
 %post
 alternatives --install /%{_sysconfdir}/%{username}/conf %{username} 
/%{_sysconfdir}/%{username}/default.conf/ 0
diff --git a/tools/bin/token-generator b/tools/bin/token-generator
index 9ebef54..f879709 100755
--- a/tools/bin/token-generator
+++ b/tools/bin/token-generator
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to