diff --git a/ChangeLog b/ChangeLog index dcb32dc9..9152cbb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ [Upcoming] + [4.2.0] + + Add compatibility for OpenSSL across iRODS versions. + + Add to the release Makefile Docker container builds for + iRODS 4.2.7, 4.2.11 and 4.2.12. + + Add experimental CI build against iRODS 4.3-nightly. + + Fix missing checksum file for the release tarball. + [4.1.0] Add iRODS 4.2.12 to test matrix. diff --git a/release/Makefile b/release/Makefile index 467b7f1d..dde9edd8 100644 --- a/release/Makefile +++ b/release/Makefile @@ -7,16 +7,15 @@ DOCKER_REGISTRY?=docker.io DOCKER_USER?=wsinpg endif -BATON_VERSION?=4.0.1 -IRODS_VERSION?=4.2.11 - NOW=$(shell date --utc --iso-8601=seconds) DOCKER_PREFIX?=$(DOCKER_REGISTRY)/$(DOCKER_USER) DOCKER_ARGS ?= --platform linux/amd64 --progress=plain --rm .PHONY: clean push -image_names += ub-18.04-baton-irods-$(IRODS_VERSION) +image_names += ub-16.04-baton-irods-4.2.7 +image_names += ub-18.04-baton-irods-4.2.11 +image_names += ub-18.04-baton-irods-4.2.12 git_url=$(shell git remote get-url origin) git_commit=$(shell git log --pretty=format:'%H' -n 1) @@ -28,22 +27,58 @@ all: $(images) push: $(remote) -ub-18.04-baton-irods-$(IRODS_VERSION).$(TAG): Dockerfile +ub-16.04-baton-irods-4.2.7.$(TAG): ubuntu/16.04/Dockerfile + docker buildx build $(DOCKER_ARGS) \ + --load \ + --build-context source=.. \ + --build-arg DOCKER_PREFIX=$(DOCKER_PREFIX) \ + --build-arg DOCKER_IMAGE=$(subst .$(TAG),,$@) \ + --build-arg DOCKER_TAG=$(TAG) \ + --build-arg IRODS_VERSION="4.2.7" \ + --build-arg BATON_VERSION=$(BATON_VERSION) \ + --label org.opencontainers.image.title="iRODS 4.2.7 baton client, Ubuntu 16.04" \ + --label org.opencontainers.image.source=$(git_url) \ + --label org.opencontainers.image.revision=$(git_commit) \ + --label org.opencontainers.image.version=$(TAG) \ + --label org.opencontainers.image.created=$(NOW) \ + --tag $(DOCKER_PREFIX)/ub-16.04-baton-irods-4.2.7:latest \ + --tag $(DOCKER_PREFIX)/ub-16.04-baton-irods-4.2.7:$(TAG) --file $< . + touch $@ + +ub-18.04-baton-irods-4.2.11.$(TAG): ubuntu/18.04/Dockerfile + docker buildx build $(DOCKER_ARGS) \ + --load \ + --build-context source=.. \ + --build-arg DOCKER_PREFIX=$(DOCKER_PREFIX) \ + --build-arg DOCKER_IMAGE=$(subst .$(TAG),,$@) \ + --build-arg DOCKER_TAG=$(TAG) \ + --build-arg IRODS_VERSION="4.2.11" \ + --build-arg BATON_VERSION=$(BATON_VERSION) \ + --label org.opencontainers.image.title="iRODS 4.2.11 baton client, Ubuntu 18.04" \ + --label org.opencontainers.image.source=$(git_url) \ + --label org.opencontainers.image.revision=$(git_commit) \ + --label org.opencontainers.image.version=$(TAG) \ + --label org.opencontainers.image.created=$(NOW) \ + --tag $(DOCKER_PREFIX)/ub-18.04-baton-irods-4.2.11:latest \ + --tag $(DOCKER_PREFIX)/ub-18.04-baton-irods-4.2.11:$(TAG) --file $< . + touch $@ + +ub-18.04-baton-irods-4.2.12.$(TAG): ubuntu/18.04/Dockerfile docker buildx build $(DOCKER_ARGS) \ --load \ --build-context source=.. \ --build-arg DOCKER_PREFIX=$(DOCKER_PREFIX) \ --build-arg DOCKER_IMAGE=$(subst .$(TAG),,$@) \ --build-arg DOCKER_TAG=$(TAG) \ - --build-arg IRODS_VERSION=$(IRODS_VERSION) \ + --build-arg IRODS_VERSION="4.2.12" \ --build-arg BATON_VERSION=$(BATON_VERSION) \ - --label org.opencontainers.image.title="iRODS $(IRODS_VERSION) baton client, Ubuntu 18.04" \ + --label org.opencontainers.image.title="iRODS 4.2.12 baton client, Ubuntu 18.04" \ --label org.opencontainers.image.source=$(git_url) \ --label org.opencontainers.image.revision=$(git_commit) \ --label org.opencontainers.image.version=$(TAG) \ --label org.opencontainers.image.created=$(NOW) \ - --tag $(DOCKER_PREFIX)/ub-18.04-baton-irods-$(IRODS_VERSION):latest \ - --tag $(DOCKER_PREFIX)/ub-18.04-baton-irods-$(IRODS_VERSION):$(TAG) --file $< . + --tag $(DOCKER_PREFIX)/ub-18.04-baton-irods-4.2.12:latest \ + --tag $(DOCKER_PREFIX)/ub-18.04-baton-irods-4.2.12:$(TAG) --file $< . touch $@ %.$(TAG).pushed: %.$(TAG) diff --git a/release/ubuntu/16.04/Dockerfile b/release/ubuntu/16.04/Dockerfile new file mode 100644 index 00000000..48cb32a6 --- /dev/null +++ b/release/ubuntu/16.04/Dockerfile @@ -0,0 +1,133 @@ +# syntax=docker/dockerfile:1 + +ARG BASE_IMAGE=ubuntu:16.04 +FROM $BASE_IMAGE as installer + +ARG IRODS_VERSION="4.2.7" + +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ + apt-get update && \ + apt-get install -q -y --no-install-recommends \ + apt-transport-https \ + apt-utils \ + ca-certificates \ + curl \ + dirmngr \ + gnupg \ + gnupg-agent \ + lsb-release \ + locales && \ + locale-gen en_GB en_GB.UTF-8 && \ + localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8 + +ENV LANG=en_GB.UTF-8 \ + LANGUAGE=en_GB \ + LC_ALL=en_GB.UTF-8 + +RUN curl -sSL https://packages.irods.org/irods-signing-key.asc | apt-key add - && \ + echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" |\ + tee /etc/apt/sources.list.d/renci-irods.list && \ + apt-get update && \ + apt-get install -q -y --no-install-recommends \ + irods-dev="${IRODS_VERSION}" \ + irods-runtime="${IRODS_VERSION}" + +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "E1DD270288B4E6030699E45FA1715D88E1DF1F24" && \ + echo "deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu $(lsb_release -sc) main" |\ + tee /etc/apt/sources.list.d/git-core.list && \ + apt-get update && \ + apt-get install -q -y --no-install-recommends \ + git + +# libdeflate-dev is not available on Ubuntu 16.04 +RUN apt-get update && \ + apt-get install -q -y --no-install-recommends \ + autoconf \ + automake \ + build-essential \ + libtool \ + pkg-config \ + python3-sphinx \ + libjansson-dev \ + libcurl3-dev \ + liblzma-dev \ + zlib1g-dev + +COPY --from=source . /code + +WORKDIR /code + +ENV CPPFLAGS="-I/usr/include/irods" + +RUN autoreconf -fi && \ + ./configure && \ + make install && \ + ldconfig + +FROM $BASE_IMAGE + +ARG DOCKER_IMAGE +ARG DOCKER_TAG +ARG IRODS_VERSION="4.2.7" + +ARG USER=baton +ARG UID=1000 +ARG GID=$UID + +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ + apt-get update && \ + apt-get install -q -y --no-install-recommends \ + apt-transport-https \ + apt-utils \ + ca-certificates \ + curl \ + dirmngr \ + gnupg \ + gnupg-agent \ + lsb-release \ + locales && \ + locale-gen en_GB en_GB.UTF-8 && \ + localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8 + +ENV LANG=en_GB.UTF-8 \ + LANGUAGE=en_GB \ + LC_ALL=en_GB.UTF-8 + +RUN curl -sSL https://packages.irods.org/irods-signing-key.asc | apt-key add - && \ + echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" |\ + tee /etc/apt/sources.list.d/renci-irods.list && \ + apt-get update && \ + apt-get install -q -y --no-install-recommends \ + irods-runtime="${IRODS_VERSION}" \ + jq \ + libjansson4 \ + libcurl3 \ + liblzma5 \ + zlib1g \ + unattended-upgrades && \ + unattended-upgrade -v && \ + apt-get remove -q -y unattended-upgrades && \ + apt-get autoremove -q -y && \ + apt-get clean -q -y && \ + rm -rf /var/lib/apt/lists/* + +# Copy the installed baton application +COPY --from=installer /usr/local /usr/local + +# Copy the singularity-wrapper scripts +COPY --from=installer /code/release/singularity-* /usr/local/bin +COPY --from=installer /code/release/manifest.json /usr/local/etc/baton/manifest.json + +# Configure the singularity-wrapper script +ENV MANIFEST_PATH="/usr/local/etc/baton/manifest.json" +ENV DOCKER_IMAGE="$DOCKER_IMAGE" +ENV DOCKER_TAG="$DOCKER_TAG" + +RUN ldconfig + +RUN groupadd --gid $GID $USER && \ + useradd --uid $UID --gid $GID --shell /bin/bash --create-home $USER + +USER $USER + +CMD ["/bin/bash"] diff --git a/release/Dockerfile b/release/ubuntu/18.04/Dockerfile similarity index 99% rename from release/Dockerfile rename to release/ubuntu/18.04/Dockerfile index d649e137..21cb191c 100644 --- a/release/Dockerfile +++ b/release/ubuntu/18.04/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG BASE_IMAGE=ubuntu:bionic +ARG BASE_IMAGE=ubuntu:18.04 FROM $BASE_IMAGE as installer ARG IRODS_VERSION="4.2.11" diff --git a/src/compat_checksum.c b/src/compat_checksum.c index 3ef15caf..20b4a1ae 100644 --- a/src/compat_checksum.c +++ b/src/compat_checksum.c @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015 Genome Research Ltd. All rights reserved. + * Copyright (C) 2015, 2023 Genome Research Ltd. All rights reserved. * * 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 @@ -20,42 +20,6 @@ #include "compat_checksum.h" -// #if IRODS_VERSION_INTEGER && IRODS_VERSION_INTEGER >= 4003000 -// MD5_CONTEXT* compat_MD5Init(baton_error_t *error) { -// const EVP_MD *md = EVP_md5(); - -// MD5_CONTEXT *context = EVP_MD_CTX_new(); -// if (context == NULL) { -// set_baton_error(error, -1, "Failed to create an MD5 context"); -// return NULL; -// } - -// if (!EVP_DigestInit_ex(context, md, NULL)) { -// EVP_MD_CTX_free(context); -// set_baton_error(error, -1, "Failed to initialize an MD5 context"); -// return NULL; -// } - -// return context; -// } - -// void compat_MD5Update(MD5_CONTEXT *context, unsigned char *input, -// unsigned int len, baton_error_t *error) { -// if (!EVP_DigestUpdate(context, input, len)) { -// EVP_MD_CTX_free(context); -// set_baton_error(error, -1, "Failed to update an MD5 context"); -// } -// } - -// void compat_MD5Final(unsigned char digest[16], MD5_CONTEXT *context, -// baton_error_t *error) { -// uint len = 16; -// if (!EVP_DigestFinal_ex(context, digest, &len)) { -// EVP_MD_CTX_free(context); -// set_baton_error(error, -1, "Failed to finalise an MD5 context"); -// } -// } -// #else EVP_MD_CTX* compat_MD5Init(baton_error_t *error) { const EVP_MD *md = EVP_md5(); @@ -90,4 +54,3 @@ void compat_MD5Final(unsigned char digest[16], EVP_MD_CTX *context, set_baton_error(error, -1, "Failed to finalise an MD5 context"); } } -// #endif diff --git a/src/compat_checksum.h b/src/compat_checksum.h index 1efbb27d..d106d7dd 100644 --- a/src/compat_checksum.h +++ b/src/compat_checksum.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2015, 2016 Genome Research Ltd. All rights reserved. + * Copyright (C) 2015, 2016, 2023 Genome Research Ltd. All rights reserved. * * 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