* [gentoo-commits] repo/gentoo:master commit in: games-rpg/twclone/files/, games-rpg/twclone/
@ 2015-10-27 8:36 Alfredo Tupone
0 siblings, 0 replies; 2+ messages in thread
From: Alfredo Tupone @ 2015-10-27 8:36 UTC (permalink / raw
To: gentoo-commits
commit: 179907f70c1e6f5cd12b00e694748daf12eec5e4
Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 27 08:35:31 2015 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Tue Oct 27 08:36:16 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=179907f7
games-rpg/twclone: Fix compile with format-security. Bug #544364
Package-Manager: portage-2.2.20.1
games-rpg/twclone/files/twclone-0.14-format.patch | 75 +++++++++++++++++++++++
games-rpg/twclone/twclone-0.14.ebuild | 6 +-
2 files changed, 80 insertions(+), 1 deletion(-)
diff --git a/games-rpg/twclone/files/twclone-0.14-format.patch b/games-rpg/twclone/files/twclone-0.14-format.patch
new file mode 100644
index 0000000..3e51141
--- /dev/null
+++ b/games-rpg/twclone/files/twclone-0.14-format.patch
@@ -0,0 +1,75 @@
+--- bigbang.c.old 2015-10-27 09:21:51.172611109 +0100
++++ bigbang.c 2015-10-27 09:25:41.117233447 +0100
+@@ -530,13 +530,11 @@
+ planetfile = fopen ("./planets.data", "w");
+ for (loop = 1; loop <= 299 - strlen(terraInfo); loop++)
+ strcat(terraInfo, " ");
+- strcat(terraInfo, "\n");
+- fprintf (planetfile, terraInfo);
++ fprintf (planetfile, "%s\n", terraInfo);
+ sprintf (ferrinfo, "%d:%d:Ferringhi:1:-2:Unknown:1000:1000:1000:0:0:0:0:3:100000:20:30:10:0:0:0:0:", 2, ferringhiSector);
+ for (loop = 1; loop <= 299 - strlen(ferrinfo); loop++)
+ strcat(ferrinfo, " ");
+- strcat(ferrinfo, "\n");
+- fprintf(planetfile, ferrinfo);
++ fprintf(planetfile, "%s\n", ferrinfo);
+ randomPlanetInfo = malloc (sizeof (strNameLength));
+ if (numRandomPlanets > 0)
+ {
+@@ -552,8 +550,7 @@
+ , c, tempint, randomname (randomPlanetInfo), randomnum(1,5));
+ for (loop = 1; loop <= 299 - strlen(ferrinfo); loop++)
+ strcat(ferrinfo, " ");
+- strcat(ferrinfo, "\n");
+- fprintf(planetfile, ferrinfo);
++ fprintf(planetfile, "%s\n", ferrinfo);
+
+ c++;
+ }
+@@ -616,10 +613,9 @@
+ fileline = strcat (fileline, ":");
+ if (sectorlist[x]->nebulae != NULL)
+ fileline = strcat (fileline, sectorlist[x]->nebulae);
+- fileline = strcat (fileline, ":\n");
+ /* Later put in whitespace buffer for saving */
+ /* Not needed until user created beacons put in */
+- fprintf (file, fileline);
++ fprintf (file, "%s:\n", fileline);
+ }
+ fclose (file);
+ free (fileline);
+@@ -646,8 +642,7 @@
+ len = (int) strlen (fileline);
+ for (y = 0; y <= 99 - len; y++)
+ strcat (fileline, " ");
+- strcat (fileline, "\n");
+- fprintf (file, fileline);
++ fprintf (file, "%s\n", fileline);
+ }
+ fclose (file);
+
+--- config.c.old 2015-10-27 09:30:00.091283678 +0100
++++ config.c 2015-10-27 09:30:25.068806593 +0100
+@@ -140,9 +140,8 @@
+
+ for (loop=0; loop < 199 - strlen(buffer); loop++)
+ strcat(buffer, " ");
+- strcat(buffer, "\n");
+
+- fprintf(configfile, buffer);
++ fprintf(configfile, "%s\n", buffer);
+
+ fclose(configfile);
+ free(buffer);
+--- planet.c.old 2015-10-27 09:31:44.867282757 +0100
++++ planet.c 2015-10-27 09:32:17.083667674 +0100
+@@ -59,8 +59,7 @@
+ addint(stufftosave, planets[index]->citdl->upgradestart, ':', BUFF_SIZE);
+ for (loop=0; loop< 399 - strlen(stufftosave); loop++)
+ strcat(stufftosave, " ");
+- strcat(stufftosave, "\n");
+- fprintf(planetfile, stufftosave);
++ fprintf(planetfile, "%s\n", stufftosave);
+ }
+ }
+ fclose(planetfile);
diff --git a/games-rpg/twclone/twclone-0.14.ebuild b/games-rpg/twclone/twclone-0.14.ebuild
index d06e68e..3e92d76 100644
--- a/games-rpg/twclone/twclone-0.14.ebuild
+++ b/games-rpg/twclone/twclone-0.14.ebuild
@@ -3,7 +3,7 @@
# $Id$
EAPI=5
-inherit games
+inherit games eutils
MY_P="${PN}-source-${PV}"
DESCRIPTION="Clone of BBS Door game Trade Wars 2002"
@@ -17,6 +17,10 @@ IUSE=""
S=${WORKDIR}/${MY_P}
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-format.patch
+}
+
src_install() {
DOCS="AUTHORS ChangeLog PROTOCOL README TODO" \
default
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-rpg/twclone/files/, games-rpg/twclone/
@ 2016-10-18 0:23 Austin English
0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2016-10-18 0:23 UTC (permalink / raw
To: gentoo-commits
commit: 3b9ddd7eb9c25affc76e42c89c2b333ea48dd808
Author: Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 16 05:10:08 2016 +0000
Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 00:00:52 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b9ddd7e
games-rpg/twclone: remove deprecated games eclass
Also update to EAPI 6
Gentoo-Bug: https://bugs.gentoo.org/574082
Package-Manager: portage-2.3.0
games-rpg/twclone/files/twclone-0.14-format.patch | 12 ++++-----
games-rpg/twclone/twclone-0.14-r1.ebuild | 30 +++++++++++++++++++++++
2 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/games-rpg/twclone/files/twclone-0.14-format.patch b/games-rpg/twclone/files/twclone-0.14-format.patch
index 3e51141..d9d1a1c 100644
--- a/games-rpg/twclone/files/twclone-0.14-format.patch
+++ b/games-rpg/twclone/files/twclone-0.14-format.patch
@@ -1,5 +1,5 @@
---- bigbang.c.old 2015-10-27 09:21:51.172611109 +0100
-+++ bigbang.c 2015-10-27 09:25:41.117233447 +0100
+--- a/bigbang.c 2015-10-27 09:21:51.172611109 +0100
++++ b/bigbang.c 2015-10-27 09:25:41.117233447 +0100
@@ -530,13 +530,11 @@
planetfile = fopen ("./planets.data", "w");
for (loop = 1; loop <= 299 - strlen(terraInfo); loop++)
@@ -48,8 +48,8 @@
}
fclose (file);
---- config.c.old 2015-10-27 09:30:00.091283678 +0100
-+++ config.c 2015-10-27 09:30:25.068806593 +0100
+--- a/config.c 2015-10-27 09:30:00.091283678 +0100
++++ b/config.c 2015-10-27 09:30:25.068806593 +0100
@@ -140,9 +140,8 @@
for (loop=0; loop < 199 - strlen(buffer); loop++)
@@ -61,8 +61,8 @@
fclose(configfile);
free(buffer);
---- planet.c.old 2015-10-27 09:31:44.867282757 +0100
-+++ planet.c 2015-10-27 09:32:17.083667674 +0100
+--- a/planet.c 2015-10-27 09:31:44.867282757 +0100
++++ b/planet.c 2015-10-27 09:32:17.083667674 +0100
@@ -59,8 +59,7 @@
addint(stufftosave, planets[index]->citdl->upgradestart, ':', BUFF_SIZE);
for (loop=0; loop< 399 - strlen(stufftosave); loop++)
diff --git a/games-rpg/twclone/twclone-0.14-r1.ebuild b/games-rpg/twclone/twclone-0.14-r1.ebuild
new file mode 100644
index 00000000..3e9a675
--- /dev/null
+++ b/games-rpg/twclone/twclone-0.14-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+MY_P="${PN}-source-${PV}"
+DESCRIPTION="Clone of BBS Door game Trade Wars 2002"
+HOMEPAGE="http://twclone.sourceforge.net/"
+SRC_URI="mirror://sourceforge/twclone/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-format.patch
+)
+
+src_install() {
+ DOCS="AUTHORS ChangeLog PROTOCOL README TODO" \
+ default
+ cd "${D}/usr/bin"
+ for f in * ; do
+ mv {,${PN}-}${f}
+ done
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-18 0:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 8:36 [gentoo-commits] repo/gentoo:master commit in: games-rpg/twclone/files/, games-rpg/twclone/ Alfredo Tupone
-- strict thread matches above, loose matches on Subject: below --
2016-10-18 0:23 Austin English
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox