From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 30 18:22:42 2019 Received: (at submit) by debbugs.gnu.org; 30 Mar 2019 22:22:42 +0000 Received: from localhost ([127.0.0.1]:37649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAMN4-0005Qd-R4 for submit@debbugs.gnu.org; Sat, 30 Mar 2019 18:22:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAMN2-0005QP-5l for submit@debbugs.gnu.org; Sat, 30 Mar 2019 18:22:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:56829) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hAMMw-000089-VW for submit@debbugs.gnu.org; Sat, 30 Mar 2019 18:22:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAMMv-0003hi-2D for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2019 18:22:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAMMt-00007S-63 for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2019 18:22:29 -0400 Received: from mail-it1-x129.google.com ([2607:f8b0:4864:20::129]:55295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAMMs-00005e-HO for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2019 18:22:27 -0400 Received: by mail-it1-x129.google.com with SMTP id w18so9233300itj.4 for ; Sat, 30 Mar 2019 15:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unitn.it; s=google; h=mime-version:from:date:message-id:subject:to; bh=OeWJJkdC5NDAKto8U6oqHdvFTpSZ5/4JNULuZdYsn14=; b=WvmjFohq01pZSZTCe9cuvVUf7SHkT4k+CHZnWduCHBebRomAB+H3qp5bzVuow90syh Nrh2s3aO2wtqF8rarRHnDXltCjz0b0vFqsJpbGm1zDe8GB46eQDGx+IoCwJHpJQotntF atl4KE0D83MbiWECRkcMkkmg119n0J48tqb9A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OeWJJkdC5NDAKto8U6oqHdvFTpSZ5/4JNULuZdYsn14=; b=htL51V1yFE/CodwP8zf2SfKlv6sZd9jppsCa3h8S3XLp9YeitiJgEQtn7HMnTXIwL5 w7NdPzecM8TwRHhy5s0ivEKkHJVduSCHLvaAXadB0PkRmVMHlu5D8sdX89G4PMRyMKOk Eriv07OWKdVHenwwnH2aOAY5pcR/hs29FkLhz/z1I7+0NAwAFiYuTHs8d+ISPQpvGoZi ftvwxa9CjeD69qhrP+KL6H7D7cMOrurZObaWudhziPqUA0VKUXwOWe1eKVEDnU7kaoFO euzU/PTQ9zOUix/OhEX0QkE+bagawNzGb0yA5o7Y6yiqrreTmlRYcJySsaT4pR/DV8FW QgoA== X-Gm-Message-State: APjAAAX1mXqx7XIhfWzpq5hQ+rlxmzx+23dCFfXlGV7mlfCiiDZv6g9q rZG3nmjd0tsf/429rBSK54Qy4xiUa2EwaAN1Qd2beIFU4y/v X-Google-Smtp-Source: APXvYqwFGBVidb21tWNvdGF/kQrrXq/exxY0Pg2KEO/9q9WDDzTWQPrwPeI4xNI2K0BgsybIGwvBbJ8Fg6S+DctAVVc= X-Received: by 2002:a24:351:: with SMTP id e78mr10121480ite.160.1553984544279; Sat, 30 Mar 2019 15:22:24 -0700 (PDT) MIME-Version: 1.0 From: Tadeus Prastowo Date: Sat, 30 Mar 2019 23:22:11 +0100 Message-ID: Subject: 26.1; Tetris score is no longer updated To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::129 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ubuntu 16.04 comes with Emacs 24, and I have played several Tetris games using it, the high scores of which are recorded in my home directory. Today, I built Emacs 26.1 and played a Tetris game using it. The resulting score, however, was not recorded although it should have been. I traced the problem to the following commit that changes the expected format of the high-score file in my home directory: -- 8< ------------------------------------------------------------------ commit 995be66f0f0d26d1a96cbb8dfb429c3941157771 Author: Paul Eggert Date: Sun Mar 12 12:04:10 2017 -0700 Install update-game-score only on request Most distributions do not install update-game-score properly due to setuid/setgid complications, so install it only when the installer specifies a user or group (Bug#25895). * .gitattributes: Remove lib-src/update-game-score.exe.manifest. * Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME): New vars. (epaths-force): Use PATH_GAME. (uninstall): Remove snake-scores and tetris-scores only if shared. * configure.ac: Default --with-gameuser to 'no'. (UPDATE_MANIFEST): Remove. * etc/NEWS: Mention this. * lib-src/Makefile.in (UPDATE_MANIFEST): Remove. (use_gamedir): New macro. (UTILITIES): Remove update-game-score unless use_gamedir. (SCRIPTS): Remove $(UPDATE_MANIFEST). ($(DESTDIR)${archlibdir}): Install game directory program and data only if use_gamedir. * lib-src/update-game-score.exe.manifest: Remove, as update-game-score is no longer installed on MS-Windows. * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score): Use auxiliary program only if setuid or setgid. * make-dist: Do not distribute update-game-score.exe.manifest. * src/callproc.c (init_callproc): Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT. (syms_of_callproc): Remove unnecessary initialization of Vshared_game_score_directory. -- 8< ------------------------------------------------------------------ The offending diff in the commit is shown below: -- 8< ------------------------------------------------------------------ diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index b0ccbd3..0386a89 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -497,23 +499,12 @@ FILE is created there." (expand-file-name file shared-game-score-directory) score)) ;; Else: Add the score to a score file in the user's home ;; directory. - (gamegrid-shared-game-dir - ;; If `gamegrid-shared-game-dir' is non-nil, then - ;; "update-gamescore" program is setuid, so don't use it. - (unless (file-exists-p - (directory-file-name gamegrid-user-score-file-directory)) - (make-directory gamegrid-user-score-file-directory t)) - (gamegrid-add-score-insecure file score - gamegrid-user-score-file-directory)) (t (unless (file-exists-p (directory-file-name gamegrid-user-score-file-directory)) (make-directory gamegrid-user-score-file-directory t)) - (let ((f (expand-file-name file - gamegrid-user-score-file-directory))) - (unless (file-exists-p f) - (write-region "" nil f nil 'silent nil 'excl)) - (gamegrid-add-score-with-update-game-score-1 file f score)))))) + (gamegrid-add-score-insecure file score + gamegrid-user-score-file-directory))))) (defun gamegrid-add-score-with-update-game-score-1 (file target score) (let ((default-directory "/") -- 8< ------------------------------------------------------------------ >From the diff, it is clear that previously the high-score file was updated using `gamegrid-add-score-with-update-game-score-1', which writes a high-score line in the following format: (concat (int-to-string score) " " (user-login-name) " " (concat (user-full-name) " <" (cond ((fboundp 'user-mail-address) (user-mail-address)) ((boundp 'user-mail-address) user-mail-address) (t "")) "> " (current-time-string))) After the commit, the high-score file is updated using `gamegrid-add-score-insecure', which writes a high-score line in the following format: (format "%05d\t%s\t%s <%s>\n" score (current-time-string) (user-full-name) (cond ((fboundp 'user-mail-address) (user-mail-address)) ((boundp 'user-mail-address) user-mail-address) (t ""))) In my high-score file for Tetris, the lowest score (obfuscated for privacy) is as follows: 1817 XXX XXX XXX XXX XXX XX XX:XX:XX XXXX So, when today I played Tetris using Emacs 26.1 and scored higher than 1817 (e.g., 2555), `gamegrid-add-score-insecure' first writes the following line: 1817 XXX XXX XXX XXX XXX XX XX:XX:XX XXXX 02555 XXX XXX XX XX:XX:XX XXXX XXX XXX Then, it sorts the lines using `sort-fields' on field 1. Since `sort-fiels' performs a lexicographical sort, the higher score 02555 ends up being the lowest score due to the leading 0. As a result, the new score is not recorded, leading to this reported bug. Since this is a user-visible change, the NEWS file that accompanies Emacs 26.1 (http://www.gnu.org/software/emacs/news/NEWS.26.1) ought to mention this problem. Unfortunately, the offending commit does not do so as shown below: -- 8< ------------------------------------------------------------------ diff --git a/etc/NEWS b/etc/NEWS index f0df0a7..cd829bf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -65,6 +65,11 @@ emacs-version and erc-cmd-SV functions, and the leave the following variables nil: emacs-build-system, emacs-build-time, erc-emacs-build-time. +** The configure option '--with-gameuser' now defaults to 'no', +as this appears to be the most common configuration in practice. +When it is 'no', the shared game directory and the auxiliary program +update-game-score are no longer needed and are not installed. + ** Emacs no longer works on IRIX. We expect that Emacs users are not affected by this, as SGI stopped supporting IRIX in December 2013. -- 8< ------------------------------------------------------------------ Since this seems to break for many users, in addition to fixing the NEWS file, I suggest that `gamegrid-add-score-insecure' be fixed to work with the high-score line format of `gamegrid-add-score-with-update-game-score-1'. Otherwise, an error message should be raised to let users quickly fix their high-score files themselves. In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2019-03-30 built on 0x657573 Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 16.04.6 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=/mnt/core/Codebases/installzone/emacs --with-xwidgets --disable-silent-rules' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS XWIDGETS LIBSYSTEMD LCMS2 Important settings: value of $LC_MONETARY: en_US.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 94622 8544) (symbols 48 20366 2) (miscs 40 38 118) (strings 32 28354 1003) (string-bytes 1 751654) (vectors 16 13968) (vector-slots 8 492158 10422) (floats 8 49 68) (intervals 56 220 0) (buffers 992 11) (heap 1024 34351 1010)) -- Best regards, Tadeus From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 30 23:33:03 2019 Received: (at 35056) by debbugs.gnu.org; 31 Mar 2019 03:33:03 +0000 Received: from localhost ([127.0.0.1]:37713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hARDS-0004Eb-OR for submit@debbugs.gnu.org; Sat, 30 Mar 2019 23:33:03 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hARDP-0004E6-Dz for 35056@debbugs.gnu.org; Sat, 30 Mar 2019 23:33:00 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id AD9F21612CF; Sat, 30 Mar 2019 20:32:53 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 9R9vEwQGdjbT; Sat, 30 Mar 2019 20:32:52 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6BF461612D2; Sat, 30 Mar 2019 20:32:52 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M08P27zMaHCI; Sat, 30 Mar 2019 20:32:52 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 34267160F1C; Sat, 30 Mar 2019 20:32:52 -0700 (PDT) Subject: Re: 26.1; Tetris score is no longer updated due to commit 995be66f0f0d26d1a96cbb8dfb429c3941157771 To: Tadeus Prastowo References: From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <78ea6992-85b1-e005-2c33-7b1df1c04031@cs.ucla.edu> Date: Sat, 30 Mar 2019 20:32:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------990CB3CE98F18489FC3A33CE" Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35056 Cc: Glenn Morris , 35056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------990CB3CE98F18489FC3A33CE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Apparently the problem is that there are two formats of Tetris game-score files. One format is used by play/gamegrid.el itself, the other is used by the update-game-score command. I didn't know that; I thought that the only reason to use update-game-score was to get setuid/setgid permissions, and that the file format didn't change. To some extent the file-format problem is Just One Of Those Things: if up upgrade Emacs and it changes the file format, Emacs is not smart enough to deal with the format change and so it loses your old Tetris scores. That being said, Emacs could try harder to use the update-game-score program if it's installed. Is it in your installation? If so, please try the attached patch. If not, please try redoing 'configure' so that update-game-score is built and installed, and then try the attached patch. I suppose it would be possible to do more-serious hacking in gamegrid.el to deal with the incompatible file formats (convert formats back and forth, say), but that would be beyond my call of duty. --------------990CB3CE98F18489FC3A33CE Content-Type: text/x-patch; name="0001-Use-update-game-score-more-often-with-Tetris.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Use-update-game-score-more-often-with-Tetris.patch" >From 9f14fc6f61c8c6609a24efa1024ef8a68d16a92f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 30 Mar 2019 20:26:15 -0700 Subject: [PATCH] Use update-game-score more often with Tetris * lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score): Go back to previous way of deciding whether to invoke update-game-score, except do not try to invoke it if file-modes fails on it (Bug#35056). --- lisp/play/gamegrid.el | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index 430a2071bf..4a9dac7f74 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -565,8 +565,8 @@ gamegrid-add-score ;; On POSIX systems there are four cases to distinguish: -;; 1. FILE is an absolute filename. Then it should be a file in -;; temporary file directory. This is the way, +;; 1. FILE is an absolute filename or "update-game-score" does not exist. +;; Then FILE should be a file in a temporary file directory. This is how ;; `gamegrid-add-score' was supposed to be used in the past and ;; is covered here for backward-compatibility. ;; @@ -583,21 +583,18 @@ gamegrid-add-score ;; update FILE. This is for the case that a user has installed ;; a game on her own. ;; -;; 4. "update-game-score" does not exist or is not setgid/setuid. -;; Create/update FILE in the user's home directory, without -;; using "update-game-score". There is presumably no shared -;; game directory. +;; 4. "update-game-score" is not setgid/setuid. Use it to +;; create/update FILE in the user's home directory. There is +;; presumably no shared game directory. (defvar gamegrid-shared-game-dir) (defun gamegrid-add-score-with-update-game-score (file score) - (let ((gamegrid-shared-game-dir - (not (zerop (logand (or (file-modes - (expand-file-name "update-game-score" - exec-directory)) - 0) - #o6000))))) - (cond ((file-name-absolute-p file) + (let* ((update-game-score-modes + (file-modes (expand-file-name "update-game-score" exec-directory))) + (gamegrid-shared-game-dir + (not (zerop (logand #o6000 (or update-game-score-modes 0)))))) + (cond ((or (not update-game-score-modes) (file-name-absolute-p file)) (gamegrid-add-score-insecure file score)) ((and gamegrid-shared-game-dir (file-exists-p (expand-file-name file shared-game-score-directory))) @@ -607,12 +604,23 @@ gamegrid-add-score-with-update-game-score (expand-file-name file shared-game-score-directory) score)) ;; Else: Add the score to a score file in the user's home ;; directory. - (t + (gamegrid-shared-game-dir + ;; If gamegrid-shared-game-dir is non-nil the + ;; "update-gamescore" program is setuid, so don't use it. (unless (file-exists-p (directory-file-name gamegrid-user-score-file-directory)) (make-directory gamegrid-user-score-file-directory t)) (gamegrid-add-score-insecure file score - gamegrid-user-score-file-directory))))) + gamegrid-user-score-file-directory)) + (t + (unless (file-exists-p + (directory-file-name gamegrid-user-score-file-directory)) + (make-directory gamegrid-user-score-file-directory t)) + (let ((f (expand-file-name file + gamegrid-user-score-file-directory))) + (unless (file-exists-p f) + (write-region "" nil f nil 'silent nil 'excl)) + (gamegrid-add-score-with-update-game-score-1 file f score)))))) (defun gamegrid-add-score-with-update-game-score-1 (file target score) (let ((default-directory "/") -- 2.17.1 --------------990CB3CE98F18489FC3A33CE-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 15:41:39 2019 Received: (at 35056) by debbugs.gnu.org; 31 Mar 2019 19:41:39 +0000 Received: from localhost ([127.0.0.1]:38491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAgKp-0002Y4-GC for submit@debbugs.gnu.org; Sun, 31 Mar 2019 15:41:39 -0400 Received: from mail-it1-f177.google.com ([209.85.166.177]:52908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAgKm-0002Xq-RI for 35056@debbugs.gnu.org; Sun, 31 Mar 2019 15:41:38 -0400 Received: by mail-it1-f177.google.com with SMTP id g17so11443389ita.2 for <35056@debbugs.gnu.org>; Sun, 31 Mar 2019 12:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unitn.it; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0HfvP46mgJL+KtHTEs/SABpRoOccN9aiRWNbFSUWlbU=; b=STplVCm57pxOMkakru5fM6RXUGfrjKKv21TOZ3QQU0HlqSZVmshFDxKgG4LTG/o5b4 eqZG0spFGPqMhrZVkTbLUOyqG93NcCQLlrrF1dr/IkRWvma1WAzUXl1wS4SR+ZehBURp rFS6ONt1DOfiTc4Ojpb5p0VJAoLb8RQN8FmqY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0HfvP46mgJL+KtHTEs/SABpRoOccN9aiRWNbFSUWlbU=; b=aH9/Vjk25Axlrx3nrP2B+jJRqdzmST72eNrGFCJSRMI/DKU0cRBkAh2aA88yglVYjb Zg3mNBycRq2dEMHMBicTknYO8rlwN7cCzTMHfcRrD1LY1VsGs80MzRlM9Ke0w+kEyLgY G7dt9q6ASd78yiwOAJKPkjW3rqJy08J6KlorazHjpis/noWA8hoZn8MMbE25D3Rm1kor c3MyVRK0aKmjccgEWAXmwyf65bg2b1jfGPMBpkhO1WEcMC/+gkyaYL8hC4exiQ2AHmz2 i/vmJ9CEZSp6eyDE4eMuH/K+4PTHHNKnwz8xkahwLDprq+4jRkfve9SgQPj3qbusrSMu vfGw== X-Gm-Message-State: APjAAAUofe4V/lNVpTUyNN4itL+XTCqrJgz4cK/PtQqCYZLCagCrqK9q ocIMoGK/9MZCpHFGzxjCNLPAI4+/q6i8ciCy1uR/ X-Google-Smtp-Source: APXvYqyD6elHUa66YqxwX2auSKkkPYZTDl0BogxZLrcXNm7Ler9YWoqb+jkZjtRxTS8J+3pzNepZqA10a4xdgO8SONQ= X-Received: by 2002:a24:3c4c:: with SMTP id m73mr13452987ita.23.1554061290951; Sun, 31 Mar 2019 12:41:30 -0700 (PDT) MIME-Version: 1.0 References: <78ea6992-85b1-e005-2c33-7b1df1c04031@cs.ucla.edu> In-Reply-To: <78ea6992-85b1-e005-2c33-7b1df1c04031@cs.ucla.edu> From: Tadeus Prastowo Date: Sun, 31 Mar 2019 21:41:20 +0200 Message-ID: Subject: Re: 26.1; Tetris score is no longer updated due to commit 995be66f0f0d26d1a96cbb8dfb429c3941157771 To: Paul Eggert Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 35056 Cc: Glenn Morris , 35056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sun, Mar 31, 2019 at 5:32 AM Paul Eggert wrote: > > Apparently the problem is that there are two formats of Tetris game-score files. > One format is used by play/gamegrid.el itself, the other is used by the > update-game-score command. I didn't know that; I thought that the only reason to > use update-game-score was to get setuid/setgid permissions, and that the file > format didn't change. Perhaps you need to make a test unit to ensure there is no regression in the future. > To some extent the file-format problem is Just One Of Those Things: if up > upgrade Emacs and it changes the file format, Emacs is not smart enough to deal > with the format change and so it loses your old Tetris scores. > > That being said, Emacs could try harder to use the update-game-score program if > it's installed. Is it in your installation? If so, please try the attached > patch. If not, please try redoing 'configure' so that update-game-score is built > and installed, and then try the attached patch. I apply your patch to Emacs 26.1 source (http://ftp.gnu.org/gnu/emacs/emacs-26.1.tar.xz), and run the following configure command: configure --prefix=/mnt/core/Codebases/installzone/emacs --with-xwidgets --disable-silent-rules --with-gameuser=yes And, then the following make command: make make install I played Tetris, scoring higher than the lowest recorded in my high score file, and I confirm that your patch allows the score to be recorded after year 2018 went by without any new record due to the bug introduced by commit 995be66f0f0d26d1a96cbb8dfb429c3941157771. > I suppose it would be possible to do more-serious hacking in gamegrid.el to deal > with the incompatible file formats (convert formats back and forth, say), but > that would be beyond my call of duty. I like your patch: if it ain't broken, don't fix it, dude ;) -- Best regards, Tadeus From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 18:54:47 2019 Received: (at 35056) by debbugs.gnu.org; 31 Mar 2019 22:54:47 +0000 Received: from localhost ([127.0.0.1]:38626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAjLj-0007Cm-Gw for submit@debbugs.gnu.org; Sun, 31 Mar 2019 18:54:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAjLh-0007CW-PY for 35056@debbugs.gnu.org; Sun, 31 Mar 2019 18:54:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAjLc-0007Fm-A5; Sun, 31 Mar 2019 18:54:40 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1hAjLb-00066B-E0; Sun, 31 Mar 2019 18:54:39 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Paul Eggert In-Reply-To: <78ea6992-85b1-e005-2c33-7b1df1c04031@cs.ucla.edu> (message from Paul Eggert on Sat, 30 Mar 2019 20:32:51 -0700) Subject: Re: bug#35056: 26.1; Tetris score is no longer updated due to commit 995be66f0f0d26d1a96cbb8dfb429c3941157771 References: <78ea6992-85b1-e005-2c33-7b1df1c04031@cs.ucla.edu> Message-Id: Date: Sun, 31 Mar 2019 18:54:39 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35056 Cc: tadeus.prastowo@unitn.it, 35056@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > One format is used by play/gamegrid.el itself, the other is used by the > update-game-score command. I didn't know that; I thought that the only reason to > use update-game-score was to get setuid/setgid permissions, and that the file > format didn't change. We could change play/gamegrid.el to use the update-game-score format and convert the old format when encountered. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 23:04:05 2019 Received: (at 35056-done) by debbugs.gnu.org; 1 Apr 2019 03:04:05 +0000 Received: from localhost ([127.0.0.1]:38719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAnEy-0004k4-P4 for submit@debbugs.gnu.org; Sun, 31 Mar 2019 23:04:04 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAnEw-0004jY-3l for 35056-done@debbugs.gnu.org; Sun, 31 Mar 2019 23:04:03 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5BD3A160FCC; Sun, 31 Mar 2019 20:03:56 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7a9MTMfNcxGJ; Sun, 31 Mar 2019 20:03:55 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A4E36161187; Sun, 31 Mar 2019 20:03:55 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id B0qNumGK1CeH; Sun, 31 Mar 2019 20:03:55 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7D8EF160F29; Sun, 31 Mar 2019 20:03:55 -0700 (PDT) Subject: Re: bug#35056: 26.1; Tetris score is no longer updated due to commit 995be66f0f0d26d1a96cbb8dfb429c3941157771 To: rms@gnu.org References: <78ea6992-85b1-e005-2c33-7b1df1c04031@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sun, 31 Mar 2019 20:03:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35056-done Cc: tadeus.prastowo@unitn.it, 35056-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Richard Stallman wrote: > We could change play/gamegrid.el to use the update-game-score format > and convert the old format when encountered. Yes, that would be an improvement over what the patch does. In the meantime I installed the patch since it fixes the problem at hand, and I am marking the bug as done. From unknown Fri Sep 05 20:36:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 29 Apr 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator