From bacecff630b9c92c81192260c2029ecb984eb391 Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Sep 11 2012 15:07:29 +0000 Subject: new upstream release --- diff --git a/.gitignore b/.gitignore index ade419f..dfe328f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ SimGear-2.0.0.tar.gz /simgear-2.4.0.tar.bz2 /simgear-2.6.0.tar.bz2 +/simgear-2.8.0.tar.bz2 diff --git a/0001-add-more-arches.patch b/0001-add-more-arches.patch index f1b9f75..fcd9d9a 100644 --- a/0001-add-more-arches.patch +++ b/0001-add-more-arches.patch @@ -1,25 +1,27 @@ -From c39bf197c059ff2dc12a154b13b9b5b129ec2a05 Mon Sep 17 00:00:00 2001 +From 7eed828813daf4ba9c8b3f393f1c335c63ac179e Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Sun, 22 Jan 2012 14:39:46 +0100 -Subject: [PATCH 1/3] add more arches +Subject: [PATCH 1/4] add more arches +Conflicts: + simgear/nasal/naref.h --- - simgear/nasal/naref.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + simgear/nasal/naref.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/nasal/naref.h b/simgear/nasal/naref.h -index beedece..d9fe70d 100644 +index e52e28a..f9c880b 100644 --- a/simgear/nasal/naref.h +++ b/simgear/nasal/naref.h -@@ -15,7 +15,7 @@ - defined(_M_X64) +@@ -16,7 +16,7 @@ # define NASAL_LE #elif defined(__sparc) || defined(__ppc__) || defined(__PPC) || \ + defined (__powerpc__) || defined (__powerpc64__) || defined (__alpha__) || \ - defined(__mips) || defined(__ARMEB__) -+ defined(__mips) || defined(__ARMEB__) || defined(__powerpc__) || defined(__powerpc64__) || defined(__alpha__) || defined(__s390__) ++ defined(__mips) || defined(__ARMEB__) || defined(__s390__) # define NASAL_BE #else # error Unrecognized CPU architecture -- -1.7.7.6 +1.7.11.4 diff --git a/0002-nuke-old-bundled-copy-of-expat-use-system-expat.patch b/0002-nuke-old-bundled-copy-of-expat-use-system-expat.patch index 0c67f2d..8c46d44 100644 --- a/0002-nuke-old-bundled-copy-of-expat-use-system-expat.patch +++ b/0002-nuke-old-bundled-copy-of-expat-use-system-expat.patch @@ -1,29 +1,29 @@ -From ef78b966702e3463dd7b15d42787346fc6e8f22a Mon Sep 17 00:00:00 2001 +From 971ca2c0270ad00020f99b6f58e362bdee89d21c Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Sun, 22 Jan 2012 14:41:59 +0100 -Subject: [PATCH 2/3] nuke old bundled copy of expat, use system expat +Subject: [PATCH 2/4] nuke old bundled copy of expat, use system expat --- - CMakeLists.txt | 4 +++- - simgear/CMakeLists.txt | 2 +- - simgear/props/CMakeLists.txt | 4 +++- - simgear/xml/CMakeLists.txt | 15 --------------- - simgear/xml/easyxml.cxx | 2 +- - 5 files changed, 8 insertions(+), 19 deletions(-) + CMakeLists.txt | 4 +++- + simgear/CMakeLists.txt | 2 +- + simgear/props/CMakeLists.txt | 4 +++- + simgear/xml/CMakeLists.txt | 19 ------------------- + simgear/xml/easyxml.cxx | 2 +- + 5 files changed, 8 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 037ede6..cdafb35 100644 +index 28f624c..e5d58ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -112,6 +112,7 @@ set (BOOST_CXX_FLAGS "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_BIMAP_DI +@@ -147,6 +147,7 @@ endif(ENABLE_LIBSVN) find_package(ZLIB REQUIRED) find_package(Threads REQUIRED) +find_package(EXPAT REQUIRED) - if(SIMGEAR_HEADLESS) - message(STATUS "headless mode") -@@ -229,7 +230,8 @@ include_directories(${PROJECT_BINARY_DIR}/simgear) + check_include_file(sys/time.h HAVE_SYS_TIME_H) + check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H) +@@ -249,7 +250,8 @@ include_directories(${PROJECT_BINARY_DIR}/simgear/xml) include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} @@ -31,26 +31,26 @@ index 037ede6..cdafb35 100644 + ${ALUT_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR} + ${EXPAT_INCLUDE_DIR} ) - add_definitions(-DHAVE_CONFIG_H) + add_definitions(-DHAVE_EXPAT_CONFIG_H) diff --git a/simgear/CMakeLists.txt b/simgear/CMakeLists.txt -index 684e2ee..4d45799 100644 +index 014b79d..db19b6c 100644 --- a/simgear/CMakeLists.txt +++ b/simgear/CMakeLists.txt -@@ -56,7 +56,7 @@ if(SIMGEAR_SHARED) +@@ -54,7 +54,7 @@ if(SIMGEAR_SHARED) set_property(TARGET SimGearCore PROPERTY VERSION ${SIMGEAR_VERSION}) set_property(TARGET SimGearCore PROPERTY SOVERSION ${SIMGEAR_SOVERSION}) -- target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY}) -+ target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY} ${EXPAT_LIBRARY}) +- target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) ++ target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${EXPAT_LIBRARY}) install(TARGETS SimGearCore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - if(NOT SIMGEAR_HEADLESS) + if(LIBSVN_FOUND) diff --git a/simgear/props/CMakeLists.txt b/simgear/props/CMakeLists.txt -index f0dcbed..b79479e 100644 +index a11e703..44f4eaf 100644 --- a/simgear/props/CMakeLists.txt +++ b/simgear/props/CMakeLists.txt -@@ -27,7 +27,9 @@ if(ENABLE_TESTS) +@@ -28,7 +28,9 @@ if(ENABLE_TESTS) if (SIMGEAR_SHARED) set(TEST_LIBS SimGearCore) else() @@ -62,10 +62,10 @@ index f0dcbed..b79479e 100644 diff --git a/simgear/xml/CMakeLists.txt b/simgear/xml/CMakeLists.txt -index 0365e86..e2dae9e 100644 +index 0cb8d2c..e2dae9e 100644 --- a/simgear/xml/CMakeLists.txt +++ b/simgear/xml/CMakeLists.txt -@@ -7,21 +7,6 @@ set(HEADERS +@@ -7,26 +7,7 @@ set(HEADERS ) set(SOURCES @@ -85,8 +85,13 @@ index 0365e86..e2dae9e 100644 - xmlrole.c - xmltok.c easyxml.cxx +- internal.h +- ascii.h +- expat.h +- expat_external.h ) + simgear_component(xml xml "${SOURCES}" "${HEADERS}") diff --git a/simgear/xml/easyxml.cxx b/simgear/xml/easyxml.cxx index 65a3551..0a5b617 100644 --- a/simgear/xml/easyxml.cxx @@ -101,5 +106,5 @@ index 65a3551..0a5b617 100644 #include #include -- -1.7.7.6 +1.7.11.4 diff --git a/0003-remove-unneeded-header.patch b/0003-remove-unneeded-header.patch index 5fdd920..15cb817 100644 --- a/0003-remove-unneeded-header.patch +++ b/0003-remove-unneeded-header.patch @@ -1,11 +1,11 @@ -From bb277bb11e69ab6cc4cd219c6603ddba1a65400d Mon Sep 17 00:00:00 2001 +From a5e40c53a240f99f66fb0dc65b3cb051ccf22ee9 Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Mon, 30 Jan 2012 22:01:55 +0100 -Subject: [PATCH 3/3] remove unneeded header +Subject: [PATCH 3/4] remove unneeded header --- - simgear/misc/stopwatch.hxx | 4 ---- - 1 files changed, 0 insertions(+), 4 deletions(-) + simgear/misc/stopwatch.hxx | 4 ---- + 1 file changed, 4 deletions(-) diff --git a/simgear/misc/stopwatch.hxx b/simgear/misc/stopwatch.hxx index 3436438..70df459 100644 @@ -23,5 +23,5 @@ index 3436438..70df459 100644 # define HAVE_GETRUSAGE #endif -- -1.7.7.6 +1.7.11.4 diff --git a/0004-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch b/0004-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch new file mode 100644 index 0000000..dfc64bc --- /dev/null +++ b/0004-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch @@ -0,0 +1,34 @@ +From 73dfec85365498bcf8773db7431c3f384638493e Mon Sep 17 00:00:00 2001 +From: Fabrice Bellet +Date: Fri, 20 Jul 2012 14:32:32 +0200 +Subject: [PATCH 4/4] check to be sure that %n is not being set as format type + (CVE-2012-2090) + +--- + simgear/scene/model/SGText.cxx | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/simgear/scene/model/SGText.cxx b/simgear/scene/model/SGText.cxx +index e87b48a..f0a7518 100644 +--- a/simgear/scene/model/SGText.cxx ++++ b/simgear/scene/model/SGText.cxx +@@ -65,6 +65,16 @@ void SGText::UpdateCallback::operator()(osg::Node * node, osg::NodeVisitor *nv ) + // FIXME: + // hopefully the users never specifies bad formats here + // this should better be something more robust ++ // It is never safe for format.c_str to be %n. ++ string unsafe ("%n"); ++ size_t found; ++ ++ found=format.find(unsafe); ++ if (found!=string::npos) { ++ SG_LOG(SG_GENERAL, SG_ALERT, "format type contained %n, but this is unsafe, reverting to %s"); ++ format = "%s"; ++ } ++ + char buf[256]; + if( numeric ) { + double d = property->getDoubleValue() * scale + offset; +-- +1.7.11.4 + diff --git a/SimGear.spec b/SimGear.spec index 6c47e77..1e2edf3 100644 --- a/SimGear.spec +++ b/SimGear.spec @@ -1,23 +1,26 @@ Name: SimGear -Version: 2.6.0 -Release: 3%{?dist} +Version: 2.8.0 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Libraries Summary: Simulation library components URL: http://simgear.sourceforge.net Source0: http://mirrors.ibiblio.org/pub/mirrors/simgear/ftp/Source/simgear-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# upstream a81dd2adf +Patch0: simgear-2.8.0-fix-underlinking.patch Patch1: 0001-add-more-arches.patch Patch2: 0002-nuke-old-bundled-copy-of-expat-use-system-expat.patch Patch3: 0003-remove-unneeded-header.patch -Patch4: simgear-2.6.0-check-for-%n-in-format-string.patch +Patch4: 0004-check-to-be-sure-that-n-is-not-being-set-as-format-t.patch BuildRequires: openal-soft-devel, plib-devel >= 1.8.5 BuildRequires: OpenSceneGraph-devel >= 2.8.0 BuildRequires: boost-devel >= 1.37.0 BuildRequires: libXt-devel, libXext-devel -BuildRequires: libXi-devel, libXmu-devel, freeglut-devel, freealut-devel +BuildRequires: libXi-devel, libXmu-devel, freealut-devel BuildRequires: zlib-devel, libjpeg-devel BuildRequires: expat-devel, apr-devel +BuildRequires: cmake %description SimGear is a set of open-source libraries designed to be used as building @@ -37,6 +40,7 @@ SimGear. %prep %setup -q -n simgear-%{version} +%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch4 -p1 -b .checkforn @@ -84,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libSimGearScene.so %changelog +* Tue Sep 11 2012 Fabrice Bellet 2.8.0-1 +- new upstream release + * Wed Jul 18 2012 Fedora Release Engineering - 2.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/simgear-2.6.0-check-for-%n-in-format-string.patch b/simgear-2.6.0-check-for-%n-in-format-string.patch deleted file mode 100644 index 8eaea1d..0000000 --- a/simgear-2.6.0-check-for-%n-in-format-string.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up simgear-2.6.0/simgear/scene/model/SGText.cxx.checkforn simgear-2.6.0/simgear/scene/model/SGText.cxx ---- simgear-2.6.0/simgear/scene/model/SGText.cxx.checkforn 2012-02-17 17:38:44.563895660 -0500 -+++ simgear-2.6.0/simgear/scene/model/SGText.cxx 2012-05-29 20:31:35.347601886 -0400 -@@ -65,6 +65,16 @@ void SGText::UpdateCallback::operator()( - // FIXME: - // hopefully the users never specifies bad formats here - // this should better be something more robust -+ // It is never safe for format.c_str to be %n. -+ string unsafe ("%n"); -+ size_t found; -+ -+ found=format.find(unsafe); -+ if (found!=string::npos) { -+ SG_LOG(SG_GENERAL, SG_ALERT, "format type contained %n, but this is unsafe, reverting to %s"); -+ format = "%s"; -+ } -+ - char buf[256]; - if( numeric ) { - double d = property->getDoubleValue() * scale + offset; diff --git a/simgear-2.8.0-fix-underlinking.patch b/simgear-2.8.0-fix-underlinking.patch new file mode 100644 index 0000000..ffc8173 --- /dev/null +++ b/simgear-2.8.0-fix-underlinking.patch @@ -0,0 +1,19 @@ +commit a81dd2adf20e1b398f930545b32e3140fa1ac19b +Author: Julian Ospald +Date: Tue Aug 28 10:37:22 2012 +0200 + + CMake: fix underlinking + +diff --git a/simgear/CMakeLists.txt b/simgear/CMakeLists.txt +index 46a22b6..014b79d 100644 +--- a/simgear/CMakeLists.txt ++++ b/simgear/CMakeLists.txt +@@ -54,7 +54,7 @@ if(SIMGEAR_SHARED) + set_property(TARGET SimGearCore PROPERTY VERSION ${SIMGEAR_VERSION}) + set_property(TARGET SimGearCore PROPERTY SOVERSION ${SIMGEAR_SOVERSION}) + +- target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY}) ++ target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) + install(TARGETS SimGearCore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + if(LIBSVN_FOUND) diff --git a/sources b/sources index b7fdab2..59bfae5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -24a368754d10e50d7f3ec00f93891a89 simgear-2.6.0.tar.bz2 +0a8c77439ba7879b354a8fbcb7901ce3 simgear-2.8.0.tar.bz2