Deprecated
This page is deprecated and may contain information that is no longer up to date.
Building CTA¶
Check out the CERN Tape Archive Repository¶
The build should be performed on CentOS7.
Clone the CTA git repository
Go to the CTA folder and init the submodules:
Setup Oracle Instant Client repository¶
CTA requires the standard Oracle instantclient devel RPM in order to be built, and the instantclient basic RPM in order to run. Install Oracle repo file with the following commands:
sudo yum -y install wget
sudo wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
sudo tee /etc/yum.repos.d/oracle-instant-client.repo > /dev/null << 'EOF'
[oracle-instant-client]
name=Oracle instant client
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
EOF
You should not install instant client RPMs. They will be installed by yum-builddep
command automatically.
Configure yum repos, priorities and versions¶
sudo yum-config-manager --add-repo=./continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/centos-cernonly.repo
sudo yum-config-manager --add-repo=./continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo
sudo yum-config-manager --add-repo=./continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/eos-quarkdb.repo
sudo cp ./continuousintegration/docker/ctafrontend/cc7/etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/versionlock.list
Create cta dependencies RPMs¶
Some specific rpm are necessary to build them follow this script:
cd ~
git clone https://gitlab.cern.ch/cta/cta-dependencies.git
cd cta-dependencies
sudo yum install -y centos-release-scl cmake3 rpm-build llvm5.0
sudo yum install -y devtoolset-8 systemd-rpm-macros zlib-devel
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql14-devel
cp -r /usr/pgsql-14/include/* /usr/include/
cp -r /usr/pgsql-14/lib/* /usr/lib64
source /opt/rh/devtoolset-8/enable
sudo mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
sudo make
Create source rpm¶
If the correct version of the required CTA RPMs is not available, they can be built from source as described in this section.
First, build the source RPM of the CTA project by running cmake
against the CTA sources that were installed in
Section [install_cta_get_cta_repo]:
Install build deps
Build binaries¶
Delete the contents of the CTA_build
directory, then re-run cmake
to
prepare to build the complete CTA project (not just the source RPMs):
Build CTA by running make
:
Once the build is completed you can run the unit tests to verify everything worked :
Build packages¶
Build the CTA RPMs:
Install¶
First it's needed to copy the external repository for oracle-instanclient-19.3-basic
in /etc/yum.repos.d/
:
[oracle-instant-client]
name=Oracle instant client
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
priority=1
or running this command:
yum-config-manager --add-repo https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/
Install the CTA RPMs:
The cta-migration-tools package needs some CERN-specific dependencies and can be omitted.