ci: Hackaround Fedora rpm/libdb/glibc issue
authorColin Walters <walters@verbum.org>
Wed, 6 Sep 2017 16:42:51 +0000 (12:42 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 6 Sep 2017 20:00:20 +0000 (20:00 +0000)
Not sure I want to wait a few days for a new container, so let's
give this a shot now.

See https://bugzilla.redhat.com/show_bug.cgi?id=1483553

Closes: #1143
Approved by: jlebon

.papr.yml
ci/build.sh
ci/ci-commitmessage-submodules.sh
ci/flatpak.sh
ci/libbuild.sh

index 0a4e04ee87a42865993a1189b6d8420e67b27ece..75ace5da2656727d463910dfa5229d5d9d1ed2ec 100644 (file)
--- a/.papr.yml
+++ b/.papr.yml
@@ -8,8 +8,6 @@ context: f26-primary
 
 container:
     image: registry.fedoraproject.org/fedora:26
-packages:
-  - git
 
 env:
     # Enable all the sanitizers for this primary build.
@@ -36,8 +34,6 @@ context: c7-primary
 inherit: true
 required: true
 
-packages:
-
 host:
   distro: centos/7/atomic
 
@@ -55,10 +51,9 @@ context: f26-rust
 inherit: true
 container:
     image: registry.fedoraproject.org/fedora:26
-packages:
-  - cargo
 env:
   CONFIGOPTS: '--enable-rust'
+  CI_PKGS: cargo
 
 tests:
     - ci/build.sh
index 2207176477b329dfb70632fc864e8e84d9e027ad..26e2ff37e1b21f1fe3cdf97aa64fef159c77cca9 100755 (executable)
@@ -6,12 +6,16 @@ set -xeuo pipefail
 dn=$(dirname $0)
 . ${dn}/libbuild.sh
 
+pkg_upgrade
 pkg_install_builddeps ostree
 # Until this propagates farther
 pkg_install 'pkgconfig(libcurl)' 'pkgconfig(openssl)'
 pkg_install sudo which attr fuse \
     libubsan libasan libtsan PyYAML redhat-rpm-config \
     elfutils
+if test -n "${CI_PKGS:-}"; then
+    pkg_install ${CI_PKGS}
+fi
 pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang
 
 # always fail on warnings; https://github.com/ostreedev/ostree/pull/971
index aeccc24d826f767a32eff83e0711f245f8cd7c1e..2dc9b7647fd81b821d51d499073248a5847cd4d5 100755 (executable)
@@ -16,6 +16,8 @@ set -euo pipefail
 # if running under PAPR, use the branch/PR HEAD actually
 # being tested rather than the merge sha
 HEAD=${PAPR_COMMIT:-HEAD}
+dn=$(dirname $0)
+. ${dn}/libbuild.sh
 
 tmpd=$(mktemp -d)
 touch ${tmpd}/.tmpdir
@@ -27,6 +29,9 @@ cleanup_tmp() {
 }
 trap cleanup_tmp EXIT
 
+pkg_upgrade
+pkg_install git
+
 gitdir=$(realpath $(pwd))
 # Create a temporary copy of this (using cp not git clone) so git doesn't
 # try to read the submodules from the Internet again.  If we wanted to
index 7d98ff05117f45dd55829f6fb722531b9fca374d..168124808706d842f286c94efa830755424effa2 100755 (executable)
@@ -3,6 +3,9 @@
 
 set -xeuo pipefail
 
+dn=$(dirname $0)
+. ${dn}/libbuild.sh
+
 build() {
     env NOCONFIGURE=1 ./autogen.sh
     ./configure --prefix=/usr --libdir=/usr/lib64 "$@"
@@ -11,6 +14,7 @@ build() {
 
 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
index fef9d3ae54d8a2b46eb5b19c418c3a945cc167f5..0e0240638528d3bbb6e8d5f5da94f5792fca90e2 100644 (file)
@@ -1,5 +1,19 @@
 #!/usr/bin/bash
 
+pkg_upgrade() {
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1483553
+    if ! yum -y upgrade 2>err.txt; then
+        ecode=$?
+        if grep -q -F -e "BDB1539 Build signature doesn't match environment" err.txt; then
+            rpm --rebuilddb
+            yum -y upgrade
+        else
+            cat err.txt
+            exit ${ecode}
+        fi
+    fi
+}
+
 make() {
     /usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
 }