[packages/giflib] - updated to 5.1.6 (fixes CVE-2018-11490) - added make patch to fix issues introduced when dropping

qboosh qboosh at pld-linux.org
Sat Mar 9 08:02:44 CET 2019


commit 2454baac84fe351ead19f1da85012386fc861ee1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 9 08:08:22 2019 +0100

    - updated to 5.1.6 (fixes CVE-2018-11490)
    - added make patch to fix issues introduced when dropping autotools build system
    - no autotools means no .la file

 giflib-make.patch | 30 ++++++++++++++++++++++++++++++
 giflib.spec       | 46 ++++++++++++++++++++++++++--------------------
 2 files changed, 56 insertions(+), 20 deletions(-)
---
diff --git a/giflib.spec b/giflib.spec
index f49b6c7..fc1ee15 100644
--- a/giflib.spec
+++ b/giflib.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	tests	# regression tests
+
 Summary:	GIF-manipulation library
 Summary(es.UTF-8):	Biblioteca de manipulación de archivos GIF
 Summary(pl.UTF-8):	Biblioteka do obróbki plików GIF
@@ -5,16 +9,15 @@ Summary(pt_BR.UTF-8):	Biblioteca de manipulação de arquivos GIF
 Summary(ru.UTF-8):	Библиотека для работы с GIF-файлами
 Summary(uk.UTF-8):	Бібліотека для роботи з GIF-файлами
 Name:		giflib
-Version:	5.1.4
+Version:	5.1.6
 Release:	1
 License:	MIT-like
 Group:		Libraries
-Source0:	http://downloads.sourceforge.net/giflib/%{name}-%{version}.tar.bz2
-# Source0-md5:	2c171ced93c0e83bb09e6ccad8e3ba2b
+Source0:	http://downloads.sourceforge.net/giflib/%{name}-%{version}.tar.gz
+# Source0-md5:	4ad967c8b1380d830f33dc28fd38d889
+Patch0:		%{name}-make.patch
 URL:		http://sourceforge.net/projects/giflib/
-BuildRequires:	autoconf >= 2.59-9
-BuildRequires:	automake
-BuildRequires:	libtool
+BuildRequires:	gcc >= 5:3.2
 BuildRequires:	netpbm-devel
 BuildRequires:	rpmbuild(macros) >= 1.213
 BuildRequires:	sed
@@ -138,27 +141,31 @@ Цей пакет містить різноманітні програми дл
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__autoheader}
-%{__autoconf}
-%{__automake}
-%configure \
-	--disable-silent-rules
+%{__make} \
+	CC="%{__cc}" \
+	OFLAGS="%{rpmcflags}" \
+	LDFLAGS="%{rpmldflags}"
 
-%{__make}
+%if %{with tests}
+ln -sf libgif.so libgif.so.7
+LD_LIBRARY_PATH=$(pwd) \
+%{__make} -j1 check
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	LIBDIR=%{_libdir}
 
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
-cp -p doc/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
-# these are unpackged examples
+# skeleton programs
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/{giffilter,gifsponge}
+# docs for not installed programs used in tests
 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{gifbg,gifcolor,gifhisto,gifwedge}.1
 
 cd $RPM_BUILD_ROOT%{_libdir}
@@ -173,7 +180,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS BUGS COPYING ChangeLog NEWS README TODO
+%doc COPYING ChangeLog NEWS README TODO history.adoc
 %attr(755,root,root) %{_libdir}/libgif.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libgif.so.7
 
@@ -182,7 +189,6 @@ rm -rf $RPM_BUILD_ROOT
 %doc doc/*.txt doc/{gif_lib,intro}.html doc/whatsinagif
 %attr(755,root,root) %{_libdir}/libgif.so
 %attr(755,root,root) %{_libdir}/libungif.so
-%{_libdir}/libgif.la
 %{_includedir}/gif_lib.h
 
 %files static
diff --git a/giflib-make.patch b/giflib-make.patch
new file mode 100644
index 0000000..54b504f
--- /dev/null
+++ b/giflib-make.patch
@@ -0,0 +1,30 @@
+--- giflib-5.1.6/Makefile.orig	2019-02-12 15:26:13.000000000 +0100
++++ giflib-5.1.6/Makefile	2019-03-08 20:51:20.376011393 +0100
+@@ -20,7 +20,7 @@
+ BINDIR = $(PREFIX)/bin
+ INCDIR = $(PREFIX)/include
+ LIBDIR = $(PREFIX)/lib
+-MANDIR = $(PREFIX)/share/man
++MANDIR = $(PREFIX)/share/man/man1
+ 
+ # No user-serviceable parts below this line
+ 
+@@ -58,15 +58,15 @@
+ 	gifsponge \
+ 	gifwedge
+ 
+-LDLIBS=libgif.a -lm
++LDLIBS=-L. -lgif -lm
+ 
+ all: libgif.so libgif.a $(UTILS)
+ 	$(MAKE) -C doc
+ 
+-$(UTILS):: libgif.a
++$(UTILS):: libgif.so
+ 
+ libgif.so: $(OBJECTS) $(HEADERS)
+-	$(CC) $(CFLAGS) -shared $(OFLAGS) -o libgif.so $(OBJECTS)
++	$(CC) $(LDFLAGS) $(CFLAGS) -shared -Wl,-soname,libgif.so.$(LIBMAJOR) $(OFLAGS) -o libgif.so $(OBJECTS)
+ 
+ libgif.a: $(OBJECTS) $(HEADERS)
+ 	ar rcs libgif.a $(OBJECTS)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/giflib.git/commitdiff/2454baac84fe351ead19f1da85012386fc861ee1



More information about the pld-cvs-commit mailing list