344aee1d76
The rojig spec is almost entirely rpm-ostree implementation details; let's not have lots of people fork/duplicate it. Rather add the bits of rojig to the treefile that people need to define (most notably the name). Prep for stabilizing rojig. I had a few false starts with this PR; managing ownership/lifetimes across C/Rust is just complicated. I got bit hard by the fact that the workdir in `--unified-core` is really dfd-relative, and had to do a dance to propagate the dfd into rust, as well as down into the rojig builder. Closes: #1484 Approved by: jlebon
44 lines
1.5 KiB
Bash
Executable File
44 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# Test rpm-ostree compose tree --ex-rojig-output-rpm
|
|
|
|
set -xeuo pipefail
|
|
|
|
dn=$(cd $(dirname $0) && pwd)
|
|
. ${dn}/libcomposetest.sh
|
|
. ${dn}/../common/libtest.sh
|
|
|
|
prepare_compose_test "compose2jigdo"
|
|
if rpm-ostree --version | grep -q rust; then
|
|
pysetjsonmember "rojig" '{ "name": "fedora-atomic-host", "license": "MIT", "summary": "Fedora Atomic Host"}'
|
|
python <<EOF
|
|
import json, yaml
|
|
jd=json.load(open("$treefile"))
|
|
with open("$treefile.yaml", "w") as f:
|
|
f.write(yaml.dump(jd))
|
|
EOF
|
|
export treefile=$treefile.yaml
|
|
else
|
|
pysetjsonmember "ex-rojig-spec" '"fedora-atomic-host-oirpm.spec"'
|
|
fi
|
|
|
|
mkdir cache
|
|
mkdir jigdo-output
|
|
runcompose --ex-rojig-output-rpm $(pwd)/jigdo-output --cachedir $(pwd)/cache --add-metadata-string version=42.0
|
|
rev=$(ostree --repo=repo-build rev-parse ${treeref})
|
|
find jigdo-output -name '*.rpm' | tee rpms.txt
|
|
assert_file_has_content rpms.txt 'fedora-atomic-host-42.0.*x86_64'
|
|
grep 'fedora-atomic-host.*x86_64\.rpm' rpms.txt | while read p; do
|
|
rpm -qp --provides ${p} >>provides.txt
|
|
done
|
|
assert_file_has_content_literal provides.txt "rpmostree-jigdo-commit(${rev})"
|
|
echo "ok compose2jigdoRPM"
|
|
|
|
runcompose --force-nocache --ex-rojig-output-set $(pwd)/jigdo-output --cachedir $(pwd)/cache --add-metadata-string version=42.1
|
|
rev=$(ostree --repo=repo-build rev-parse ${treeref})
|
|
find jigdo-output -name '*.rpm' | tee rpms.txt
|
|
assert_file_has_content rpms.txt 'systemd.*x86_64'
|
|
assert_file_has_content rpms.txt 'ostree.*x86_64'
|
|
assert_file_has_content rpms.txt 'fedora-atomic-host-42.1.*x86_64'
|
|
echo "ok compose2jigdoSet"
|
|
|