1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277 | $ sh -c 'git diff ubuntu/devel | filterdiff --exclude "*/debian/changelog"'
diff --git a/debian/apport-launcher.py b/debian/apport-launcher.py
deleted file mode 100644
index 30fea31b..00000000
+++ /dev/null
@@ -1,6 +0,0 @@
-'''Wrapper for cloudinit apport interface'''
-
-from cloudinit.apport import add_info as cloudinit_add_info
-
-def add_info(report, ui):
- return cloudinit_add_info(report, ui)
diff --git a/debian/cloud-init.lintian-overrides b/debian/cloud-init.lintian-overrides
new file mode 100644
index 00000000..591b651e
--- /dev/null
+++ b/debian/cloud-init.lintian-overrides
@@ -0,0 +1,3 @@
+# this explicitly diverts ureadahead.conf in ureadahead package
+# see LP: #499520 for more discussion
+cloud-init binary: diversion-for-unknown-file
diff --git a/debian/cloud-init.maintscript b/debian/cloud-init.maintscript
deleted file mode 100644
index 93aff81c..00000000
+++ /dev/null
@@ -1,8 +0,0 @@
-rm_conffile /etc/init/cloud-config.conf 0.7.9-243-ge74d775-0ubuntu2~
-rm_conffile /etc/init/cloud-final.conf 0.7.9-243-ge74d775-0ubuntu2~
-rm_conffile /etc/init/cloud-init-blocknet.conf 0.7.9-243-ge74d775-0ubuntu2~
-rm_conffile /etc/init/cloud-init-container.conf 0.7.9-243-ge74d775-0ubuntu2~
-rm_conffile /etc/init/cloud-init-local.conf 0.7.9-243-ge74d775-0ubuntu2~
-rm_conffile /etc/init/cloud-init-nonet.conf 0.7.9-243-ge74d775-0ubuntu2~
-rm_conffile /etc/init/cloud-init.conf 0.7.9-243-ge74d775-0ubuntu2~
-rm_conffile /etc/init/cloud-log-shutdown.conf 0.7.9-243-ge74d775-0ubuntu2~
diff --git a/debian/cloud-init.postinst b/debian/cloud-init.postinst
index f88d1c52..420420b5 100644
--- a/debian/cloud-init.postinst
+++ b/debian/cloud-init.postinst
@@ -276,14 +276,11 @@ fix_azure_upgrade_1611074() {
rm "$tmpf" || :
}
-cleanup_ureadahead() {
- local oldver="$1" last_bad_ver="0.7.9-243-ge74d775-0ubuntu2~"
- dpkg --compare-versions "$oldver" le "$last_bad_ver" || return 0
- dpkg-divert --package cloud-init --remove --rename --divert \
- /etc/init/ureadahead.conf.disabled /etc/init/ureadahead.conf
-}
if [ "$1" = "configure" ]; then
+ # disable ureadahead (LP: #499520)
+ dpkg-divert --package cloud-init --rename --divert \
+ /etc/init/ureadahead.conf.disabled --add /etc/init/ureadahead.conf
if db_get cloud-init/datasources; then
values="$RET"
if [ "${values#*MaaS}" != "${values}" ]; then
@@ -324,8 +321,6 @@ EOF
disable_network_config_on_upgrade "$2"
fix_azure_upgrade_1611074 "$2"
-
- cleanup_ureadahead "$2"
fi
#DEBHELPER#
diff --git a/debian/cloud-init.postrm b/debian/cloud-init.postrm
index 4e20db1c..81b66812 100644
--- a/debian/cloud-init.postrm
+++ b/debian/cloud-init.postrm
@@ -8,6 +8,8 @@ case "$1" in
rm -f /etc/apt/apt.conf.d/90cloud-init-pipelining
;;
remove)
+ dpkg-divert --package cloud-init --remove --rename --divert \
+ /etc/init/ureadahead.conf.disabled /etc/init/ureadahead.conf
rm -f /etc/cloud/cloud.cfg.d/90cloud-init-pipelining
;;
esac
diff --git a/debian/control b/debian/control
index 3f46d7bf..1de4f2f5 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,6 @@ Build-Depends: debhelper (>= 9),
python3-httpretty,
python3-jinja2,
python3-jsonpatch,
- python3-jsonschema,
python3-mock,
python3-nose,
python3-oauthlib,
@@ -29,28 +28,32 @@ Build-Depends: debhelper (>= 9),
XS-Python-Version: all
Vcs-Browser: https://git.launchpad.net/cloud-init/?h=ubuntu/devel
Vcs-Git: git://git.launchpad.net/cloud-init -b ubuntu/devel
-Standards-Version: 3.9.8
+Standards-Version: 3.9.6
Package: cloud-init
Architecture: all
Depends: cloud-guest-utils | cloud-utils,
- nplan | ifupdown,
+ ifupdown (>= 0.6.10ubuntu5),
procps,
python3,
- python3-requests,
+ python3-requests (>= 0.8.2),
python3-serial,
${misc:Depends},
${python3:Depends}
+Breaks: walinuxagent (<< 2.1.3-0ubuntu4.1)
Recommends: eatmydata, gdisk, software-properties-common
+Provides: ec2-init
+Replaces: ec2-init (<<0.5.3)
+Conflicts: ec2-init (<<0.5.3)
XB-Python-Version: ${python:Versions}
Description: Init scripts for cloud instances
Cloud instances need special scripts to run during initialisation
to retrieve and install ssh keys and to let the user run various scripts.
Package: grub-legacy-ec2
-Depends: debconf | cdebconf,
+Depends: debconf (>= 1.5.19) | cdebconf,
ucf,
- util-linux,
+ util-linux (>= 2.15-1),
${misc:Depends}
Conflicts: grub
Suggests: grub-legacy-doc
@@ -59,3 +62,9 @@ Description: Handles update-grub for ec2 instances
EC2 instances that use grub-legacy as a bootloader need a way to keep
/boot/grub/menu.lst up to date while not conflicting with grub-pc.
This package provides that.
+
+Package: ec2-init
+Depends: cloud-init, ${misc:Depends}
+Architecture: all
+Description: package renamed -> cloud-init
+ This package has been renamed to 'cloud-init'.
diff --git a/debian/grub-legacy-ec2.install b/debian/grub-legacy-ec2.install
index f9ac6281..b75b0bee 100644
--- a/debian/grub-legacy-ec2.install
+++ b/debian/grub-legacy-ec2.install
@@ -1,4 +1,4 @@
debian/grub-set-default usr/sbin
debian/grub-set-default-legacy-ec2 usr/sbin
-debian/kernel etc/
+debian/kernel etc/kernel/
debian/update-grub-legacy-ec2 usr/sbin
diff --git a/debian/patches/azure-use-walinux-agent.patch b/debian/patches/azure-use-walinux-agent.patch
new file mode 100644
index 00000000..c50d664a
--- /dev/null
+++ b/debian/patches/azure-use-walinux-agent.patch
@@ -0,0 +1,17 @@
+Description: Use walinux-agent rather than builtin fabric support
+ Upstream now uses the built-in support for instance initialization on Azure.
+ On a stable release, we want to continue to use the walinux-agent integration.
+ Upstream made this change under bug 1538522.
+Forwarded: not-needed
+Author: Scott Moser <smoser@ubuntu.com>
+--- a/cloudinit/sources/DataSourceAzure.py
++++ b/cloudinit/sources/DataSourceAzure.py
+@@ -185,7 +185,7 @@ if util.is_FreeBSD():
+ ]
+
+ BUILTIN_DS_CONFIG = {
+- 'agent_command': AGENT_START_BUILTIN,
++ 'agent_command': AGENT_START,
+ 'data_dir': "/var/lib/waagent",
+ 'set_hostname': True,
+ 'hostname_bounce': {
diff --git a/debian/patches/ds-identify-behavior-xenial.patch b/debian/patches/ds-identify-behavior-xenial.patch
new file mode 100644
index 00000000..cfe8f9a8
--- /dev/null
+++ b/debian/patches/ds-identify-behavior-xenial.patch
@@ -0,0 +1,32 @@
+Description: Adjust behavior of ds-identify for SRU
+ To make this acceptable as a SRU we have changed ds-identify to
+ act in 'report only' mode, and to only 'warn' when it cloud-init
+ finds itself to be using a Ec2 Datasource on an unknown and
+ non AWS platform.
+Forwarded: not-needed
+Author: Scott Moser <smoser@ubuntu.com>
+Bug-ubuntu: http://bugs.launchpad.net/bugs/1669675
+Bug-ubuntu: http://bugs.launchpad.net/bugs/1660385
+
+--- a/tools/ds-identify
++++ b/tools/ds-identify
+@@ -83,8 +83,8 @@ _DI_LOGGED=""
+ # set DI_MAIN='noop' in environment to source this file with no main called.
+ DI_MAIN=${DI_MAIN:-main}
+
+-DI_DEFAULT_POLICY="search,found=all,maybe=all,notfound=${DI_DISABLED}"
+-DI_DEFAULT_POLICY_NO_DMI="search,found=all,maybe=all,notfound=${DI_ENABLED}"
++DI_DEFAULT_POLICY="report,found=all,maybe=all,notfound=${DI_ENABLED}"
++DI_DEFAULT_POLICY_NO_DMI="report,found=all,maybe=all,notfound=${DI_ENABLED}"
+ DI_DMI_CHASSIS_ASSET_TAG=""
+ DI_DMI_PRODUCT_NAME=""
+ DI_DMI_SYS_VENDOR=""
+@@ -119,7 +119,7 @@ DI_ON_FOUND=""
+ DI_ON_MAYBE=""
+ DI_ON_NOTFOUND=""
+
+-DI_EC2_STRICT_ID_DEFAULT="true"
++DI_EC2_STRICT_ID_DEFAULT="warn"
+
+ error() {
+ set -- "ERROR:" "$@";
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..7e909afc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+azure-use-walinux-agent.patch
+ds-identify-behavior-xenial.patch
+stable-release-no-jsonschema-dep.patch
diff --git a/debian/patches/stable-release-no-jsonschema-dep.patch b/debian/patches/stable-release-no-jsonschema-dep.patch
new file mode 100644
index 00000000..f8a11334
--- /dev/null
+++ b/debian/patches/stable-release-no-jsonschema-dep.patch
@@ -0,0 +1,21 @@
+Description: Remove the optional dependency on jsonschema for stable release.
+ To make this acceptable as a SRU we keep the same dependencies as are
+ in the stable release.
+ .
+ The '${python3:Depends}' in debian/control would automatically add the
+ dependency if it is seen in requirements.txt.
+Forwarded: not-needed
+Author: Scott Moser <smoser@ubuntu.com>
+
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -34,7 +34,8 @@ requests
+ jsonpatch
+
+ # For validating cloud-config sections per schema definitions
+-jsonschema
++## Do not add dependencies to a stable release (SRU).
++#jsonschema
+
+ # For Python 2/3 compatibility
+ six
diff --git a/debian/rules b/debian/rules
index 3e03fed0..f335b7f7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,5 @@
#!/usr/bin/make -f
-INIT_SYSTEM ?= systemd
+INIT_SYSTEM ?= upstart,systemd
export PYBUILD_INSTALL_ARGS=--init-system=$(INIT_SYSTEM)
%:
@@ -17,7 +17,6 @@ override_dh_systemd_start:
override_dh_auto_install:
dh_auto_install --destdir=debian/cloud-init
- install -D -m 0644 ./tools/21-cloudinit.conf debian/cloud-init/etc/rsyslog.d/21-cloudinit.conf
+ install -D ./tools/21-cloudinit.conf debian/cloud-init/etc/rsyslog.d/21-cloudinit.conf
install -D ./tools/Z99-cloud-locale-test.sh debian/cloud-init/etc/profile.d/Z99-cloud-locale-test.sh
install -D ./tools/Z99-cloudinit-warnings.sh debian/cloud-init/etc/profile.d/Z99-cloudinit-warnings.sh
- install -m 0644 -D debian/apport-launcher.py debian/cloud-init/usr/share/apport/package-hooks/cloud-init.py
diff --git a/debian/update-grub-legacy-ec2 b/debian/update-grub-legacy-ec2
index fb44b6e4..c1c9dc79 100755
--- a/debian/update-grub-legacy-ec2
+++ b/debian/update-grub-legacy-ec2
@@ -1423,6 +1423,7 @@ if ! type is_xen_kernel >/dev/null 2>&1; then
ver_flavor="${1##*vmlinuz-}"
case "${ver_flavor}" in
+ *-aws) return 0;;
*-ec2) return 0;;
*-virtual)
# 10.04 LTS through 12.04 LTS -virtual is the EC2/Xen kernel
|