From fe4474dccbc0e785e99189c974efcb8519304e9e Mon Sep 17 00:00:00 2001 From: Skyebee Date: Sat, 13 Jun 2026 23:12:53 -0400 Subject: [PATCH] Update README Move some documentation into wiki, and add wiki as submodule (cherry picked from commit e192a3a1f5964ea628979962e10303b497e902b6) Update Setup Hints nethack root segfault tip Move some more stuff to wiki, add security section for server setup --- README.md | 204 +++----------------------------------- doc/wiki | 2 +- examples/dgamelaunch.conf | 15 +++ 3 files changed, 29 insertions(+), 192 deletions(-) diff --git a/README.md b/README.md index 2e18d6e..86c797a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,16 @@ -The main feature of the master branch of this fork is install-dgl-nh500, which -does what it says on the tin. It will fetch, compile, and install -nethack 5.0.0, and do the same for DGL (although it is already fetched by the -time you're using the script), and put them into a chroot of your choosing. +This fork is a branch of version 1.6.0-hdf; this fork is currently in version 1.6.1-roc. -autoconf branch is for making dgl's configure/makefile stuff work, without -having to use these bash scripts people have written over the years. +Several forks have been merged in; some features prior to my own modifications: +* noisytoot's linux namespace support +* crawl's character-stripping for watchers with extremely-outdated hardware +* paxed's handful of changes (mostly fixing warnings) + +Here are some other features of this fork: +* install-dgl-nh500 script, replacement for dgl-create-chroot +* rubber-ducky branch, which has currently a single function drawbanner() + explained line-by-line -- planning to do this for more of the codebase, + as the personal need arises. +* Some upgrades to menu/bannerfile handling -- see Changelog I'm pretty interested in the history of this program -- so much so that I went through pains trying to make sure I was forking a version of the repository @@ -13,192 +19,8 @@ such that its history appears entirely-unrelated to git. Anyway, if you know anything of the history, reach out. -# install-dgl-nh500 documentation -```bash -#!/bin/bash - -# install-dgl-nh500 -# -# Script for setting up Debian DGL/NetHack 5.0.0 environment -# (hopefully to also set up DCSS 0.34.1 too) -# -# You should run this as root. -# -# Should be run in the directory it was shipped in. -# -# Usage: -# ./install-dgl-nh500 [options] -# -# OPTION [default] DESCRIPTION -# --prefix [/opt/dgamelaunch] DGL's chroot. All other locations are -# relative to this directory! And -# everything DGL or NetHack need to run -# is in this directory. - -# --var [/var] Location for mutable data. Organized a -# little strangely in that each game known -# to dgamelaunch has its own subdirectory, -# and dgamelaunch's data is just in here. - -# --etc [/etc] Location for immutable and config data. -# Ditto, each game has its own subdirectry. -# note that NetHack doesn't have one; all -# of its immutable data lives in hackdir. - -# --menudir [/menu] Location for menu files. Really they can -# be anywhere, but this instructs the -# script where to put the default ones. - -# --hackdir [/opt/nh500] NetHack is built wth this as its prefix. - -# --playground [/var/nh500] NetHack is built with this as its -# 'var playground.' - -# --dbfile [/dgamelaunch.db] The location for the database. - -# --without-nano [FLAG] If you do not set this flag, nano will be -# installed in the chroot, for use as an -# editor. The default configuration -# assumes it is "built" with nano. - -# --without-nh500 [FLAG] If you set without-nh500, the script will -# not install NetHack. Know what you're -# doing! - -# -q -s --quiet --silent [FLAG] Causes autogen and make to run quietly. - -# --clean [FLAG] Skips everything except the clean step. -# Useful if the process gets interrupted... - - -# Here are some settings which would cause nethack and dgl to be installed -# in a way that reflects the setup instructions provided by Paxed... -# for posterity and testing. -# -# CHROOT="/opt/nethack/nethack.alt.org" -# DGLVAR="/dgldir" -# DGLETC="/." -# MENUDIR="$DGLETC" -# HACKDIR="/nh500" -# PLAYGROUND="/nh500/var" -# -# ./install-dgl-nh500 --prefix /opt/nethack/nethack.alt.org --var /dgldir \ -# --etc /. --menudir /. --hackdir /nh500 --playground /nh500/var --quiet -``` - -# step-by-step usage -To install and use NetHack and dgamelaunch, simply (tested as working on -Debian 6.12.88-1, with prerequisites already installed): - -After downloading this version of dgamelaunch: - -```bash -cd dgamelaunch-nh500 -sudo ./install-dgl-nh500 -``` -dgamelaunch will be installed at `/opt/dgamelaunch`, and NetHack 5.0.0 will be -installed in `/opt/dgamelaunch/opt/nh500`. - -To test the system: - -```bash -sudo /opt/dgamelaunch/bin/dgamelaunch -``` - -Try to register a new user, login, and play the game. -If it works, brilliant! If it doesn't work, try the NetHack binary: - -```bash -sudo chroot /opt/dgamelaunch nh500 -``` - -If that fails, it might be a missing library. Check `/opt/dgamelaunch/lib/` -and `.../lib64`, and compare the contents with the results of -`ldd /opt/dgamelaunch/bin/nh500`. Then copy over libraries as necessary. - - -If it's working, then you may wish to let people connect to the server just -like other servers you see online. - -To do this, you will need to do something pretty dangerous -- let anyone run -dgamelaunch, even though it has root privileges. - -```bash -sudo chmod a+s /opt/dgamelaunch/bin/dgamelaunch. -``` - -Replace with the appropriate string of numbers, obviously. From here, -any user can run dgamelaunch on your system, which might potentially create -a vulnerability. - -Next, set up a new user. On Debian: - -```bash -sudo adduser nethack -``` -And follow the prompts. Name the user whatever you like, and give bogus info -for everything other than password. Now edit `/etc/passwd`. The new user's -line will look like this: - -```bash -nethack:x:::nethack,1,1,1,1:/home/nethack:/bin/bash -``` - -You need to modify the new user's line like so: - -```bash -nethack:x:::nethack,1,1,1,1:/home/nethack:/opt/dgamelaunch/bin/dgamelaunch. -``` - -What we are doing there is setting the user nethack's login shell to -dgamelaunch. This way, when someone uses SSH to connect to your server, and -logs in as nethack, they will be presented immediately with dgamelaunch, and -will not see a shell when it exits. - -Congrats on your new server... - - -# Hints -## Dungeon Crawl Stone Soup -1) obtain the source, navigate to that directory -2) ... -```bash -sudo make install prefix=/ DATADIR=/etc/dcss0341 \ -SAVEDIR=/var/dcss0341 USE_DGAMELAUNCH=1 -``` -3) navigate to the directory with these scripts (dgamelaunch source dir) -4) ... -```bash -./cpbin -b /bin /bin/crawl /opt/dgamelaunch -sudo cp /etc/dcss0341 /opt/dgamelaunch/etc/ -sudo cp /var/dcss0341 /opt/dgamelaunch/var/ -``` -5) (clean up in `/bin/crawl`, `/etc/dcss0341`, `/var/dcss0341` if you want to; -don't need those files anymore) -6) Modify `dgamelaunch.conf` to uncomment relevant lines -7) ... -```bash -sudo mkdir /opt/dgamelaunch/var/inprogress-dcss0341 -sudo chown -R games:games /opt/dgamelaunch/var -``` -8) Modify the main menu (it might help to `dcss-menu.patch` to it) - -## Angband -1) obtain source, navigate to the directory -2) ... -```bash -./configure --prefix=/. --bindir=/bin --datarootdir=/var --with-gamedata-in-lib -``` -3) `make DESTDIR=/opt/dgamelaunch install` -4) Try out `cpbin`, with `--libs-only`, to see if you can just automagically -transfer libraries -4a) otherwise do it by hand, check out the `ldd` command and other parts of -this readme for more. -5) Uncomment relevant lines in dgamelaunch.conf, and make/chown the inprogress -dir - # Resources More resources for troubleshooting vis NetHack: https://nethackwiki.com/wiki/User:Paxed/HowTo_setup_dgamelaunch Vis dgamelaunch and crawl: -https://github.com/tarballqc/dcss-server-install/ \ No newline at end of file +https://github.com/tarballqc/dcss-server-install/ diff --git a/doc/wiki b/doc/wiki index c31b532..0a4f928 160000 --- a/doc/wiki +++ b/doc/wiki @@ -1 +1 @@ -Subproject commit c31b532862ffb7e1d964b25ea088dfe6527a58b4 +Subproject commit 0a4f9285b6d8fc5344f0a6b0e09f290e96a17294 diff --git a/examples/dgamelaunch.conf b/examples/dgamelaunch.conf index c409530..8c43728 100644 --- a/examples/dgamelaunch.conf +++ b/examples/dgamelaunch.conf @@ -366,6 +366,21 @@ DEFINE { # unlink "/mail/%n" # } +# Defining Angband +# DEFINE { +# game_path = "/bin/angband" +# game_name = "Angband" +# short_name = "ang426" +# game_args = "/bin/angband", +# "-duser=/var/angband/users/%n", +# "-dsave=/var/angband/users/%n/save", +# "-dpanic=/var/angband/users/%n/panic", +# "-darchive=/var/angband/users/%n/archive", +# "-dscores=/var/angband/scores" +# inprogressdir = "%rinprogress-ang426/" +# ttyrecdir = "%ruserdata/%n/ttyrec/" +# } + # # fiqhack example - showing watch mode options -- 2.47.3