From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id wMqPNQxaD2altAAA62LTzQ:P1 (envelope-from ) for ; Fri, 05 Apr 2024 03:55:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wMqPNQxaD2altAAA62LTzQ (envelope-from ) for ; Fri, 05 Apr 2024 03:55:24 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=ubJxAd60; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712282124; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zAnTaF9ReignyxR2l9TxNeahg+53q2SWOc5kkrbCrUc=; b=ABN13LjO7orXA3z1svHE4nZlXxe9Y81HxyVHJZol5VE6HS9RuNlQvY1Ql5knbKcQviLoiO QhUp85DOsiWiT4kmOiNqd8QmXIaFzDLxjbUDM6YzFSCVaSaPCXmbHFVlIntlplkWKbfNLd q2X/OTm346h7ghZY71vfpEe2ifbXBqZEeh/dgW7q+AQ2wC1mWFc3IGPAOKionSbB9JldU2 BGKkZFrlzEH2Hq1sfJyNlGAYyFrU43Dzfrc34Zg5qvGnOgykSRxGzaVtt84irZp38gxkKy yin4GYf4CnyRTf/ICi04rz+dekx+RCrJVwFevAF81LdRJ5bC+Diypw3Z1Qu52g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=ubJxAd60; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712282124; a=rsa-sha256; cv=none; b=m0DDJapdgiLjKZRCuXghXBu+aSb+xpADbuN3/9XO9BA0c+0mnJJy6W+T6OlVSGoFOcTZHJ 7mCe17JP7dZBAbObweckcQ54xFY41Rb5p6XyeRzQuZTQ+//xYYAatVwyG9aAqJ3vBQvghw M44oH3b3XFw4whIxoCR9hXVffleIZ+sKeo2C+WDyWkXSWME8E8blNVvN/fa/gaLlNCLTPW a8qv/xsQ9bAowJoaw0oiIiEQ6hARR8oyVpzyHR+2ruBbPLKhkEbftEdrcVmLxmN6tfWEDv /88z7lFPsrlrP9wJG+7oxP2EF0jhmvk7c76oFiOPITopt8Oh+8YBL3/O6XjGHg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 79A29660C1 for ; Fri, 05 Apr 2024 03:55:24 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsYnD-0007Ok-B2; Thu, 04 Apr 2024 21:54:59 -0400 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 1rsYnB-0007Mr-8Q for bug-guix@gnu.org; Thu, 04 Apr 2024 21:54:57 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsYnA-0000v8-Vx for bug-guix@gnu.org; Thu, 04 Apr 2024 21:54:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsYnF-0001aK-OK for bug-guix@gnu.org; Thu, 04 Apr 2024 21:55:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#70165: D-Bus system service breaks reconfiguration when /var/run/dbus is present + /run and /var/run are on separate file systems. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 Apr 2024 01:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70165 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Liliana Marie Prikler Cc: Vivien Kraus , 70165@debbugs.gnu.org Received: via spool by 70165-submit@debbugs.gnu.org id=B70165.17122820595780 (code B ref 70165); Fri, 05 Apr 2024 01:55:01 +0000 Received: (at 70165) by debbugs.gnu.org; 5 Apr 2024 01:54:19 +0000 Received: from localhost ([127.0.0.1]:35023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsYmY-0001V9-J5 for submit@debbugs.gnu.org; Thu, 04 Apr 2024 21:54:19 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:34928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsYmS-0001UI-T6 for 70165@debbugs.gnu.org; Thu, 04 Apr 2024 21:54:16 -0400 Date: Fri, 05 Apr 2024 09:53:25 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1712281954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zAnTaF9ReignyxR2l9TxNeahg+53q2SWOc5kkrbCrUc=; b=ubJxAd60eTVZIJOf2KM9dwKRwe7ur9Kn/Vj+Wn5Ub/vNYoheS8ygPTphIgXwNlVvP++AVi svmvZS/Tydix18a7agMY6zaNlSWx5gQMKhYlFPGTtw9cj/bMIGsIyrd5wDX/XWHSu82dPs rvkx8yF+fq5XEyyzdEMETVWZvtDFdMEdXlwB8RC19yQGew67NBv/7JHbPhxKsNkATHY1lh yO+fsvP/KHeVDCZJUAx+vyXPl7qh8BUskncxswbUlkLN40NVVvZf49+Ojd8IMSJ7nt/yff W7VWm+siCWMUeDT/dooKU9Gz83yKE2a2K7ow81TQtxoW0RKbZVlpeiE2m3R3yw== Message-ID: <8734s0wp62.wl-hako@ultrarare.space> In-Reply-To: <4420d6a7c4845c60cec8884066bf15b0d5b4c5fc.camel@gmail.com> References: <87frw2mmix.wl-hako@ultrarare.space> <4420d6a7c4845c60cec8884066bf15b0d5b4c5fc.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Hilton Chain From: Hilton Chain via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.86 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -6.86 X-Migadu-Queue-Id: 79A29660C1 X-TUID: hlggS5YjN0jf On Fri, 05 Apr 2024 02:52:09 +0800, Liliana Marie Prikler wrote: > > Am Donnerstag, dem 04.04.2024 um 00:36 +0800 schrieb Hilton Chain: > > Hi, > > > > I have /var/run and /run on separate file systems, recently I noticed > > system reconfiguration stopped with "guix system: error: rename-file: > > Invalid cross-device link": > > > > --8<---------------cut here---------------start------------->8--- > > newfstatat(AT_FDCWD, "/run", {st_mode=3DS_IFDIR|0755, st_size=3D440, > > ...}, AT_SYMLINK_NOFOLLOW) =3D 0 > > newfstatat(AT_FDCWD, "/run/dbus", {st_mode=3DS_IFDIR|0700, st_size=3D40, > > ...}, AT_SYMLINK_NOFOLLOW) =3D 0 > > mkdir("/run", 0777)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D -= 1 EEXIST (File exists) > > mkdir("/run/dbus", 0777)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D -1 EEXIST (File exists) > > chown("/run/dbus", 988, 983)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =3D 0 > > chmod("/run/dbus", 0755)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0 > > symlink("/run/dbus", "/var/run/dbus")=C2=A0=C2=A0 =3D -1 EEXIST (File e= xists) > > readlink("/var/run/dbus", 0x1634730, 100) =3D -1 EINVAL (Invalid > > argument) > > openat(AT_FDCWD, "/var/run/dbus", > > O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) =3D 17 > > newfstatat(17, "", {st_mode=3DS_IFDIR|0755, st_size=3D80, ...}, > > AT_EMPTY_PATH) =3D 0 > > getdents64(17, 0x16dfe10 /* 4 entries */, 32768) =3D 112 > > rename("/var/run/dbus/system_bus_socket", > > "/run/dbus/system_bus_socket") =3D -1 EXDEV (Invalid cross-device link) > > close(13)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0 > > write(2, "\33[1m\33[0mguix system: error: rena"..., 67=1B[1m=1B[0mguix > > system: error: rename-file: Invalid cross-device link > > ) =3D 67 > > exit_group(1)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =3D ? > > +++ exited with 1 +++ > > --8<---------------cut here---------------end--------------->8--- > > > > It's because /var/run/dbus was used for dbus service before, and now > > migration to /run/dbus is done with =E2=80=98rename-file=E2=80=99: > > > > --8<---------------cut here---------------start------------->8--- > > (rename-file (string-append "/var/run/dbus/" next) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 (string-append "/run/dbus/" next)) > > --8<---------------cut here---------------end--------------->8--- > > > > I think the logic can be improved for this case, but not sure how at > > the moment. > > What do you think? > Is there a *good* reason to have those be separate file systems? :D > What does the FHS say? > > Anyhow, cross-fs symlinks and rename-file ought to work assuming that > both file-systems are already mounted. Is one of them not needed for > boot? Specifically, I'm using tmpfs for them: --8<---------------cut here---------------start------------->8--- (file-system (type "tmpfs") (mount-point "/run") (device "tmpfs") (flags '(no-dev strict-atime)) (options "mode=3D0755,nr_inodes=3D800k,size=3D20%") (needed-for-boot? #t) (check? #f)) (file-system (type "tmpfs") (mount-point "/var/run") (device "tmpfs") (flags '(no-suid no-dev strict-atime)) (options "mode=3D0755,nr_inodes=3D800k,size=3D20%") (needed-for-boot? #t) (check? #f)) --8<---------------cut here---------------end--------------->8--- And here's a reproducer: --8<---------------cut here---------------start------------->8--- test_dir=3D"$(mktemp --directory)" sudo mount --type tmpfs none "$test_dir" touch "$test_dir/test" guile -c "(rename-file \"$test_dir/test\" \"/tmp/test\")" sudo umount "$test_dir" rmdir "$test_dir" --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- Backtrace: In ice-9/boot-9.scm: 1752:10 6 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 5 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 4 (call-with-prompt ("prompt") # =E2=80=A6) In ice-9/eval.scm: 619:8 3 (_ #(#(#))) In ice-9/command-line.scm: 185:19 2 (_ #) In unknown file: 1 (eval (rename-file "/tmp/tmp.9wyzRfQ28l/test" "/tmp/=E2=80=A6"= ) #) 0 (rename-file "/tmp/tmp.9wyzRfQ28l/test" "/tmp/test") ERROR: In procedure rename-file: In procedure rename-file: Invalid cross-device link --8<---------------cut here---------------end--------------->8---