GNU bug report logs - #40818
[PATCH] gnu: Add bsd-games.

Previous Next

Package: guix-patches;

Reported by: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>

Date: Fri, 24 Apr 2020 14:05:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40818 in the body.
You can then email your comments to 40818 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Fri, 24 Apr 2020 14:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 24 Apr 2020 14:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: Add bsd-games.
Date: Fri, 24 Apr 2020 13:54:42 +0000
[Message part 1 (text/plain, inline)]
Hi.
The most important thing to review is rights.  This package assumes that all score-files and save-games are placed in /var/tmp/bsd-games.   The first user owns the files, and the wrapper script do `chmod ug+w`.  If the SETGUID approach, despite the games age is better, i'll rework this.  Though sys-admin (or the first user) can simply change the permissions, or group to restrict the access.

Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]
[0001-gnu-Add-bsd-games.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Tue, 16 Jun 2020 13:18:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Vitaliy Shatrov via Guix-patches via <guix-patches <at> gnu.org>
Cc: 40818 <at> debbugs.gnu.org, Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
Subject: Re: [bug#40818] [PATCH] gnu: Add bsd-games.
Date: Tue, 16 Jun 2020 15:17:00 +0200
Hello,

Vitaliy Shatrov via Guix-patches via <guix-patches <at> gnu.org> writes:

> The most important thing to review is rights. This package assumes
> that all score-files and save-games are placed in /var/tmp/bsd-games.
> The first user owns the files, and the wrapper script do `chmod ug+w`.
> If the SETGUID approach, despite the games age is better, i'll rework
> this. Though sys-admin (or the first user) can simply change the
> permissions, or group to restrict the access.

Thank you for the patch.

Is it possible to create save-games in ~/.local/share/XXX/ instead?

Also, considering the bsd-games-add-word-list.patch file, would it be
possible to use "miscfiles" package as an input instead? It also
provides and English words list.

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Tue, 16 Jun 2020 13:18:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Wed, 17 Jun 2020 07:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Subject: Re: [bug #40818] "Add bsd-games"
Date: Wed, 17 Jun 2020 07:46:20 +0000
[Message part 1 (text/plain, inline)]
I'll try ~/. Thanks for the misc pointer.

Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Wed, 17 Jun 2020 16:43:01 GMT) Full text and rfc822 format available.

Message #17 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Subject: Re: [bug #40818] "Add bsd-games"
Date: Wed, 17 Jun 2020 16:42:39 +0000
[Message part 1 (text/plain, inline)]
About ~/.local/share/xxx: Will things like this "bsd-hack"-patch be accepted?

Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]
[bsd-games-test.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Wed, 17 Jun 2020 16:50:02 GMT) Full text and rfc822 format available.

Message #20 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Cc: "mail <at> nicolasgoaziou.fr" <mail <at> nicolasgoaziou.fr>
Subject: Re: [bug #40818] "Add bsd-games"
Date: Wed, 17 Jun 2020 16:49:08 +0000
[Message part 1 (text/plain, inline)]
Probably now i've sent the mail correct way.

Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Tue, 07 Jul 2020 12:30:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Vitaliy Shatrov via Guix-patches via <guix-patches <at> gnu.org>
Cc: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>,
 Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
Subject: Re: [bug#40818] [bug #40818] "Add bsd-games"
Date: Tue, 07 Jul 2020 14:29:48 +0200
Hello,

Vitaliy Shatrov via Guix-patches via <guix-patches <at> gnu.org> writes:

> About ~/.local/share/xxx: Will things like this "bsd-hack"-patch be
> accepted?

Since no one complained, I guess the answer is "yes" :)

Could you send a complete patch? (Or maybe I missed it, this was a long
time ago!)

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Tue, 07 Jul 2020 12:30:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Sat, 01 Aug 2020 18:46:02 GMT) Full text and rfc822 format available.

Message #29 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Subject: Re: [bug#40818] [bug #40818] "Add bsd-games"
Date: Sat, 01 Aug 2020 18:45:28 +0000
[Message part 1 (text/plain, inline)]
Hello.

> Could you send a complete patch? (Or maybe I missed it, this was a long
> time ago!)

Honestly there are none yet, but i'm working on that. I'm bad at programming for now. The last idea was to use a chdir() instead, and change the original variables from "path/to/x" to just "x".

Regards, Vitaliy.
Sent with ProtonMail Secure Email.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Tue, 04 Aug 2020 20:58:02 GMT) Full text and rfc822 format available.

Message #32 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Subject: RE: [bug #40818] "Add bsd-games"
Date: Tue, 04 Aug 2020 20:57:06 +0000
[Message part 1 (text/plain, inline)]
Hello again.

I'd received an advice to send a patch in the best working state i have already,
and then add the games that aren't working.

The all games should work, but hack and phantasia. Some games currently can't write
a score files, but this isn't criticall.

I'll continue to thinking about, and search for advices on how to do things in the User's HOME,
or something similar: be that "getpwid()" stuff i'd seen on stackoverflow, or just a
"chdir(getenv("SOME_ENV_VAR"));".

Regards, Vitaliy.

Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Tue, 04 Aug 2020 21:01:01 GMT) Full text and rfc822 format available.

Message #35 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Subject: RE: [bug #40818] "Add bsd-games"
Date: Tue, 04 Aug 2020 20:59:59 +0000
[Message part 1 (text/plain, inline)]
The actual patch attached...
(Ooops..)
Regards-regards, Vitaliy.

Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]
[0001-PATCH-gnu-Add-bsd-games.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Wed, 05 Aug 2020 14:36:02 GMT) Full text and rfc822 format available.

Message #38 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Subject: RE: [bug #40818] "Add bsd-games"
Date: Wed, 05 Aug 2020 14:35:08 +0000
[Message part 1 (text/plain, inline)]
Actually sail need the writable directory too.
Do not compile it untill some solution found.

Regards, Vitaliy.

Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]
[0001-PATCH-gnu-Add-bsd-games.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Thu, 06 Aug 2020 04:13:01 GMT) Full text and rfc822 format available.

Message #41 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Subject: RE: [bug #40818] "Add bsd-games"
Date: Thu, 06 Aug 2020 04:12:26 +0000
[Message part 1 (text/plain, inline)]
I'm sorry, i'm forget to run both the `guix lint` and the code indentation checker.
I'll fix it.

Regards, Vitaliy. Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Thu, 06 Aug 2020 16:06:01 GMT) Full text and rfc822 format available.

Message #44 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Cc: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Subject: RE: [bug #40818] "Add bsd-games"
Date: Thu, 06 Aug 2020 16:04:53 +0000
[Message part 1 (text/plain, inline)]
That is a "final" version. All games are works, the wrapper script works, and no unnecessary changes
were introduced to the games' code in the end. They're configured to search in the current dir, and the
wrapper (a bash script) cares about the files that should be copied from the Store, and cd's to the
BSD_GAMES_DIR (and ask the User to set this variable if it's unset). It's also can use HACKDIR if the game
started is "hack".

Regards, Vitaliy. Sent with [ProtonMail](https://protonmail.com) Secure Email.
[Message part 2 (text/html, inline)]
[0002-gnu-Add-bsd-games.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Thu, 13 Aug 2020 08:31:02 GMT) Full text and rfc822 format available.

Message #47 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
Cc: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Subject: Re: [bug #40818] "Add bsd-games"
Date: Thu, 13 Aug 2020 10:30:00 +0200
Hello,

Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com> writes:

> That is a "final" version. All games are works, the wrapper script works, and no unnecessary changes
> were introduced to the games' code in the end. They're configured to search in the current dir, and the
> wrapper (a bash script) cares about the files that should be copied from the Store, and cd's to the
> BSD_GAMES_DIR (and ask the User to set this variable if it's unset). It's also can use HACKDIR if the game
> started is "hack".

Thank you.

> Regards, Vitaliy. Sent with [ProtonMail](https://protonmail.com) Secure Email.
> From a6af7beba9d9feb5fdebf9f429c53cdad91b48bd Mon Sep 17 00:00:00 2001
> From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
> Date: Thu, 6 Aug 2020 22:15:22 +0700
> Subject: [PATCH] gnu: Add bsd-games.
>
> * gnu/packages/games.scm a new variable.

This should be gnu/packages/games.scm (bsd-games): New variable.

> New patches, taken from Arch and Debian:
> * gnu/packages/patches/bsd-games-2.17-64bit.patch
> * gnu/packages/patches/bsd-games-bad-ntohl-cast.patch
> * gnu/packages/patches/bsd-games-gamescreen.h.patch
> * gnu/packages/patches/bsd-games-getline.patch
> * gnu/packages/patches/bsd-games-null-check.patch
> * gnu/packages/patches/bsd-games-number.c-and-test.patch
> * gnu/packages/patches/bsd-games-prevent-name-collisions.patch
> * gnu/packages/patches/bsd-games-stdio.h.patch
>
> New patches with our customizations (configure-config built after Arch's):
> * gnu/packages/patches/bsd-games-add-configure-config.patch
> * gnu/packages/patches/bsd-games-add-wrapper.patch
> * gnu/packages/patches/bsd-games-dont-install-empty-files.patch

You need to reference all those patches in "gnu/local.mk" file. Could
you send an updated patch?

Note that I did that, but some games still fail to run, e.g., phantasia
and hack.

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#40818; Package guix-patches. (Tue, 25 Aug 2020 11:56:02 GMT) Full text and rfc822 format available.

Message #50 received at 40818 <at> debbugs.gnu.org (full text, mbox):

From: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: "40818 <at> debbugs.gnu.org" <40818 <at> debbugs.gnu.org>
Subject: Re: [bug #40818] "Add bsd-games"
Date: Tue, 25 Aug 2020 11:55:29 +0000
[Message part 1 (text/plain, inline)]
Hello Nicolas.

> This should be gnu/packages/games.scm (bsd-games): New variable.

> reference all those patches in "gnu/local.mk" file.

Done

> some games still fail to run, e.g., phantasia and hack.

Pity.  What errors are output?

How i do start the games:

cd git/guix
guix environment --pure guix
./bootstrap && ./configure --localstatedir=/var && make -j2
./pre-inst-env guix environment --ad-hoc bsd-games
phantasia
--->
   Guix: Please set up the BSD_GAMES_DIR variable.
   Examples:
      export BSD_GAMES_DIR=/var/multiplayer
      export BSD_GAMES_DIR=~/.local/share/bsd-games
   You can place this in ~/.bashrc or a similar file for Your shell.
   For multiplayer this directory should be writable for all players.

BSD_GAMES_DIR=~/bsd-dir phantasia
--->
   "You've been caught raping and pillaging"
   "You are attacked by Kobold"
   ...
---

Regards, Vitaliy.
Sent with ProtonMail Secure Email.
[0001-gnu-Add-bsd-games.patch (text/x-patch, attachment)]

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Wed, 04 Nov 2020 14:20:03 GMT) Full text and rfc822 format available.

Notification sent to Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>:
bug acknowledged by developer. (Wed, 04 Nov 2020 14:20:03 GMT) Full text and rfc822 format available.

Message #55 received at 40818-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Vitaliy Shatrov <D0dyBo0D0dyBo0 <at> protonmail.com>
Cc: 40818-done <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add bsd-games.
Date: Wed, 04 Nov 2020 15:18:50 +0100
Hello,

This was long overdue, but I eventually applied this patch. Thank you!

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 03 Dec 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.