[pkg-fgfs-crew] flightgear 3.4.1
Rebecca N. Palmer
rebecca_palmer at zoho.com
Mon Apr 6 14:56:08 UTC 2015
Lintian found a few issues in flightgear: fixed version attached.
I have now tested them (in Ubuntu and Debian): everything appears to work.
The >=3.4.1 build-dependency is to enforce that simgear gets built
before flightgear, as the simgear bug fix is in a header.
Ignore the flightgear-data-base: package-contains-broken-symlink lintian
warnings, it's a known issue (#776535) that this can't check links to
packages built from different source packages, and it is hence planned
to move this check to piuparts (#709003).
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 302afeb..2a0c620 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,16 @@
-flightgear (3.4.0-0~exp2) UNRELEASED; urgency=high
+flightgear (3.4.1-1) UNRELEASED; urgency=high
+ [ Markus Wanner ]
* Drop the deprecated JPEG_FACTORY option for cmake.
- * Rebase on 3.0.0-5, effectively adding patch 6a30e70.patch.
- * Set ENABLE_QT=ON and add a B-D on qtbase5-dev to build the
- flightgear launcher. Change flightgear.desktop to use that
- launcher, rather than starting fgfs with default settings.
* Tighten B-D on sqlite3 and htsengine. Versions before the given
ones are known to not work.
+ [ Rebecca N. Palmer ]
+ * New upstream release.
+ * Update simgear and flightgear-data required versions.
+ * Remove /tmp/*.xml from allowed Nasal paths. Closes: #780867.
+ * Add spelling.patch.
+
-- Markus Wanner <markus at bluegap.ch> Wed, 18 Mar 2015 11:52:01 +0100
flightgear (3.4.0-0~exp1) experimental; urgency=medium
diff --git a/debian/control b/debian/control
index 54ce716..33b1300 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 9.20120417), libx11-dev, libxext-dev,
libjpeg-dev,
libpng12-dev | libpng3-dev | libpng-dev,
libopenscenegraph-dev (>= 3.2.0~),
- libsimgear-dev (>= 3.4.0~), libsimgear-dev (<= 3.4.99),
+ libsimgear-dev (>= 3.4.1~), libsimgear-dev (<= 3.4.99),
libsqlite3-dev (>= 3.7.14~),
libudev-dev [linux-any],
libusbhid-dev [kfreebsd-any],
@@ -23,8 +23,7 @@ Build-Depends: debhelper (>= 9.20120417), libx11-dev, libxext-dev,
libspeex-dev,
libspeexdsp-dev,
flite1-dev,
- libhtsengine-dev (>= 1.07~),
- qtbase5-dev
+ libhtsengine-dev (>= 1.07~)
Standards-Version: 3.9.6
Homepage: http://www.flightgear.org/
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/flightgear.git
@@ -32,7 +31,7 @@ Vcs-Git: git://anonscm.debian.org/collab-maint/flightgear.git
Package: flightgear
Architecture: any
-Depends: flightgear-data-all (>= 3.4.0~), ${shlibs:Depends},
+Depends: flightgear-data-all (>= 3.4.1~), ${shlibs:Depends},
${misc:Depends}
Description: Flight Gear Flight Simulator
FlightGear Flight Simulator (often shortened to FlightGear or FGFS)
diff --git a/debian/copyright b/debian/copyright
index 9a4eae4..992b7f3 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -237,9 +237,15 @@ Files: 3rdparty/cjson/*
Copyright: 2009 Dave Gamble
License: MIT
-Files: 3rdparty/sqlite/*
+Files: 3rdparty/sqlite3/*
Copyright: *No copyright*
-License: Public-domain
+License: public-domain
+ The author disclaims copyright to this source code. In place of
+ a legal notice, here is a blessing:
+ .
+ May you do good and not evil.
+ May you find forgiveness for yourself and forgive others.
+ May you share freely, never taking more than you give.
Files: debian/*
Copyright: 1997-1999 Joey Hess
@@ -321,3 +327,4 @@ License: MIT
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+
diff --git a/debian/flightgear.desktop b/debian/flightgear.desktop
index e2a5d1a..6b0862f 100644
--- a/debian/flightgear.desktop
+++ b/debian/flightgear.desktop
@@ -3,7 +3,7 @@ Type=Application
Version=1.4
Name=FlightGear
GenericName=Flight Simulator
-Exec=fgfs --launcher
+Exec=fgfs
Terminal=false
Categories=Game;Simulation
Comment=open-source flight simulator
diff --git a/debian/patches/6a30e7.patch b/debian/patches/6a30e7.patch
deleted file mode 100644
index 2ed968a..0000000
--- a/debian/patches/6a30e7.patch
+++ /dev/null
@@ -1,217 +0,0 @@
-Description: Restrict file access for Nasal scripts.
- Stop using property listener for fgValidatePath
- .
- This was insecure: while removelistener() won't remove it, there are
- other ways to remove a listener from Nasal
-Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
-Last-Update: 13-03-2015
-Origin: http://sourceforge.net/p/flightgear/flightgear/ci/6a30e7086ea2f1a060dd77dab6e7e8a15b43e82d
-
---- a/src/Main/util.cxx
-+++ b/src/Main/util.cxx
-@@ -33,6 +33,7 @@
- #include <simgear/math/SGLimits.hxx>
- #include <simgear/math/SGMisc.hxx>
-
-+#include <GUI/MessageBox.hxx>
- #include "fg_io.hxx"
- #include "fg_props.hxx"
- #include "globals.hxx"
-@@ -71,32 +72,142 @@
- return current;
- }
-
--// Write out path to validation node and read it back in. A Nasal
--// listener is supposed to replace the path with a validated version
--// or an empty string otherwise.
--const char *fgValidatePath (const char *str, bool write)
-+static string_list read_allowed_paths;
-+static string_list write_allowed_paths;
-+
-+// Allowed paths here are absolute, and may contain _one_ *,
-+// which matches any string
-+// FG_SCENERY is deliberately not allowed, as it would make
-+// /sim/terrasync/scenery-dir a security hole
-+void fgInitAllowedPaths()
- {
-- SGPropertyNode_ptr r, w;
-- r = fgGetNode("/sim/paths/validate/read", true);
-- r->setAttribute(SGPropertyNode::READ, true);
-- r->setAttribute(SGPropertyNode::WRITE, true);
--
-- w = fgGetNode("/sim/paths/validate/write", true);
-- w->setAttribute(SGPropertyNode::READ, true);
-- w->setAttribute(SGPropertyNode::WRITE, true);
--
-- SGPropertyNode *prop = write ? w : r;
-- prop->setStringValue(str);
-- const char *result = prop->getStringValue();
-- return result[0] ? result : 0;
-+ read_allowed_paths.clear();
-+ write_allowed_paths.clear();
-+ read_allowed_paths.push_back(globals->get_fg_root() + "/*");
-+ read_allowed_paths.push_back(globals->get_fg_home() + "/*");
-+ string_list const aircraft_paths = globals->get_aircraft_paths();
-+ for( string_list::const_iterator it = aircraft_paths.begin();
-+ it != aircraft_paths.end();
-+ ++it )
-+ {
-+ read_allowed_paths.push_back(*it + "/*");
-+ }
-+
-+ for( string_list::const_iterator it = read_allowed_paths.begin();
-+ it != read_allowed_paths.end();
-+ ++it )
-+ { // if we get the initialization order wrong, better to have an
-+ // obvious error than a can-read-everything security hole...
-+ if (!(it->compare("/*"))){
-+ flightgear::fatalMessageBox("Nasal initialization error",
-+ "Empty string in FG_ROOT, FG_HOME or FG_AIRCRAFT",
-+ "or fgInitAllowedPaths() called too early");
-+ exit(-1);
-+ }
-+ }
-+ write_allowed_paths.push_back("/tmp/*.xml");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/*.sav");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/*.log");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/cache/*");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/Export/*");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/state/*.xml");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/aircraft-data/*.xml");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/Wildfire/*.xml");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/runtime-jetways/*.xml");
-+ write_allowed_paths.push_back(globals->get_fg_home() + "/Input/Joysticks/*.xml");
-+
-+ if(!fgValidatePath(globals->get_fg_home() + "/../no.log",true).empty() ||
-+ !fgValidatePath(globals->get_fg_home() + "/no.lot",true).empty() ||
-+ fgValidatePath((globals->get_fg_home() + "/nolog").c_str(),true) ||
-+ !fgValidatePath(globals->get_fg_home() + "no.log",true).empty() ||
-+ !fgValidatePath("..\\" + globals->get_fg_home() + "/no.log",false).empty() ||
-+ fgValidatePath("/tmp/no.xml",false) ||
-+ fgValidatePath(globals->get_fg_home() + "/./ff/../Export\\yes..gg",true).empty() ||
-+ !fgValidatePath((globals->get_fg_home() + "/aircraft-data/yes..xml").c_str(),true) ||
-+ fgValidatePath(globals->get_fg_root() + "/./\\yes.bmp",false).empty()) {
-+ flightgear::fatalMessageBox("Nasal initialization error",
-+ "fgInitAllowedPaths() does not work",
-+ "");
-+ exit(-1);
-+ }
- }
-
--//------------------------------------------------------------------------------
--std::string fgValidatePath(const std::string& path, bool write)
-+// Normalize a path
-+// Unlike SGPath::realpath, does not require that the file already exists,
-+// but does require that it be below the starting point
-+static std::string fgNormalizePath (const std::string& path)
- {
-- const char* validate_path = fgValidatePath(path.c_str(), write);
-- return std::string(validate_path ? validate_path : "");
--}
-+ string_list path_parts;
-+ char c;
-+ std::string normed_path = "", this_part = "";
-+
-+ for (int pos = 0; ; pos++) {
-+ c = path[pos];
-+ if (c == '\\') { c = '/'; }
-+ if ((c == '/') || (c == 0)) {
-+ if ((this_part == "/..") || (this_part == "..")) {
-+ if (path_parts.empty()) { return ""; }
-+ path_parts.pop_back();
-+ } else if ((this_part != "/.") && (this_part != "/")) {
-+ path_parts.push_back(this_part);
-+ }
-+ this_part = "";
-+ }
-+ if (c == 0) { break; }
-+ this_part = this_part + c;
-+ }
-+ for( string_list::const_iterator it = path_parts.begin();
-+ it != path_parts.end();
-+ ++it )
-+ {
-+ normed_path.append(*it);
-+ }
-+ return normed_path;
-+ }
-+
-
-+// Check whether Nasal is allowed to access a path
-+std::string fgValidatePath (const std::string& path, bool write)
-+{
-+ const string_list& allowed_paths(write ? write_allowed_paths : read_allowed_paths);
-+ int star_pos;
-+
-+ // Normalize the path (prevents ../../.. trickery)
-+ std::string normed_path = fgNormalizePath(path);
-+
-+ // Check against each allowed pattern
-+ for( string_list::const_iterator it = allowed_paths.begin();
-+ it != allowed_paths.end();
-+ ++it )
-+ {
-+ star_pos = it->find('*');
-+ if (star_pos == std::string::npos) {
-+ if (!(it->compare(normed_path))) {
-+ return normed_path;
-+ }
-+ } else {
-+ if ((it->size()-1 <= normed_path.size()) /* long enough to be a potential match */
-+ && !(it->substr(0,star_pos)
-+ .compare(normed_path.substr(0,star_pos))) /* before-star parts match */
-+ && !(it->substr(star_pos+1,it->size()-star_pos-1)
-+ .compare(normed_path.substr(star_pos+1+normed_path.size()-it->size(),
-+ it->size()-star_pos-1))) /* after-star parts match */) {
-+ return normed_path;
-+ }
-+ }
-+ }
-+ // no match found
-+ return "";
-+}
-+// s.c_str() becomes invalid when s is destroyed, so need a static s
-+std::string validate_path_temp;
-+const char* fgValidatePath(const char* path, bool write)
-+{
-+ validate_path_temp = fgValidatePath(std::string(path), write);
-+ if(validate_path_temp.empty()){
-+ return 0;
-+ }
-+ return validate_path_temp.c_str();
-+}
- // end of util.cxx
-
---- a/src/Main/util.hxx
-+++ b/src/Main/util.hxx
-@@ -36,7 +36,7 @@
- double fgGetLowPass (double current, double target, double timeratio);
-
- /**
-- * Validation listener interface for io.nas, used by fgcommands.
-+ * File access control, used by Nasal and fgcommands.
- * @param path Path to be validated
- * @param write True for write operations and false for read operations.
- * @return The validated path on success or 0 if access denied.
-@@ -44,4 +44,9 @@
- const char *fgValidatePath (const char *path, bool write);
- std::string fgValidatePath(const std::string& path, bool write);
-
-+/**
-+ * Set allowed paths for fgValidatePath
-+ */
-+void fgInitAllowedPaths();
-+
- #endif // __UTIL_HXX
---- a/src/Scripting/NasalSys.cxx
-+++ b/src/Scripting/NasalSys.cxx
-@@ -800,6 +800,9 @@
- .member("singleShot", &TimerObj::isSingleShot, &TimerObj::setSingleShot)
- .member("isRunning", &TimerObj::isRunning);
-
-+ // Set allowed paths for Nasal I/O
-+ fgInitAllowedPaths();
-+
- // Now load the various source files in the Nasal directory
- simgear::Dir nasalDir(SGPath(globals->get_fg_root(), "Nasal"));
- loadScriptDirectory(nasalDir);
diff --git a/debian/patches/780867.patch b/debian/patches/780867.patch
new file mode 100644
index 0000000..d86ca38
--- /dev/null
+++ b/debian/patches/780867.patch
@@ -0,0 +1,19 @@
+Description: Remove /tmp/*.xml from allowed paths list
+
+Author: Rebecca Palmer <rebecca_palmer at zoho.com>
+Bug-Debian: https://bugs.debian.org/780867
+Forwarded: http://sourceforge.net/p/flightgear/flightgear/ci/51bfdc21e0b4528797697d32664eacb15d297449/
+
+diff --git a/src/Main/util.cxx b/src/Main/util.cxx
+index c3bcdfe..a3ea1b9 100644
+--- a/src/Main/util.cxx
++++ b/src/Main/util.cxx
+@@ -140,7 +140,6 @@ void fgInitAllowedPaths()
+ exit(-1);
+ }
+ }
+- write_allowed_paths.push_back("/tmp/*.xml");
+ write_allowed_paths.push_back(fg_home + "/*.sav");
+ write_allowed_paths.push_back(fg_home + "/*.log");
+ write_allowed_paths.push_back(fg_home + "/cache/*");
+
diff --git a/debian/patches/series b/debian/patches/series
index 9208392..e8d07d1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-6a30e7.patch
+780867.patch
+spelling.patch
diff --git a/debian/patches/spelling.patch b/debian/patches/spelling.patch
new file mode 100644
index 0000000..166a188
--- /dev/null
+++ b/debian/patches/spelling.patch
@@ -0,0 +1,68 @@
+Description: Fix spelling
+
+Author: Rebecca Palmer <rebecca_palmer at zoho.com>
+Origin: lintian
+Forwarded: http://sourceforge.net/p/flightgear/flightgear/ci/659c5b9676a0c11b169926c09014bea547a6ee93/
+
+--- flightgear-3.4.1.orig/src/Instrumentation/KLN89/kln89.hxx
++++ flightgear-3.4.1/src/Instrumentation/KLN89/kln89.hxx
+@@ -226,7 +226,7 @@ private:
+ // Apt, VOR and SUA drawing can be suspended by setting draw_avs to false, without affecting the stored drawing preference state.
+ void DrawMap(bool draw_avs = true);
+
+- // Set whether the display should be draw pixelated (more primatives, but might be closer to real-life)
++ // Set whether the display should be drawn pixelated (more primitives, but might be closer to real-life)
+ // or not (in which case it is assumed that pixels are square and can be merged into quads).
+ bool _pixelated;
+
+@@ -251,7 +251,7 @@ private:
+
+ // The currently active page
+ KLN89Page* _activePage;
+- // And a facility to save the immediately preceeding active page
++ // And a facility to save the immediately preceding active page
+ KLN89Page* _lastActivePage;
+
+ // Ugly hack. Housekeeping to allow us to temporarily display one page, while remembering which
+--- flightgear-3.4.1.orig/src/Main/options.cxx
++++ flightgear-3.4.1/src/Main/options.cxx
+@@ -1821,7 +1821,7 @@ public:
+ }
+
+ /**
+- * given a current iterator into the values, find the preceeding group marker,
++ * given a current iterator into the values, find the preceding group marker,
+ * or return the beginning of the value vector.
+ */
+ OptionValueVec::const_iterator rfindGroup(OptionValueVec::const_iterator pos) const
+--- flightgear-3.4.1.orig/src/Navaids/routePath.cxx
++++ flightgear-3.4.1/src/Navaids/routePath.cxx
+@@ -701,7 +701,7 @@ public:
+ }
+
+ if (index == 0) {
+- SG_LOG(SG_NAVAID, SG_WARN, "findPreceedingKnownAltitude: no preceeding altitude value found");
++ SG_LOG(SG_NAVAID, SG_WARN, "findPreceedingKnownAltitude: no preceding altitude value found");
+ return -1;
+ }
+
+--- flightgear-3.4.1.orig/utils/fgcom/fgcom.cxx
++++ flightgear-3.4.1/utils/fgcom/fgcom.cxx
+@@ -288,7 +288,7 @@ std::multimap<int, Airport> getAirportsD
+ {
+ std::vector<std::string> lines;
+ std::multimap<int, Airport> aptData;
+- SG_LOG(SG_GENERAL, SG_INFO, "Loading aiports informations...");
++ SG_LOG(SG_GENERAL, SG_INFO, "Loading airports information...");
+
+ for(size_t i=0; i < sizeof(_positionsData)/sizeof(*_positionsData); i++) { // _positionsData is provided by positions.hxx
+ std::vector<std::string> entries = simgear::strutils::split(_positionsData[i], ",");
+@@ -425,7 +425,7 @@ int usage()
+ std::cout << " --version - Show version" << std::endl;
+ std::cout << "" << std::endl;
+ std::cout << " None of these options are required, you can simply start FGCom without option at all: it works" << std::endl;
+- std::cout << " For further informations, please visit: http://wiki.flightgear.org/FGCom_3.0" << std::endl;
++ std::cout << " For further information, please visit: http://wiki.flightgear.org/FGCom_3.0" << std::endl;
+ std::cout << "" << std::endl;
+ std::cout << " About silence-threshold:" << std::endl;
+ std::cout << " This is the limit, in dB, when FGCom consider no voice in your microphone." << std::endl;
diff --git a/debian/rules b/debian/rules
index 9e974fc..1f6684e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,7 +26,6 @@ CMAKE_FLAGS = \
-DENABLE_FGADMIN=OFF \
-DENABLE_LARCSIM=ON \
-DENABLE_UIUC_MODEL=ON \
- -DENABLE_QT=ON \
-DSP_FDMS=ON \
-DSYSTEM_SQLITE=ON
More information about the pkg-fgfs-crew
mailing list