Bug#856810: unblock (pre-approval): opentyrian/2.1.20130907+dfsg-2
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
opentyrian (contrib) uses game-data-packager to package its data files
(which are freely downloadable but proprietary, and not under a
sufficiently clear license for non-free). If launched without those data
files, at the moment it silently exits, making users think it has crashed
(#856728, 'important' severity, which I think is proportionate).
Alexandre Detiste has contributed a patch to make opentyrian pop up an
error message using one of several xmessage clones. Would that be OK for
a stretch unblock?
Proposed debdiff attached.
S
diffstat for opentyrian-2.1.20130907+dfsg opentyrian-2.1.20130907+dfsg
changelog | 17 +++++++++++
control | 6 ++--
copyright | 2 -
patches/gdp.patch | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
patches/series | 1
5 files changed, 104 insertions(+), 3 deletions(-)
diff -Nru opentyrian-2.1.20130907+dfsg/debian/changelog opentyrian-2.1.20130907+dfsg/debian/changelog
--- opentyrian-2.1.20130907+dfsg/debian/changelog 2015-04-02 17:20:57.000000000 +0100
+++ opentyrian-2.1.20130907+dfsg/debian/changelog 2017-03-04 22:36:42.000000000 +0000
@@ -1,3 +1,20 @@
+opentyrian (2.1.20130907+dfsg-2) unstable; urgency=medium
+
+ * Team upload.
+
+ [ Alexandre Detiste ]
+ * Display an error message when data is missing (Closes: #856728)
+ * Exit gracefully after displaying that error, in particular resetting
+ the screen resolution if running fullscreen in X11
+ * Use HTTPS for Vcs-* URLs
+ * Update years in Etienne Millon's packaging copyright
+
+ [ Simon McVittie ]
+ * Add Suggests on the programs used to display the message
+ * Add DEP-3 metadata to Alexandre's patch
+
+ -- Simon McVittie <smcv@debian.org> Sat, 04 Mar 2017 22:36:42 +0000
+
opentyrian (2.1.20130907+dfsg-1) unstable; urgency=low
* Initial release (Closes: #553035)
diff -Nru opentyrian-2.1.20130907+dfsg/debian/control opentyrian-2.1.20130907+dfsg/debian/control
--- opentyrian-2.1.20130907+dfsg/debian/control 2015-04-01 10:39:01.000000000 +0100
+++ opentyrian-2.1.20130907+dfsg/debian/control 2017-03-04 22:36:42.000000000 +0000
@@ -10,8 +10,8 @@
libsdl-net1.2-dev,
Standards-Version: 3.9.6
Homepage: https://bitbucket.org/opentyrian/opentyrian/
-Vcs-Git: git://anonscm.debian.org/pkg-games/opentyrian.git
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/opentyrian.git
+Vcs-Git: https://anonscm.debian.org/git/pkg-games/opentyrian.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-games/opentyrian.git
Package: opentyrian
Architecture: any
@@ -19,6 +19,8 @@
${shlibs:Depends},
${misc:Depends},
tyrian-data | game-data-packager (>= 40),
+Suggests:
+ zenity | kde-baseapps-bin | x11-utils | libnotify-bin,
Description: open-source port of the DOS shoot-em-up Tyrian
Tyrian is an arcade-style vertical scrolling shooter. The story is set in
20,031 where you play as Trent Hawkins, a skilled fighter-pilot employed to
diff -Nru opentyrian-2.1.20130907+dfsg/debian/copyright opentyrian-2.1.20130907+dfsg/debian/copyright
--- opentyrian-2.1.20130907+dfsg/debian/copyright 2015-04-02 17:20:58.000000000 +0100
+++ opentyrian-2.1.20130907+dfsg/debian/copyright 2017-03-04 22:36:42.000000000 +0000
@@ -7,7 +7,7 @@
License: GPL-2+
Files: debian/*
-Copyright: 2013-2014, Etienne Millon
+Copyright: 2013-2015, Etienne Millon
2015, Alexandre Detiste
License: GPL-2+
diff -Nru opentyrian-2.1.20130907+dfsg/debian/patches/gdp.patch opentyrian-2.1.20130907+dfsg/debian/patches/gdp.patch
--- opentyrian-2.1.20130907+dfsg/debian/patches/gdp.patch 1970-01-01 01:00:00.000000000 +0100
+++ opentyrian-2.1.20130907+dfsg/debian/patches/gdp.patch 2017-03-04 22:36:42.000000000 +0000
@@ -0,0 +1,81 @@
+From: Alexandre Detiste <alexandre.detiste@gmail.com>
+Subject: Display an error message when data is missing
+Date: Sat, 04 Mar 2017 20:59:30 +0100
+
+A version of this patch has been forwarded upstream; this is a cut-down
+version suitable for Debian stretch.
+
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856728
+Forwarded: https://bitbucket.org/opentyrian/opentyrian/pull-requests/6
+
+--- a/src/varz.c
++++ b/src/varz.c
+@@ -16,6 +16,10 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
++#ifdef TARGET_UNIX
++#include <unistd.h>
++#endif
++
+ #include "config.h"
+ #include "editship.h"
+ #include "episodes.h"
+@@ -498,6 +502,38 @@
+ }
+
+ SDL_Quit();
++
++#ifdef TARGET_UNIX
++#define MISSING_TEXT "One or more of the required Tyrian " TYRIAN_VERSION " data files could not be found.\n" \
++ "These can be installed using game-data-packager.\n"
++ if (code == 1)
++ {
++ char* argv[6];
++ pid_t child_pid;
++ child_pid = fork();
++ if(child_pid == 0) {
++ argv[0] = "zenity";
++ argv[1] = "--error";
++ argv[2] = "--text=" MISSING_TEXT;
++ argv[3] = "--title=Tyrian";
++ argv[4] = NULL;
++ execvp(argv[0], argv);
++ argv[0] = "kdialog";
++ argv[2] = MISSING_TEXT;
++ execvp(argv[0], argv);
++ argv[0] = "xmessage";
++ argv[1] = "-center";
++ argv[3] = NULL;
++ execvp(argv[0], argv);
++ argv[0] = "notify-send";
++ argv[1] = "Tyrian";
++ argv[3] = "-i";
++ argv[4] = "dialog-error";
++ argv[5] = NULL;
++ execvp(argv[0], argv);
++ }
++ }
++#endif
+ exit(code);
+ }
+
+--- a/src/file.c
++++ b/src/file.c
+@@ -18,6 +18,7 @@
+ */
+ #include "file.h"
+ #include "opentyr.h"
++#include "varz.h"
+
+ #include "SDL.h"
+ #include <errno.h>
+@@ -96,7 +97,7 @@
+ fprintf(stderr, "error: failed to open '%s': %s\n", file, strerror(errno));
+ fprintf(stderr, "error: One or more of the required Tyrian " TYRIAN_VERSION " data files could not be found.\n"
+ " Please read the README file.\n");
+- exit(1);
++ JE_tyrianHalt(1);
+ }
+
+ return f;
diff -Nru opentyrian-2.1.20130907+dfsg/debian/patches/series opentyrian-2.1.20130907+dfsg/debian/patches/series
--- opentyrian-2.1.20130907+dfsg/debian/patches/series 2015-03-31 22:00:44.000000000 +0100
+++ opentyrian-2.1.20130907+dfsg/debian/patches/series 2017-03-04 22:36:42.000000000 +0000
@@ -2,3 +2,4 @@
uninitialized-vars.patch
cppflags.patch
check-return-values.patch
+gdp.patch
Reply to: