From 8f3429c92dae3035a1fcb5c11c36722b47eeea74 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 24 May 2013 14:29:09 +1000 Subject: [PATCH] Update to latest git to fix the following CVEs: - CVE-2013-1983 --- .gitignore | 1 + commitid | 1 + libXfixes.spec | 22 ++++++++++++++++++---- make-git-snapshot.sh | 17 +++++++++++++++++ sources | 3 +-- 5 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 commitid create mode 100755 make-git-snapshot.sh diff --git a/.gitignore b/.gitignore index 5b84522..f6b9c26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ libXfixes-4.0.5.tar.bz2 /libXfixes-5.0.tar.bz2 +/libXfixes-20130524.tar.bz2 diff --git a/commitid b/commitid new file mode 100644 index 0000000..0440731 --- /dev/null +++ b/commitid @@ -0,0 +1 @@ +c480fe3271873ec7471b0cbd680f4dac18ca8904 diff --git a/libXfixes.spec b/libXfixes.spec index a830749..dc6251b 100644 --- a/libXfixes.spec +++ b/libXfixes.spec @@ -1,12 +1,22 @@ +%global tarball libXfixes +%global gitdate 20130524 +%global gitversion c480fe327 + Summary: X Fixes library Name: libXfixes Version: 5.0 -Release: 5%{?dist} +Release: 6%{?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: pkgconfig libXfixes development package %prep -%setup -q +%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} %build autoreconf -v --install --force @@ -48,7 +58,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc AUTHORS COPYING README ChangeLog +%doc AUTHORS COPYING README %{_libdir}/libXfixes.so.3 %{_libdir}/libXfixes.so.3.1.0 @@ -60,6 +70,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/Xfixes.3* %changelog +* Fri May 24 2013 Peter Hutterer 5.0-6.20130524gitc480fe327 +- Update to latest git to fix the following CVEs: +- CVE-2013-1983 + * Thu Mar 07 2013 Peter Hutterer - 5.0-5 - autoreconf for aarch64 diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh new file mode 100755 index 0000000..f898020 --- /dev/null +++ b/make-git-snapshot.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DIRNAME=libXfixes-$( date +%Y%m%d ) + +rm -rf $DIRNAME +git clone git://git.freedesktop.org/git/xorg/lib/libXfixes $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 d7072ee..19a373f 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -1b4b8386bd5d1751b2c7177223ad4629 libXfixes-4.0.5.tar.bz2 -678071bd7f9f7467e2fc712d81022318 libXfixes-5.0.tar.bz2 +66eae2f03f8cfd3d12633992eaa1d6ce libXfixes-20130524.tar.bz2