Merge branch 'master' into ATS-0000_refactor_packages

* Removal of the ImageMagick rpm creation code
* removal of eps code (had already been done on this branch)

# Conflicts:
#	alfresco-transform-core-aio/alfresco-transform-core-aio/pom.xml
#	alfresco-transform-imagemagick/alfresco-transform-imagemagick/pom.xml
#	alfresco-transform-libreoffice/alfresco-transform-libreoffice/pom.xml
#	alfresco-transform-misc/alfresco-transform-misc/pom.xml
#	alfresco-transform-pdf-renderer/alfresco-transform-pdf-renderer/pom.xml
#	alfresco-transform-tika/alfresco-transform-tika/pom.xml
#	deprecated/alfresco-transformer-base/pom.xml
#	engines/aio/pom.xml
#	engines/example/pom.xml
#	engines/imagemagick/pom.xml
#	engines/imagemagick/rockylinux8/README.md
#	engines/imagemagick/rockylinux8/scripts/build-rpms.sh
#	engines/imagemagick/src/test/java/org/alfresco/transform/imagemagick/ImageMagickTransformationIT.java
#	engines/libreoffice/pom.xml
#	engines/pdfrenderer/pom.xml
#	engines/tika/pom.xml
#	model/pom.xml
#	pom.xml
This commit is contained in:
alandavis
2022-09-07 10:59:54 +01:00
13 changed files with 24 additions and 73 deletions

View File

@@ -12,8 +12,8 @@ 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}-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_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_LIB_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-libs-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
ARG LIBREOFFICE_VERSION=7.2.5
@@ -35,6 +35,7 @@ COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin
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 && \
rpm -e --nodeps libgs && \
yum install -y cairo cups-libs libSM libGLU && \
test -f libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz && \
ln -s libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz libreoffice-dist-linux.gz || \

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>

View File

@@ -4,10 +4,11 @@
FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835
# For other ImageMagick versions please look at https://github.com/Alfresco/imagemagick-build tags
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}-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_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_LIB_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-libs-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
ENV JAVA_OPTS=""
@@ -22,7 +23,8 @@ COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin
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 && \
yum clean all
yum clean all && \
rpm -e --nodeps libgs
ADD target/generated-resources/licenses /licenses
ADD target/generated-resources/licenses.xml /licenses/

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>

View File

@@ -1,16 +0,0 @@
# 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
```

View File

@@ -1,41 +0,0 @@
#!/bin/bash
set -e
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 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-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 djvulibre-devel libwmf-devel jasper-devel \
libtool-ltdl-devel libX11-devel libXext-devel libXt-devel lcms2-devel libxml2-devel librsvg2-devel \
fftw-devel ilmbase-devel OpenEXR-devel libwebp-devel jbigkit-devel openjpeg2-devel graphviz-devel \
libraqm-devel LibRaw-devel
# Installing indirect dependencies
# ImageMagick tests requite non default fonts
yum groupinstall -y "fonts"
# ImageMagick spec requires ldconfig_scriptlets macro
yum -y install epel-rpm-macros
#Building binary RPM packages
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.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

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>

View File

@@ -7,8 +7,8 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>3.0.0-HXP-A6-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
@@ -82,7 +82,7 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.14</version>
<version>2.11.0</version>
</dependency>
<!-- for Apache Tika Parsers - eg. encrypted PDF -->

View File

@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.2</version>
<version>2.7.3</version>
</parent>
<properties>
@@ -233,7 +233,7 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.2</version>
<version>1.15.3</version>
</dependency>
<dependency>
@@ -251,6 +251,11 @@
<artifactId>httpmime</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.31</version>
</dependency>
</dependencies>
</dependencyManagement>