Compare commits

...
Sign in to create a new pull request.

24 commits

Author SHA1 Message Date
Fedora Release Engineering
f306d7cefa Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 09:43:05 +00:00
Justin Wheeler
ae6c087e48
⬆️ spec: Update to v1.1.0
Upstream v1.1.0 includes several bug fixes merged since v1.0.3: out-of-
bounds array access in preposition vocabulary, missing `unistd.h` header
include, incorrect `localtime` prototype, and a preprocessor guard for
the curses header. The `Makefile` also gained native `LDFLAGS` support.

Refreshed `zork-tweak-makefile.patch` against the new source — the
`LDFLAGS` addition shifted hunk context and caused `fuzz=0` failures in
Koji on the original patch. All four patch hunks remain necessary:
upstream's `-DTEXTFILE` flag in the Makefile is overridden by the
`#define` in `dinit.c`, so the source-level path fix is still required.

Migrated `Release` to `%autorelease` and removed the
`%global _hardened_build 1` macro (default since Fedora 23, and
misplaced inside `%prep` rather than at spec top).

Assisted-by: Claude Opus 4.6 (1M context)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
2026-06-30 00:26:47 -04:00
Justin Wheeler
0fec550d47
🚚 spec: Update maintainer name in changelog
Update all changelog entries from dead name to current legal name. No
functional change.

Assisted-by: Claude Opus 4.6 (1M context)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
2026-06-30 00:25:55 -04:00
Justin Wheeler
a79c71b523
📦️ spec: Version bump for RPM with FTBFS fix
This commit updates the RPM spec to a new version to pull in the updated
change from @limb that should fix the FTBFS issue for the `zork`
package. This commit will be published to `rawhide`, `f44`, `f43`,
`f42`, `epel9`, and `epel8`.

Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
2026-02-22 14:25:02 -05:00
Justin Wheeler
75719cbb96
📝 README: Adopt upstream README
This commit pulls the README.md file down from upstream, and repeats it
here for convenience. I might make a more updated README specific for
this RPM package at a later date.

Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
2026-02-22 12:38:43 -05:00
Gwyn Ciesla
7c65a2a65d Fix FTBFS 2026-02-17 12:25:47 -06:00
Fedora Release Engineering
b6b5b7775a Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 21:10:39 +00:00
Fedora Release Engineering
247a387269 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:20:33 +00:00
Fedora Release Engineering
bc445b7364 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:51:33 +00:00
Miroslav Suchý
b4c7655c56 Migrate to SPDX license
See https://gitlab.com/fedora/legal/fedora-license-data/-/merge_requests/634 and https://docs.fedoraproject.org/en-US/legal/update-existing-packages/#_public_domain

This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4

If there will be no comments in two weeks, I will merge this.
2024-09-25 04:51:13 +00:00
Fedora Release Engineering
7942d5cdf5 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 10:56:34 +00:00
Fedora Release Engineering
960e648aa5 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 11:16:35 +00:00
Fedora Release Engineering
78a31b59ae Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:46:39 +00:00
Fedora Release Engineering
85ded02991 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 08:20:29 +00:00
Fedora Release Engineering
32a8c48052 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 13:59:58 +00:00
Fedora Release Engineering
55b6b29c61 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 05:55:59 +00:00
Fedora Release Engineering
1937ec475e - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 22:22:20 +00:00
Justin W. Flory (he/him)
bb00d21cf1
v1.0.3: Fix reused integers from being optimized out
Update to latest upstream release for Zork. This includes an upstream
fix for compiler optimizations that caused a segfault when playing the
game. Patch contributed by Jan Drögehoff @sentry.

Related to BZ#1833823.

Signed-off-by: Justin W. Flory (he/him) <git@jwf.io>
2021-03-02 11:48:08 -05:00
Justin W. Flory (he/him)
6a7d457591
Bug 1833823: Workaround runtime segfault by removing compiler flag
This commit introduces a change suggested in the Fedora Packaging
Community Telegram chat by Jan. It disables some of the compiler
optimization flags so the runtime segfault does not happen.

This is a temporary fix. We are evaluating whether the root issue can be
triaged in the original code, and if so, we will extend a patch to
upstream so others may benefit as well.

Signed-off-by: Justin W. Flory (he/him) <git@jwf.io>
2021-02-17 17:46:51 -05:00
Fedora Release Engineering
b79548bb03 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-28 00:45:35 +00:00
Fedora Release Engineering
c1983e227a - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 15:26:58 +00:00
Justin W. Flory
070b9794d3
Add package sources uploaded to lookaside cache
Signed-off-by: Justin W. Flory <git@jwf.io>
2020-03-23 08:21:26 -04:00
Justin W. Flory
fdbf239bab
Initial commit: Approved package SPEC and patchfile
Signed-off-by: Justin W. Flory <git@jwf.io>
2020-03-23 08:14:26 -04:00
Justin W. Flory
4abd5bbf6b
README: Add summary and description from package spec
Signed-off-by: Justin W. Flory <git@jwf.io>
2020-03-23 08:10:33 -04:00
5 changed files with 305 additions and 2 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/zork-1.0.2.tar.gz
/zork-1.0.3.tar.gz
/zork-1.1.0.tar.gz

134
README.md
View file

@ -1,3 +1,133 @@
# zork
```
Welcome to Dungeon. This version created 11-MAR-91.
You are in an open field west of a big white house with a boarded front door.
There is a small mailbox here.
>
```
The zork package
# DUNGEON (AKA Zork)
**Public Domain Source Code for the Mainframe Game "Dungeon"**
This repository contains the Public Domain source code for *Dungeon*, the mainframe version of the game that served as the precursor to Infocom's commercial *Zork* trilogy.
This codebase is a C port derived from the FORTRAN source of **Zork 2.6**.
## Installation
### Fedora Linux
This package is available in the official Fedora Linux repositories.
You can install it directly via the command-line:
```bash
sudo dnf install zork
```
### Building from Source
To build the game from the source files in this repository:
```bash
make
```
## Modern Maintainership & Philosophy (2013-12 to present)
**Current Maintainers:**
* Shane Thomas ([@devshane](https://github.com/devshane))
* Jan Drögehoff ([@Jan200101](https://github.com/Jan200101))
* Justin Wheeler ([@justwheel](https://github.com/justwheel))
**Project Philosophy:**
This project utilizes the FORTRAN source of *Dungeon* (Zork 2.6) as its foundation.
The primary design goal is code preservation.
We aim to maintain the logic and behavior of the game as accurately as possible while updating the codebase to compile and run on modern C compilers and operating systems.
## History of the Implementation
This version of *Dungeon* has been modified from FORTRAN to C.
The historical lineage of this code is as follows:
1. **Original Development (MDL)**:
The original game (initially titled *Zork*) was written in the MDL programming language (MUDDLE) at the MIT Laboratory for Computer Science.
2. **PDP-11 Translation (FORTRAN)**:
Bob Supnik translated the MDL source into DEC FORTRAN for the PDP-11, renaming the game *Dungeon*.
3. **UNIX Port (f77)**:
The FORTRAN version was subsequently ported to `f77` for UNIX systems.
4. **C Translation**:
The C translation was generated from the `f77` version using `f2c`.
`f2c` is a FORTRAN-to-C translator written by David Gay (AT&T Bell Labs), Stu Feldman (Bellcore), Mark Maimone (Carnegie-Mellon University), and Norm Schryer (AT&T Bell Labs).
*Note on Zork I:*
While often conflated, *Dungeon* differs from *Zork I*.
*Zork I* is a microcomputer adaptation comprising approximately one-third of the original mainframe game's map and puzzles.
*Dungeon* represents the more complete, albeit earlier, mainframe experience.
### I. From original game documentation
To: Dungeon Players
From: "The Translator"
Subj: Game Information
Date: 8-OCT-80
This is the first (and last) source release of the PDP-11 version of
Dungeon.
Please note that Dungeon has been superceded by the game ZORK(tm).
The following is an extract from the new product announcement for
ZORK in the September, 1980 issue of the RT-11 SIG newsletter:
"'ZORK: The Great Underground Empire - Part I' ...was developed
by the original authors based on their ZORK (Dungeon) game for
the PDP-10. It features a greatly improved parser; command
input and transcript output files; SAVEs to any device and
file name; and adaptation to different terminal types,
including a status line on VT100s. Note: this is not the
FORTRAN version that has been available through DECUS. This
version has been completely rewritten to run efficiently on
small machines - up to 10 times as fast as the DECUS version.
...ZORK runs under RT-ll, HT-ll, or RSTS/E and requires as
little as 20K words of memory and a single floppy disk drive.
The game package, consisting of an RX01-format diskette and
an instruction booklet, is available from Infocom, Inc.,
P.O. Box 120, Kendall Station, Cambridge, Ma. 02142."
ZORK(tm) is a trademark of Infocom, Inc. It is available for several
popular personal computers as well as for the PDP-ll.
### II. DEC FORTRAN to f77 Conversion (1981-11-17)
The conversion from DEC FORTRAN to Unix f77 was done by **Randy Dietrich, Lynn Cochran and Sig Peterson**.
Much hacking was done to get it to fit in the limited address space of a PDP-11/44 (split I/D).
Suffice it to say that by leaving out the debugging package and not linking in the f77 i/o library, they managed to get it to run.
### III. PDP to VAX (1985-12)
Based on the work of Randy, Lynn and Sig, **Bill Randle** folded in the full save/restore functions and the game debugging package (gdt) into the PDP version to create a Vax/Unix version.
This version also uses f77 i/o, thus eliminating the extra speak and listen processes needed on the PDP.
### IV. Cleanup I (1986-12-11)
**John Gilmore** (hoptoad!gnu) cleaned up the source files by moving most of the common declarations into include files and added comments from the original (_FORTRAN or MDL?_) source.
His efforts are greatly appreciated.
### V. Cleanup II (1987-02-09)
**Bill Randle** added the PDP dependencies back into the Vax source files with `#ifdef`s in order to have just one set of sources.
Previously, there were two sets of source: one for the PDP and one for the Vax.
In addition, a shell escape of the form `!cmd` was added and the wizard can enter the gdt without having to recompile the source.
Finally, a man page was generated, based on the `dungeon.doc` file.
### VI. f77 to C (1991-03-11)
**Ian Lance Taylor** used the `f2c` translator to generate C source code.
The resulting code was modified to remove the FORTRAN I/O library, to add simple more processing, and to change the format of the database file.
**Andre Srinivasan** helped test it.
**Jonathan Mark** made it work under MS-DOS and Microsoft C.

1
sources Normal file
View file

@ -0,0 +1 @@
SHA512 (zork-1.1.0.tar.gz) = e72082b4e2e3ff8a68588ce19409fa132921e16e4d15cfef84c9471b3ac989a4d1c251bf2518ddfa7770b803b7dfc40c264377d5a1310688551413b73471cb3d

53
zork-tweak-makefile.patch Normal file
View file

@ -0,0 +1,53 @@
From ce241188ca387a42c3ab09454c881acfe30c955e Mon Sep 17 00:00:00 2001
From: "Justin Wheeler" <jwheel@fedoraproject.org>
Date: Tue, 30 Apr 2019 15:36:07 -0400
Subject: [PATCH 1/1] Makefile: Change compile options for Fedora RPM package
---
Makefile | 6 +++---
dinit.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@
# Uncomment the following line if you want to have access to the game
# debugging tool. This is invoked by typing "gdt". It is not much
# use except for debugging.
-GDTFLAG = -DALLOW_GDT
+# GDTFLAG = -DALLOW_GDT
# Compilation flags
CFLAGS = -g #-static
@@ -70,7 +70,7 @@
$(CC) $(CFLAGS) -o zork $(OBJS) $(LDFLAGS) $(LIBS)
install: zork dtextc.dat
- mkdir -p $(BINDIR) $(LIBDIR) $(MANDIR)/man6
+ mkdir -p $(BINDIR) $(DATADIR) $(LIBDIR) $(MANDIR)/man6
cp zork $(BINDIR)
cp dtextc.dat $(DATADIR)
cp dungeon.6 $(MANDIR)/man6/
@@ -94,7 +94,7 @@
$(CC) $(CFLAGS) $(GDTFLAG) -c local.c
supp.o: supp.c funcs.h vars.h
- $(CC) $(CFLAGS) $(TERMFLAG) -c supp.c
+ $(CC) $(CFLAGS) $(TERMFLAG) -c supp.c
actors.o: funcs.h vars.h
ballop.o: funcs.h vars.h
--- a/dinit.c
+++ b/dinit.c
@@ -24,7 +24,7 @@
#define TEXTFILE "lib:dtextc.dat"
#else /* ! __AMOS__ */
#ifdef unix
-#define TEXTFILE "/usr/games/lib/dunlib/dtextc.dat"
+#define TEXTFILE "/usr/share/zork/dtextc.dat"
#else /* ! unix */
I need a definition for TEXTFILE
#endif /* ! unix */
--
2.20.1

116
zork.spec Normal file
View file

@ -0,0 +1,116 @@
Name: zork
Version: 1.1.0
Release: %autorelease
Summary: Public Domain original DUNGEON game (AKA, Zork)
License: LicenseRef-Fedora-Public-Domain
URL: https://github.com/devshane/zork
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: zork-tweak-makefile.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: ncurses-devel
%description
Public Domain Source Code for the Mainframe Game "Dungeon". This repository contains the Public Domain source code for
Dungeon, the mainframe version of the game that served as the precursor to Infocom's commercial Zork trilogy. This
codebase is a C port derived from the FORTRAN source of Zork 2.6.
%prep
%autosetup
%build
%make_build \
CFLAGS="%{optflags} -std=c17" \
DATADIR="%{_datadir}/%{name}" \
LDFLAGS="%{__global_ldflags}"
%install
%make_install \
BINDIR="%{buildroot}%{_bindir}" \
DATADIR="%{buildroot}%{_datadir}/%{name}/" \
LIBDIR="%{buildroot}%{_datadir}" \
MANDIR="%{buildroot}%{_mandir}"
echo ".so dungeon.6" > %{buildroot}%{_mandir}/man6/zork.6
%files
%doc history
%doc README.md
%license readme.txt
%{_bindir}/%{name}
%{_datadir}/%{name}/dtextc.dat
%{_mandir}/man6/dungeon.6.gz
%{_mandir}/man6/zork.6*
%changelog
* Tue Jun 30 2026 Justin Wheeler <jwheel@fedoraproject.org> - 1.1.0-1
- Update to v1.1.0
- Upstream bug fixes: out-of-bounds array access, missing unistd.h header,
localtime prototype, curses header preprocessor guard
- Upstream build improvements: LDFLAGS support in Makefile
- Migrate to %%autorelease
- Remove unnecessary %%global _hardened_build 1 (default since F23)
* Sun Feb 22 2026 Justin Wheeler <jwheel@fedoraproject.org> - 1.0.3-12
- Fix FTBFS. Thanks @limb for the hotfix.
- Upstream work ongoing for improved support with newer versions of the C programming language and compilers.
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Mar 02 2021 Justin Wheeler <jwheel@fedoraproject.org> - 1.0.3-1
- Fix reused integers from being optimized out.
- Props to Jan Drögehoff (FAS: sentry) for sending this fix upstream to avoid carrying a Fedora-specific patch.
- Remove grues.
* Wed Feb 17 2021 Justin Wheeler <jwheel@fedoraproject.org> - 1.0.2-6
- Remove compiler optimization flag to workaround segfault while upstream change is assessed
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Mar 03 2020 Justin Wheeler <jwheel@fedoraproject.org> - 1.0.2-3
- Add manpage alias for zork, to match binary executable
- Add upstream 'history' file as a doc
* Tue Apr 30 2019 Justin Wheeler <jwheel@fedoraproject.org> - 1.0.2-2
- Use Fedora CFLAGS during compilation
* Mon Apr 29 2019 Justin Wheeler <jwheel@fedoraproject.org> - 1.0.2-1
- First zork package