Merge pull request #86 from stephengaito/master
adding DNF for use in Fedora and friends
This commit is contained in:
commit
a68c708f22
|
@ -19,7 +19,7 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
env: DOCKER_FROM="ubuntu:18.04"
|
env: CONTAINER_FROM="ubuntu:18.04"
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
addons:
|
addons:
|
||||||
|
|
|
@ -52,16 +52,18 @@ For most users, you probably really want to simply download one of the
|
||||||
|
|
||||||
(It will not currently work on MacOS or Alpine based machines).
|
(It will not currently work on MacOS or Alpine based machines).
|
||||||
|
|
||||||
- [Docker](https://www.docker.com/) Image from the [`pdf2htmlEX` Docker
|
- [OCI](https://opencontainers.org/) Image from the [`pdf2htmlEX` Docker
|
||||||
hub](https://hub.docker.com/orgs/pdf2htmlex/repositories).
|
hub](https://hub.docker.com/orgs/pdf2htmlex/repositories).
|
||||||
|
|
||||||
This will work on any machine with Docker installed.
|
This will work on any machine with an OCI Container system (such as
|
||||||
|
Docker, Podman, CRI-O, Kubernetes) installed.
|
||||||
|
|
||||||
(Note: that *advanced* use of `pdf2htmlEX` requires careful attention to
|
(Note: that *advanced* use of `pdf2htmlEX` requires careful attention to
|
||||||
the configuration of various tools, such as fontconfig, iconv and your
|
the configuration of various tools, such as fontconfig, iconv and your
|
||||||
locally available fonts use by the poppler and fontforge libraries. The
|
locally available fonts use by the poppler and fontforge libraries. The
|
||||||
docker images created by the pdf2htmlEX team might not be as well
|
OCI container images created by the pdf2htmlEX team might not be as well
|
||||||
configured for *your needs* as a docker created and configured by you)
|
configured for *your needs* as an OCI container created and configured
|
||||||
|
by you)
|
||||||
|
|
||||||
### Building yourself
|
### Building yourself
|
||||||
|
|
||||||
|
@ -163,7 +165,7 @@ Typically, most users, will run one of the following "top-level" scripts:
|
||||||
|
|
||||||
1. AppImage
|
1. AppImage
|
||||||
|
|
||||||
2. Docker image
|
2. OCI Container image
|
||||||
|
|
||||||
3. Debian archive
|
3. Debian archive
|
||||||
|
|
||||||
|
@ -172,7 +174,7 @@ Typically, most users, will run one of the following "top-level" scripts:
|
||||||
|
|
||||||
1. Alpine tar file
|
1. Alpine tar file
|
||||||
|
|
||||||
2. Docker image
|
2. OCI Container image
|
||||||
|
|
||||||
3. **`runTests`**
|
3. **`runTests`**
|
||||||
|
|
||||||
|
@ -229,12 +231,12 @@ Typically, most users, will run one of the following "top-level" scripts:
|
||||||
`pdf2htmlEX`, installs it and `poppler-data` into a Debian archive
|
`pdf2htmlEX`, installs it and `poppler-data` into a Debian archive
|
||||||
(`*.deb`).
|
(`*.deb`).
|
||||||
|
|
||||||
- **`createDockerAlpineImageFromTarFile`**: Installs the Alpine tar file
|
- **`createContainerAlpineImageFromTarFile`**: Installs the Alpine tar file
|
||||||
archive of `pdf2htmlEX` created by `createAlpineTarFile` into an Alpine
|
archive of `pdf2htmlEX` created by `createAlpineTarFile` into an Alpine
|
||||||
Docker image.
|
Container.
|
||||||
|
|
||||||
- **`createDockerUbuntuImageFromDeb`**: Installs the Debian archive of
|
- **`createContainerUbuntuImageFromDeb`**: Installs the Debian archive of
|
||||||
`pdf2htmlEX` created by `createDebianPackage` into a Docker image.
|
`pdf2htmlEX` created by `createDebianPackage` into a Container.
|
||||||
|
|
||||||
- **`getBuildToolsAlpine`**: Locally `apk` installs all development
|
- **`getBuildToolsAlpine`**: Locally `apk` installs all development
|
||||||
*tools* required to build `pdf2htmlEX`.
|
*tools* required to build `pdf2htmlEX`.
|
||||||
|
@ -283,13 +285,13 @@ Typically, most users, will run one of the following "top-level" scripts:
|
||||||
`pdf2htmlEX/pdf2htmlEX/test` directory. See the
|
`pdf2htmlEX/pdf2htmlEX/test` directory. See the
|
||||||
`pdf2htmlEX/pdf2htmlEx/test` directory's Readme file for details.
|
`pdf2htmlEX/pdf2htmlEx/test` directory's Readme file for details.
|
||||||
|
|
||||||
- **`uploadDockerImage`**: Upload the `pdf2htmlEX` Docker image to
|
- **`uploadContainerImage`**: Upload the `pdf2htmlEX` Container image to
|
||||||
Docker hub repository associated to the docker hub users specified in
|
Docker hub repository associated to the docker hub users specified in
|
||||||
the `DOCKER_USERNAME` environement variable.
|
the `DOCKER_HUB_USERNAME` environement variable.
|
||||||
|
|
||||||
Unless the `DOCKER_USERNAME` and `DOCKER_PASSWORD` environment variables
|
Unless the `DOCKER_HUB_USERNAME` and `DOCKER_HUB_PASSWORD` environment
|
||||||
are pre-defined, this script will prompt the user for the respective
|
variables are pre-defined, this script will prompt the user for the
|
||||||
values.
|
respective values.
|
||||||
|
|
||||||
- **`uploadGitHubRelease`**: Upload the `pdf2htmlEX` artefacts (AppImage,
|
- **`uploadGitHubRelease`**: Upload the `pdf2htmlEX` artefacts (AppImage,
|
||||||
Debian archive, test results, etc) to the *continuous* section of the
|
Debian archive, test results, etc) to the *continuous* section of the
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This shell script builds the complete pdf2htmlEX application LOCALLY
|
# This shell script builds the complete pdf2htmlEX application LOCALLY
|
||||||
# (It does not create the AppImage or Docker images)
|
# (It does not create the AppImage or Container images)
|
||||||
|
|
||||||
# Adjust the following two environment variables to suit your needs
|
# Adjust the following two environment variables to suit your needs
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This shell script builds the complete pdf2htmlEX application LOCALLY
|
# This shell script builds the complete pdf2htmlEX application LOCALLY
|
||||||
# (It does not create the AppImage or Docker images)
|
# (It does not create the AppImage or Container images)
|
||||||
|
|
||||||
# Adjust the following two environment variables to suit your needs
|
# Adjust the following two environment variables to suit your needs
|
||||||
#
|
#
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This shell script builds the complete pdf2htmlEX application LOCALLY
|
||||||
|
# (It does not create the AppImage or Container images)
|
||||||
|
|
||||||
|
# Adjust the following two environment variables to suit your needs
|
||||||
|
#
|
||||||
|
export UNATTENDED="-y --setopt=install_weak_deps=False"
|
||||||
|
export MAKE_PARALLEL="-j $(nproc)"
|
||||||
|
|
||||||
|
# choose one of the following...
|
||||||
|
#
|
||||||
|
# export PDF2HTMLEX_BRANCH="<<YourTagHereWithNoSpaces>>"
|
||||||
|
export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
|
||||||
|
# The following environment variable determines where the poppler,
|
||||||
|
# poppler-data, fontforge and pdf2htmlEX packages are installed.
|
||||||
|
# CHANGE IT TO SUIT YOUR NEEDS:
|
||||||
|
#
|
||||||
|
export PDF2HTMLEX_PREFIX=/usr/local
|
||||||
|
|
||||||
|
# Ensure all Apt packages are installed with no user interaction
|
||||||
|
#
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
################
|
||||||
|
# do the build
|
||||||
|
|
||||||
|
./buildScripts/versionEnvs
|
||||||
|
|
||||||
|
./buildScripts/reportEnvs
|
||||||
|
|
||||||
|
./buildScripts/getBuildToolsDnf
|
||||||
|
|
||||||
|
./buildScripts/getDevLibrariesDnf
|
||||||
|
|
||||||
|
./buildScripts/getPoppler
|
||||||
|
|
||||||
|
./buildScripts/buildPoppler
|
||||||
|
|
||||||
|
./buildScripts/getFontforge
|
||||||
|
|
||||||
|
./buildScripts/buildFontforge
|
||||||
|
|
||||||
|
./buildScripts/buildPdf2htmlEX
|
||||||
|
|
||||||
|
./buildScripts/installPdf2htmlEX
|
|
@ -1,12 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This shell script creates a docker image from an existing pdf2htmlEX
|
# This shell script creates a tar file which can use used to create an OCI
|
||||||
|
# container from an existing pdf2htmlEX.
|
||||||
#
|
#
|
||||||
# This is the part which can run *inside* a docker container.
|
# This is the part which can run *inside* an OCI container.
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "-------------------------------------------------------------------"
|
echo "-------------------------------------------------------------------"
|
||||||
echo "CREATING pdf2htmlEX Docker Image (run inside a docker container)"
|
echo "CREATING pdf2htmlEX Container Image (run inside an OCI container)"
|
||||||
echo " (based on Alpine linux $BUILD_DIST)"
|
echo " (based on Alpine linux $BUILD_DIST)"
|
||||||
echo "-------------------------------------------------------------------"
|
echo "-------------------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -53,15 +53,15 @@ cd ../imageBuild
|
||||||
|
|
||||||
LINUX_DEPLOY_APP_IMAGE=linuxdeploy-$MACHINE_ARCH.AppImage
|
LINUX_DEPLOY_APP_IMAGE=linuxdeploy-$MACHINE_ARCH.AppImage
|
||||||
|
|
||||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LINUX_DEPLOY_APP_IMAGE
|
wget $LINUX_DEPLOY_URL/$LINUX_DEPLOY_APP_IMAGE
|
||||||
|
|
||||||
chmod a+x $LINUX_DEPLOY_APP_IMAGE
|
chmod a+x $LINUX_DEPLOY_APP_IMAGE
|
||||||
|
|
||||||
if [ -f /.dockerenv ] ; then
|
if [ ! -w /dev/fuse ] ; then
|
||||||
# WE ARE INSIDE A DOCKER CONTAINER...
|
# We are in an environment in which FUSE is not useable...
|
||||||
#
|
#
|
||||||
# We explicilty extract the appimage to a squashfs to allow it to be used
|
# We explicilty extract the appimage to a squashfs to allow it to be used
|
||||||
# inside Docker containers
|
# even if FUSE is not available.
|
||||||
#
|
#
|
||||||
./$LINUX_DEPLOY_APP_IMAGE --appimage-extract
|
./$LINUX_DEPLOY_APP_IMAGE --appimage-extract
|
||||||
#
|
#
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This shell script creates a container image from an existing pdf2htmlEX
|
||||||
|
#
|
||||||
|
# This is the part which must be run *outside* of any OCI container.
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo "CREATING pdf2htmlEX Container Image (run outside any OCI container)"
|
||||||
|
echo " (based on Alpine linux $BUILD_DIST)"
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Collect everything that will be needed...
|
||||||
|
|
||||||
|
# source buildScripts/reSourceVersionEnvs
|
||||||
|
. buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
mkdir -p imageBuild/containerDir
|
||||||
|
|
||||||
|
cd imageBuild/containerDir
|
||||||
|
|
||||||
|
cp ../$ALPINE_NAME.* .
|
||||||
|
|
||||||
|
if [ -z "$CONTAINER_FROM" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter the container image for the 'from' base: " CONTAINER_FROM
|
||||||
|
echo ""
|
||||||
|
if [ -z "$CONTAINER_FROM" ]; then
|
||||||
|
echo "CONTAINER_FROM not set... so we can not build the container image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DOCKER_HUB_USERNAME" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter a docker hub username: " DOCKER_HUB_USERNAME
|
||||||
|
echo ""
|
||||||
|
if [ -z "$DOCKER_HUB_USERNAME" ]; then
|
||||||
|
echo "DOCKER_HUB_USERNAME not set... so we can not build the container image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x "$(which podman)" ]; then
|
||||||
|
alias docker=podman
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CONTAINER_NAME="$DOCKER_HUB_USERNAME/pdf2htmlex:$PDF2HTMLEX_NAME"
|
||||||
|
|
||||||
|
echo "export CONTAINER_FROM=\"$CONTAINER_FROM\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||||
|
echo "export DOCKER_HUB_USERNAME=\"$DOCKER_HUB_USERNAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||||
|
echo "export CONTAINER_NAME=\"$CONTAINER_NAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
|
cat > Dockerfile <<DOCKERFILE_HERE_DOC
|
||||||
|
FROM $CONTAINER_FROM
|
||||||
|
|
||||||
|
COPY ./$ALPINE_NAME.* /root/
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
RUN chmod a+x $ALPINE_NAME.install && \
|
||||||
|
./$ALPINE_NAME.install
|
||||||
|
|
||||||
|
# make the /pdf directory the default working directory for any run of
|
||||||
|
# pdf2htmlEX
|
||||||
|
#
|
||||||
|
WORKDIR /pdf
|
||||||
|
|
||||||
|
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
|
||||||
|
DOCKERFILE_HERE_DOC
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
docker build -t $CONTAINER_NAME containerDir
|
|
@ -0,0 +1,78 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This shell script creates an OCI container from an existing pdf2htmlEX
|
||||||
|
#
|
||||||
|
# This is the part which must be run *outside* of any OCI container.
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo "CREATING pdf2htmlEX OCI Container Image (from deb archive)"
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Collect everything that will be needed...
|
||||||
|
|
||||||
|
# source buildScripts/reSourceVersionEnvs
|
||||||
|
. buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
cd imageBuild
|
||||||
|
|
||||||
|
mkdir -p containerDir
|
||||||
|
|
||||||
|
cp $DPKG_NAME containerDir
|
||||||
|
|
||||||
|
cd containerDir
|
||||||
|
|
||||||
|
if [ -z "$CONTAINER_FROM" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter the container image for the 'from' base: " CONTAINER_FROM
|
||||||
|
echo ""
|
||||||
|
if [ -z "$CONTAINER_FROM" ]; then
|
||||||
|
echo "CONTAINER_FROM not set... so we can not build the container image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DOCKER_HUB_USERNAME" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter a docker hub username: " DOCKER_HUB_USERNAME
|
||||||
|
echo ""
|
||||||
|
if [ -z "$DOCKER_HUB_USERNAME" ]; then
|
||||||
|
echo "DOCKER_HUB_USERNAME not set... so we can not build the container image"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x "$(which podman)" ]; then
|
||||||
|
alias docker=podman
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CONTAINER_NAME="$DOCKER_HUB_USERNAME/pdf2htmlex:$PDF2HTMLEX_NAME"
|
||||||
|
|
||||||
|
echo "export CONTAINER_FROM=\"$CONTAINER_FROM\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||||
|
echo "export DOCKER_HUB_USERNAME=\"$DOCKER_HUB_USERNAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||||
|
echo "export CONTAINER_NAME=\"$CONTAINER_NAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
|
cat > Dockerfile <<DOCKERFILE_HERE_DOC
|
||||||
|
FROM $CONTAINER_FROM
|
||||||
|
|
||||||
|
COPY ./$DPKG_NAME /root
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt -y upgrade && \
|
||||||
|
apt -y --no-install-recommends install \
|
||||||
|
/root/$DPKG_NAME
|
||||||
|
|
||||||
|
# make the /pdf directory the default working directory for any run of
|
||||||
|
# pdf2htmlEX
|
||||||
|
#
|
||||||
|
WORKDIR /pdf
|
||||||
|
|
||||||
|
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
|
||||||
|
DOCKERFILE_HERE_DOC
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
docker build -t $CONTAINER_NAME containerDir
|
|
@ -1,73 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This shell script creates a docker image from an existing pdf2htmlEX
|
|
||||||
#
|
|
||||||
# This is the part which must be run *outside* of any docker container.
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "-------------------------------------------------------------------"
|
|
||||||
echo "CREATING pdf2htmlEX Docker Image (run outside any docker container)"
|
|
||||||
echo " (based on Alpine linux $BUILD_DIST)"
|
|
||||||
echo "-------------------------------------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Collect everything that will be needed...
|
|
||||||
|
|
||||||
# source buildScripts/reSourceVersionEnvs
|
|
||||||
. buildScripts/reSourceVersionEnvs
|
|
||||||
|
|
||||||
set -ev
|
|
||||||
|
|
||||||
mkdir -p imageBuild/dockerDir
|
|
||||||
|
|
||||||
cd imageBuild/dockerDir
|
|
||||||
|
|
||||||
cp ../$ALPINE_NAME.* .
|
|
||||||
|
|
||||||
if [ -z "$DOCKER_FROM" ]; then
|
|
||||||
echo ""
|
|
||||||
read -p "Enter the docker image for the 'from' base: " DOCKER_FROM
|
|
||||||
echo ""
|
|
||||||
if [ -z "$DOCKER_FROM" ]; then
|
|
||||||
echo "DOCKER_FROM not set... so we can not build the docker image"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
|
||||||
echo ""
|
|
||||||
read -p "Enter a docker username: " DOCKER_USERNAME
|
|
||||||
echo ""
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
|
||||||
echo "DOCKER_USERNAME not set... so we can not build the docker image"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_NAME"
|
|
||||||
|
|
||||||
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> ../../buildScripts/reSourceVersionEnvs
|
|
||||||
echo "export DOCKER_USERNAME=\"$DOCKER_USERNAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
|
||||||
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
|
||||||
|
|
||||||
cat > Dockerfile <<DOCKERFILE_HERE_DOC
|
|
||||||
FROM $DOCKER_FROM
|
|
||||||
|
|
||||||
COPY ./$ALPINE_NAME.* /root/
|
|
||||||
|
|
||||||
WORKDIR /root
|
|
||||||
|
|
||||||
RUN chmod a+x $ALPINE_NAME.install && \
|
|
||||||
./$ALPINE_NAME.install
|
|
||||||
|
|
||||||
# make the /pdf directory the default working directory for any run of
|
|
||||||
# pdf2htmlEX
|
|
||||||
#
|
|
||||||
WORKDIR /pdf
|
|
||||||
|
|
||||||
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
|
|
||||||
DOCKERFILE_HERE_DOC
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
docker build -t $DOCKER_NAME dockerDir
|
|
|
@ -1,74 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This shell script creates a docker image from an existing pdf2htmlEX
|
|
||||||
#
|
|
||||||
# This is the part which must be run *outside* of any docker container.
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "-------------------------------------------------------------------"
|
|
||||||
echo "CREATING pdf2htmlEX Docker Image (from deb archive)"
|
|
||||||
echo "-------------------------------------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Collect everything that will be needed...
|
|
||||||
|
|
||||||
# source buildScripts/reSourceVersionEnvs
|
|
||||||
. buildScripts/reSourceVersionEnvs
|
|
||||||
|
|
||||||
set -ev
|
|
||||||
|
|
||||||
cd imageBuild
|
|
||||||
|
|
||||||
mkdir -p dockerDir
|
|
||||||
|
|
||||||
cp $DPKG_NAME dockerDir
|
|
||||||
|
|
||||||
cd dockerDir
|
|
||||||
|
|
||||||
if [ -z "$DOCKER_FROM" ]; then
|
|
||||||
echo ""
|
|
||||||
read -p "Enter the docker image for the 'from' base: " DOCKER_FROM
|
|
||||||
echo ""
|
|
||||||
if [ -z "$DOCKER_FROM" ]; then
|
|
||||||
echo "DOCKER_FROM not set... so we can not build the docker image"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
|
||||||
echo ""
|
|
||||||
read -p "Enter a docker username: " DOCKER_USERNAME
|
|
||||||
echo ""
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
|
||||||
echo "DOCKER_USERNAME not set... so we can not build the docker image"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_NAME"
|
|
||||||
|
|
||||||
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> ../../buildScripts/reSourceVersionEnvs
|
|
||||||
echo "export DOCKER_USERNAME=\"$DOCKER_USERNAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
|
||||||
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> ../../buildScripts/reSourceVersionEnvs
|
|
||||||
|
|
||||||
cat > Dockerfile <<DOCKERFILE_HERE_DOC
|
|
||||||
FROM $DOCKER_FROM
|
|
||||||
|
|
||||||
COPY ./$DPKG_NAME /root
|
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt -y upgrade && \
|
|
||||||
apt -y --no-install-recommends install \
|
|
||||||
/root/$DPKG_NAME
|
|
||||||
|
|
||||||
# make the /pdf directory the default working directory for any run of
|
|
||||||
# pdf2htmlEX
|
|
||||||
#
|
|
||||||
WORKDIR /pdf
|
|
||||||
|
|
||||||
ENTRYPOINT ["$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX"]
|
|
||||||
DOCKERFILE_HERE_DOC
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
docker build -t $DOCKER_NAME dockerDir
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
# This shell script creates the pdf2htmlEX AppImage and Docker Images
|
# This shell script creates the pdf2htmlEX AppImage and Container Images
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# do the creation
|
# do the creation
|
||||||
|
@ -11,9 +11,6 @@ set -ev
|
||||||
|
|
||||||
./buildScripts/createAlpineTarFile
|
./buildScripts/createAlpineTarFile
|
||||||
|
|
||||||
if [ -x "$(which docker)" ]; then
|
if [ -x "$(which docker)" -o -x "$(which podman)" ]; then
|
||||||
./buildScripts/createDockerAlpineImageFromTarFile
|
./buildScripts/createContainerAlpineImageFromTarFile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
# This shell script creates the pdf2htmlEX AppImage and Docker Images
|
# This shell script creates the pdf2htmlEX AppImage and Container Images
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# do the creation
|
# do the creation
|
||||||
|
@ -13,9 +13,6 @@ set -ev
|
||||||
|
|
||||||
./buildScripts/createDebianPackage
|
./buildScripts/createDebianPackage
|
||||||
|
|
||||||
if [ -x "$(which docker)" ]; then
|
if [ -x "$(which docker)" -o -x "$(which podman)" ]; then
|
||||||
./buildScripts/createDockerUbuntuImageFromDeb
|
./buildScripts/createContainerUbuntuImageFromDeb
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This shell script automates getting the required build tools (dnf install)
|
||||||
|
|
||||||
|
# set the shell environment variable 'UNATTENDED' to
|
||||||
|
# '--setopt=install_weak_deps=False' for unattended use (for example in
|
||||||
|
# the .travis.yml script)
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo "INSTALLING Build Tools (using DNF)"
|
||||||
|
echo " (UNATTENDED: [$UNATTENDED])"
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
sudo dnf $UNATTENDED install \
|
||||||
|
sudo \
|
||||||
|
wget \
|
||||||
|
git \
|
||||||
|
pkg-config \
|
||||||
|
ruby \
|
||||||
|
autoconf \
|
||||||
|
libtool \
|
||||||
|
cmake \
|
||||||
|
make \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
dpkg \
|
||||||
|
dpkg-dev \
|
||||||
|
gettext \
|
||||||
|
java-1.8.0-openjdk-headless \
|
||||||
|
jq
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This shell script automates getting the development libraries required to
|
||||||
|
# build poppler and fontforge
|
||||||
|
|
||||||
|
# set the shell environment variable 'UNATTENDED' to
|
||||||
|
# '--setopt=install_weak_deps=False' for unattended use (for example in
|
||||||
|
# the .travis.yml script)
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo "INSTALLING development libraries (using DNF)"
|
||||||
|
echo " (UNATTENDED: [$UNATTENDED])"
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
sudo dnf $UNATTENDED install \
|
||||||
|
cairo-devel \
|
||||||
|
libpng-devel \
|
||||||
|
libjpeg-turbo-devel \
|
||||||
|
libxml2-devel
|
|
@ -5,6 +5,7 @@
|
||||||
# source ./buildScripts/reSourceVersionEnvs
|
# source ./buildScripts/reSourceVersionEnvs
|
||||||
. ./buildScripts/reSourceVersionEnvs
|
. ./buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "TravisCI env:"
|
echo "TravisCI env:"
|
||||||
echo " dist: [$TRAVIS_DIST]"
|
echo " dist: [$TRAVIS_DIST]"
|
||||||
echo " tag: [$TRAVIS_TAG]"
|
echo " tag: [$TRAVIS_TAG]"
|
||||||
|
@ -12,12 +13,16 @@ echo " branch: [$TRAVIS_BRANCH]"
|
||||||
echo " commit: [$TRAVIS_COMMIT]"
|
echo " commit: [$TRAVIS_COMMIT]"
|
||||||
echo " build dir: [$TRAVIS_BUILD_DIR]"
|
echo " build dir: [$TRAVIS_BUILD_DIR]"
|
||||||
echo " repo slug: [$TRAVIS_REPO_SLUG]"
|
echo " repo slug: [$TRAVIS_REPO_SLUG]"
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo "Build env:"
|
echo "Build env:"
|
||||||
echo " prefix: [$PDF2HTMLEX_PREFIX]"
|
echo " prefix: [$PDF2HTMLEX_PREFIX]"
|
||||||
echo " unattended: [$UNATTENDED]"
|
echo " unattended: [$UNATTENDED]"
|
||||||
echo " make parallel: [$MAKE_PARALLEL]"
|
echo " make parallel: [$MAKE_PARALLEL]"
|
||||||
|
echo " OS: [$BUILD_OS]"
|
||||||
echo " distribution: [$BUILD_DIST]"
|
echo " distribution: [$BUILD_DIST]"
|
||||||
|
echo " linuxdeploy url: [$LINUX_DEPLOY_URL]"
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo "pdf2htmlEX env:"
|
echo "pdf2htmlEX env:"
|
||||||
echo " version: [$PDF2HTMLEX_VERSION]"
|
echo " version: [$PDF2HTMLEX_VERSION]"
|
||||||
|
@ -25,12 +30,14 @@ echo " poppler: [$POPPLER_VERSION]"
|
||||||
echo " fontforge: [$FONTFORGE_VERSION]"
|
echo " fontforge: [$FONTFORGE_VERSION]"
|
||||||
echo " pdf2htmlEX: [$PDF2HTMLEX_BRANCH]"
|
echo " pdf2htmlEX: [$PDF2HTMLEX_BRANCH]"
|
||||||
echo " machine arch: [$MACHINE_ARCH]"
|
echo " machine arch: [$MACHINE_ARCH]"
|
||||||
|
echo ""
|
||||||
|
|
||||||
echo "release env:"
|
echo "release env:"
|
||||||
echo " build date: [$BUILD_DATE]"
|
echo " build date: [$BUILD_DATE]"
|
||||||
echo " build time: [$BUILD_TIME]"
|
echo " build time: [$BUILD_TIME]"
|
||||||
echo " docker from: [$DOCKER_FROM]"
|
echo " container from: [$CONTAINER_FROM]"
|
||||||
echo " docker name: [$DOCKER_NAME]"
|
echo " container name: [$CONTAINER_NAME]"
|
||||||
echo " appImage name: [$APPIMAGE_NAME]"
|
echo " appImage name: [$APPIMAGE_NAME]"
|
||||||
echo " dpkg name: [$DPKG_NAME]"
|
echo " dpkg name: [$DPKG_NAME]"
|
||||||
echo "uploadTool suffix: [$UPLOADTOOL_SUFFIX]"
|
echo "uploadTool suffix: [$UPLOADTOOL_SUFFIX]"
|
||||||
|
echo ""
|
||||||
|
|
|
@ -34,6 +34,6 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
./buildScripts/runTests
|
./buildScripts/runTests
|
||||||
./buildScripts/createAppImage
|
./buildScripts/createAppImage
|
||||||
./buildScripts/createDebianPackage
|
./buildScripts/createDebianPackage
|
||||||
./buildScripts/createDockerUbuntuImageFromDeb
|
#./buildScripts/createContainerUbuntuImageFromDeb
|
||||||
#./buildScripts/uploadGitHubRelease
|
#./buildScripts/uploadGitHubRelease
|
||||||
#./buildScripts/uploadDockerImage
|
#./buildScripts/uploadContainerImage
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This shell script uploads the pdf2htmlEX container image to docker hub
|
||||||
|
#
|
||||||
|
# We EXPECT the following environment variables to be set:
|
||||||
|
# DOCKER_HUB_USERNAME
|
||||||
|
#
|
||||||
|
# You can OPTIONALLY set the following environment variables:
|
||||||
|
# DOCKER_HUB_PASSWORD (if not set you will be asked for your password)
|
||||||
|
#
|
||||||
|
|
||||||
|
# source ./buildScripts/reSourceVersionEnvs
|
||||||
|
. ./buildScripts/reSourceVersionEnvs
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo "UPLOADING pdf2htmlEX Container Image to Docker Hub"
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# push container image
|
||||||
|
#
|
||||||
|
if [ -x "$(which docker)" -o -x "$(which podman)" ]; then
|
||||||
|
|
||||||
|
if [ ! -x "$(which docker)"]; then
|
||||||
|
alias docker=podman
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DOCKER_HUB_USERNAME" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter the Docker hub usernane): " DOCKER_HUB_USERNAME
|
||||||
|
echo ""
|
||||||
|
if [ -z "$DOCKER_HUB_USERNAME" ]; then
|
||||||
|
echo "DOCKER_HUB_USERNAME not set... so we do not know where to push image."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$DOCKER_HUB_PASSWORD" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "Please type your the Docker hub password"
|
||||||
|
docker login -u "$DOCKER_HUB_USERNAME"
|
||||||
|
else
|
||||||
|
echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker push $DOCKER_USERNAME/pdf2htmlex
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Neither Docker nor Podman are installed... skipping upload of container image."
|
||||||
|
fi
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This shell script uploads the pdf2htmlEX docker image to docker hub
|
|
||||||
#
|
|
||||||
# We EXPECT the following environment variables to be set:
|
|
||||||
# DOCKER_USERNAME
|
|
||||||
#
|
|
||||||
# You can OPTIONALLY set the following environment variables:
|
|
||||||
# DOCKER_PASSWORD (if not set you will be asked for your password)
|
|
||||||
#
|
|
||||||
|
|
||||||
# source ./buildScripts/reSourceVersionEnvs
|
|
||||||
. ./buildScripts/reSourceVersionEnvs
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "-------------------------------------------------------------------"
|
|
||||||
echo "UPLOADING pdf2htmlEX Docker Image to Docker Hub"
|
|
||||||
echo "-------------------------------------------------------------------"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
##################################
|
|
||||||
# push docker image
|
|
||||||
#
|
|
||||||
if [ -x "$(which docker)" ]; then
|
|
||||||
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
|
||||||
echo ""
|
|
||||||
read -p "Enter the Docker usernane): " DOCKER_USERNAME
|
|
||||||
echo ""
|
|
||||||
if [ -z "$DOCKER_USERNAME" ]; then
|
|
||||||
echo "DOCKER_USERNAME not set... so we do not know where to push image."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DOCKER_PASSWORD" ]; then
|
|
||||||
echo ""
|
|
||||||
echo "Please type your the Docker hub password"
|
|
||||||
docker login -u "$DOCKER_USERNAME"
|
|
||||||
else
|
|
||||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker push $DOCKER_USERNAME/pdf2htmlex
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "Docker is not installed... skipping upload of docker image."
|
|
||||||
fi
|
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
#
|
#
|
||||||
# We EXPECT the following environment variables to be set:
|
# We EXPECT the following environment variables to be set:
|
||||||
# GITHUB_TOKEN
|
# GITHUB_TOKEN
|
||||||
# DOCKER_USERNAME
|
# DOCKER_HUB_USERNAME
|
||||||
#
|
#
|
||||||
# You can OPTIONALLY set the following environment variables:
|
# You can OPTIONALLY set the following environment variables:
|
||||||
# DOCKER_PASSWORD (if not set you will be asked for your password)
|
# DOCKER_HUB_PASSWORD (if not set you will be asked for your password)
|
||||||
#
|
#
|
||||||
|
|
||||||
# source ./buildScripts/reSourceVersionEnvs
|
# source ./buildScripts/reSourceVersionEnvs
|
||||||
|
@ -18,7 +18,7 @@ cp ./buildScripts/reSourceVersionEnvs imageBuild/buildInfo.sh
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "-------------------------------------------------------------------"
|
echo "-------------------------------------------------------------------"
|
||||||
echo "UPLOADING pdf2htmlEX AppImage and Docker Images"
|
echo "UPLOADING pdf2htmlEX AppImage and Container Images"
|
||||||
echo "-------------------------------------------------------------------"
|
echo "-------------------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
||||||
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
||||||
|
|
||||||
echo $APPIMAGE_NAME > appImageName.txt
|
echo $APPIMAGE_NAME > appImageName.txt
|
||||||
echo $DOCKER_NAME > dockerImageName.txt
|
echo $CONTAINER_NAME > containerImageName.txt
|
||||||
echo $DPKG_NAME > debianArchiveName.txt
|
echo $DPKG_NAME > debianArchiveName.txt
|
||||||
echo $TEST_RESULTS_NAME > testResultsName.txt
|
echo $TEST_RESULTS_NAME > testResultsName.txt
|
||||||
|
|
||||||
|
@ -81,12 +81,12 @@ deleteReleaseByTag "$TRAVIS_REPO_SLUG" "continuous-$BUILD_DIST"
|
||||||
createNewRelease "$TRAVIS_REPO_SLUG" "continuous-$BUILD_DIST" "Latest $BUILD_DIST release" \
|
createNewRelease "$TRAVIS_REPO_SLUG" "continuous-$BUILD_DIST" "Latest $BUILD_DIST release" \
|
||||||
../buildScripts/uploadGitHubReleaseMessage
|
../buildScripts/uploadGitHubReleaseMessage
|
||||||
|
|
||||||
uploadAnAsset $upload_url "appImageName.txt" "text/plain"
|
uploadAnAsset $upload_url "appImageName.txt" "text/plain"
|
||||||
uploadAnAsset $upload_url "testResultsName.txt" "text/plain"
|
uploadAnAsset $upload_url "testResultsName.txt" "text/plain"
|
||||||
uploadAnAsset $upload_url "buildInfo.sh" "text/plain"
|
uploadAnAsset $upload_url "buildInfo.sh" "text/plain"
|
||||||
uploadAnAsset $upload_url "dockerImageName.txt" "text/plain"
|
uploadAnAsset $upload_url "containerImageName.txt" "text/plain"
|
||||||
uploadAnAsset $upload_url "debianArchiveName.txt" "text/plain"
|
uploadAnAsset $upload_url "debianArchiveName.txt" "text/plain"
|
||||||
uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip"
|
uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip"
|
||||||
uploadAnAsset $upload_url $TEST_RESULTS_NAME "application/zip"
|
uploadAnAsset $upload_url $TEST_RESULTS_NAME "application/zip"
|
||||||
uploadAnAsset $upload_url $DPKG_NAME "application/x-debian-package"
|
uploadAnAsset $upload_url $DPKG_NAME "application/x-debian-package"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ We release three types of binary objects:
|
||||||
While the Debian archive is built on a specific Ubuntu release, it can
|
While the Debian archive is built on a specific Ubuntu release, it can
|
||||||
usually be used on any more recent Ubuntu releases.
|
usually be used on any more recent Ubuntu releases.
|
||||||
|
|
||||||
3. You can alternatively get pdf2htmlEX Docker images from Docker Hub in
|
3. You can alternatively get pdf2htmlEX Container images from Docker Hub in
|
||||||
either of the repositories:
|
either of the repositories:
|
||||||
|
|
||||||
pdf2htmlEX/pdf2htmlEX (offical release)
|
pdf2htmlEX/pdf2htmlEX (offical release)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This shell script uploads already existing pdf2htmlEX AppImage and Docker
|
# This shell script uploads already existing pdf2htmlEX AppImage and Container
|
||||||
# Images
|
# Images
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; }
|
./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
./buildScripts/uploadGitHubRelease || { echo 'uploadGitHubRelease FAILED' ; exit 1 ; }
|
./buildScripts/uploadGitHubRelease || { echo 'uploadGitHubRelease FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
./buildScripts/uploadDockerImage || { echo 'uploadDockerImage FAILED' ; exit 1 ; }
|
./buildScripts/uploadContainerImage || { echo 'uploadContainerImage FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
# versions
|
# versions
|
||||||
|
|
||||||
# see: https://poppler.freedesktop.org/releases.html
|
# see: https://poppler.freedesktop.org/releases.html
|
||||||
# current working: 0.83.0
|
# current working: 0.89.0
|
||||||
|
|
||||||
export PDF2HTMLEX_VERSION=0.18.8.rc1
|
export PDF2HTMLEX_VERSION=0.18.8.rc2
|
||||||
|
|
||||||
export POPPLER_VERSION=poppler-0.89.0
|
export POPPLER_VERSION=poppler-0.89.0
|
||||||
#export POPPLER_VERSION=poppler-0.88.0
|
#export POPPLER_VERSION=poppler-0.88.0
|
||||||
|
@ -29,6 +29,21 @@ export FONTFORGE_VERSION=20200314
|
||||||
#export FONTFORGE_VERSION=20190317
|
#export FONTFORGE_VERSION=20190317
|
||||||
#export FONTFORGE_VERSION=20170731
|
#export FONTFORGE_VERSION=20170731
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Specify a working version of linuxDeploy to build the appImage
|
||||||
|
#
|
||||||
|
# see: https://github.com/linuxdeploy/linuxdeploy/issues/142#issuecomment-669910999
|
||||||
|
#
|
||||||
|
# The following is the most up to date version of linuxdeploy:
|
||||||
|
#
|
||||||
|
#export LINUX_DEPLOY_URL=https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous
|
||||||
|
#
|
||||||
|
# The following is a recent known to work version of linuxdeploy from 2020/Aug/05
|
||||||
|
#
|
||||||
|
export LINUX_DEPLOY_URL=https://artifacts.assassinate-you.net/artifactory/list/linuxdeploy/travis-456
|
||||||
|
|
||||||
|
###################################################################
|
||||||
|
|
||||||
if [ -z "$PDF2HTMLEX_BRANCH" ]; then
|
if [ -z "$PDF2HTMLEX_BRANCH" ]; then
|
||||||
export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
if [ -z "$PDF2HTMLEX_BRANCH" ]; then
|
if [ -z "$PDF2HTMLEX_BRANCH" ]; then
|
||||||
|
@ -42,16 +57,22 @@ if [ -z "$PDF2HTMLEX_BRANCH" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -r /etc/lsb-release ; then
|
# Following @ViliusSutkus89's suggestion in
|
||||||
cat /etc/lsb-release
|
# PR https://github.com/pdf2htmlEX/pdf2htmlEX/pull/77
|
||||||
# source /etc/lsb-release
|
# We have replaced the use of lsb-release/alpine-release
|
||||||
. /etc/lsb-release
|
# with the freedesktop.org's os-release based system to
|
||||||
export BUILD_DIST=$DISTRIB_CODENAME
|
# obtain the distribution release information....
|
||||||
export BUILD_OS=$DISTRIB_ID
|
#
|
||||||
elif test -r /etc/alpine-release ; then
|
# See: https://www.freedesktop.org/software/systemd/man/os-release.html
|
||||||
cat /etc/alpine-release
|
#
|
||||||
export BUILD_OS=alpine
|
if test -r /etc/os-release ; then
|
||||||
export BUILD_DIST=$(cat /etc/alpine-release)
|
cat /etc/os-release
|
||||||
|
export BUILD_OS=$(grep '^ID=' /etc/os-release | cut -d'=' -f2)
|
||||||
|
export BUILD_DIST=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2)
|
||||||
|
elif test -r /usr/lib/os-release ; then
|
||||||
|
cat /usr/lib/os-release
|
||||||
|
export BUILD_OS=$(grep '^ID=' /usr/lib/os-release | cut -d'=' -f2)
|
||||||
|
export BUILD_DIST=$(grep '^VERSION_ID=' /usr/lib/os-release | cut -d'=' -f2)
|
||||||
else
|
else
|
||||||
echo "FAILURE: could not determine release"
|
echo "FAILURE: could not determine release"
|
||||||
exit -1
|
exit -1
|
||||||
|
@ -76,3 +97,4 @@ echo "export BUILD_DIST=\"$BUILD_DIST\"" >> buildScripts/reSourc
|
||||||
echo "export BUILD_DATE=\"$BUILD_DATE\"" >> buildScripts/reSourceVersionEnvs
|
echo "export BUILD_DATE=\"$BUILD_DATE\"" >> buildScripts/reSourceVersionEnvs
|
||||||
echo "export BUILD_TIME=\"$BUILD_TIME\"" >> buildScripts/reSourceVersionEnvs
|
echo "export BUILD_TIME=\"$BUILD_TIME\"" >> buildScripts/reSourceVersionEnvs
|
||||||
echo "export PDF2HTMLEX_PREFIX=\"$PDF2HTMLEX_PREFIX\"" >> buildScripts/reSourceVersionEnvs
|
echo "export PDF2HTMLEX_PREFIX=\"$PDF2HTMLEX_PREFIX\"" >> buildScripts/reSourceVersionEnvs
|
||||||
|
echo "export LINUX_DEPLOY_URL=\"$LINUX_DEPLOY_URL\"" >> buildScripts/reSourceVersionEnvs
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
# This shell script installs all local software required to run the
|
||||||
|
# pdf2htmlEX tests
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Start by making sure all required apt packages exist
|
||||||
|
#
|
||||||
|
sudo dnf -y --setopt=install_weak_deps=False install \
|
||||||
|
wget \
|
||||||
|
diffutils \
|
||||||
|
zip \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
xorg-x11-server-Xvfb \
|
||||||
|
firefox
|
||||||
|
|
||||||
|
# Now get the geckodriver for firefox (as required by selenium)
|
||||||
|
#
|
||||||
|
oldPWD=$(pwd)
|
||||||
|
cd /tmp
|
||||||
|
#
|
||||||
|
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
|
||||||
|
#
|
||||||
|
tar xvf geckodriver-v0.26.0-linux64.tar.gz
|
||||||
|
#
|
||||||
|
sudo mv geckodriver /usr/local/bin
|
||||||
|
#
|
||||||
|
cd $oldPWD
|
||||||
|
|
||||||
|
# Now make sure all python packages exist (install into the local user's
|
||||||
|
# PyPI archive)
|
||||||
|
#
|
||||||
|
pip3 install \
|
||||||
|
selenium \
|
||||||
|
Pillow
|
Loading…
Reference in New Issue