@@ -28,21 +28,21 @@ if test '!' -d "${sysroot}/ostree/deploy/${stateroot}"; then
28
28
ostree admin os-init " ${stateroot} " --sysroot " ${sysroot} "
29
29
fi
30
30
# Should be no images pruned
31
- ostree-ext-cli container image prune-images --sysroot " ${sysroot} "
31
+ ostree container image prune-images --sysroot " ${sysroot} "
32
32
# Test the syntax which uses full imgrefs.
33
- ostree-ext-cli container image deploy --sysroot " ${sysroot} " \
33
+ ostree container image deploy --sysroot " ${sysroot} " \
34
34
--stateroot " ${stateroot} " --imgref " ${imgref} "
35
35
ostree admin --sysroot=" ${sysroot} " status
36
- ostree-ext-cli container image metadata --repo " ${sysroot} /ostree/repo" registry:" ${image} " > manifest.json
36
+ ostree container image metadata --repo " ${sysroot} /ostree/repo" registry:" ${image} " > manifest.json
37
37
jq ' .schemaVersion' < manifest.json
38
- ostree-ext-cli container image remove --repo " ${sysroot} /ostree/repo" registry:" ${image} "
38
+ ostree container image remove --repo " ${sysroot} /ostree/repo" registry:" ${image} "
39
39
ostree admin --sysroot=" ${sysroot} " undeploy 0
40
40
# Now test the new syntax which has a nicer --image that defaults to registry.
41
- ostree-ext-cli container image deploy --transport registry --sysroot " ${sysroot} " \
41
+ ostree container image deploy --transport registry --sysroot " ${sysroot} " \
42
42
--stateroot " ${stateroot} " --image " ${image} "
43
43
ostree admin --sysroot=" ${sysroot} " status
44
44
ostree admin --sysroot=" ${sysroot} " undeploy 0
45
- if ostree-ext-cli container image deploy --transport registry --sysroot " ${sysroot} " \
45
+ if ostree container image deploy --transport registry --sysroot " ${sysroot} " \
46
46
--stateroot " ${stateroot} " --image " ${image} " --enforce-container-sigpolicy 2> err.txt; then
47
47
echo " Deployment with enforced verification succeeded unexpectedly" 1>&2
48
48
exit 1
@@ -52,16 +52,16 @@ if ! grep -Ee 'insecureAcceptAnything.*refusing usage' err.txt; then
52
52
cat err.txt
53
53
fi
54
54
# Now we should prune it
55
- ostree-ext-cli container image prune-images --sysroot " ${sysroot} "
56
- ostree-ext-cli container image list --repo " ${sysroot} /ostree/repo" > out.txt
55
+ ostree container image prune-images --sysroot " ${sysroot} "
56
+ ostree container image list --repo " ${sysroot} /ostree/repo" > out.txt
57
57
test $( stat -c ' %s' out.txt) = 0
58
58
59
59
for img in " ${image} " ; do
60
- ostree-ext-cli container image deploy --sysroot " ${sysroot} " \
60
+ ostree container image deploy --sysroot " ${sysroot} " \
61
61
--stateroot " ${stateroot} " --imgref ostree-unverified-registry:" ${img} "
62
62
ostree admin --sysroot=" ${sysroot} " status
63
63
initial_refs=$( ostree --repo=" ${sysroot} /ostree/repo" refs | wc -l)
64
- ostree-ext-cli container image remove --repo " ${sysroot} /ostree/repo" registry:" ${img} "
64
+ ostree container image remove --repo " ${sysroot} /ostree/repo" registry:" ${img} "
65
65
pruned_refs=$( ostree --repo=" ${sysroot} /ostree/repo" refs | wc -l)
66
66
# Removing the image should only drop the image reference, not its layers
67
67
test " $(( $initial_refs - 1 )) " = " $pruned_refs "
@@ -70,29 +70,32 @@ for img in "${image}"; do
70
70
n_commits=$( find ${sysroot} /ostree/repo -name ' *.commit' | wc -l)
71
71
test " ${n_commits} " -gt 0
72
72
# But right now this still doesn't prune *content*
73
- ostree-ext-cli container image prune-layers --repo=" ${sysroot} /ostree/repo"
73
+ ostree container image prune-layers --repo=" ${sysroot} /ostree/repo"
74
74
ostree --repo=" ${sysroot} /ostree/repo" refs > refs.txt
75
75
if test " $( wc -l < refs.txt) " -ne 0; then
76
76
echo " found refs"
77
77
cat refs.txt
78
78
exit 1
79
79
fi
80
80
# And this one should GC the objects too
81
- ostree-ext-cli container image prune-images --full --sysroot=" ${sysroot} " > out.txt
81
+ ostree container image prune-images --full --sysroot=" ${sysroot} " > out.txt
82
82
n_commits=$( find ${sysroot} /ostree/repo -name ' *.commit' | wc -l)
83
83
test " ${n_commits} " -eq 0
84
84
done
85
85
86
86
# Verify we have systemd journal messages
87
- nsenter -m -t 1 journalctl _COMM=ostree-ext-cli > logs.txt
88
- grep ' layers already present: ' logs.txt
87
+ nsenter -m -t 1 journalctl _COMM=bootc > logs.txt
88
+ if ! grep ' layers already present: ' logs.txt; then
89
+ cat logs.txt
90
+ exit 1
91
+ fi
89
92
90
93
podman pull ${image}
91
94
ostree --repo=" ${sysroot} /ostree/repo" init --mode=bare-user
92
- ostree-ext-cli container image pull ${sysroot} /ostree/repo ostree-unverified-image:containers-storage:${image}
95
+ ostree container image pull ${sysroot} /ostree/repo ostree-unverified-image:containers-storage:${image}
93
96
echo " ok pulled from containers storage"
94
97
95
- ostree-ext-cli container compare ${imgref} ${imgref} > compare.txt
98
+ ostree container compare ${imgref} ${imgref} > compare.txt
96
99
grep " Removed layers: *0 *Size: 0 bytes" compare.txt
97
100
grep " Added layers: *0 *Size: 0 bytes" compare.txt
98
101
@@ -114,22 +117,22 @@ ostree refs ostree/container/image --delete
114
117
repo=" ${sysroot} /ostree/repo"
115
118
images=$( ostree container image list --repo " ${repo} " | wc -l)
116
119
test " ${images} " -eq 1
117
- ostree-ext-cli container image deploy --sysroot " ${sysroot} " \
120
+ ostree container image deploy --sysroot " ${sysroot} " \
118
121
--stateroot " ${stateroot} " --imgref ostree-unverified-image:" ${derived_img} "
119
122
imgref=$( ostree refs --repo=${repo} ostree/container/image | head -1)
120
123
img_commit=$( ostree --repo=${repo} rev-parse ostree/container/image/${imgref} )
121
- ostree-ext-cli container image remove --repo " ${repo} " " ${derived_img} "
124
+ ostree container image remove --repo " ${repo} " " ${derived_img} "
122
125
123
- ostree-ext-cli container image deploy --sysroot " ${sysroot} " \
126
+ ostree container image deploy --sysroot " ${sysroot} " \
124
127
--stateroot " ${stateroot} " --imgref ostree-unverified-image:" ${derived_img} "
125
128
img_commit2=$( ostree --repo=${repo} rev-parse ostree/container/image/${imgref} )
126
129
test " ${img_commit} " = " ${img_commit2} "
127
130
echo " ok deploy derived container identical revs"
128
131
129
- ostree-ext-cli container image deploy --sysroot " ${sysroot} " \
132
+ ostree container image deploy --sysroot " ${sysroot} " \
130
133
--stateroot " ${stateroot} " --imgref ostree-unverified-image:" ${derived_img_dir} "
131
134
echo " ok deploy derived container from local dir"
132
- ostree-ext-cli container image remove --repo " ${repo} " " ${derived_img_dir} "
135
+ ostree container image remove --repo " ${repo} " " ${derived_img_dir} "
133
136
rm -rf /var/tmp/derived.dir
134
137
135
138
# Verify policy
0 commit comments