Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116281 - improved kdegames-3.5.0
Summary: improved kdegames-3.5.0
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-21 07:12 UTC by Heinrich Wendel (RETIRED)
Modified: 2009-08-11 17:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kdegames-3.5.0.patch (kdegames-3.5.0.patch,591 bytes, patch)
2005-12-21 07:12 UTC, Heinrich Wendel (RETIRED)
Details | Diff
kdegames-highscore.patch (kdegames-highscore.patch,4.27 KB, patch)
2006-02-20 01:36 UTC, Heinrich Wendel (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Heinrich Wendel (RETIRED) gentoo-dev 2005-12-21 07:12:08 UTC
Since 3.5.0 kdegames also supports systemwide highscores. (Infact it was already supported before, but broken, then I fixed it for 3.5)
I'll attach a patch to make use of it in the kdegames.ebuild. A similar patch has to be applied to the split games ebuilds then.
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2005-12-21 07:12:25 UTC
Created attachment 75277 [details, diff]
kdegames-3.5.0.patch
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2005-12-27 09:01:45 UTC
Haven't touched any KDE Game(s ebuild) in a while, so..

- What's up with --with-highscore-group and --with-highscore-user? root if not set I suppose!? 

- Why deleting the score when upgrading? If I were a gamer, I'd be pissed if my great no. 1 highscore would be deleted.
Comment 3 John Smith, Bait Shop Owner 2005-12-27 17:51:21 UTC
Did anyone actually try this?

Patch in comment #1 wouldn't work: kdegames-3.5.0 by default installs 
highscore files for these games only: (these 5 are working)

- kbounce
- kfouleggs
- klickety
- kmines
- ksirtet

The following games abort with an error message about a missing highscore file:

- kreversi
- knetwalk

(manually creating these files with correct modes would fix the problem, but 
see below)

The following games abort with the following message if suid/sgid:
  "The KDE libraries are not designed to run with suid privileges."

- knetwalk

Addtionally, it's useless to delete old highscores in pkg_preinst because any 
new kde version would already overwrite old scores with blank ones.

Sounds like a very, very, very bad idea to me, in addition to comment #2 and #3!

Merry Xmas!
Comment 4 Heinrich Wendel (RETIRED) gentoo-dev 2006-02-20 01:14:47 UTC
sorry for the delay...

a.) Yes I tested the patch, i wrote it, even commited the necessary changes to kde svn and it works here in an "production environment"

b.) "--with-highscore-group and --with-highscore-user"
    don't know about them, didn't need them

c.) it doesn't delete the highscore's on the system but the new and empty to be installed highscore files, so it preserves the highscores to be overwritten

d.) strange things about kreversi and knetwalk, have to look into it
Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2006-02-20 01:35:35 UTC
b.) --with-highscore-group should be games and --with-highscore-user should be games as well
Comment 6 Heinrich Wendel (RETIRED) gentoo-dev 2006-02-20 01:36:17 UTC
Created attachment 80254 [details, diff]
kdegames-highscore.patch

patch for kreversi and knetwalk
Comment 7 Heinrich Wendel (RETIRED) gentoo-dev 2006-04-12 14:28:31 UTC
patch will be in kde 3.5.3
Comment 8 Carsten Lohrke (RETIRED) gentoo-dev 2006-04-14 08:35:46 UTC
(In reply to comment #4)
> c.) it doesn't delete the highscore's on the system but the new and empty to be
> installed highscore files, so it preserves the highscores to be overwritten

Please excuse my blindness...



It didn't work for me (out of the box):

FATAL: cannot open global highscore file "//var/lib/games/kreversi.scores"
Aborted


There're a couple of points to note:

- the scores files do not get created automatically
- most games don't use systemwide scores at all (only seven do)
- it'd be necessary to install the games --enable-setgid, lowering security a bit
- using the games group does not work, since users in the games group could modify the scores files otherwise (cheat, inject malicious data to be executed by other users in the games group, if possible) - odd, seeing this with other games. -> bug 129954
- looking at the other games, the directory should be ${ROOT}/var/games
Comment 9 Carsten Lohrke (RETIRED) gentoo-dev 2006-04-14 09:39:38 UTC
I have the eclass changes for the split ebuilds ready, but want to wait until the games herd has sorted out the permission issues.
Comment 10 Heinrich Wendel (RETIRED) gentoo-dev 2006-04-14 09:44:11 UTC
> It didn't work for me (out of the box):
> FATAL: cannot open global highscore file "//var/lib/games/kreversi.scores"
> Aborted
> - the scores files do not get created automatically
They should, did you apply the patch?

> - most games don't use systemwide scores at all (only seven do)
Still an advantage for those 7 and no disadvantage for the rest

> - it'd be necessary to install the games --enable-setgid, lowering security a
> bit
> - using the games group does not work, since users in the games group could
> modify the scores files otherwise (cheat, inject malicious data to be > executed
> by other users in the games group, if possible) - odd, seeing this with other
> games. -> bug 129954
Either you setgid them, which should be no problem since the root privilegs are dropped very fast, or you use the games group which is the default for gnome games as well.

> - looking at the other games, the directory should be ${ROOT}/var/games
Looking at the other games it should be ${ROOT}/var/lib/games
Comment 11 Carsten Lohrke (RETIRED) gentoo-dev 2006-04-14 10:02:45 UTC
(In reply to comment #10)
> Either you setgid them, which should be no problem since the root privilegs are
> dropped very fast, or you use the games group which is the default for gnome
> games as well.

Setgid to a non root group, yes. Just that it's not possible to use the games  group, since all users are in the games group. And really don't want to add yet another group and have to change it again and correct user installations accordingly, once the games herd has decided which way to go.
 
> > - looking at the other games, the directory should be ${ROOT}/var/games
> Looking at the other games it should be ${ROOT}/var/lib/games

Um, I just have installed trackballs and falconseye to test if the user write access to global scores is a general problem and both put their scores files in /var/games. No matter what - it should be a single directory, shouldn't it!?
Comment 12 Heinrich Wendel (RETIRED) gentoo-dev 2006-04-14 10:06:59 UTC
I have those gnome games installed and they are in /var/lib/games, but in the end we should decide on one directory.

Installing as root gid should be no problem since the code directly drops the root privilegs after reading/writing the highscore file
Comment 13 Tomáš Chvátal (RETIRED) gentoo-dev 2009-08-11 17:03:53 UTC
bugzie
Comment 14 Tomáš Chvátal (RETIRED) gentoo-dev 2009-08-11 17:04:42 UTC
4.X can use ggz. which is quite great for scores.

For 3.X we set most feature requests wontfix. And it looks like split ebuilds have it correctly.

Cheers.