patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Yureka Lilian <yureka@cyberchaos.dev>
To: devel@spectrum-os.org
Cc: Yureka Lilian <yureka@cyberchaos.dev>
Subject: [PATCH v1 RFC 1/4] vm/sys/net: remove connman & dbus
Date: Mon, 24 Nov 2025 17:35:22 +0100	[thread overview]
Message-ID: <20251124163531.91029-2-yureka@cyberchaos.dev> (raw)
In-Reply-To: <20251124163531.91029-1-yureka@cyberchaos.dev>

In preparation to integrating xdp-forwarder, making the net-vm a net-driver VM.

Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
---
 vm/sys/net/Makefile                           |  2 +-
 vm/sys/net/default.nix                        |  8 +++-----
 vm/sys/net/file-list.mk                       | 13 +------------
 vm/sys/net/image/etc/dbus-1/system.conf       |  8 --------
 .../etc/s6-rc/connman/dependencies.d/dbus     |  0
 vm/sys/net/image/etc/s6-rc/connman/run        | 19 -------------------
 vm/sys/net/image/etc/s6-rc/connman/type       |  1 -
 .../net/image/etc/s6-rc/connman/type.license  |  2 --
 .../net/image/etc/s6-rc/dbus/notification-fd  |  1 -
 .../etc/s6-rc/dbus/notification-fd.license    |  2 --
 vm/sys/net/image/etc/s6-rc/dbus/run           | 10 ----------
 vm/sys/net/image/etc/s6-rc/dbus/type          |  1 -
 vm/sys/net/image/etc/s6-rc/dbus/type.license  |  2 --
 .../image/etc/s6-rc/ok-all/contents.d/sysctl  |  0
 vm/sys/net/image/etc/s6-rc/sysctl/type        |  1 -
 .../net/image/etc/s6-rc/sysctl/type.license   |  2 --
 vm/sys/net/image/etc/s6-rc/sysctl/up          |  4 ----
 vm/sys/net/image/etc/sysctl.conf              |  4 ----
 18 files changed, 5 insertions(+), 75 deletions(-)
 delete mode 100644 vm/sys/net/image/etc/dbus-1/system.conf
 delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/dependencies.d/dbus
 delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/run
 delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/type
 delete mode 100644 vm/sys/net/image/etc/s6-rc/connman/type.license
 delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/notification-fd
 delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/notification-fd.license
 delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/run
 delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/type
 delete mode 100644 vm/sys/net/image/etc/s6-rc/dbus/type.license
 delete mode 100644 vm/sys/net/image/etc/s6-rc/ok-all/contents.d/sysctl
 delete mode 100644 vm/sys/net/image/etc/s6-rc/sysctl/type
 delete mode 100644 vm/sys/net/image/etc/s6-rc/sysctl/type.license
 delete mode 100644 vm/sys/net/image/etc/s6-rc/sysctl/up
 delete mode 100644 vm/sys/net/image/etc/sysctl.conf

diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile
index d71c232..7ad5e5c 100644
--- a/vm/sys/net/Makefile
+++ b/vm/sys/net/Makefile
@@ -29,7 +29,7 @@ $(vmdir)/netvm/blk/root.img: ../../../scripts/make-gpt.sh ../../../scripts/sfdis
 	    build/rootfs.erofs:root:ea21da27-0391-48da-9235-9d2ab2ca7844:root
 	mv $@.tmp $@
 
-DIRS = dev etc/s6-linux-init/env proc run sys var/lib/connman
+DIRS = dev etc/s6-linux-init/env proc run sys
 
 BUILD_FILES = build/etc/s6-rc
 
diff --git a/vm/sys/net/default.nix b/vm/sys/net/default.nix
index de273e5..c7ae88e 100644
--- a/vm/sys/net/default.nix
+++ b/vm/sys/net/default.nix
@@ -7,7 +7,7 @@ pkgsMusl.callPackage (
 
 { lib, stdenvNoCC, nixos, runCommand, writeClosure
 , erofs-utils, jq, s6-rc, util-linux, xorg
-, busybox, connmanMinimal, dbus, execline, kmod, linux_latest, mdevd, nftables
+, busybox, execline, kmod, linux_latest, mdevd, nftables
 , s6, s6-linux-init
 }:
 
@@ -51,10 +51,8 @@ let
     ];
   });
 
-  connman = connmanMinimal;
-
   packages = [
-    connman dbus execline kmod mdevd s6 s6-linux-init s6-rc
+    execline kmod mdevd s6 s6-linux-init s6-rc
 
     (busybox.override {
       extraConfig = ''
@@ -73,7 +71,7 @@ let
 
   # Packages that should be fully linked into /usr,
   # (not just their bin/* files).
-  usrPackages = [ connman dbus firmware kernel.modules terminfo ];
+  usrPackages = [ firmware kernel.modules terminfo ];
 
   packagesSysroot = runCommand "packages-sysroot" {
     inherit packages;
diff --git a/vm/sys/net/file-list.mk b/vm/sys/net/file-list.mk
index a6f1a41..7bb5dbf 100644
--- a/vm/sys/net/file-list.mk
+++ b/vm/sys/net/file-list.mk
@@ -2,7 +2,6 @@
 # SPDX-FileCopyrightText: 2025 Demi Marie Obenour <demiobenour@gmail.com>
 
 FILES = \
-	image/etc/dbus-1/system.conf \
 	image/etc/fstab \
 	image/etc/init \
 	image/etc/mdev.conf \
@@ -11,7 +10,6 @@ FILES = \
 	image/etc/passwd \
 	image/etc/s6-linux-init/run-image/service/getty-hvc0/run \
 	image/etc/s6-linux-init/scripts/rc.init \
-	image/etc/sysctl.conf
 
 LINKS = \
 	image/bin \
@@ -20,12 +18,6 @@ LINKS = \
 	image/var/run
 
 S6_RC_FILES = \
-	image/etc/s6-rc/connman/dependencies.d/dbus \
-	image/etc/s6-rc/connman/run \
-	image/etc/s6-rc/connman/type \
-	image/etc/s6-rc/dbus/notification-fd \
-	image/etc/s6-rc/dbus/run \
-	image/etc/s6-rc/dbus/type \
 	image/etc/s6-rc/mdevd-coldplug/dependencies.d/mdevd \
 	image/etc/s6-rc/mdevd-coldplug/type \
 	image/etc/s6-rc/mdevd-coldplug/up \
@@ -35,7 +27,4 @@ S6_RC_FILES = \
 	image/etc/s6-rc/nftables/type \
 	image/etc/s6-rc/nftables/up \
 	image/etc/s6-rc/ok-all/contents.d/mdevd-coldplug \
-	image/etc/s6-rc/ok-all/contents.d/sysctl \
-	image/etc/s6-rc/ok-all/type \
-	image/etc/s6-rc/sysctl/type \
-	image/etc/s6-rc/sysctl/up
+	image/etc/s6-rc/ok-all/type
diff --git a/vm/sys/net/image/etc/dbus-1/system.conf b/vm/sys/net/image/etc/dbus-1/system.conf
deleted file mode 100644
index 9ceda7c..0000000
--- a/vm/sys/net/image/etc/dbus-1/system.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<!-- SPDX-License-Identifier: CC0-1.0 -->
-<!-- SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is> -->
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
-    "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-  <user>root</user>
-</busconfig>
diff --git a/vm/sys/net/image/etc/s6-rc/connman/dependencies.d/dbus b/vm/sys/net/image/etc/s6-rc/connman/dependencies.d/dbus
deleted file mode 100644
index e69de29..0000000
diff --git a/vm/sys/net/image/etc/s6-rc/connman/run b/vm/sys/net/image/etc/s6-rc/connman/run
deleted file mode 100644
index 058fc17..0000000
--- a/vm/sys/net/image/etc/s6-rc/connman/run
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/execlineb -P
-# SPDX-License-Identifier: EUPL-1.2+
-# SPDX-FileCopyrightText: 2020-2021 Alyssa Ross <hi@alyssa.is>
-
-if { modprobe af_packet }
-
-backtick -E HARDWARE_INTERFACES {
-  pipeline {
-    find -L /sys/class/net -mindepth 2 -maxdepth 2 -name address -print0
-  }
-
-  # Filter out other VMs and the loopback device.
-  pipeline { xargs -0 grep -iL ^\\(02:01:\\|00:00:00:00:00:00$\\) }
-
-  # Extract the interface names from the address file paths.
-  awk -F/ "{if (NR > 1) printf \",\"; printf \"%s\", $5}"
-}
-
-connmand -ni $HARDWARE_INTERFACES
diff --git a/vm/sys/net/image/etc/s6-rc/connman/type b/vm/sys/net/image/etc/s6-rc/connman/type
deleted file mode 100644
index 5883cff..0000000
--- a/vm/sys/net/image/etc/s6-rc/connman/type
+++ /dev/null
@@ -1 +0,0 @@
-longrun
diff --git a/vm/sys/net/image/etc/s6-rc/connman/type.license b/vm/sys/net/image/etc/s6-rc/connman/type.license
deleted file mode 100644
index 2b3b032..0000000
--- a/vm/sys/net/image/etc/s6-rc/connman/type.license
+++ /dev/null
@@ -1,2 +0,0 @@
-SPDX-License-Identifier: CC0-1.0
-SPDX-FileCopyrightText: 2020 Alyssa Ross <hi@alyssa.is>
diff --git a/vm/sys/net/image/etc/s6-rc/dbus/notification-fd b/vm/sys/net/image/etc/s6-rc/dbus/notification-fd
deleted file mode 100644
index 00750ed..0000000
--- a/vm/sys/net/image/etc/s6-rc/dbus/notification-fd
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/vm/sys/net/image/etc/s6-rc/dbus/notification-fd.license b/vm/sys/net/image/etc/s6-rc/dbus/notification-fd.license
deleted file mode 100644
index c49c11b..0000000
--- a/vm/sys/net/image/etc/s6-rc/dbus/notification-fd.license
+++ /dev/null
@@ -1,2 +0,0 @@
-SPDX-License-Identifier: CC0-1.0
-SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
diff --git a/vm/sys/net/image/etc/s6-rc/dbus/run b/vm/sys/net/image/etc/s6-rc/dbus/run
deleted file mode 100644
index 26dd403..0000000
--- a/vm/sys/net/image/etc/s6-rc/dbus/run
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/execlineb -P
-# SPDX-License-Identifier: EUPL-1.2+
-# SPDX-FileCopyrightText: 2020-2021 Alyssa Ross <hi@alyssa.is>
-
-foreground { mkdir /run/dbus }
-
-dbus-daemon
-  --config-file=/usr/share/dbus-1/system.conf
-  --nofork
-  --print-address=3
diff --git a/vm/sys/net/image/etc/s6-rc/dbus/type b/vm/sys/net/image/etc/s6-rc/dbus/type
deleted file mode 100644
index 5883cff..0000000
--- a/vm/sys/net/image/etc/s6-rc/dbus/type
+++ /dev/null
@@ -1 +0,0 @@
-longrun
diff --git a/vm/sys/net/image/etc/s6-rc/dbus/type.license b/vm/sys/net/image/etc/s6-rc/dbus/type.license
deleted file mode 100644
index 2b3b032..0000000
--- a/vm/sys/net/image/etc/s6-rc/dbus/type.license
+++ /dev/null
@@ -1,2 +0,0 @@
-SPDX-License-Identifier: CC0-1.0
-SPDX-FileCopyrightText: 2020 Alyssa Ross <hi@alyssa.is>
diff --git a/vm/sys/net/image/etc/s6-rc/ok-all/contents.d/sysctl b/vm/sys/net/image/etc/s6-rc/ok-all/contents.d/sysctl
deleted file mode 100644
index e69de29..0000000
diff --git a/vm/sys/net/image/etc/s6-rc/sysctl/type b/vm/sys/net/image/etc/s6-rc/sysctl/type
deleted file mode 100644
index bdd22a1..0000000
--- a/vm/sys/net/image/etc/s6-rc/sysctl/type
+++ /dev/null
@@ -1 +0,0 @@
-oneshot
diff --git a/vm/sys/net/image/etc/s6-rc/sysctl/type.license b/vm/sys/net/image/etc/s6-rc/sysctl/type.license
deleted file mode 100644
index c49c11b..0000000
--- a/vm/sys/net/image/etc/s6-rc/sysctl/type.license
+++ /dev/null
@@ -1,2 +0,0 @@
-SPDX-License-Identifier: CC0-1.0
-SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
diff --git a/vm/sys/net/image/etc/s6-rc/sysctl/up b/vm/sys/net/image/etc/s6-rc/sysctl/up
deleted file mode 100644
index dafa493..0000000
--- a/vm/sys/net/image/etc/s6-rc/sysctl/up
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: EUPL-1.2+
-# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
-
-sysctl -pq
diff --git a/vm/sys/net/image/etc/sysctl.conf b/vm/sys/net/image/etc/sysctl.conf
deleted file mode 100644
index 3991453..0000000
--- a/vm/sys/net/image/etc/sysctl.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-# SPDX-FileCopyrightText: 2020-2021 Alyssa Ross <hi@alyssa.is>
-
-net.ipv4.ip_forward = 1
-- 
2.51.2


  reply	other threads:[~2025-11-24 16:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 16:35 [PATCH v1 RFC 0/4] spectrum-router Yureka Lilian
2025-11-24 16:35 ` Yureka Lilian [this message]
2025-11-25 10:15   ` [PATCH v1 RFC 1/4] vm/sys/net: remove connman & dbus Alyssa Ross
2025-11-25 11:37     ` Yureka
2025-11-26  1:25       ` Demi Marie Obenour
2025-11-24 16:35 ` [PATCH v1 RFC 2/4] vm/sys/net: integrate xdp-forwarder Yureka Lilian
2025-11-26 10:53   ` Alyssa Ross
2025-11-24 16:35 ` [PATCH v1 RFC 3/4] tools: add spectrum-router Yureka Lilian
2025-11-24 19:05   ` Demi Marie Obenour
2025-11-24 16:35 ` [PATCH v1 RFC 4/4] host: integrate router Yureka Lilian
2025-11-24 19:10   ` Demi Marie Obenour
2025-11-24 20:06     ` Yureka

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

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

  git send-email \
    --in-reply-to=20251124163531.91029-2-yureka@cyberchaos.dev \
    --to=yureka@cyberchaos.dev \
    --cc=devel@spectrum-os.org \
    /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://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

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 NNTP newsgroup(s).