forked from opensciencegrid/xrootd-cmstfc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add cxx11 standard * update version * Switch to matrix build * Update Dockerfile * fix ci string * update build * Add pytest * fix tag * Update dockerfile * Update dockerfile * add rpm test * Update centos docker * Update centos7 spec * Add centos7 to ci * source devtoolset-7 * bump version * Bump dockerfile
- Loading branch information
Showing
5 changed files
with
97 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,49 @@ | ||
FROM almalinux:8 | ||
ARG IMAGE=almalinux:8 | ||
FROM $IMAGE | ||
|
||
MAINTAINER Sarun Nuntaviriyakul <[email protected]> | ||
LABEL org.opencontainers.image.source https://github.com/guyzsarun/xrootd-cmsjson | ||
|
||
WORKDIR /xrootd | ||
|
||
ARG IMAGE=almalinux:8 | ||
RUN yum -y update && \ | ||
yum install -y dnf \ | ||
https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ | ||
https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el8-release-latest.rpm \ | ||
epel-release | ||
yum install -y --skip-broken \ | ||
dnf \ | ||
https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el$(echo $IMAGE | cut -d ":" -f 2)-release-latest.rpm \ | ||
epel-release \ | ||
centos-release-scl | ||
|
||
RUN dnf group install -y "Development Tools" | ||
|
||
# CMS TFC dependency | ||
RUN yum install -y cmake \ | ||
wget \ | ||
xrootd \ | ||
python3-devel \ | ||
python3-xrootd \ | ||
xrootd-devel \ | ||
pcre-devel \ | ||
xerces-c-devel \ | ||
xrootd-devel \ | ||
https://cbs.centos.org/kojifiles/packages/jsoncpp/1.9.4/4.el8s/x86_64/jsoncpp-1.9.4-4.el8s.x86_64.rpm \ | ||
https://cbs.centos.org/kojifiles/packages/jsoncpp/1.9.4/4.el8s/x86_64/jsoncpp-devel-1.9.4-4.el8s.x86_64.rpm | ||
RUN yum install -y --enablerepo=osg-contrib \ | ||
cmake3 \ | ||
xrootd \ | ||
python3-devel \ | ||
python3-xrootd \ | ||
xrootd-devel \ | ||
pcre-devel \ | ||
xerces-c-devel \ | ||
jsoncpp \ | ||
jsoncpp-devel | ||
|
||
|
||
# For Centos 7 | ||
RUN if [[ $(echo $IMAGE | cut -d ":" -f 2) = "7" ]]; then \ | ||
yum install -y devtoolset-7; \ | ||
fi | ||
|
||
|
||
RUN pip3 install pytest | ||
|
||
COPY . . | ||
|
||
RUN mkdir -p build | ||
RUN cd build && \ | ||
cmake .. -DBUILD_TEST=true && \ | ||
RUN if [[ $(echo $IMAGE | cut -d ":" -f 2) = "7" ]]; then \ | ||
source /opt/rh/devtoolset-7/enable; \ | ||
fi && mkdir -p build && \ | ||
cd build && \ | ||
cmake3 .. -DBUILD_TEST=true && \ | ||
make && \ | ||
make install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,44 @@ | ||
FROM almalinux:8 | ||
ARG IMAGE=almalinux:8 | ||
FROM $IMAGE | ||
|
||
MAINTAINER Sarun Nuntaviriyakul <[email protected]> | ||
LABEL org.opencontainers.image.source https://github.com/guyzsarun/xrootd-cmsjson | ||
|
||
WORKDIR /xrootd | ||
|
||
ARG IMAGE=almalinux:8 | ||
RUN yum -y update && \ | ||
yum install -y dnf \ | ||
https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ | ||
https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el8-release-latest.rpm \ | ||
epel-release | ||
yum install -y --skip-broken \ | ||
dnf \ | ||
https://repo.opensciencegrid.org/osg/3.6/osg-3.6-el$(echo $IMAGE | cut -d ":" -f 2)-release-latest.rpm \ | ||
epel-release \ | ||
centos-release-scl | ||
|
||
RUN dnf group install -y "Development Tools" | ||
|
||
# CMS TFC dependency | ||
RUN yum install -y cmake \ | ||
wget \ | ||
xrootd \ | ||
python3-devel \ | ||
python3-xrootd \ | ||
xrootd-devel \ | ||
pcre-devel \ | ||
xerces-c-devel \ | ||
xrootd-devel \ | ||
https://cbs.centos.org/kojifiles/packages/jsoncpp/1.9.4/4.el8s/x86_64/jsoncpp-1.9.4-4.el8s.x86_64.rpm \ | ||
https://cbs.centos.org/kojifiles/packages/jsoncpp/1.9.4/4.el8s/x86_64/jsoncpp-devel-1.9.4-4.el8s.x86_64.rpm | ||
RUN yum install -y --enablerepo=osg-contrib \ | ||
cmake3 \ | ||
xrootd \ | ||
python3-devel \ | ||
python3-xrootd \ | ||
xrootd-devel \ | ||
pcre-devel \ | ||
xerces-c-devel \ | ||
jsoncpp \ | ||
jsoncpp-devel | ||
|
||
|
||
# For Centos 7 | ||
RUN if [[ $(echo $IMAGE | cut -d ":" -f 2) = "7" ]]; then \ | ||
yum install -y devtoolset-7; \ | ||
fi | ||
|
||
|
||
COPY . . | ||
|
||
RUN mkdir -p /root/rpmbuild/SOURCES | ||
RUN tar -zvcf /root/rpmbuild/SOURCES/xrootd-cmstfc.tar.gz --transform s/xrootd/xrootd-cmstfc-2.0.0/ ../xrootd | ||
RUN tar -zvcf /root/rpmbuild/SOURCES/xrootd-cmstfc.tar.gz --transform s/xrootd/xrootd-cmstfc-2.0.1/ ../xrootd | ||
|
||
RUN rpmbuild -bb spec/xrootd-cmstfc.spec | ||
|
||
RUN yum install -y /root/rpmbuild/RPMS/x86_64/xrootd-cmstfc-2.0.0-1.el8.x86_64.rpm | ||
RUN yum install -y /root/rpmbuild/RPMS/x86_64/xrootd-cmstfc-2.0.1-1.el$(echo $IMAGE | cut -d ":" -f 2).x86_64.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
Name: xrootd-cmstfc | ||
Version: 2.0.0 | ||
Version: 2.0.1 | ||
Release: 1%{?dist} | ||
Summary: CMS TFC plugin for xrootd | ||
|
||
Group: System Environment/Daemons | ||
License: BSD | ||
URL: https://github.com/CMSCompOps/xrootd-cmstfc | ||
# Generated from: | ||
# git-archive master | gzip -7 > ~/rpmbuild/SOURCES/xrootd-lcmaps.tar.gz | ||
|
||
%if %{rhel} == 7 | ||
%define CMAKE cmake3 | ||
%else | ||
%define CMAKE cmake | ||
%endif | ||
|
||
Source0: %{name}.tar.gz | ||
|
||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | ||
|
@@ -25,16 +30,16 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
|
||
BuildRequires: xrootd-devel >= 1:%{xrootd_current_major}.0.0-1 | ||
BuildRequires: xrootd-devel < 1:%{xrootd_next_major}.0.0-1 | ||
BuildRequires: cmake pcre-devel xerces-c-devel jsoncpp-devel >= 1.9.4 | ||
BuildRequires: %{CMAKE} pcre-devel xerces-c-devel jsoncpp-devel >= 1.9.4 | ||
|
||
Requires: /usr/bin/xrootd pcre xerces-c jsoncpp >= 1.9.4 | ||
|
||
#%if 0%%{?rhel} < 7 | ||
#Requires: xrootd4 >= 1:4.1.0 | ||
#%else | ||
%if %{rhel} == 7 | ||
BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-elfutils devtoolset-7-binutils devtoolset-7-make devtoolset-7-toolchain | ||
%endif | ||
|
||
Requires: xrootd >= 1:%{xrootd_current_major}.0.0-1 | ||
Requires: xrootd < 1:%{xrootd_next_major}.0.0-1 | ||
#%endif | ||
|
||
%package devel | ||
Summary: Development headers and libraries for Xrootd CMSTFC plugin | ||
|
@@ -51,7 +56,12 @@ Group: System Environment/Development | |
|
||
%build | ||
cd %{name}-%{version} | ||
%if %{rhel} == 7 | ||
source /opt/rh/devtoolset-7/enable | ||
%cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_LIBDIR=%{_lib} . | ||
%else | ||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_LIBDIR=%{_lib} . | ||
%endif | ||
make VERBOSE=1 %{?_smp_mflags} | ||
|
||
%install | ||
|
@@ -66,16 +76,15 @@ rm -rf $RPM_BUILD_ROOT | |
%defattr(-,root,root,-) | ||
%{_libdir}/libXrdCmsTfc.so | ||
%{_libdir}/libXrdCmsJson.so | ||
%if 0%{?rhel} < 8 | ||
%{_libdir}/libXrdCmsTfc.so.* | ||
%{_libdir}/libXrdCmsJson.so.* | ||
%endif | ||
%files devel | ||
%defattr(-,root,root,-) | ||
%{_includedir}/XrdCmsTfc.hh | ||
%{_includedir}/XrdCmsJson.hh | ||
|
||
%changelog | ||
* Mon Sep 25 2023 Sarun Nuntaviriyakul <[email protected]> - 2.0.1-1 | ||
- Support build for EL7 | ||
|
||
* Fri Aug 11 2023 Sarun Nuntaviriyakul <[email protected]> - 2.0.0-1 | ||
- Add JSON module (libXrdCmsJson.so) | ||
|
||
|
@@ -142,4 +151,4 @@ rm -rf $RPM_BUILD_ROOT | |
- Fix for TFC parsing to better respect rule order; request from Florida. | ||
|
||
* Tue Aug 24 2010 Brian Bockelman <[email protected]> 1.4.0-1 | ||
- Break xrootd-cmstfc off into its own standalone RPM. | ||
- Break xrootd-cmstfc off into its own standalone RPM. |