From 3b7d8ef7e337a20e0e6edc5c42f8ee3e2517bec2 Mon Sep 17 00:00:00 2001
From: Michael Davis <michael.davis@cern.ch>
Date: Tue, 30 Jan 2018 09:55:47 +0100
Subject: [PATCH] [kill-bash] Restores cta-cli.conf

Not required by new SSI interface as endpoint is specified in the
workflow not in a configuration file. But it is still needed by
cta-admin.
---
 cmdline/CMakeLists.txt | 4 +++-
 cmdline/cta-cli.conf   | 2 ++
 cta.spec.in            | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 cmdline/cta-cli.conf

diff --git a/cmdline/CMakeLists.txt b/cmdline/CMakeLists.txt
index 8218e7d13d..37a9802139 100644
--- a/cmdline/CMakeLists.txt
+++ b/cmdline/CMakeLists.txt
@@ -37,7 +37,6 @@ target_link_libraries(cta-admin XrdSsiPbEosCta XrdSsi-4 XrdSsiLib)
 set_property (TARGET cta-admin APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
 # Get some extra debug messages on stdout
 #target_compile_definitions(cta-admin PUBLIC XRDSSI_DEBUG)
-install(TARGETS cta-admin DESTINATION usr/bin)
 
 #
 # cta-wfe-test archive|retrieve|delete <options> allows testing of the SSI WorkFlow Engine hooks
@@ -51,5 +50,8 @@ target_link_libraries(cta-wfe-test cryptopp ctacommon XrdSsiPbEosCta XrdSsi-4 Xr
 set_property (TARGET cta-wfe-test APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH})
 # Get some extra debug messages on stdout
 #target_compile_definitions(eoscta_stub PUBLIC XRDSSI_DEBUG)
+
+install(TARGETS cta-admin DESTINATION usr/bin)
 install(TARGETS cta-wfe-test DESTINATION usr/bin)
+install(FILES cta-cli.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cta)
 
diff --git a/cmdline/cta-cli.conf b/cmdline/cta-cli.conf
new file mode 100644
index 0000000000..28cac16b4a
--- /dev/null
+++ b/cmdline/cta-cli.conf
@@ -0,0 +1,2 @@
+# The CTA frontend address in the form <FQDN>:<TCPPort>
+<host>.cern.ch:10955
diff --git a/cta.spec.in b/cta.spec.in
index b0ac812012..9801329348 100644
--- a/cta.spec.in
+++ b/cta.spec.in
@@ -115,6 +115,7 @@ The xroot plugin
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/cta-admin
 %attr(0755,root,root) %{_bindir}/cta-wfe-test
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-cli.conf
 
 %else
 
@@ -177,6 +178,7 @@ The xroot plugin
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/cta-admin
 %attr(0755,root,root) %{_bindir}/cta-wfe-test
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/cta-cli.conf
 
 %package -n cta-lib
 Summary: CERN Tape Archive libraries
-- 
GitLab