ci: Sync with ostree
We have some drift; keep this more in sync so we maintain the rpm/yum hackarounds for example in one place. I backed out the ASAN bits though pending at least a newer gpgme: <https://github.com/projectatomic/rpm-ostree/pull/1000#issuecomment-331278758> Closes: #1000 Approved by: jlebon
This commit is contained in:
parent
e066dc93c8
commit
2ebf43f4a9
14
.papr.yml
14
.papr.yml
@ -18,13 +18,11 @@ cluster:
|
|||||||
container:
|
container:
|
||||||
image: registry.fedoraproject.org/fedora:26
|
image: registry.fedoraproject.org/fedora:26
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1483553
|
|
||||||
#packages:
|
|
||||||
# - git
|
|
||||||
# - rsync
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HOSTS: vmcheck1 vmcheck2 vmcheck3
|
HOSTS: vmcheck1 vmcheck2 vmcheck3
|
||||||
|
# TODO use -fsanitize=address
|
||||||
|
CFLAGS: '-fsanitize=undefined -fsanitize-undefined-trap-on-error -O2 -Wp,-D_FORTIFY_SOURCE=2'
|
||||||
|
ASAN_OPTIONS: 'detect_leaks=0' # Right now we're not fully clean, but this gets us use-after-free etc
|
||||||
CI_PKGS: rsync
|
CI_PKGS: rsync
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
@ -37,6 +35,7 @@ timeout: 60m
|
|||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- test-suite.log
|
- test-suite.log
|
||||||
|
- config.log
|
||||||
- vmcheck
|
- vmcheck
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -59,6 +58,11 @@ cluster:
|
|||||||
# FIXME remove this version binding when rpm-md repos are updated
|
# FIXME remove this version binding when rpm-md repos are updated
|
||||||
image: registry.centos.org/centos/centos:7.3.1611
|
image: registry.centos.org/centos/centos:7.3.1611
|
||||||
|
|
||||||
|
# We only want the sanitizers on Fedora
|
||||||
|
env:
|
||||||
|
HOSTS: vmcheck1 vmcheck2 vmcheck3
|
||||||
|
CFLAGS: ''
|
||||||
|
|
||||||
extra-repos:
|
extra-repos:
|
||||||
- name: atomic-centos-continuous
|
- name: atomic-centos-continuous
|
||||||
baseurl: https://ci.centos.org/artifacts/sig-atomic/rdgo/centos-continuous/build
|
baseurl: https://ci.centos.org/artifacts/sig-atomic/rdgo/centos-continuous/build
|
||||||
|
@ -10,16 +10,3 @@ ${dn}/build.sh
|
|||||||
# support parallel runs right now
|
# support parallel runs right now
|
||||||
/usr/bin/make check
|
/usr/bin/make check
|
||||||
make install
|
make install
|
||||||
|
|
||||||
# And now a clang build to find unused variables, but only run on Fedora because
|
|
||||||
# the CentOS version is ancient anyway and doesn't support all the flags that
|
|
||||||
# might get passed to it.
|
|
||||||
id=$(. /etc/os-release && echo $ID)
|
|
||||||
if [ "$id" == fedora ]; then
|
|
||||||
git clean -dfx
|
|
||||||
export CC=clang
|
|
||||||
export CFLAGS='-Werror=unused-variable -Werror=maybe-uninitialized'
|
|
||||||
build_default
|
|
||||||
# don't actually run the tests, just compile them
|
|
||||||
/usr/bin/make check TESTS=
|
|
||||||
fi
|
|
||||||
|
@ -18,12 +18,9 @@ elif [ "$id" == centos ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
pkg_upgrade
|
pkg_upgrade
|
||||||
|
pkg_install_builddeps rpm-ostree
|
||||||
install_builddeps rpm-ostree
|
|
||||||
|
|
||||||
yum install -y /usr/bin/g-ir-scanner # Accidentally omitted
|
|
||||||
# Mostly dependencies for tests
|
# Mostly dependencies for tests
|
||||||
yum install -y ostree{,-devel,-grub2} createrepo_c /usr/bin/jq PyYAML clang \
|
pkg_install ostree{,-devel,-grub2} createrepo_c /usr/bin/jq PyYAML clang \
|
||||||
libubsan libasan libtsan elfutils fuse sudo python-gobject-base
|
libubsan libasan libtsan elfutils fuse sudo python-gobject-base
|
||||||
|
|
||||||
if [ -n "${CI_PKGS:-}" ]; then
|
if [ -n "${CI_PKGS:-}" ]; then
|
||||||
@ -33,5 +30,5 @@ fi
|
|||||||
# create an unprivileged user for testing
|
# create an unprivileged user for testing
|
||||||
adduser testuser
|
adduser testuser
|
||||||
|
|
||||||
rpm -q ostree{,-devel,-grub2}
|
export LSAN_OPTIONS=verbosity=1:log_threads=1
|
||||||
build --enable-installed-tests --enable-gtk-doc
|
build --enable-installed-tests --enable-gtk-doc
|
||||||
|
@ -2,22 +2,19 @@
|
|||||||
|
|
||||||
pkg_upgrade() {
|
pkg_upgrade() {
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1483553
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1483553
|
||||||
if ! yum -y upgrade 2>err.txt; then
|
ecode=0
|
||||||
ecode=$?
|
yum -y distro-sync 2>err.txt || ecode=$?
|
||||||
if grep -q -F -e "BDB1539 Build signature doesn't match environment" err.txt; then
|
if test ${ecode} '!=' 0 && grep -q -F -e "BDB1539 Build signature doesn't match environment" err.txt; then
|
||||||
rpm --rebuilddb
|
rpm --rebuilddb
|
||||||
yum -y upgrade
|
yum -y distro-sync
|
||||||
else
|
else
|
||||||
|
if test ${ecode} '!=' 0; then
|
||||||
cat err.txt
|
cat err.txt
|
||||||
exit ${ecode}
|
exit ${ecode}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_install() {
|
|
||||||
yum -y install "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
make() {
|
make() {
|
||||||
/usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
|
/usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
|
||||||
}
|
}
|
||||||
@ -25,28 +22,48 @@ make() {
|
|||||||
build() {
|
build() {
|
||||||
env NOCONFIGURE=1 ./autogen.sh
|
env NOCONFIGURE=1 ./autogen.sh
|
||||||
./configure --prefix=/usr --libdir=/usr/lib64 "$@"
|
./configure --prefix=/usr --libdir=/usr/lib64 "$@"
|
||||||
make
|
make V=1
|
||||||
}
|
}
|
||||||
|
|
||||||
build_default() {
|
pkg_install() {
|
||||||
export CFLAGS="${CFLAGS:-} -fsanitize=undefined"
|
yum -y install "$@"
|
||||||
build
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_builddeps() {
|
pkg_install_if_os() {
|
||||||
pkg=$1
|
os=$1
|
||||||
|
shift
|
||||||
if [ -x /usr/bin/dnf ]; then
|
(. /etc/os-release;
|
||||||
dnf -y install dnf-plugins-core
|
if test "${os}" = "${ID}"; then
|
||||||
dnf install -y @buildsys-build
|
pkg_install "$@"
|
||||||
dnf install -y 'dnf-command(builddep)'
|
|
||||||
dnf builddep -y $pkg
|
|
||||||
else
|
else
|
||||||
yum install -y make rpm-build
|
echo "Skipping installation on OS ${ID}: $@"
|
||||||
yum-builddep -y rpm-ostree
|
|
||||||
fi
|
fi
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_builddep() {
|
||||||
|
# This is sadly the only case where it's a different command
|
||||||
|
if test -x /usr/bin/dnf; then
|
||||||
|
dnf builddep -y "$@"
|
||||||
|
else
|
||||||
|
yum-builddep -y "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_install_builddeps() {
|
||||||
|
pkg=$1
|
||||||
|
if test -x /usr/bin/dnf; then
|
||||||
|
yum -y install dnf-plugins-core
|
||||||
|
yum install -y 'dnf-command(builddep)'
|
||||||
|
# Base buildroot
|
||||||
|
pkg_install @buildsys-build
|
||||||
|
else
|
||||||
|
yum -y install yum-utils
|
||||||
|
# Base buildroot, copied from the mock config sadly
|
||||||
|
yum -y install bash bzip2 coreutils cpio diffutils system-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz
|
||||||
|
fi
|
||||||
# builddeps+runtime deps
|
# builddeps+runtime deps
|
||||||
yum install -y $pkg
|
pkg_builddep $pkg
|
||||||
|
pkg_install $pkg
|
||||||
rpm -e $pkg
|
rpm -e $pkg
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user