From 78d8e8e20e9c124f63279a70b86764f844a44385 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 6 Nov 2009 14:33:47 +0000 Subject: [PATCH 01/22] - cleanup/uncruftify .spec --- GraphicsMagick.spec | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 3d1cdaf..ffd55f5 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -2,7 +2,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.7 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -101,27 +101,24 @@ mv -f ChangeLog.utf8 ChangeLog # Avoid lib64 rpaths (FIXME: recheck this on newer releases) %if "%{_libdir}" != "/usr/lib" -sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure +sed -i.rpath -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure %endif %build -%configure --enable-shared \ +%configure --enable-shared --disable-static \ + --with-lcms \ + --with-magick_plus_plus \ --with-modules \ --with-perl \ - --with-x \ + --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix}" \ --with-threads \ - --with-magick_plus_plus \ - --without-gslib \ + --with-windows-font-dir=%{_datadir}/fonts/default/TrueType \ --with-wmf \ - --with-lcms \ + --with-x \ --with-xml \ - --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \ - --with-windows-font-dir=%{_datadir}/fonts/default/TrueType \ - --without-dps - -# Avoid bogus RPATHs on x86_64 -sed -i.rpath -e 's|^sys_lib_dlsearch_path_spec="/lib /usr/lib|sys_lib_dlsearch_path_spec="/%{_lib} %{_libdir}|' libtool + --without-dps \ + --without-gslib make %{?_smp_mflags} make %{?_smp_mflags} perl-build @@ -136,9 +133,9 @@ make install DESTDIR=%{buildroot} -C PerlMagick # perlmagick: fix perl path of demo files %{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl -find %{buildroot} -name "*.bs" |xargs rm -f -find %{buildroot} -name ".packlist" |xargs rm -f -find %{buildroot} -name "perllocal.pod" |xargs rm -f +find %{buildroot} -name "*.bs" |xargs rm -fv +find %{buildroot} -name ".packlist" |xargs rm -fv +find %{buildroot} -name "perllocal.pod" |xargs rm -fv chmod 755 %{buildroot}%{perl_vendorarch}/auto/Graphics/Magick/Magick.so @@ -158,9 +155,7 @@ fi rm -rf %{buildroot}%{_datadir}/GraphicsMagick # Keep config rm -rf %{buildroot}%{_datadir}/%{name}-%{version}/[a-b,d-z,A-Z]* -rm -rf %{buildroot}%{_libdir}/libltdl.* -rm -f %{buildroot}%{_libdir}/GraphicsMagick-*/modules*/*/*.a -rm -f %{buildroot}%{_libdir}/*.{a,la} +rm -vf %{buildroot}%{_libdir}/lib*.la # fix multilib issues %ifarch x86_64 s390x ia64 ppc64 sparc64 @@ -247,6 +242,9 @@ rm -rf %{buildroot} %changelog +* Fri Nov 06 2009 Rex Dieter - 1.3.7-2 +- cleanup/uncruftify .spec + * Thu Sep 17 2009 Rex Dieter - 1.3.7-1 - GraphicsMagick-1.3.7 From a557b18dc819a080254271b5659474a69793fc62 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:02:31 +0000 Subject: [PATCH 02/22] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 010a756..3dfe097 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: GraphicsMagick -# $Id$ +# $Id: Makefile,v 1.1 2006/11/27 13:36:30 ixs Exp $ NAME := GraphicsMagick SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 949479d5ae2eb4526c671c6bb94b92860e899468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Kasal?= Date: Sun, 6 Dec 2009 23:10:19 +0000 Subject: [PATCH 03/22] - rebuild against perl 5.10.1 --- GraphicsMagick.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index ffd55f5..282330f 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -2,7 +2,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.7 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -242,6 +242,9 @@ rm -rf %{buildroot} %changelog +* Fri Dec 4 2009 Stepan Kasal - 1.3.7-3 +- rebuild against perl 5.10.1 + * Fri Nov 06 2009 Rex Dieter - 1.3.7-2 - cleanup/uncruftify .spec From 1a933201d712701ddafde917ba4e7b6362a34a9a Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 28 Dec 2009 23:52:32 +0000 Subject: [PATCH 04/22] - CVE-2009-1882 (#503017) --- GraphicsMagick-CVE-2009-1882.patch | 482 +++++++++++++++++++++++++++++ GraphicsMagick.spec | 24 +- 2 files changed, 503 insertions(+), 3 deletions(-) create mode 100644 GraphicsMagick-CVE-2009-1882.patch diff --git a/GraphicsMagick-CVE-2009-1882.patch b/GraphicsMagick-CVE-2009-1882.patch new file mode 100644 index 0000000..04c2403 --- /dev/null +++ b/GraphicsMagick-CVE-2009-1882.patch @@ -0,0 +1,482 @@ +--- GraphicsMagick/magick/xwindow.c 2009/09/16 02:13:01 1.230 ++++ GraphicsMagick/magick/xwindow.c 2009/10/10 17:55:17 1.232 +@@ -43,10 +43,12 @@ + #include "magick/describe.h" + #include "magick/log.h" + #include "magick/magick.h" ++#include "magick/monitor.h" + #include "magick/pixel_cache.h" + #include "magick/resize.h" + #include "magick/shear.h" + #include "magick/tempfile.h" ++#include "magick/texture.h" + #include "magick/transform.h" + #include "magick/utility.h" + #include "magick/version.h" +@@ -2937,7 +2939,7 @@ MagickExport void MagickXGetImportInfo(M + % % + % % + % % +-% M a g i c k X G e t P i x e l I n f o % ++% M a g i c k X G e t P i x e l P a c k e t % + % % + % % + % % +@@ -5350,8 +5352,8 @@ MagickExport Cursor MagickXMakeCursor(Di + % The format of the MagickXMakeImage method is: + % + % unsigned int MagickXMakeImage(Display *display, +-% const MagickXResourceInfo *resource_info,MagickXWindowInfo *window,Image *image, +-% unsigned int width,unsigned int height) ++% const MagickXResourceInfo *resource_info,MagickXWindowInfo *window, ++% Image *image,unsigned int width,unsigned int height) + % + % A description of each parameter follows: + % +@@ -5376,9 +5378,49 @@ MagickExport Cursor MagickXMakeCursor(Di + % + % + */ +-MagickExport unsigned int MagickXMakeImage(Display *display, +- const MagickXResourceInfo *resource_info,MagickXWindowInfo *window,Image *image, +- unsigned int width,unsigned int height) ++static const char * ++MagickXImageFormatToString(int xformat) ++{ ++ static const char ++ *formats[] = ++ { ++ "XYBitmap", ++ "XYPixmap", ++ "ZPixmap" ++ }; ++ ++ const char ++ *format = "Unknown"; ++ ++ if ((size_t) xformat < sizeof(formats)/sizeof(formats[0])) ++ format=formats[xformat]; ++ ++ return format; ++} ++static const char * ++MagickXByteOrderToString(int xbyte_order) ++{ ++ static const char ++ *byte_orders[] = ++ { ++ "LSBFirst", ++ "MSBFirst" ++ }; ++ ++ const char ++ *byte_order = "Unknown"; ++ ++ if ((size_t) xbyte_order < sizeof(byte_orders)/sizeof(byte_orders[0])) ++ byte_order=byte_orders[xbyte_order]; ++ ++ return byte_order; ++} ++MagickExport unsigned int ++MagickXMakeImage(Display *display, ++ const MagickXResourceInfo *resource_info, ++ MagickXWindowInfo *window, ++ Image *image, ++ unsigned int width,unsigned int height) + { + int + depth, +@@ -5410,6 +5452,10 @@ MagickExport unsigned int MagickXMakeIma + window->destroy=False; + if (window->image != (Image *) NULL) + { ++ MonitorHandler ++ handler=(MonitorHandler) NULL; ++ ++ handler=SetMonitorHandler((MonitorHandler) NULL); + if (window->crop_geometry) + { + Image +@@ -5459,44 +5505,49 @@ MagickExport unsigned int MagickXMakeIma + window->destroy=MagickTrue; + } + } +-#if 0 +- if ((window->immutable == MagickFalse) && +- (window->image->matte != MagickFalse) && +- (window->pixel_info->colors == 0)) ++ if ((window->image->matte != MagickFalse) && ++ (window->pixel_info->colors == 0) ++ /* && (window->immutable == MagickFalse) */) + { + Image + *texture; + + /* +- Tile background with texture. ++ Tile background with texture according to opacity + */ +- strlcpy(resource_info->image_info->filename,"image:checkerboard",MaxTextExtent); ++ strlcpy(resource_info->image_info->filename,"image:checkerboard", ++ sizeof(resource_info->image_info->filename)); + texture=ReadImage(resource_info->image_info,&window->image->exception); + if (texture != (Image *) NULL) + { + Image + *textured_image; + +- textured_image=CloneImage(window->image,window->image->columns, +- window->image->rows,MagickTrue,&window->image->exception); ++ textured_image=CloneImage(window->image,0,0,MagickTrue, ++ &window->image->exception); + if (textured_image != (Image *) NULL) + { +-/* strlcpy(window->image->filename,"textured_image.miff", MaxTextExtent); */ +-/* WriteImage(resource_info->image_info,window->image); */ +- TextureImage(textured_image,texture); +- textured_image->matte=MagickFalse; +- if (window->image != image) +- DestroyImage(window->image); +- window->image=textured_image; +- window->destroy=MagickTrue; ++ if (TextureImage(textured_image,texture) != MagickFail) ++ { ++ if (window->image != image) ++ DestroyImage(window->image); ++ window->image=textured_image; ++ window->destroy=MagickTrue; ++ } ++ else ++ { ++ DestroyImage(textured_image); ++ } + } + DestroyImage(texture); + texture=(Image *) NULL; + } + } +-#endif + width=(unsigned int) window->image->columns; ++ assert(width == window->image->columns); + height=(unsigned int) window->image->rows; ++ assert(height == window->image->rows); ++ (void) SetMonitorHandler(handler); + } + /* + Create X image. +@@ -5504,27 +5555,32 @@ MagickExport unsigned int MagickXMakeIma + ximage=(XImage *) NULL; + format=(depth == 1) ? XYBitmap : ZPixmap; + #if defined(HasSharedMemory) +- window->shared_memory&=XShmQueryExtension(display); ++ window->shared_memory &= XShmQueryExtension(display); + if (window->shared_memory) + { + XShmSegmentInfo + *segment_info; + ++ size_t ++ shm_extent; ++ + segment_info=(XShmSegmentInfo *) window->segment_info; + segment_info[1].shmid=(-1); + segment_info[1].shmaddr=NULL; + ximage=XShmCreateImage(display,window->visual,depth,format,(char *) NULL, +- &segment_info[1],width,height); +- window->shared_memory&=(ximage != (XImage *) NULL); ++ &segment_info[1],width,height); ++ window->shared_memory &= (ximage != (XImage *) NULL); ++ ++ shm_extent=MagickArraySize(ximage->height,ximage->bytes_per_line); ++ window->shared_memory &= (shm_extent != 0); + + if (window->shared_memory) +- segment_info[1].shmid=shmget(IPC_PRIVATE,(size_t) +- (ximage->bytes_per_line*ximage->height),IPC_CREAT | 0777); +- window->shared_memory&=(segment_info[1].shmid >= 0); ++ segment_info[1].shmid=shmget(IPC_PRIVATE,shm_extent,IPC_CREAT | 0777); ++ window->shared_memory &= (segment_info[1].shmid >= 0); + + if (window->shared_memory) + segment_info[1].shmaddr=(char *) MagickShmAt(segment_info[1].shmid,0,0); +- window->shared_memory&=(segment_info[1].shmaddr != NULL); ++ window->shared_memory &= (segment_info[1].shmaddr != NULL); + + if (!window->shared_memory) + { +@@ -5607,12 +5663,12 @@ MagickExport unsigned int MagickXMakeIma + if (IsEventLogging()) + { + (void) LogMagickEvent(X11Event,GetMagickModule(),"XImage:"); +- (void) LogMagickEvent(X11Event,GetMagickModule()," width, height: %dx%d", ++ (void) LogMagickEvent(X11Event,GetMagickModule()," width x height: %dx%d", + ximage->width,ximage->height); +- (void) LogMagickEvent(X11Event,GetMagickModule()," format: %d", +- ximage->format); +- (void) LogMagickEvent(X11Event,GetMagickModule()," byte order: %d", +- ximage->byte_order); ++ (void) LogMagickEvent(X11Event,GetMagickModule()," format: %s", ++ MagickXImageFormatToString(ximage->format)); ++ (void) LogMagickEvent(X11Event,GetMagickModule()," byte order: %s", ++ MagickXByteOrderToString(ximage->byte_order)); + (void) LogMagickEvent(X11Event,GetMagickModule(), + " bitmap unit, bit order, pad: %d %d %d",ximage->bitmap_unit, + ximage->bitmap_bit_order,ximage->bitmap_pad); +@@ -5629,11 +5685,13 @@ MagickExport unsigned int MagickXMakeIma + if (!window->shared_memory) + { + if (ximage->format == XYBitmap) +- ximage->data=MagickAllocateArray(char *, +- ximage->height*ximage->depth,ximage->bytes_per_line); ++ ximage->data= ++ MagickAllocateArray(char *, ++ MagickArraySize(ximage->height,ximage->bytes_per_line), ++ ximage->depth); + else +- ximage->data=MagickAllocateArray(char *, +- ximage->height,ximage->bytes_per_line); ++ ximage->data= ++ MagickAllocateArray(char *,ximage->height,ximage->bytes_per_line); + } + if (ximage->data == (char *) NULL) + { +@@ -5709,8 +5767,9 @@ MagickExport unsigned int MagickXMakeIma + /* + Allocate matte image pixel data. + */ +- length=matte_image->bytes_per_line* +- matte_image->height*matte_image->depth; ++ length=MagickArraySize(MagickArraySize(matte_image->bytes_per_line, ++ matte_image->height), ++ matte_image->depth); + matte_image->data=MagickAllocateMemory(char *,length); + if (matte_image->data == (char *) NULL) + { +@@ -7371,9 +7430,9 @@ MagickExport void MagickXMakeMagnifyImag + % + % The format of the MagickXMakePixmap method is: + % +-% void MagickXMakeStandardColormap(Display *display,XVisualInfo *visual_info, +-% MagickXResourceInfo *resource_info,Image *image,XStandardColormap *map_info, +-% MagickXPixelInfo *pixel) ++% unsigned int MagickXMakePixmap(Display *display, ++% const MagickXResourceInfo *resource_info, ++% MagickXWindowInfo *window) + % + % A description of each parameter follows: + % +--- GraphicsMagick/magick/xwindow.c 2009/10/10 17:55:17 1.232 ++++ GraphicsMagick/magick/xwindow.c 2009/10/11 00:46:55 1.233 +@@ -1,5 +1,5 @@ + /* +-% Copyright (C) 2003, 2004 GraphicsMagick Group ++% Copyright (C) 2003 - 2009 GraphicsMagick Group + % Copyright (C) 2002 ImageMagick Studio + % + % This program is covered by multiple licenses, which are described in +@@ -808,7 +808,7 @@ static char **MagickFontToList(char *fon + for (p=font; *p != '\0'; p++) + if ((*p == ':') || (*p == ';') || (*p == ',')) + fonts++; +- fontlist=MagickAllocateMemory(char **,(fonts+1)*sizeof(char *)); ++ fontlist=MagickAllocateArray(char **,(fonts+1),sizeof(char *)); + if (fontlist == (char **) NULL) + { + MagickError3(ResourceLimitError,MemoryAllocationFailed, +@@ -1103,7 +1103,7 @@ MagickExport void MagickXBestPixel(Displ + /* + Read X server colormap. + */ +- colors=MagickAllocateMemory(XColor *,number_colors*sizeof(XColor)); ++ colors=MagickAllocateArray(XColor *,number_colors,sizeof(XColor)); + if (colors == (XColor *) NULL) + { + MagickError3(ResourceLimitError,MemoryAllocationFailed, +@@ -2133,10 +2133,10 @@ static void MagickXDitherImage(Image *im + for (i=0; i < 2; i++) + for (j=0; j < 16; j++) + { +- red_map[i][j]=MagickAllocateMemory(unsigned char *,256*sizeof(unsigned char)); +- green_map[i][j]=MagickAllocateMemory(unsigned char *, +- 256*sizeof(unsigned char)); +- blue_map[i][j]=MagickAllocateMemory(unsigned char *,256*sizeof(unsigned char)); ++ red_map[i][j]=MagickAllocateArray(unsigned char *,256,sizeof(unsigned char)); ++ green_map[i][j]=MagickAllocateArray(unsigned char *, ++ 256,sizeof(unsigned char)); ++ blue_map[i][j]=MagickAllocateArray(unsigned char *,256,sizeof(unsigned char)); + if ((red_map[i][j] == (unsigned char *) NULL) || + (green_map[i][j] == (unsigned char *) NULL) || + (blue_map[i][j] == (unsigned char *) NULL)) +@@ -3022,7 +3022,7 @@ MagickExport void MagickXGetPixelPacket( + if (pixel->pixels != (unsigned long *) NULL) + MagickFreeMemory(pixel->pixels); + pixel->pixels= +- MagickAllocateMemory(unsigned long *,packets*sizeof(unsigned long)); ++ MagickAllocateArray(unsigned long *,packets,sizeof(unsigned long)); + if (pixel->pixels == (unsigned long *) NULL) + MagickFatalError(ResourceLimitFatalError,MemoryAllocationFailed, + MagickMsg(XServerFatalError,UnableToGetPixelInfo)); +@@ -4073,8 +4073,8 @@ static Image *MagickXGetWindowImage(Disp + */ + max_windows+=1024; + if (window_info == (WindowInfo *) NULL) +- window_info=MagickAllocateMemory(WindowInfo *, +- max_windows*sizeof(WindowInfo)); ++ window_info=MagickAllocateArray(WindowInfo *, ++ max_windows,sizeof(WindowInfo)); + else + MagickReallocMemory(WindowInfo *,window_info,max_windows*sizeof(WindowInfo)); + } +@@ -4227,7 +4227,7 @@ static Image *MagickXGetWindowImage(Disp + /* + Get the window colormap. + */ +- colors=MagickAllocateMemory(XColor *,number_colors*sizeof(XColor)); ++ colors=MagickAllocateArray(XColor *,number_colors,sizeof(XColor)); + if (colors == (XColor *) NULL) + { + XDestroyImage(ximage); +@@ -4577,7 +4577,7 @@ MagickExport void MagickXGetWindowInfo(D + *segment_info; + + if (window->segment_info == (void *) NULL) +- window->segment_info=MagickAllocateMemory(void *,2*sizeof(XShmSegmentInfo)); ++ window->segment_info=MagickAllocateArray(void *,2,sizeof(XShmSegmentInfo)); + segment_info=(XShmSegmentInfo *) window->segment_info; + segment_info[0].shmid=(-1); + segment_info[0].shmaddr=NULL; +@@ -7734,8 +7734,8 @@ MagickExport void MagickXMakeStandardCol + Define Standard Colormap for StaticGray or StaticColor visual. + */ + number_colors=image->colors; +- colors=MagickAllocateMemory(XColor *, +- visual_info->colormap_size*sizeof(XColor)); ++ colors=MagickAllocateArray(XColor *, ++ visual_info->colormap_size,sizeof(XColor)); + if (colors == (XColor *) NULL) + MagickFatalError3(ResourceLimitError,MemoryAllocationFailed, + UnableToCreateColormap); +@@ -7774,8 +7774,8 @@ MagickExport void MagickXMakeStandardCol + Define Standard Colormap for GrayScale or PseudoColor visual. + */ + number_colors=image->colors; +- colors=MagickAllocateMemory(XColor *, +- visual_info->colormap_size*sizeof(XColor)); ++ colors=MagickAllocateArray(XColor *, ++ visual_info->colormap_size,sizeof(XColor)); + if (colors == (XColor *) NULL) + MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, + UnableToCreateColormap); +@@ -7820,8 +7820,8 @@ MagickExport void MagickXMakeStandardCol + /* + Define Standard colormap for shared GrayScale or PseudoColor visual. + */ +- diversity=MagickAllocateMemory(DiversityPacket *, +- image->colors*sizeof(DiversityPacket)); ++ diversity=MagickAllocateArray(DiversityPacket *, ++ image->colors,sizeof(DiversityPacket)); + if (diversity == (DiversityPacket *) NULL) + MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, + UnableToCreateColormap); +@@ -7882,8 +7882,9 @@ MagickExport void MagickXMakeStandardCol + /* + Read X server colormap. + */ +- server_colors=MagickAllocateMemory(XColor *, +- visual_info->colormap_size*sizeof(XColor)); ++ server_colors=MagickAllocateArray(XColor *, ++ visual_info->colormap_size, ++ sizeof(XColor)); + if (server_colors == (XColor *) NULL) + MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, + UnableToCreateColormap); +@@ -8023,7 +8024,7 @@ MagickExport void MagickXMakeStandardCol + /* + Allocate color array. + */ +- colors=MagickAllocateMemory(XColor *,number_colors*sizeof(XColor)); ++ colors=MagickAllocateArray(XColor *,number_colors,sizeof(XColor)); + if (colors == (XColor *) NULL) + MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, + UnableToCreateColormap); +--- GraphicsMagick/magick/memory.c 2009/10/05 23:57:54 1.54 ++++ GraphicsMagick/magick/memory.c 2009/10/09 18:20:22 1.55 +@@ -90,6 +90,43 @@ MagickExport void MagickAllocFunctions(M + % % + % % + % % +++ M a g i c k A r r a y Si z e % ++% % ++% % ++% % ++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++% ++% MagickArraySize() returnes the size of an array given two size_t arguments. ++% Zero is returned if the computed result overflows the size_t type. ++% ++% The format of the MagickArraySize method is: ++% ++% size_t MagickArraySize(const size_t count, const size_t size); ++% ++% A description of each parameter follows: ++% ++% o count: The number of elements in the array. ++% ++% o size: The size of one array element. ++% ++*/ ++MagickExport size_t MagickArraySize(const size_t count, const size_t size) ++{ ++ size_t ++ allocation_size; ++ ++ allocation_size = size * count; ++ if ((count != 0) && (size != allocation_size/count)) ++ allocation_size = 0; ++ ++ return allocation_size; ++} ++ ++/* ++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ++% % ++% % ++% % + % M a g i c k M a l l o c % + % % + % % +@@ -155,9 +192,8 @@ MagickExport void *MagickMallocArray(con + *allocation; + + allocation = (void *) NULL; +- allocation_size = size * count; +- if ((count != 0) && (size != allocation_size/count)) +- allocation_size = 0; ++ allocation_size=MagickArraySize(count,size); ++ + if (allocation_size) + allocation = (MallocFunc)(allocation_size); + return allocation; +--- GraphicsMagick/magick/memory.h 2009/06/10 00:38:07 1.16 ++++ GraphicsMagick/magick/memory.h 2009/10/09 18:20:22 1.17 +@@ -22,7 +22,6 @@ extern MagickExport void + MagickAllocFunctions(MagickFreeFunc free_func,MagickMallocFunc malloc_func, + MagickReallocFunc realloc_func), + *MagickMalloc(const size_t size), +- *MagickMallocArray(const size_t count,const size_t size), + *MagickMallocCleared(const size_t size), + *MagickCloneMemory(void *destination,const void *source,const size_t size), + *MagickRealloc(void *memory,const size_t size), +@@ -30,6 +29,12 @@ extern MagickExport void + + #if defined(MAGICK_IMPLEMENTATION) + ++extern MagickExport void ++ *MagickMallocArray(const size_t count,const size_t size); ++ ++extern MagickExport size_t ++ MagickArraySize(const size_t count,const size_t size); ++ + /* + Allocate memory + */ diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 282330f..d763c0e 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -2,14 +2,13 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.7 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma Url: http://www.graphicsmagick.org/ -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -BuildRequires: automake >= 1.7 autoconf >= 2.58 libtool >= 1.5 BuildRequires: bzip2-devel BuildRequires: freetype-devel BuildRequires: jasper-devel @@ -28,6 +27,12 @@ BuildRequires: perl-devel %endif BuildRequires: zlib-devel +# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/xwindow.c.diff?r1=1.230;r2=1.232' +# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/xwindow.c.diff?r1=1.232;r2=1.233' +# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/memory.c.diff?r1=1.54;r2=1.55 +# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/memory.h.diff?r1=1.16;r2=1.17' +Patch100: GraphicsMagick-CVE-2009-1882.patch + %description GraphicsMagick is a comprehensive image processing package which is initially based on ImageMagick 5.5.2, but which has undergone significant re-work by @@ -96,6 +101,8 @@ however. %prep %setup -q +%patch100 -p1 -b .CVE-2009-1882 + iconv -f iso-8859-2 -t utf8 < ChangeLog > ChangeLog.utf8 mv -f ChangeLog.utf8 ChangeLog @@ -185,9 +192,16 @@ cat >%{buildroot}%{_includedir}/GraphicsMagick/magick/magick_config.h < - 1.3.7-4 +- CVE-2009-1882 (#503017) + * Fri Dec 4 2009 Stepan Kasal - 1.3.7-3 - rebuild against perl 5.10.1 From 48d870aa02af294c105d61371985eddb39a6d1c2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 23 Feb 2010 15:25:30 +0000 Subject: [PATCH 05/22] - GraphicsMagick-1.3.11 --- .cvsignore | 2 +- GraphicsMagick-CVE-2009-1882.patch | 482 ----------------------------- GraphicsMagick.spec | 29 +- sources | 2 +- 4 files changed, 15 insertions(+), 500 deletions(-) delete mode 100644 GraphicsMagick-CVE-2009-1882.patch diff --git a/.cvsignore b/.cvsignore index 57d3834..115ec22 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -GraphicsMagick-1.3.7.tar.lzma +GraphicsMagick-1.3.11.tar.lzma diff --git a/GraphicsMagick-CVE-2009-1882.patch b/GraphicsMagick-CVE-2009-1882.patch deleted file mode 100644 index 04c2403..0000000 --- a/GraphicsMagick-CVE-2009-1882.patch +++ /dev/null @@ -1,482 +0,0 @@ ---- GraphicsMagick/magick/xwindow.c 2009/09/16 02:13:01 1.230 -+++ GraphicsMagick/magick/xwindow.c 2009/10/10 17:55:17 1.232 -@@ -43,10 +43,12 @@ - #include "magick/describe.h" - #include "magick/log.h" - #include "magick/magick.h" -+#include "magick/monitor.h" - #include "magick/pixel_cache.h" - #include "magick/resize.h" - #include "magick/shear.h" - #include "magick/tempfile.h" -+#include "magick/texture.h" - #include "magick/transform.h" - #include "magick/utility.h" - #include "magick/version.h" -@@ -2937,7 +2939,7 @@ MagickExport void MagickXGetImportInfo(M - % % - % % - % % --% M a g i c k X G e t P i x e l I n f o % -+% M a g i c k X G e t P i x e l P a c k e t % - % % - % % - % % -@@ -5350,8 +5352,8 @@ MagickExport Cursor MagickXMakeCursor(Di - % The format of the MagickXMakeImage method is: - % - % unsigned int MagickXMakeImage(Display *display, --% const MagickXResourceInfo *resource_info,MagickXWindowInfo *window,Image *image, --% unsigned int width,unsigned int height) -+% const MagickXResourceInfo *resource_info,MagickXWindowInfo *window, -+% Image *image,unsigned int width,unsigned int height) - % - % A description of each parameter follows: - % -@@ -5376,9 +5378,49 @@ MagickExport Cursor MagickXMakeCursor(Di - % - % - */ --MagickExport unsigned int MagickXMakeImage(Display *display, -- const MagickXResourceInfo *resource_info,MagickXWindowInfo *window,Image *image, -- unsigned int width,unsigned int height) -+static const char * -+MagickXImageFormatToString(int xformat) -+{ -+ static const char -+ *formats[] = -+ { -+ "XYBitmap", -+ "XYPixmap", -+ "ZPixmap" -+ }; -+ -+ const char -+ *format = "Unknown"; -+ -+ if ((size_t) xformat < sizeof(formats)/sizeof(formats[0])) -+ format=formats[xformat]; -+ -+ return format; -+} -+static const char * -+MagickXByteOrderToString(int xbyte_order) -+{ -+ static const char -+ *byte_orders[] = -+ { -+ "LSBFirst", -+ "MSBFirst" -+ }; -+ -+ const char -+ *byte_order = "Unknown"; -+ -+ if ((size_t) xbyte_order < sizeof(byte_orders)/sizeof(byte_orders[0])) -+ byte_order=byte_orders[xbyte_order]; -+ -+ return byte_order; -+} -+MagickExport unsigned int -+MagickXMakeImage(Display *display, -+ const MagickXResourceInfo *resource_info, -+ MagickXWindowInfo *window, -+ Image *image, -+ unsigned int width,unsigned int height) - { - int - depth, -@@ -5410,6 +5452,10 @@ MagickExport unsigned int MagickXMakeIma - window->destroy=False; - if (window->image != (Image *) NULL) - { -+ MonitorHandler -+ handler=(MonitorHandler) NULL; -+ -+ handler=SetMonitorHandler((MonitorHandler) NULL); - if (window->crop_geometry) - { - Image -@@ -5459,44 +5505,49 @@ MagickExport unsigned int MagickXMakeIma - window->destroy=MagickTrue; - } - } --#if 0 -- if ((window->immutable == MagickFalse) && -- (window->image->matte != MagickFalse) && -- (window->pixel_info->colors == 0)) -+ if ((window->image->matte != MagickFalse) && -+ (window->pixel_info->colors == 0) -+ /* && (window->immutable == MagickFalse) */) - { - Image - *texture; - - /* -- Tile background with texture. -+ Tile background with texture according to opacity - */ -- strlcpy(resource_info->image_info->filename,"image:checkerboard",MaxTextExtent); -+ strlcpy(resource_info->image_info->filename,"image:checkerboard", -+ sizeof(resource_info->image_info->filename)); - texture=ReadImage(resource_info->image_info,&window->image->exception); - if (texture != (Image *) NULL) - { - Image - *textured_image; - -- textured_image=CloneImage(window->image,window->image->columns, -- window->image->rows,MagickTrue,&window->image->exception); -+ textured_image=CloneImage(window->image,0,0,MagickTrue, -+ &window->image->exception); - if (textured_image != (Image *) NULL) - { --/* strlcpy(window->image->filename,"textured_image.miff", MaxTextExtent); */ --/* WriteImage(resource_info->image_info,window->image); */ -- TextureImage(textured_image,texture); -- textured_image->matte=MagickFalse; -- if (window->image != image) -- DestroyImage(window->image); -- window->image=textured_image; -- window->destroy=MagickTrue; -+ if (TextureImage(textured_image,texture) != MagickFail) -+ { -+ if (window->image != image) -+ DestroyImage(window->image); -+ window->image=textured_image; -+ window->destroy=MagickTrue; -+ } -+ else -+ { -+ DestroyImage(textured_image); -+ } - } - DestroyImage(texture); - texture=(Image *) NULL; - } - } --#endif - width=(unsigned int) window->image->columns; -+ assert(width == window->image->columns); - height=(unsigned int) window->image->rows; -+ assert(height == window->image->rows); -+ (void) SetMonitorHandler(handler); - } - /* - Create X image. -@@ -5504,27 +5555,32 @@ MagickExport unsigned int MagickXMakeIma - ximage=(XImage *) NULL; - format=(depth == 1) ? XYBitmap : ZPixmap; - #if defined(HasSharedMemory) -- window->shared_memory&=XShmQueryExtension(display); -+ window->shared_memory &= XShmQueryExtension(display); - if (window->shared_memory) - { - XShmSegmentInfo - *segment_info; - -+ size_t -+ shm_extent; -+ - segment_info=(XShmSegmentInfo *) window->segment_info; - segment_info[1].shmid=(-1); - segment_info[1].shmaddr=NULL; - ximage=XShmCreateImage(display,window->visual,depth,format,(char *) NULL, -- &segment_info[1],width,height); -- window->shared_memory&=(ximage != (XImage *) NULL); -+ &segment_info[1],width,height); -+ window->shared_memory &= (ximage != (XImage *) NULL); -+ -+ shm_extent=MagickArraySize(ximage->height,ximage->bytes_per_line); -+ window->shared_memory &= (shm_extent != 0); - - if (window->shared_memory) -- segment_info[1].shmid=shmget(IPC_PRIVATE,(size_t) -- (ximage->bytes_per_line*ximage->height),IPC_CREAT | 0777); -- window->shared_memory&=(segment_info[1].shmid >= 0); -+ segment_info[1].shmid=shmget(IPC_PRIVATE,shm_extent,IPC_CREAT | 0777); -+ window->shared_memory &= (segment_info[1].shmid >= 0); - - if (window->shared_memory) - segment_info[1].shmaddr=(char *) MagickShmAt(segment_info[1].shmid,0,0); -- window->shared_memory&=(segment_info[1].shmaddr != NULL); -+ window->shared_memory &= (segment_info[1].shmaddr != NULL); - - if (!window->shared_memory) - { -@@ -5607,12 +5663,12 @@ MagickExport unsigned int MagickXMakeIma - if (IsEventLogging()) - { - (void) LogMagickEvent(X11Event,GetMagickModule(),"XImage:"); -- (void) LogMagickEvent(X11Event,GetMagickModule()," width, height: %dx%d", -+ (void) LogMagickEvent(X11Event,GetMagickModule()," width x height: %dx%d", - ximage->width,ximage->height); -- (void) LogMagickEvent(X11Event,GetMagickModule()," format: %d", -- ximage->format); -- (void) LogMagickEvent(X11Event,GetMagickModule()," byte order: %d", -- ximage->byte_order); -+ (void) LogMagickEvent(X11Event,GetMagickModule()," format: %s", -+ MagickXImageFormatToString(ximage->format)); -+ (void) LogMagickEvent(X11Event,GetMagickModule()," byte order: %s", -+ MagickXByteOrderToString(ximage->byte_order)); - (void) LogMagickEvent(X11Event,GetMagickModule(), - " bitmap unit, bit order, pad: %d %d %d",ximage->bitmap_unit, - ximage->bitmap_bit_order,ximage->bitmap_pad); -@@ -5629,11 +5685,13 @@ MagickExport unsigned int MagickXMakeIma - if (!window->shared_memory) - { - if (ximage->format == XYBitmap) -- ximage->data=MagickAllocateArray(char *, -- ximage->height*ximage->depth,ximage->bytes_per_line); -+ ximage->data= -+ MagickAllocateArray(char *, -+ MagickArraySize(ximage->height,ximage->bytes_per_line), -+ ximage->depth); - else -- ximage->data=MagickAllocateArray(char *, -- ximage->height,ximage->bytes_per_line); -+ ximage->data= -+ MagickAllocateArray(char *,ximage->height,ximage->bytes_per_line); - } - if (ximage->data == (char *) NULL) - { -@@ -5709,8 +5767,9 @@ MagickExport unsigned int MagickXMakeIma - /* - Allocate matte image pixel data. - */ -- length=matte_image->bytes_per_line* -- matte_image->height*matte_image->depth; -+ length=MagickArraySize(MagickArraySize(matte_image->bytes_per_line, -+ matte_image->height), -+ matte_image->depth); - matte_image->data=MagickAllocateMemory(char *,length); - if (matte_image->data == (char *) NULL) - { -@@ -7371,9 +7430,9 @@ MagickExport void MagickXMakeMagnifyImag - % - % The format of the MagickXMakePixmap method is: - % --% void MagickXMakeStandardColormap(Display *display,XVisualInfo *visual_info, --% MagickXResourceInfo *resource_info,Image *image,XStandardColormap *map_info, --% MagickXPixelInfo *pixel) -+% unsigned int MagickXMakePixmap(Display *display, -+% const MagickXResourceInfo *resource_info, -+% MagickXWindowInfo *window) - % - % A description of each parameter follows: - % ---- GraphicsMagick/magick/xwindow.c 2009/10/10 17:55:17 1.232 -+++ GraphicsMagick/magick/xwindow.c 2009/10/11 00:46:55 1.233 -@@ -1,5 +1,5 @@ - /* --% Copyright (C) 2003, 2004 GraphicsMagick Group -+% Copyright (C) 2003 - 2009 GraphicsMagick Group - % Copyright (C) 2002 ImageMagick Studio - % - % This program is covered by multiple licenses, which are described in -@@ -808,7 +808,7 @@ static char **MagickFontToList(char *fon - for (p=font; *p != '\0'; p++) - if ((*p == ':') || (*p == ';') || (*p == ',')) - fonts++; -- fontlist=MagickAllocateMemory(char **,(fonts+1)*sizeof(char *)); -+ fontlist=MagickAllocateArray(char **,(fonts+1),sizeof(char *)); - if (fontlist == (char **) NULL) - { - MagickError3(ResourceLimitError,MemoryAllocationFailed, -@@ -1103,7 +1103,7 @@ MagickExport void MagickXBestPixel(Displ - /* - Read X server colormap. - */ -- colors=MagickAllocateMemory(XColor *,number_colors*sizeof(XColor)); -+ colors=MagickAllocateArray(XColor *,number_colors,sizeof(XColor)); - if (colors == (XColor *) NULL) - { - MagickError3(ResourceLimitError,MemoryAllocationFailed, -@@ -2133,10 +2133,10 @@ static void MagickXDitherImage(Image *im - for (i=0; i < 2; i++) - for (j=0; j < 16; j++) - { -- red_map[i][j]=MagickAllocateMemory(unsigned char *,256*sizeof(unsigned char)); -- green_map[i][j]=MagickAllocateMemory(unsigned char *, -- 256*sizeof(unsigned char)); -- blue_map[i][j]=MagickAllocateMemory(unsigned char *,256*sizeof(unsigned char)); -+ red_map[i][j]=MagickAllocateArray(unsigned char *,256,sizeof(unsigned char)); -+ green_map[i][j]=MagickAllocateArray(unsigned char *, -+ 256,sizeof(unsigned char)); -+ blue_map[i][j]=MagickAllocateArray(unsigned char *,256,sizeof(unsigned char)); - if ((red_map[i][j] == (unsigned char *) NULL) || - (green_map[i][j] == (unsigned char *) NULL) || - (blue_map[i][j] == (unsigned char *) NULL)) -@@ -3022,7 +3022,7 @@ MagickExport void MagickXGetPixelPacket( - if (pixel->pixels != (unsigned long *) NULL) - MagickFreeMemory(pixel->pixels); - pixel->pixels= -- MagickAllocateMemory(unsigned long *,packets*sizeof(unsigned long)); -+ MagickAllocateArray(unsigned long *,packets,sizeof(unsigned long)); - if (pixel->pixels == (unsigned long *) NULL) - MagickFatalError(ResourceLimitFatalError,MemoryAllocationFailed, - MagickMsg(XServerFatalError,UnableToGetPixelInfo)); -@@ -4073,8 +4073,8 @@ static Image *MagickXGetWindowImage(Disp - */ - max_windows+=1024; - if (window_info == (WindowInfo *) NULL) -- window_info=MagickAllocateMemory(WindowInfo *, -- max_windows*sizeof(WindowInfo)); -+ window_info=MagickAllocateArray(WindowInfo *, -+ max_windows,sizeof(WindowInfo)); - else - MagickReallocMemory(WindowInfo *,window_info,max_windows*sizeof(WindowInfo)); - } -@@ -4227,7 +4227,7 @@ static Image *MagickXGetWindowImage(Disp - /* - Get the window colormap. - */ -- colors=MagickAllocateMemory(XColor *,number_colors*sizeof(XColor)); -+ colors=MagickAllocateArray(XColor *,number_colors,sizeof(XColor)); - if (colors == (XColor *) NULL) - { - XDestroyImage(ximage); -@@ -4577,7 +4577,7 @@ MagickExport void MagickXGetWindowInfo(D - *segment_info; - - if (window->segment_info == (void *) NULL) -- window->segment_info=MagickAllocateMemory(void *,2*sizeof(XShmSegmentInfo)); -+ window->segment_info=MagickAllocateArray(void *,2,sizeof(XShmSegmentInfo)); - segment_info=(XShmSegmentInfo *) window->segment_info; - segment_info[0].shmid=(-1); - segment_info[0].shmaddr=NULL; -@@ -7734,8 +7734,8 @@ MagickExport void MagickXMakeStandardCol - Define Standard Colormap for StaticGray or StaticColor visual. - */ - number_colors=image->colors; -- colors=MagickAllocateMemory(XColor *, -- visual_info->colormap_size*sizeof(XColor)); -+ colors=MagickAllocateArray(XColor *, -+ visual_info->colormap_size,sizeof(XColor)); - if (colors == (XColor *) NULL) - MagickFatalError3(ResourceLimitError,MemoryAllocationFailed, - UnableToCreateColormap); -@@ -7774,8 +7774,8 @@ MagickExport void MagickXMakeStandardCol - Define Standard Colormap for GrayScale or PseudoColor visual. - */ - number_colors=image->colors; -- colors=MagickAllocateMemory(XColor *, -- visual_info->colormap_size*sizeof(XColor)); -+ colors=MagickAllocateArray(XColor *, -+ visual_info->colormap_size,sizeof(XColor)); - if (colors == (XColor *) NULL) - MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, - UnableToCreateColormap); -@@ -7820,8 +7820,8 @@ MagickExport void MagickXMakeStandardCol - /* - Define Standard colormap for shared GrayScale or PseudoColor visual. - */ -- diversity=MagickAllocateMemory(DiversityPacket *, -- image->colors*sizeof(DiversityPacket)); -+ diversity=MagickAllocateArray(DiversityPacket *, -+ image->colors,sizeof(DiversityPacket)); - if (diversity == (DiversityPacket *) NULL) - MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, - UnableToCreateColormap); -@@ -7882,8 +7882,9 @@ MagickExport void MagickXMakeStandardCol - /* - Read X server colormap. - */ -- server_colors=MagickAllocateMemory(XColor *, -- visual_info->colormap_size*sizeof(XColor)); -+ server_colors=MagickAllocateArray(XColor *, -+ visual_info->colormap_size, -+ sizeof(XColor)); - if (server_colors == (XColor *) NULL) - MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, - UnableToCreateColormap); -@@ -8023,7 +8024,7 @@ MagickExport void MagickXMakeStandardCol - /* - Allocate color array. - */ -- colors=MagickAllocateMemory(XColor *,number_colors*sizeof(XColor)); -+ colors=MagickAllocateArray(XColor *,number_colors,sizeof(XColor)); - if (colors == (XColor *) NULL) - MagickFatalError3(ResourceLimitFatalError,MemoryAllocationFailed, - UnableToCreateColormap); ---- GraphicsMagick/magick/memory.c 2009/10/05 23:57:54 1.54 -+++ GraphicsMagick/magick/memory.c 2009/10/09 18:20:22 1.55 -@@ -90,6 +90,43 @@ MagickExport void MagickAllocFunctions(M - % % - % % - % % -++ M a g i c k A r r a y Si z e % -+% % -+% % -+% % -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+% -+% MagickArraySize() returnes the size of an array given two size_t arguments. -+% Zero is returned if the computed result overflows the size_t type. -+% -+% The format of the MagickArraySize method is: -+% -+% size_t MagickArraySize(const size_t count, const size_t size); -+% -+% A description of each parameter follows: -+% -+% o count: The number of elements in the array. -+% -+% o size: The size of one array element. -+% -+*/ -+MagickExport size_t MagickArraySize(const size_t count, const size_t size) -+{ -+ size_t -+ allocation_size; -+ -+ allocation_size = size * count; -+ if ((count != 0) && (size != allocation_size/count)) -+ allocation_size = 0; -+ -+ return allocation_size; -+} -+ -+/* -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+% % -+% % -+% % - % M a g i c k M a l l o c % - % % - % % -@@ -155,9 +192,8 @@ MagickExport void *MagickMallocArray(con - *allocation; - - allocation = (void *) NULL; -- allocation_size = size * count; -- if ((count != 0) && (size != allocation_size/count)) -- allocation_size = 0; -+ allocation_size=MagickArraySize(count,size); -+ - if (allocation_size) - allocation = (MallocFunc)(allocation_size); - return allocation; ---- GraphicsMagick/magick/memory.h 2009/06/10 00:38:07 1.16 -+++ GraphicsMagick/magick/memory.h 2009/10/09 18:20:22 1.17 -@@ -22,7 +22,6 @@ extern MagickExport void - MagickAllocFunctions(MagickFreeFunc free_func,MagickMallocFunc malloc_func, - MagickReallocFunc realloc_func), - *MagickMalloc(const size_t size), -- *MagickMallocArray(const size_t count,const size_t size), - *MagickMallocCleared(const size_t size), - *MagickCloneMemory(void *destination,const void *source,const size_t size), - *MagickRealloc(void *memory,const size_t size), -@@ -30,6 +29,12 @@ extern MagickExport void - - #if defined(MAGICK_IMPLEMENTATION) - -+extern MagickExport void -+ *MagickMallocArray(const size_t count,const size_t size); -+ -+extern MagickExport size_t -+ MagickArraySize(const size_t count,const size_t size); -+ - /* - Allocate memory - */ diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index d763c0e..a598440 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -1,8 +1,8 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick -Version: 1.3.7 -Release: 4%{?dist} +Version: 1.3.11 +Release: 1%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -27,12 +27,6 @@ BuildRequires: perl-devel %endif BuildRequires: zlib-devel -# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/xwindow.c.diff?r1=1.230;r2=1.232' -# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/xwindow.c.diff?r1=1.232;r2=1.233' -# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/memory.c.diff?r1=1.54;r2=1.55 -# http://cvs.graphicsmagick.org/cgi-bin/cvsweb.cgi/GraphicsMagick/magick/memory.h.diff?r1=1.16;r2=1.17' -Patch100: GraphicsMagick-CVE-2009-1882.patch - %description GraphicsMagick is a comprehensive image processing package which is initially based on ImageMagick 5.5.2, but which has undergone significant re-work by @@ -101,8 +95,6 @@ however. %prep %setup -q -%patch100 -p1 -b .CVE-2009-1882 - iconv -f iso-8859-2 -t utf8 < ChangeLog > ChangeLog.utf8 mv -f ChangeLog.utf8 ChangeLog @@ -120,12 +112,14 @@ sed -i.rpath -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure --with-perl \ --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix}" \ --with-threads \ - --with-windows-font-dir=%{_datadir}/fonts/default/TrueType \ --with-wmf \ --with-x \ --with-xml \ --without-dps \ - --without-gslib + --without-gslib \ + --with-windows-font-dir=%{_datadir}/fonts/msttcorefonts \ + --with-gs-font-dir=%{_datadir}/fonts/default/ghostscript + make %{?_smp_mflags} make %{?_smp_mflags} perl-build @@ -192,10 +186,10 @@ cat >%{buildroot}%{_includedir}/GraphicsMagick/magick/magick_config.h < - 1.3.11-1 +- GraphicsMagick-1.3.11 + * Mon Dec 28 2009 Rex Dieter - 1.3.7-4 - CVE-2009-1882 (#503017) diff --git a/sources b/sources index 0141532..d0b8162 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8a1ccf10d15816206426a9e716def9ac GraphicsMagick-1.3.7.tar.lzma +9c65e39e79ffc36f243e1643ae8b81f0 GraphicsMagick-1.3.11.tar.lzma From cee283a9207551998a5f81593565a5ddeecc7e3c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 8 Mar 2010 21:12:46 +0000 Subject: [PATCH 06/22] - GraphicsMagick-1.3.12 --- .cvsignore | 2 +- GraphicsMagick.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 115ec22..78226e4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -GraphicsMagick-1.3.11.tar.lzma +GraphicsMagick-1.3.12.tar.lzma diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index a598440..4e30856 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -1,7 +1,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick -Version: 1.3.11 +Version: 1.3.12 Release: 1%{?dist} License: MIT Group: Applications/Multimedia @@ -251,6 +251,9 @@ rm -rf %{buildroot} %changelog +* Mon Mar 08 2010 Rex Dieter - 1.3.12-1 +- GraphicsMagick-1.3.12 + * Tue Feb 23 2010 Rex Dieter - 1.3.11-1 - GraphicsMagick-1.3.11 diff --git a/sources b/sources index d0b8162..0a5533e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9c65e39e79ffc36f243e1643ae8b81f0 GraphicsMagick-1.3.11.tar.lzma +1b91c37daa9640440a91a83727607269 GraphicsMagick-1.3.12.tar.lzma From 13680353ad436f422487162881b205bec4b82872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Tue, 1 Jun 2010 16:12:46 +0000 Subject: [PATCH 07/22] - Mass rebuild with perl-5.12.0 --- GraphicsMagick.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 4e30856..13011d6 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -2,7 +2,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.12 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -251,6 +251,9 @@ rm -rf %{buildroot} %changelog +* Tue Jun 01 2010 Marcela Maslanova - 1.3.12-2 +- Mass rebuild with perl-5.12.0 + * Mon Mar 08 2010 Rex Dieter - 1.3.12-1 - GraphicsMagick-1.3.12 From f65faac21db03973057468f557104cddb09f47fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 08:55:55 +0000 Subject: [PATCH 08/22] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 3dfe097..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: GraphicsMagick -# $Id: Makefile,v 1.1 2006/11/27 13:36:30 ixs Exp $ -NAME := GraphicsMagick -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 0fa1f09a65799fb3271495cce2991441d9e0d74e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 17:55:20 -0600 Subject: [PATCH 09/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- GraphicsMagick.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 13011d6..e4c18cc 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -2,7 +2,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.12 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -251,6 +251,9 @@ rm -rf %{buildroot} %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 1.3.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Tue Jun 01 2010 Marcela Maslanova - 1.3.12-2 - Mass rebuild with perl-5.12.0 From a68a98bf0f91c02290c19da3dc67c156db54c0ef Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 26 Apr 2011 15:02:27 -0500 Subject: [PATCH 10/22] delegates.mgk could use some care (#527117) perl build is bad (#527143) wrong default font paths (#661664) need for 16-bit support, f16+ for now (#699414) tighten subpkg deps via %_isa --- GraphicsMagick-1.3.12-perl_linkage.patch | 12 +++++++ GraphicsMagick.spec | 41 +++++++++++++++++------- 2 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 GraphicsMagick-1.3.12-perl_linkage.patch diff --git a/GraphicsMagick-1.3.12-perl_linkage.patch b/GraphicsMagick-1.3.12-perl_linkage.patch new file mode 100644 index 0000000..5814c4d --- /dev/null +++ b/GraphicsMagick-1.3.12-perl_linkage.patch @@ -0,0 +1,12 @@ +diff -up GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in.perl_linkage GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in +--- GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in.perl_linkage 2009-07-24 14:34:32.000000000 -0500 ++++ GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in 2011-04-26 14:22:47.101574777 -0500 +@@ -67,7 +67,7 @@ WriteMakefile + 'INSTALLBIN' => '@BIN_DIR@', + + # Library specification +- 'LIBS' => ['-L@MAGICKLIBDIR@ -lGraphicsMagick @LDFLAGS@ @MAGICK_DEP_LIBS@'], ++ 'LIBS' => ['-L@MAGICKLIBDIR@ -L../magick/.libs -lGraphicsMagick @LDFLAGS@ @MAGICK_DEP_LIBS@'], + + # Perl binary name (if a Perl binary is built) + 'MAP_TARGET' => 'PerlMagick', diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index e4c18cc..186fd4e 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -1,14 +1,22 @@ +%if 0%{?fedora} > 15 +# should seriously consider using this as default everywhere -- Rex +%global quantum_depth 16 +%endif + Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.12 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma Url: http://www.graphicsmagick.org/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +## upstreamable patches +Patch50: GraphicsMagick-1.3.12-perl_linkage.patch + BuildRequires: bzip2-devel BuildRequires: freetype-devel BuildRequires: jasper-devel @@ -36,7 +44,7 @@ of the software. %package devel Summary: Libraries and header files for GraphicsMagick app development Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: ghostscript-devel, bzip2-devel, libtiff-devel, libjpeg-devel Requires: lcms-devel, pkgconfig, libX11-devel, libXext-devel, libXt-devel @@ -53,7 +61,7 @@ however. %package perl Summary: GraphicsMagick perl bindings Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description perl @@ -65,7 +73,7 @@ GraphicsMagick. %package c++ Summary: GraphicsMagick Magick++ library (C++ bindings) Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description c++ This package contains the GraphicsMagick++ library, a C++ binding to the @@ -77,8 +85,8 @@ GraphicsMagick++. %package c++-devel Summary: C++ bindings for the GraphicsMagick library Group: Development/Libraries -Requires: %{name}-c++ = %{version}-%{release} -Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-c++%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} %description c++-devel GraphicsMagick-devel contains the Libraries and header files you'll @@ -95,6 +103,8 @@ however. %prep %setup -q +%patch50 -p1 -b .perl_linkage + iconv -f iso-8859-2 -t utf8 < ChangeLog > ChangeLog.utf8 mv -f ChangeLog.utf8 ChangeLog @@ -103,14 +113,18 @@ mv -f ChangeLog.utf8 ChangeLog sed -i.rpath -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure %endif +sed -i -e "s|BrowseDelegateDefault=.*|BrowseDelegateDefault=\'xdg-open\'|" configure + %build +BrowseDelegate=xdg-open \ %configure --enable-shared --disable-static \ --with-lcms \ --with-magick_plus_plus \ --with-modules \ --with-perl \ --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix}" \ + %{?quantum_depth:--with-quantum-depth=%{quantum_depth}} \ --with-threads \ --with-wmf \ --with-x \ @@ -118,8 +132,7 @@ sed -i.rpath -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure --without-dps \ --without-gslib \ --with-windows-font-dir=%{_datadir}/fonts/msttcorefonts \ - --with-gs-font-dir=%{_datadir}/fonts/default/ghostscript - + --with-gs-font-dir=%{_datadir}/fonts/default/Type1 make %{?_smp_mflags} make %{?_smp_mflags} perl-build @@ -187,9 +200,8 @@ EOF %check -## expect (at least) 6 FAIL, one PerlMagic, 5 in Magick++/demo -## TODO: wtf? :) -- Rex -make check ||: +make check +make check-perl %clean @@ -251,6 +263,13 @@ rm -rf %{buildroot} %changelog +* Tue Apr 26 2011 Rex Dieter 1.3.12-4 +- delegates.mgk could use some care (#527117) +- -perl build is bad (#527143) +- wrong default font paths (#661664) +- need for 16-bit support, f16+ for now (#699414) +- tighten subpkg deps via %%_isa + * Mon Feb 07 2011 Fedora Release Engineering - 1.3.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From d40cc1f8b2c6b76ce7e8cc135996e89d608bb688 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 26 Apr 2011 15:10:44 -0500 Subject: [PATCH 11/22] drop non-working BrowseDelegate hack --- GraphicsMagick.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 186fd4e..4ef18fe 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -117,7 +117,6 @@ sed -i -e "s|BrowseDelegateDefault=.*|BrowseDelegateDefault=\'xdg-open\'|" confi %build -BrowseDelegate=xdg-open \ %configure --enable-shared --disable-static \ --with-lcms \ --with-magick_plus_plus \ From 266d233ebfc22e506412221f1c65a54c46fe93d9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 26 Apr 2011 15:12:55 -0500 Subject: [PATCH 12/22] allow make check errors (ghostscript-related items are falling over on f16) --- GraphicsMagick.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 4ef18fe..28add0f 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -199,7 +199,9 @@ EOF %check -make check +# arg, ghostscript-related checks are currently failing on f16 +# f15/x86_64 ok for me -- Rex +make check ||: make check-perl From 2bb4e10603ea78b6000f4e410cbe284a5adac79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Fri, 10 Jun 2011 15:38:05 +0200 Subject: [PATCH 13/22] Perl 5.14 mass rebuild --- GraphicsMagick.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 28add0f..e745046 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -7,7 +7,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.12 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -264,6 +264,9 @@ rm -rf %{buildroot} %changelog +* Fri Jun 10 2011 Marcela Mašláňová - 1.3.12-5 +- Perl 5.14 mass rebuild + * Tue Apr 26 2011 Rex Dieter 1.3.12-4 - delegates.mgk could use some care (#527117) - -perl build is bad (#527143) From a0955ced0840b51f4e6782437e54b1028f3157e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Fri, 17 Jun 2011 15:01:48 +0200 Subject: [PATCH 14/22] Perl mass rebuild --- GraphicsMagick.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index e745046..0c9900d 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -7,7 +7,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.12 -Release: 5%{?dist} +Release: 6%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -264,6 +264,9 @@ rm -rf %{buildroot} %changelog +* Fri Jun 17 2011 Marcela Mašláňová - 1.3.12-6 +- Perl mass rebuild + * Fri Jun 10 2011 Marcela Mašláňová - 1.3.12-5 - Perl 5.14 mass rebuild From cda181b8753146259874985cb5515eabf17fdea3 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 5 Dec 2011 23:33:21 -0500 Subject: [PATCH 15/22] Rebuild for new libpng --- GraphicsMagick.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 0c9900d..a4c8078 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -7,7 +7,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.12 -Release: 6%{?dist} +Release: 7%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -264,6 +264,9 @@ rm -rf %{buildroot} %changelog +* Tue Dec 06 2011 Adam Jackson - 1.3.12-7 +- Rebuild for new libpng + * Fri Jun 17 2011 Marcela Mašláňová - 1.3.12-6 - Perl mass rebuild From 4d1aa9db3a94705b38d1c6be03b6ad1d7c0e8c09 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 14:20:25 -0600 Subject: [PATCH 16/22] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- GraphicsMagick.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index a4c8078..9a6378c 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -7,7 +7,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.12 -Release: 7%{?dist} +Release: 8%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma @@ -264,6 +264,9 @@ rm -rf %{buildroot} %changelog +* Thu Jan 12 2012 Fedora Release Engineering - 1.3.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Dec 06 2011 Adam Jackson - 1.3.12-7 - Rebuild for new libpng From 15bdba43466bd0db242e52e352741f770ae18803 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 12 Jan 2012 14:41:03 -0600 Subject: [PATCH 17/22] 1.3.13 --- .gitignore | 3 ++- GraphicsMagick-1.3.12-perl_linkage.patch | 12 ------------ GraphicsMagick.spec | 23 +++++++++-------------- sources | 2 +- 4 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 GraphicsMagick-1.3.12-perl_linkage.patch diff --git a/.gitignore b/.gitignore index 78226e4..5ba4520 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -GraphicsMagick-1.3.12.tar.lzma +/GraphicsMagick-1.3.12.tar.lzma +/GraphicsMagick-1.3.13.tar.xz diff --git a/GraphicsMagick-1.3.12-perl_linkage.patch b/GraphicsMagick-1.3.12-perl_linkage.patch deleted file mode 100644 index 5814c4d..0000000 --- a/GraphicsMagick-1.3.12-perl_linkage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in.perl_linkage GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in ---- GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in.perl_linkage 2009-07-24 14:34:32.000000000 -0500 -+++ GraphicsMagick-1.3.12/PerlMagick/Makefile.PL.in 2011-04-26 14:22:47.101574777 -0500 -@@ -67,7 +67,7 @@ WriteMakefile - 'INSTALLBIN' => '@BIN_DIR@', - - # Library specification -- 'LIBS' => ['-L@MAGICKLIBDIR@ -lGraphicsMagick @LDFLAGS@ @MAGICK_DEP_LIBS@'], -+ 'LIBS' => ['-L@MAGICKLIBDIR@ -L../magick/.libs -lGraphicsMagick @LDFLAGS@ @MAGICK_DEP_LIBS@'], - - # Perl binary name (if a Perl binary is built) - 'MAP_TARGET' => 'PerlMagick', diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 9a6378c..26555c6 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -6,17 +6,14 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick -Version: 1.3.12 -Release: 8%{?dist} +Version: 1.3.13 +Release: 1%{?dist} License: MIT Group: Applications/Multimedia -Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.lzma +Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.xz Url: http://www.graphicsmagick.org/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -## upstreamable patches -Patch50: GraphicsMagick-1.3.12-perl_linkage.patch - BuildRequires: bzip2-devel BuildRequires: freetype-devel BuildRequires: jasper-devel @@ -103,8 +100,6 @@ however. %prep %setup -q -%patch50 -p1 -b .perl_linkage - iconv -f iso-8859-2 -t utf8 < ChangeLog > ChangeLog.utf8 mv -f ChangeLog.utf8 ChangeLog @@ -210,14 +205,8 @@ rm -rf %{buildroot} %post -p /sbin/ldconfig - -%post c++ -p /sbin/ldconfig - %postun -p /sbin/ldconfig -%postun c++ -p /sbin/ldconfig - - %files %defattr(-,root,root,-) %doc Copyright.txt @@ -244,6 +233,9 @@ rm -rf %{buildroot} %{_mandir}/man1/GraphicsMagick-config.* %{_mandir}/man1/GraphicsMagickWand-config.* +%post c++ -p /sbin/ldconfig +%postun c++ -p /sbin/ldconfig + %files c++ %defattr(-,root,root,-) %{_libdir}/libGraphicsMagick++.so.3* @@ -264,6 +256,9 @@ rm -rf %{buildroot} %changelog +* Thu Jan 12 2012 Rex Dieter 1.3.13-1 +- 1.3.13 + * Thu Jan 12 2012 Fedora Release Engineering - 1.3.12-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 0a5533e..7dfc76c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b91c37daa9640440a91a83727607269 GraphicsMagick-1.3.12.tar.lzma +ca8e410d115ec93b75bf6cd2de72411a GraphicsMagick-1.3.13.tar.xz From 5436eeef2e8b6eb05895a8f362b1be9e9597f9a9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 12 Jan 2012 19:27:44 -0600 Subject: [PATCH 18/22] make perl tests non-fatal... for now --- GraphicsMagick.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 26555c6..7fb10cf 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -31,6 +31,8 @@ BuildRequires: perl BuildRequires: perl-devel %endif BuildRequires: zlib-devel +## FIXME: %%check stuff +#BuildRequires: xorg-x11-server-Xvfb %description GraphicsMagick is a comprehensive image processing package which is initially @@ -194,10 +196,8 @@ EOF %check -# arg, ghostscript-related checks are currently failing on f16 -# f15/x86_64 ok for me -- Rex make check ||: -make check-perl +make check-perl ||: %clean From 2271f534cdc180f10c4adf75631eb78a1f66e398 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 23 Jan 2012 11:39:44 -0600 Subject: [PATCH 19/22] Bad font configuration (#783906) - re-introduce perl_linkage patch, fixes %check --- GraphicsMagick-1.3.13-perl_linkage.patch | 12 ++++++++++++ GraphicsMagick.spec | 19 +++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 GraphicsMagick-1.3.13-perl_linkage.patch diff --git a/GraphicsMagick-1.3.13-perl_linkage.patch b/GraphicsMagick-1.3.13-perl_linkage.patch new file mode 100644 index 0000000..89bf4b9 --- /dev/null +++ b/GraphicsMagick-1.3.13-perl_linkage.patch @@ -0,0 +1,12 @@ +diff -up GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in.perl_linkage GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in +--- GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in.perl_linkage 2011-12-24 13:34:16.000000000 -0600 ++++ GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in 2012-01-23 10:09:16.435774518 -0600 +@@ -79,7 +79,7 @@ WriteMakefile + 'INSTALLBIN' => $magick_BIN_DIR, + + # Library specification +- 'LIBS' => ["-L$magick_LIB_DIR -lGraphicsMagick $magick_LDFLAGS $magick_DEP_LIBS $magick_OMP_LIBS"], ++ 'LIBS' => ["-L$magick_LIB_DIR -L../magick/.libs -lGraphicsMagick $magick_LDFLAGS $magick_DEP_LIBS $magick_OMP_LIBS"], + + # Perl binary name (if a Perl binary is built) + 'MAP_TARGET' => 'PerlMagick', diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 7fb10cf..2e7dfe6 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -7,13 +7,16 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.13 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.xz Url: http://www.graphicsmagick.org/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +## upstreamable patches +Patch50: GraphicsMagick-1.3.13-perl_linkage.patch + BuildRequires: bzip2-devel BuildRequires: freetype-devel BuildRequires: jasper-devel @@ -34,6 +37,10 @@ BuildRequires: zlib-devel ## FIXME: %%check stuff #BuildRequires: xorg-x11-server-Xvfb +# depend on stuff referenced below +# --with-gs-font-dir=%{_datadir}/fonts/default/Type1 +Requires: urw-fonts + %description GraphicsMagick is a comprehensive image processing package which is initially based on ImageMagick 5.5.2, but which has undergone significant re-work by @@ -102,6 +109,8 @@ however. %prep %setup -q +%patch50 -p1 -b .perl_linkage + iconv -f iso-8859-2 -t utf8 < ChangeLog > ChangeLog.utf8 mv -f ChangeLog.utf8 ChangeLog @@ -127,7 +136,6 @@ sed -i -e "s|BrowseDelegateDefault=.*|BrowseDelegateDefault=\'xdg-open\'|" confi --with-xml \ --without-dps \ --without-gslib \ - --with-windows-font-dir=%{_datadir}/fonts/msttcorefonts \ --with-gs-font-dir=%{_datadir}/fonts/default/Type1 make %{?_smp_mflags} @@ -196,8 +204,7 @@ EOF %check -make check ||: -make check-perl ||: +make check #|| cat PerlMagick/PerlMagickCheck.log ; make check-perl %clean @@ -256,6 +263,10 @@ rm -rf %{buildroot} %changelog +* Mon Jan 23 2012 Rex Dieter 1.3.13-2 +- Bad font configuration (#783906) +- re-introduce perl_linkage patch, fixes %%check + * Thu Jan 12 2012 Rex Dieter 1.3.13-1 - 1.3.13 From d5dfc2dcf6f9efb05eb20b7e4660a9b7b4e8c0a4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 23 Jan 2012 11:59:59 -0600 Subject: [PATCH 20/22] BR: perl(ExtUtils::MakeMaker) --- GraphicsMagick.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 2e7dfe6..3080a95 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -7,7 +7,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.13 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.xz @@ -29,10 +29,7 @@ BuildRequires: libungif-devel BuildRequires: libwmf-devel BuildRequires: libxml2-devel BuildRequires: libX11-devel libXext-devel libXt-devel -BuildRequires: perl -%if 0%{?fedora} > 8 || 0%{?rhel} > 5 -BuildRequires: perl-devel -%endif +BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: zlib-devel ## FIXME: %%check stuff #BuildRequires: xorg-x11-server-Xvfb @@ -263,6 +260,9 @@ rm -rf %{buildroot} %changelog +* Mon Jan 23 2012 Rex Dieter 1.3.13-3 +- BR: perl(ExtUtils::MakeMaker) + * Mon Jan 23 2012 Rex Dieter 1.3.13-2 - Bad font configuration (#783906) - re-introduce perl_linkage patch, fixes %%check From e976e5a43bbe7bbce102e2e6cbc7277bfe6fc771 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 23 Jan 2012 12:20:43 -0600 Subject: [PATCH 21/22] devel: omit seemingly extraneous dependencies --- GraphicsMagick.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index 3080a95..fbcd6c2 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -7,7 +7,7 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick Version: 1.3.13 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.xz @@ -48,8 +48,6 @@ of the software. Summary: Libraries and header files for GraphicsMagick app development Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: ghostscript-devel, bzip2-devel, libtiff-devel, libjpeg-devel -Requires: lcms-devel, pkgconfig, libX11-devel, libXext-devel, libXt-devel %description devel GraphicsMagick-devel contains the Libraries and header files you'll @@ -260,6 +258,9 @@ rm -rf %{buildroot} %changelog +* Mon Jan 23 2012 Rex Dieter 1.3.13-4 +- -devel: omit seemingly extraneous dependencies + * Mon Jan 23 2012 Rex Dieter 1.3.13-3 - BR: perl(ExtUtils::MakeMaker) From d9c5b2251e3b27e5a53ce52c739054dba6684b7c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 26 Feb 2012 07:40:00 -0600 Subject: [PATCH 22/22] 1.3.14 --- .gitignore | 1 + GraphicsMagick-1.3.13-perl_linkage.patch | 12 ------------ GraphicsMagick-1.3.14-perl_linkage.patch | 12 ++++++++++++ GraphicsMagick.spec | 9 ++++++--- sources | 2 +- 5 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 GraphicsMagick-1.3.13-perl_linkage.patch create mode 100644 GraphicsMagick-1.3.14-perl_linkage.patch diff --git a/.gitignore b/.gitignore index 5ba4520..2b6e703 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /GraphicsMagick-1.3.12.tar.lzma /GraphicsMagick-1.3.13.tar.xz +/GraphicsMagick-1.3.14.tar.xz diff --git a/GraphicsMagick-1.3.13-perl_linkage.patch b/GraphicsMagick-1.3.13-perl_linkage.patch deleted file mode 100644 index 89bf4b9..0000000 --- a/GraphicsMagick-1.3.13-perl_linkage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in.perl_linkage GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in ---- GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in.perl_linkage 2011-12-24 13:34:16.000000000 -0600 -+++ GraphicsMagick-1.3.13/PerlMagick/Makefile.PL.in 2012-01-23 10:09:16.435774518 -0600 -@@ -79,7 +79,7 @@ WriteMakefile - 'INSTALLBIN' => $magick_BIN_DIR, - - # Library specification -- 'LIBS' => ["-L$magick_LIB_DIR -lGraphicsMagick $magick_LDFLAGS $magick_DEP_LIBS $magick_OMP_LIBS"], -+ 'LIBS' => ["-L$magick_LIB_DIR -L../magick/.libs -lGraphicsMagick $magick_LDFLAGS $magick_DEP_LIBS $magick_OMP_LIBS"], - - # Perl binary name (if a Perl binary is built) - 'MAP_TARGET' => 'PerlMagick', diff --git a/GraphicsMagick-1.3.14-perl_linkage.patch b/GraphicsMagick-1.3.14-perl_linkage.patch new file mode 100644 index 0000000..db504a0 --- /dev/null +++ b/GraphicsMagick-1.3.14-perl_linkage.patch @@ -0,0 +1,12 @@ +diff -up GraphicsMagick-1.3.14/PerlMagick/Makefile.PL.in.perl_linkage GraphicsMagick-1.3.14/PerlMagick/Makefile.PL.in +--- GraphicsMagick-1.3.14/PerlMagick/Makefile.PL.in.perl_linkage 2012-02-25 14:43:38.000000000 -0600 ++++ GraphicsMagick-1.3.14/PerlMagick/Makefile.PL.in 2012-02-26 07:35:38.542731280 -0600 +@@ -78,7 +78,7 @@ WriteMakefile + 'INSTALLBIN' => $magick_BIN_DIR, + + # Library specification +- 'LIBS' => ["-L$magick_LIB_DIR -lGraphicsMagick $magick_LDFLAGS $magick_DEP_LIBS"], ++ 'LIBS' => ["-L$magick_LIB_DIR -L../magick/.libs -lGraphicsMagick $magick_LDFLAGS $magick_DEP_LIBS"], + + # Perl binary name (if a Perl binary is built) + 'MAP_TARGET' => 'PerlMagick', diff --git a/GraphicsMagick.spec b/GraphicsMagick.spec index fbcd6c2..d7b20b7 100644 --- a/GraphicsMagick.spec +++ b/GraphicsMagick.spec @@ -6,8 +6,8 @@ Summary: An ImageMagick fork, offering faster image generation and better quality Name: GraphicsMagick -Version: 1.3.13 -Release: 4%{?dist} +Version: 1.3.14 +Release: 1%{?dist} License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/GraphicsMagick-%{version}.tar.xz @@ -15,7 +15,7 @@ Url: http://www.graphicsmagick.org/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) ## upstreamable patches -Patch50: GraphicsMagick-1.3.13-perl_linkage.patch +Patch50: GraphicsMagick-1.3.14-perl_linkage.patch BuildRequires: bzip2-devel BuildRequires: freetype-devel @@ -258,6 +258,9 @@ rm -rf %{buildroot} %changelog +* Sun Feb 26 2012 Rex Dieter 1.3.14-1 +- 1.3.14 + * Mon Jan 23 2012 Rex Dieter 1.3.13-4 - -devel: omit seemingly extraneous dependencies diff --git a/sources b/sources index 7dfc76c..bb9e1cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ca8e410d115ec93b75bf6cd2de72411a GraphicsMagick-1.3.13.tar.xz +a67ef2942550ddfa69b07dd944e2a096 GraphicsMagick-1.3.14.tar.xz