Browse Source

now use contrib/pEp/pEpLinuxBuilder

build-image/master
Claudio Luck 7 months ago
parent
commit
4d829b9831
4 changed files with 37 additions and 152 deletions
  1. +3
    -3
      .drone.yml
  2. +3
    -0
      .gitmodules
  3. +1
    -0
      contrib/pEp/pEpLinuxBuilder
  4. +30
    -149
      parts/build/Dockerfile

+ 3
- 3
.drone.yml View File

@ -22,9 +22,9 @@ steps:
# - "${DRONE_BRANCH}-${DRONE_COMMIT}"
registry: hub.pep.oneon.ch
dockerfile: parts/build/Dockerfile
cache_from:
- "hub.pep.oneon.ch/pe_p/linux-tb-install-alpine-build:master"
- "hub.pep.oneon.ch/pe_p/linux-tb-install-alpine-build:${DRONE_BRANCH#build-image/*}"
# cache_from:
# - "hub.pep.oneon.ch/pe_p/linux-tb-install-alpine-build:master"
# - "hub.pep.oneon.ch/pe_p/linux-tb-install-alpine-build:${DRONE_BRANCH#build-image/*}"
when:
branch:
- build-image/*


+ 3
- 0
.gitmodules View File

@ -16,3 +16,6 @@
path = contrib/pEp/pEpForThunderbird
url = https://pep-security.lu/gitlab/thunderbird/pEpForThunderbird.git
branch = master
[submodule "contrib/pEp/pEpLinuxBuilder"]
path = contrib/pEp/pEpLinuxBuilder
url = http://pep-security.lu/gitlab/marcel/peplinuxbuilder.git

+ 1
- 0
contrib/pEp/pEpLinuxBuilder

@ -0,0 +1 @@
Subproject commit 6abd3c3e12074737be9246c1950a2c7a09b485f5

+ 30
- 149
parts/build/Dockerfile View File

@ -1,159 +1,40 @@
FROM alpine
FROM alpine:edge
# Arguments with defaults
ARG DRONE_IMAGE_BUILD_BRANCH=master
ARG libiconvver=1.16
ARG cairover=1.16.0
ARG pangover=1.48.1
ARG wxWidgetsTag=v3.1.4
ARG p4liTag=${DRONE_IMAGE_BUILD_BRANCH}
ENV DRONE_IMAGE_BUILD_BRANCH ${DRONE_IMAGE_BUILD_BRANCH}
ENV libiconvver ${libiconvver}
ENV cairover ${cairover}
ENV pangover ${pangover}
ENV wxWidgetsTag ${wxWidgetsTag}
ENV p4liTag ${p4liTag}
WORKDIR /root
ADD contrib/get-pip.py /root/get-pip.py
# ADD parts/build/setup.sh /root/setup.sh
# RUN /root/setup.sh
RUN apk add git wget
RUN mkdir -p /root/src /install
WORKDIR /root/src
RUN git clone --branch="${wxWidgetsTag}" --depth=1 https://github.com/wxWidgets/wxWidgets.git
RUN cd wxWidgets && git submodule update --init 3rdparty/catch
RUN git clone --branch="${p4liTag}" --depth=1 https://gitea.pep.foundation/claudio/pEpLinuxSetupForThunderbird.git
RUN cd pEpLinuxSetupForThunderbird && git submodule update --init
RUN wget https://ftp.gnu.org/gnu/libiconv/libiconv-${libiconvver}.tar.gz
RUN wget https://cairographics.org/releases/cairo-${cairover}.tar.xz
RUN wget https://download.gnome.org/sources/pango/${pangover%.*}/pango-${pangover}.tar.xz
RUN tar -xf libiconv-${libiconvver}.tar.gz
RUN tar -xf cairo-${cairover}.tar.xz
RUN tar -xf pango-${pangover}.tar.xz
RUN apk add wxgtk wxgtk-dev build-base meson python2 python2-dev sqlite curl zip
RUN apk add libpng-dev libpng-static libjpeg-turbo-dev libjpeg-turbo-static tiff tiff-dev expat-dev expat-static libx11-dev libx11-static libxau-dev libxcb libxcb-dev libxcb-static doxygen graphviz pango-dev xz zlib-static freetype-static fontconfig-static harfbuzz-static gettext-static glib-static graphite2-static fribidi-static bzip2-static brotli-static pixman-static
RUN python2 /root/get-pip.py
RUN python2 -m pip install nuitka
# RUN apk add alpine-sdk
# RUN adduser -D build
# RUN addgroup build abuild
RUN apk add alpine-sdk
RUN adduser -D build
RUN addgroup build abuild
# RUN mkdir -p /var/cache/distfiles
# RUN chmod a+w /var/cache/distfiles
# RUN chmod g+w /var/cache/distfiles
#
# RUN apk add sudo
# RUN echo "build ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/build
# # RUN echo "build ALL=(root) NOPASSWD: /usr/bin/abuild-keygen" >/etc/sudoers.d/build
#
# RUN sed -i.bak -e 's/export JOBS=2/export JOBS=${JOBS-10}/' /etc/abuild.conf
# RUN sed -i.bak -e 's/USE_COLORS=1/#USE_COLORS=1/g' /etc/abuild.conf
#
# USER build
#
# RUN abuild-keygen -a -i -n
#
# RUN git config --global user.name "Build Bot"
# RUN git config --global user.email "build@pep.oneon.ch"
#
# RUN mkdir -p /home/build/src
# RUN [ -d /home/build/src/aports] || git clone https://gitlab.alpinelinux.org/alpine/aports /home/build/src/aports
#
# RUN cd /home/build/src/aports/community/gnu-libiconv
# RUN sed -i.bak -e 's/disable-static/enable-static/' APKBUILD
# RUN abuild
WORKDIR /root/src/libiconv-${libiconvver}
RUN ./configure --prefix=/install --enable-extra-encodings --enable-static
RUN make -j10
RUN make install
WORKDIR /root/src/cairo-${cairover}
RUN ./configure --enable-static --disable-xlib-xrender --disable-xcb-shm --prefix=/install/
# cairo (version 1.16.0 [release]) will be compiled with:
#
# The following surface backends:
# Image: yes (always builtin)
# Recording: yes (always builtin)
# Observer: yes (always builtin)
# Mime: yes (always builtin)
# Tee: no (disabled, use --enable-tee to enable)
# XML: no (disabled, use --enable-xml to enable)
# Xlib: yes
# Xlib Xrender: no (disabled, use --enable-xlib-xrender to enable)
# Qt: no (disabled, use --enable-qt to enable)
# Quartz: no (requires CoreGraphics framework)
# Quartz-image: no (disabled, use --enable-quartz-image to enable)
# XCB: yes
# Win32: no (requires a Win32 platform)
# OS2: no (disabled, use --enable-os2 to enable)
# CairoScript: yes
# PostScript: yes
# PDF: yes
# SVG: yes
# OpenGL: no (disabled, use --enable-gl to enable)
# OpenGL ES 2.0: no (disabled, use --enable-glesv2 to enable)
# OpenGL ES 3.0: no (disabled, use --enable-glesv3 to enable)
# BeOS: no (disabled, use --enable-beos to enable)
# DirectFB: no (disabled, use --enable-directfb to enable)
# OpenVG: no (disabled, use --enable-vg to enable)
# DRM: no (disabled, use --enable-drm to enable)
# Cogl: no (disabled, use --enable-cogl to enable)
#
# The following font backends:
# User: yes (always builtin)
# FreeType: yes
# Fontconfig: yes
# Win32: no (requires a Win32 platform)
# Quartz: no (requires CoreGraphics framework)
#
# The following functions:
# PNG functions: yes
# GLX functions: no (not required by any backend)
# WGL functions: no (not required by any backend)
# EGL functions: no (not required by any backend)
# X11-xcb functions: no (disabled, use --enable-xlib-xcb to enable)
# XCB-shm functions: no (disabled, use --enable-xcb-shm to enable)
#
# The following features and utilities:
# cairo-trace: yes
# cairo-script-interpreter: yes
#
# And the following internal features:
# pthread: yes
# gtk-doc: no
# gcov support: no
# symbol-lookup: no (requires bfd)
# test surfaces: no (disabled, use --enable-test-surfaces to enable)
# ps testing: no (requires libspectre)
# pdf testing: no (requires poppler-glib >= 0.17.4)
# svg testing: no (requires librsvg-2.0 >= 2.35.0)
#
RUN make -j15
RUN make install
WORKDIR /root/src/pango-${pangover}
# Note: missing libthai
RUN meson --prefix=/install/ -Db_staticpic=true -Db_pie=true --wrap-mode=nodownload --auto-features=auto --buildtype=plain -Dintrospection=disabled -Dgtk_doc=false -Ddefault_library=both build
RUN meson compile -j15 -C build
RUN meson install --no-rebuild -C build
WORKDIR /root/src/wxWidgets
RUN ./configure --with-x11 --disable-shared --prefix=/install/ --enable-monolithic --disable-xlocale
RUN make -j15
RUN make install
# WORKDIR /root/src/pEpLinuxSetupForThunderbird/src
# RUN make STATIC=yes wx_config=/install/bin/wx-config
RUN echo http://ftp.halifax.rwth-aachen.de/alpine//edge/main >/etc/apk/repositories
RUN echo http://ftp.halifax.rwth-aachen.de/alpine//edge/community >>/etc/apk/repositories
RUN echo http://ftp.halifax.rwth-aachen.de/alpine//edge/testing >>/etc/apk/repositories
# Following https://pep-security.lu/gitlab/marcel/peplinuxbuilder#installer:
ADD contrib/pEp/pEpLinuxBuilder/*.sh /build
ADD contrib/pEp/pEpLinuxBuilder/patches /build
RUN chown -R build: /build
WORKDIR /build
RUN sed -i.bak -e 's/adduser build//g' ./alpine-installdeps-gui.sh || true
RUN echo set -vx >>./settings.sh
RUN ./alpine-installdeps-gui.sh
#
# #USER build
# #RUN abuild-keygen -a -i -n
# # RUN git config --global user.name "Build Bot"
# # RUN git config --global user.email "build@pep.oneon.ch"
# # WORKDIR /home/build/src/pEpLinuxBuilder
# RUN ./deps-cairo-static.sh
# RUN ./deps-pango-static.sh
# RUN ./tools-wxwidgets.sh
# # RUN ./pEp-tblinux-installer.sh
# # RUN ./deps-python2-static.sh

Loading…
Cancel
Save