This is an automated email from the ASF dual-hosted git repository.
brandonwilliams pushed a commit to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-4.0 by this push:
new 3b49283ef9 Add noboolean rpm build
3b49283ef9 is described below
commit 3b49283ef9049b35e41313081a2d2777cc0f2067
Author: Brandon Williams <[email protected]>
AuthorDate: Mon Jul 25 16:24:38 2022 -0500
Add noboolean rpm build
Patch by brandonwilliams; reviewed by mck for CASSANDRA-17765
---
CHANGES.txt | 1 +
redhat/noboolean/README | 23 +++++
redhat/noboolean/cassandra | 1 +
redhat/noboolean/cassandra.conf | 1 +
redhat/noboolean/cassandra.in.sh | 1 +
redhat/noboolean/cassandra.spec | 211 +++++++++++++++++++++++++++++++++++++++
redhat/noboolean/default | 1 +
7 files changed, 239 insertions(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index be711d5c70..6c605fe4b8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
4.0.6
+ * Add 'noboolean' rpm build for older distros like CentOS7
* Fix default value for compaction_throughput_mb_per_sec in Config class to
match the one in cassandra.yaml (CASSANDRA-17790)
* Fix Setting Virtual Table - update after startup config properties
gc_log_threshold_in_ms, gc_warn_threshold_in_ms,
conf.index_summary_capacity_in_mb, prepared_statements_cache_size_mb,
key_cache_size_in_mb, counter_cache_size_in_mb
diff --git a/redhat/noboolean/README b/redhat/noboolean/README
new file mode 100644
index 0000000000..33ab959e2b
--- /dev/null
+++ b/redhat/noboolean/README
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+These files create the 'noboolean' rpm packaging, using the same procedure as
normal.
+These differ from the other packages by not using boolean dependency logic,
intended for
+systems using rpmlib < 4.13.
+
+See CASSANDRA-17765 for more information.
diff --git a/redhat/noboolean/cassandra b/redhat/noboolean/cassandra
new file mode 120000
index 0000000000..d9af9adbce
--- /dev/null
+++ b/redhat/noboolean/cassandra
@@ -0,0 +1 @@
+../cassandra
\ No newline at end of file
diff --git a/redhat/noboolean/cassandra.conf b/redhat/noboolean/cassandra.conf
new file mode 120000
index 0000000000..7c12fb6720
--- /dev/null
+++ b/redhat/noboolean/cassandra.conf
@@ -0,0 +1 @@
+../cassandra.conf
\ No newline at end of file
diff --git a/redhat/noboolean/cassandra.in.sh b/redhat/noboolean/cassandra.in.sh
new file mode 120000
index 0000000000..115b45ba92
--- /dev/null
+++ b/redhat/noboolean/cassandra.in.sh
@@ -0,0 +1 @@
+../cassandra.in.sh
\ No newline at end of file
diff --git a/redhat/noboolean/cassandra.spec b/redhat/noboolean/cassandra.spec
new file mode 100644
index 0000000000..c1ff712594
--- /dev/null
+++ b/redhat/noboolean/cassandra.spec
@@ -0,0 +1,211 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+%define __jar_repack %{nil}
+# Turn off the brp-python-bytecompile script
+%global __os_install_post %(echo '%{__os_install_post}' | sed -e
's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
+
+# rpmbuild should not barf when it spots we ship
+# binary executable files in our 'noarch' package
+%define _binaries_in_noarch_packages_terminate_build 0
+
+%define __python /usr/bin/python3
+
+%global username cassandra
+
+# input of ~alphaN, ~betaN, ~rcN package versions need to retain upstream
'-alphaN, etc' version for sources
+%define upstream_version %(echo %{version} | sed -r 's/~/-/g')
+%define relname apache-cassandra-%{upstream_version}
+
+Name: cassandra
+Version: %{version}
+Release: %{revision}
+Summary: Cassandra is a highly scalable, eventually consistent,
distributed, structured key-value store.
+
+Group: Development/Libraries
+License: Apache Software License 2.0
+URL: http://cassandra.apache.org/
+Source0: %{relname}-src.tar.gz
+BuildRoot: %{_tmppath}/%{relname}root-%(%{__id_u} -n)
+
+BuildRequires: ant >= 1.9
+BuildRequires: ant-junit >= 1.9
+
+Requires: jre >= 1.8.0
+Requires: python(abi) >= 3.6
+Requires: procps-ng >= 3.3
+Requires(pre): user(cassandra)
+Requires(pre): group(cassandra)
+Requires(pre): shadow-utils
+Provides: user(cassandra)
+Provides: group(cassandra)
+
+BuildArch: noarch
+
+# Don't examine the .so files we bundle for dependencies
+AutoReqProv: no
+
+%description
+Cassandra is a distributed (peer-to-peer) system for the management and
storage of structured data.
+
+%prep
+%setup -q -n %{relname}-src
+
+%build
+export LANG=en_US.UTF-8
+export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
+ant clean jar -Dversion=%{upstream_version}
+
+%install
+%{__rm} -rf %{buildroot}
+mkdir -p %{buildroot}/%{_sysconfdir}/%{username}
+mkdir -p %{buildroot}/usr/share/%{username}
+mkdir -p %{buildroot}/usr/share/%{username}/lib
+mkdir -p %{buildroot}/%{_sysconfdir}/%{username}/default.conf
+mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/init.d
+mkdir -p %{buildroot}/%{_sysconfdir}/security/limits.d
+mkdir -p %{buildroot}/%{_sysconfdir}/default
+mkdir -p %{buildroot}/usr/sbin
+mkdir -p %{buildroot}/usr/bin
+mkdir -p %{buildroot}/var/lib/%{username}/commitlog
+mkdir -p %{buildroot}/var/lib/%{username}/data
+mkdir -p %{buildroot}/var/lib/%{username}/saved_caches
+mkdir -p %{buildroot}/var/lib/%{username}/hints
+mkdir -p %{buildroot}/var/run/%{username}
+mkdir -p %{buildroot}/var/log/%{username}
+( cd pylib && %{__python} setup.py install --no-compile --root %{buildroot}; )
+
+# patches for data and log paths
+patch -p1 < debian/patches/cassandra_yaml_dirs.diff
+patch -p1 < debian/patches/cassandra_logdir_fix.diff
+# uncomment hints_directory path
+sed -i 's/^# hints_directory:/hints_directory:/' conf/cassandra.yaml
+
+# remove other files not being installed
+rm -f bin/*.orig
+rm -f bin/cassandra.in.sh
+rm -f lib/sigar-bin/*winnt* # strip segfaults on dll..
+rm -f tools/bin/cassandra.in.sh
+
+# copy default configs
+cp -pr conf/* %{buildroot}/%{_sysconfdir}/%{username}/default.conf/
+
+# step on default config with our redhat one
+cp -p redhat/%{username}.in.sh
%{buildroot}/usr/share/%{username}/%{username}.in.sh
+cp -p redhat/%{username} %{buildroot}/%{_sysconfdir}/rc.d/init.d/%{username}
+cp -p redhat/%{username}.conf %{buildroot}/%{_sysconfdir}/security/limits.d/
+cp -p redhat/default %{buildroot}/%{_sysconfdir}/default/%{username}
+
+# copy cassandra bundled libs
+cp -pr lib/* %{buildroot}/usr/share/%{username}/lib/
+
+# copy stress jar
+cp -p build/tools/lib/stress.jar %{buildroot}/usr/share/%{username}/
+
+# copy fqltool jar
+cp -p build/tools/lib/fqltool.jar %{buildroot}/usr/share/%{username}/
+
+# copy binaries
+mv bin/cassandra %{buildroot}/usr/sbin/
+cp -p bin/* %{buildroot}/usr/bin/
+cp -p tools/bin/* %{buildroot}/usr/bin/
+
+# copy cassandra jar
+cp build/apache-cassandra-%{upstream_version}.jar
%{buildroot}/usr/share/%{username}/
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%pre
+getent group %{username} >/dev/null || groupadd -r %{username}
+getent passwd %{username} >/dev/null || \
+useradd -d /var/lib/%{username} -g %{username} -M -r %{username}
+exit 0
+
+%files
+%defattr(0644,root,root,0755)
+%doc CHANGES.txt LICENSE.txt README.asc NEWS.txt NOTICE.txt CASSANDRA-14092.txt
+%attr(755,root,root) %{_bindir}/auditlogviewer
+%attr(755,root,root) %{_bindir}/jmxtool
+%attr(755,root,root) %{_bindir}/cassandra-stress
+%attr(755,root,root) %{_bindir}/cqlsh
+%attr(755,root,root) %{_bindir}/cqlsh.py
+%attr(755,root,root) %{_bindir}/debug-cql
+%attr(755,root,root) %{_bindir}/fqltool
+%attr(755,root,root) %{_bindir}/generatetokens
+%attr(755,root,root) %{_bindir}/nodetool
+%attr(755,root,root) %{_bindir}/sstableloader
+%attr(755,root,root) %{_bindir}/sstablescrub
+%attr(755,root,root) %{_bindir}/sstableupgrade
+%attr(755,root,root) %{_bindir}/sstableutil
+%attr(755,root,root) %{_bindir}/sstableverify
+%attr(755,root,root) %{_bindir}/stop-server
+%attr(755,root,root) %{_sbindir}/cassandra
+%attr(755,root,root) /%{_sysconfdir}/rc.d/init.d/%{username}
+%{_sysconfdir}/default/%{username}
+%{_sysconfdir}/security/limits.d/%{username}.conf
+/usr/share/%{username}*
+%config(noreplace) /%{_sysconfdir}/%{username}
+%attr(755,%{username},%{username}) %config(noreplace) /var/lib/%{username}/*
+%attr(755,%{username},%{username}) /var/log/%{username}*
+%attr(755,%{username},%{username}) /var/run/%{username}*
+%{python_sitelib}/cqlshlib/
+%{python_sitelib}/cassandra_pylib*.egg-info
+
+%post
+alternatives --install /%{_sysconfdir}/%{username}/conf %{username}
/%{_sysconfdir}/%{username}/default.conf/ 0
+exit 0
+
+%preun
+# only delete alternative on removal, not upgrade
+if [ "$1" = "0" ]; then
+ alternatives --remove %{username} /%{_sysconfdir}/%{username}/default.conf/
+fi
+exit 0
+
+
+%package tools
+Summary: Extra tools for Cassandra. Cassandra is a highly scalable,
eventually consistent, distributed, structured key-value store.
+Group: Development/Libraries
+Requires: cassandra = %{version}-%{revision}
+
+%description tools
+Cassandra is a distributed (peer-to-peer) system for the management and
storage of structured data.
+.
+This package contains extra tools for working with Cassandra clusters.
+
+%files tools
+%attr(755,root,root) %{_bindir}/sstabledump
+%attr(755,root,root) %{_bindir}/cassandra-stressd
+%attr(755,root,root) %{_bindir}/compaction-stress
+%attr(755,root,root) %{_bindir}/sstableexpiredblockers
+%attr(755,root,root) %{_bindir}/sstablelevelreset
+%attr(755,root,root) %{_bindir}/sstablemetadata
+%attr(755,root,root) %{_bindir}/sstableofflinerelevel
+%attr(755,root,root) %{_bindir}/sstablerepairedset
+%attr(755,root,root) %{_bindir}/sstablesplit
+%attr(755,root,root) %{_bindir}/auditlogviewer
+%attr(755,root,root) %{_bindir}/jmxtool
+%attr(755,root,root) %{_bindir}/fqltool
+%attr(755,root,root) %{_bindir}/generatetokens
+
+
+%changelog
+* Mon Dec 05 2016 Michael Shuler <[email protected]>
+- 2.1.17, 2.2.9, 3.0.11, 3.10
+- Reintroduce RPM packaging
diff --git a/redhat/noboolean/default b/redhat/noboolean/default
new file mode 120000
index 0000000000..446d58f0d0
--- /dev/null
+++ b/redhat/noboolean/default
@@ -0,0 +1 @@
+../default
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]