And here is the corresponding diff to the other nethack-derived
ports in-tree.

I've noticed that I had plain forgotten to install some recover
binaries as setgid.

One potential issue might be that some of these old ports are
setgid games.

Changing them to their own group might set migration issues.

I'll have to test, but at least this takes care of the setgid markers.


Index: nethack/3.4/Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/nethack/3.4/Makefile,v
diff -u -p -r1.10 Makefile
--- nethack/3.4/Makefile        28 Jan 2025 10:17:37 -0000      1.10
+++ nethack/3.4/Makefile        27 Oct 2026 09:17:12 -0000
@@ -2,7 +2,7 @@ COMMENT =       dungeon explorin', hackin', ga
 V =            3.4.3
 DISTNAME =     nethack-$V
 PKGNAME =      ${DISTNAME}
-REVISION =     18
+REVISION =     19
 CATEGORIES =   games
 
 SITES =                ${SITE_SOURCEFORGE:=nethack/}
Index: nethack/3.4/patches/patch-src_files_c
===================================================================
RCS file: 
/build/data/openbsd/cvs/ports/games/nethack/3.4/patches/patch-src_files_c,v
diff -u -p -r1.2 patch-src_files_c
--- nethack/3.4/patches/patch-src_files_c       11 Mar 2022 19:04:42 -0000      
1.2
+++ nethack/3.4/patches/patch-src_files_c       27 Oct 2026 09:17:02 -0000
@@ -1,6 +1,20 @@
---- src/files.c.orig   Sat Feb 11 09:31:55 2006
-+++ src/files.c        Sat Feb 11 09:32:01 2006
-@@ -1153,7 +1153,9 @@ boolean uncomp;
+Index: src/files.c
+--- src/files.c.orig
++++ src/files.c
+@@ -164,6 +164,12 @@ STATIC_DCL boolean FDECL(copy_bytes, (int, int));
+ STATIC_DCL int FDECL(open_levelfile_exclusively, (const char *, int, int));
+ #endif
+ 
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ /*
+  * fname_encode()
+  *
+@@ -1153,7 +1159,9 @@ boolean uncomp;
                        redirect(filename, RDBMODE, stdin, uncomp);
                        redirect(cfn, WRBMODE, stdout, uncomp);
                }
Index: nethack/3.4/patches/patch-util_recover_c
===================================================================
RCS file: nethack/3.4/patches/patch-util_recover_c
diff -N nethack/3.4/patches/patch-util_recover_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ nethack/3.4/patches/patch-util_recover_c    27 Oct 2026 09:17:02 -0000
@@ -0,0 +1,17 @@
+Index: util/recover.c
+--- util/recover.c.orig
++++ util/recover.c
+@@ -57,6 +57,13 @@ char *FDECL(exepath, (char *));
+ #if defined(__BORLANDC__) && !defined(_WIN32)
+ extern unsigned _stklen = STKSIZ;
+ #endif
++
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ char savename[SAVESIZE]; /* holds relative path of save file from playground 
*/
+ 
+ 
Index: nethack/3.6/Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/nethack/3.6/Makefile,v
diff -u -p -r1.15 Makefile
--- nethack/3.6/Makefile        29 Jun 2026 12:00:47 -0000      1.15
+++ nethack/3.6/Makefile        27 Oct 2026 09:37:24 -0000
@@ -4,6 +4,7 @@ V =             3.6.7
 BASEV =                3.6.0
 DISTNAME =     nethack-$V
 PKGNAME =      ${DISTNAME}
+REVISION =     0
 CATEGORIES =   games
 SITES =                https://www.nethack.org/download/$V/
 DISTFILES =    nethack-${V:S/.//g}-src.tgz
Index: nethack/3.6/patches/patch-src_files_c
===================================================================
RCS file: 
/build/data/openbsd/cvs/ports/games/nethack/3.6/patches/patch-src_files_c,v
diff -u -p -r1.5 patch-src_files_c
--- nethack/3.6/patches/patch-src_files_c       29 Jun 2026 11:59:43 -0000      
1.5
+++ nethack/3.6/patches/patch-src_files_c       27 Oct 2026 09:20:01 -0000
@@ -1,7 +1,20 @@
 Index: src/files.c
 --- src/files.c.orig
 +++ src/files.c
-@@ -1373,6 +1373,7 @@ boolean uncomp;
+@@ -224,6 +224,12 @@ STATIC_DCL int FDECL(open_levelfile_exclusively, (cons
+ static char *config_section_chosen = (char *) 0;
+ static char *config_section_current = (char *) 0;
+ 
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ /*
+  * fname_encode()
+  *
+@@ -1373,6 +1379,7 @@ boolean uncomp;
  #endif
      f = fork();
      if (f == 0) { /* child */
@@ -9,7 +22,7 @@ Index: src/files.c
  #ifdef TTY_GRAPHICS
          /* any error messages from the compression must come out after
           * the first line, because the more() to let the user read
-@@ -1397,8 +1398,10 @@ boolean uncomp;
+@@ -1397,8 +1404,10 @@ boolean uncomp;
              redirect(filename, RDBMODE, stdin, uncomp);
              redirect(cfn, WRBMODE, stdout, uncomp);
          }
Index: nethack/3.6/patches/patch-util_recover_c
===================================================================
RCS file: nethack/3.6/patches/patch-util_recover_c
diff -N nethack/3.6/patches/patch-util_recover_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ nethack/3.6/patches/patch-util_recover_c    27 Oct 2026 09:20:01 -0000
@@ -0,0 +1,17 @@
+Index: util/recover.c
+--- util/recover.c.orig
++++ util/recover.c
+@@ -58,6 +58,13 @@ char *FDECL(exepath, (char *));
+ #if defined(__BORLANDC__) && !defined(_WIN32)
+ extern unsigned _stklen = STKSIZ;
+ #endif
++
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ char savename[SAVESIZE]; /* holds relative path of save file from playground 
*/
+ 
+ int
Index: slash/Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/slash/Makefile,v
diff -u -p -r1.55 Makefile
--- slash/Makefile      4 Jun 2026 12:52:24 -0000       1.55
+++ slash/Makefile      27 Oct 2026 09:28:19 -0000
@@ -2,7 +2,7 @@ COMMENT =       dungeon explorin', hackin' gam
 
 DISTNAME =     slash-e8
 PKGNAME =      slash-3.2.2.e8
-REVISION =     9
+REVISION =     10
 CATEGORIES =   games
 
 SITES =                ${SITE_SOURCEFORGE:=nethack/}
Index: slash/patches/patch-src_files_c
===================================================================
RCS file: slash/patches/patch-src_files_c
diff -N slash/patches/patch-src_files_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ slash/patches/patch-src_files_c     27 Oct 2026 09:27:51 -0000
@@ -0,0 +1,16 @@
+Index: src/files.c
+--- src/files.c.orig
++++ src/files.c
+@@ -77,6 +77,12 @@ static FILE *FDECL(fopen_config_file, (const char *));
+ static int FDECL(get_uchars, (FILE *,char *,char *,uchar *,int,const char *));
+ int FDECL(parse_config_line, (FILE *,char *,char *,char *));
+ 
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ 
+ /* fopen a file, with OS-dependent bells and whistles */
+ /* NOTE: a simpler version of this routine also exists in util/dlb_main.c */
Index: slash/patches/patch-util_recover_c
===================================================================
RCS file: slash/patches/patch-util_recover_c
diff -N slash/patches/patch-util_recover_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ slash/patches/patch-util_recover_c  27 Oct 2026 09:27:51 -0000
@@ -0,0 +1,17 @@
+Index: util/recover.c
+--- util/recover.c.orig
++++ util/recover.c
+@@ -39,6 +39,13 @@ void FDECL(copy_bytes, (int,int));
+ #ifdef __BORLANDC__
+ extern unsigned _stklen = STKSIZ;
+ #endif
++
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ char savename[SAVESIZE]; /* holds relative path of save file from playground 
*/
+ 
+ 
Index: slash/pkg/PLIST
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/slash/pkg/PLIST,v
diff -u -p -r1.13 PLIST
--- slash/pkg/PLIST     4 Jun 2026 12:52:24 -0000       1.13
+++ slash/pkg/PLIST     27 Oct 2026 09:26:24 -0000
@@ -1,6 +1,7 @@
 @unexec rm -rf %D/lib/slashdir/save
 @group games
 bin/slash
+@mode 2555
 @bin bin/srecover
 @mode 0775
 ${GAMEDIR}/
Index: slash-em/Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/slash-em/Makefile,v
diff -u -p -r1.35 Makefile
--- slash-em/Makefile   4 Jun 2026 13:03:09 -0000       1.35
+++ slash-em/Makefile   27 Oct 2026 09:32:01 -0000
@@ -1,7 +1,7 @@
 COMMENT =      dungeon explorin', hackin', game.  Hard
 DISTNAME =     se007e7f1
 PKGNAME =      slash-em-3.4.3.7e7f1
-REVISION =     10
+REVISION =     11
 V =            3.4.3.7e7f1
 CATEGORIES =   games
 
Index: slash-em/patches/patch-src_files_c
===================================================================
RCS file: slash-em/patches/patch-src_files_c
diff -N slash-em/patches/patch-src_files_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ slash-em/patches/patch-src_files_c  27 Oct 2026 09:31:47 -0000
@@ -0,0 +1,16 @@
+Index: src/files.c
+--- src/files.c.orig
++++ src/files.c
+@@ -193,6 +193,12 @@ STATIC_DCL boolean FDECL(copy_bytes, (int, int));
+ STATIC_DCL int FDECL(open_levelfile_exclusively, (const char *, int, int));
+ #endif
+ 
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ /*
+  * fname_encode()
+  *
Index: slash-em/patches/patch-util_recover_c
===================================================================
RCS file: slash-em/patches/patch-util_recover_c
diff -N slash-em/patches/patch-util_recover_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ slash-em/patches/patch-util_recover_c       27 Oct 2026 09:31:47 -0000
@@ -0,0 +1,17 @@
+Index: util/recover.c
+--- util/recover.c.orig
++++ util/recover.c
+@@ -57,6 +57,13 @@ char *FDECL(exepath, (char *));
+ #if defined(__BORLANDC__) && !defined(_WIN32)
+ extern unsigned _stklen = STKSIZ;
+ #endif
++
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ char savename[SAVESIZE]; /* holds relative path of save file from playground 
*/
+ 
+ 
Index: slash-em/pkg/PLIST
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/slash-em/pkg/PLIST,v
diff -u -p -r1.11 PLIST
--- slash-em/pkg/PLIST  4 Jun 2026 13:03:09 -0000       1.11
+++ slash-em/pkg/PLIST  27 Oct 2026 09:31:43 -0000
@@ -4,6 +4,7 @@
 @comment bin/slashem
 bin/slashem-${V}
 @group games
+@mode 2555
 @bin bin/strecover-${V}
 @mode 0775
 ${GAMEDIR}/
Index: falconseye/Makefile
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/falconseye/Makefile,v
diff -u -p -r1.37 Makefile
--- falconseye/Makefile 5 Jun 2026 20:18:03 -0000       1.37
+++ falconseye/Makefile 27 Oct 2026 09:37:07 -0000
@@ -3,7 +3,7 @@ COMMENT =       NetHack derivative
 VERSION =      1.9.3
 DISTNAME =     nethack_source_331_jtp_${VERSION:S/.//g}
 PKGNAME =      falconseye-${VERSION}
-REVISION =     12
+REVISION =     13
 CATEGORIES =   games x11
 EXTRACT_SUFX = .zip
 
Index: falconseye/patches/patch-src_files_c
===================================================================
RCS file: 
/build/data/openbsd/cvs/ports/games/falconseye/patches/patch-src_files_c,v
diff -u -p -r1.1 patch-src_files_c
--- falconseye/patches/patch-src_files_c        5 Jun 2026 20:18:03 -0000       
1.1
+++ falconseye/patches/patch-src_files_c        27 Oct 2026 09:36:49 -0000
@@ -9,3 +9,18 @@ Index: src/files.c
  #ifdef COMPRESS
  STATIC_DCL void FDECL(redirect, (char *,char *,FILE *,BOOLEAN_P));
  STATIC_DCL void FDECL(docompress_file, (char *,BOOLEAN_P));
+@@ -110,6 +111,14 @@ STATIC_DCL void FDECL(adjust_prefix, (char *, int));
+ #ifndef PREFIXES_IN_USE
+ /*ARGSUSED*/
+ #endif
++
++
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ const char *
+ fqname(basename, whichprefix, buffnum)
+ const char *basename;
Index: falconseye/patches/patch-util_recover_c
===================================================================
RCS file: falconseye/patches/patch-util_recover_c
diff -N falconseye/patches/patch-util_recover_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ falconseye/patches/patch-util_recover_c     27 Oct 2026 09:36:49 -0000
@@ -0,0 +1,17 @@
+Index: util/recover.c
+--- util/recover.c.orig
++++ util/recover.c
+@@ -50,6 +50,13 @@ char *FDECL(exepath, (char *));
+ #ifdef __BORLANDC__
+ extern unsigned _stklen = STKSIZ;
+ #endif
++
++#ifdef __OpenBSD__
++#include <sys/stat.h>
++/* OpenBSD: set[ug]id binary MUST say so in this var */
++mode_t _permit_setugid = S_ISGID;
++#endif
++
+ char savename[SAVESIZE]; /* holds relative path of save file from playground 
*/
+ 
+ 
Index: falconseye/pkg/PLIST
===================================================================
RCS file: /build/data/openbsd/cvs/ports/games/falconseye/pkg/PLIST,v
diff -u -p -r1.7 PLIST
--- falconseye/pkg/PLIST        4 Jun 2026 13:17:56 -0000       1.7
+++ falconseye/pkg/PLIST        27 Oct 2026 09:35:39 -0000
@@ -1,6 +1,7 @@
 @unexec rm -rf ${GAMEDIR}/save/*
 @group games
 bin/falconseye
+@mode 2555
 @bin bin/frecover
 @mode 0775
 ${GAMEDIR}/

Reply via email to