From a2a6b3bc16315e5f0d0d3b29d4ffd84b2c4ebdc2 Mon Sep 17 00:00:00 2001
From: Alexander Wellbrock <a.wellbrock@mailbox.org>
Date: Tue, 28 Jul 2020 18:16:40 +0200
Subject: [PATCH] Fix build engine

build-ah-engine is not aarch64 compatible.
---
 .gitlab-ci.yml | 12 +++++++++---
 storage.conf   | 12 ++++++++++++
 2 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 storage.conf

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ebf1484..1f50fed 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,21 @@
-image: registry.gitlab.com/othermo/fedora-build:latest
+image: quay.io/sheogorath/build-ah-engine
 
 variables:
   GIT_SUBMODULE_STRATEGY: 'recursive'
 
 before_script:
-  - git config --global user.email "info@othermo.de"
-  - git config --global user.name "Othermo CI"
   - podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
 
 build-aarch64:
+  image: docker.io/library/fedora:32
   stage: build
+  before_script:
+    # Build engine for aarch64
+    - dnf install -y git podman buildah findutils
+    - sed -e 's/cgroup_manager =.*/cgroup_manager = "cgroupfs"/' /usr/share/containers/containers.conf > /etc/containers/containers.conf
+    - git config --global user.email "info@othermo.de"
+    - git config --global user.name "Othermo CI"
+    - cp storage.conf /etc/containers/storage.conf
   script:
     - podman pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-aarch64" || true
     - podman build --layers=false --cache-from "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-aarch64" --tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-aarch64" .
diff --git a/storage.conf b/storage.conf
new file mode 100644
index 0000000..3f13e2a
--- /dev/null
+++ b/storage.conf
@@ -0,0 +1,12 @@
+# podman CI config
+
+[storage]
+# Default Storage Driver
+driver = "vfs"
+
+# Temporary storage location
+runroot = "/var/run/containers/storage"
+
+# Primary Read/Write location of container storage
+graphroot = "/var/lib/containers/storage"
+
-- 
GitLab