summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@lge.com>2020-03-03 16:17:23 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-03-03 19:59:18 -0500
commitcf6d398d51e5174350e5b32536c4004ba3c6829f (patch)
treee3dc0dc958c31c0930bb56d8b4e3ac9782befc1f /recipes-extended
parent1af36ffa3d4f9e25fb361d0d9ce1477815d8448c (diff)
downloadmeta-virtualization-cf6d398d51e5174350e5b32536c4004ba3c6829f.tar.gz
hyperstart: refresh 0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch to apply cleanly
ERROR: hyperstart-v0.2+gitAUTOINC+15bb718ad3-r0 do_patch: Fuzz detected: Applying patch 0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch patching file src/container.c Hunk #2 succeeded at 118 with fuzz 1 (offset 17 lines). Hunk #3 succeeded at 148 (offset 18 lines). Hunk #4 succeeded at 158 (offset 18 lines). Hunk #5 succeeded at 167 with fuzz 1 (offset 18 lines). Hunk #6 succeeded at 197 (offset 20 lines). Hunk #7 succeeded at 222 (offset 20 lines). Hunk #8 succeeded at 240 (offset 20 lines). Hunk #9 succeeded at 277 (offset 20 lines). Hunk #10 succeeded at 285 (offset 20 lines). Hunk #11 succeeded at 325 (offset 27 lines). Hunk #12 succeeded at 583 (offset 30 lines). Hunk #13 succeeded at 646 (offset 30 lines). Hunk #14 succeeded at 664 (offset 30 lines). Hunk #15 succeeded at 749 (offset 30 lines). Hunk #16 succeeded at 769 (offset 30 lines). Hunk #17 succeeded at 778 (offset 30 lines). The context lines in the patches can be updated with devtool: devtool modify hyperstart devtool finish --force-patch-refresh hyperstart <layer_path> Don't forget to review changes done by devtool! ERROR: hyperstart-v0.2+gitAUTOINC+15bb718ad3-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz] Signed-off-by: Martin Jansa <martin.jansa@lge.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch44
1 files changed, 21 insertions, 23 deletions
diff --git a/recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch b/recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch
index 4a01de5b..091ce3cf 100644
--- a/recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch
+++ b/recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch
@@ -1,4 +1,4 @@
1From 11f5089300c1c368d896c95890827dc85a67f132 Mon Sep 17 00:00:00 2001 1From 085dd65bba063e391350487f2a5e4a7bf69ee6c8 Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com> 2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Fri, 15 Jun 2018 08:04:35 -0700 3Date: Fri, 15 Jun 2018 08:04:35 -0700
4Subject: [PATCH] container.c: Fix compiler errors that gcc 8.1.0 reports 4Subject: [PATCH] container.c: Fix compiler errors that gcc 8.1.0 reports
@@ -47,12 +47,13 @@ container.c:176:4: note: 'sprintf' output 9 or more bytes (assuming 520) into a
47 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 47 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 48
49Signed-off-by: Jason Wessel <jason.wessel@windriver.com> 49Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
50
50--- 51---
51 src/container.c | 47 ++++++++++++++++++++++++++++------------------- 52 src/container.c | 47 ++++++++++++++++++++++++++++-------------------
52 1 file changed, 28 insertions(+), 19 deletions(-) 53 1 file changed, 28 insertions(+), 19 deletions(-)
53 54
54diff --git a/src/container.c b/src/container.c 55diff --git a/src/container.c b/src/container.c
55index 0938d82..b1c52d4 100644 56index fee67ff..94d49d8 100644
56--- a/src/container.c 57--- a/src/container.c
57+++ b/src/container.c 58+++ b/src/container.c
58@@ -22,6 +22,8 @@ 59@@ -22,6 +22,8 @@
@@ -64,7 +65,7 @@ index 0938d82..b1c52d4 100644
64 static int container_populate_volume(char *src, char *dest) 65 static int container_populate_volume(char *src, char *dest)
65 { 66 {
66 struct stat st; 67 struct stat st;
67@@ -99,12 +101,12 @@ static int container_setup_volume(struct hyper_pod *pod, 68@@ -116,12 +118,12 @@ static int container_setup_volume(struct hyper_pod *pod,
68 struct hyper_container *container) 69 struct hyper_container *container)
69 { 70 {
70 int i; 71 int i;
@@ -79,8 +80,8 @@ index 0938d82..b1c52d4 100644
79+ char mountpoint[MAX_PBUF]; 80+ char mountpoint[MAX_PBUF];
80 char *options = NULL; 81 char *options = NULL;
81 const char *filevolume = NULL; 82 const char *filevolume = NULL;
82 vol = &container->vols[i]; 83 bool newvolume = false;
83@@ -128,7 +130,8 @@ static int container_setup_volume(struct hyper_pod *pod, 84@@ -146,7 +148,8 @@ static int container_setup_volume(struct hyper_pod *pod,
84 if (hyper_mount_nfs(vol->device, path) < 0) 85 if (hyper_mount_nfs(vol->device, path) < 0)
85 return -1; 86 return -1;
86 /* nfs export has implicitly included _data part of the volume */ 87 /* nfs export has implicitly included _data part of the volume */
@@ -90,7 +91,7 @@ index 0938d82..b1c52d4 100644
90 } else { 91 } else {
91 fprintf(stdout, "mount %s to %s, tmp path %s\n", 92 fprintf(stdout, "mount %s to %s, tmp path %s\n",
92 dev, vol->mountpoint, path); 93 dev, vol->mountpoint, path);
93@@ -137,7 +140,7 @@ static int container_setup_volume(struct hyper_pod *pod, 94@@ -155,7 +158,7 @@ static int container_setup_volume(struct hyper_pod *pod,
94 options = "nouuid"; 95 options = "nouuid";
95 96
96 if (access(dev, R_OK) < 0) { 97 if (access(dev, R_OK) < 0) {
@@ -99,7 +100,7 @@ index 0938d82..b1c52d4 100644
99 sprintf(device, "/block/%s", vol->device); 100 sprintf(device, "/block/%s", vol->device);
100 hyper_netlink_wait_dev(pod->ueventfd, device); 101 hyper_netlink_wait_dev(pod->ueventfd, device);
101 } 102 }
102@@ -146,7 +149,8 @@ static int container_setup_volume(struct hyper_pod *pod, 103@@ -164,7 +167,8 @@ static int container_setup_volume(struct hyper_pod *pod,
103 perror("mount volume device failed"); 104 perror("mount volume device failed");
104 return -1; 105 return -1;
105 } 106 }
@@ -108,8 +109,8 @@ index 0938d82..b1c52d4 100644
108+ return -1; 109+ return -1;
109 } 110 }
110 111
111 if (container_check_file_volume(volume, &filevolume) < 0) 112 if (container_check_volume(volume, &filevolume, &newvolume) < 0)
112@@ -173,7 +177,8 @@ static int container_setup_volume(struct hyper_pod *pod, 113@@ -193,7 +197,8 @@ static int container_setup_volume(struct hyper_pod *pod,
113 perror("create volume file failed"); 114 perror("create volume file failed");
114 return -1; 115 return -1;
115 } 116 }
@@ -119,7 +120,7 @@ index 0938d82..b1c52d4 100644
119 /* 0777 so that any user can read/write the new file volume */ 120 /* 0777 so that any user can read/write the new file volume */
120 if (chmod(volume, 0777) < 0) { 121 if (chmod(volume, 0777) < 0) {
121 fprintf(stderr, "fail to chmod directory %s\n", volume); 122 fprintf(stderr, "fail to chmod directory %s\n", volume);
122@@ -197,9 +202,9 @@ static int container_setup_volume(struct hyper_pod *pod, 123@@ -217,9 +222,9 @@ static int container_setup_volume(struct hyper_pod *pod,
123 124
124 for (i = 0; i < container->maps_num; i++) { 125 for (i = 0; i < container->maps_num; i++) {
125 struct stat st; 126 struct stat st;
@@ -131,7 +132,7 @@ index 0938d82..b1c52d4 100644
131 132
132 sprintf(path, "%s/%s", SHARED_DIR, map->source); 133 sprintf(path, "%s/%s", SHARED_DIR, map->source);
133 sprintf(mountpoint, "./%s", map->path); 134 sprintf(mountpoint, "./%s", map->path);
134@@ -215,7 +220,8 @@ static int container_setup_volume(struct hyper_pod *pod, 135@@ -235,7 +240,8 @@ static int container_setup_volume(struct hyper_pod *pod,
135 } 136 }
136 if (map->docker) { 137 if (map->docker) {
137 /* converted from volume */ 138 /* converted from volume */
@@ -141,7 +142,7 @@ index 0938d82..b1c52d4 100644
141 src = volume; 142 src = volume;
142 if (container->initialize && 143 if (container->initialize &&
143 (container_populate_volume(mountpoint, volume) < 0)) { 144 (container_populate_volume(mountpoint, volume) < 0)) {
144@@ -251,7 +257,7 @@ static int container_setup_modules(struct hyper_container *container) 145@@ -271,7 +277,7 @@ static int container_setup_modules(struct hyper_container *container)
145 { 146 {
146 struct stat st; 147 struct stat st;
147 struct utsname uts; 148 struct utsname uts;
@@ -150,7 +151,7 @@ index 0938d82..b1c52d4 100644
150 151
151 if (uname(&uts) < 0) { 152 if (uname(&uts) < 0) {
152 perror("fail to call uname"); 153 perror("fail to call uname");
153@@ -259,7 +265,8 @@ static int container_setup_modules(struct hyper_container *container) 154@@ -279,7 +285,8 @@ static int container_setup_modules(struct hyper_container *container)
154 } 155 }
155 156
156 sprintf(src, "/lib/modules/%s", uts.release); 157 sprintf(src, "/lib/modules/%s", uts.release);
@@ -160,7 +161,7 @@ index 0938d82..b1c52d4 100644
160 161
161 if (stat(dst, &st) == 0) { 162 if (stat(dst, &st) == 0) {
162 struct dirent **list; 163 struct dirent **list;
163@@ -291,7 +298,7 @@ static int container_setup_modules(struct hyper_container *container) 164@@ -318,7 +325,7 @@ static int container_setup_modules(struct hyper_container *container)
164 165
165 static int container_setup_mount(struct hyper_container *container) 166 static int container_setup_mount(struct hyper_container *container)
166 { 167 {
@@ -169,7 +170,7 @@ index 0938d82..b1c52d4 100644
169 170
170 // current dir is container rootfs, the operations on "./PATH" are the operations on container's "/PATH" 171 // current dir is container rootfs, the operations on "./PATH" are the operations on container's "/PATH"
171 if (!container->readonly) { 172 if (!container->readonly) {
172@@ -546,7 +553,7 @@ static int hyper_setup_container_rootfs(void *data) 173@@ -576,7 +583,7 @@ static int hyper_setup_container_rootfs(void *data)
173 { 174 {
174 struct hyper_container_arg *arg = data; 175 struct hyper_container_arg *arg = data;
175 struct hyper_container *container = arg->c; 176 struct hyper_container *container = arg->c;
@@ -178,7 +179,7 @@ index 0938d82..b1c52d4 100644
178 int setup_dns; 179 int setup_dns;
179 180
180 /* wait for ns-opened ready message */ 181 /* wait for ns-opened ready message */
181@@ -609,7 +616,7 @@ static int hyper_setup_container_rootfs(void *data) 182@@ -639,7 +646,7 @@ static int hyper_setup_container_rootfs(void *data)
182 goto fail; 183 goto fail;
183 } 184 }
184 } else { 185 } else {
@@ -187,7 +188,7 @@ index 0938d82..b1c52d4 100644
187 188
188 sprintf(path, "%s/%s/", SHARED_DIR, container->image); 189 sprintf(path, "%s/%s/", SHARED_DIR, container->image);
189 fprintf(stdout, "src directory %s\n", path); 190 fprintf(stdout, "src directory %s\n", path);
190@@ -627,7 +634,9 @@ static int hyper_setup_container_rootfs(void *data) 191@@ -657,7 +664,9 @@ static int hyper_setup_container_rootfs(void *data)
191 fprintf(stdout, "root directory for container is %s/%s, init task %s\n", 192 fprintf(stdout, "root directory for container is %s/%s, init task %s\n",
192 root, container->rootfs, container->exec.argv[0]); 193 root, container->rootfs, container->exec.argv[0]);
193 194
@@ -198,7 +199,7 @@ index 0938d82..b1c52d4 100644
198 if (mount(rootfs, rootfs, NULL, MS_BIND|MS_REC, NULL) < 0) { 199 if (mount(rootfs, rootfs, NULL, MS_BIND|MS_REC, NULL) < 0) {
199 perror("failed to bind rootfs"); 200 perror("failed to bind rootfs");
200 goto fail; 201 goto fail;
201@@ -710,7 +719,7 @@ fail: 202@@ -740,7 +749,7 @@ fail:
202 203
203 static int hyper_setup_pty(struct hyper_container *c) 204 static int hyper_setup_pty(struct hyper_container *c)
204 { 205 {
@@ -207,7 +208,7 @@ index 0938d82..b1c52d4 100644
207 208
208 sprintf(root, "/tmp/hyper/%s/devpts/", c->id); 209 sprintf(root, "/tmp/hyper/%s/devpts/", c->id);
209 210
210@@ -730,7 +739,7 @@ static int hyper_setup_pty(struct hyper_container *c) 211@@ -760,7 +769,7 @@ static int hyper_setup_pty(struct hyper_container *c)
211 212
212 static void hyper_cleanup_pty(struct hyper_container *c) 213 static void hyper_cleanup_pty(struct hyper_container *c)
213 { 214 {
@@ -216,7 +217,7 @@ index 0938d82..b1c52d4 100644
216 217
217 sprintf(path, "/tmp/hyper/%s/devpts/", c->id); 218 sprintf(path, "/tmp/hyper/%s/devpts/", c->id);
218 if (umount(path) < 0) 219 if (umount(path) < 0)
219@@ -739,7 +748,7 @@ static void hyper_cleanup_pty(struct hyper_container *c) 220@@ -769,7 +778,7 @@ static void hyper_cleanup_pty(struct hyper_container *c)
220 221
221 int container_prepare_rootfs_dev(struct hyper_container *container, struct hyper_pod *pod) 222 int container_prepare_rootfs_dev(struct hyper_container *container, struct hyper_pod *pod)
222 { 223 {
@@ -225,6 +226,3 @@ index 0938d82..b1c52d4 100644
225 226
226 if (container->fstype == NULL) 227 if (container->fstype == NULL)
227 return 0; 228 return 0;
228--
2292.17.1
230