Skip to content

Commit 24082c6

Browse files
authored
Merge pull request #1974 from bbockelm/xrootd-s3-fix
Switch xrootd-s3-http plugin to be built from source
2 parents c2315bc + 2317ff7 commit 24082c6

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

images/Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,29 @@ RUN yum -y update \
8787
###############################
8888
FROM dependency-build AS xrootd-plugin-builder
8989
# Install necessary build dependencies
90-
RUN yum install -y --enablerepo=osg-testing curl-devel openssl-devel git cmake3 gcc-c++ sqlite-devel
90+
RUN yum install -y --enablerepo=osg-testing curl-devel openssl-devel git cmake3 gcc-c++ sqlite-devel xrootd-server-devel tinyxml2-devel
9191

9292
# The ADD command with a api.github.com URL in the next couple of sections
9393
# are for cache-hashing of the external repository that we rely on to build
9494
# the image
95-
ENV JSON_VERSION="v3.11.3" \
95+
ENV XROOTD_S3_HTTP_VERSION="0.2.1" \
96+
JSON_VERSION="v3.11.3" \
9697
JSON_SCHEMA_VALIDATOR_VERSION="2.3.0" \
9798
LOTMAN_VERSION="v0.0.4"
9899

99100
ADD https://api.github.com/repos/nlohmann/json/git/refs/tags/${JSON_VERSION} /tmp/hash-json
100101
ADD https://api.github.com/repos/pboettch/json-schema-validator/git/refs/tags/${JSON_SCHEMA_VALIDATOR_VERSION} /tmp/hash-json
101102
ADD https://api.github.com/repos/PelicanPlatform/lotman/git/refs/tags/${LOTMAN_VERSION} /tmp/hash-json
102103

104+
RUN \
105+
git clone https://github.com/PelicanPlatform/xrootd-s3-http.git && \
106+
cd xrootd-s3-http && \
107+
mkdir -p ~/rpmbuild/SOURCES/ && \
108+
curl -L https://github.com/PelicanPlatform/xrootd-s3-http/archive/refs/tags/v${XROOTD_S3_HTTP_VERSION}/xrootd-s3-http-${XROOTD_S3_HTTP_VERSION}.tar.gz > ~/rpmbuild/SOURCES/xrootd-s3-http-${XROOTD_S3_HTTP_VERSION}.tar.gz && \
109+
git checkout v${XROOTD_S3_HTTP_VERSION} && \
110+
rpmbuild -ba rpm/xrootd-s3-http.spec && \
111+
cp ~/rpmbuild/RPMS/*/xrootd-s3-http-${XROOTD_S3_HTTP_VERSION}*.rpm /root/xrootd-s3-http.rpm
112+
103113
# LotMan Installation
104114
# First install dependencies
105115
RUN git clone https://github.com/nlohmann/json.git && \
@@ -126,7 +136,6 @@ FROM dependency-build AS final-stage
126136
# should go here. Installation in a previous section may result in the packages being
127137
# installed only in the intermediate builder containers!
128138
RUN yum install -y --enablerepo=osg-testing sssd-client xrdcl-pelican xrootd-multiuser
129-
RUN yum install -y --enablerepo=epel-testing xrootd-s3-http
130139

131140
WORKDIR /pelican
132141

@@ -196,6 +205,8 @@ COPY --from=xrootd-plugin-builder /usr/lib64/libLotMan.so /usr/lib64/
196205
COPY --from=xrootd-plugin-builder /usr/include/nlohmann /usr/include/nlohmann
197206
# Copy the JSON schema validator library
198207
COPY --from=xrootd-plugin-builder /usr/lib64/libnlohmann_json_schema_validator.a /usr/lib64/
208+
# Copy the xrootd-s3-http plugin RPM and install it
209+
COPY --from=xrootd-plugin-builder /root/xrootd-s3-http.rpm /usr/lib64
199210

200211
COPY images/entrypoint.sh /entrypoint.sh
201212

@@ -204,7 +215,9 @@ COPY --from=pelican-build /pelican/dist/linux_amd64/pelican_linux_amd64_v1/pelic
204215
COPY --from=pelican-build /pelican/dist/linux_amd64/pelican_linux_amd64_v1/pelican /usr/local/bin/osdf
205216
RUN chmod +x /usr/local/bin/pelican \
206217
&& chmod +x /usr/local/bin/osdf \
207-
&& chmod +x /entrypoint.sh
218+
&& chmod +x /entrypoint.sh \
219+
&& rpm -Uhv /usr/lib64/xrootd-s3-http.rpm \
220+
&& rm /usr/lib64/xrootd-s3-http.rpm
208221

209222
######################
210223
# Pelican base stage #

images/dev.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ADD https://api.github.com/repos/PelicanPlatform/xrootd-s3-http/git/refs/heads/m
8282
RUN \
8383
git clone https://github.com/PelicanPlatform/xrootd-s3-http.git && \
8484
cd xrootd-s3-http && \
85-
git checkout v0.1.8 && \
85+
git checkout v0.2.1 && \
8686
git submodule update --init --recursive && \
8787
mkdir build && cd build && \
8888
cmake -DLIB_INSTALL_DIR=/usr/lib64 .. && \

0 commit comments

Comments
 (0)