rpm-ostree/tests/ex-container-tests/test-httpd.sh
Colin Walters 94e52abb03 core: Don't try to apply non-root uid/gid when run as non-root
In an unprivileged case, we can't do this on the real filesystem. For
`ex container`, we want to completely ignore uid/gid.  I added a test
installing `httpd` which failed previously.

TODO: For non-root `--ex-unified-core` we need to do it as a commit modifier.

Closes: #940
Approved by: jlebon
2017-11-17 18:59:34 +00:00

20 lines
412 B
Bash
Executable File

#!/usr/bin/bash
set -xeuo pipefail
cd ${test_tmpdir}
dn=$(cd $(dirname $0) && pwd)
. ${dn}/../common/libtest-core.sh
cat >httpd.conf <<EOF
[tree]
ref=httpd
packages=httpd;
repos=fedora;
EOF
# This one has non-root ownership in some of the dependencies, but we shouldn't
# try to apply them; see apply_rpmfi_overrides().
rpm-ostree ex container assemble httpd.conf
ostree --repo=repo ls httpd /usr/sbin/httpd