Merge ~oddbloke/simplestreams/+git/simplestreams:ubuntu/devel into simplestreams:ubuntu/devel

Proposed by Dan Watkins
Status: Merged
Approved by: Robert C Jennings
Approved revision: 94a8cd6f9425f37e3b9e5c91ff22d00926630a5b
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~oddbloke/simplestreams/+git/simplestreams:ubuntu/devel
Merge into: simplestreams:ubuntu/devel
Diff against target: 141 lines (+42/-19)
5 files modified
debian/changelog (+10/-0)
debian/control (+0/-13)
simplestreams/mirrors/__init__.py (+17/-3)
tools/make-test-data (+6/-2)
tools/toolutil.py (+9/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Robert C Jennings (community) Approve
Review via email: mp+371523@code.launchpad.net

Commit message

releasing simplestreams version 0.1.0-25-gba75825b-0ubuntu1

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert C Jennings (rcj) wrote :

+1 on the changes

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 27e4398..41e1af5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
1simplestreams (0.1.0-25-gba75825b-0ubuntu1) eoan; urgency=medium
2
3 * New upstream snapshot.
4 - Add combined_disk1-img_sha256 to download.json [Stéphane Graber]
5 - Apply filters to items before filtering versions [Philip Roche]
6 - Add KVM images to eoan. [Pat Viafore]
7 * d/control: remove python-simplestreams-openstack
8
9 -- Daniel Watkins <oddbloke@ubuntu.com> Tue, 20 Aug 2019 10:31:20 -0400
10
1simplestreams (0.1.0-22-g409fdc15-0ubuntu1) disco; urgency=medium11simplestreams (0.1.0-22-g409fdc15-0ubuntu1) disco; urgency=medium
212
3 * debian/README.source: update to refer to upstream packaging13 * debian/README.source: update to refer to upstream packaging
diff --git a/debian/control b/debian/control
index 6cd458d..350b2d0 100644
--- a/debian/control
+++ b/debian/control
@@ -55,19 +55,6 @@ Description: Library and tools for using Simple Streams data
55 This package provides a client for interacting with simple55 This package provides a client for interacting with simple
56 streams data as is produced to describe Ubuntu's cloud images.56 streams data as is produced to describe Ubuntu's cloud images.
5757
58Package: python-simplestreams-openstack
59Architecture: all
60Priority: optional
61Depends: python-glanceclient,
62 python-keystoneclient,
63 python-simplestreams,
64 python-swiftclient,
65 ${misc:Depends}
66Description: Library and tools for using Simple Streams data
67 This package depends on libraries necessary to use the openstack dependent
68 functionality in simplestreams. That includes interacting with glance,
69 swift and keystone.
70
71Package: python3-simplestreams-openstack58Package: python3-simplestreams-openstack
72Architecture: all59Architecture: all
73Priority: optional60Priority: optional
diff --git a/simplestreams/mirrors/__init__.py b/simplestreams/mirrors/__init__.py
index 2a1dc7e..60d5ade 100644
--- a/simplestreams/mirrors/__init__.py
+++ b/simplestreams/mirrors/__init__.py
@@ -280,6 +280,23 @@ class BasicMirrorWriter(MirrorWriter):
280280
281 filtered_products = []281 filtered_products = []
282 prodname = None282 prodname = None
283
284 # Apply filters to items before filtering versions
285 for prodname, product in list(stree.items()):
286
287 for vername, version in list(product.get('versions', {}).items()):
288 for itemname, item in list(version.get('items', {}).items()):
289 pgree = (prodname, vername, itemname)
290 if not self.filter_item(item, src, target, pgree):
291 LOG.debug("Filtered out item: %s/%s", itemname, item)
292 del stree[prodname]['versions'][vername]['items'][
293 itemname]
294 if not stree[prodname]['versions'][vername].get(
295 'items', {}):
296 del stree[prodname]['versions'][vername]
297 if not stree[prodname].get('versions', {}):
298 del stree[prodname]
299
283 for prodname, product in stree.items():300 for prodname, product in stree.items():
284 if not self.filter_product(product, src, target, (prodname,)):301 if not self.filter_product(product, src, target, (prodname,)):
285 filtered_products.append(prodname)302 filtered_products.append(prodname)
@@ -320,9 +337,6 @@ class BasicMirrorWriter(MirrorWriter):
320 added_items = []337 added_items = []
321 for itemname, item in version.get('items', {}).items():338 for itemname, item in version.get('items', {}).items():
322 pgree = (prodname, vername, itemname)339 pgree = (prodname, vername, itemname)
323 if not self.filter_item(item, src, target, pgree):
324 LOG.debug("Filtered out item: %s/%s", itemname, item)
325 continue
326340
327 added_items.append(itemname)341 added_items.append(itemname)
328342
diff --git a/tools/make-test-data b/tools/make-test-data
index fc0fd1d..a1e183d 100755
--- a/tools/make-test-data
+++ b/tools/make-test-data
@@ -58,6 +58,7 @@ FAKE_DATA = {
58 'lxd.tar.xz': {'size': 10245},58 'lxd.tar.xz': {'size': 10245},
59 'tar.gz': {'size': 11264},59 'tar.gz': {'size': 11264},
60 'disk1.img': {'size': 12288},60 'disk1.img': {'size': 12288},
61 'disk-kvm.img': {'size': 12289},
61 'uefi1.img': {'size': 12421},62 'uefi1.img': {'size': 12421},
62 'manifest': {'size': 10241},63 'manifest': {'size': 10241},
63 'ova': {'size': 12399},64 'ova': {'size': 12399},
@@ -296,8 +297,10 @@ def create_fake_file(prefix, item):
296 # create a combined sha256 for lxd.tar.xz (metadata) and the root fs297 # create a combined sha256 for lxd.tar.xz (metadata) and the root fs
297 # - combined_sha256 and combined_rootxz_sha256 for the -root.tar.gz298 # - combined_sha256 and combined_rootxz_sha256 for the -root.tar.gz
298 # - combined_squashfs_sha256 for the squashfs299 # - combined_squashfs_sha256 for the squashfs
300 # - combined_disk1-img_sha256 for the img
299 ftype = item['ftype']301 ftype = item['ftype']
300 for name, extension in (('rootxz', '-root.tar.xz'),302 for name, extension in (('disk1-img', '.img'),
303 ('rootxz', '-root.tar.xz'),
301 ('squashfs', '.squashfs')):304 ('squashfs', '.squashfs')):
302 if (ftype == "lxd.tar.xz" and305 if (ftype == "lxd.tar.xz" and
303 'combined_{}_sha256'.format(name) not in FAKE_DATA[ftype]):306 'combined_{}_sha256'.format(name) not in FAKE_DATA[ftype]):
@@ -566,7 +569,8 @@ def create_image_data(query_tree, out_d, streamdir):
566 lxd = os.path.basename(path)569 lxd = os.path.basename(path)
567570
568 # find calculated combined checksums571 # find calculated combined checksums
569 for name, extension in (('rootxz', '-root.tar.xz'),572 for name, extension in (('disk1-img', '.img'),
573 ('rootxz', '-root.tar.xz'),
570 ('squashfs', '.squashfs')):574 ('squashfs', '.squashfs')):
571 root = lxd.replace('-lxd.tar.xz', extension)575 root = lxd.replace('-lxd.tar.xz', extension)
572 combined = os.path.join(dirname, ','.join([lxd, root]))576 combined = os.path.join(dirname, ','.join([lxd, root]))
diff --git a/tools/toolutil.py b/tools/toolutil.py
index 0764770..eb91e53 100644
--- a/tools/toolutil.py
+++ b/tools/toolutil.py
@@ -55,6 +55,13 @@ def is_expected(suffix, fields):
55 # precise got -root.tar.gz after alpha255 # precise got -root.tar.gz after alpha2
56 return False56 return False
5757
58 if suffix == "-disk-kvm.img":
59 # kvm images were introduced into eoan
60 if codename_cmp(rel, "<", "eoan") or serial < "20190622":
61 return False
62 if arch not in ["amd64"]:
63 return False
64
58 if suffix == "-disk1.img":65 if suffix == "-disk1.img":
59 # disk1.img as a suffix was replaced by .img in yakkety66 # disk1.img as a suffix was replaced by .img in yakkety
60 if codename_cmp(rel, "<", "oneiric"):67 if codename_cmp(rel, "<", "oneiric"):
@@ -155,7 +162,8 @@ def load_query_download(path, builds=None, rels=None):
155162
156 suffixes = (".tar.gz", "-root.tar.gz", "-disk1.img", "-uefi1.img",163 suffixes = (".tar.gz", "-root.tar.gz", "-disk1.img", "-uefi1.img",
157 ".manifest", ".ova", "-root.tar.xz", "-root.manifest",164 ".manifest", ".ova", "-root.tar.xz", "-root.manifest",
158 "-lxd.tar.xz", ".squashfs", ".squashfs.manifest", ".img",)165 "-lxd.tar.xz", ".squashfs", ".squashfs.manifest", ".img",
166 "-disk-kvm.img",)
159 streams = [f[0:-len(".latest.txt")]167 streams = [f[0:-len(".latest.txt")]
160 for f in os.listdir(path) if f.endswith("latest.txt")]168 for f in os.listdir(path) if f.endswith("latest.txt")]
161169

Subscribers

People subscribed via source and target branches

to all changes: