Skip to content

Commit

Permalink
Revert "guest: set an /etc/hostname if we don't have one"
Browse files Browse the repository at this point in the history
The change apparently doesn't work and the know issue was in muvm itself
fixed by commit c9b574d ("guest/net: Handle missing /etc/hostname
gracefully").

This reverts commit 29e77d2.

Signed-off-by: Janne Grunau <[email protected]>
  • Loading branch information
Janne Grunau authored and alyssarosenzweig committed Oct 10, 2024
1 parent 7c4797a commit 98e2563
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions crates/muvm/src/guest/mount.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::ffi::CString;
use std::fs::{exists, read_dir, File};
use std::fs::{read_dir, File};
use std::io::Write;
use std::os::fd::AsFd;
use std::path::Path;
Expand Down Expand Up @@ -136,22 +136,6 @@ pub fn mount_filesystems() -> Result<()> {

place_etc("resolv.conf", None)?;

// Due to a FAR integration bug, GNOME installs may not have /etc/hostname. Somehow the system
// mostly works like that? But Steam install depends on this file. If there's no hostname set
// in the host, at least make up a hostname for the guest so the Steam install works in the
// guest.
//
// This is a hot fix but doesn't have any real drawbacks as a bit of robustness against broken
// host installs.
//
// FAR bug: https://pagure.io/fedora-asahi/remix-bugs/issue/11
//
// (Although even after that's closed, we won't be able to drop this for a while because
// existing installs may be affected.)
if !exists("/etc/hostname")? {
place_etc("hostname", Some("placeholder-hostname"))?;
}

mount2(
Some("binfmt_misc"),
"/proc/sys/fs/binfmt_misc",
Expand Down

0 comments on commit 98e2563

Please sign in to comment.