Add zmbuilder Docker image
This commit is contained in:
parent
d48035f728
commit
6651efc972
|
@ -0,0 +1,54 @@
|
||||||
|
FROM almalinux:8
|
||||||
|
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
||||||
|
|
||||||
|
ARG ZM_VERSION=9.0.0 \
|
||||||
|
ZM_PATCH=35
|
||||||
|
|
||||||
|
ENV ZM_VERSION=${ZM_VERSION} \
|
||||||
|
ZM_PATCH=${ZM_PATCH}
|
||||||
|
|
||||||
|
RUN set -x &&\
|
||||||
|
dnf group install -y "Development Tools" &&\
|
||||||
|
dnf config-manager --set-enabled -y powertools &&\
|
||||||
|
dnf module enable -y javapackages-tools &&\
|
||||||
|
dnf install -y java-1.8.0-openjdk \
|
||||||
|
gcc-c++ \
|
||||||
|
ant-junit \
|
||||||
|
ruby \
|
||||||
|
git \
|
||||||
|
maven \
|
||||||
|
perl \
|
||||||
|
cpan \
|
||||||
|
wget \
|
||||||
|
curl \
|
||||||
|
vim \
|
||||||
|
rpm-build \
|
||||||
|
createrepo \
|
||||||
|
rsync \
|
||||||
|
patch\
|
||||||
|
make \
|
||||||
|
cmake \
|
||||||
|
sudo \
|
||||||
|
expat-devel \
|
||||||
|
pcre2-devel \
|
||||||
|
libaio-devel \
|
||||||
|
ncurses-devel \
|
||||||
|
curl-devel \
|
||||||
|
pam-devel \
|
||||||
|
bison \
|
||||||
|
file-devel \
|
||||||
|
perl-HTML-Tagset \
|
||||||
|
perl-Module-Install \
|
||||||
|
libidn-devel \
|
||||||
|
&&\
|
||||||
|
dnf clean all &&\
|
||||||
|
mkdir /work &&\
|
||||||
|
chmod 777 /work &&\
|
||||||
|
mkdir /patches
|
||||||
|
|
||||||
|
COPY bin/ /usr/local/bin/
|
||||||
|
COPY patches /patches
|
||||||
|
#COPY zmbuilder.repo /etc/yum.repos.d/zmbuilder.repo
|
||||||
|
|
||||||
|
WORKDIR /work
|
||||||
|
CMD zmbuilder
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Zimbra Builder
|
||||||
|
|
||||||
|
This is a Docker image able to build Zimbra for RHEL8.
|
||||||
|
|
||||||
|
To use it you first have to build the image
|
||||||
|
```
|
||||||
|
docker build -t zmbuild:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you can run the build
|
||||||
|
```
|
||||||
|
docker run --rm -it zmbuild:latest -v ./output:/zimbra
|
||||||
|
```
|
|
@ -0,0 +1,85 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
|
||||||
|
# Helper functions
|
||||||
|
get_repo_branch() {
|
||||||
|
REPO=$1
|
||||||
|
local TAG=""
|
||||||
|
# Loop through the different patches. Eg, first check 9.0.0.p33, then 9.0.0.p32, 9.0.0.p31 etc. until we find an existing tag
|
||||||
|
if [[ "${ZM_VERSION}" =~ ^9 ]]; then
|
||||||
|
for PATCH in $(seq ${ZM_PATCH} -1 1); do
|
||||||
|
if git ls-remote --exit-code --tags ${REPO} ${ZM_VERSION}.p${PATCH} 2>&1 > /dev/null; then
|
||||||
|
TAG=${ZM_VERSION}.p${PATCH}
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "${TAG}" == "" ]; then
|
||||||
|
TAG=${ZM_VERSION}
|
||||||
|
fi
|
||||||
|
elif [[ "${ZM_VERSION}" =~ ^10 ]]; then
|
||||||
|
MINOR=$(echo ${ZM_VERSION} | sed -E 's/.*\.([0-9]+)$/\1/')
|
||||||
|
MAJOR=$(echo ${ZM_VERSION} | sed -E 's/([0-9]+(\.[0-9]+)*)\.([0-9]+)$/\1/')
|
||||||
|
for PATCH in $(seq ${MINOR} -1 1); do
|
||||||
|
if git ls-remote --exit-code --tags ${REPO} ${MAJOR}.${PATCH} 2>&1 > /dev/null; then
|
||||||
|
TAG=${MAJOR}.${PATCH}
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "${TAG}" == "" ]; then
|
||||||
|
TAG=${MAJOR}.0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ${TAG}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo Creating needed directories
|
||||||
|
mkdir -p /zimbra/tgz/${ZM_VERSION}/p${ZM_PATCH}
|
||||||
|
mkdir -p /zimbra/repo/${ZM_VERSION}/el8/{SRPMS,x86_64,noarch}
|
||||||
|
|
||||||
|
cd /work
|
||||||
|
|
||||||
|
echo Identify the latest tag for zm-build
|
||||||
|
BRANCH=$(get_repo_branch "https://github.com/Zimbra/zm-build.git")
|
||||||
|
git clone --depth=1 -b ${BRANCH} https://github.com/Zimbra/zm-build.git
|
||||||
|
cd zm-build
|
||||||
|
|
||||||
|
echo Patching for AlmaLinux support
|
||||||
|
patch rpmconf/Build/get_plat_tag.sh /patches/get_plat_tag_alma.patch
|
||||||
|
|
||||||
|
echo Running Zimbra build
|
||||||
|
DATE=$(date +%Y%m%d)
|
||||||
|
if [[ "${ZM_VERSION}" =~ ^9 ]]; then
|
||||||
|
ZM_NAME=KEPLER
|
||||||
|
TAG_TO_TRY=${ZM_VERSION}.p${ZM_PATCH}
|
||||||
|
for TAG in $(seq $((${ZM_PATCH}-1)) -1 1); do
|
||||||
|
TAG_TO_TRY=${TAG_TO_TRY},${ZM_VERSION}.p${TAG}
|
||||||
|
done
|
||||||
|
TAG_TO_TRY=${TAG_TO_TRY},${ZM_VERSION}
|
||||||
|
elif [[ "${ZM_VERSION}" =~ ^10 ]]; then
|
||||||
|
ZM_NAME=DAFFODIL
|
||||||
|
MINOR=$(echo ${ZM_VERSION} | sed -E 's/.*\.([0-9]+)$/\1/')
|
||||||
|
MAJOR=$(echo ${ZM_VERSION} | sed -E 's/([0-9]+(\.[0-9]+)*)\.([0-9]+)$/\1/')
|
||||||
|
TAG_TO_TRY=${ZM_VERSION}
|
||||||
|
for TAG in $(seq $((${MINOR}-1)) -1 1); do
|
||||||
|
TAG_TO_TRY=${TAG_TO_TRY},${MAJOR}.${TAG}
|
||||||
|
done
|
||||||
|
TAG_TO_TRY=${TAG_TO_TRY},10.0.0-GA,10.0.0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ENV_CACHE_CLEAR_FLAG=true ./build.pl --ant-options \
|
||||||
|
-DskipTests=true \
|
||||||
|
--git-default-tag=${TAG_TO_TRY} \
|
||||||
|
--build-release-no=${ZM_VERSION} --build-type=FOSS --build-release=${ZM_NAME} \
|
||||||
|
--build-release-candidate=GA --build-thirdparty-server=files.zimbra.com \
|
||||||
|
--build-no=${DATE} --no-interactive 2>&1 | tee -a build.log
|
||||||
|
|
||||||
|
echo Copy repo dir
|
||||||
|
rsync -rtvP --del /work/.staging/RHEL8_64*/zm-packages/bundle/r8/ /zimbra/repo/${ZM_VERSION}/el8/x86_64/
|
||||||
|
|
||||||
|
echo Copy install tarball
|
||||||
|
mv /work/BUILDS/RHEL8_64*/zcs-${ZM_VERSION}*.tgz /zimbra/tgz/${ZM_VERSION}/p${ZM_PATCH}/
|
|
@ -0,0 +1,15 @@
|
||||||
|
--- zm-build/rpmconf/Build/get_plat_tag.sh 2022-01-17 09:04:54.494738132 +0100
|
||||||
|
+++ get_plat_tag.sh 2022-02-01 20:58:34.849899069 +0100
|
||||||
|
@@ -79,6 +79,12 @@
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
+ grep "AlmaLinux release 8" /etc/redhat-release > /dev/null 2>&1
|
||||||
|
+ if [ $? = 0 ]; then
|
||||||
|
+ echo "RHEL8${i}"
|
||||||
|
+ exit 0
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
grep "Fedora release 23" /etc/redhat-release >/dev/null 2>&1
|
||||||
|
if [ $? = 0 ]; then
|
||||||
|
echo "F23${i}"
|
|
@ -0,0 +1,125 @@
|
||||||
|
altermine: pb reversed patch
|
||||||
|
amavis-logwatch : OK
|
||||||
|
amavisd: OK
|
||||||
|
apr : OK
|
||||||
|
apr-util : OK
|
||||||
|
aspell : pb - dans version
|
||||||
|
aspell-ar : Nécessite aspell
|
||||||
|
aspell-ca : Nécessite aspell
|
||||||
|
aspell-da : Nécessite aspell
|
||||||
|
aspell-de : Nécessite aspell
|
||||||
|
aspell-en : Nécessite aspell
|
||||||
|
aspell-es : Nécessite aspell
|
||||||
|
aspell-fr : Nécessite aspell
|
||||||
|
aspell-hi : Nécessite aspell
|
||||||
|
aspell-hu : Nécessite aspell
|
||||||
|
aspell-it : Nécessite aspell
|
||||||
|
aspell-nl : Nécessite aspell
|
||||||
|
aspell-pl : Nécessite aspell
|
||||||
|
aspell-pt-br : Nécessite aspell
|
||||||
|
aspell-ru : Nécessite aspell
|
||||||
|
aspell-sv : Nécessite aspell
|
||||||
|
aspell-zimbra : Nécessite aspell-en
|
||||||
|
bdb : le lien de DL doit être modifié en https://ftp.tw.freebsd.org/distfiles/bdb/db-5.2.42.tar.gz
|
||||||
|
clamav : nécessite zimbra-libxml2-devel et zimbra-libmilter-devel
|
||||||
|
clamav-db : pb téléchargement main.cvd
|
||||||
|
cluebringer : OK
|
||||||
|
curl : nécessite zimbra-heimdal-devel
|
||||||
|
cyrus-sasl : nécessite zimbra-heimdal-devel, zimbra-curl-devel et zimbra-libxml2-devel
|
||||||
|
freetype : le lien de téléchargement des sources répond en 404
|
||||||
|
heimdal : le lien de téléchargement des sources répond en 404
|
||||||
|
httpd : OK
|
||||||
|
jetty-distribution : OK
|
||||||
|
libart : OK
|
||||||
|
libbsd : error: Empty %files file /work/packages/thirdparty/libbsd/build/RHEL8_64/zimbra-libbsd/rpm/BUILD/libbsd-0.7.0/debugsourcefiles.list
|
||||||
|
libevent : OK
|
||||||
|
libltdl : OK
|
||||||
|
libmilter : OK
|
||||||
|
libpng : OK
|
||||||
|
libsodium : OK
|
||||||
|
libxml2 : OK
|
||||||
|
mariadb : *** ERROR: ambiguous python shebang in /opt/zimbra/common/bin/myrocks_hotbackup: #!/usr/bin/env python. Change it to python3 (or python2) explicitly.
|
||||||
|
maven : nécessite zimbra-openjdk
|
||||||
|
memcached : nécessite zimbra-libevent-devel
|
||||||
|
net-snmp : le lien http://iweb.dl.sourceforge.net/project/net-snmp/net-snmp/5.8/net-snmp-5.8.tar.gz n'est plus valide
|
||||||
|
nginx : nécessite zimbra-cyrus-sasl-devel
|
||||||
|
opendkim : nécessite zimbra-libbsd-devel, zimbra-libmilter-devel, zimbra-openldap-devel et zimbra-cyrus-sasl-devel
|
||||||
|
openjdk : OK
|
||||||
|
openjdk-cacerts : pas de getsrc (normal), sinon OK
|
||||||
|
openldap : zimbra-cyrus-sasl-devel et zimbra-libltdl-devel
|
||||||
|
openssl : OK
|
||||||
|
perl-archive-zip : nécessite zimbra-perl-compress-raw-zlib, OK
|
||||||
|
perl-berkeleydb : nécessite bdb-devel, OK
|
||||||
|
perl-bit-vector : nécessite zimbra-perl-carp-clan
|
||||||
|
zimbra-perl-cache-fastmmap : OK
|
||||||
|
perl-canary-stability : OK
|
||||||
|
perl-carp-clan : les tests échouent
|
||||||
|
perl-class-inspector : can't locate inc::Module::Install::DSL
|
||||||
|
perl-compress-raw-bzip2 : can't locate private::MakeUtil
|
||||||
|
perl-compress-raw-zlib : OK
|
||||||
|
perl-config-inifiles : nécessite zimbra-perl-list-moreutils
|
||||||
|
perl-convert-asn1 : zimbra-perl-math-bigint
|
||||||
|
perl-convert-binhex : OK
|
||||||
|
perl-convert-tnef : nécessite zimbra-perl-mime-tools et zimbra-perl-io-stringy
|
||||||
|
perl-convert-uulib : nécessite zimbra-perl-canary-stability, OK (modulo un prompt d'avertissement durant le build)
|
||||||
|
perl-crypt-openssl-random : OK
|
||||||
|
perl-crypt-openssl-rsa : Can't locate Crypt/OpenSSL/Guess.pm
|
||||||
|
perl-crypt-saltedhash : OK
|
||||||
|
perl-data-uuid : OK
|
||||||
|
perl-date-calc : nécessite zimbra-perl-carp-clan et zimbra-perl-bit-vector
|
||||||
|
perl-date-manip : perl-Test-Inter is needed
|
||||||
|
perl-db-file : nécessite zimbra-bdb-devel, OK
|
||||||
|
perl-dbd-mysql : nécessite zimbra-perl-dbi et zimbra-mariadb-devel
|
||||||
|
perl-dbd-sqlite : nécessite zimbra-perl-dbi, OK
|
||||||
|
perl-dbi : OK
|
||||||
|
perl-digest-hmac : nécessite zimbra-perl-digest-sha1
|
||||||
|
perl-digest-sha1 : OK
|
||||||
|
perl-email-date-format : OK
|
||||||
|
perl-encode-detect : OK
|
||||||
|
perl-encode-locale : OK
|
||||||
|
perl-error : OK
|
||||||
|
perl-exporter-tiny : OK
|
||||||
|
perl-extutils-constant : OK
|
||||||
|
perl-file-grep : OK
|
||||||
|
perl-file-libmagic : OK
|
||||||
|
perl-file-listing : nécessite zimbra-perl-http-date, OK
|
||||||
|
perl-file-tail : OK
|
||||||
|
perl-filesys-df : OK
|
||||||
|
perl-geography-countries : OK
|
||||||
|
perl-html-parser : OK
|
||||||
|
perl-http-cookies : nécessite zimbra-perl-http-date et zimbra-perl-http-message
|
||||||
|
perl-http-daemon : nécessite zimbra-perl-http-date, zimbra-perl-http-message et zimbra-perl-lwp-mediatypes
|
||||||
|
perl-http-date : OK
|
||||||
|
perl-http-message : nécessite zimbra-perl-io-compress, zimbra-perl-uri, zimbra-perl-io-html, zimbra-perl-encode-locale et zimbra-perl-lwp-mediatypes
|
||||||
|
perl-http-negotiate : nécessite perl-http-message
|
||||||
|
perl-innotop : nécessite zimbra-perl-dbd-mysql et zimbra-perl-term-readkey
|
||||||
|
perl-io-compress : nécessite zimbra-perl-compress-raw-bzip2 et zimbra-perl-compress-raw-zlib
|
||||||
|
perl-io-html : OK
|
||||||
|
perl-io-sessiondata : OK
|
||||||
|
perl-io-socket-inet6 : nécessite zimbra-perl-socket
|
||||||
|
perl-io-socket-ip : nécessite zimbra-perl-socket
|
||||||
|
perl-io-socket-ssl : nécessite zimbra-perl-net-ssleay, zimbra-perl-mozilla-ca, zimbra-perl-io-socket-ip
|
||||||
|
perl-io-stringy : OK
|
||||||
|
perl-ip-country : nécessite perl-geography-countries, OK
|
||||||
|
perl-json-pp : OK
|
||||||
|
perl-libwww : nécessite zimbra-perl-encode-locale, zimbra-perl-file-listing, zimbra-perl-http-cookies, zimbra-perl-http-daemon, zimbra-perl-http-negotiate, zimbra-perl-lwp-mediatypes, zimbra-perl-uri, zimbra-perl-net-http, zimbra-perl-www-robotrules et zimbra-perl-html-parser
|
||||||
|
perl-list-moreutils : nécessite zimbra-perl-exporter-tiny, Can't locate inc/Config/AutoConf/LMU.pm
|
||||||
|
perl-lwp-mediatypes : OK
|
||||||
|
perl-lwp-protocol-https : nécessite zimbra-perl-libwww, zimbra-perl-net-http, zimbra-perl-io-socket-ssl, zimbra-perl-mozilla-ca et zimbra-openssl-devel
|
||||||
|
perl-mail-dkim : nécessite zimbra-perl-crypt-openssl-rsa, zimbra-perl-digest-sha1, zimbra-perl-net-dns, zimbra-perl-mailtools et zimbra-openssl-devel
|
||||||
|
perl-mail-spamassassin : nécessite zimbra-perl-digest-sha1, zimbra-perl-html-parser, zimbra-perl-io-compress, zimbra-perl-mail-dkim, zimbra-perl-net-dns, zimbra-perl-netaddr-ip, zimbra-perl-mail-spf, zimbra-perl-encode-detect, zimbra-perl-net-cidr-lite
|
||||||
|
perl-mail-spf : nécessite zimbra-perl-error, zimbra-perl-net-dns, zimbra-perl-netaddr-ip, zimbra-perl-net-dns-resolver-programmable
|
||||||
|
perl-mailtools : nécessite zimbra-perl-timedate
|
||||||
|
perl-math-bigint : OK
|
||||||
|
perl-mime-lite : nécessite zimbra-perl-mime-types, zimbra-perl-email-date-format et zimbra-perl-mailtools
|
||||||
|
perl-mime-tools : nécessite zimbra-perl-mailtools, zimbra-perl-convert-binhex et zimbra-perl-timedate
|
||||||
|
perl-mime-types : OK
|
||||||
|
perl-mozilla-ca : OK
|
||||||
|
perl-net-cidr : OK
|
||||||
|
perl-net-cidr-lite : OK
|
||||||
|
perl-net-dns : nécessite zimbra-perl-digest-hmac, zimbra-perl-digest-sha1 et zimbra-perl-io-socket-inet6
|
||||||
|
perl-net-dns-resolver-programmable : nécessite zimbra-perl-net-dns
|
||||||
|
perl-net-http : nécessite zimbra-perl-uri et zimbra-perl-io-socket-ssl
|
||||||
|
perl-net-ldap : nécessite zimbra-perl-convert-asn1, zimbra-perl-math-bigint, zimbra-perl-socket-linux
|
||||||
|
perl-net-ldapapi : nécessite zimbra-openldap-devel, zimbra-cyrus-sasl-devel et zimbra-perl-convert-asn1
|
||||||
|
perl-net-libidn : relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
|
|
@ -0,0 +1,6 @@
|
||||||
|
[zmbuilder]
|
||||||
|
name=Zimbra builder repository
|
||||||
|
metadata_expire=1
|
||||||
|
gpgcheck=0
|
||||||
|
enabled=1
|
||||||
|
baseurl=file:///zimbra/repo/$releasever/
|
Loading…
Reference in New Issue