Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cdogs-sdl for openSUSE:Factory checked in at 2026-08-25 13:19:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cdogs-sdl (Old) and /work/SRC/openSUSE:Factory/.cdogs-sdl.new.1258 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cdogs-sdl" Tue Aug 25 13:19:30 2026 rev:34 rq:1373441 version:2.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/cdogs-sdl/cdogs-sdl.changes 2026-01-26 11:33:57.973451565 +0100 +++ /work/SRC/openSUSE:Factory/.cdogs-sdl.new.1258/cdogs-sdl.changes 2026-08-25 13:19:33.096820710 +0200 @@ -1,0 +2,10 @@ +Mon Aug 17 13:58:21 UTC 2026 - Bernhard Wiedemann <[email protected]> + +- Add cdogs-sdl-test-tmpfile-race.patch: fix autosave_test segfault under ctest -j + +------------------------------------------------------------------- +Thu Aug 6 03:29:21 UTC 2026 - Bernhard Wiedemann <[email protected]> + +- Add cdogs-sdl-gcc16.patch: fix build with GCC 16 + +------------------------------------------------------------------- New: ---- cdogs-sdl-gcc16.patch cdogs-sdl-test-tmpfile-race.patch ----------(New B)---------- New: - Add cdogs-sdl-gcc16.patch: fix build with GCC 16 New: - Add cdogs-sdl-test-tmpfile-race.patch: fix autosave_test segfault under ctest -j ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cdogs-sdl.spec ++++++ --- /var/tmp/diff_new_pack.NFAV2U/_old 2026-08-25 13:19:34.127857016 +0200 +++ /var/tmp/diff_new_pack.NFAV2U/_new 2026-08-25 13:19:34.129857086 +0200 @@ -27,6 +27,10 @@ Patch0: fix-build.patch Patch1: fix-env-script-interpreter.patch Patch2: fix-sound.patch +# PATCH-FIX-UPSTREAM cdogs-sdl-gcc16.patch -- fix unused-but-set-variable errors with GCC 16 +Patch3: cdogs-sdl-gcc16.patch +# PATCH-FIX-UPSTREAM cdogs-sdl-test-tmpfile-race.patch -- stop autosave_test and config_test sharing one scratch file +Patch4: cdogs-sdl-test-tmpfile-race.patch BuildRequires: cmake >= 3.5 BuildRequires: enet-devel BuildRequires: fdupes ++++++ cdogs-sdl-gcc16.patch ++++++ >From 0c9c676754b6e9cf0e54261f095079eaa504b78e Mon Sep 17 00:00:00 2001 From: Cong <[email protected]> Date: Wed, 5 Aug 2026 12:04:36 +1000 Subject: [PATCH] Fix gcc16 FTBFS (fixes #897) Git-commit: 0c9c676754b6e9cf0e54261f095079eaa504b78e References: gcc16 build fix; grafx.c hunk dropped (2.4.0 already has it) --- src/prep.c | 2 +- src/prep_equip.c | 41 +++++++++++++++++++---------------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/prep.c b/src/prep.c index cdd20bb36..9442ec250 100644 --- a/src/prep.c +++ b/src/prep.c @@ -736,7 +736,7 @@ static GameLoopResult GameOptionsUpdate(GameLoopData *data, LoopRunner *l) // First check if the player has unwittingly disabled all weapons // if so, enable all weapons bool allDisabled = true; - for (int i = 0, j = 0; i < (int)gData->allowed.size; i++, j++) + for (int i = 0; i < (int)gData->allowed.size; i++) { const bool *allowed = CArrayGet(&gData->allowed, i); if (*allowed) diff --git a/src/prep_equip.c b/src/prep_equip.c index 6ecc9d855..d2db4158d 100644 --- a/src/prep_equip.c +++ b/src/prep_equip.c @@ -32,8 +32,8 @@ #include <cdogs/player.h> #include "autosave.h" -#include "prep.h" #include "equip_menu.h" +#include "prep.h" static void AddPlayerWeapons(CArray *weapons, const WeaponClass **guns); static void RemoveUnavailableWeapons( @@ -52,7 +52,8 @@ GameLoopData *PlayerEquip(void) { PlayerEquipData *data; CCALLOC(data, sizeof *data); - const CampaignSave *save = AutosaveGetCampaign(&gAutosave, gCampaign.Entry.Path); + const CampaignSave *save = + AutosaveGetCampaign(&gAutosave, gCampaign.Entry.Path); const Mission *m = CampaignGetCurrentMission(&gCampaign); if (save != NULL && gCampaign.MissionIndex > 0) { @@ -97,7 +98,7 @@ GameLoopData *PlayerEquip(void) &gCampaign.Setting.Missions, gCampaign.MissionIndex - 1); prevWeapons = &prevMission->Weapons; } - + // Special case: reset player lives // Player.Lives is modified dynamically in game, so if we // are replaying, we need to reset if we have no player save @@ -200,27 +201,23 @@ static void PlayerEquipOnExit(GameLoopData *data) if (pData->waitResult == EVENT_WAIT_OK) { - for (int i = 0, idx = 0; i < (int)gPlayerDatas.size; i++, idx++) + CA_FOREACH(const PlayerData, p, gPlayerDatas) + if (!p->IsLocal) { - const PlayerData *p = CArrayGet(&gPlayerDatas, i); - if (!p->IsLocal) - { - idx--; - continue; - } - NPlayerData pd = NMakePlayerData(p); - // Update player definitions - if (gCampaign.IsClient) - { - NetClientSendMsg(&gNetClient, GAME_EVENT_PLAYER_DATA, &pd); - } - else - { - NetServerSendMsg( - &gNetServer, NET_SERVER_BCAST, GAME_EVENT_PLAYER_DATA, - &pd); - } + continue; + } + NPlayerData pd = NMakePlayerData(p); + // Update player definitions + if (gCampaign.IsClient) + { + NetClientSendMsg(&gNetClient, GAME_EVENT_PLAYER_DATA, &pd); } + else + { + NetServerSendMsg( + &gNetServer, NET_SERVER_BCAST, GAME_EVENT_PLAYER_DATA, &pd); + } + CA_FOREACH_END() } else { ++++++ cdogs-sdl-test-tmpfile-race.patch ++++++ >From 83fd70bf580a64d54185c0faf3f5df23647b1f2d Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" <[email protected]> Date: Mon, 17 Aug 2026 15:50:00 +0200 Subject: [PATCH] Give autosave_test and config_test their own scratch files Both tests write a file named "tmp" into the shared ctest working directory. Under "ctest -j" they overlap, so config_test's write can land between autosave_test's AutosaveSave() and AutosaveLoad(). AutosaveLoad() then fails to parse, leaves Campaigns empty, and the test segfaults on CArrayGet(&autosave2.Campaigns, 0). Name the scratch file after the test that owns it. --- src/tests/autosave_test.c | 4 ++-- src/tests/config_test.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/tests/autosave_test.c b/src/tests/autosave_test.c index a16a3d7..7c57dcb 100644 --- a/src/tests/autosave_test.c +++ b/src/tests/autosave_test.c @@ -32,12 +32,12 @@ FEATURE(save_and_load, "Save and load") cs1.NextMission = 1; AutosaveAddCampaign(&autosave1, &cs1); AND("I save it to file") - AutosaveSave(&autosave1, "tmp"); + AutosaveSave(&autosave1, "autosave_test.tmp"); WHEN("I initialise and load a second autosave from that file") Autosave autosave2; AutosaveInit(&autosave2); - AutosaveLoad(&autosave2, "tmp"); + AutosaveLoad(&autosave2, "autosave_test.tmp"); CampaignSave *cs2 = CArrayGet(&autosave2.Campaigns, 0); THEN("their mission paths should equal") diff --git a/src/tests/config_test.c b/src/tests/config_test.c index eb77045..8831746 100644 --- a/src/tests/config_test.c +++ b/src/tests/config_test.c @@ -59,10 +59,10 @@ FEATURE(save_and_load, "Save and load") Config config1 = ConfigLoad(NULL); ConfigGet(&config1, "Game.FriendlyFire")->u.Bool.Value = true; ConfigGet(&config1, "Graphics.Brightness")->u.Int.Value = 5; - ConfigSave(&config1, "tmp"); + ConfigSave(&config1, "config_test.tmp"); WHEN("I load a second config from that file") - Config config2 = ConfigLoad("tmp"); + Config config2 = ConfigLoad("config_test.tmp"); THEN("the two configs should have the same values") SHOULD_INT_EQUAL( @@ -81,14 +81,14 @@ FEATURE(detect_version, "Detect config version") ConfigGet(&config1, "Game.FriendlyFire")->u.Bool.Value = true; ConfigGet(&config1, "Graphics.Brightness")->u.Int.Value = 5; AND("I save the config to file in the JSON format") - ConfigSave(&config1, "tmp"); + ConfigSave(&config1, "config_test.tmp"); WHEN("I detect the version") - FILE *file = fopen("tmp", "r"); + FILE *file = fopen("config_test.tmp", "r"); int version = ConfigGetVersion(file); fclose(file); AND("load a second config from that file") - Config config2 = ConfigLoad("tmp"); + Config config2 = ConfigLoad("config_test.tmp"); THEN("the version should be " TOSTRING(CONFIG_VERSION)) SHOULD_INT_EQUAL(version, CONFIG_VERSION); @@ -109,10 +109,10 @@ FEATURE(save_as_latest, "Save config as latest format by default") ConfigGet(&config, "Game.FriendlyFire")->u.Bool.Value = true; ConfigGet(&config, "Graphics.Brightness")->u.Int.Value = 5; AND("I save the config to file") - ConfigSave(&config, "tmp"); + ConfigSave(&config, "config_test.tmp"); WHEN("I detect the version") - FILE *file = fopen("tmp", "r"); + FILE *file = fopen("config_test.tmp", "r"); int version = ConfigGetVersion(file); fclose(file); -- 2.55.0
