From a2c9edc7664b9c6733dc971254677e85884cedd7 Mon Sep 17 00:00:00 2001
From: Steven Murray <Steven.Murray@cern.ch>
Date: Wed, 27 Sep 2017 14:03:56 +0200
Subject: [PATCH] Renamed cta_catalogue_db.conf to cta-catalogue.conf

---
 catalogue/CMakeLists.txt                                  | 2 +-
 catalogue/cta-catalogue-admin-host-create.1cta            | 2 +-
 catalogue/cta-catalogue-admin-user-create.1cta            | 2 +-
 catalogue/cta-catalogue-schema-create.1cta                | 2 +-
 catalogue/cta-catalogue-schema-drop.1cta                  | 2 +-
 ...talogue_db.conf.example => cta-catalogue.conf.example} | 0
 catalogue/cta-database-poll.1cta                          | 2 +-
 .../docker/ctafrontend/cc7/opt/run/bin/ctafrontend.sh     | 2 +-
 .../docker/ctafrontend/cc7/opt/run/bin/init.sh            | 8 ++++----
 .../docker/ctafrontend/cc7/opt/run/bin/taped.sh           | 2 +-
 .../orchestration/tests/prepare_tests.sh                  | 4 ++--
 continuousintegration/orchestration/tests/systest.sh      | 4 ++--
 .../tests/systest_xrdcp_many_concurrent_files.sh          | 4 ++--
 .../orchestration/tests/systest_xrdcp_many_files.sh       | 4 ++--
 cta.spec.in                                               | 2 +-
 objectstore/cta-objectstore-collect-orphaned-object.cpp   | 4 ++--
 tapeserver/daemon/TapedConfiguration.hpp                  | 2 +-
 xroot_plugins/XrdCtaFilesystem.cpp                        | 2 +-
 xroot_plugins/XrdSsiCtaServiceProvider.cpp                | 2 +-
 19 files changed, 26 insertions(+), 26 deletions(-)
 rename catalogue/{cta_catalogue_db.conf.example => cta-catalogue.conf.example} (100%)

diff --git a/catalogue/CMakeLists.txt b/catalogue/CMakeLists.txt
index 870c143690..896e2f7e42 100644
--- a/catalogue/CMakeLists.txt
+++ b/catalogue/CMakeLists.txt
@@ -118,7 +118,7 @@ target_link_libraries (ctacatalogueunittests
 
 install (TARGETS ctacatalogueunittests DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
 
-install (FILES cta_catalogue_db.conf.example
+install (FILES cta-catalogue.conf.example
   DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta
   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
 
diff --git a/catalogue/cta-catalogue-admin-host-create.1cta b/catalogue/cta-catalogue-admin-host-create.1cta
index fcd324a09a..5056f164a7 100644
--- a/catalogue/cta-catalogue-admin-host-create.1cta
+++ b/catalogue/cta-catalogue-admin-host-create.1cta
@@ -44,7 +44,7 @@ Prints the usage message.
 .SH RETURN VALUE
 Zero on success and non-zero on failure.
 .SH EXAMPLES
-cta-catalogue-admin-host-create /etc/cta/cta_catalogue_db.conf -u ctaadminhost -c "The CTA admin host"
+cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf -u ctaadminhost -c "The CTA admin host"
 
 .SH AUTHOR
 \fBCTA\fP Team
diff --git a/catalogue/cta-catalogue-admin-user-create.1cta b/catalogue/cta-catalogue-admin-user-create.1cta
index 3b4291c53e..543b3fba70 100644
--- a/catalogue/cta-catalogue-admin-user-create.1cta
+++ b/catalogue/cta-catalogue-admin-user-create.1cta
@@ -44,7 +44,7 @@ Prints the usage message.
 .SH RETURN VALUE
 Zero on success and non-zero on failure.
 .SH EXAMPLES
-cta-catalogue-admin-user-create /etc/cta/cta_catalogue_db.conf -u ctaadmin -c "The CTA admin account"
+cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf -u ctaadmin -c "The CTA admin account"
 
 .SH AUTHOR
 \fBCTA\fP Team
diff --git a/catalogue/cta-catalogue-schema-create.1cta b/catalogue/cta-catalogue-schema-create.1cta
index 07b34cd3d3..051c452568 100644
--- a/catalogue/cta-catalogue-schema-create.1cta
+++ b/catalogue/cta-catalogue-schema-create.1cta
@@ -37,7 +37,7 @@ Prints the usage message.
 .SH RETURN VALUE
 Zero on success and non-zero on failure.
 .SH EXAMPLES
-cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf
+cta-catalogue-schema-create /etc/cta/cta-catalogue.conf
 
 .SH AUTHOR
 \fBCTA\fP Team
diff --git a/catalogue/cta-catalogue-schema-drop.1cta b/catalogue/cta-catalogue-schema-drop.1cta
index 66ae644ad3..5639395f40 100644
--- a/catalogue/cta-catalogue-schema-drop.1cta
+++ b/catalogue/cta-catalogue-schema-drop.1cta
@@ -37,7 +37,7 @@ Prints the usage message.
 .SH RETURN VALUE
 Zero on success and non-zero on failure.
 .SH EXAMPLES
-cta-catalogue-schema-drop /etc/cta/cta_catalogue_db.conf
+cta-catalogue-schema-drop /etc/cta/cta-catalogue.conf
 
 .SH AUTHOR
 \fBCTA\fP Team
diff --git a/catalogue/cta_catalogue_db.conf.example b/catalogue/cta-catalogue.conf.example
similarity index 100%
rename from catalogue/cta_catalogue_db.conf.example
rename to catalogue/cta-catalogue.conf.example
diff --git a/catalogue/cta-database-poll.1cta b/catalogue/cta-database-poll.1cta
index 6aaa0f4457..c186a5621a 100644
--- a/catalogue/cta-database-poll.1cta
+++ b/catalogue/cta-database-poll.1cta
@@ -36,7 +36,7 @@ Prints the usage message.
 .SH RETURN VALUE
 Zero on success and non-zero on failure.
 .SH EXAMPLES
-cta-database-poll 5 /etc/cta/cta_catalogue_db.conf
+cta-database-poll 5 /etc/cta/cta-catalogue.conf
 
 .SH AUTHOR
 \fBCTA\fP Team
diff --git a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctafrontend.sh b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctafrontend.sh
index 223f49bffb..eac70ca3d7 100755
--- a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctafrontend.sh
+++ b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctafrontend.sh
@@ -24,7 +24,7 @@ echo "Log URL file:/var/log/cta/cta-frontend.log" >>/etc/cta/cta-frontend.conf
 /opt/run/bin/init_database.sh
 . /tmp/database-rc.sh
 
-echo ${DATABASEURL} >/etc/cta/cta_catalogue_db.conf
+echo ${DATABASEURL} >/etc/cta/cta-catalogue.conf
 
 # EOS INSTANCE NAME used as username for SSS key
 EOSINSTANCE=ctaeos
diff --git a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh
index b58c3c9385..1b6272ca2d 100755
--- a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh
+++ b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh
@@ -48,22 +48,22 @@ fi
 echo "Configuring database:"
 /opt/run/bin/init_database.sh
 . /tmp/database-rc.sh
-echo ${DATABASEURL} >/etc/cta/cta_catalogue_db.conf
+echo ${DATABASEURL} >/etc/cta/cta-catalogue.conf
 
 if [ "$KEEP_DATABASE" == "0" ]; then
   echo "Wiping database"
-  echo yes | cta-catalogue-schema-drop /etc/cta/cta_catalogue_db.conf
+  echo yes | cta-catalogue-schema-drop /etc/cta/cta-catalogue.conf
 
   if [ "$DATABASETYPE" == "sqlite" ]; then
     mkdir -p $(dirname $(echo ${DATABASEURL} | cut -d: -f2))
-    cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf
+    cta-catalogue-schema-create /etc/cta/cta-catalogue.conf
     chmod -R 777 $(dirname $(echo ${DATABASEURL} | cut -d: -f2)) # needed?
   else
     # Oracle DB
     echo "Purging Oracle recycle bin"
     test -f ${ORACLE_SQLPLUS} || echo "ERROR: ORACLE SQLPLUS client is not present, cannot purge recycle bin: ${ORACLE_SQLPLUS}"
     LD_LIBRARY_PATH=$(readlink ${ORACLE_SQLPLUS} | sed -e 's;/bin/[^/]\+;/lib;') ${ORACLE_SQLPLUS} $(echo $DATABASEURL | sed -e 's/oracle://') @/opt/ci/init/purge_recyclebin.ext
-    cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf
+    cta-catalogue-schema-create /etc/cta/cta-catalogue.conf
   fi
 else
   echo "Reusing database (no check)"
diff --git a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/taped.sh b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/taped.sh
index 7cb2053cd9..9fa5a03a4f 100755
--- a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/taped.sh
+++ b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/taped.sh
@@ -30,7 +30,7 @@ echo "Configuring database"
 /opt/run/bin/init_database.sh
 . /tmp/database-rc.sh
 
-echo ${DATABASEURL} >/etc/cta/cta_catalogue_db.conf
+echo ${DATABASEURL} >/etc/cta/cta-catalogue.conf
 
 # cta-taped setup
   echo "taped BufferCount 10" > /etc/cta/cta-taped.conf
diff --git a/continuousintegration/orchestration/tests/prepare_tests.sh b/continuousintegration/orchestration/tests/prepare_tests.sh
index b7de442876..95ea90a518 100755
--- a/continuousintegration/orchestration/tests/prepare_tests.sh
+++ b/continuousintegration/orchestration/tests/prepare_tests.sh
@@ -58,8 +58,8 @@ cat ${tempdir}/library-rc.sh
 ctacliIP=`kubectl --namespace ${NAMESPACE} describe pod ctacli | grep IP | sed -E 's/IP:[[:space:]]+//'`
 
 echo "Preparing CTA configuration for tests"
-  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta_catalogue_db.conf --hostname ${ctacliIP} -c "docker cli"
-  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta_catalogue_db.conf --username ctaadmin1 -c "docker cli"
+  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf --hostname ${ctacliIP} -c "docker cli"
+  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf --username ctaadmin1 -c "docker cli"
   kubectl --namespace ${NAMESPACE} exec ctacli -- cta logicallibrary add \
      --name ${LIBRARYNAME}                                            \
      --comment "ctasystest"                                           
diff --git a/continuousintegration/orchestration/tests/systest.sh b/continuousintegration/orchestration/tests/systest.sh
index fef11e70af..54f779d952 100755
--- a/continuousintegration/orchestration/tests/systest.sh
+++ b/continuousintegration/orchestration/tests/systest.sh
@@ -58,8 +58,8 @@ cat ${tempdir}/library-rc.sh
 ctacliIP=`kubectl --namespace ${NAMESPACE} describe pod ctacli | grep IP | sed -E 's/IP:[[:space:]]+//'`
 
 echo "Preparing CTA for tests"
-  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta_catalogue_db.conf --hostname ${ctacliIP} -c "docker cli"
-  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta_catalogue_db.conf --username admin1 -c "docker cli"
+  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf --hostname ${ctacliIP} -c "docker cli"
+  kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf --username admin1 -c "docker cli"
   kubectl --namespace ${NAMESPACE} exec ctacli -- cta logicallibrary add \
      --name ${LIBRARYNAME}                                            \
      --comment "ctasystest"                                           
diff --git a/continuousintegration/orchestration/tests/systest_xrdcp_many_concurrent_files.sh b/continuousintegration/orchestration/tests/systest_xrdcp_many_concurrent_files.sh
index 7031e555b7..62eb88b846 100755
--- a/continuousintegration/orchestration/tests/systest_xrdcp_many_concurrent_files.sh
+++ b/continuousintegration/orchestration/tests/systest_xrdcp_many_concurrent_files.sh
@@ -58,8 +58,8 @@ cat ${tempdir}/library-rc.sh
 ctacliIP=`kubectl --namespace ${NAMESPACE} describe pod ctacli | grep IP | sed -E 's/IP:[[:space:]]+//'`
 
 echo "Preparing CTA for tests"
-kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta_catalogue_db.conf --hostname ${ctacliIP} -c "docker cli"
-kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta_catalogue_db.conf --username admin1 -c "docker cli"
+kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf --hostname ${ctacliIP} -c "docker cli"
+kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf --username admin1 -c "docker cli"
 kubectl --namespace ${NAMESPACE} exec ctacli -- cta logicallibrary add \
       --name ${LIBRARYNAME}                                            \
       --comment "ctasystest"                                           
diff --git a/continuousintegration/orchestration/tests/systest_xrdcp_many_files.sh b/continuousintegration/orchestration/tests/systest_xrdcp_many_files.sh
index b7d9d24625..954ad73c72 100755
--- a/continuousintegration/orchestration/tests/systest_xrdcp_many_files.sh
+++ b/continuousintegration/orchestration/tests/systest_xrdcp_many_files.sh
@@ -58,8 +58,8 @@ cat ${tempdir}/library-rc.sh
 ctacliIP=`kubectl --namespace ${NAMESPACE} describe pod ctacli | grep IP | sed -E 's/IP:[[:space:]]+//'`
 
 echo "Preparing CTA for tests"
-kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta_catalogue_db.conf --hostname ${ctacliIP} -c "docker cli"
-kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta_catalogue_db.conf --username admin1 -c "docker cli"
+kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf --hostname ${ctacliIP} -c "docker cli"
+kubectl --namespace ${NAMESPACE} exec ctafrontend -- cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf --username admin1 -c "docker cli"
 kubectl --namespace ${NAMESPACE} exec ctacli -- cta logicallibrary add \
       --name ${LIBRARYNAME}                                            \
       --comment "ctasystest"                                           
diff --git a/cta.spec.in b/cta.spec.in
index d3914d7e81..a12928a42c 100644
--- a/cta.spec.in
+++ b/cta.spec.in
@@ -200,7 +200,7 @@ The shared libraries
 %{_libdir}/libctamessages.so*
 %{_libdir}/libctamessagesutils.so*
 %{_libdir}/libctardbms.so*
-%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta_catalogue_db.conf.example
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-catalogue.conf.example
 
 #CTA-lib installs libraries so we need ldconfig.
 %post -n cta-lib -p /sbin/ldconfig
diff --git a/objectstore/cta-objectstore-collect-orphaned-object.cpp b/objectstore/cta-objectstore-collect-orphaned-object.cpp
index 1108f2977e..6b84c657e7 100644
--- a/objectstore/cta-objectstore-collect-orphaned-object.cpp
+++ b/objectstore/cta-objectstore-collect-orphaned-object.cpp
@@ -53,7 +53,7 @@ int main(int argc, char ** argv) {
     } else if (2 == argc) {
       cta::common::Configuration m_ctaConf("/etc/cta/cta-frontend.conf");
       be = std::move(cta::objectstore::BackendFactory::createBackend(m_ctaConf.getConfEntString("ObjectStore", "BackendPath", nullptr)));
-      const cta::rdbms::Login catalogueLogin = cta::rdbms::Login::parseFile("/etc/cta/cta_catalogue_db.conf");
+      const cta::rdbms::Login catalogueLogin = cta::rdbms::Login::parseFile("/etc/cta/cta-catalogue.conf");
       const uint64_t nbConns = 1;
       const uint64_t nbArchiveFileListingConns = 0;
       catalogue = std::move(cta::catalogue::CatalogueFactory::create(sl, catalogueLogin, nbConns, nbArchiveFileListingConns));
@@ -134,4 +134,4 @@ int main(int argc, char ** argv) {
     std::cerr << "Failed to garbage collect object: "
         << std::endl << e.what() << std::endl;
   }
-}
\ No newline at end of file
+}
diff --git a/tapeserver/daemon/TapedConfiguration.hpp b/tapeserver/daemon/TapedConfiguration.hpp
index 718e9ab43f..fa3cad5e93 100644
--- a/tapeserver/daemon/TapedConfiguration.hpp
+++ b/tapeserver/daemon/TapedConfiguration.hpp
@@ -113,7 +113,7 @@ struct TapedConfiguration {
     "ObjectStore", "BackendPath"};
   /// Path to the file catalog config file
   SourcedParameter<std::string> fileCatalogConfigFile{
-    "general", "FileCatalogConfigFile", "/etc/cta/cta_catalogue_db.conf", "Compile time default"};
+    "general", "FileCatalogConfigFile", "/etc/cta/cta-catalogue.conf", "Compile time default"};
   
 private:
   /** A private dummy logger which will simplify the implementation of the 
diff --git a/xroot_plugins/XrdCtaFilesystem.cpp b/xroot_plugins/XrdCtaFilesystem.cpp
index 52e4afa344..db1f36e335 100644
--- a/xroot_plugins/XrdCtaFilesystem.cpp
+++ b/xroot_plugins/XrdCtaFilesystem.cpp
@@ -281,7 +281,7 @@ XrdCtaFilesystem::XrdCtaFilesystem():
   m_backend = std::move(cta::objectstore::BackendFactory::createBackend(m_ctaConf.getConfEntString("ObjectStore", "BackendPath", nullptr)));
   m_backendPopulator = cta::make_unique<cta::objectstore::BackendPopulator>(*m_backend, "Frontend", cta::log::LogContext(*m_log));
   
-  const rdbms::Login catalogueLogin = rdbms::Login::parseFile("/etc/cta/cta_catalogue_db.conf");
+  const rdbms::Login catalogueLogin = rdbms::Login::parseFile("/etc/cta/cta-catalogue.conf");
   const uint64_t nbConns = m_ctaConf.getConfEntInt<uint64_t>("Catalogue", "NumberOfConnections", nullptr);
   const uint64_t nbArchiveFileListingConns = 2;
   m_catalogue = catalogue::CatalogueFactory::create(*m_log, catalogueLogin, nbConns, nbArchiveFileListingConns);
diff --git a/xroot_plugins/XrdSsiCtaServiceProvider.cpp b/xroot_plugins/XrdSsiCtaServiceProvider.cpp
index 54a5318839..e1318de197 100644
--- a/xroot_plugins/XrdSsiCtaServiceProvider.cpp
+++ b/xroot_plugins/XrdSsiCtaServiceProvider.cpp
@@ -85,7 +85,7 @@ bool XrdSsiCtaServiceProvider::Init(XrdSsiLogger *logP, XrdSsiCluster *clsP, con
 
    // Initialise the catalogue
   
-   const rdbms::Login catalogueLogin = rdbms::Login::parseFile("/etc/cta/cta_catalogue_db.conf");
+   const rdbms::Login catalogueLogin = rdbms::Login::parseFile("/etc/cta/cta-catalogue.conf");
    const uint64_t nbConns = m_ctaConf.getConfEntInt<uint64_t>("Catalogue", "NumberOfConnections", nullptr);
    const uint64_t nbArchiveFileListingConns = 2;
 
-- 
GitLab