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
1diff --git a/debian/changelog b/debian/changelog
2index 27e4398..41e1af5 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,13 @@
6+simplestreams (0.1.0-25-gba75825b-0ubuntu1) eoan; urgency=medium
7+
8+ * New upstream snapshot.
9+ - Add combined_disk1-img_sha256 to download.json [St├ęphane Graber]
10+ - Apply filters to items before filtering versions [Philip Roche]
11+ - Add KVM images to eoan. [Pat Viafore]
12+ * d/control: remove python-simplestreams-openstack
13+
14+ -- Daniel Watkins <oddbloke@ubuntu.com> Tue, 20 Aug 2019 10:31:20 -0400
15+
16 simplestreams (0.1.0-22-g409fdc15-0ubuntu1) disco; urgency=medium
17
18 * debian/README.source: update to refer to upstream packaging
19diff --git a/debian/control b/debian/control
20index 6cd458d..350b2d0 100644
21--- a/debian/control
22+++ b/debian/control
23@@ -55,19 +55,6 @@ Description: Library and tools for using Simple Streams data
24 This package provides a client for interacting with simple
25 streams data as is produced to describe Ubuntu's cloud images.
26
27-Package: python-simplestreams-openstack
28-Architecture: all
29-Priority: optional
30-Depends: python-glanceclient,
31- python-keystoneclient,
32- python-simplestreams,
33- python-swiftclient,
34- ${misc:Depends}
35-Description: Library and tools for using Simple Streams data
36- This package depends on libraries necessary to use the openstack dependent
37- functionality in simplestreams. That includes interacting with glance,
38- swift and keystone.
39-
40 Package: python3-simplestreams-openstack
41 Architecture: all
42 Priority: optional
43diff --git a/simplestreams/mirrors/__init__.py b/simplestreams/mirrors/__init__.py
44index 2a1dc7e..60d5ade 100644
45--- a/simplestreams/mirrors/__init__.py
46+++ b/simplestreams/mirrors/__init__.py
47@@ -280,6 +280,23 @@ class BasicMirrorWriter(MirrorWriter):
48
49 filtered_products = []
50 prodname = None
51+
52+ # Apply filters to items before filtering versions
53+ for prodname, product in list(stree.items()):
54+
55+ for vername, version in list(product.get('versions', {}).items()):
56+ for itemname, item in list(version.get('items', {}).items()):
57+ pgree = (prodname, vername, itemname)
58+ if not self.filter_item(item, src, target, pgree):
59+ LOG.debug("Filtered out item: %s/%s", itemname, item)
60+ del stree[prodname]['versions'][vername]['items'][
61+ itemname]
62+ if not stree[prodname]['versions'][vername].get(
63+ 'items', {}):
64+ del stree[prodname]['versions'][vername]
65+ if not stree[prodname].get('versions', {}):
66+ del stree[prodname]
67+
68 for prodname, product in stree.items():
69 if not self.filter_product(product, src, target, (prodname,)):
70 filtered_products.append(prodname)
71@@ -320,9 +337,6 @@ class BasicMirrorWriter(MirrorWriter):
72 added_items = []
73 for itemname, item in version.get('items', {}).items():
74 pgree = (prodname, vername, itemname)
75- if not self.filter_item(item, src, target, pgree):
76- LOG.debug("Filtered out item: %s/%s", itemname, item)
77- continue
78
79 added_items.append(itemname)
80
81diff --git a/tools/make-test-data b/tools/make-test-data
82index fc0fd1d..a1e183d 100755
83--- a/tools/make-test-data
84+++ b/tools/make-test-data
85@@ -58,6 +58,7 @@ FAKE_DATA = {
86 'lxd.tar.xz': {'size': 10245},
87 'tar.gz': {'size': 11264},
88 'disk1.img': {'size': 12288},
89+ 'disk-kvm.img': {'size': 12289},
90 'uefi1.img': {'size': 12421},
91 'manifest': {'size': 10241},
92 'ova': {'size': 12399},
93@@ -296,8 +297,10 @@ def create_fake_file(prefix, item):
94 # create a combined sha256 for lxd.tar.xz (metadata) and the root fs
95 # - combined_sha256 and combined_rootxz_sha256 for the -root.tar.gz
96 # - combined_squashfs_sha256 for the squashfs
97+ # - combined_disk1-img_sha256 for the img
98 ftype = item['ftype']
99- for name, extension in (('rootxz', '-root.tar.xz'),
100+ for name, extension in (('disk1-img', '.img'),
101+ ('rootxz', '-root.tar.xz'),
102 ('squashfs', '.squashfs')):
103 if (ftype == "lxd.tar.xz" and
104 'combined_{}_sha256'.format(name) not in FAKE_DATA[ftype]):
105@@ -566,7 +569,8 @@ def create_image_data(query_tree, out_d, streamdir):
106 lxd = os.path.basename(path)
107
108 # find calculated combined checksums
109- for name, extension in (('rootxz', '-root.tar.xz'),
110+ for name, extension in (('disk1-img', '.img'),
111+ ('rootxz', '-root.tar.xz'),
112 ('squashfs', '.squashfs')):
113 root = lxd.replace('-lxd.tar.xz', extension)
114 combined = os.path.join(dirname, ','.join([lxd, root]))
115diff --git a/tools/toolutil.py b/tools/toolutil.py
116index 0764770..eb91e53 100644
117--- a/tools/toolutil.py
118+++ b/tools/toolutil.py
119@@ -55,6 +55,13 @@ def is_expected(suffix, fields):
120 # precise got -root.tar.gz after alpha2
121 return False
122
123+ if suffix == "-disk-kvm.img":
124+ # kvm images were introduced into eoan
125+ if codename_cmp(rel, "<", "eoan") or serial < "20190622":
126+ return False
127+ if arch not in ["amd64"]:
128+ return False
129+
130 if suffix == "-disk1.img":
131 # disk1.img as a suffix was replaced by .img in yakkety
132 if codename_cmp(rel, "<", "oneiric"):
133@@ -155,7 +162,8 @@ def load_query_download(path, builds=None, rels=None):
134
135 suffixes = (".tar.gz", "-root.tar.gz", "-disk1.img", "-uefi1.img",
136 ".manifest", ".ova", "-root.tar.xz", "-root.manifest",
137- "-lxd.tar.xz", ".squashfs", ".squashfs.manifest", ".img",)
138+ "-lxd.tar.xz", ".squashfs", ".squashfs.manifest", ".img",
139+ "-disk-kvm.img",)
140 streams = [f[0:-len(".latest.txt")]
141 for f in os.listdir(path) if f.endswith("latest.txt")]
142

Subscribers

People subscribed via source and target branches

to all changes: