From 7c9a499772ed3b64cefb9b5dcd8b891ba408778d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 24 May 2013 15:32:06 +1000 Subject: [PATCH] Update to git snapshot to fix the following CVEs: - CVE-2013-2001 --- .gitignore | 1 + commitid | 1 + libXxf86vm.spec | 23 +++++++++++++++++++---- make-git-snapshot.sh | 17 +++++++++++++++++ sources | 2 +- 5 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 commitid create mode 100755 make-git-snapshot.sh diff --git a/.gitignore b/.gitignore index 07538ec..afd8475 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ libXxf86vm-1.1.0.tar.bz2 /libXxf86vm-1.1.1.tar.bz2 /libXxf86vm-1.1.2.tar.bz2 +/libXxf86vm-20130524.tar.bz2 diff --git a/commitid b/commitid new file mode 100644 index 0000000..78ea717 --- /dev/null +++ b/commitid @@ -0,0 +1 @@ +4c4123441e40da97acd10f58911193ad3dcef5cd diff --git a/libXxf86vm.spec b/libXxf86vm.spec index 3131703..b287e8b 100644 --- a/libXxf86vm.spec +++ b/libXxf86vm.spec @@ -1,11 +1,22 @@ +%global tarball libXxf86vm +%global gitdate 20130524 +%global gitversion 4c4123441 + Summary: X.Org X11 libXxf86vm runtime library Name: libXxf86vm Version: 1.1.2 -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 @@ -23,7 +34,7 @@ Requires: %{name} = %{version}-%{release} X.Org X11 libXxf86vm development package %prep -%setup -q +%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} %build autoreconf -v --install --force @@ -40,7 +51,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %files %defattr(-,root,root,-) -%doc README COPYING ChangeLog +%doc README COPYING %{_libdir}/libXxf86vm.so.1 %{_libdir}/libXxf86vm.so.1.0.0 @@ -52,6 +63,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_includedir}/X11/extensions/xf86vmode.h %changelog +* Fri May 24 2013 Peter Hutterer 1.1.2-5.20130524git4c4123441 +- Update to git snapshot to fix the following CVEs: +- CVE-2013-2001 + * Thu Mar 07 2013 Peter Hutterer - 1.1.2-4 - autoreconf for aarch64 diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh new file mode 100755 index 0000000..51f6e54 --- /dev/null +++ b/make-git-snapshot.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DIRNAME=libXxf86vm-$( date +%Y%m%d ) + +rm -rf $DIRNAME +git clone git://git.freedesktop.org/git/xorg/lib/libXxf86vm $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 976c87c..14924b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ffd93bcedd8b2b5aeabf184e7b91f326 libXxf86vm-1.1.2.tar.bz2 +2ac9d713ebf280dcf97c8664e597dd52 libXxf86vm-20130524.tar.bz2