diff --git a/debian/cassandra.install b/debian/cassandra.install index 499c6d640f..d23f37a677 100644 --- a/debian/cassandra.install +++ b/debian/cassandra.install @@ -10,6 +10,7 @@ conf/hotspot_compiler etc/cassandra conf/cqlshrc.sample etc/cassandra conf/credentials.sample etc/cassandra conf/triggers/* etc/cassandra/triggers +conf/cassandra-jaas.config etc/cassandra debian/cassandra.conf etc/security/limits.d debian/cassandra-sysctl.conf etc/sysctl.d bin/cassandra.in.sh usr/share/cassandra diff --git a/redhat/cassandra.spec b/redhat/cassandra.spec index 7272ade899..90c0b5c799 100644 --- a/redhat/cassandra.spec +++ b/redhat/cassandra.spec @@ -100,8 +100,9 @@ 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/ +# copy default configs directly to /etc/cassandra to align with Cassandra's expected config path +# Removed references to 'default.conf' to simplify config management. Now, all Cassandra configs reside directly under /etc/cassandra +cp -pr conf/* %{buildroot}/%{_sysconfdir}/%{username}/ # step on default config with our redhat one cp -p redhat/%{username}.in.sh %{buildroot}/usr/share/%{username}/%{username}.in.sh @@ -165,13 +166,14 @@ exit 0 %{python_sitelib}/cassandra_pylib*.egg-info %post -alternatives --install /%{_sysconfdir}/%{username}/conf %{username} /%{_sysconfdir}/%{username}/default.conf/ 0 +# Update alternatives to point to the correct config directory. +alternatives --install /%{_sysconfdir}/%{username} %{username} /%{_sysconfdir}/%{username}/ 0 exit 0 %preun # only delete alternative on removal, not upgrade if [ "$1" = "0" ]; then - alternatives --remove %{username} /%{_sysconfdir}/%{username}/default.conf/ + alternatives --remove %{username} /%{_sysconfdir}/%{username}/ fi exit 0