~mwhudson/vmbuilder/jenkins_kvm.mwhudson

« back to all changes in this revision

Viewing changes to templates/img-update.tmpl

  • Committer: Francis Ginther
  • Date: 2017-11-06 21:44:54 UTC
  • mfrom: (792.1.3 new-artful-builder)
  • Revision ID: francis.ginther@canonical.com-20171106214454-f5ph3ez66yftzzxw
Update source image and package set for artful. Dropping packages that no longer exist.
[a=fginther][r=daniel-thewatkins,philroche,tribaal]

MP: https://code.launchpad.net/~fginther/vmbuilder/new-artful-builder/+merge/332487

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
[ "${dev_uuid}" == "${odev_uuid}" ] && fail "device ID's are the same. This is bad"
46
46
 
47
 
# dist_ge(dist1,dist2)
48
 
# return true if dist1 is newer or the same as dist2
49
 
dist_ge() { [[ "$1" > "$2" || "$1" == "$2" ]]; }
50
 
 
51
 
# dist_ge(dist1,dist2)
52
 
# return true if dist2 is older than or the same as dist2
53
 
dist_le() { [[ "$1" < "$2" || "$1" == "$2" ]]; }
54
 
 
55
47
operation_files() {
56
48
 
57
49
        for i in $(seq 0 $((${#file_list[@]} - 1)))
210
202
      dkms
211
203
      git)
212
204
 
213
 
if [ "${suite}" == "precise" ]; then
214
 
        pkgs+=(linux-source-3.2.0 qemu-kvm-extras qemu-kvm-extras-static)
215
 
else
216
 
        case "${suite}" in
217
 
                trusty|xenial) # not for yakkety onward
218
 
                        xchroot apt-add-repository -y ppa:snappy-dev/tools
219
 
                        xchroot apt-add-repository -y ppa:ubuntu-sdk-team/ppa
220
 
                        ;;
221
 
        esac
222
 
        xchroot apt-add-repository -y multiverse
223
 
        pkgs+=(qemu-user-static
224
 
                   qemu-user
225
 
                   ubuntu-device-flash
226
 
                   ubuntu-snappy-cli
227
 
                   python-openstackclient
228
 
                   cloud-utils)
229
 
        case "${suite}" in
230
 
                trusty|xenial)
231
 
                        pkgs+=(ubuntu-core-security-utils)
232
 
                        ;;
233
 
        esac
234
 
fi
 
205
case "${suite}" in
 
206
        trusty|xenial) # not for yakkety onward
 
207
                xchroot apt-add-repository -y ppa:snappy-dev/tools
 
208
                xchroot apt-add-repository -y ppa:ubuntu-sdk-team/ppa
 
209
                ;;
 
210
esac
 
211
xchroot apt-add-repository -y multiverse
 
212
pkgs+=(qemu-user-static
 
213
        qemu-user
 
214
        ubuntu-snappy-cli
 
215
        python-openstackclient
 
216
        cloud-utils)
 
217
case "${suite}" in
 
218
        trusty|xenial)
 
219
                pkgs+=(ubuntu-core-security-utils)
 
220
                ;;
 
221
esac
 
222
# ubuntu-device-flash was dropped after zesty
 
223
case "${suite}" in
 
224
        trusty|xenial|zesty)
 
225
                pkgs+=(ubuntu-device-flash)
 
226
                ;;
 
227
esac
235
228
 
236
229
# Installation of packages
237
230
debug "Performing package operations"
241
234
debug "Package operations complete"
242
235
 
243
236
# Install ZFS
244
 
if dist_ge ${suite} xenial; then
245
 
        xchroot apt-get -y install zfsutils-linux
246
 
 
247
 
else
248
 
        debug "Installing ZFS"
249
 
        xchroot apt-add-repository -y ppa:zfs-native/stable
250
 
        xchroot apt-get update
251
 
        xchroot apt-get -y install spl
252
 
        xchroot dpkg-reconfigure spl
253
 
        xchroot apt-get -y install ubuntu-zfs
254
 
        xchroot dpkg-reconfigure dkms
255
 
        debug "Installed ZFS"
256
 
fi
 
237
case "${suite}" in
 
238
        trusty)
 
239
                debug "Installing ZFS"
 
240
                xchroot apt-add-repository -y ppa:zfs-native/stable
 
241
                xchroot apt-get update
 
242
                xchroot apt-get -y install spl
 
243
                xchroot dpkg-reconfigure spl
 
244
                xchroot apt-get -y install ubuntu-zfs
 
245
                xchroot dpkg-reconfigure dkms
 
246
                debug "Installed ZFS"
 
247
                ;;
 
248
        *)
 
249
                xchroot apt-get -y install zfsutils-linux
 
250
                ;;
 
251
esac
257
252
 
258
253
# Modify boot settings
259
254
debug "Modifying in-image settings for builder"
264
259
xchroot update-initramfs -u -k all
265
260
# On yakkety and later, reinstall grub-pc which is no longer in the base image
266
261
case $suite in
267
 
    precise|trusty|xenial)
 
262
    trusty|xenial)
268
263
        xchroot dpkg-reconfigure grub-pc
269
264
        ;;
270
265
    *)