6bf4206223
The "--ex" prefix here means it's an experimental option. A tremendous change here is that start to support non-uid 0, but there are various things to fix there; the unpacker for example needs to learn to set imported objects fully based on the rpmfi information (i.e. default to uid 0, since libarchive gives the current uid by default). And even when run as uid 0, there are some bugs, though I'm not sure of any showstoppers yet. For example, dracut's `dracut-install` calls `cp --preserve=xattrs` which fails to copy the `user.ostreemeta` xattrs from a checkout (it shouldn't be copying that anyways...) Nevertheless, the infrastructure behind this really helps (is almost a hard requirement for) the [jigdo effort](https://github.com/projectatomic/rpm-ostree/issues/1081). Which is really only true due to SELinux - we need to import the packages, then generate the final tree to get the final policy, then use that policy to relabel all of the packages. Closes: #940 Approved by: jlebon
42 lines
1.5 KiB
Bash
Executable File
42 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
# Install build dependencies, run unit tests and installed tests.
|
|
|
|
set -xeuo pipefail
|
|
|
|
dn=$(dirname $0)
|
|
. ${dn}/libbuild.sh
|
|
|
|
# Use the latest ostree by default
|
|
id=$(. /etc/os-release && echo $ID)
|
|
version_id=$(. /etc/os-release && echo $VERSION_ID)
|
|
if [ "$id" == fedora ] && [ "$version_id" == 26 ]; then
|
|
echo -e '[fahc]\nmetadata_expire=1m\nbaseurl=https://ci.centos.org/artifacts/sig-atomic/fahc/rdgo/build/\ngpgcheck=0\n' > /etc/yum.repos.d/fahc.repo
|
|
# Until we fix https://github.com/rpm-software-management/libdnf/pull/149
|
|
sed -i -e 's,metadata_expire=6h,exclude=ostree ostree-devel ostree-libs ostree-grub2\nmetadata_expire=6h,' /etc/yum.repos.d/fedora-updates.repo
|
|
elif [ "$id" == centos ]; then
|
|
echo -e '[cahc]\nmetdata_expire=1m\nbaseurl=https://ci.centos.org/artifacts/sig-atomic/rdgo/centos-continuous/build\ngpgcheck=0\n' > /etc/yum.repos.d/cahc.repo
|
|
fi
|
|
|
|
pkg_upgrade
|
|
pkg_install_builddeps rpm-ostree
|
|
# Mostly dependencies for tests
|
|
pkg_install ostree{,-devel,-grub2} createrepo_c /usr/bin/jq PyYAML \
|
|
libubsan libasan libtsan elfutils fuse sudo python-gobject-base \
|
|
selinux-policy-devel selinux-policy-targeted
|
|
# For ex-container tests and clang build
|
|
pkg_install_if_os fedora parallel clang
|
|
|
|
if [ -n "${CI_PKGS:-}" ]; then
|
|
pkg_install ${CI_PKGS}
|
|
fi
|
|
|
|
# create an unprivileged user for testing
|
|
adduser testuser
|
|
|
|
export LSAN_OPTIONS=verbosity=1:log_threads=1
|
|
BWRAP=/usr/bin/bwrap
|
|
if [ "$id" == centos ]; then
|
|
BWRAP=/usr/lib64/rpm-ostree/bwrap
|
|
fi
|
|
build --enable-installed-tests --enable-gtk-doc --with-bubblewrap=$BWRAP
|