From 1591bdaa7126d6a9cf673a9312e5308fe082bc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Gounon?= Date: Thu, 5 Aug 2021 16:15:53 +0200 Subject: [PATCH] add cta-release package source to CTA tree --- CMakeLists.txt | 1 + ReleaseNotes.md | 1 + cta-release/CMakeLists.txt | 76 ++++++++++++++++++++++++++ cta-release/ceph.repo | 8 +++ cta-release/cta.repo | 6 ++ cta-release/eos-citrine-depend.repo | 6 ++ cta-release/eos-citrine.repo | 7 +++ cta-release/eos-quarkdb.repo | 7 +++ cta-release/oracle-instant-client.repo | 7 +++ cta.spec.in | 21 +++++++ 10 files changed, 140 insertions(+) create mode 100644 cta-release/CMakeLists.txt create mode 100644 cta-release/ceph.repo create mode 100644 cta-release/cta.repo create mode 100644 cta-release/eos-citrine-depend.repo create mode 100644 cta-release/eos-citrine.repo create mode 100644 cta-release/eos-quarkdb.repo create mode 100644 cta-release/oracle-instant-client.repo diff --git a/CMakeLists.txt b/CMakeLists.txt index 8468adec26..46934e12b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,7 @@ ELSE(DEFINED PackageOnly) add_subdirectory(continuousintegration/orchestration/tests) + add_subdirectory(cta-release) #Generate version information configure_file(${PROJECT_SOURCE_DIR}/version.hpp.in diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 7bdf5c98e7..569d83cc3b 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -4,6 +4,7 @@ ### Features - cta/CTA#1016 New options for filtering deleted files using `cta-admin rtf ls` command. + - cta/CTA#983 Add cta-release package for public binary rpm distribution. ### Bug fixes diff --git a/cta-release/CMakeLists.txt b/cta-release/CMakeLists.txt new file mode 100644 index 0000000000..965999a806 --- /dev/null +++ b/cta-release/CMakeLists.txt @@ -0,0 +1,76 @@ +# @project The CERN Tape Archive (CTA) +# @copyright Copyright(C) 2015-2021 CERN +# @license This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +cmake_minimum_required (VERSION 2.6) + +# As file(DOWNLOAD) fails silently +function(safedl SOURCEURL DESTFILE) + file(DOWNLOAD "${SOURCEURL}" + "${DESTFILE}" + STATUS status + ) + + list(GET status 0 status_code) + list(GET status 1 status_string) + + if(NOT status_code EQUAL 0) + message(WARNING "error: + downloading ${SOURCEURL} failed + ${status_string} + ") + endif() +endfunction() + +# We need the el version to select the proper key for Oracle repo +include(../cmake/UseRPMToolsEnvironment.cmake) + +if( "${RPMTools_RPMBUILD_DIST}" MATCHES "\\.el([0-9])\\.") + set(OSV "${CMAKE_MATCH_1}") +else() +# Default to el7 + set(OSV "7") +endif() + +# Download package signing keys +safedl("https://storage-ci.web.cern.ch/storage-ci/storageci.key" + "${CMAKE_CURRENT_SOURCE_DIR}/RPM-GPG-KEY-storageci" +) + +safedl("https://download.ceph.com/keys/release.asc" + "${CMAKE_CURRENT_SOURCE_DIR}/RPM-GPG-KEY-ceph" +) + +safedl("https://yum.oracle.com/RPM-GPG-KEY-oracle-ol${OSV}" + "${CMAKE_CURRENT_SOURCE_DIR}/RPM-GPG-KEY-oracle" +) + +# Repos files +file (GLOB REPO_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/*.repo" +) + +# Signing keys +file (GLOB KEY_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/RPM-GPG-KEY-*" +) + +# Install package files +install (FILES ${REPO_FILES} + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/yum.repos.d) +install (FILES ${KEY_FILES} + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pki/rpm-gpg) +install (FILES ../continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/yum/pluginconf.d + RENAME versionlock.cta) + diff --git a/cta-release/ceph.repo b/cta-release/ceph.repo new file mode 100644 index 0000000000..8dcb736696 --- /dev/null +++ b/cta-release/ceph.repo @@ -0,0 +1,8 @@ +[Ceph] +name=Ceph packages for $basearch +baseurl=http://download.ceph.com/rpm-nautilus/el$releasever/$basearch +enabled=1 +gpgcheck=1 +protect=1 +type=rpm-md +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ceph diff --git a/cta-release/cta.repo b/cta-release/cta.repo new file mode 100644 index 0000000000..54a744cd6c --- /dev/null +++ b/cta-release/cta.repo @@ -0,0 +1,6 @@ +[cta] +name=CTA releases from CTA project +baseurl=https://cta-repo.web.cern.ch/cta-repo/ +enabled=1 +gpgcheck=0 +priority=10 diff --git a/cta-release/eos-citrine-depend.repo b/cta-release/eos-citrine-depend.repo new file mode 100644 index 0000000000..cd56da9355 --- /dev/null +++ b/cta-release/eos-citrine-depend.repo @@ -0,0 +1,6 @@ +[eos-citrine-depend] +name=dependencies for EOS citrine releases from EOS project +baseurl=http://storage-ci.web.cern.ch/storage-ci/eos/citrine-depend/el-$releasever/$basearch/ +enabled=1 +gpgcheck=0 +priority=10 diff --git a/cta-release/eos-citrine.repo b/cta-release/eos-citrine.repo new file mode 100644 index 0000000000..67b7de8d00 --- /dev/null +++ b/cta-release/eos-citrine.repo @@ -0,0 +1,7 @@ +[eos-citrine] +name=EOS citrine releases from EOS project +baseurl=http://storage-ci.web.cern.ch/storage-ci/eos/citrine/tag/testing/el-$releasever/$basearch/ +enabled=1 +gpgcheck=1 +priority=10 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-storageci diff --git a/cta-release/eos-quarkdb.repo b/cta-release/eos-quarkdb.repo new file mode 100644 index 0000000000..9137a09329 --- /dev/null +++ b/cta-release/eos-quarkdb.repo @@ -0,0 +1,7 @@ +[eos-quarkdb] +name=EOS quarkdb releases from EOS project +baseurl=http://storage-ci.web.cern.ch/storage-ci/quarkdb/tag/el$releasever/$basearch/ +enabled=1 +gpgcheck=1 +priority=10 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-storageci diff --git a/cta-release/oracle-instant-client.repo b/cta-release/oracle-instant-client.repo new file mode 100644 index 0000000000..b9a500505b --- /dev/null +++ b/cta-release/oracle-instant-client.repo @@ -0,0 +1,7 @@ +[oracle-instant-client] +name=Oracle instant client +baseurl=https://yum.oracle.com/repo/OracleLinux/OL$releasever/oracle/instantclient/$basearch +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle +gpgcheck=1 +enabled=1 +priority=1 diff --git a/cta.spec.in b/cta.spec.in index b963bf21f8..fd91fa999a 100644 --- a/cta.spec.in +++ b/cta.spec.in @@ -491,6 +491,27 @@ Currently contains a helper for the client-ar script, which should be installed %files -n cta-systemtest-helpers %attr(0755,root,root) /usr/bin/cta-client-ar-abortPrepare +%package -n cta-release +Summary: Repository configuration for CTA dependencies +Group: Application/CTA +Requires: yum-plugin-versionlock +%description -n cta-release +Repository configuration for CTA dependencies +This package contains .repo files, gpg keys and yum-versionlock configuration fro CTA +%files -n cta-release +%defattr(0644,root,root) +%config(noreplace) %{_sysconfdir}/yum.repos.d/* +%{_sysconfdir}/pki/rpm-gpg/* +%{_sysconfdir}/yum/pluginconf.d/versionlock.cta + +%post -n cta-release +cat << EOF +------ +CTA versionlock file installed as "%{_sysconfdir}/yum/pluginconf.d/versionlock.cta" +Remember to add its content to "%{_sysconfdir}/yum/pluginconf.d/versionlock.list" to enable it. +------ +EOF + %changelog * Tue Jul 27 2021 julien.leduc (at) cern.ch - 4.0-5 - [frontend] Add options to "tapepool ls" to filter tapepools on their name, vo and encryption