[packages/crossfire] - updated to 1.10.0 (last version with crossedit) - updated ac260,daemon patches - removed outdated

qboosh qboosh at pld-linux.org
Wed Feb 8 17:16:39 CET 2023


commit b7fd360a8fbcc0212aead64e2a219478331af1b4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Feb 8 17:18:06 2023 +0100

    - updated to 1.10.0 (last version with crossedit)
    - updated ac260,daemon patches
    - removed outdated check patch
    - added format patch (fixes build with -Werror=format-security)

 crossfire-ac260.patch  | 57 ++++++++++++++++++++++----------------------------
 crossfire-check.patch  | 11 ----------
 crossfire-daemon.patch | 10 ++++-----
 crossfire-format.patch | 22 +++++++++++++++++++
 crossfire.spec         |  9 ++++----
 5 files changed, 55 insertions(+), 54 deletions(-)
---
diff --git a/crossfire.spec b/crossfire.spec
index c7b4afa..d35bd29 100644
--- a/crossfire.spec
+++ b/crossfire.spec
@@ -1,17 +1,17 @@
 Summary:	Multiplayer roguelike game server
 Summary(pl.UTF-8):	Serwer gry roguelike dla wielu graczy
 Name:		crossfire
-Version:	1.9.1
-Release:	15
+Version:	1.10.0
+Release:	1
 License:	GPL v2+
 Group:		X11/Applications/Games
 Source0:	https://downloads.sourceforge.net/crossfire/%{name}-%{version}.tar.gz
-# Source0-md5:	9444daefe1a457b4a18101c255be6cdc
+# Source0-md5:	d56ad6cac04ea49f8b6b326b441553a3
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Source3:	%{name}.logrotate
 Patch0:		%{name}-ac260.patch
-Patch1:		%{name}-check.patch
+Patch1:		%{name}-format.patch
 Patch2:		%{name}-daemon.patch
 Patch3:		%{name}-python.patch
 Patch4:		%{name}-am.patch
@@ -114,7 +114,6 @@ Wtyczka animacji dla serwera Crossfire.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-touch include/autoconf.h{,.in}
 %configure \
 	--disable-static
 
diff --git a/crossfire-ac260.patch b/crossfire-ac260.patch
index 81e5d68..25655f6 100644
--- a/crossfire-ac260.patch
+++ b/crossfire-ac260.patch
@@ -59,22 +59,22 @@
      if AC_TRY_COMMAND([$to_run]);then
      	AC_MSG_RESULT([yes]);
          [$2]
---- crossfire-1.9.1/check-fragment.am.wiget	2007-02-04 00:00:02.000000000 +0100
-+++ crossfire-1.9.1/check-fragment.am	2007-02-04 00:06:01.000000000 +0100
-@@ -16,8 +16,8 @@
+--- crossfire-1.10.0/check-fragment.am.wiget	2007-02-04 00:00:02.000000000 +0100
++++ crossfire-1.10.0/check-fragment.am	2007-02-04 00:06:01.000000000 +0100
+@@ -16,8 +16,8 @@ automenu:
  	echo '<?xml version="1.0"?><menu>' > $$output_menu; \
  	echo '<parentMenu>$(CHECK_PARENT_NAME)</parentMenu>' >> $$output_menu;\
  	for tst in $$list; do \
--	  tst=$${tst/check_/} ; \
--	  tst=$${tst/-/_} ; \
+-	  tst="$${tst/check_/}" ; \
+-	  tst="$${tst/-/_}" ; \
 +	  tst=$$(echo $$tst|sed -e 's/check_//') ; \
 +	  tst=$$(echo $$tst|sed -e'/-/_/') ; \
- 	  xml=$(LOGDIR)/$${tst}.xml ;\
+ 	  xml="$(LOGDIR)/$${tst}.xml" ;\
  	  if test -e "$$xml"; then \
  	      successCount=`grep -c 'result="success"' $$xml`;\
-@@ -39,14 +39,14 @@
+@@ -39,14 +39,14 @@ logreport: automenu
  	srcdir='$(top_srcdir)'; \
- 	xsl=$${srcdir}/test/templates/logresult.xsl ; \
+ 	xsl="$${srcdir}/test/templates/logresult.xsl" ; \
  	xsltproc='$(XSLTENGINE)';\
 -	xsltproc=$${xsltproc/\%2/$$xsl};\
 +	xsltproc=$$(echo $$xsltproc|sed -e "/\%2/$$xsl/");\
@@ -83,59 +83,52 @@
  	runxml='.autorun.xml';\
  	if test -n "$$list"; then \
  	  for tst in $$list; do \
--	    tst=$${tst/check_/} ; \
--	    tst=$${tst/-/_} ; \
+-	    tst="$${tst/check_/}" ; \
+-	    tst="$${tst/-/_}" ; \
 +	    tst=$$(echo $$tst|sed -e "s/check_//") ; \
 +	    tst=$$(echo $$tst|sed -e "/-/_/") ; \
- 	    checkFile=$${tst}.xml ;\
+ 	    checkFile="$${tst}.xml" ;\
  	    echo '<?xml version="1.0"?><config>' > $$runxml;\
  	    echo "<baseSiteUri>$$xml_siteuri</baseSiteUri>" >> $$runxml;\
-@@ -54,8 +54,8 @@
+@@ -54,8 +54,8 @@ logreport: automenu
  	    echo "<checkFolder>$$xml_check_folder</checkFolder></config>" >> $$runxml;\
  	    html=$(LOGDIR)/$${tst}.html ;\
  	    if test -e "$(LOGDIR)/$$xml"; then \
--	        torun=$${xsltproc/\%1/$$runxml};\
--	        torun=$${torun/\%3/$$html};\
+-	        torun="$${xsltproc/\%1/$$runxml}";\
+-	        torun="$${torun/\%3/$$html}";\
 +	        torun=$$(echo $$xsltproc|sed -e "/\%1/$$runxml/");\
 +	        torun=$$(echo $$torun|sed -e "s/\%3/$$html/");\
  	        echo "running $$torun";\
  	        $$torun; \
  	    fi; \
-@@ -65,8 +65,8 @@
+@@ -65,8 +65,8 @@ logreport: automenu
  	echo "<baseSiteUri>$$xml_siteuri</baseSiteUri>" >> $$runxml;\
  	echo "<checkFolder>$$xml_check_folder</checkFolder></config>" >> $$runxml;\
- 	html=$(LOGDIR)/.index.html ;\
--	torun=$${xsltproc/\%1/$$runxml};\
--	torun=$${torun/\%3/$$html};\
+ 	html='$(LOGDIR)/.index.html' ;\
+-	torun="$${xsltproc/\%1/$$runxml}";\
+-	torun="$${torun/\%3/$$html}";\
 +	torun=$$(echo $$xsltproc|sed -e "s/\%1/$$runxml/");\
 +	torun=$$(echo $$torun|sed -e "s/\%3/$$html/');\
  	echo "running $$torun";\
  	$$torun;
  template-copy: $(LOGDIR)
-@@ -79,7 +79,7 @@
+@@ -79,7 +79,7 @@ textlog:
  	@srcdir='$(top_srcdir)'; \
- 	xsl=$${srcdir}/test/templates/checkTextResult.xsl ; \
+ 	xsl="$${srcdir}/test/templates/checkTextResult.xsl" ; \
  	xsltproc='$(XSLTENGINE)';\
--	xsltproc=$${xsltproc/\%2/$$xsl};\
+-	xsltproc="$${xsltproc/\%2/$$xsl}";\
 +	xsltproc=$$(echo $$xsltproc|sed -e "s/\%2/$$xsl/");\
  	xml_siteuri='$(CHECK_ROOT)' ;\
  	xml_check_folder='../logs/$(CHECK_FOLDER)' ;\
  	runxml='.autorun.xml';\
-@@ -87,8 +87,8 @@
+@@ -87,8 +87,8 @@ textlog:
  	echo "<baseSiteUri>$$xml_siteuri</baseSiteUri>" >> $$runxml;\
  	echo "<checkFolder>$$xml_check_folder</checkFolder></config>" >> $$runxml;\
- 	txt=$(LOGDIR)/testlog.txt ;\
--	torun=$${xsltproc/\%1/$$runxml};\
--	torun=$${torun/\%3/$$txt};\
+ 	txt='$(LOGDIR)/testlog.txt' ;\
+-	torun="$${xsltproc/\%1/$$runxml}";\
+-	torun="$${torun/\%3/$$txt}";\
 +	torun=$$(echo $$xsltproc|sed -e "s/\%1/$$runxml/");\
 +	torun=$$(echo $$torun|sed -e "s/\%3/$$txt/");\
  	echo "running $$torun";\
  	$$torun;
  
-@@ -100,4 +100,4 @@
- check-text: $(CHECK_TXT)
- clean-unit:
- 	rm -f autorun.xml
--noinst_PROGRAMS=$(TESTS)
-\ Brak znaku nowej linii na końcu pliku
-+noinst_PROGRAMS=$(TESTS)
diff --git a/crossfire-check.patch b/crossfire-check.patch
deleted file mode 100644
index ca465b1..0000000
--- a/crossfire-check.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- crossfire-1.9.1/test/unit/crossedit/check_stubs.c.wig	2007-02-03 23:42:27.000000000 +0100
-+++ crossfire-1.9.1/test/unit/crossedit/check_stubs.c	2007-02-03 23:42:41.000000000 +0100
-@@ -68,7 +68,7 @@
-   Suite *s = stubs_suite();
-   SRunner *sr = srunner_create(s);
-   srunner_set_xml(sr,LOGDIR "/unit/crossedit/stubs.xml");
--  srunner_set_out(sr,LOGDIR "/unit/crossedit/stubs.out");
-+  srunner_set_log(sr,LOGDIR "/unit/crossedit/stubs.out");
-   srunner_run_all(sr, CK_ENV); /*verbosity from env variable*/
-   nf = srunner_ntests_failed(sr);
-   srunner_free(sr);
diff --git a/crossfire-daemon.patch b/crossfire-daemon.patch
index 2e89a67..3d0df39 100644
--- a/crossfire-daemon.patch
+++ b/crossfire-daemon.patch
@@ -1,13 +1,11 @@
---- crossfire-1.9.1/server/daemon.c.wig2	2006-05-13 08:32:14.000000000 +0200
-+++ crossfire-1.9.1/server/daemon.c	2007-02-04 14:22:56.000000000 +0100
-@@ -103,9 +103,9 @@
-     /*
+--- crossfire-1.10.0/server/daemon.c.wig2	2006-05-13 08:32:14.000000000 +0200
++++ crossfire-1.10.0/server/daemon.c	2007-02-04 14:22:56.000000000 +0100
+@@ -104,8 +104,8 @@ FILE *become_daemon (const char *filenam
       * Set up the standard file descriptors.
       */
--    (void) open ("/", O_RDONLY);	/* root inode already in core */
+     (void) open ("/dev/null", O_RDONLY);	/* root inode already in core */
 -    (void) dup2 (0, 1);
 -    (void) dup2 (0, 2);
-+    (void) open ("/dev/null", O_RDONLY);	/* root inode already in core */
 +    (void) dup2 (fileno(logfile), 1);
 +    (void) dup2 (fileno(logfile), 2);
  
diff --git a/crossfire-format.patch b/crossfire-format.patch
new file mode 100644
index 0000000..5c21620
--- /dev/null
+++ b/crossfire-format.patch
@@ -0,0 +1,22 @@
+--- crossfire-1.10.0/server/c_chat.c.orig	2007-03-19 07:48:12.000000000 +0100
++++ crossfire-1.10.0/server/c_chat.c	2023-02-08 06:14:55.912346304 +0100
+@@ -178,7 +178,7 @@ static int do_tell(object* op, char* par
+             pl->listening = original_listen;
+ 
+         /* Update last_tell value [mids 01/14/2002] */
+-        snprintf(pl->last_tell, sizeof(pl->last_tell), op->name);
++        snprintf(pl->last_tell, sizeof(pl->last_tell), "%s", op->name);
+ 
+         /* Hidden DMs get the message, but player should think DM isn't online. */
+         if (!pl->hidden || QUERY_FLAG(op, FLAG_WIZ)) {
+--- crossfire-1.10.0/server/shop.c.orig	2007-03-19 07:48:12.000000000 +0100
++++ crossfire-1.10.0/server/shop.c	2023-02-08 06:18:30.381655457 +0100
+@@ -801,7 +801,7 @@ int can_pay(object *pl) {
+                 denominations++;
+                 snprintf(coinbuf, sizeof(coinbuf), " %d %s,", coincount[i],
+                         find_archetype(coins[i])->clone.name_pl);
+-                snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), coinbuf);
++                snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%s", coinbuf);
+             }
+         }
+         if (denominations == 0)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossfire.git/commitdiff/b7fd360a8fbcc0212aead64e2a219478331af1b4



More information about the pld-cvs-commit mailing list