patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: colbyt <colby@colbyt.com>
To: devel@spectrum-os.org
Cc: Alyssa Ross <hi@alyssa.is>
Subject: Re: Cosmic Progress
Date: Thu, 30 Jul 2026 12:20:15 -0700	[thread overview]
Message-ID: <20260730192022.1900810-1-colby@colbyt.com> (raw)
In-Reply-To: <87bjc8qfe6.fsf@alyssa.is>

Following up on the read-only config question from earlier in this
thread: you were right — my July 7 message conflated two things.

cosmic-config never requires XDG_CONFIG_HOME to be writable. The only write in Config::new is a create_dir_all on $XDG_CONFIG_HOME/cosmic/<AppID>/v<N>, which is a no-op when the
directory already exists. With the empty per-component directories
pre-seeded on a read-only mount, Config::new succeeds, reads behave
identically to a writable setup, and writes fail with a plain Err
rather than a panic. The panic we saw was create_dir_all returning
EROFS when those directories were *absent*, unwrapped by the caller
(cosmic-comp 1.2.0, src/config/mod.rs:172).

Verified with a minimal harness against cosmic-config at the libcosmic rev cosmic-comp 1.2.0 pins (0bb006c5) and against current master (dc1cf9f0) — same behavior on both, with the read-only mount
both as a bwrap ro-bind (real EROFS) and as chmod 555.

Two details from that may be useful for the empty-dir seeding in your cosmic-comp series:

1. Seeding a bare cosmic/ isn't enough — the full
   cosmic/<AppID>/v<N> path has to exist for every component/version pair the session constructs, or that component's Config::new fails the same way.
2. Config::new_state does the identical create_dir_all under
   XDG_STATE_HOME, so state directories want the same seeding as
   config.

      reply	other threads:[~2026-07-30 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <TeTvDa-_spqDywetYTA2Q9lerfc1R9Im8mr_pNkLqH6jHrxwcpI0nneqvUV0aw6I0eGYYhdAYjfPjTDjV1bhr3txpmLya6w_C6gnmVRTFv8=@protonmail.com>
2026-07-13 18:59 ` Cosmic Progress colby
2026-07-15 18:25   ` Alyssa Ross
2026-07-30 19:20     ` colbyt [this message]

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=20260730192022.1900810-1-colby@colbyt.com \
    --to=colby@colbyt.com \
    --cc=devel@spectrum-os.org \
    --cc=hi@alyssa.is \
    /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/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock

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).