Commit b20faf61 authored by Fredy Pulido's avatar Fredy Pulido Committed by Sébastien Blin

packaging: adds debian 10 and raspbian arm

Adds:
* Debian 9 armhf
* Debian 9 arm64
* Debian 10 armhf
* Debian 10 arm64
* Raspbian 10 armhf
* The One Click Install (oci) version for all this items

This commit also fix the --generate option in the generated makefile by
scripts/make-packaging-target.py and remove the --architecture option
there because was not used at any part of the script.

Because our builder docker can not docker build with ARM we implemented
a workaround called dirty qemu-static is documented and we have a issue
to sovle it.

The pipeline for packaging-deploy-gnulinux-generic got changed to add
the support for the ARM architecture but the OCI build is not enabled
because the build including the oci takes long (5 hours or plus).

Warning: require companion changes in daemon (topic debian-arm)
to ensure the right compilation flags

Change-Id: I905bbd4660824670d7de836129886f3d7f1dc83b
parent 310e7f76
......@@ -10,3 +10,4 @@ Makefile.packaging.distro_targets
repositories
manual-download
.docker-image-*
qemu-static
......@@ -77,12 +77,21 @@ $(RELEASE_TARBALL_FILENAME):
.PHONY: package-all
package-all: package-debian_9 \
package-debian_9_i386 \
package-debian_9_armhf \
package-debian_9_arm64 \
package-debian_9_oci \
package-debian_9_i386_oci \
package-debian_9_armhf_oci \
package-debian_9_arm64_oci \
package-debian_10 \
package-debian_10_i386 \
package-debian_10_armhf \
package-debian_10_arm64 \
package-debian_10_oci \
package-debian_10_i386_oci \
package-debian_10_armhf_oci \
package-debian_10_arm64_oci \
package-raspbian_10_armhf \
package-ubuntu_16.04 \
package-ubuntu_16.04_i386 \
package-ubuntu_16.04_oci \
......@@ -146,3 +155,4 @@ clean:
rm -rf packages
rm -f Makefile.packaging.distro_targets
rm -f .docker-image-*
rm -fr qemu-static
FROM arm64v8/debian:buster
# FIXME: dirty qemu-static hack required because our Jenkins node runs Docker 17
# Remove next line as soon as we get Docker 18 +
COPY qemu-static/qemu-aarch64-static /usr/bin/qemu-aarch64-static
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y vim devscripts
# Speed up mk-build-deps
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retires=10 \
git \
autoconf \
automake \
autopoint \
cmake \
libtool \
libdbus-1-dev \
libdbus-c++-dev \
libargon2-0-dev \
libebook1.2-dev \
libcanberra-gtk3-dev \
libclutter-gtk-1.0-dev \
libclutter-1.0-dev \
libglib2.0-dev \
libgtk-3-dev \
libnotify-dev \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm \
nasm \
autotools-dev \
gettext \
libpulse-dev \
libasound2-dev \
libexpat1-dev \
libpcre3-dev \
libyaml-cpp-dev \
libboost-dev \
libxext-dev \
libxfixes-dev \
libspeex-dev \
libspeexdsp-dev \
uuid-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
libswscale-dev \
libavdevice-dev \
libopus-dev \
libudev-dev \
libgsm1-dev \
libjsoncpp-dev \
libmsgpack-dev \
libnatpmp-dev \
libappindicator3-dev \
libqrencode-dev \
libnm-dev \
libwebkit2gtk-4.0-dev \
libcrypto++-dev \
libva-dev \
libvdpau-dev \
libssl-dev
ADD scripts/build-package-debian.sh /opt/build-package-debian.sh
CMD /opt/build-package-debian.sh
FROM arm32v7/debian:buster
# FIXME: dirty qemu-static hack required because our Jenkins node runs Docker 17
# Remove next line as soon as we get Docker 18 +
COPY qemu-static/qemu-arm-static /usr/bin/qemu-arm-static
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y vim devscripts
# Speed up mk-build-deps
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retires=10 \
git \
autoconf \
automake \
autopoint \
cmake \
libtool \
libdbus-1-dev \
libdbus-c++-dev \
libargon2-0-dev \
libebook1.2-dev \
libcanberra-gtk3-dev \
libclutter-gtk-1.0-dev \
libclutter-1.0-dev \
libglib2.0-dev \
libgtk-3-dev \
libnotify-dev \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm \
nasm \
autotools-dev \
gettext \
libpulse-dev \
libasound2-dev \
libexpat1-dev \
libpcre3-dev \
libyaml-cpp-dev \
libboost-dev \
libxext-dev \
libxfixes-dev \
libspeex-dev \
libspeexdsp-dev \
uuid-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
libswscale-dev \
libavdevice-dev \
libopus-dev \
libudev-dev \
libgsm1-dev \
libjsoncpp-dev \
libmsgpack-dev \
libnatpmp-dev \
libappindicator3-dev \
libqrencode-dev \
libnm-dev \
libwebkit2gtk-4.0-dev \
libcrypto++-dev \
libva-dev \
libvdpau-dev \
libssl-dev
ADD scripts/build-package-debian.sh /opt/build-package-debian.sh
CMD /opt/build-package-debian.sh
FROM arm64v8/debian:9
# FIXME: dirty qemu-static hack required because our Jenkins node runs Docker 17
# Remove next line as soon as we get Docker 18 +
COPY qemu-static/qemu-aarch64-static /usr/bin/qemu-aarch64-static
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y vim devscripts
# Speed up mk-build-deps
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retires=10 \
git \
autoconf \
automake \
autopoint \
cmake \
libtool \
libdbus-1-dev \
libdbus-c++-dev \
libargon2-0-dev \
libebook1.2-dev \
libcanberra-gtk3-dev \
libclutter-gtk-1.0-dev \
libclutter-1.0-dev \
libglib2.0-dev \
libgtk-3-dev \
libnotify-dev \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm \
nasm \
autotools-dev \
gettext \
libpulse-dev \
libasound2-dev \
libexpat1-dev \
libpcre3-dev \
libyaml-cpp-dev \
libboost-dev \
libxext-dev \
libxfixes-dev \
libspeex-dev \
libspeexdsp-dev \
uuid-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
libswscale-dev \
libavdevice-dev \
libopus-dev \
libudev-dev \
libgsm1-dev \
libjsoncpp-dev \
libmsgpack-dev \
libnatpmp-dev \
libappindicator3-dev \
libqrencode-dev \
libnm-dev \
libwebkit2gtk-4.0-dev \
libcrypto++-dev \
libva-dev \
libvdpau-dev \
libssl-dev
ADD scripts/build-package-debian.sh /opt/build-package-debian.sh
CMD /opt/build-package-debian.sh
FROM arm32v7/debian:9
# FIXME: dirty qemu-static hack required because our Jenkins node runs Docker 17
# Remove next line as soon as we get Docker 18 +
COPY qemu-static/qemu-arm-static /usr/bin/qemu-arm-static
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y vim devscripts
# Speed up mk-build-deps
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retires=10 \
git \
autoconf \
automake \
autopoint \
cmake \
libtool \
libdbus-1-dev \
libdbus-c++-dev \
libargon2-0-dev \
libebook1.2-dev \
libcanberra-gtk3-dev \
libclutter-gtk-1.0-dev \
libclutter-1.0-dev \
libglib2.0-dev \
libgtk-3-dev \
libnotify-dev \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm \
nasm \
autotools-dev \
gettext \
libpulse-dev \
libasound2-dev \
libexpat1-dev \
libpcre3-dev \
libyaml-cpp-dev \
libboost-dev \
libxext-dev \
libxfixes-dev \
libspeex-dev \
libspeexdsp-dev \
uuid-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
libswscale-dev \
libavdevice-dev \
libopus-dev \
libudev-dev \
libgsm1-dev \
libjsoncpp-dev \
libmsgpack-dev \
libnatpmp-dev \
libappindicator3-dev \
libqrencode-dev \
libnm-dev \
libwebkit2gtk-4.0-dev \
libcrypto++-dev \
libva-dev \
libvdpau-dev \
libssl-dev
ADD scripts/build-package-debian.sh /opt/build-package-debian.sh
CMD /opt/build-package-debian.sh
FROM arm32v7/debian:buster
# debian because no raspbian imgs
# FIXME: dirty qemu-static hack required because our Jenkins node runs Docker 17
# Remove next line as soon as we get Docker 18 +
COPY qemu-static/qemu-arm-static /usr/bin/qemu-arm-static
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get clean
RUN apt-get update && \
apt-get install -y vim devscripts
# Speed up mk-build-deps
RUN apt-get clean
RUN apt-get update && \
apt-get install -y -o Acquire::Retires=10 \
git \
autoconf \
automake \
autopoint \
cmake \
libtool \
libdbus-1-dev \
libdbus-c++-dev \
libargon2-0-dev \
libebook1.2-dev \
libcanberra-gtk3-dev \
libclutter-gtk-1.0-dev \
libclutter-1.0-dev \
libglib2.0-dev \
libgtk-3-dev \
libnotify-dev \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
yasm \
nasm \
autotools-dev \
gettext \
libpulse-dev \
libasound2-dev \
libexpat1-dev \
libpcre3-dev \
libyaml-cpp-dev \
libboost-dev \
libxext-dev \
libxfixes-dev \
libspeex-dev \
libspeexdsp-dev \
uuid-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
libswscale-dev \
libavdevice-dev \
libopus-dev \
libudev-dev \
libgsm1-dev \
libjsoncpp-dev \
libmsgpack-dev \
libnatpmp-dev \
libappindicator3-dev \
libqrencode-dev \
libnm-dev \
libwebkit2gtk-4.0-dev \
libcrypto++-dev \
libva-dev \
libvdpau-dev \
libssl-dev
ADD scripts/build-package-debian.sh /opt/build-package-debian.sh
CMD /opt/build-package-debian.sh
......@@ -15,6 +15,13 @@ endif
# Binary package names
RING_ALL_IN_ONE_PKG_NAME="jami-all"
# Bundled packages from contrib
BUNDLED_PKGS = .ffmpeg
ifeq ($(DISTRIBUTION),raspbian_10_armhf)
# Raspbian's yaml-cpp lib does not work properly
BUNDLED_PKGS += .yaml-cpp
endif
%:
dh $@
......@@ -51,7 +58,7 @@ override_dh_auto_configure:
--enable-gnutls && \
make list && \
make -j$(NO_CPUS) V=1 && \
make -j$(NO_CPUS) .ffmpeg V=1
make -j$(NO_CPUS) $(BUNDLED_PKGS) V=1
cd daemon && \
./autogen.sh && \
./configure \
......
......@@ -17,6 +17,13 @@ RING_ALL_IN_ONE_PKG_NAME="jami-all"
RING_CLIENT_PKG_NAME="jami"
RING_DAEMON_PKG_NAME="jami-daemon"
# Bundled packages from contrib
BUNDLED_PKGS = .ffmpeg
ifeq ($(DISTRIBUTION),raspbian_10_armhf)
# Raspbian's yaml-cpp lib does not work properly
BUNDLED_PKGS += .yaml-cpp
endif
%:
dh $@
......@@ -53,7 +60,7 @@ override_dh_auto_configure:
--enable-gnutls && \
make list && \
make -j$(NO_CPUS) V=1 && \
make -j$(NO_CPUS) .ffmpeg V=1
make -j$(NO_CPUS) $(BUNDLED_PKGS) V=1
cd daemon && \
./autogen.sh && \
./configure \
......
......@@ -49,7 +49,7 @@ function package_deb()
Origin: ring
Label: Ring ${DISTRIBUTION} Repository
Codename: ring
Architectures: i386 amd64
Architectures: i386 amd64 armhf arm64
Components: main
Description: This repository contains Ring ${DISTRIBUTION} packages
SignWith: ${KEYID}
......@@ -91,19 +91,19 @@ EOF
#######################################
## create the manual download folder ##
#######################################
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER=$(realpath manual-download)/${DISTRIBUTION}
mkdir -p ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}
ls packages/${DISTRIBUTION}
# packages with dfsg1-0 contains the postinstall script that adds the repository
cp packages/${DISTRIBUTION}*/jami-all_????????.*\~dfsg1-0_*.deb ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}
for package in ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}/*; do
package_name=$(dpkg -I ${package} | grep -m 1 Package: | awk '{print $2}')
package_arch=$(dpkg -I ${package} | grep -m 1 Architecture: | awk '{print $2}')
package_linkname=${package_name}_${package_arch}.deb
cd ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}
cp ${package} ${package_linkname}
cd -
done
if [ -d packages/${DISTRIBUTION}*_oci ]; then
DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER=$(realpath manual-download)/${DISTRIBUTION}
mkdir -p ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}
NAME_PATTERN=jami-all_????????.*\~dfsg*.deb
cp packages/${DISTRIBUTION}*_oci/${NAME_PATTERN} ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}
for package in ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}/${NAME_PATTERN} ; do
package_name=$(dpkg -I ${package} | grep -m 1 Package: | awk '{print $2}')
package_arch=$(dpkg -I ${package} | grep -m 1 Architecture: | awk '{print $2}')
package_shortname=${package_name}_${package_arch}.deb
rm -f ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}/${package_shortname}
cp ${package} ${DISTRIBUTION_MANUAL_DOWNLOAD_FOLDER}/${package_shortname}
done
fi
}
......@@ -208,7 +208,7 @@ function deploy()
function package()
{
if [[ "${DISTRIBUTION:0:6}" == "debian" || "${DISTRIBUTION:0:6}" == "ubuntu" ]];
if [[ "${DISTRIBUTION:0:6}" == "debian" || "${DISTRIBUTION:0:6}" == "ubuntu" || "${DISTRIBUTION:0:8}" == "raspbian" ]];
then
package_deb
elif [[ "${DISTRIBUTION:0:6}" == "fedora" || "${DISTRIBUTION:0:4}" == "rhel" || "${DISTRIBUTION:0:13}" == "opensuse-leap" ]];
......
......@@ -38,6 +38,7 @@ target_template = """\
PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME:=jami-packaging-%(distribution)s$(RING_PACKAGING_IMAGE_SUFFIX)
PACKAGE_%(distribution)s_DOCKER_IMAGE_FILE:=.docker-image-$(PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME)
DOCKER_EXTRA_ARGS =
QEMU_STATIC_%(distribution)s = %(qemu_static)s
PACKAGE_%(distribution)s_DOCKER_RUN_COMMAND = docker run \\
--rm \\
......@@ -52,7 +53,12 @@ PACKAGE_%(distribution)s_DOCKER_RUN_COMMAND = docker run \\
-t $(DOCKER_EXTRA_ARGS) %(options)s \\
$(PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME)
$(PACKAGE_%(distribution)s_DOCKER_IMAGE_FILE): docker/Dockerfile_%(docker_image)s
# FIXME: dirty qemu-static hack required because our Jenkis node runs Docker 17
# Remove all the qemu-static / QEMU-STATIC stuff as soon as we get Docker 18 +
QEMU_STATIC_%(distribution)s:
if [ ! -z $(QEMU_STATIC_%(distribution)s) ]; then mkdir -p qemu-static && cp -af /usr/bin/$(QEMU_STATIC_%(distribution)s) qemu-static/; fi
$(PACKAGE_%(distribution)s_DOCKER_IMAGE_FILE): QEMU_STATIC_%(distribution)s docker/Dockerfile_%(docker_image)s
docker build \\
-t $(PACKAGE_%(distribution)s_DOCKER_IMAGE_NAME) \\
-f docker/Dockerfile_%(docker_image)s \\
......@@ -76,7 +82,7 @@ package-%(distribution)s-interactive: $(RELEASE_TARBALL_FILENAME) packages/%(dis
"""
def generate_target(distribution, debian_packaging_override, output_file, options='', docker_image='', version=''):
def generate_target(distribution, debian_packaging_override, output_file, options='', docker_image='', version='', qemu_static=''):
if (docker_image == ''):
docker_image = distribution
if (version == ''):
......@@ -88,12 +94,18 @@ def generate_target(distribution, debian_packaging_override, output_file, option
"output_file": output_file,
"options": options,
"version": version,
"qemu_static": qemu_static,
}
def run_generate(parsed_args):
print(generate_target(parsed_args.distribution,
parsed_args.debian_packaging_override))
parsed_args.debian_packaging_override,
parsed_args.output_file,
parsed_args.options,
parsed_args.docker_image,
parsed_args.version,
parsed_args.qemu_static))
def run_generate_all(parsed_args):
......@@ -109,6 +121,20 @@ def run_generate_all(parsed_args):
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
},
{
"distribution": "debian_9_armhf",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "--privileged --security-opt apparmor=docker-default",
"qemu_static": 'qemu-arm-static',
},
{
"distribution": "debian_9_arm64",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "--privileged --security-opt apparmor=docker-default",
"qemu_static": 'qemu-aarch64-static',
},
{
"distribution": "debian_9_oci",
"docker_image": "debian_9",
......@@ -125,6 +151,24 @@ def run_generate_all(parsed_args):
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR)",
"version": "$(DEBIAN_OCI_VERSION)",
},
{
"distribution": "debian_9_armhf_oci",
"docker_image": "debian_9_armhf",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)",
"qemu_static": 'qemu-arm-static',
},
{
"distribution": "debian_9_arm64_oci",
"docker_image": "debian_9_arm64",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)",
"qemu_static": 'qemu-aarch64-static',
},
{
"distribution": "debian_10",
"debian_packaging_override": "",
......@@ -137,6 +181,20 @@ def run_generate_all(parsed_args):
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "--privileged --security-opt apparmor=docker-default",
},
{
"distribution": "debian_10_armhf",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "--privileged --security-opt apparmor=docker-default",
"qemu_static": 'qemu-arm-static',
},
{
"distribution": "debian_10_arm64",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "--privileged --security-opt apparmor=docker-default",
"qemu_static": 'qemu-aarch64-static',
},
{
"distribution": "debian_10_oci",
"docker_image": "debian_10",
......@@ -153,6 +211,41 @@ def run_generate_all(parsed_args):
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)",
},
{
"distribution": "debian_10_armhf_oci",
"docker_image": "debian_10_armhf",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)",
"qemu_static": 'qemu-arm-static',
},
{
"distribution": "debian_10_arm64_oci",
"docker_image": "debian_10_arm64",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)",
"qemu_static": 'qemu-aarch64-static',
},
# Raspbian
{
"distribution": "raspbian_10_armhf",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "--privileged --security-opt apparmor=docker-default",
"qemu_static": 'qemu-arm-static',
},
{
"distribution": "raspbian_10_armhf_oci",
"docker_image": "raspbian_10_armhf",
"debian_packaging_override": "",
"output_file": "$(DEBIAN_DSC_FILENAME)",
"options": "-e OVERRIDE_PACKAGING_DIR=$(DEBIAN_OCI_PKG_DIR) --privileged --security-opt apparmor=docker-default",
"version": "$(DEBIAN_OCI_VERSION)",
"qemu_static": 'qemu-arm-static',
},
# Ubuntu
{
"distribution": "ubuntu_16.04",
......@@ -393,9 +486,12 @@ def parse_args():
# Parameters
ap.add_argument('--distribution')
ap.add_argument('--architecture')
ap.add_argument('--debian_packaging_override', default='')
ap.add_argument('--output_file')
ap.add_argument('--options', default='')
ap.add_argument('--docker_image', default='')
ap.add_argument('--version', default='')
ap.add_argument('--qemu_static', default='')
parsed_args = ap.parse_args()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment