Eric Faurot writes: > On Tue, 10 Jun 2008 17:02:01 +0200 > [EMAIL PROTECTED] (Andreas Vögele) wrote: > >> Brad Walker writes: >> >> > Adding --localstatedir=/var places the game score files >> > under /var/games/emacs, but then update-plist strips them. >> >> I think that you ought to use @sample in the PLIST file to create the >> directory and the files in /var/games. For example: > > [snip] > > Right, but unfortunately this is apparently not working either. Emacs does > not seem to save scores in these files anyway, for some reason that I am > not interrested in investigating further.
Argh, I forgot about other changes I made to my copy of the Emacs CVS repository. Emacs checks whether the s-uid bit of the update-game-score is set and saves the score in ~/.emacs.d/games/ if it isn't. Changing this locally is easy but fixing it in a way that upstream will accept isn't. > The emacs source package is so completely and desperatingly ugly. We > really don't need this anyway: [...] Yes, let's forget about the system-wide high score files. > Another point: I don't see a compelling reason for adding an -athena > flavor instead of keeping it the default, as it is now. I find it just > confusing. [...] Here is a new version with a -gtk flavor. GTK will be the default toolkit in Emacs 23. I don't know if the Emacs developers plan to drop support for the Athena widget set in a future Emacs version, but what about making GTK the default now and adding a -athena flavor that might be dropped later? Or will the ports for the different Emacs versions, i.e. emacs21, emacs22 etc., be kept separate anyway? Personally, I'm happy with the Athena widget set since I use Emacs with menu, tool and scroll bars disabled. But I wouldn't mind using a port built against GTK. > I also left the parts for having score files in /var/games/emacs in > case someone wants to figure out why it is not working. Here are the patches that I use locally. But I wouldn't include them in the port. Let Emacs save the game scores to ~/.emacs.d/games/ instead.
$OpenBSD$ --- lisp/play/gamegrid.el.orig Tue May 6 09:24:05 2008 +++ lisp/play/gamegrid.el Fri Jun 13 08:20:27 2008 @@ -489,7 +489,7 @@ FILE is created there." (not (zerop (logand (file-modes (expand-file-name "update-game-score" exec-directory)) - #o4000))))) + #o6000))))) (cond ((file-name-absolute-p file) (gamegrid-add-score-insecure file score)) ((and gamegrid-shared-game-dir
$OpenBSD$ --- lib-src/update-game-score.c.orig Sat May 10 01:19:13 2008 +++ lib-src/update-game-score.c Fri Jun 13 10:03:52 2008 @@ -222,7 +222,7 @@ main (argc, argv) if (optind+3 != argc) usage (EXIT_FAILURE); - running_suid = (getuid () != geteuid ()); + running_suid = (getuid () != geteuid ()) || (getgid () != getegid ()); prefix = get_prefix (running_suid, user_prefix); @@ -471,7 +471,7 @@ write_scores (filename, scores, count) fclose (f); if (rename (tempfile, filename) < 0) return -1; - if (chmod (filename, 0644) < 0) + if (chmod (filename, 0664) < 0) return -1; return 0; }