Ubuntu Pastebin

Paste from nacc at Wed, 2 Nov 2016 18:03:42 +0000

Download as text
  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
$ ~/work/usd-importer/usd-clone qemu
Cloning into 'qemu'...
remote: Counting objects: 34776, done.
... Counting ...
... Receiving ...
Checking connectivity... done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

git fetch lpusd failed. Likely lpusd does not exist yet for qemu.
Branch ubuntu/devel set up to track remote branch ubuntu/devel from importer.
Switched to branch 'ubuntu/devel'
Your branch is up-to-date with 'importer/ubuntu/devel'.
$ cd qemu/
$ git checkout lp1490611
  [ my dev branch in lpmemp ]
Branch lp1490611 set up to track remote branch lp1490611 from nacc.
Switched to a new branch 'lp1490611'
$ git rebase -i importer/ubuntu/xenial-proposed
  [ do the rebase, to catch up to ubuntu development ]
$ ~/work/usd-importer/usd-build -S -nc -d
Checking for a DSC file at /tmp/qemu/.git/build_cache/qemu/2.5+dfsg/DSC
Checking if upstream version of publish 2.0.0+dfsg-2ubuntu1.29 matches 2.5+dfsg
Checking if upstream version of publish 2.0.0+dfsg-2ubuntu1.28 matches 2.5+dfsg
Checking if upstream version of publish 1:2.6.1+dfsg-0ubuntu5 matches 2.5+dfsg
Checking if upstream version of publish 1:2.6.1+dfsg-0ubuntu5 matches 2.5+dfsg
Checking if upstream version of publish 1:2.6.1+dfsg-0ubuntu5 matches 2.5+dfsg
Checking if upstream version of publish 1:2.5+dfsg-5ubuntu10.5 matches 2.5+dfsg
Upstream version of publish 1:2.5+dfsg-5ubuntu10.5 matches
Caching dsc file
Caching orig tarball qemu_2.5+dfsg.orig.tar.xz
symlinking qemu_2.5+dfsg.orig.tar.xz
$ ls -ahl ../qemu_*
-rw-r--r--  1 nacc nacc 109K Nov  2 10:53 ../qemu_2.5+dfsg-5ubuntu10.6.debian.tar.xz
-rw-------  1 nacc nacc  85K Nov  2 10:43 ../qemu_2.5+dfsg-5ubuntu10.6.diff.HgC1ts
-rw-r--r--  1 nacc nacc 5.8K Nov  2 10:54 ../qemu_2.5+dfsg-5ubuntu10.6.dsc
-rw-r--r--  1 nacc nacc 3.1K Nov  2 10:54 ../qemu_2.5+dfsg-5ubuntu10.6_source.changes
lrwxrwxrwx  1 nacc nacc   66 Nov  2 10:53 ../qemu_2.5+dfsg.orig.tar.xz -> /tmp/qemu/.git/build_cache/qemu/2.5+dfsg/qemu_2.5+dfsg.orig.tar.xz
$ pull-lp-source -d qemu xenial
pull-lp-source: Downloading qemu version 1:2.5+dfsg-5ubuntu10.5
  [ Downloads ]
$ debdiff qemu_2.5+dfsg-5ubuntu10.5.dsc qemu_2.5+dfsg-5ubuntu10.6.dsc 
gpgv: Signature made Tue 20 Sep 2016 12:43:35 AM PDT
gpgv:                using RSA key 
gpgv: Can't check signature: No public key
dpkg-source: warning: failed to verify signature on /tmp/qemu_2.5+dfsg-5ubuntu10.5.dsc
gpgv: Signature made Wed 02 Nov 2016 10:53:58 AM PDT
gpgv:                using RSA key 
gpgv:                issuer "nish.aravamudan@canonical.com"
gpgv: Can't check signature: No public key
dpkg-source: warning: failed to verify signature on /tmp/qemu_2.5+dfsg-5ubuntu10.6.dsc
diff -Nru qemu-2.5+dfsg/debian/changelog qemu-2.5+dfsg/debian/changelog
--- qemu-2.5+dfsg/debian/changelog	2016-09-20 00:39:32.000000000 -0700
+++ qemu-2.5+dfsg/debian/changelog	2016-11-02 10:52:47.000000000 -0700
@@ -1,3 +1,11 @@
+qemu (1:2.5+dfsg-5ubuntu10.6) xenial; urgency=medium
+
+  * debian/patches/add_force_size_option.patch: block/vpc: give option
+    to force the current_size field in .bdrv_create.  Closes LP:
+    #1490611.
+
+ -- Nishanth Aravamudan <nish.aravamudan@canonical.com>  Wed, 02 Nov 2016 10:52:47 -0700
+
 qemu (1:2.5+dfsg-5ubuntu10.5) xenial; urgency=medium
 
   * fix default machine types. (LP: #1621042)
diff -Nru qemu-2.5+dfsg/debian/patches/add_force_size_option.patch qemu-2.5+dfsg/debian/patches/add_force_size_option.patch
--- qemu-2.5+dfsg/debian/patches/add_force_size_option.patch	1969-12-31 16:00:00.000000000 -0800
+++ qemu-2.5+dfsg/debian/patches/add_force_size_option.patch	2016-11-02 10:52:25.000000000 -0700
@@ -0,0 +1,93 @@
+Description: block/vpc: give option to force the current_size field in .bdrv_create
+Author: Nishanth Aravamudan <nish.aravamudan@canonical.com>
+Origin: upstream, http://git.qemu.org/?p=qemu.git;a=commitdiff;h=fb9245c2610932d33ce14
+Bug-Ubuntu: https://launchpad.net/bugs/1490611
+
+--- qemu-2.5+dfsg.orig/block/vpc.c
++++ qemu-2.5+dfsg/block/vpc.c
+@@ -45,8 +45,14 @@ enum vhd_type {
+ // Seconds since Jan 1, 2000 0:00:00 (UTC)
+ #define VHD_TIMESTAMP_BASE 946684800
+ 
++#define VHD_CHS_MAX_C   65535LL
++#define VHD_CHS_MAX_H   16
++#define VHD_CHS_MAX_S   255
++
+ #define VHD_MAX_SECTORS       (65535LL * 255 * 255)
+-#define VHD_MAX_GEOMETRY      (65535LL *  16 * 255)
++#define VHD_MAX_GEOMETRY      (VHD_CHS_MAX_C * VHD_CHS_MAX_H * VHD_CHS_MAX_S)
++
++#define VPC_OPT_FORCE_SIZE "force_size"
+ 
+ // always big-endian
+ typedef struct vhd_footer {
+@@ -770,6 +776,7 @@ static int vpc_create(const char *filena
+     int64_t total_size;
+     int disk_type;
+     int ret = -EIO;
++    bool force_size;
+     Error *local_err = NULL;
+     BlockDriverState *bs = NULL;
+ 
+@@ -790,6 +797,8 @@ static int vpc_create(const char *filena
+         disk_type = VHD_DYNAMIC;
+     }
+ 
++    force_size = qemu_opt_get_bool_del(opts, VPC_OPT_FORCE_SIZE, false);
++
+     ret = bdrv_create_file(filename, opts, &local_err);
+     if (ret < 0) {
+         error_propagate(errp, local_err);
+@@ -807,13 +816,20 @@ static int vpc_create(const char *filena
+      * sectors requested until we get enough (or fail). This ensures that
+      * qemu-img convert doesn't truncate images, but rather rounds up.
+      *
+-     * If the image size can't be represented by a spec conform CHS geometry,
++     * If the image size can't be represented by a spec conformant CHS geometry,
+      * we set the geometry to 65535 x 16 x 255 (CxHxS) sectors and use
+      * the image size from the VHD footer to calculate total_sectors.
+      */
+-    total_sectors = MIN(VHD_MAX_GEOMETRY, total_size / BDRV_SECTOR_SIZE);
+-    for (i = 0; total_sectors > (int64_t)cyls * heads * secs_per_cyl; i++) {
+-        calculate_geometry(total_sectors + i, &cyls, &heads, &secs_per_cyl);
++    if (force_size) {
++        /* This will force the use of total_size for sector count, below */
++        cyls         = VHD_CHS_MAX_C;
++        heads        = VHD_CHS_MAX_H;
++        secs_per_cyl = VHD_CHS_MAX_S;
++    } else {
++        total_sectors = MIN(VHD_MAX_GEOMETRY, total_size / BDRV_SECTOR_SIZE);
++        for (i = 0; total_sectors > (int64_t)cyls * heads * secs_per_cyl; i++) {
++            calculate_geometry(total_sectors + i, &cyls, &heads, &secs_per_cyl);
++        }
+     }
+ 
+     if ((int64_t)cyls * heads * secs_per_cyl == VHD_MAX_GEOMETRY) {
+@@ -832,8 +848,11 @@ static int vpc_create(const char *filena
+     memset(buf, 0, 1024);
+ 
+     memcpy(footer->creator, "conectix", 8);
+-    /* TODO Check if "qemu" creator_app is ok for VPC */
+-    memcpy(footer->creator_app, "qemu", 4);
++    if (force_size) {
++        memcpy(footer->creator_app, "qem2", 4);
++    } else {
++        memcpy(footer->creator_app, "qemu", 4);
++    }
+     memcpy(footer->creator_os, "Wi2k", 4);
+ 
+     footer->features = cpu_to_be32(0x02);
+@@ -914,6 +933,13 @@ static QemuOptsList vpc_create_opts = {
+                 "Type of virtual hard disk format. Supported formats are "
+                 "{dynamic (default) | fixed} "
+         },
++        {
++            .name = VPC_OPT_FORCE_SIZE,
++            .type = QEMU_OPT_BOOL,
++            .help = "Force disk size calculation to use the actual size "
++                    "specified, rather than using the nearest CHS-based "
++                    "calculation"
++        },
+         { /* end of list */ }
+     }
+ };
diff -Nru qemu-2.5+dfsg/debian/patches/series qemu-2.5+dfsg/debian/patches/series
--- qemu-2.5+dfsg/debian/patches/series	2016-08-12 05:46:11.000000000 -0700
+++ qemu-2.5+dfsg/debian/patches/series	2016-11-02 10:52:38.000000000 -0700
@@ -58,3 +58,4 @@
 CVE-2016-5338.patch
 #CVE-2016-5403.patch
 CVE-2016-6351.patch
+add_force_size_option.patch
Download as text