unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Hilton Chain via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 70165@debbugs.gnu.org
Cc: Vivien Kraus <vivien@planete-kraus.eu>,
	Liliana Marie Prikler <liliana.prikler@gmail.com>
Subject: bug#70165: D-Bus system service breaks reconfiguration when /var/run/dbus is present + /run and /var/run are on separate file systems.
Date: Thu, 04 Apr 2024 00:36:06 +0800	[thread overview]
Message-ID: <87frw2mmix.wl-hako@ultrarare.space> (raw)

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=S_IFDIR|0755, st_size=440, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/run/dbus", {st_mode=S_IFDIR|0700, st_size=40, ...}, AT_SYMLINK_NOFOLLOW) = 0
mkdir("/run", 0777)                     = -1 EEXIST (File exists)
mkdir("/run/dbus", 0777)                = -1 EEXIST (File exists)
chown("/run/dbus", 988, 983)            = 0
chmod("/run/dbus", 0755)                = 0
symlink("/run/dbus", "/var/run/dbus")   = -1 EEXIST (File exists)
readlink("/var/run/dbus", 0x1634730, 100) = -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/var/run/dbus", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 17
newfstatat(17, "", {st_mode=S_IFDIR|0755, st_size=80, ...}, AT_EMPTY_PATH) = 0
getdents64(17, 0x16dfe10 /* 4 entries */, 32768) = 112
rename("/var/run/dbus/system_bus_socket", "/run/dbus/system_bus_socket") = -1 EXDEV (Invalid cross-device link)
close(13)                               = 0
write(2, "\33[1m\33[0mguix system: error: rena"..., 67^[[1m^[[0mguix system: error: rename-file: Invalid cross-device link
) = 67
exit_group(1)                           = ?
+++ 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 ‘rename-file’:

--8<---------------cut here---------------start------------->8---
(rename-file (string-append "/var/run/dbus/" next)
             (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?

Thanks




             reply	other threads:[~2024-04-03 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 16:36 Hilton Chain via Bug reports for GNU Guix [this message]
2024-04-04 18:52 ` bug#70165: D-Bus system service breaks reconfiguration when /var/run/dbus is present + /run and /var/run are on separate file systems Liliana Marie Prikler
2024-04-05  1:53   ` Hilton Chain via Bug reports for GNU Guix
2024-04-06  6:43     ` Liliana Marie Prikler
2024-05-23  9:10       ` Ludovic Courtès
2024-05-10 14:22 ` Collin J. Doering via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frw2mmix.wl-hako@ultrarare.space \
    --to=bug-guix@gnu.org \
    --cc=70165@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    --cc=liliana.prikler@gmail.com \
    --cc=vivien@planete-kraus.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).