diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2017-04-27 11:04:51 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-08-31 10:18:33 +0200 |
| commit | ec9e5ed06256ad92c818474cdb490dc0d3a0d0a3 (patch) | |
| tree | e16d2a838f4561d5538928a58f805e5f1373225a /meta-oe/recipes-graphics/slim | |
| parent | 6775acb048dabd624c5c8197b683aba45ed91569 (diff) | |
| download | meta-openembedded-ec9e5ed06256ad92c818474cdb490dc0d3a0d0a3.tar.gz | |
recipes: remove blacklisted recipes
* as PNBLACKLIST message says, these recipes are blacklisted for long
time and nobody showed any interest to fix them
* remove all unused .patch and .inc files as well
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics/slim')
8 files changed, 0 insertions, 782 deletions
diff --git a/meta-oe/recipes-graphics/slim/slim/0002-Fix-image-handling-integer-overflows.patch b/meta-oe/recipes-graphics/slim/slim/0002-Fix-image-handling-integer-overflows.patch deleted file mode 100644 index de82d63033..0000000000 --- a/meta-oe/recipes-graphics/slim/slim/0002-Fix-image-handling-integer-overflows.patch +++ /dev/null | |||
| @@ -1,343 +0,0 @@ | |||
| 1 | From 24e548a222f0aab4313d5ba8b04f0840b173000f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: iwamatsu <iwamatsu@7c53e7cc-98ea-0310-8f1f-a0b24da60408> | ||
| 3 | Date: Mon, 30 Aug 2010 01:24:54 +0000 | ||
| 4 | Subject: [PATCH 2/8] Fix image handling integer overflows | ||
| 5 | |||
| 6 | Image loading memory allocation is based on the image width and height: | ||
| 7 | malloc(heigth * width * 3). Providing an image with large height and | ||
| 8 | width values can cause the result of this calculation to exceed the | ||
| 9 | maximum value of an unsigned int and thus causes an integer overflow. | ||
| 10 | The result: too little memory is allocated and an heap overflow occurs. | ||
| 11 | |||
| 12 | This patch was based by Niels Heinen <niels@freebsd.org> | ||
| 13 | Thanks! | ||
| 14 | |||
| 15 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
| 16 | |||
| 17 | git-svn-id: svn://svn.berlios.de/slim/trunk@176 7c53e7cc-98ea-0310-8f1f-a0b24da60408 | ||
| 18 | --- | ||
| 19 | const.h | 3 ++ | ||
| 20 | jpeg.c | 51 +++++++++++++++----------- | ||
| 21 | png.c | 122 ++++++++++++++++++++++++++++++++------------------------------ | ||
| 22 | 3 files changed, 96 insertions(+), 80 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/const.h b/const.h | ||
| 25 | index df0989c..a18c6f3 100644 | ||
| 26 | --- a/const.h | ||
| 27 | +++ b/const.h | ||
| 28 | @@ -42,4 +42,7 @@ | ||
| 29 | // variables replaced in pre-session_cmd and post-session_cmd | ||
| 30 | #define USER_VAR "%user" | ||
| 31 | |||
| 32 | +// max height/width for images | ||
| 33 | +#define MAX_DIMENSION 10000 | ||
| 34 | + | ||
| 35 | #endif | ||
| 36 | diff --git a/jpeg.c b/jpeg.c | ||
| 37 | index 1cf106c..e1f8352 100644 | ||
| 38 | --- a/jpeg.c | ||
| 39 | +++ b/jpeg.c | ||
| 40 | @@ -22,16 +22,22 @@ | ||
| 41 | #include <string.h> | ||
| 42 | |||
| 43 | #include <jpeglib.h> | ||
| 44 | +#include "const.h" | ||
| 45 | |||
| 46 | int | ||
| 47 | read_jpeg(const char *filename, int *width, int *height, unsigned char **rgb) | ||
| 48 | { | ||
| 49 | + int ret = 0; | ||
| 50 | struct jpeg_decompress_struct cinfo; | ||
| 51 | struct jpeg_error_mgr jerr; | ||
| 52 | unsigned char *ptr = NULL; | ||
| 53 | unsigned int i, ipos; | ||
| 54 | |||
| 55 | FILE *infile = fopen(filename, "rb"); | ||
| 56 | + if (infile == NULL) { | ||
| 57 | + fprintf(stderr, "Can not fopen file: %s\n",filename); | ||
| 58 | + return ret; | ||
| 59 | + } | ||
| 60 | |||
| 61 | cinfo.err = jpeg_std_error(&jerr); | ||
| 62 | jpeg_create_decompress(&cinfo); | ||
| 63 | @@ -39,43 +45,39 @@ read_jpeg(const char *filename, int *width, int *height, unsigned char **rgb) | ||
| 64 | jpeg_read_header(&cinfo, TRUE); | ||
| 65 | jpeg_start_decompress(&cinfo); | ||
| 66 | |||
| 67 | + /* Prevent against integer overflow */ | ||
| 68 | + if(cinfo.output_width >= MAX_DIMENSION || cinfo.output_height >= MAX_DIMENSION) { | ||
| 69 | + fprintf(stderr, "Unreasonable dimension found in file: %s\n",filename); | ||
| 70 | + goto close_file; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | *width = cinfo.output_width; | ||
| 74 | *height = cinfo.output_height; | ||
| 75 | |||
| 76 | rgb[0] = malloc(3 * cinfo.output_width * cinfo.output_height); | ||
| 77 | - if (rgb[0] == NULL) | ||
| 78 | - { | ||
| 79 | + if (rgb[0] == NULL) { | ||
| 80 | fprintf(stderr, "Can't allocate memory for JPEG file.\n"); | ||
| 81 | - fclose(infile); | ||
| 82 | - return(0); | ||
| 83 | + goto close_file; | ||
| 84 | } | ||
| 85 | |||
| 86 | - if (cinfo.output_components == 3) | ||
| 87 | - { | ||
| 88 | + if (cinfo.output_components == 3) { | ||
| 89 | ptr = rgb[0]; | ||
| 90 | - while (cinfo.output_scanline < cinfo.output_height) | ||
| 91 | - { | ||
| 92 | + while (cinfo.output_scanline < cinfo.output_height) { | ||
| 93 | jpeg_read_scanlines(&cinfo, &ptr, 1); | ||
| 94 | ptr += 3 * cinfo.output_width; | ||
| 95 | } | ||
| 96 | - } | ||
| 97 | - else if (cinfo.output_components == 1) | ||
| 98 | - { | ||
| 99 | + } else if (cinfo.output_components == 1) { | ||
| 100 | ptr = malloc(cinfo.output_width); | ||
| 101 | - if (ptr == NULL) | ||
| 102 | - { | ||
| 103 | + if (ptr == NULL) { | ||
| 104 | fprintf(stderr, "Can't allocate memory for JPEG file.\n"); | ||
| 105 | - fclose(infile); | ||
| 106 | - return(0); | ||
| 107 | + goto rgb_free; | ||
| 108 | } | ||
| 109 | |||
| 110 | ipos = 0; | ||
| 111 | - while (cinfo.output_scanline < cinfo.output_height) | ||
| 112 | - { | ||
| 113 | + while (cinfo.output_scanline < cinfo.output_height) { | ||
| 114 | jpeg_read_scanlines(&cinfo, &ptr, 1); | ||
| 115 | |||
| 116 | - for (i = 0; i < cinfo.output_width; i++) | ||
| 117 | - { | ||
| 118 | + for (i = 0; i < cinfo.output_width; i++) { | ||
| 119 | memset(rgb[0] + ipos, ptr[i], 3); | ||
| 120 | ipos += 3; | ||
| 121 | } | ||
| 122 | @@ -85,9 +87,16 @@ read_jpeg(const char *filename, int *width, int *height, unsigned char **rgb) | ||
| 123 | } | ||
| 124 | |||
| 125 | jpeg_finish_decompress(&cinfo); | ||
| 126 | - jpeg_destroy_decompress(&cinfo); | ||
| 127 | |||
| 128 | + ret = 1; | ||
| 129 | + goto close_file; | ||
| 130 | + | ||
| 131 | +rgb_free: | ||
| 132 | + free(rgb[0]); | ||
| 133 | + | ||
| 134 | +close_file: | ||
| 135 | + jpeg_destroy_decompress(&cinfo); | ||
| 136 | fclose(infile); | ||
| 137 | |||
| 138 | - return(1); | ||
| 139 | + return(ret); | ||
| 140 | } | ||
| 141 | diff --git a/png.c b/png.c | ||
| 142 | index a2661c6..5c086c6 100644 | ||
| 143 | --- a/png.c | ||
| 144 | +++ b/png.c | ||
| 145 | @@ -22,12 +22,13 @@ | ||
| 146 | #include <stdlib.h> | ||
| 147 | |||
| 148 | #include <png.h> | ||
| 149 | +#include "const.h" | ||
| 150 | |||
| 151 | int | ||
| 152 | read_png(const char *filename, int *width, int *height, unsigned char **rgb, | ||
| 153 | unsigned char **alpha) | ||
| 154 | { | ||
| 155 | - FILE *infile = fopen(filename, "rb"); | ||
| 156 | + int ret = 0; | ||
| 157 | |||
| 158 | png_structp png_ptr; | ||
| 159 | png_infop info_ptr; | ||
| 160 | @@ -38,31 +39,27 @@ read_png(const char *filename, int *width, int *height, unsigned char **rgb, | ||
| 161 | int bit_depth, color_type, interlace_type; | ||
| 162 | int i; | ||
| 163 | |||
| 164 | + FILE *infile = fopen(filename, "rb"); | ||
| 165 | + if (infile == NULL) { | ||
| 166 | + fprintf(stderr, "Can not fopen file: %s\n",filename); | ||
| 167 | + return ret; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, | ||
| 171 | (png_voidp) NULL, | ||
| 172 | (png_error_ptr) NULL, | ||
| 173 | (png_error_ptr) NULL); | ||
| 174 | - if (!png_ptr) | ||
| 175 | - { | ||
| 176 | - fclose(infile); | ||
| 177 | - return(0); | ||
| 178 | - } | ||
| 179 | + if (!png_ptr) | ||
| 180 | + goto file_close; | ||
| 181 | |||
| 182 | info_ptr = png_create_info_struct(png_ptr); | ||
| 183 | - if (!info_ptr) | ||
| 184 | - { | ||
| 185 | + if (!info_ptr) { | ||
| 186 | png_destroy_read_struct(&png_ptr, (png_infopp) NULL, | ||
| 187 | (png_infopp) NULL); | ||
| 188 | - fclose(infile); | ||
| 189 | - return(0); | ||
| 190 | } | ||
| 191 | |||
| 192 | if (setjmp(png_ptr->jmpbuf)) | ||
| 193 | - { | ||
| 194 | - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL); | ||
| 195 | - fclose(infile); | ||
| 196 | - return(0); | ||
| 197 | - } | ||
| 198 | + goto png_destroy; | ||
| 199 | |||
| 200 | png_init_io(png_ptr, infile); | ||
| 201 | png_read_info(png_ptr, info_ptr); | ||
| 202 | @@ -70,18 +67,23 @@ read_png(const char *filename, int *width, int *height, unsigned char **rgb, | ||
| 203 | png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type, | ||
| 204 | &interlace_type, (int *) NULL, (int *) NULL); | ||
| 205 | |||
| 206 | + /* Prevent against integer overflow */ | ||
| 207 | + if(w >= MAX_DIMENSION || h >= MAX_DIMENSION) { | ||
| 208 | + fprintf(stderr, "Unreasonable dimension found in file: %s\n",filename); | ||
| 209 | + goto png_destroy; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | *width = (int) w; | ||
| 213 | *height = (int) h; | ||
| 214 | |||
| 215 | if (color_type == PNG_COLOR_TYPE_RGB_ALPHA | ||
| 216 | - || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) | ||
| 217 | - { | ||
| 218 | - alpha[0] = malloc(*width * *height); | ||
| 219 | - if (alpha[0] == NULL) | ||
| 220 | - { | ||
| 221 | - fprintf(stderr, "Can't allocate memory for alpha channel in PNG file.\n"); | ||
| 222 | - return(0); | ||
| 223 | - } | ||
| 224 | + || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { | ||
| 225 | + alpha[0] = malloc(*width * *height); | ||
| 226 | + if (alpha[0] == NULL) | ||
| 227 | + { | ||
| 228 | + fprintf(stderr, "Can't allocate memory for alpha channel in PNG file.\n"); | ||
| 229 | + goto png_destroy; | ||
| 230 | + } | ||
| 231 | } | ||
| 232 | |||
| 233 | /* Change a paletted/grayscale image to RGB */ | ||
| 234 | @@ -94,68 +96,70 @@ read_png(const char *filename, int *width, int *height, unsigned char **rgb, | ||
| 235 | png_set_gray_to_rgb(png_ptr); | ||
| 236 | |||
| 237 | /* If the PNG file has 16 bits per channel, strip them down to 8 */ | ||
| 238 | - if (bit_depth == 16) png_set_strip_16(png_ptr); | ||
| 239 | + if (bit_depth == 16) | ||
| 240 | + png_set_strip_16(png_ptr); | ||
| 241 | |||
| 242 | /* use 1 byte per pixel */ | ||
| 243 | png_set_packing(png_ptr); | ||
| 244 | |||
| 245 | row_pointers = malloc(*height * sizeof(png_bytep)); | ||
| 246 | - if (row_pointers == NULL) | ||
| 247 | - { | ||
| 248 | + if (row_pointers == NULL) { | ||
| 249 | fprintf(stderr, "Can't allocate memory for PNG file.\n"); | ||
| 250 | - return(0); | ||
| 251 | + goto png_destroy; | ||
| 252 | } | ||
| 253 | |||
| 254 | - for (i = 0; i < *height; i++) | ||
| 255 | - { | ||
| 256 | + for (i = 0; i < *height; i++) { | ||
| 257 | row_pointers[i] = malloc(4 * *width); | ||
| 258 | - if (row_pointers == NULL) | ||
| 259 | - { | ||
| 260 | + if (row_pointers == NULL) { | ||
| 261 | fprintf(stderr, "Can't allocate memory for PNG line.\n"); | ||
| 262 | - return(0); | ||
| 263 | + goto rows_free; | ||
| 264 | } | ||
| 265 | } | ||
| 266 | |||
| 267 | png_read_image(png_ptr, row_pointers); | ||
| 268 | |||
| 269 | rgb[0] = malloc(3 * *width * *height); | ||
| 270 | - if (rgb[0] == NULL) | ||
| 271 | - { | ||
| 272 | + if (rgb[0] == NULL) { | ||
| 273 | fprintf(stderr, "Can't allocate memory for PNG file.\n"); | ||
| 274 | - return(0); | ||
| 275 | + goto rows_free; | ||
| 276 | } | ||
| 277 | |||
| 278 | if (alpha[0] == NULL) | ||
| 279 | { | ||
| 280 | - ptr = rgb[0]; | ||
| 281 | - for (i = 0; i < *height; i++) | ||
| 282 | - { | ||
| 283 | - memcpy(ptr, row_pointers[i], 3 * *width); | ||
| 284 | - ptr += 3 * *width; | ||
| 285 | - } | ||
| 286 | - } | ||
| 287 | - else | ||
| 288 | - { | ||
| 289 | - int j; | ||
| 290 | - ptr = rgb[0]; | ||
| 291 | - for (i = 0; i < *height; i++) | ||
| 292 | - { | ||
| 293 | - int ipos = 0; | ||
| 294 | - for (j = 0; j < *width; j++) | ||
| 295 | - { | ||
| 296 | - *ptr++ = row_pointers[i][ipos++]; | ||
| 297 | - *ptr++ = row_pointers[i][ipos++]; | ||
| 298 | - *ptr++ = row_pointers[i][ipos++]; | ||
| 299 | - alpha[0][i * *width + j] = row_pointers[i][ipos++]; | ||
| 300 | + ptr = rgb[0]; | ||
| 301 | + for (i = 0; i < *height; i++) { | ||
| 302 | + memcpy(ptr, row_pointers[i], 3 * *width); | ||
| 303 | + ptr += 3 * *width; | ||
| 304 | + } | ||
| 305 | + } else { | ||
| 306 | + int j; | ||
| 307 | + ptr = rgb[0]; | ||
| 308 | + for (i = 0; i < *height; i++) { | ||
| 309 | + int ipos = 0; | ||
| 310 | + for (j = 0; j < *width; j++) { | ||
| 311 | + *ptr++ = row_pointers[i][ipos++]; | ||
| 312 | + *ptr++ = row_pointers[i][ipos++]; | ||
| 313 | + *ptr++ = row_pointers[i][ipos++]; | ||
| 314 | + alpha[0][i * *width + j] = row_pointers[i][ipos++]; | ||
| 315 | + } | ||
| 316 | } | ||
| 317 | - } | ||
| 318 | } | ||
| 319 | |||
| 320 | - png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL); | ||
| 321 | + ret = 1; /* data reading is OK */ | ||
| 322 | + | ||
| 323 | +rows_free: | ||
| 324 | + for (i = 0; i < *height; i++) { | ||
| 325 | + if (row_pointers[i] != NULL ) { | ||
| 326 | + free(row_pointers[i]); | ||
| 327 | + } | ||
| 328 | + } | ||
| 329 | |||
| 330 | - for (i = 0; i < *height; i++) free(row_pointers[i]); | ||
| 331 | free(row_pointers); | ||
| 332 | |||
| 333 | +png_destroy: | ||
| 334 | + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL); | ||
| 335 | + | ||
| 336 | +file_close: | ||
| 337 | fclose(infile); | ||
| 338 | - return(1); | ||
| 339 | + return(ret); | ||
| 340 | } | ||
| 341 | -- | ||
| 342 | 1.6.6.1 | ||
| 343 | |||
diff --git a/meta-oe/recipes-graphics/slim/slim/0003-Fix-build-failure-with-ld-as-needed.patch b/meta-oe/recipes-graphics/slim/slim/0003-Fix-build-failure-with-ld-as-needed.patch deleted file mode 100644 index 471c4f51e5..0000000000 --- a/meta-oe/recipes-graphics/slim/slim/0003-Fix-build-failure-with-ld-as-needed.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | From 6aad913ddd5cdb473db9fa21a5e8ecec58de172b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: iwamatsu <iwamatsu@7c53e7cc-98ea-0310-8f1f-a0b24da60408> | ||
| 3 | Date: Wed, 12 Jan 2011 04:41:02 +0000 | ||
| 4 | Subject: [PATCH 3/8] Fix build failure with ld --as-needed. | ||
| 5 | |||
| 6 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
| 7 | |||
| 8 | git-svn-id: svn://svn.berlios.de/slim/trunk@177 7c53e7cc-98ea-0310-8f1f-a0b24da60408 | ||
| 9 | --- | ||
| 10 | Makefile | 4 ++-- | ||
| 11 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/Makefile b/Makefile | ||
| 14 | index 1219de4..fafa0ef 100644 | ||
| 15 | --- a/Makefile | ||
| 16 | +++ b/Makefile | ||
| 17 | @@ -4,7 +4,7 @@ | ||
| 18 | # to fit into your operating system / distribution | ||
| 19 | ####################################################### | ||
| 20 | CXX=/usr/bin/g++ | ||
| 21 | -CC=/usr/bin/gcc | ||
| 22 | +CC=/usr/bin/gcc-4.5 | ||
| 23 | CFLAGS=-Wall -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include | ||
| 24 | CXXFLAGS=$(CFLAGS) | ||
| 25 | LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg -lrt | ||
| 26 | @@ -33,7 +33,7 @@ endif | ||
| 27 | all: slim | ||
| 28 | |||
| 29 | slim: $(OBJECTS) | ||
| 30 | - $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME) | ||
| 31 | + $(CXX) $(OBJECTS) $(LDFLAGS) -o $(NAME) | ||
| 32 | |||
| 33 | .cpp.o: | ||
| 34 | $(CXX) $(CXXFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@ | ||
| 35 | -- | ||
| 36 | 1.6.6.1 | ||
| 37 | |||
diff --git a/meta-oe/recipes-graphics/slim/slim/0004-Add-support-libpng15.patch b/meta-oe/recipes-graphics/slim/slim/0004-Add-support-libpng15.patch deleted file mode 100644 index f2087c0103..0000000000 --- a/meta-oe/recipes-graphics/slim/slim/0004-Add-support-libpng15.patch +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | From c2067e8c16bfb721d339718ae0c99c70a994936b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: iwamatsu <iwamatsu@7c53e7cc-98ea-0310-8f1f-a0b24da60408> | ||
| 3 | Date: Fri, 17 Jun 2011 20:35:07 +0000 | ||
| 4 | Subject: [PATCH 4/8] Add support libpng15 | ||
| 5 | |||
| 6 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
| 7 | |||
| 8 | git-svn-id: svn://svn.berlios.de/slim/trunk@178 7c53e7cc-98ea-0310-8f1f-a0b24da60408 | ||
| 9 | --- | ||
| 10 | Makefile | 4 ++-- | ||
| 11 | png.c | 6 +++++- | ||
| 12 | 2 files changed, 7 insertions(+), 3 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/Makefile b/Makefile | ||
| 15 | index fafa0ef..1202614 100644 | ||
| 16 | --- a/Makefile | ||
| 17 | +++ b/Makefile | ||
| 18 | @@ -5,9 +5,9 @@ | ||
| 19 | ####################################################### | ||
| 20 | CXX=/usr/bin/g++ | ||
| 21 | CC=/usr/bin/gcc-4.5 | ||
| 22 | -CFLAGS=-Wall -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include | ||
| 23 | +CFLAGS=-Wall -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include | ||
| 24 | CXXFLAGS=$(CFLAGS) | ||
| 25 | -LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg -lrt | ||
| 26 | +LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -lcrypt -lXmu -lpng -ljpeg -lrt | ||
| 27 | CUSTOM=-DHAVE_SHADOW | ||
| 28 | ifdef USE_PAM | ||
| 29 | LDFLAGS+= -lpam | ||
| 30 | diff --git a/png.c b/png.c | ||
| 31 | index 5c086c6..aa0f5e5 100644 | ||
| 32 | --- a/png.c | ||
| 33 | +++ b/png.c | ||
| 34 | @@ -57,8 +57,12 @@ read_png(const char *filename, int *width, int *height, unsigned char **rgb, | ||
| 35 | png_destroy_read_struct(&png_ptr, (png_infopp) NULL, | ||
| 36 | (png_infopp) NULL); | ||
| 37 | } | ||
| 38 | - | ||
| 39 | + | ||
| 40 | +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 | ||
| 41 | + if (setjmp(png_jmpbuf((data->png_ptr)))) | ||
| 42 | +#else | ||
| 43 | if (setjmp(png_ptr->jmpbuf)) | ||
| 44 | +#endif | ||
| 45 | goto png_destroy; | ||
| 46 | |||
| 47 | png_init_io(png_ptr, infile); | ||
| 48 | -- | ||
| 49 | 1.6.6.1 | ||
| 50 | |||
diff --git a/meta-oe/recipes-graphics/slim/slim/0005-Remove-path-of-gcc-amd-g-and-version-of-g.patch b/meta-oe/recipes-graphics/slim/slim/0005-Remove-path-of-gcc-amd-g-and-version-of-g.patch deleted file mode 100644 index 566ae355e7..0000000000 --- a/meta-oe/recipes-graphics/slim/slim/0005-Remove-path-of-gcc-amd-g-and-version-of-g.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | From 4f69eb1aa85fbb395a0474b1f376505fab81ee22 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: iwamatsu <iwamatsu@7c53e7cc-98ea-0310-8f1f-a0b24da60408> | ||
| 3 | Date: Fri, 17 Jun 2011 20:35:10 +0000 | ||
| 4 | Subject: [PATCH 5/8] Remove path of gcc amd g++, and version of g++ | ||
| 5 | |||
| 6 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
| 7 | |||
| 8 | git-svn-id: svn://svn.berlios.de/slim/trunk@179 7c53e7cc-98ea-0310-8f1f-a0b24da60408 | ||
| 9 | --- | ||
| 10 | Makefile | 4 ++-- | ||
| 11 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/Makefile b/Makefile | ||
| 14 | index 1202614..5c5fde1 100644 | ||
| 15 | --- a/Makefile | ||
| 16 | +++ b/Makefile | ||
| 17 | @@ -3,8 +3,8 @@ | ||
| 18 | # Edit the following section to adjust the options | ||
| 19 | # to fit into your operating system / distribution | ||
| 20 | ####################################################### | ||
| 21 | -CXX=/usr/bin/g++ | ||
| 22 | -CC=/usr/bin/gcc-4.5 | ||
| 23 | +CXX=g++ | ||
| 24 | +CC=gcc | ||
| 25 | CFLAGS=-Wall -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include | ||
| 26 | CXXFLAGS=$(CFLAGS) | ||
| 27 | LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -lcrypt -lXmu -lpng -ljpeg -lrt | ||
| 28 | -- | ||
| 29 | 1.6.6.1 | ||
| 30 | |||
diff --git a/meta-oe/recipes-graphics/slim/slim/0006-Remove-localhost-from-Authenticator-of-pam.patch b/meta-oe/recipes-graphics/slim/slim/0006-Remove-localhost-from-Authenticator-of-pam.patch deleted file mode 100644 index a5b812584c..0000000000 --- a/meta-oe/recipes-graphics/slim/slim/0006-Remove-localhost-from-Authenticator-of-pam.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From e188d5fd3e3c0e40c3e35729fd8b81b138191a75 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: iwamatsu <iwamatsu@7c53e7cc-98ea-0310-8f1f-a0b24da60408> | ||
| 3 | Date: Fri, 17 Jun 2011 20:35:13 +0000 | ||
| 4 | Subject: [PATCH 6/8] Remove localhost from Authenticator of pam | ||
| 5 | |||
| 6 | http://bugs.gentoo.org/346037 | ||
| 7 | https://developer.berlios.de/bugs/?func=detailbug&bug_id=17757&group_id=2663 | ||
| 8 | http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-misc/slim/files/346037-stop_setting_host_for_pam_ck_connector_so.patch?view=log | ||
| 9 | |||
| 10 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
| 11 | |||
| 12 | git-svn-id: svn://svn.berlios.de/slim/trunk@180 7c53e7cc-98ea-0310-8f1f-a0b24da60408 | ||
| 13 | --- | ||
| 14 | app.cpp | 2 -- | ||
| 15 | 1 files changed, 0 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/app.cpp b/app.cpp | ||
| 18 | index c80a73e..7177363 100644 | ||
| 19 | --- a/app.cpp | ||
| 20 | +++ b/app.cpp | ||
| 21 | @@ -236,8 +236,6 @@ void App::Run() { | ||
| 22 | pam.start("slim"); | ||
| 23 | pam.set_item(PAM::Authenticator::TTY, DisplayName); | ||
| 24 | pam.set_item(PAM::Authenticator::Requestor, "root"); | ||
| 25 | - pam.set_item(PAM::Authenticator::Host, "localhost"); | ||
| 26 | - | ||
| 27 | } | ||
| 28 | catch(PAM::Exception& e){ | ||
| 29 | cerr << APPNAME << ": " << e << endl; | ||
| 30 | -- | ||
| 31 | 1.6.6.1 | ||
| 32 | |||
diff --git a/meta-oe/recipes-graphics/slim/slim/0007-Fix-tty-slowness.patch b/meta-oe/recipes-graphics/slim/slim/0007-Fix-tty-slowness.patch deleted file mode 100644 index fa2502bf05..0000000000 --- a/meta-oe/recipes-graphics/slim/slim/0007-Fix-tty-slowness.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | From da172fd6234b3b2b487ab36d63da72758829cb1d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: iwamatsu <iwamatsu@7c53e7cc-98ea-0310-8f1f-a0b24da60408> | ||
| 3 | Date: Fri, 17 Jun 2011 20:35:15 +0000 | ||
| 4 | Subject: [PATCH 7/8] Fix tty slowness | ||
| 5 | |||
| 6 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
| 7 | |||
| 8 | git-svn-id: svn://svn.berlios.de/slim/trunk@181 7c53e7cc-98ea-0310-8f1f-a0b24da60408 | ||
| 9 | --- | ||
| 10 | app.cpp | 10 ++++++---- | ||
| 11 | 1 files changed, 6 insertions(+), 4 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/app.cpp b/app.cpp | ||
| 14 | index 7177363..44ab099 100644 | ||
| 15 | --- a/app.cpp | ||
| 16 | +++ b/app.cpp | ||
| 17 | @@ -278,21 +278,23 @@ void App::Run() { | ||
| 18 | signal(SIGALRM, AlarmSignal); | ||
| 19 | |||
| 20 | #ifndef XNEST_DEBUG | ||
| 21 | - OpenLog(); | ||
| 22 | - | ||
| 23 | if (!force_nodaemon && cfg->getOption("daemon") == "yes") { | ||
| 24 | daemonmode = true; | ||
| 25 | } | ||
| 26 | |||
| 27 | // Daemonize | ||
| 28 | if (daemonmode) { | ||
| 29 | - if (daemon(0, 1) == -1) { | ||
| 30 | + if (daemon(0, 0) == -1) { | ||
| 31 | cerr << APPNAME << ": " << strerror(errno) << endl; | ||
| 32 | exit(ERR_EXIT); | ||
| 33 | } | ||
| 34 | - UpdatePid(); | ||
| 35 | } | ||
| 36 | |||
| 37 | + OpenLog(); | ||
| 38 | + | ||
| 39 | + if (daemonmode) | ||
| 40 | + UpdatePid(); | ||
| 41 | + | ||
| 42 | CreateServerAuth(); | ||
| 43 | StartServer(); | ||
| 44 | alarm(2); | ||
| 45 | -- | ||
| 46 | 1.6.6.1 | ||
| 47 | |||
diff --git a/meta-oe/recipes-graphics/slim/slim/0008-restart-Xserver-if-killed.patch b/meta-oe/recipes-graphics/slim/slim/0008-restart-Xserver-if-killed.patch deleted file mode 100644 index 0c5cfb742f..0000000000 --- a/meta-oe/recipes-graphics/slim/slim/0008-restart-Xserver-if-killed.patch +++ /dev/null | |||
| @@ -1,161 +0,0 @@ | |||
| 1 | From ee77a3d154443d2823ecbf2141daa1b5924f629f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: iwamatsu <iwamatsu@7c53e7cc-98ea-0310-8f1f-a0b24da60408> | ||
| 3 | Date: Fri, 17 Jun 2011 20:38:34 +0000 | ||
| 4 | Subject: [PATCH 8/8] restart Xserver if killed | ||
| 5 | |||
| 6 | Patch from http://developer.berlios.de/patch/?func=detailpatch&patch_id=2378&group_id=2663. | ||
| 7 | |||
| 8 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | ||
| 9 | |||
| 10 | git-svn-id: svn://svn.berlios.de/slim/trunk@182 7c53e7cc-98ea-0310-8f1f-a0b24da60408 | ||
| 11 | --- | ||
| 12 | app.cpp | 36 +++++++++--------------------------- | ||
| 13 | app.h | 2 +- | ||
| 14 | 2 files changed, 10 insertions(+), 28 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/app.cpp b/app.cpp | ||
| 17 | index 44ab099..358a98f 100644 | ||
| 18 | --- a/app.cpp | ||
| 19 | +++ b/app.cpp | ||
| 20 | @@ -104,6 +104,11 @@ int conv(int num_msg, const struct pam_message **msg, | ||
| 21 | |||
| 22 | extern App* LoginApp; | ||
| 23 | |||
| 24 | +int xioerror(Display *disp) { | ||
| 25 | + LoginApp->RestartServer(); | ||
| 26 | + return 0; | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | void CatchSignal(int sig) { | ||
| 30 | cerr << APPNAME << ": unexpected signal " << sig << endl; | ||
| 31 | |||
| 32 | @@ -114,19 +119,6 @@ void CatchSignal(int sig) { | ||
| 33 | exit(ERR_EXIT); | ||
| 34 | } | ||
| 35 | |||
| 36 | - | ||
| 37 | -void AlarmSignal(int sig) { | ||
| 38 | - int pid = LoginApp->GetServerPID(); | ||
| 39 | - if(waitpid(pid, NULL, WNOHANG) == pid) { | ||
| 40 | - LoginApp->StopServer(); | ||
| 41 | - LoginApp->RemoveLock(); | ||
| 42 | - exit(OK_EXIT); | ||
| 43 | - } | ||
| 44 | - signal(sig, AlarmSignal); | ||
| 45 | - alarm(2); | ||
| 46 | -} | ||
| 47 | - | ||
| 48 | - | ||
| 49 | void User1Signal(int sig) { | ||
| 50 | signal(sig, User1Signal); | ||
| 51 | } | ||
| 52 | @@ -275,7 +267,6 @@ void App::Run() { | ||
| 53 | signal(SIGHUP, CatchSignal); | ||
| 54 | signal(SIGPIPE, CatchSignal); | ||
| 55 | signal(SIGUSR1, User1Signal); | ||
| 56 | - signal(SIGALRM, AlarmSignal); | ||
| 57 | |||
| 58 | #ifndef XNEST_DEBUG | ||
| 59 | if (!force_nodaemon && cfg->getOption("daemon") == "yes") { | ||
| 60 | @@ -297,7 +288,6 @@ void App::Run() { | ||
| 61 | |||
| 62 | CreateServerAuth(); | ||
| 63 | StartServer(); | ||
| 64 | - alarm(2); | ||
| 65 | #endif | ||
| 66 | |||
| 67 | } | ||
| 68 | @@ -613,6 +603,8 @@ void App::Login() { | ||
| 69 | int status; | ||
| 70 | while (wpid != pid) { | ||
| 71 | wpid = wait(&status); | ||
| 72 | + if (wpid == ServerPID) | ||
| 73 | + xioerror(Dpy); // Server died, simulate IO error | ||
| 74 | } | ||
| 75 | if (WIFEXITED(status) && WEXITSTATUS(status)) { | ||
| 76 | LoginPanel->Message("Failed to execute login command"); | ||
| 77 | @@ -658,9 +650,6 @@ void App::Login() { | ||
| 78 | |||
| 79 | |||
| 80 | void App::Reboot() { | ||
| 81 | - // Stop alarm clock | ||
| 82 | - alarm(0); | ||
| 83 | - | ||
| 84 | #ifdef USE_PAM | ||
| 85 | try{ | ||
| 86 | pam.end(); | ||
| 87 | @@ -683,9 +672,6 @@ void App::Reboot() { | ||
| 88 | |||
| 89 | |||
| 90 | void App::Halt() { | ||
| 91 | - // Stop alarm clock | ||
| 92 | - alarm(0); | ||
| 93 | - | ||
| 94 | #ifdef USE_PAM | ||
| 95 | try{ | ||
| 96 | pam.end(); | ||
| 97 | @@ -771,6 +757,7 @@ void App::RestartServer() { | ||
| 98 | |||
| 99 | StopServer(); | ||
| 100 | RemoveLock(); | ||
| 101 | + while (waitpid(-1, NULL, WNOHANG) > 0); // Collects all dead childrens | ||
| 102 | Run(); | ||
| 103 | } | ||
| 104 | |||
| 105 | @@ -841,6 +828,7 @@ int App::WaitForServer() { | ||
| 106 | |||
| 107 | for(cycles = 0; cycles < ncycles; cycles++) { | ||
| 108 | if((Dpy = XOpenDisplay(DisplayName))) { | ||
| 109 | + XSetIOErrorHandler(xioerror); | ||
| 110 | return 1; | ||
| 111 | } else { | ||
| 112 | if(!ServerTimeout(1, (char *) "X server to begin accepting connections")) | ||
| 113 | @@ -925,9 +913,6 @@ int App::StartServer() { | ||
| 114 | ServerPID = -1; | ||
| 115 | break; | ||
| 116 | } | ||
| 117 | - alarm(15); | ||
| 118 | - pause(); | ||
| 119 | - alarm(0); | ||
| 120 | |||
| 121 | // Wait for server to start up | ||
| 122 | if(WaitForServer() == 0) { | ||
| 123 | @@ -962,15 +947,12 @@ int IgnoreXIO(Display *d) { | ||
| 124 | |||
| 125 | |||
| 126 | void App::StopServer() { | ||
| 127 | - // Stop alars clock and ignore signals | ||
| 128 | - alarm(0); | ||
| 129 | signal(SIGQUIT, SIG_IGN); | ||
| 130 | signal(SIGINT, SIG_IGN); | ||
| 131 | signal(SIGHUP, SIG_IGN); | ||
| 132 | signal(SIGPIPE, SIG_IGN); | ||
| 133 | signal(SIGTERM, SIG_DFL); | ||
| 134 | signal(SIGKILL, SIG_DFL); | ||
| 135 | - signal(SIGALRM, SIG_DFL); | ||
| 136 | |||
| 137 | // Catch X error | ||
| 138 | XSetIOErrorHandler(IgnoreXIO); | ||
| 139 | diff --git a/app.h b/app.h | ||
| 140 | index dd7c281..2db1038 100644 | ||
| 141 | --- a/app.h | ||
| 142 | +++ b/app.h | ||
| 143 | @@ -34,6 +34,7 @@ public: | ||
| 144 | ~App(); | ||
| 145 | void Run(); | ||
| 146 | int GetServerPID(); | ||
| 147 | + void RestartServer(); | ||
| 148 | void StopServer(); | ||
| 149 | |||
| 150 | bool serverStarted; | ||
| 151 | @@ -49,7 +50,6 @@ private: | ||
| 152 | void Console(); | ||
| 153 | void Exit(); | ||
| 154 | void KillAllClients(Bool top); | ||
| 155 | - void RestartServer(); | ||
| 156 | void ReadConfig(); | ||
| 157 | void OpenLog(); | ||
| 158 | void CloseLog(); | ||
| 159 | -- | ||
| 160 | 1.6.6.1 | ||
| 161 | |||
diff --git a/meta-oe/recipes-graphics/slim/slim_1.3.2.bb b/meta-oe/recipes-graphics/slim/slim_1.3.2.bb deleted file mode 100644 index 2fbdcab46e..0000000000 --- a/meta-oe/recipes-graphics/slim/slim_1.3.2.bb +++ /dev/null | |||
| @@ -1,82 +0,0 @@ | |||
| 1 | DESCRIPTION="Simple Login Manager" | ||
| 2 | HOMEPAGE="http://slim.berlios.de" | ||
| 3 | LICENSE = "GPLv2+" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" | ||
| 5 | |||
| 6 | PR = "r1" | ||
| 7 | |||
| 8 | DEPENDS = "virtual/libx11 libxmu libpng jpeg freetype sessreg ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
| 9 | |||
| 10 | SRC_URI = " \ | ||
| 11 | http://download.berlios.de/${BPN}/${BP}.tar.gz \ | ||
| 12 | file://0002-Fix-image-handling-integer-overflows.patch \ | ||
| 13 | file://0003-Fix-build-failure-with-ld-as-needed.patch \ | ||
| 14 | file://0004-Add-support-libpng15.patch \ | ||
| 15 | file://0005-Remove-path-of-gcc-amd-g-and-version-of-g.patch \ | ||
| 16 | file://0006-Remove-localhost-from-Authenticator-of-pam.patch \ | ||
| 17 | file://0007-Fix-tty-slowness.patch \ | ||
| 18 | file://0008-restart-Xserver-if-killed.patch \ | ||
| 19 | file://slim-dynwm \ | ||
| 20 | file://update_slim_wmlist \ | ||
| 21 | file://Makefile.oe \ | ||
| 22 | file://slim.pamd \ | ||
| 23 | file://slim.service \ | ||
| 24 | " | ||
| 25 | |||
| 26 | SRC_URI[md5sum] = "ca1ae6120e6f4b4969f2d6cf94f47b42" | ||
| 27 | SRC_URI[sha256sum] = "f1560125005f253b9b88220598fed7a9575ef405716862c6ca3fcc72dbd482b8" | ||
| 28 | |||
| 29 | |||
| 30 | EXTRA_OEMAKE += " \ | ||
| 31 | USE_PAM=${@bb.utils.contains('DISTRO_FEATURES', 'pam', '1', '0', d)} \ | ||
| 32 | PREFIX=${prefix} \ | ||
| 33 | CFGDIR=${sysconfdir} \ | ||
| 34 | MANDIR=${mandir} \ | ||
| 35 | DESTDIR=${D} \ | ||
| 36 | CFLAGS+=-I${STAGING_INCDIR}/freetype2 \ | ||
| 37 | CXXFLAGS+=-I${STAGING_INCDIR}/freetype2 \ | ||
| 38 | " | ||
| 39 | |||
| 40 | do_compile_prepend() { | ||
| 41 | cp -pP ${WORKDIR}/Makefile.oe ${S}/Makefile | ||
| 42 | } | ||
| 43 | |||
| 44 | do_install() { | ||
| 45 | oe_runmake install | ||
| 46 | install -d ${D}${bindir} | ||
| 47 | install -m 0755 ${WORKDIR}/slim-dynwm ${D}${bindir}/ | ||
| 48 | install -m 0755 ${WORKDIR}/update_slim_wmlist ${D}${bindir}/ | ||
| 49 | install -d ${D}${sysconfdir}/pam.d/ | ||
| 50 | install -m 0644 ${WORKDIR}/slim.pamd ${D}${sysconfdir}/pam.d/slim | ||
| 51 | |||
| 52 | install -d ${D}${systemd_unitdir}/system/ | ||
| 53 | install -m 0644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system/ | ||
| 54 | |||
| 55 | echo 'sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf | ||
| 56 | echo 'sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf | ||
| 57 | } | ||
| 58 | |||
| 59 | |||
| 60 | RDEPENDS_${PN} = "perl xauth freetype sessreg " | ||
| 61 | FILES_${PN} += "${systemd_unitdir}/system/" | ||
| 62 | |||
| 63 | pkg_postinst_${PN} () { | ||
| 64 | if test "x$D" != "x"; then | ||
| 65 | exit 1 | ||
| 66 | fi | ||
| 67 | systemctl enable slim.service | ||
| 68 | |||
| 69 | # Register SLiM as default DM | ||
| 70 | mkdir -p ${sysconfdir}/X11/ | ||
| 71 | echo "${bindir}/slim" > ${sysconfdir}/X11/default-display-manager | ||
| 72 | } | ||
| 73 | |||
| 74 | pkg_postrm_${PN} () { | ||
| 75 | if test "x$D" != "x"; then | ||
| 76 | exit 1 | ||
| 77 | fi | ||
| 78 | systemctl disable slim.service | ||
| 79 | sed -i /slim/d $D${sysconfdir}/X11/default-display-manager || true | ||
| 80 | } | ||
| 81 | |||
| 82 | PNBLACKLIST[slim] ?= "does not build with distroless qemuarm as reported in 'State of bitbake world' thread, nobody volunteered to fix them - the recipe will be removed on 2017-09-01 unless the issue is fixed" | ||
