* Can we package NetHack?
@ 2016-05-28 20:41 Kei Kebreau
2016-05-29 22:13 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Kei Kebreau @ 2016-05-28 20:41 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 491 bytes --]
NetHack tries to modify its state files in the store and none of its
easily patchable directory variables allow anything different. NetHack
also doesn't allow a ~/.nethack directory to be created in the user's
directory upon running. Does anyone have any ideas or other packages
that do this sort of thing?
Guix package definition:
http://paste.lisp.org/display/317004
The patch that the package definition searches for is attached.
--
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)
[-- Attachment #1.2: nethack-correct-directories-and-permissions.patch --]
[-- Type: text/plain, Size: 2829 bytes --]
diff -u -r nethack-3.6.0.orig/include/unixconf.h nethack-3.6.0/include/unixconf.h
--- nethack-3.6.0.orig/include/unixconf.h 2016-05-27 17:20:03.062318307 -0400
+++ nethack-3.6.0/include/unixconf.h 2016-05-27 17:55:06.332509906 -0400
@@ -36,7 +36,7 @@
#define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
/* #define SUNOS4 */ /* SunOS 4.x */
-/* #define LINUX */ /* Another Unix clone */
+#define LINUX /* Another Unix clone */
/* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */
/* #define GENIX */ /* Yet Another Unix Clone */
/* #define HISX */ /* Bull Unix for XPS Machines */
@@ -207,7 +207,7 @@
/* #define COMPRESS_OPTIONS "-q" */
#endif
-#define FCMASK 0660 /* file creation mask */
+#define FCMASK 0666 /* file creation mask */
/* fcntl(2) is a POSIX-portable call for manipulating file descriptors.
* Comment out the USE_FCNTL if for some reason you have a strange
Only in nethack-3.6.0/include: unixconf.h~
diff -u -r nethack-3.6.0.orig/sys/unix/Makefile.src nethack-3.6.0/sys/unix/Makefile.src
--- nethack-3.6.0.orig/sys/unix/Makefile.src 2016-05-27 17:20:03.082318966 -0400
+++ nethack-3.6.0/sys/unix/Makefile.src 2016-05-27 17:42:47.183397931 -0400
@@ -64,7 +64,7 @@
# if you get setcgtty() warnings during execution, you are feeding gcc
# a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
# -traditional in CFLAGS
-# CC = gcc
+CC = gcc
#
# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
#
@@ -238,7 +238,7 @@
# WINTTYLIB = -ltermcap
# WINTTYLIB = -lcurses
# WINTTYLIB = -lcurses16
-# WINTTYLIB = -lncurses
+WINTTYLIB = -lncurses
#WINTTYLIB = -ltermlib
#
# libraries for X11
diff -u -r nethack-3.6.0.orig/sys/unix/Makefile.utl nethack-3.6.0/sys/unix/Makefile.utl
--- nethack-3.6.0.orig/sys/unix/Makefile.utl 2016-05-27 17:20:03.082318966 -0400
+++ nethack-3.6.0/sys/unix/Makefile.utl 2016-05-27 20:01:54.605040799 -0400
@@ -18,7 +18,7 @@
# if you are using gcc as your compiler,
# uncomment the CC definition below if it's not in your environment
-# CC = gcc
+CC = gcc
#
# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
#
@@ -104,11 +104,11 @@
# yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
# if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
-YACC = yacc
-LEX = lex
-# YACC = bison -y
+# YACC = yacc
+# LEX = lex
+YACC = bison -y
# YACC = byacc
-# LEX = flex
+LEX = flex
# these are the names of the output files from YACC/LEX. Under MS-DOS
# and similar systems, they may differ
Only in nethack-3.6.0/sys/unix: Makefile.utl~
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can we package NetHack?
2016-05-28 20:41 Can we package NetHack? Kei Kebreau
@ 2016-05-29 22:13 ` Ludovic Courtès
2016-05-29 22:54 ` Kei Kebreau
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2016-05-29 22:13 UTC (permalink / raw)
To: Kei Kebreau; +Cc: guix-devel
Kei Kebreau <kei@openmailbox.org> skribis:
> NetHack tries to modify its state files in the store and none of its
> easily patchable directory variables allow anything different. NetHack
> also doesn't allow a ~/.nethack directory to be created in the user's
> directory upon running. Does anyone have any ideas or other packages
> that do this sort of thing?
I suppose the state files are essentially score files? Don’t other
games store things in /var/lib/something? What do other distros do?
:-)
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can we package NetHack?
2016-05-29 22:13 ` Ludovic Courtès
@ 2016-05-29 22:54 ` Kei Kebreau
2016-05-30 0:37 ` Thompson, David
0 siblings, 1 reply; 5+ messages in thread
From: Kei Kebreau @ 2016-05-29 22:54 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]
On Mon, 30 May 2016 00:13:00 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> Kei Kebreau <kei@openmailbox.org> skribis:
>
> > NetHack tries to modify its state files in the store and none of its
> > easily patchable directory variables allow anything different.
> > NetHack also doesn't allow a ~/.nethack directory to be created in
> > the user's directory upon running. Does anyone have any ideas or
> > other packages that do this sort of thing?
>
> I suppose the state files are essentially score files? Don’t other
> games store things in /var/lib/something? What do other distros do?
> :-)
>
> Ludo’.
Yes, the state files are high score lists, locks for the world files
and such. The problem is that other distros give NetHack a directory to
write those files to that would be equivalent to writing to our store.
The only one I have seen that avoids this is NixOS. However, NixOS
creates a ".nethack" directory within the user's folder (among other
things) to work around this.
I thought that this would be a problem for Guix, because installing and
removing NetHack cleanly would necessitate directly writing to and
erasing files within the user's directory. So I decided to mail the
list to see if anyone could find a solution. :-)
--
Kei (GPG Key: 4096R/E6A5EE3C19467A0D)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can we package NetHack?
2016-05-29 22:54 ` Kei Kebreau
@ 2016-05-30 0:37 ` Thompson, David
2016-05-30 8:43 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Thompson, David @ 2016-05-30 0:37 UTC (permalink / raw)
To: Kei Kebreau; +Cc: guix-devel
On Sun, May 29, 2016 at 6:54 PM, Kei Kebreau <kei@openmailbox.org> wrote:
> On Mon, 30 May 2016 00:13:00 +0200
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Kei Kebreau <kei@openmailbox.org> skribis:
>>
>> > NetHack tries to modify its state files in the store and none of its
>> > easily patchable directory variables allow anything different.
>> > NetHack also doesn't allow a ~/.nethack directory to be created in
>> > the user's directory upon running. Does anyone have any ideas or
>> > other packages that do this sort of thing?
>>
>> I suppose the state files are essentially score files? Don’t other
>> games store things in /var/lib/something? What do other distros do?
>> :-)
>>
>> Ludo’.
>
> Yes, the state files are high score lists, locks for the world files
> and such. The problem is that other distros give NetHack a directory to
> write those files to that would be equivalent to writing to our store.
> The only one I have seen that avoids this is NixOS. However, NixOS
> creates a ".nethack" directory within the user's folder (among other
> things) to work around this.
>
> I thought that this would be a problem for Guix, because installing and
> removing NetHack cleanly would necessitate directly writing to and
> erasing files within the user's directory. So I decided to mail the
> list to see if anyone could find a solution. :-)
This isn't a problem. Stateful files in home directories or elsewhere
are not managed by Guix. A .nethack directory sounds like a fine
solution to me.
- Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can we package NetHack?
2016-05-30 0:37 ` Thompson, David
@ 2016-05-30 8:43 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2016-05-30 8:43 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel
"Thompson, David" <dthompson2@worcester.edu> skribis:
> On Sun, May 29, 2016 at 6:54 PM, Kei Kebreau <kei@openmailbox.org> wrote:
>> On Mon, 30 May 2016 00:13:00 +0200
>> ludo@gnu.org (Ludovic Courtès) wrote:
>>
>>> Kei Kebreau <kei@openmailbox.org> skribis:
>>>
>>> > NetHack tries to modify its state files in the store and none of its
>>> > easily patchable directory variables allow anything different.
>>> > NetHack also doesn't allow a ~/.nethack directory to be created in
>>> > the user's directory upon running. Does anyone have any ideas or
>>> > other packages that do this sort of thing?
>>>
>>> I suppose the state files are essentially score files? Don’t other
>>> games store things in /var/lib/something? What do other distros do?
>>> :-)
>>>
>>> Ludo’.
>>
>> Yes, the state files are high score lists, locks for the world files
>> and such. The problem is that other distros give NetHack a directory to
>> write those files to that would be equivalent to writing to our store.
>> The only one I have seen that avoids this is NixOS. However, NixOS
>> creates a ".nethack" directory within the user's folder (among other
>> things) to work around this.
>>
>> I thought that this would be a problem for Guix, because installing and
>> removing NetHack cleanly would necessitate directly writing to and
>> erasing files within the user's directory. So I decided to mail the
>> list to see if anyone could find a solution. :-)
>
> This isn't a problem. Stateful files in home directories or elsewhere
> are not managed by Guix. A .nethack directory sounds like a fine
> solution to me.
Yes, I agree.
Note that this problem is not limited to Nixpkgs and Guix. So perhaps
there’s also inspiration to be taken from Debian et al.
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-30 8:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-28 20:41 Can we package NetHack? Kei Kebreau
2016-05-29 22:13 ` Ludovic Courtès
2016-05-29 22:54 ` Kei Kebreau
2016-05-30 0:37 ` Thompson, David
2016-05-30 8:43 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.