diff --git a/.gitignore b/.gitignore index 477727f..8513b0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ libXrender-0.9.6.tar.bz2 /libXrender-0.9.7.tar.bz2 +/libXrender-20130524.tar.bz2 diff --git a/commitid b/commitid new file mode 100644 index 0000000..6d0884c --- /dev/null +++ b/commitid @@ -0,0 +1 @@ +786f78fd8df6d165ccbc81f306fd9f22b5c1551c diff --git a/libXrender.spec b/libXrender.spec index 186951d..15d7b9b 100644 --- a/libXrender.spec +++ b/libXrender.spec @@ -1,12 +1,22 @@ +%global tarball libXrender +%global gitdate 20130524 +%global gitversion 786f78fd8 + Summary: X.Org X11 libXrender runtime library Name: libXrender Version: 0.9.7 -Release: 4%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.x.org -Source0: ftp://ftp.x.org/pub/individual/lib/%{name}-%{version}.tar.bz2 +%if 0%{?gitdate} +Source0: %{tarball}-%{gitdate}.tar.bz2 +Source1: make-git-snapshot.sh +Source2: commitid +%else +Source0: http://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2 +%endif BuildRequires: xorg-x11-util-macros BuildRequires: autoconf automake libtool @@ -25,7 +35,7 @@ Requires: %{name} = %{version}-%{release} X.Org X11 libXrender development package %prep -%setup -q +%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} %build autoreconf -v --install --force @@ -50,7 +60,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc AUTHORS COPYING ChangeLog +%doc AUTHORS COPYING %{_libdir}/libXrender.so.1 %{_libdir}/libXrender.so.1.3.0 @@ -62,6 +72,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/xrender.pc %changelog +* Fri May 24 2013 Peter Hutterer 0.9.7-5.20130524git786f78fd8 +- Update to git snapshot to fix CVEs listed below: +- CVE-2013-1987 + * Thu Mar 07 2013 Peter Hutterer - 0.9.7-4 - autoreconf for aarch64 diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh new file mode 100755 index 0000000..47fdab0 --- /dev/null +++ b/make-git-snapshot.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DIRNAME=libXrender-$( date +%Y%m%d ) + +rm -rf $DIRNAME +git clone git://git.freedesktop.org/git/xorg/lib/libXrender $DIRNAME +cd $DIRNAME +if [ -z "$1" ]; then + git log | head -1 +else + git checkout $1 +fi +git log | head -1 | awk '{ print $2 }' > ../commitid +git repack -a -d +cd .. +tar jcf $DIRNAME.tar.bz2 $DIRNAME +rm -rf $DIRNAME diff --git a/sources b/sources index 50c42af..a77f2c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee62f4c7f0f16ced4da63308963ccad2 libXrender-0.9.7.tar.bz2 +01816693bcb951b3c5decd7c520431fb libXrender-20130524.tar.bz2