Hello community, here is the log from the commit of package libjpeg-turbo for openSUSE:Factory checked in at 2011-11-16 17:18:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libjpeg-turbo (Old) and /work/SRC/openSUSE:Factory/.libjpeg-turbo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libjpeg-turbo", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/libjpeg-turbo/libjpeg-turbo.changes 2011-09-23 02:08:38.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libjpeg-turbo.new/libjpeg-turbo.changes 2011-11-16 17:19:26.000000000 +0100 @@ -1,0 +2,6 @@ +Sat Nov 12 22:54:58 UTC 2011 - [email protected] + +- Open all file descriptors with O_CLOEXEC, extended description + in the patch file. + +------------------------------------------------------------------- New: ---- libjpeg-ocloexec.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libjpeg-turbo.spec ++++++ --- /var/tmp/diff_new_pack.DpLWbA/_old 2011-11-16 17:19:28.000000000 +0100 +++ /var/tmp/diff_new_pack.DpLWbA/_new 2011-11-16 17:19:28.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package jpeg-turbo +# spec file for package libjpeg-turbo # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,7 +33,7 @@ Release: 1 Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files Url: http://sourceforge.net/projects/libjpeg-turbo -BuildRequires: nasm gcc-c++ +BuildRequires: gcc-c++ nasm Provides: jpeg = %{version} Obsoletes: jpeg Conflicts: jpeg%{major} @@ -41,6 +41,7 @@ Source1: baselibs.conf Patch0: %{name}-%{version}-int32.patch Patch1: %{name}-%{version}-tiff-ojpeg.patch +Patch2: libjpeg-ocloexec.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -49,10 +50,11 @@ %package -n libjpeg%{major} - License: BSD3c(or similar) Summary: The MMX/SSE accelerated JPEG compression/decompression library Version: %{libver} + + Provides: libjpeg6 = %{version} Obsoletes: libjpeg6 Group: System/Libraries @@ -77,6 +79,8 @@ License: BSD3c(or similar) Summary: Development Tools for applications which will use the Libjpeg Library Version: %{libver} + + Group: Development/Libraries/C and C++ Requires: libjpeg%{major} = %{version} Provides: libjpeg-devel = %{version} @@ -99,6 +103,7 @@ %setup -q %patch0 %patch1 +%patch2 %build autoreconf -fiv ++++++ libjpeg-ocloexec.patch ++++++ This patch causes libjpeg to open all files with O_CLOEXEC the "e" fopen mode is a glibc/linux specific feature hence not suitable for other OS. Note that it is NOT HANDLED GRACEFULLY on kernels older than 2.6.23 or glibc < 2.7.x and WILL segfault. The other alternative, using fcntl with FD_CLOEXEC is NOT enough to prevent race conditions. --- wrjpgcom.c.orig +++ wrjpgcom.c @@ -35,15 +35,15 @@ extern void * malloc (); #endif #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" +#define READ_BINARY "re" +#define WRITE_BINARY "we" #else #ifdef VMS /* VMS is very nonstandard */ #define READ_BINARY "rb", "ctx=stm" #define WRITE_BINARY "wb", "ctx=stm" #else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" +#define READ_BINARY "rbe" +#define WRITE_BINARY "wbe" #endif #endif @@ -439,7 +439,7 @@ main (int argc, char **argv) keep_COM = 0; } else if (keymatch(arg, "cfile", 2)) { if (++argn >= argc) usage(); - if ((comment_file = fopen(argv[argn], "r")) == NULL) { + if ((comment_file = fopen(argv[argn], READ_BINARY)) == NULL) { fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); exit(EXIT_FAILURE); } --- cdjpeg.h.orig +++ cdjpeg.h @@ -156,15 +156,15 @@ EXTERN(FILE *) write_stdout JPP((void)); /* miscellaneous useful macros */ #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" +#define READ_BINARY "re" +#define WRITE_BINARY "we" #else #ifdef VMS /* VMS is very nonstandard */ #define READ_BINARY "rb", "ctx=stm" #define WRITE_BINARY "wb", "ctx=stm" #else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" +#define READ_BINARY "rbe" +#define WRITE_BINARY "wbe" #endif #endif --- rdswitch.c.orig +++ rdswitch.c @@ -92,7 +92,7 @@ read_quant_tables (j_compress_ptr cinfo, long val; unsigned int table[DCTSIZE2]; - if ((fp = fopen(filename, "r")) == NULL) { + if ((fp = fopen(filename, READ_BINARY)) == NULL) { fprintf(stderr, "Can't open table file %s\n", filename); return FALSE; } @@ -190,7 +190,7 @@ read_scan_script (j_compress_ptr cinfo, #define MAX_SCANS 100 /* quite arbitrary limit */ jpeg_scan_info scans[MAX_SCANS]; - if ((fp = fopen(filename, "r")) == NULL) { + if ((fp = fopen(filename, READ_BINARY)) == NULL) { fprintf(stderr, "Can't open scan definition file %s\n", filename); return FALSE; } --- bmp.c.orig +++ bmp.c @@ -257,7 +257,7 @@ int saveppm(char *filename, unsigned cha FILE *fs=NULL; int retcode=0; unsigned char *tempbuf=NULL; - if((fs=fopen(filename, "wb"))==NULL) _throw(strerror(errno)); + if((fs=fopen(filename, "wbe"))==NULL) _throw(strerror(errno)); if(fprintf(fs, "P6\n")<1) _throw("Write error"); if(fprintf(fs, "%d %d\n", w, h)<1) _throw("Write error"); if(fprintf(fs, "255\n")<1) _throw("Write error"); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
