[tracker-oci-images/sam/unprivileged: 1/2] Update images to avoid use of external files




commit a4d7f47d9efeaace6ac391cb3bbb823d11d45ca9
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed Dec 9 23:53:25 2020 +0100

    Update images to avoid use of external files
    
    This matches changes in librsvg-oci-images, and hopefully
    fixes a build error in CI.

 .gitlab-ci.yml                   |  8 +++---
 alpine/cleanup.sh                |  1 -
 alpine/edge                      |  6 ----
 alpine/edge.Dockerfile           | 26 +++++++++++++++++
 alpine/prepare.sh                | 29 -------------------
 debian/cleanup.sh                | 15 ----------
 debian/prepare.sh                | 32 ---------------------
 debian/ubuntu-rolling            |  6 ----
 debian/ubuntu-rolling.Dockerfile | 18 ++++++++++++
 fedora/cleanup.sh                | 14 ----------
 fedora/latest                    |  6 ----
 fedora/prepare.sh                | 60 ----------------------------------------
 fedora/rawhide                   |  7 -----
 fedora/rawhide.Dockerfile        | 39 ++++++++++++++++++++++++++
 14 files changed, 87 insertions(+), 180 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index de27597..bc617d1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,7 +50,7 @@ alpine edge:
     ARCH: "amd64"
     DISTRO_NAME: "alpine"
     DISTRO_VER: "edge"
-    DOCKERFILE: "alpine/edge"
+    DOCKERFILE: "alpine/edge.Dockerfile"
     CONTEXT_DIR: "alpine"
   only:
     changes:
@@ -62,7 +62,7 @@ fedora latest:
     ARCH: "amd64"
     DISTRO_NAME: "fedora"
     DISTRO_VER: "latest"
-    DOCKERFILE: "fedora/latest"
+    DOCKERFILE: "fedora/latest.Dockerfile"
     CONTEXT_DIR: "fedora"
   only:
     changes:
@@ -74,7 +74,7 @@ fedora rawhide:
     ARCH: "amd64"
     DISTRO_NAME: "fedora"
     DISTRO_VER: "rawhide"
-    DOCKERFILE: "fedora/rawhide"
+    DOCKERFILE: "fedora/rawhide.Dockerfile"
     CONTEXT_DIR: "fedora"
   only:
     changes:
@@ -86,7 +86,7 @@ ubuntu:rolling:
     ARCH: "amd64"
     DISTRO_NAME: "ubuntu"
     DISTRO_VER: "rolling"
-    DOCKERFILE: "debian/ubuntu-rolling"
+    DOCKERFILE: "debian/ubuntu-rolling.Dockerfile"
     CONTEXT_DIR: "debian"
   only:
     changes:
diff --git a/alpine/edge.Dockerfile b/alpine/edge.Dockerfile
new file mode 100644
index 0000000..4346cea
--- /dev/null
+++ b/alpine/edge.Dockerfile
@@ -0,0 +1,26 @@
+FROM alpine:edge
+
+RUN echo 'https://alpine.global.ssl.fastly.net/alpine/edge/community/' >> /etc/apk/repositories && \
+    apk add -U alpine-sdk asciidoc bash-completion dbus-dev git glib-dev gobject-introspection-dev \
+               gtk-doc icu-dev json-glib-dev libsoup-dev libxml2-dev meson networkmanager-dev \
+               py3-gobject3 py3-setuptools sqlite-dev vala
+
+# Build eatmydata from Git.
+#
+# This is to speed up the tests. See:
+# https://gitlab.gnome.org/GNOME/tracker/merge_requests/176
+#
+# Currently https://gitlab.gnome.org/GNOME/tracker-oci-images/merge_requests/13
+# is needed to build against musl libc.
+RUN apk add -U autoconf automake libtool && \
+    git clone https://github.com/ssssam/libeatmydata --branch sam/musl-open64-fix && \
+    cd libeatmydata && \
+    autoreconf -ivf && \
+    ./configure && \
+    make && \
+    make install && \
+    cd .. && \
+    apk del autoconf automake libtool
+
+RUN addgroup -S tracker && \
+    adduser -D -G tracker -g tracker tracker
diff --git a/debian/ubuntu-rolling.Dockerfile b/debian/ubuntu-rolling.Dockerfile
new file mode 100644
index 0000000..0edaad0
--- /dev/null
+++ b/debian/ubuntu-rolling.Dockerfile
@@ -0,0 +1,18 @@
+FROM ubuntu:rolling
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+    sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list && \
+    apt-get -yq update && apt-get -yq upgrade && \
+    apt-get -yq build-dep tracker tracker-miners && \
+    apt-get -yq install umockdev libumockdev-dev upower && \
+    apt-get -yq install --no-install-recommends asciidoc-base && \
+    apt-get -yq install git && \
+    apt-get -yq install libgrss-dev && \
+    apt-get -yq install eatmydata
+
+RUN apt-get -yq remove libtracker-sparql-3.0-0 && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists && \
+    rm -R /root/*
+
+RUN useradd -Um tracker
diff --git a/fedora/rawhide.Dockerfile b/fedora/rawhide.Dockerfile
new file mode 100644
index 0000000..f135650
--- /dev/null
+++ b/fedora/rawhide.Dockerfile
@@ -0,0 +1,39 @@
+FROM registry.fedoraproject.org/fedora:rawhide
+
+# tracker and tracker-miners build deps
+RUN dnf upgrade -y && \
+    dnf install -y 'dnf-command(builddep)' redhat-rpm-config && \
+    dnf builddep -y tracker tracker-miners
+
+# test suite and website dependencies
+RUN dnf install -y git libasan libubsan python3-gobject python3-pip umockdev-devel xmlto
+
+# We need libav so we can test the libav-based mediafile extractor, and so
+# we can test our support for .m4a/mp4 files.
+#
+# RPM Fusion install commands from https://rpmfusion.org/Configuration
+#
+# We ignore the weak dependencies of this package, which include compiler-rt, pocl
+# and mesa-libOpenCL -- these pull in the Clang/LLVM toolchain. Excluding them
+# saves 300MB of image size.
+RUN dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E 
%fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E 
%fedora).noarch.rpm &&
+    dnf install -y --setopt=install_weak_deps=False gstreamer1-libav
+
+# This is to speed up the tests. See:
+# https://gitlab.gnome.org/GNOME/tracker/merge_requests/176
+RUN curl --get 'https://www.flamingspork.com/projects/libeatmydata/libeatmydata-105.tar.gz' --output 
libeatmydata-105.tar.gz && \
+    tar -x -f ./libeatmydata-105.tar.gz && \
+    cd libeatmydata-105 && \
+    ./configure --prefix=/usr && \
+    make install && \
+    sed -e '/dpkg-architecture/ d' -i /usr/bin/eatmydata && \
+    sed -e 's@shlib="/usr/lib/$DEB_BUILD_MULTIARCH/eatmydata.sh@shlib="/usr/libexec/eatmydata.sh@' -i 
/usr/bin/eatmydata && \
+    cd .. && \
+    rm ./libeatmydata-105.tar.gz && \
+    rm -Rf ./libeatmydata-105
+
+RUN dnf remove -y tracker && \
+    dnf clean all && \
+    rm -R /root/*
+
+RUN useradd -Um tracker


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]