The "1" in "com.ubuntu.maas:candidate:1:maas-notification" can be used as your version. Its up to you if you want a specific field.
It looks like our existing mirroring tools require the file field, and it must be valid. If I generate a stream and try to mirror it the SimpleStreams mirroring tool chokes. sstream-mirror is Canonical's standard mirroring tool[1] which goes back at least to Precise. Unfortinetly that means this stream must work with the tool as is.
$ ./bin/meph2-import conf/release-notifications.yaml /tmp/test
$ $ sstream-mirror /tmp/test/ /tmp/mirror
+ com.ubuntu.maas:candidate:1:maas-notification 20200921.0 release_notification release-notifications/20200921.0/release-notification.yaml 0 Mb
0 Mb change
Traceback (most recent call last):
File "/usr/bin/sstream-mirror", line 157, in <module>
main()
File "/usr/bin/sstream-mirror", line 153, in main
tmirror.sync(smirror, initial_path)
File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 91, in sync
return self.sync_index(reader, path, data, content)
File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 254, in sync_index
self.sync(reader, path=epath)
File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 89, in sync
return self.sync_products(reader, path, data, content)
File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 355, in sync_products
self.insert_item(item, src, target, pgree, ipath_cs)
File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 490, in insert_item
self.store.insert(data['path'], contentsource,
File "/usr/lib/python3/dist-packages/simplestreams/objectstores/__init__.py", line 142, in insert
buf = reader.read(self.read_size)
File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 275, in read
buf = self.cs.read(size)
File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 135, in read
self.open()
File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 131, in open
self.fd = self._open()
File "/usr/lib/python3/dist-packages/simplestreams/contentsource.py", line 127, in _open
raise myerr
OSError: Unable to open /tmp/test/release-notifications/20200921.0/release-notification.yaml. mirrors=[]
The "1" in "com.ubuntu. maas:candidate: 1:maas- notification" can be used as your version. Its up to you if you want a specific field.
It looks like our existing mirroring tools require the file field, and it must be valid. If I generate a stream and try to mirror it the SimpleStreams mirroring tool chokes. sstream-mirror is Canonical's standard mirroring tool[1] which goes back at least to Precise. Unfortinetly that means this stream must work with the tool as is.
$ ./bin/meph2-import conf/release- notifications. yaml /tmp/test maas:candidate: 1:maas- notification 20200921.0 release_ notification release- notifications/ 20200921. 0/release- notification. yaml 0 Mb sstream- mirror" , line 157, in <module> sstream- mirror" , line 153, in main sync(smirror, initial_path) python3/ dist-packages/ simplestreams/ mirrors/ __init_ _.py", line 91, in sync index(reader, path, data, content) python3/ dist-packages/ simplestreams/ mirrors/ __init_ _.py", line 254, in sync_index sync(reader, path=epath) python3/ dist-packages/ simplestreams/ mirrors/ __init_ _.py", line 89, in sync products( reader, path, data, content) python3/ dist-packages/ simplestreams/ mirrors/ __init_ _.py", line 355, in sync_products insert_ item(item, src, target, pgree, ipath_cs) python3/ dist-packages/ simplestreams/ mirrors/ __init_ _.py", line 490, in insert_item store.insert( data['path' ], contentsource, python3/ dist-packages/ simplestreams/ objectstores/ __init_ _.py", line 142, in insert read(self. read_size) python3/ dist-packages/ simplestreams/ contentsource. py", line 275, in read python3/ dist-packages/ simplestreams/ contentsource. py", line 135, in read python3/ dist-packages/ simplestreams/ contentsource. py", line 131, in open python3/ dist-packages/ simplestreams/ contentsource. py", line 127, in _open release- notifications/ 20200921. 0/release- notification. yaml. mirrors=[]
$ $ sstream-mirror /tmp/test/ /tmp/mirror
+ com.ubuntu.
0 Mb change
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
tmirror.
File "/usr/lib/
return self.sync_
File "/usr/lib/
self.
File "/usr/lib/
return self.sync_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
buf = reader.
File "/usr/lib/
buf = self.cs.read(size)
File "/usr/lib/
self.open()
File "/usr/lib/
self.fd = self._open()
File "/usr/lib/
raise myerr
OSError: Unable to open /tmp/test/
[1] https:/ /maas.io/ docs/local- image-mirror