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
32 lines
997 B
Bash
Executable File
32 lines
997 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -xeuo pipefail
|
|
|
|
dn=$(cd $(dirname $0) && pwd)
|
|
. ${dn}/libcomposetest.sh
|
|
|
|
prepare_compose_test "basic"
|
|
# Test metadata json with objects, arrays, numbers
|
|
cat > metadata.json <<EOF
|
|
{
|
|
"exampleos.gitrepo": {
|
|
"rev": "97ec21c614689e533d294cdae464df607b526ab9",
|
|
"src": "https://gitlab.com/exampleos/custom-atomic-host"
|
|
},
|
|
"exampleos.tests": ["smoketested", "e2e"]
|
|
}
|
|
EOF
|
|
runcompose --add-metadata-from-json metadata.json
|
|
|
|
. ${dn}/libbasic-test.sh
|
|
basic_test
|
|
|
|
# This one is done by postprocessing /var
|
|
ostree --repo=${repobuild} cat ${treeref} /usr/lib/tmpfiles.d/rpm-ostree-1-autovar.conf > autovar.txt
|
|
# Picked this one at random as an example of something that won't likely be
|
|
# converted to tmpfiles.d upstream. But if it is, we can change this test.
|
|
assert_file_has_content_literal autovar.txt 'd /var/cache 0755 root root - -'
|
|
# And this one has a non-root uid
|
|
assert_file_has_content_literal autovar.txt 'd /var/log/chrony 0755 chrony chrony - -'
|
|
echo "ok autovar"
|