Skip to content

Commit

Permalink
add cta-release package source to CTA tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurélien Gounon committed Aug 5, 2021
1 parent 12796ac commit 1591bda
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
76 changes: 76 additions & 0 deletions cta-release/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
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)

8 changes: 8 additions & 0 deletions cta-release/ceph.repo
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions cta-release/cta.repo
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions cta-release/eos-citrine-depend.repo
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions cta-release/eos-citrine.repo
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions cta-release/eos-quarkdb.repo
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions cta-release/oracle-instant-client.repo
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions cta.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1591bda

Please sign in to comment.