Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package galaxis for openSUSE:Factory checked in at 2026-10-21 21:02:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/galaxis (Old) and /work/SRC/openSUSE:Factory/.galaxis.new.2252680 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "galaxis" Wed Oct 21 21:02:21 2026 rev:5 rq:1386890 version:1.13 Changes: -------- --- /work/SRC/openSUSE:Factory/galaxis/galaxis.changes 2024-07-09 20:07:26.384239064 +0200 +++ /work/SRC/openSUSE:Factory/.galaxis.new.2252680/galaxis.changes 2026-10-21 21:03:30.558201871 +0200 @@ -1,0 +2,17 @@ +Sun Oct 18 09:21:00 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to version 1.13: + * 1.12: code audit fixes - corrected bounds checking in an + interface, avoided undefined behavior with unsigned + characters, and exit gracefully when the terminal window + is too small + * 1.13: fixed a surviving K&R-style function header for GCC 15 +- Reworked galaxis-Makefile.patch for the new upstream build system + and fixed its install target (wrong man page source and section); + install desktop file and icon, pass PREFIX/BINDIR/MANDIR/DATADIR +- Refreshed galaxis-galaxis.c.patch context for the new sources +- Fix License tag to BSD-2-Clause to match COPYING +- BuildRequire rubygem(asciidoctor) to generate the man page, + plus gcc, make and pkgconfig(ncurses) + +------------------------------------------------------------------- Old: ---- galaxis-1.11.tar.gz New: ---- galaxis-1.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ galaxis.spec ++++++ --- /var/tmp/diff_new_pack.wG8LsV/_old 2026-10-21 21:03:31.303233498 +0200 +++ /var/tmp/diff_new_pack.wG8LsV/_new 2026-10-21 21:03:31.305233582 +0200 @@ -1,7 +1,7 @@ # # spec file for package galaxis # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,11 +17,10 @@ Name: galaxis -Version: 1.11 +Version: 1.13 Release: 0 Summary: Clone of the nifty little Macintosh game -License: BSD-3-Clause -Group: Amusements/Games/Strategy/Turn Based +License: BSD-2-Clause URL: http://www.catb.org/~esr/galaxis/ Source0: http://www.catb.org/~esr/%{name}/%{name}-%{version}.tar.gz Source1: %{name}.desktop @@ -29,8 +28,11 @@ Patch0: %{name}-Makefile.patch # PATCH-FIX-UPSTREAM - galaxis-superhack.c.patch -- Fix bad C++ code Patch1: %{name}-galaxis.c.patch -BuildRequires: libncurses6 -BuildRequires: ncurses-devel +BuildRequires: gcc +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: pkgconfig(ncurses) +BuildRequires: rubygem(asciidoctor) %if 0%{?suse_version} BuildRequires: update-desktop-files %endif @@ -59,7 +61,7 @@ %make_build CFLAGS="%{optflags}" %install -%make_install +%make_install PREFIX=%{_prefix} BINDIR=%{_bindir} MANDIR=%{_mandir} DATADIR=%{_datadir} %if 0%{?suse_version} %suse_update_desktop_file %{name} ++++++ galaxis-1.11.tar.gz -> galaxis-1.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/galaxis-1.11/Makefile new/galaxis-1.13/Makefile --- old/galaxis-1.11/Makefile 2024-02-08 12:25:35.000000000 +0100 +++ new/galaxis-1.13/Makefile 2026-02-23 01:53:24.000000000 +0100 @@ -3,15 +3,19 @@ # SPDX-FileCopyrightText: (C) Eric S. Raymond <[email protected]> # SPDX-License-Identifier: BSD-2-Clause -VERS=$(shell sed -n <NEWS.adoc '/^[0-9]/s/:.*//p' | head -1) +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +DATADIR ?= $(PREFIX)/share +MANDIR ?= $(DATADIR)/man # Flags for use with the Linux ncurses package (recommended) -CFLAGS = -g -DNDEBUG +CFLAGS += -O -Wall -Werror -Wextra -Wno-unused-parameter TERMLIB = -lncurses CC = gcc -galaxis: galaxis.c - $(CC) $(CFLAGS) -o galaxis galaxis.c $(TERMLIB) +VERSION=$(shell sed -n <NEWS.adoc '/^[0-9]/s/:.*//p' | head -1) + +# Rules # Note: to suppress the footers with timestamps being generated in HTML, # we use "-a nofooter". @@ -24,37 +28,62 @@ .adoc.html: asciidoctor -D. -a nofooter -a webfonts! $< -install: galaxis.6 uninstall - install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/ - install -m 755 -o 0 -g 0 galaxis $(ROOT)/usr/bin/galaxis - install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man6/ - install -m 755 -o 0 -g 0 galaxis.6 $(ROOT)/usr/share/man/man6/galaxis.6 +.PHONY: build clean cppcheck spellcheck reflow +.PHONY: install uninstall version dist release refresh -uninstall: - rm -f ${ROOT}/usr/bin/galaxis ${ROOT}/usr/share/man/man6/galaxis.6 +# Build + +build: galaxis galaxis.6 + +galaxis: galaxis.c + $(CC) $(CFLAGS) -o galaxis galaxis.c $(TERMLIB) clean: rm -f galaxis galaxis.6 galaxis-*.tar.gz *~ *.html +# Validate + reflow: @clang-format --style="{IndentWidth: 8, UseTab: ForIndentation}" -i $$(find . -name "*.[ch]") CPPCHECKOPTS = cppcheck: - cppcheck -DREVISION=$(VERS) $(CPPCHECKOPTS) galaxis.c + @cppcheck --quiet -DREVISION=$(VERSION) $(CPPCHECKOPTS) galaxis.c + +spellcheck: + @spellcheck galaxis.adoc + +# Install/uninstall + +install: + install -d $(DESTDIR)$(BINDIR) + install -m 755 galaxis $(DESTDIR)$(BINDIR)/galaxis + install galaxis.1 $(DESTDIR)$(MANDIR)/man1/galaxis.6 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/galaxis + rm -f $(DESTDIR)$(MANDIR)/man1/galaxis.6 + +# Export version: - @echo $(VERS) + @echo $(VERSION) SOURCES = README.adoc COPYING NEWS.adoc control galaxis.c Makefile galaxis.adoc galaxis.desktop galaxis.png -galaxis-$(VERS).tar.gz: $(SOURCES) galaxis.6 - tar --transform='s:^:galaxis-$(VERS)/:' --show-transformed-names -cvzf galaxis-$(VERS).tar.gz $(SOURCES) galaxis.6 +galaxis-$(VERSION).tar.gz: $(SOURCES) + mkdir galaxis-$(VERSION) + cp -r $(SOURCES) galaxis-$(VERSION) + tar -czf galaxis-$(VERSION).tar.gz galaxis-$(VERSION) + rm -fr galaxis-$(VERSION) + ls -l galaxis-$(VERSION).tar.gz -dist: galaxis-$(VERS).tar.gz +dist: galaxis-$(VERSION).tar.gz -release: galaxis-$(VERS).tar.gz galaxis.html - shipper version=$(VERS) | sh -e -x +release: galaxis-$(VERSION).tar.gz galaxis.html + shipper version=$(VERSION) | sh -e -x refresh: galaxis.html - shipper -N -w version=$(VERS) | sh -e -x + shipper -N -w version=$(VERSION) | sh -e -x + +# end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/galaxis-1.11/NEWS.adoc new/galaxis-1.13/NEWS.adoc --- old/galaxis-1.11/NEWS.adoc 2024-02-08 12:28:27.000000000 +0100 +++ new/galaxis-1.13/NEWS.adoc 2026-02-23 01:53:24.000000000 +0100 @@ -1,5 +1,14 @@ = galaxis project news = +1.13: 2026-02-22:: + Fix an surviving K&R style header so we play nice with GCC 15. + +1.12: 2026-02-18:: + Code audit with GPT 5.2. + Found a minor interface bug due to incorrect bounds checking. + Prevented (theoretical) UB due to unsigned characters). + Exit gracefully when terminal emulator window is too small. + 1.11: 2024-02-08:: Clean up code to assume SUSv2 Documentation moved to asciidoctor. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/galaxis-1.11/README.adoc new/galaxis-1.13/README.adoc --- old/galaxis-1.11/README.adoc 2024-02-01 20:18:51.000000000 +0100 +++ new/galaxis-1.13/README.adoc 2026-02-23 01:53:24.000000000 +0100 @@ -8,3 +8,7 @@ Send bug reports to [email protected]. Also, see my WWW home page at http://www.catb.org/~esr/index.html for updates and other resources. +This code is commonly packaged as "galaxis". + +image:https://repology.org/badge/vertical-allrepos/galaxis.svg[Repology +package status] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/galaxis-1.11/control new/galaxis-1.13/control --- old/galaxis-1.11/control 2024-02-08 12:22:58.000000000 +0100 +++ new/galaxis-1.13/control 2026-02-23 01:53:24.000000000 +0100 @@ -11,6 +11,8 @@ Homepage: http://www.catb.org/~esr/galaxis +XBS-Packaged-As: galaxis + XBS-HTML-Target: index.html XBS-Repository-URL: https://gitlab.com/esr/galaxis @@ -22,3 +24,5 @@ #XBS-Project-Tags: game, card, solitaire XBS-VC-Tag-Template: %(version)s + +XBS-Destinations: mailto:[email protected], mailto:[email protected], mailto:[email protected] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/galaxis-1.11/galaxis.6 new/galaxis-1.13/galaxis.6 --- old/galaxis-1.11/galaxis.6 2024-02-08 12:29:11.000000000 +0100 +++ new/galaxis-1.13/galaxis.6 1970-01-01 01:00:00.000000000 +0100 @@ -1,65 +0,0 @@ -'\" t -.\" Title: galaxis -.\" Author: [see the "AUTHOR(S)" section] -.\" Generator: Asciidoctor 2.0.16 -.\" Date: 2024-02-08 -.\" Manual: \ \& -.\" Source: \ \& -.\" Language: English -.\" -.TH "GALAXIS" "6" "2024-02-08" "\ \&" "\ \&" -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.ss \n[.ss] 0 -.nh -.ad l -.de URL -\fI\\$2\fP <\\$1>\\$3 -.. -.als MTO URL -.if \n[.g] \{\ -. mso www.tmac -. am URL -. ad l -. . -. am MTO -. ad l -. . -. LINKSTYLE blue R < > -.\} -.SH "NAME" -galaxis \- rescue lifeboats lost in interstellar space -.SH "SYNOPSIS" -.sp -galaxis -.SH "DESCRIPTION" -.sp -Lifeboats from a crippled interstellar liner are adrift in a -starfield. To find them, you can place probes that look in all eight -compass directions and tell you how many lifeboats they see. If you -drop a probe directly on a lifeboat it will be revealed immediately. -Your objective: find the lifeboats as quickly as possible, before the -stranded passengers run out of oxygen! -.sp -This is a UNIX\-hosted, curses\-based clone of the nifty little Macintosh -freeware game Galaxis. It doesn\(cqt have the super\-simple, point\-and\-click -interface of the original, but compensates by automating away some of the -game\(cqs simpler deductions. -.sp -The game screen includes a description -of all commands, including "?" for detailed help. -.SH "AUTHORS" -.sp -The Macintosh game was designed and written by Christian Franz -\c -.MTO "cfranz\(atiiic.ethz.ch" "" "." -This version was cloned by Eric S. Raymond -\c -.MTO "esr\(atsnark.thyrsus.com" "" "." -See ESR\(cqs home page at -.URL "http://www.catb.org/~esr/" "" "" -for updates and other resources. -.SH "BUGS" -.sp -This really ought to be an X game, but that would have been too much -like work. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/galaxis-1.11/galaxis.c new/galaxis-1.13/galaxis.c --- old/galaxis-1.11/galaxis.c 2024-02-06 23:10:32.000000000 +0100 +++ new/galaxis-1.13/galaxis.c 2026-02-23 01:53:24.000000000 +0100 @@ -11,8 +11,10 @@ #include <assert.h> #include <ctype.h> #include <curses.h> +#include <limits.h> #include <signal.h> #include <stdio.h> +#include <stdarg.h> #include <stdlib.h> #include <string.h> #include <termios.h> @@ -92,18 +94,27 @@ static int boatsfound; /* number of boats found */ static bool revealed; /* display hidden lifeboats */ static bool dohilite; /* highlight those rays */ +static volatile sig_atomic_t exit_requested; #define PR (void)addstr static void outro(int sig) /* end the game, either normally or due to signal */ { + int status = sig ? 1 : 0; + clear(); (void)refresh(); (void)resetterm(); (void)echo(); (void)endwin(); - exit(0); + exit(status); +} + +static void request_exit(int sig) +/* async-signal-safe exit request */ +{ + exit_requested = sig; } static void intro(void) @@ -111,16 +122,22 @@ { srand(time(0L) + getpid()); /* Kick the random number generator */ - (void)signal(SIGINT, outro); - (void)signal(SIGINT, outro); + (void)signal(SIGINT, request_exit); #ifdef SIGIOT - (void)signal(SIGIOT, outro); /* for assert(3) */ + (void)signal(SIGIOT, request_exit); /* for assert(3) */ #endif /* SIGIOT */ if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) { - (void)signal(SIGQUIT, outro); + (void)signal(SIGQUIT, request_exit); } (void)initscr(); + if (LINES <= PROMPTLINE || COLS < COLWIDTH) { + (void)endwin(); + (void)fprintf(stderr, + "Terminal too small: need at least %d lines and %d columns.\n", + PROMPTLINE + 1, COLWIDTH); + exit(1); + } #ifdef KEY_MIN keypad(stdscr, TRUE); #endif /* KEY_MIN */ @@ -149,21 +166,29 @@ } /* VARARGS1 */ -static void prompt(char *f, char *s) { +static void prompt(const char *f, const char *s) { /* print a message at the prompt line */ (void)move(PROMPTLINE, 0); (void)clrtoeol(); - (void)printw(f, s); + if (f) { + (void)addstr(f); + } + if (s) { + (void)addstr(s); + } (void)refresh(); } -static void error(char *s) { - (void)move(PROMPTLINE + 2, 0); +static void promptf(const char *fmt, ...) { + /* print a formatted message at the prompt line */ + va_list ap; + + (void)move(PROMPTLINE, 0); (void)clrtoeol(); - if (s) { - (void)addstr(s); - (void)beep(); - } + va_start(ap, fmt); + (void)vw_printw(stdscr, fmt, ap); + va_end(ap); + (void)refresh(); } static int rnd(int n) { return (((rand() & 0x7FFF) % n)); } @@ -234,7 +259,7 @@ ny += yincr[n]; nx += xincr[n]; - if (!ONBOARD(ny, nx) || board[ny][nx] == S_BOATSEEN) { + if (!ONBOARD(ny, nx) || (board[ny][nx] & S_BOATSEEN)) { break; } @@ -274,7 +299,9 @@ (void)mvaddstr(SYBASE + 5, SXBASE, "Arrow keys work."); #endif /* A_UNDERLINE */ #ifdef NCURSES_MOUSE_VERSION - if (tigetstr("Km")) { + char *km = tigetstr("Km"); + + if (km != NULL && km != (char *)-1) { (void)mvaddstr(SYBASE + 6, PX(0), "Your mouse may work. If so, " "double-click drops a probe"); @@ -354,6 +381,10 @@ int ny, nx, c; for (;;) { + if (exit_requested) { + prompt("Signal received. Exiting.", ""); + outro(exit_requested); + } (void)mvprintw(POSYBASE, 0, "(%d, %c) ", curx, 'A' + cury); pgoto(cury, curx); curs_set(1); @@ -429,10 +460,13 @@ case KEY_MOUSE: { MEVENT myevent; - getmouse(&myevent); + if (getmouse(&myevent) == ERR) { + prompt("Mouse input error. Exiting.", ""); + outro(1); + } - if (myevent.y >= PY(0) && myevent.y <= PY(BDEPTH) && - myevent.x >= PX(0) && myevent.x <= PX(BWIDTH)) { + if (myevent.y >= PY(0) && myevent.y <= PY(BDEPTH - 1) && + myevent.x >= PX(0) && myevent.x <= PX(BWIDTH - 1)) { nx = PXINV(myevent.x); ny = PYINV(myevent.y); if (myevent.bstate & BUTTON1_DOUBLE_CLICKED) { @@ -558,6 +592,10 @@ static bool domove(void) /* accept a player move */ { + if (exit_requested) { + prompt("Signal received. Exiting.", ""); + outro(exit_requested); + } switch (getcoord()) { case '?': help(); @@ -601,12 +639,14 @@ for (i = 0; i < BDEPTH; i++) { for (j = 0; j < BWIDTH; j++) { - if (!(board[i][j] || probes[i][j])) { + int state = board[i][j]; + + if (!(state & (S_MARKED | S_BLANKED | S_PROBED | S_BOATSEEN))) { yes = FALSE; } } } - return (FALSE); + return yes; } static int confirm(void) { @@ -614,12 +654,20 @@ (void)refresh(); for (;;) { + if (exit_requested) { + prompt("Signal received. Exiting.", ""); + outro(exit_requested); + } ch = getch(); - if (islower(ch)) { - ch = toupper(ch); + if (ch >= 0 && ch <= UCHAR_MAX) { + unsigned char uch = (unsigned char)ch; + + if (islower(uch)) { + ch = toupper(uch); + } } if (ch == CTRLC) { - outro(0); + outro(SIGINT); } if (ch == 'N' || ch == 'Y') { (void)addch((chtype)ch); @@ -629,22 +677,19 @@ } } -int main(argc, argv) -int argc; -char *argv[]; -{ +int main(int argc, char *argv[]) { intro(); do { initgame(); redisplay(TRUE); - while (boatsfound < LIFEBOATS && !allmarked() && domove()) { - continue; - } + while (boatsfound < LIFEBOATS && !allmarked() && domove()) { + continue; + } - redisplay(FALSE); /* force found count to be updated */ - prompt("Want to play again [yn]? ", ""); - } while (confirm()); + redisplay(FALSE); /* force found count to be updated */ + promptf("Want to play again [yn]? "); +} while (confirm()); outro(0); /*NOTREACHED*/ } ++++++ galaxis-Makefile.patch ++++++ --- /var/tmp/diff_new_pack.wG8LsV/_old 2026-10-21 21:03:31.442239398 +0200 +++ /var/tmp/diff_new_pack.wG8LsV/_new 2026-10-21 21:03:31.447239611 +0200 @@ -1,29 +1,24 @@ ---- Makefile.orig 2024-06-30 09:09:15.631522825 +0800 -+++ Makefile 2024-06-30 09:14:38.004724948 +0800 -@@ -25,13 +25,20 @@ - asciidoctor -D. -a nofooter -a webfonts! $< - - install: galaxis.6 uninstall -- install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/ -- install -m 755 -o 0 -g 0 galaxis $(ROOT)/usr/bin/galaxis -- install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man6/ -- install -m 755 -o 0 -g 0 galaxis.6 $(ROOT)/usr/share/man/man6/galaxis.6 -+ install -m 0755 -d $(DESTDIR)/usr/bin -+ install -m 0755 -d $(DESTDIR)/usr/share/man/man6 -+ install -m 0755 -d $(DESTDIR)/usr/share/applications/ -+ install -m 0755 -d $(DESTDIR)/usr/share/pixmaps/ -+ install -m 0755 -d $(DESTDIR)/usr/share/appdata -+ install -m 0755 galaxis $(DESTDIR)/usr/bin/ -+ install -m 0644 galaxis.6 $(DESTDIR)/usr/share/man/man6/ -+ install -m 0644 galaxis.desktop $(DESTDIR)/usr/share/applications/ -+ install -m 0644 galaxis.png $(DESTDIR)/usr/share/pixmaps/ +--- Makefile.orig ++++ Makefile +@@ -58,11 +58,18 @@ + install: + install -d $(DESTDIR)$(BINDIR) + install -m 755 galaxis $(DESTDIR)$(BINDIR)/galaxis +- install galaxis.1 $(DESTDIR)$(MANDIR)/man1/galaxis.6 ++ install -d $(DESTDIR)$(MANDIR)/man6 ++ install -m 644 galaxis.6 $(DESTDIR)$(MANDIR)/man6/galaxis.6 ++ install -d $(DESTDIR)$(DATADIR)/applications ++ install -m 644 galaxis.desktop $(DESTDIR)$(DATADIR)/applications/ ++ install -d $(DESTDIR)$(DATADIR)/pixmaps ++ install -m 644 galaxis.png $(DESTDIR)$(DATADIR)/pixmaps/ uninstall: -- rm -f ${ROOT}/usr/bin/galaxis ${ROOT}/usr/share/man/man6/galaxis.6 -+ rm -f /usr/bin/galaxis /usr/share/man/man6/galaxis.6 -+ rm -f /usr/share/applications/galaxis.desktop -+ rm -f /usr/share/pixmaps/galaxis.png + rm -f $(DESTDIR)$(BINDIR)/galaxis +- rm -f $(DESTDIR)$(MANDIR)/man1/galaxis.6 ++ rm -f $(DESTDIR)$(MANDIR)/man6/galaxis.6 ++ rm -f $(DESTDIR)$(DATADIR)/applications/galaxis.desktop ++ rm -f $(DESTDIR)$(DATADIR)/pixmaps/galaxis.png + + # Export - clean: - rm -f galaxis galaxis.6 galaxis-*.tar.gz *~ *.html ++++++ galaxis-galaxis.c.patch ++++++ --- /var/tmp/diff_new_pack.wG8LsV/_old 2026-10-21 21:03:31.466240417 +0200 +++ /var/tmp/diff_new_pack.wG8LsV/_new 2026-10-21 21:03:31.470240587 +0200 @@ -1,10 +1,10 @@ ---- galaxis.c.orig 2024-06-30 09:53:04.272614651 +0800 -+++ galaxis.c 2024-06-30 09:57:29.188407132 +0800 -@@ -647,6 +647,7 @@ - } while (confirm()); +--- galaxis.c.orig ++++ galaxis.c +@@ -692,6 +692,7 @@ + } while (confirm()); outro(0); /*NOTREACHED*/ -+ return 0; ++ return 0; } /* galaxis.c ends here */
