From 4bbe5e9ab0909400beba9c00d666219038543e47 Mon Sep 17 00:00:00 2001 From: Matyas Selmeci Date: Fri, 12 May 2023 12:57:50 -0500 Subject: [PATCH] Add option to use the highest versioned tag of CVMFSEXEC Requires git >= 2 for the `--sort=version:refname` feature, which means it will no longer build on el7. --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fdc0a49..6215097 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN useradd osg \ osg-wn-client \ apptainer \ attr \ - git \ + 'git >= 2' \ rsyslog rsyslog-gnutls python3-cryptography python3-requests \ bind-utils \ && if [[ $BASE_OS != el9 ]]; then yum -y install redhat-lsb-core; fi \ @@ -45,9 +45,13 @@ RUN if [[ $BASE_YUM_REPO = release ]]; then \ # Workaround for https://opensciencegrid.atlassian.net/browse/HTCONDOR-1574 RUN mkdir -p /usr/libexec/condor/singularity_test_sandbox/proc -ARG CVMFSEXEC_BRANCH=master +# CVMFSEXEC_BRANCH=TAGGED means use the highest versioned tag +ARG CVMFSEXEC_BRANCH=TAGGED RUN git clone https://github.com/cvmfs/cvmfsexec /cvmfsexec \ && cd /cvmfsexec \ + && if [[ $CVMFSEXEC_BRANCH = TAGGED ]]; then \ + CVMFSEXEC_BRANCH=$(git tag --sort=version:refname | tail -n 1); \ + fi \ && git checkout $CVMFSEXEC_BRANCH \ && ./makedist osg \ # /cvmfs-cache and /cvmfs-logs is where the cache and logs will go; possibly bind-mounted. \