diff --git a/.papr.yml b/.papr.yml index d33046ec..6e67d232 100644 --- a/.papr.yml +++ b/.papr.yml @@ -165,19 +165,19 @@ branches: - auto - try -context: f26-flatpak +context: f27-flatpak required: false # This test case wants an "unprivileged container with bubblewrap", # which we don't have right now; so just provision a VM and do a # docker --privileged run. host: - distro: fedora/26/atomic + distro: fedora/27/atomic specs: ram: 4096 # build-bundle is a static delta, which needs RAM right now tests: - - docker run --rm --privileged -v $(pwd):/srv/code registry.fedoraproject.org/fedora:26 /bin/sh -c "cd /srv/code && ./ci/flatpak.sh" + - docker run --rm --privileged -v $(pwd):/srv/code registry.fedoraproject.org/fedora:27 /bin/sh -c "cd /srv/code && ./ci/flatpak.sh" artifacts: - test-suite.log diff --git a/ci/0001-tests-Fix-race-condition-in-tmp-webserver.patch b/ci/0001-tests-Fix-race-condition-in-tmp-webserver.patch deleted file mode 100644 index dc66425f..00000000 --- a/ci/0001-tests-Fix-race-condition-in-tmp-webserver.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 6197e6922e3ba3c8881733a6a3253e8ae12eb538 Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Fri, 5 May 2017 16:36:04 -0400 -Subject: [PATCH] tests: Fix race condition in tmp webserver - -I was seeing this when trying to run flatpak's tests in ostree's CI: -https://github.com/ostreedev/ostree/pull/824 - -The race here is that the python process can still be writing to the output -while sed is reading it, and hence we'll find a difference on the next line. -Fix this by making a tmp copy of the file, which then both sed and cmp will -read consistently. - -I'm not *entirely* sure this will fix the problem as I couldn't easily reproduce -the race locally, but I believe it at least fixes *a* race. ---- - tests/test-webserver.sh | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/tests/test-webserver.sh b/tests/test-webserver.sh -index 3291b06..2964ce9 100755 ---- a/tests/test-webserver.sh -+++ b/tests/test-webserver.sh -@@ -10,9 +10,15 @@ env PYTHONUNBUFFERED=1 setsid python -m SimpleHTTPServer 0 >${test_tmpdir}/httpd - child_pid=$! - - for x in $(seq 50); do -- sed -e 's,Serving HTTP on 0.0.0.0 port \([0-9]*\) \.\.\.,\1,' < ${test_tmpdir}/httpd-output > ${test_tmpdir}/httpd-port -- if ! cmp ${test_tmpdir}/httpd-output ${test_tmpdir}/httpd-port 1>/dev/null; then -- break -+ # Snapshot the output -+ cp ${test_tmpdir}/httpd-output{,.tmp} -+ # If it's non-empty, see whether it matches our regexp -+ if test -s ${test_tmpdir}/httpd-output.tmp; then -+ sed -e 's,Serving HTTP on 0.0.0.0 port \([0-9]*\) \.\.\.,\1,' < ${test_tmpdir}/httpd-output.tmp > ${test_tmpdir}/httpd-port -+ if ! cmp ${test_tmpdir}/httpd-output.tmp ${test_tmpdir}/httpd-port 1>/dev/null; then -+ # If so, we've successfully extracted the port -+ break -+ fi - fi - sleep 0.1 - done --- -2.9.3 diff --git a/ci/flatpak.sh b/ci/flatpak.sh index 16812480..cdd03593 100755 --- a/ci/flatpak.sh +++ b/ci/flatpak.sh @@ -3,40 +3,37 @@ set -xeuo pipefail +# Frozen to a tag for now to help predictability; it's +# also useful to test building *older* versions since +# that must work. +FLATPAK_TAG=0.10.2.1 + dn=$(dirname $0) . ${dn}/libbuild.sh -build() { - env NOCONFIGURE=1 ./autogen.sh - ./configure --prefix=/usr --libdir=/usr/lib64 "$@" - make -j 8 -} - codedir=$(pwd) pkg_upgrade -# Core prep -yum -y install dnf-plugins-core @buildsys-build 'dnf-command(builddep)' -# build+install ostree, and build deps for both, so that our -# make install overrides the ostree via rpm -dnf builddep -y ostree flatpak -yum -y install flatpak && rpm -e flatpak -# we use yaml below -yum -y install python3-PyYAML +pkg_install_builddeps ostree +pkg_install_builddeps flatpak +pkg_install gettext-devel # A new dependency +# Copy of builddeps from build.sh in flatpak +pkg_install sudo which attr fuse \ + libubsan libasan libtsan \ + elfutils git gettext-devel libappstream-glib-devel \ + /usr/bin/{update-mime-database,update-desktop-database,gtk-update-icon-cache} \ + hicolor-icon-theme +pkg_install flatpak && rpm -e flatpak -# Now get flatpak's deps from rhci file -tmpd=$(mktemp -d) -cd ${tmpd} -# Frozen to a tag for now on general principle -git clone --recursive --depth=1 -b 0.9.3 https://github.com/flatpak/flatpak -cd flatpak -python3 -c 'import yaml; y = list(yaml.load_all(open(".redhat-ci.yml")))[0]; print("\0".join(y["packages"]))' | xargs -0 yum install -y -# back to ostree and build +# Build and install ostree cd ${codedir} build make install +tmpd=$(mktemp -d) +cd ${tmpd} +# Frozen to a tag for now on general principle +git clone --recursive --depth=1 -b ${FLATPAK_TAG} https://github.com/flatpak/flatpak cd ${tmpd}/flatpak -patch -p1 < ${codedir}/ci/*.patch build # We want to capture automake results from flatpak cleanup() {