@@ -79,7 +79,7 @@ func BuildVersionsManifest(product *config.SimpleStreamsProduct,
79
79
var err error
80
80
var files []os.FileInfo
81
81
var productBasePath , itemDir , eolDuration string
82
- var item , lxdTarXzItem * streams.ProductVersionItem
82
+ var item , lxdTarXzItem , incusTarXzItem * streams.ProductVersionItem
83
83
var ans * VersionsSSBuilderManifest = & VersionsSSBuilderManifest {
84
84
Name : product .Name ,
85
85
Versions : make (map [string ]streams.ProductVersion ),
@@ -147,6 +147,7 @@ func BuildVersionsManifest(product *config.SimpleStreamsProduct,
147
147
product .Name , productBasePath ))
148
148
149
149
lxdTarXzItem , _ = checkItem ("lxd.tar.xz" , itemDir , productBasePath , & combined )
150
+ incusTarXzItem , _ = checkItem ("incus.tar.xz" , itemDir , productBasePath , & combined )
150
151
item , _ = checkItem ("rootfs.squashfs" , itemDir , productBasePath , & combined )
151
152
if item != nil {
152
153
version .Items ["root.squashfs" ] = * item
@@ -171,6 +172,21 @@ func BuildVersionsManifest(product *config.SimpleStreamsProduct,
171
172
version .Items ["lxd.tar.xz" ] = * lxdTarXzItem
172
173
}
173
174
175
+ if incusTarXzItem != nil {
176
+ if combined .SquashFsIsPresent {
177
+ (* incusTarXzItem ).CombinedHashSha256SquashFs = hex .EncodeToString (
178
+ combined .CombinedSquashfsSha256 .Sum (nil ),
179
+ )
180
+ }
181
+
182
+ if combined .TarXzIsPresent {
183
+ sha := hex .EncodeToString (combined .CombinedRootxzSha256 .Sum (nil ))
184
+ (* incusTarXzItem ).CombinedHashSha256RootXz = sha
185
+ (* incusTarXzItem ).CombinedHashSha256 = sha
186
+ }
187
+ version .Items ["incus.tar.xz" ] = * incusTarXzItem
188
+ }
189
+
174
190
ans .Versions [f .Name ()] = version
175
191
}
176
192
@@ -196,7 +212,7 @@ func checkItem(base, dir, productBasePath string, combined *CombinedSha256Builde
196
212
if base == "rootfs.squashfs" {
197
213
ftype = "squashfs"
198
214
(* combined ).SquashFsIsPresent = true
199
- } else if base == "lxd.tar.xz" {
215
+ } else if base == "lxd.tar.xz" || base == "incus.tar.xz" {
200
216
ftype = base
201
217
} else if base == "rootfs.tar.xz" {
202
218
(* combined ).TarXzIsPresent = true
@@ -231,7 +247,7 @@ func checkItem(base, dir, productBasePath string, combined *CombinedSha256Builde
231
247
pb = buf [0 :nBytes ]
232
248
fmd5 .Write (pb )
233
249
fsha .Write (pb )
234
- if base == "lxd.tar.xz" {
250
+ if base == "lxd.tar.xz" || base == "incus.tar.xz" {
235
251
(* combined ).CombinedRootxzSha256 .Write (pb )
236
252
(* combined ).CombinedSquashfsSha256 .Write (pb )
237
253
} else if base == "rootfs.tar.xz" {
0 commit comments