From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: boot time on Linux Date: Wed, 9 Aug 2023 12:31:46 -0700 Organization: UCLA Computer Science Department Message-ID: References: <87tttmpt5h.fsf@turtle.gmx.de> <20230808173430.GA27131@suse.com> <26226778.6c9BZvbsD2@nimes> <3732835.vtg8X0x55z@nimes> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8LxGBFXSn0utXKW4szj3A63j" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Robert Pluim , bug-gnulib@gnu.org, =?UTF-8?Q?P=c3=a1draig_Brady?= , Sven Joachim , 64937@debbugs.gnu.org, Natanael Copa , Po Lu , Emacs Development , Thorsten Kukuk To: Bruno Haible Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Wed Aug 09 21:32:12 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 1qTouh-0007aZ-Bk for gnu-bug-gnulib@m.gmane-mx.org; Wed, 09 Aug 2023 21:32:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTouX-00087Q-W2; Wed, 09 Aug 2023 15:32:02 -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 1qTouS-000852-DZ; Wed, 09 Aug 2023 15:31:56 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTouO-0004Nh-P2; Wed, 09 Aug 2023 15:31:55 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 46B833C011BD8; Wed, 9 Aug 2023 12:31:49 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oAARgEs0QrBM; Wed, 9 Aug 2023 12:31:48 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 952C03C011BD9; Wed, 9 Aug 2023 12:31:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 952C03C011BD9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691609508; bh=ISJp3eie1OM+RnXkIIwlbh+x96MM7kSezRqBqH3LJ+s=; h=Message-ID:Date:MIME-Version:To:From; b=Nmd6k73S6OEuJJkNDz/Bxd12Oc63WK7aPnwjw5R9y5CsJK31bth1yPNlJRw3qennl Stckysxwvskjqszo4b0oiOdxvneQBKgye3u+wN3lQ59DtOKjlCOnMNqXRPc6/J9MA8 /mT5cZ5THCTMqWPvr5sN3mHVloJSxpg1Mytkpy4wniiSyBoI99eLlj95C3V3Li61ro 7GiiFsiKI2u+cTFZvJ6gEBCuLCyb9HGolT6yKnt8RMsvtWqeMIajIff9Jijq5f5Q8E jt3+7mpMgrTtuLZFhQ4fACkb+uNTnZYgvmfPNwwKxA6tnM/Jm5mB9NwxBiaOUr4e3p mSdEAE8+8vcaQ== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QiOT-9kPdOA7; Wed, 9 Aug 2023 12:31:48 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 4F54F3C011BD8; Wed, 9 Aug 2023 12:31:48 -0700 (PDT) Content-Language: en-US In-Reply-To: <3732835.vtg8X0x55z@nimes> Received-SPF: pass client-ip=131.179.128.66; envelope-from=eggert@cs.ucla.edu; helo=mail.cs.ucla.edu X-Spam_score_int: -60 X-Spam_score: -6.1 X-Spam_bar: ------ X-Spam_report: (-6.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, NICE_REPLY_A=-4.14, 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:48130 gmane.emacs.devel:308491 Archived-At: This is a multi-part message in MIME format. --------------8LxGBFXSn0utXKW4szj3A63j Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit [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. --------------8LxGBFXSn0utXKW4szj3A63j Content-Type: text/x-patch; charset=UTF-8; name="0001-Adjust-to-random-seed-move.patch" Content-Disposition: attachment; filename="0001-Adjust-to-random-seed-move.patch" Content-Transfer-Encoding: base64 RnJvbSBjYzBhMzBhODc2YWRmZmE1ZWMxMTBkZjlmNGUwZjIxMDk3ZjZkNzNlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBXZWQsIDkgQXVnIDIwMjMgMTI6MDY6MjUgLTA3MDAKU3ViamVjdDogW1BBVENI XSBBZGp1c3QgdG8gcmFuZG9tLXNlZWQgbW92ZQoKRm9yIHNvbWUgdGltZSwgR05VL0xpbnV4 IHN5c3RlbXMgaGF2ZSBwdXQgdGhlaXIgcmFuZG9tLXNlZWQgZmlsZQpzb21ld2hlcmUgb3Ro ZXIgdGhhbiB3aGVyZSBzcmMvZmlsZWxvY2suYyBsb29rcyBmb3IgaXQuCkNhdGNoIHVwIHRv IHRoaXMgYnkgaGF2aW5nICdjb25maWd1cmUnIHNjb3V0IGZvciBpdC4KKiBjb25maWd1cmUu YWMgKEJPT1RfVElNRV9GSUxFKToKRGVmaW5lIHRoaXMgYXQgY29uZmlndXJlLXRpbWUuCiog bnQvaW5jL21zLXczMi5oIChCT09UX1RJTUVfRklMRSk6IE92ZXJyaWRlICdjb25maWd1cmUn LgoqIHNyYy9maWxlbG9jay5jIChCT09UX1RJTUVfRklMRSk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