[nazghul] Actually get it building again.
Jason ティビツ
tibbs at fedoraproject.org
Sat Feb 21 19:56:49 UTC 2015
commit 8e8f44e0335f8c16bdbd551c01a040a378bf98e1
Author: Jason Tibbitts <tibbs at math.uh.edu>
Date: Sat Feb 21 13:56:33 2015 -0600
Actually get it building again.
nazghul-desktop.patch | 4 +--
nazghul-format-security.patch | 58 +++++++++++++++++++++++++++++++++++++++++++
nazghul.spec | 14 +++++++----
3 files changed, 69 insertions(+), 7 deletions(-)
---
diff --git a/nazghul-desktop.patch b/nazghul-desktop.patch
index 8880ff5..36d3d82 100644
--- a/nazghul-desktop.patch
+++ b/nazghul-desktop.patch
@@ -1,5 +1,5 @@
---- haxima.desktop.orig 2007-01-26 16:42:48.000000000 -0600
-+++ haxima.desktop 2009-04-14 11:21:43.000000000 -0500
+--- haxima.orig/haxima.desktop 2007-01-26 16:42:48.000000000 -0600
++++ haxima/haxima.desktop 2009-04-14 11:21:43.000000000 -0500
@@ -4,8 +4,8 @@
GenericName=Role Playing Game
Comment=An old school role playing game
diff --git a/nazghul-format-security.patch b/nazghul-format-security.patch
new file mode 100644
index 0000000..0a86a11
--- /dev/null
+++ b/nazghul-format-security.patch
@@ -0,0 +1,58 @@
+Only in nazghul.orig: haxima.desktop.orig
+diff -u -r nazghul.orig/src/kern.c nazghul/src/kern.c
+--- nazghul.orig/src/kern.c 2012-02-28 13:12:29.000000000 -0600
++++ nazghul/src/kern.c 2015-02-21 13:35:23.308415763 -0600
+@@ -9762,7 +9762,7 @@
+ int n = 0;
+
+ if (scm_is_str(sc, val)) {
+- n = snprintf(ptr, room, scm_str_val(sc, val));
++ n = snprintf(ptr, room, "%s", scm_str_val(sc, val));
+ } else if (scm_is_int(sc, val)) {
+ n = snprintf(ptr, room, "%ld", scm_int_val(sc, val));
+ } else if (scm_is_real(sc, val)) {
+diff -u -r nazghul.orig/src/menus.c nazghul/src/menus.c
+--- nazghul.orig/src/menus.c 2012-02-28 13:12:29.000000000 -0600
++++ nazghul/src/menus.c 2015-02-21 13:31:45.760808596 -0600
+@@ -1004,7 +1004,7 @@
+ menubufptr = menubuf;
+
+ /* The first entry is always the New Save Game option. */
+- sprintf(menubufptr, MENU_NEW_GAME_STR);
++ sprintf(menubufptr, "%s", MENU_NEW_GAME_STR);
+ data.hotkeys[i] = 'n';
+ menu[i++] = menubufptr;
+ menubufptr += linew+1;
+diff -u -r nazghul.orig/src/Party.cpp nazghul/src/Party.cpp
+--- nazghul.orig/src/Party.cpp 2012-02-28 13:12:29.000000000 -0600
++++ nazghul/src/Party.cpp 2015-02-21 13:10:11.942886876 -0600
+@@ -1093,7 +1093,7 @@
+
+ statlist[list_sz].sprite = member->getSprite();
+ snprintf(statlist[list_sz].line1, STAT_LIST_CHARS_PER_LINE,
+- member->getName());
++ "%s", member->getName());
+ statlist[list_sz].data = member;
+ list_sz++;
+ }
+diff -u -r nazghul.orig/src/scheme.c nazghul/src/scheme.c
+--- nazghul.orig/src/scheme.c 2012-02-28 13:12:29.000000000 -0600
++++ nazghul/src/scheme.c 2015-02-21 13:43:00.340087397 -0600
+@@ -4738,7 +4738,7 @@
+ /* type */
+ for (i = 0; i < T_LAST_SYSTEM_TYPE && i != type(pp); i++)
+ ;
+- bptr += sprintf(bptr, typestr[i]);
++ bptr += sprintf(bptr, "%s", typestr[i]);
+ *bptr++ = ' ';
+
+ /* flags */
+@@ -4781,7 +4781,7 @@
+ strbuf[sizeof(strbuf)-1] = 0;
+
+ /*putstr(sc, strbuf);*/
+- fprintf(stderr,strbuf);
++ fprintf(stderr, "%s", strbuf);
+ fflush(NULL);
+ }
+
diff --git a/nazghul.spec b/nazghul.spec
index b099d68..60d8ba9 100644
--- a/nazghul.spec
+++ b/nazghul.spec
@@ -1,10 +1,10 @@
Name: nazghul
Version: 0.7.1
-Release: 8.20120228gitb0a402a%{?dist}
+Release: 9.20120228gitb0a402a%{?dist}
Summary: A computer role-playing game (CRPG) engine
License: GPLv2+
-URL: http://myweb.cableone.net/gmcnutt/nazghul.html
+URL: http://sourceforge.net/projects/nazghul/
Group: Amusements/Games
# Occasionally upstream names things with an underscore.
@@ -13,10 +13,11 @@ Group: Amusements/Games
#Source0: nazghul-20120228gitb0a402a.txz
# Construct cvs checkout tarball with:
-# ./nazghul-make-snapshot %{cvsdate}
+# ./nazghul-make-snapshot %%{cvsdate}
Source0: nazghul-20120228gitb0a402a.txz
Source1: haxima-music-license
Patch0: nazghul-desktop.patch
+Patch1: nazghul-format-security.patch
# For building from a CVS snapshot
BuildRequires: automake, autoconf
@@ -47,8 +48,7 @@ You must install Nazghul in order to play Haxima.
%prep
-%setup -q -n %{name}
-%patch0 -b .orig
+%autosetup -p1 -n %{name}
# clean up CVS directories left in the source tarball
find . -depth -type d -name CVS -exec rm -rf {} \;
@@ -98,6 +98,10 @@ install -D -m 644 icons/haxima.png %{buildroot}/%{_datadir}/pixmaps/haxima.png
%changelog
+* Sat Feb 21 2015 Jason L Tibbitts III <tibbs at math.uh.edu> - 0.7.1-9.20120228gitb0a402a
+- Fix format-security errors.
+- Fix upstream URL.
+
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.1-8.20120228gitb0a402a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list