diff --git a/.gitea/workflows/build-and-push-image.yaml b/.gitea/workflows/build-and-push-image.yaml new file mode 100644 index 0000000..6be9649 --- /dev/null +++ b/.gitea/workflows/build-and-push-image.yaml @@ -0,0 +1,49 @@ +name: Build and publish docker image + +on: [push] + +env: + CI: ON + +# Allow workflow to be manually run from the Gitea UI + workflow_dispatch: + +jobs: + build_and_push: + runs-on: docker + name: Builds the image and publishes to docker hub + container: + image: harbor.avroid.tech/docker-hub-proxy/catthehacker/ubuntu:act-latest + steps: + - run: printenv + + - name: Login to Harbor Docker Registry + uses: docker/login-action@v3 + with: + registry: https://harbor.avroid.tech + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Check out repository code + uses: actions/checkout@v3 + + - name: "Build image and push" + run: | + make build + + - name: "Push image" + run: | + make push + if: gitea.branch_name == 'master' + + - name: "Clear image" + run: | + make clean + + - name: Create and push tag + run: | + git config user.name "Jenkins" + git config user.email "svc-jenkins@avroid.tech" + git tag $(make getTag) + git push origin $(make getTag) + if: gitea.branch_name == 'master' diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef6b20..de3f42e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.3 + +### 07.10.2024 + +CHANGE: + +* Update build base image + ## 1.2 ### 10.09.2024 diff --git a/Dockerfile b/Dockerfile index 3281d43..2a9d108 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ ARG DOCKER_REGISTRY=harbor.avroid.tech # https://hub.docker.com/_/ubuntu -FROM ${DOCKER_REGISTRY}/all/base-build-image:1.4 +FROM ${DOCKER_REGISTRY}/all/base-build-image:1.8 LABEL description="Linux image for Tavro build" \ tools.qt.version="5.15.14" ###QT BUILD### -ARG NEXUS_URL="https://nexus.avroid.tech" ARG NEXUS_QT_REPO="qt_repo" \ VERSION=5.15.14 @@ -52,22 +51,25 @@ RUN apt update && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* #download, configure and build qt +COPY ./* /tmp/patches/ + RUN wget ${NEXUS_URL}/repository/${NEXUS_QT_REPO}/v${VERSION}/qt-everywhere-opensource-src-${VERSION}.tar.xz && tar -xJf qt-everywhere-opensource-src-${VERSION}.tar.xz && \ ln -sf /usr/bin/python3 /usr/bin/python && rm qt-everywhere-opensource-src-${VERSION}.tar.xz && cd qt-everywhere* && \ + #install patches \ + patch -p1 < /tmp/patches/0015-remove-detected-xkb-keys.patch && \ + sed -i '6i #include ' qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp && \ + sed -i '7i #include ' qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp && \ + sed -i '4i #include ' qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp && \ + #configure and build qt \ ./configure -release -opensource -confirm-license -nomake tests -nomake examples -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtdoc -skip qtmacextras -skip qtscript -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtserialbus -xkbcommon -system-harfbuzz -system-libjpeg -no-openssl && \ - make -j$(nproc) && make install -j$(nproc) && cd .. && rm -rf qt-everywhere* + make -j$(nproc) && make install -j$(nproc) && cd .. && rm -rf qt-everywhere* /tmp/patches # Personalization #------------------------------------------------------------------------------- # -ARG UID=1000 -ARG GID=1000 -ARG USER=jenkins -ARG USER_GROUP=jenkins +ARG USER=ubuntu ARG USER_HOME=/home/${USER} -RUN (groupadd -g ${GID} ${USER_GROUP} || true) && \ - useradd -d ${USER_HOME} -g ${GID} -u ${UID} --shell /bin/bash ${USER} USER ${USER} WORKDIR ${USER_HOME} diff --git a/Makefile b/Makefile index 910b206..417108e 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ IMAGE_NAME = tavro-build-linux IMAGE_GROUP = tavro -IMAGE_TAG = 1.2 +IMAGE_TAG = 1.3 REVISION = DOCKER_REGISTRY = harbor.avroid.tech @@ -14,15 +14,19 @@ all: @echo ' make clean' build: - DOCKER_BUILDKIT=1 docker build \ + +ifeq ($(CI), false) + CI_FLAGS='--no-cache' +endif + + DOCKER_BUILDKIT=1 $(CI_FLAGS) \ + docker build \ -f Dockerfile \ --platform linux/amd64 \ + --network "host" \ -t $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION) src/ push: -ifeq ($(CI), false) - docker login https://$(DOCKER_REGISTRY) -endif docker push $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION) getTag: diff --git a/src/0015-remove-detected-xkb-keys.patch b/src/0015-remove-detected-xkb-keys.patch new file mode 100644 index 0000000..9415db9 --- /dev/null +++ b/src/0015-remove-detected-xkb-keys.patch @@ -0,0 +1,45 @@ +diff --git a/qtbase/src/corelib/global/qnamespace.h b/qtbase/src/corelib/global/qnamespace.h +index 8a2769a3ed..584d3620c9 100644 +--- a/qtbase/src/corelib/global/qnamespace.h ++++ b/qtbase/src/corelib/global/qnamespace.h +@@ -832,10 +832,6 @@ namespace Qt { + Key_Dead_Small_Schwa = 0x0100128a, + Key_Dead_Capital_Schwa = 0x0100128b, + Key_Dead_Greek = 0x0100128c, +- Key_Dead_Lowline = 0x01001290, +- Key_Dead_Aboveverticalline = 0x01001291, +- Key_Dead_Belowverticalline = 0x01001292, +- Key_Dead_Longsolidusoverlay = 0x01001293, + + // multimedia/internet keys - ignored by default - see QKeyEvent c'tor + Key_Back = 0x01000061, +diff --git a/qtbase/src/corelib/global/qnamespace.qdoc b/qtbase/src/corelib/global/qnamespace.qdoc +index 78c69176d8..1623517b5a 100644 +--- a/qtbase/src/corelib/global/qnamespace.qdoc ++++ b/qtbase/src/corelib/global/qnamespace.qdoc +@@ -1654,10 +1654,6 @@ + \value Key_Dead_Small_Schwa + \value Key_Dead_Capital_Schwa + \value Key_Dead_Greek +- \value Key_Dead_Lowline +- \value Key_Dead_Aboveverticalline +- \value Key_Dead_Belowverticalline +- \value Key_Dead_Longsolidusoverlay + \value Key_Back + \value Key_Forward + \value Key_Stop +diff --git a/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp +index fc014b38e2..af1cbbd42a 100644 +--- a/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp ++++ b/qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp +@@ -239,10 +239,6 @@ static constexpr const auto KeyTbl = qMakeArray( + Xkb2Qt, + Xkb2Qt, + Xkb2Qt, +- Xkb2Qt, +- Xkb2Qt, +- Xkb2Qt, +- Xkb2Qt, + + // Special keys from X.org - This include multimedia keys, + // wireless/bluetooth/uwb keys, special launcher keys, etc.