diff --git a/.travis.yml b/.travis.yml index b56d37d1..dd243fdf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ --- language: java -jdk: openjdk11 +jdk: openjdk17 os: linux dist: focal diff --git a/engines/aio/Dockerfile b/engines/aio/Dockerfile index 2de7366a..c88c7e68 100644 --- a/engines/aio/Dockerfile +++ b/engines/aio/Dockerfile @@ -5,16 +5,16 @@ # ImageMagick is from ImageMagick Studio LLC. See the license at http://www.imagemagick.org/script/license.php or in /ImageMagick-license.txt. # alfresco-pdf-renderer uses the PDFium library from Google Inc. See the license at https://pdfium.googlesource.com/pdfium/+/master/LICENSE or in /pdfium.txt. -FROM alfresco/alfresco-base-java:jre11-centos7-202205121725 +FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835 ARG EXIFTOOL_VERSION=12.25 ARG EXIFTOOL_FOLDER=Image-ExifTool-${EXIFTOOL_VERSION} ARG EXIFTOOL_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/exiftool/image-exiftool/${EXIFTOOL_VERSION}/image-exiftool-${EXIFTOOL_VERSION}.tgz ARG IMAGEMAGICK_VERSION=7.1.0-16 -ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-centos7.rpm -ENV IMAGEMAGICK_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-libs-centos7.rpm -ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-rockylinux8.rpm +ENV IMAGEMAGICK_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-libs-rockylinux8.rpm +ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ARG LIBREOFFICE_VERSION=7.2.5 ENV LIBREOFFICE_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/${LIBREOFFICE_VERSION}/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz @@ -31,6 +31,7 @@ ARG USERID=33017 COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin +#removing perl-ExtUtils-MakeMaker cascades to remove exiftools RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \ yum install -y $IMAGEMAGICK_DEP_RPM_URL && \ yum install -y $IMAGEMAGICK_LIB_RPM_URL $IMAGEMAGICK_RPM_URL && \ @@ -52,7 +53,8 @@ RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${ make && \ make test && \ make install) && \ - yum -y autoremove perl-ExtUtils-MakeMaker make && rm -rf ${EXIFTOOL_FOLDER} ${EXIFTOOL_FOLDER}.tgz && \ + yum -y autoremove make && \ + rm -rf ${EXIFTOOL_FOLDER} ${EXIFTOOL_FOLDER}.tgz && \ yum clean all ADD target/generated-resources/licenses /licenses diff --git a/engines/example/Dockerfile b/engines/example/Dockerfile index 1d9f749b..ace0ba41 100644 --- a/engines/example/Dockerfile +++ b/engines/example/Dockerfile @@ -1,4 +1,4 @@ -FROM alfresco/alfresco-base-java:jre11-centos7-202207110835 +FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835 ARG EXIFTOOL_VERSION=12.25 ARG EXIFTOOL_FOLDER=Image-ExifTool-${EXIFTOOL_VERSION} diff --git a/engines/imagemagick/Dockerfile b/engines/imagemagick/Dockerfile index 3c9f7313..796708d4 100644 --- a/engines/imagemagick/Dockerfile +++ b/engines/imagemagick/Dockerfile @@ -2,13 +2,13 @@ # ImageMagick is from ImageMagick Studio LLC. See the license at http://www.imagemagick.org/script/license.php or in /ImageMagick-license.txt. -FROM alfresco/alfresco-base-java:jre11-centos7-202205121725 +FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835 ARG IMAGEMAGICK_VERSION=7.1.0-16 -ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-centos7.rpm -ENV IMAGEMAGICK_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-libs-centos7.rpm -ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-rockylinux8.rpm +ENV IMAGEMAGICK_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}/imagemagick-distribution-${IMAGEMAGICK_VERSION}-libs-rockylinux8.rpm +ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ENV JAVA_OPTS="" # Set default user information diff --git a/engines/imagemagick/README.md b/engines/imagemagick/README.md deleted file mode 100644 index 09b2feab..00000000 --- a/engines/imagemagick/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# How to create ImageMagick RPM packages for CentOS 7 -1. `cd` to this directory -2. Use CentOS 7 base image and execute the [build-rpms.sh](scripts/build-rpms.sh) script - -```bash -docker run -it --rm -v `pwd`:/opt/alfresco/imagemagick alfresco/alfresco-base-java:11.0.13-centos-7@sha256:c1e399d1bbb5d08e0905f1a9ef915ee7c5ea0c0ede11cc9bd7ca98532a9b27fa /bin/bash /opt/alfresco/imagemagick/scripts/build-rpms.sh -``` - -> **Note:** If you want to know more details or need to upgrade the ImageMagick version please check the comments in the [build-rpms.sh](scripts/build-rpms.sh) file - -3. RPMs will be created in the `rpms` directory - -```bash -bash-3.2$ ls rpms -ImageMagick-7.0.10-59.x86_64.centos7.rpm ImageMagick-libs-7.0.10-59.x86_64.centos7.rpm -``` \ No newline at end of file diff --git a/engines/imagemagick/rockylinux8/README.md b/engines/imagemagick/rockylinux8/README.md new file mode 100644 index 00000000..a351ddcf --- /dev/null +++ b/engines/imagemagick/rockylinux8/README.md @@ -0,0 +1,16 @@ +# How to create ImageMagick RPM packages for Rocky Linux 8 +1. `cd` to this directory +2. Use Rocky Linux base image and execute the [build-rpms.sh](scripts/build-rpms.sh) script + +```bash +docker run -it --rm -v `pwd`:/opt/alfresco/imagemagick alfresco/alfresco-base-java:jre11-rockylinux8-202207110835@sha256:01810e3e77d188f48ad6549b63cf1d34ce7d61ba9ca3fb03f0c24cc8f5c73429 /bin/bash /opt/alfresco/imagemagick/scripts/build-rpms.sh +``` + +> **Note:** If you want to know more details or need to upgrade the ImageMagick version please check the comments in the [build-rpms.sh](scripts/build-rpms.sh) file + +3. RPMs will be created in the `rpms` directory + +```bash +bash-3.2$ ls rpms +ImageMagick-7.0.10-59.x86_64.rockylinux8.rpm ImageMagick-libs-7.0.10-59.x86_64.rockylinux8.rpm +``` \ No newline at end of file diff --git a/engines/imagemagick/scripts/build-rpms.sh b/engines/imagemagick/rockylinux8/scripts/build-rpms.sh similarity index 89% rename from engines/imagemagick/scripts/build-rpms.sh rename to engines/imagemagick/rockylinux8/scripts/build-rpms.sh index ac00910e..e5c05b69 100644 --- a/engines/imagemagick/scripts/build-rpms.sh +++ b/engines/imagemagick/rockylinux8/scripts/build-rpms.sh @@ -7,17 +7,20 @@ IMAGEMAGICK_VERSION=7.1.0-16 #Installing SRPM package. For future proof builds the SRPM package is uploaded to Alfresco's nexus repository. rpm -i https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/$IMAGEMAGICK_VERSION/imagemagick-distribution-$IMAGEMAGICK_VERSION-src.rpm -#liblqr is not available on CentOS 7. Removing it from the spec. +#liblqr is not available on Rocky Linux 8. Removing it from the spec. sed -i '/lqr/d' ~/rpmbuild/SPECS/ImageMagick.spec #We need some libraries from the epel repo. -yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm #We are going to compile the imagemagick so we need development tools. yum -y group install "Development Tools" #We are building the imagemagick from the official SRPM package. It allows us to be as compatible with the official RPM packages as possible. # Installing direct build time dependencies (excluding liblqr-1-devel) +yum install -y dnf-plugins-core +dnf config-manager --set-enabled powertools + yum -y install bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel \ zlib-devel perl-devel perl-generators ghostscript-devel djvulibre-devel libwmf-devel jasper-devel \ libtool-ltdl-devel libX11-devel libXext-devel libXt-devel lcms2-devel libxml2-devel librsvg2-devel \ @@ -34,5 +37,5 @@ rpmbuild -bb ~/rpmbuild/SPECS/ImageMagick.spec #Copy RPMs to well known directory. mkdir -p /opt/alfresco/imagemagick/rpms -cp ~/rpmbuild/RPMS/x86_64/ImageMagick-$IMAGEMAGICK_VERSION.x86_64.rpm /opt/alfresco/imagemagick/rpms/ImageMagick-$IMAGEMAGICK_VERSION.x86_64.centos7.rpm -cp ~/rpmbuild/RPMS/x86_64/ImageMagick-libs-$IMAGEMAGICK_VERSION.x86_64.rpm /opt/alfresco/imagemagick/rpms/ImageMagick-libs-$IMAGEMAGICK_VERSION.x86_64.centos7.rpm \ No newline at end of file +cp ~/rpmbuild/RPMS/x86_64/ImageMagick-$IMAGEMAGICK_VERSION.x86_64.rpm /opt/alfresco/imagemagick/rpms/ImageMagick-$IMAGEMAGICK_VERSION.x86_64.rockylinux8.rpm +cp ~/rpmbuild/RPMS/x86_64/ImageMagick-libs-$IMAGEMAGICK_VERSION.x86_64.rpm /opt/alfresco/imagemagick/rpms/ImageMagick-libs-$IMAGEMAGICK_VERSION.x86_64.rockylinux8.rpm \ No newline at end of file diff --git a/engines/libreoffice/Dockerfile b/engines/libreoffice/Dockerfile index 390fb292..79608793 100644 --- a/engines/libreoffice/Dockerfile +++ b/engines/libreoffice/Dockerfile @@ -2,7 +2,7 @@ # LibreOffice is from The Document Foundation. See the license at https://www.libreoffice.org/download/license/ or in /libreoffice.txt. -FROM alfresco/alfresco-base-java:jre11-centos7-202207110835 +FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835 ARG LIBREOFFICE_VERSION=7.2.5 diff --git a/engines/misc/Dockerfile b/engines/misc/Dockerfile index 16615416..84721eb8 100644 --- a/engines/misc/Dockerfile +++ b/engines/misc/Dockerfile @@ -1,6 +1,6 @@ # Image provides a container in which to run miscellaneous transformations for Alfresco Content Services. -FROM alfresco/alfresco-base-java:jre11-centos7-202207110835 +FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835 ENV JAVA_OPTS="" diff --git a/engines/pdfrenderer/Dockerfile b/engines/pdfrenderer/Dockerfile index c2504cdb..1e029b10 100644 --- a/engines/pdfrenderer/Dockerfile +++ b/engines/pdfrenderer/Dockerfile @@ -2,7 +2,7 @@ # alfresco-pdf-renderer uses the PDFium library from Google Inc. See the license at https://pdfium.googlesource.com/pdfium/+/master/LICENSE or in /pdfium.txt. -FROM alfresco/alfresco-base-java:jre11-centos7-202205121725 +FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835 ENV ALFRESCO_PDF_RENDERER_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/1.1/alfresco-pdf-renderer-1.1-linux.tgz ENV JAVA_OPTS="" diff --git a/engines/tika/Dockerfile b/engines/tika/Dockerfile index 5bce591d..5729c1b8 100644 --- a/engines/tika/Dockerfile +++ b/engines/tika/Dockerfile @@ -2,7 +2,7 @@ # Tika is from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0. -FROM alfresco/alfresco-base-java:jre11-centos7-202207110835 +FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835 ARG EXIFTOOL_VERSION=12.25 ARG EXIFTOOL_FOLDER=Image-ExifTool-${EXIFTOOL_VERSION} @@ -18,6 +18,7 @@ ARG USERID=33004 COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin +#removing perl-ExtUtils-MakeMaker cascades to remove exiftools RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \ curl -s -S $EXIFTOOL_URL -o ${EXIFTOOL_FOLDER}.tgz && \ tar xzf ${EXIFTOOL_FOLDER}.tgz && \ @@ -27,7 +28,8 @@ RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${ make && \ make test && \ make install) && \ - yum -y autoremove perl-ExtUtils-MakeMaker make && rm -rf ${EXIFTOOL_FOLDER} ${EXIFTOOL_FOLDER}.tgz && \ + yum -y autoremove make && \ + rm -rf ${EXIFTOOL_FOLDER} ${EXIFTOOL_FOLDER}.tgz && \ yum clean all ADD target/generated-resources/licenses /licenses diff --git a/pom.xml b/pom.xml index 75e54894..e89d771d 100644 --- a/pom.xml +++ b/pom.xml @@ -386,7 +386,7 @@ io.fabric8 docker-maven-plugin - 0.40.1 + 0.40.2