From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: boot time on Linux Date: Thu, 10 Aug 2023 07:53:05 +0800 Message-ID: References: <87tttmpt5h.fsf@turtle.gmx.de> <20230808173430.GA27131@suse.com> <26226778.6c9BZvbsD2@nimes> <3732835.vtg8X0x55z@nimes> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32639"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Bruno Haible , Robert Pluim , bug-gnulib@gnu.org, =?utf-8?Q?P=C3=A1draig?= Brady , Sven Joachim , 64937@debbugs.gnu.org, Natanael Copa , Emacs Development , Thorsten Kukuk To: Paul Eggert Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Thu Aug 10 01:53:37 2023 Return-path: Envelope-to: gnu-bug-gnulib@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTszh-0008J3-1C for gnu-bug-gnulib@m.gmane-mx.org; Thu, 10 Aug 2023 01:53:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTszb-0000Qx-1s; Wed, 09 Aug 2023 19:53:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTszZ-0000QC-8k for bug-gnulib@gnu.org; Wed, 09 Aug 2023 19:53:29 -0400 Original-Received: from sonic304-22.consmr.mail.ne1.yahoo.com ([66.163.191.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTszX-0005Jk-Gg for bug-gnulib@gnu.org; Wed, 09 Aug 2023 19:53:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691625205; bh=6A8tq+n07K04j2L1LQzlUTJYS+rR1MBpVNVmVC9WuZU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=uh9WrNMK7uvP0KfG5yGQY/sEEo+5IpHqOSCgOrwgAer/aO3SDta/Hhrh0TA1oNH4U7h0PRrTN00U27qwWWWIEumOwuCbbOvU8XfYFjqnMiQNJ3JnJNLcUtl4cPravCAvAyYZIdfwS5e+FpVATXsH4Ax3BtCVl8cJpP1y8fZe5GE0bGmGtx4cFb6Bzkcn+5nue0zvs1lKGpcMF+wcWGNUVfuKptAlU4lbiv2ZoLGYD2ulR766fxWp9GwqjLsFOrgOqnt4euC8+FGFHdfxGUJQG6dz5g6aIiaxeOVeYQMW7VInab2gbIx1xujq3cTPLXPnaPlJcAXWCA+jfNWrVb0Rjg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691625205; bh=J7N1U/6MjqtQJ3vs76fvFwl2Ai9Vp6/ox8kx09Sg1pv=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=CqB3zEfFBzjXdDk4JJywXXvrW8mqx8DV0doibC+EJXiB1mH3WLJIscxTBmgjPB/8J7E3o5gXGrvYj6+mQd460xFq4aMnFhSBixVqvwkFpmVelPYtBQcMe0pZWMhQma6IX1YIkEIS8pjmnn9th/xtunuPpQNT7yrn2QzUeC2S3S/kpsxQ9n91deoeWvsJfcD1jr78aKl2/VrFUDXhrVlq0VvZlGjSmTNIvwwU8rhDGEuDmQDOfxS1YrhQju3Sjp2BN0Lzl8jFAd5PHdGzYciH8LVlr6X0gX4MyShY2iAClnMSqjpIhIo6m4ZdkKxi18Y9rbjZPrvB0+X3Yyv6oIpDJA== X-YMail-OSG: mS37T_cVM1mdZsP5cj5RiS8CUADMEe2ytNW4GutH5foCWvMci1uvK1oSHVz2ZQK vz5tp8y._idPryTRndMJPHdEoduqKWfk7pfAYhiRjULZgKUoWoOD406FzeTaFK8WzAY3m5OO2vnQ IqslJrNpybjMcKkLvsSt2oT4FZ0FJWey4UyCUgOOtv97wKiZozr1zBhFDDP9NeP6ea5AxRp3domy 0jIBuPTS_vf1IlhbEApMiNC5k1d_lMUtV_GIemJcC74AiC4jHHL7tmjTYMy6vO.Umo731xO5uB7C L_UcoXdPws_cqRV2Wq.hEOAskZVdFLz69Fan4Hbs5g7E18vAdLh4JnqJRCmNTWHFKd_9UF0A4870 w0F8jNEpn8sFiVDjvds0DZmqTJSVJ_1YT1BABKiDKjNURHFjjWPbYG1.R9_y1D7a1bpensNUAf6e YEgtiUi8DAHkBEoLAJ1hLpMLd4G3I4xVg3yXPKAdJOUt24GPtuOEp.b1LAVx69z.WugnaDvf9C3q RDPc8NcJaZkHzfEIJwUzg55dnkH5uU3H697kTZUiRwHcQpru833wLUPMcGQ.ZhQGOGKtrsQmeV_2 3kFYA.Khb.rs43rqaNNXSA9MVnMR0rTuyMxtuM5LP89UGUktmlF2fX8ZrNaRAIdb0wG_9G80vm6X mK8K_mgqXhnO6q1bPiQxKHoe6z1MvNB_DyxDwXKEb.2T7KxfAQuHflr0oTvyRZTTnuvlW6y7PROb 4Ldjv_1eqAUm5f6N9a.DmK.kJrGC0vSFnlohGNI0B7itB41BkX.mGExtcyDgHEvJbQE2WHOSQnu4 GOt1emMnO4dsAfKT.kf0c86Yu3ieihsnV6_u_n_5.Y X-Sonic-MF: X-Sonic-ID: ad4184d1-8564-4795-bf5d-d33fa064d4ed Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Wed, 9 Aug 2023 23:53:25 +0000 Original-Received: by hermes--production-sg3-69654d8bd-sbrjf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0c8426873c74f6bf112b7b08fd3fcdd2; Wed, 09 Aug 2023 23:53:19 +0000 (UTC) In-Reply-To: (Paul Eggert's message of "Wed, 9 Aug 2023 12:31:46 -0700") X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.191.148; envelope-from=luangruo@yahoo.com; helo=sonic304-22.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:48133 gmane.emacs.devel:308493 Archived-At: Paul Eggert writes: > [For those cc'ed, the thread's at .] > > On 2023-08-09 07:29, Bruno Haible wrote: > >> And on Alpine Linux, while /var/run/utmp is empty, its time stamp is >> essentially the boot time. >> The approach used by Emacs, namely to look at the time stamp of >> /var/run/random-seed, is therefore essentially one of the best >> approaches. >> It just needs to also look at /var/lib/systemd/random-seed and - on >> Alpine >> Linux - /var/run/utmp . > > Thanks for looking into this. Clearly Emacs had some catching up to > do, since it was using a location for the random-seed file that > current GNU/Linux distros no longer use. To try to fix this I > installed the attached patch to Emacs master on Savannah. > > This patch does not address the problem for Alpine, nor I suspect for > Android. I suppose Alpine could use the timestamp of /var/run/utmp (or > is that /run/utmp?) but I don't know how 'configure' would reliably > detect it's being built or cross-built for Alpine. I'll cc this to > Natanael Copa, who does the Alpine ports for Emacs, to see whether he > can give advice. > > Also, I don't know how Android records boot time so I'll cc this to Po > Lu, the main developer for Emacs on Android. The boot time is off limits to user programs on Android, for security reasons. It should suffice to undefine BOOT_TIME_FILE there.