From 06b938c22ae6d65d12bc42028fa4c7604af869ea Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 24 May 2013 16:11:01 +1000 Subject: [PATCH] update for CVE fixes (CVE-2013-1988) --- .gitignore | 1 + commitid | 1 + libXres.spec | 19 ++++++++++++++++--- make-git-snapshot.sh | 17 +++++++++++++++++ sources | 2 +- 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 commitid create mode 100755 make-git-snapshot.sh diff --git a/.gitignore b/.gitignore index e51e032..2a6ba26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ libXres-1.0.4.tar.bz2 /libXres-1.0.5.tar.bz2 /libXres-1.0.6.tar.bz2 +/libXres-20130524.tar.bz2 diff --git a/commitid b/commitid new file mode 100644 index 0000000..d752811 --- /dev/null +++ b/commitid @@ -0,0 +1 @@ +f468184963e53feda848853c4aefd0197b2cc116 diff --git a/libXres.spec b/libXres.spec index 9aaa7a0..9239f34 100644 --- a/libXres.spec +++ b/libXres.spec @@ -1,12 +1,22 @@ +%global tarball libXres +%global gitdate 20130524 +%global gitversion f46818496 + Summary: X-Resource extension client library Name: libXres Version: 1.0.6 -Release: 4%{?dist} +Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.x.org +%if 0%{?gitdate} +Source0: %{tarball}-%{gitdate}.tar.bz2 +Source1: make-git-snapshot.sh +Source2: commitid +%else Source0: ftp://ftp.x.org/pub/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 libXres 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 ChangeLog +%doc AUTHORS COPYING %{_libdir}/libXRes.so.1 %{_libdir}/libXRes.so.1.0.0 @@ -61,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/*.3* %changelog +* Fri May 24 2013 Dave Airlie 1.0.6-5.20130524gitf46818496 +- update for CVE fixes (CVE-2013-1988) + * Thu Mar 07 2013 Peter Hutterer - 1.0.6-4 - autoreconf for aarch64 diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh new file mode 100755 index 0000000..dd5ac16 --- /dev/null +++ b/make-git-snapshot.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DIRNAME=libXres-$( date +%Y%m%d ) + +rm -rf $DIRNAME +git clone git://git.freedesktop.org/git/xorg/lib/libXRes $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 aa99cae..be275a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -80d0c6d8522fa7a645e4f522e9a9cd20 libXres-1.0.6.tar.bz2 +105c04ecffa9474cd83a11404f663c07 libXres-20130524.tar.bz2