diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 63abe52..e6ca28b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,8 @@ -Replace this text with a description of your changes, and why these changes are important. Read and acknowledge the list below. PRs without a completed checkbox will be closed. +- [ ] I have disclosed use of any AI generated code in my commit messages. + - If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR. + - In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment. +- [ ] I understand these changes in full and will be able to respond to review comments. +- [ ] My change is accurately described in the commit message. +- [ ] My contribution is tested and working as described. +- [ ] I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions. ---- - -- I have not included any LLM (also known as AI) generated content in this PR, including code, comments, and descriptions. -- I understand these changes in full and will be able to respond to review comments. -- My change is accurately described in the commit message. -- My contribution is tested and working as described. -- I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions. -- [ ] I have read and followed all of the above requirements. For more information, see our [contributor guide](https://github.com/pop-os/pop/blob/master/CONTRIBUTING.md). diff --git a/.github/workflows/require-checklist.yml b/.github/workflows/require-checklist.yml deleted file mode 100644 index fd4ca8c..0000000 --- a/.github/workflows/require-checklist.yml +++ /dev/null @@ -1,14 +0,0 @@ -# From https://github.com/mheap/require-checklist-action, license MIT -name: Require Checklist - -on: - pull_request: - types: [opened, edited, synchronize] - -jobs: - job1: - runs-on: ubuntu-latest - steps: - - uses: mheap/require-checklist-action@v2 - with: - requireChecklist: true diff --git a/Cargo.lock b/Cargo.lock index f85b487..efb8899 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,13 +19,19 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aho-corasick" -version = "1.1.5" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + [[package]] name = "async-broadcast" version = "0.7.2" @@ -113,13 +119,13 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn", ] [[package]] @@ -148,13 +154,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.92" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn", ] [[package]] @@ -165,9 +171,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -186,9 +192,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.13.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "block" @@ -198,9 +204,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "blocking" -version = "1.7.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" dependencies = [ "async-channel", "async-task", @@ -211,32 +217,32 @@ dependencies = [ [[package]] name = "bstr" -version = "1.13.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", - "serde_core", + "serde", ] [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytes" -version = "1.12.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.6.0" +version = "1.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" dependencies = [ "find-msvc-tools", "shlex", @@ -244,9 +250,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.5" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "color-eyre" @@ -293,7 +299,7 @@ dependencies = [ [[package]] name = "cosmic-session" -version = "1.10.0" +version = "1.3.0" dependencies = [ "color-eyre", "cosmic-dbus-a11y", @@ -319,9 +325,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.23" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "dirs" @@ -368,7 +374,7 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -389,10 +395,11 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.2" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ + "concurrent-queue", "parking", "pin-project-lite", ] @@ -409,32 +416,37 @@ dependencies = [ [[package]] name = "eyre" -version = "0.6.14" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08309dbcc659c5549a24ddb9b27027640641b282ef5768267c7e675558986a3" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" dependencies = [ - "autocfg", "indenter", "once_cell", ] [[package]] name = "fastrand" -version = "2.5.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "find-msvc-tools" -version = "0.1.14" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "freedesktop-desktop-entry" -version = "0.8.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cfa09933e03f1ced380ad639822d65cb59a1914217da6c72aa8db3563e94214" +checksum = "28273c5c6b97a5f07724f6652f064c0c7f637f9aa5e7c09c83bc3bc4ad4ea245" dependencies = [ "bstr", "gettext-rs", @@ -447,15 +459,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-io" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-lite" @@ -472,32 +484,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn", ] [[package]] name = "futures-sink" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.34" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-core", "futures-macro", @@ -506,6 +518,17 @@ dependencies = [ "slab", ] +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "getrandom" version = "0.3.4" @@ -520,20 +543,22 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", + "wasip2", + "wasip3", ] [[package]] name = "gettext-rs" -version = "0.8.0" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9df5e3fa8c077b15fdfa8ce130e2bc73d663b8aaa6d51b71421b8659980b1d80" +checksum = "5d5857dc1b7f0fee86961de833f434e29494d72af102ce5355738c0664222bdf" dependencies = [ "gettext-sys", "locale_config", @@ -541,9 +566,9 @@ dependencies = [ [[package]] name = "gettext-sys" -version = "0.27.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa7e4460b196107cc1bb2629488e8b6dbb7f34f6683ea6753c4ac22f590785" +checksum = "4ea859ab0dd7e70ff823032b3e077d03d39c965d68c6c10775add60e999d8ee9" dependencies = [ "cc", "temp-dir", @@ -557,15 +582,30 @@ checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "hashbrown" -version = "0.17.1" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.5.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -573,6 +613,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "indenter" version = "0.3.4" @@ -581,12 +627,14 @@ checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "indexmap" -version = "2.14.2" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.17.0", + "serde", + "serde_core", ] [[package]] @@ -597,12 +645,11 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.106" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" dependencies = [ - "cfg-if", - "futures-util", + "once_cell", "wasm-bindgen", ] @@ -624,21 +671,27 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.190" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libredox" -version = "0.1.25" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" dependencies = [ "libc", ] @@ -673,9 +726,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.34" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "log-panics" @@ -717,9 +770,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.3" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memoffset" @@ -741,9 +794,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "wasi", @@ -821,9 +874,9 @@ dependencies = [ [[package]] name = "owo-colors" -version = "4.4.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c45bb4a6ae1280ec0803b1ef9d3455eb50f01efbbe1447ab020f1d54fba9d8" +checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d" [[package]] name = "parking" @@ -894,6 +947,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -905,18 +968,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.107" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.47" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -935,9 +998,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.9.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha", "rand_core", @@ -973,19 +1036,20 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.5.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ + "getrandom 0.2.17", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.13.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -995,9 +1059,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.18" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -1006,21 +1070,21 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.11" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rustc-demangle" -version = "0.1.28" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" [[package]] name = "rustix" -version = "1.1.5" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags", "errno", @@ -1031,9 +1095,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.23" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "scopeguard" @@ -1042,10 +1106,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "serde" -version = "1.0.229" +name = "semver" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -1053,29 +1123,29 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.229" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn", ] [[package]] name = "serde_json" -version = "1.0.151" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", @@ -1086,13 +1156,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.21" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn", ] [[package]] @@ -1112,9 +1182,9 @@ checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" [[package]] name = "shlex" -version = "2.0.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" @@ -1143,15 +1213,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.16.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", "windows-sys", @@ -1159,20 +1229,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.119" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -1198,7 +1257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.4.2", "once_cell", "rustix", "windows-sys", @@ -1206,38 +1265,38 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.21" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.21" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn", ] [[package]] name = "thread_local" -version = "1.1.10" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", ] [[package]] name = "tokio" -version = "1.53.2" +version = "1.52.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes", "libc", @@ -1253,20 +1312,20 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 3.0.6", + "syn", ] [[package]] name = "tokio-util" -version = "0.7.19" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -1286,9 +1345,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.15+spec-1.1.0" +version = "0.25.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" +checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" dependencies = [ "indexmap", "toml_datetime", @@ -1298,9 +1357,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.1.3+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow", ] @@ -1324,7 +1383,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] @@ -1400,21 +1459,27 @@ dependencies = [ [[package]] name = "unicase" -version = "2.10.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-ident" -version = "1.0.26" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "uuid" -version = "1.27.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97277d36b9c3ace13e58fa6e753f8b0bbbf302a18dd193240d70f9e29681059a" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ "js-sys", "serde_core", @@ -1441,18 +1506,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.4+wasi-0.2.12" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", ] [[package]] name = "wasm-bindgen" -version = "0.2.129" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" dependencies = [ "cfg-if", "once_cell", @@ -1463,9 +1537,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.129" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1473,26 +1547,60 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.129" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.6", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.129" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "winapi" version = "0.3.9" @@ -1532,19 +1640,107 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.4" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + [[package]] name = "wit-bindgen" version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + [[package]] name = "xdg" version = "3.0.0" @@ -1553,9 +1749,9 @@ checksum = "2fb433233f2df9344722454bc7e96465c9d03bff9d77c248f9e7523fe79585b5" [[package]] name = "zbus" -version = "5.19.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +checksum = "c3bcbf15c8708d7fc1be0c993622e0a5cbd5e8b52bfa40afa4c3e0cd8d724ac1" dependencies = [ "async-broadcast", "async-executor", @@ -1589,14 +1785,14 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.19.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +checksum = "51fa5406ad9175a8c825a931f8cf347116b531b3634fcb0b627c290f1f2516ff" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.6", + "syn", "zbus_names", "zvariant", "zvariant_utils", @@ -1604,9 +1800,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.3.4" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" +checksum = "7074f3e50b894eac91750142016d30d0a89be8e67dbfd9704fb875825760e52d" dependencies = [ "serde", "winnow", @@ -1623,90 +1819,80 @@ dependencies = [ "zbus", ] -[[package]] -name = "zcheapstr" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473" -dependencies = [ - "serde", -] - [[package]] name = "zerocopy" -version = "0.8.59" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.59" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn", ] [[package]] name = "zmij" -version = "1.0.23" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zvariant" -version = "5.15.0" +version = "5.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1d34c27cc6cdd1f458427519dd6b8612f7b7e3f7b9a0b2355d041dda9869147" +checksum = "c4db0ecb8987cf5e92653c57c098f7f0e39a03112edb796f4fe089fb7eaa14ff" dependencies = [ "endi", "enumflags2", "serde", "winnow", - "zcheapstr", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.15.0" +version = "5.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864155e69b4352db0c7f374917bf45d1e0c8d17659c8b3dbf9795f3673f8c497" +checksum = "5b949b639ab1b4bed763aa7481ba0e368af68d8b55532f8ed4bec86a59f2ca98" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 3.0.6", + "syn", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "4.2.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +checksum = "6d464f5733ffa07a3164d656f18533caace9d0638596721355d73256a410d691" dependencies = [ "proc-macro2", "quote", "serde", - "syn 3.0.6", + "syn", "winnow", ] -[[patch.unused]] -name = "cosmic-freedesktop-icons" -version = "0.4.0" - [[patch.unused]] name = "softbuffer" version = "0.4.1" +[[patch.unused]] +name = "cosmic-freedesktop-icons" +version = "0.4.0" + [[patch.unused]] name = "smithay-clipboard" version = "0.8.0" diff --git a/Cargo.toml b/Cargo.toml index d595f96..1a27648 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cosmic-session" description = "The session manager for the COSMIC desktop environment" -version = "1.10.0" +version = "1.3.0" license = "GPL-3.0-only" edition = "2024" rust-version = "1.93" @@ -46,6 +46,6 @@ logind-zbus = { version = "5.3.2", optional = true } [features] systemd = ["dep:zbus_systemd", "dep:tracing-journald"] -logind = ["dep:logind-zbus"] -default = ["logind", "systemd"] +logind = ["systemd", "logind-zbus"] +default = ["logind"] autostart = ["dep:shell-words", "dep:dirs", "dep:freedesktop-desktop-entry"] diff --git a/cargo.just b/cargo.just deleted file mode 100644 index fb09e1e..0000000 --- a/cargo.just +++ /dev/null @@ -1,70 +0,0 @@ -cargo-target-dir := env('CARGO_TARGET_DIR', 'target') - -# Compile with debug profile -[no-cd] -build-debug *args: - cargo build {{args}} - -# Compile with release profile -[no-cd] -build-release *args: (build-debug '--release' args) - -# Compile with a vendored tarball -[no-cd] -build-vendored *args: vendor-extract (build-release '--frozen --offline' args) - -# Check for errors and linter warnings -[no-cd] -check *args: - cargo clippy --all-features {{args}} -- -W clippy::pedantic - -# Runs a check with JSON message format for IDE integration -[no-cd] -check-json: (check '--message-format=json') - -# Remove Cargo build artifacts -[no-cd] -clean: - cargo clean - -# Also remove .cargo and vendored dependencies -[no-cd] -clean-dist: clean - rm -rf .cargo vendor vendor.tar target - -# Run the application for testing purposes -[no-cd] -run *args: - cargo run {{args}} - -# Run `cargo test` -[no-cd] -test *args: - cargo test {{args}} - -# Vendor Cargo dependencies locally -[no-cd] -vendor: - #!/usr/bin/env bash - mkdir -p .cargo - cargo vendor --locked | head -n -1 > .cargo/config.toml - echo 'directory = "vendor"' >> .cargo/config.toml - echo >> .cargo/config.toml - echo '[env]' >> .cargo/config.toml - if [ -n "${SOURCE_DATE_EPOCH}" ] - then - source_date="$(date -d "@${SOURCE_DATE_EPOCH}" "+%Y-%m-%d")" - echo "VERGEN_GIT_COMMIT_DATE = \"${source_date}\"" >> .cargo/config.toml - fi - if [ -n "${SOURCE_GIT_HASH}" ] - then - echo "VERGEN_GIT_SHA = \"${SOURCE_GIT_HASH}\"" >> .cargo/config.toml - fi - tar pcf vendor.tar .cargo vendor - rm -rf .cargo vendor - -# Extracts vendored dependencies -[no-cd] -vendor-extract: - rm -rf vendor - tar pxf vendor.tar diff --git a/data/start-cosmic b/data/start-cosmic index 46dec47..c91f463 100755 --- a/data/start-cosmic +++ b/data/start-cosmic @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e @@ -23,8 +23,8 @@ fi if [ -n "${SHELL}" ]; then # --in-login-shell: our flag to indicate that we don't need to recurse any further if [ "${1}" != "--in-login-shell" ]; then - # `-l`: start $SHELL as a login shell so it sources the user's profile. - exec "${SHELL}" -l -c "${0} --in-login-shell" + # `exec -l`: like `login`, prefixes $SHELL with a hyphen to start a login shell + exec bash -c "exec -l '${SHELL}' -c '${0} --in-login-shell'" fi fi @@ -42,7 +42,7 @@ export DCONF_PROFILE=cosmic # Set the QT platform theme to CuteCosmic. Fallback to qt6ct if CuteCosmic is not installed. if [ -z "$QT_QPA_PLATFORMTHEME" ]; then export QT_QPA_PLATFORMTHEME=cosmic - for QT_PLUGIN_PATH in /usr/lib*/qt6/plugins /usr/lib/*/qt6/plugins; do + for QT_PLUGIN_PATH in /usr/lib{*,/*}/qt6/plugins; do if [ -f "${QT_PLUGIN_PATH}/platformthemes/libcutecosmictheme.so" ]; then # CuteCosmic found, no need for a fallback. export QT_QPA_PLATFORMTHEME=cosmic @@ -56,8 +56,8 @@ if [ -z "$QT_QPA_PLATFORMTHEME" ]; then fi # Start gnome keyring components if the daemon is active -# -> check if $XDG_RUNTIME_DIR/keyring exists -if [ -d "$XDG_RUNTIME_DIR/keyring" ]; then +# -> check if /run/user/$UID/keyring exists +if [ -d "/run/user/$(id -u)/keyring" ]; then # Use PATH lookup instead of hardcoding /usr/bin if command -v gnome-keyring-daemon >/dev/null 2>&1; then @@ -66,14 +66,13 @@ if [ -d "$XDG_RUNTIME_DIR/keyring" ]; then echo "gnome-keyring-daemon not found in PATH" >&2 fi - # Preserve an SSH agent configured by the user. Otherwise, use a - # Gnome Keyring SSH socket if one exists. - if [ -z "$SSH_AUTH_SOCK" ]; then - if [ -S "$XDG_RUNTIME_DIR/gcr/ssh" ]; then - export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh" - elif [ -S "$XDG_RUNTIME_DIR/keyring/ssh" ]; then - export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/keyring/ssh" - fi + # Only set SSH_AUTH_SOCK if the socket actually exists. Either + # set the correct one, or don't set one at all. Don't set the + # wrong value. + if [ -S "/run/user/$(id -u)/gcr/ssh" ]; then + export SSH_AUTH_SOCK="/run/user/$(id -u)/gcr/ssh" + elif [ -S "/run/user/$(id -u)/keyring/ssh" ]; then + export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh" fi fi @@ -85,26 +84,30 @@ if command -v systemctl >/dev/null; then # For environment variables already imported into the user's # session, if the value imported differs from the value in this # environment, update it. - systemctl --user show-environment | while IFS= read -r env_var; do + mapfile -t existing_env_vars < <(systemctl --user show-environment) + for env_var in "${existing_env_vars[@]}"; do env_var_name="${env_var%%=*}" - env_var_value="$(printenv "${env_var_name}" || true)" + env_var_value=${!env_var_name:-} # Skip current iteration if the environment variable's value # in the current envionment is unset. - if [ -z "${env_var_value}" ]; then + if [[ -z "${env_var_value}" ]]; then continue fi - # Skip updating variables where systemd already holds this exact value. - if [ "${env_var}" = "${env_var_name}=${env_var_value}" ]; then + env_var_val_str_to_compare="${env_var_name}=${env_var_value}" + env_var_val_str_to_compare_ansi_c_quoted="${env_var_name}=\$'$(printf '%q' "${env_var_value}")'" + if [[ "${env_var}" == "${env_var_val_str_to_compare}" ]]; then + continue + elif [[ "${env_var}" == "${env_var_val_str_to_compare_ansi_c_quoted}" ]]; then continue fi - systemctl --user import-environment "${env_var_name}" || true + systemctl --user import-environment "${env_var_name}" ||: done fi # Run cosmic-session -if [ -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then +if [[ -z "${DBUS_SESSION_BUS_ADDRESS}" ]]; then exec /usr/bin/dbus-run-session -- /usr/bin/cosmic-session else exec /usr/bin/cosmic-session diff --git a/debian/changelog b/debian/changelog index d205827..e890468 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,15 +1,3 @@ -cosmic-session (1.10.0) noble; urgency=medium - - * Epoch 1.10.0 version update - - -- Michael Murphy Mon, 05 Oct 2026 21:26:30 +0200 - -cosmic-session (1.9.0) noble; urgency=medium - - * Epoch 1.9.0 version update - - -- Michael Murphy Mon, 14 Sep 2026 17:54:45 +0200 - cosmic-session (1.0.0) noble; urgency=medium * Initial release diff --git a/debian/control b/debian/control index ab2e939..e8d41e0 100644 --- a/debian/control +++ b/debian/control @@ -27,7 +27,6 @@ Depends: cosmic-launcher, cosmic-notifications, cosmic-osd, - cosmic-osk, cosmic-panel, cosmic-randr, cosmic-screenshot, @@ -47,7 +46,6 @@ Recommends: cosmic-player, cosmic-store, cosmic-term, - cosmic-viewer, cosmic-wallpapers, orca, system-config-printer, diff --git a/debian/source/options b/debian/source/options deleted file mode 100644 index 2f8c4a1..0000000 --- a/debian/source/options +++ /dev/null @@ -1,6 +0,0 @@ -tar-ignore=.github -tar-ignore=target/.rustc_info.json -tar-ignore=target/CACHEDIR.TAG -tar-ignore=target/debug -tar-ignore=target/release -tar-ignore=vendor diff --git a/flake.lock b/flake.lock index 67223ed..8d2b776 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,17 @@ { "nodes": { "crane": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, "locked": { - "lastModified": 1788465171, - "narHash": "sha256-Y1/TTVXjYXGF068IThQH9fPSZ0SIE74PABlUxnWTUH0=", + "lastModified": 1702141249, + "narHash": "sha256-8wDpJKbDTDqFmyJfNEJOLrHYDoEzCjCbmz+lSRoU3CI=", "owner": "ipetkov", "repo": "crane", - "rev": "eb35abda9f232cc6610b1d1e3200d15c49b7ac54", + "rev": "62fc1a0cbe144c1014d956e603d56bf1ffe69c7d", "type": "github" }, "original": { @@ -23,11 +28,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1788865058, - "narHash": "sha256-ZkvwEHlSa46BkODMEwHCEh9hlUC2igneJ+noEUn9ww4=", + "lastModified": 1702189261, + "narHash": "sha256-TN6gE1eZddDhAoRrScV6Wji1Nk3uqMIDjGwN5ZesAZk=", "owner": "nix-community", "repo": "fenix", - "rev": "9efa138447c5773995d98d9aafa9eba4982aceab", + "rev": "cae060dbaf53430bb2b549ced0affd54d40e6cee", "type": "github" }, "original": { @@ -41,11 +46,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -56,11 +61,11 @@ }, "nix-filter": { "locked": { - "lastModified": 1757882181, - "narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=", + "lastModified": 1701697642, + "narHash": "sha256-L217WytWZHSY8GW9Gx1A64OnNctbuDbfslaTEofXXRw=", "owner": "numtide", "repo": "nix-filter", - "rev": "59c44d1909c72441144b93cf0f054be7fe764de5", + "rev": "c843418ecfd0344ecb85844b082ff5675e02c443", "type": "github" }, "original": { @@ -71,11 +76,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1788865024, - "narHash": "sha256-3YkAzvtt4LoE11IcBDzPshIF3fJ0aIoILqE7dAg8CLI=", + "lastModified": 1702206697, + "narHash": "sha256-vE9oEx3Y8TO5MnWwFlmopjHd1JoEBno+EhsfUCq5iR8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "422d1ae605d7fcd9896412b37dc065c456c0eefb", + "rev": "29d6c96900b9b576c2fb89491452f283aa979819", "type": "github" }, "original": { @@ -97,11 +102,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1788794694, - "narHash": "sha256-FROpcpM2ELawfxhW8cWuz8m3dp/0EFAFCiK+AbNw95w=", + "lastModified": 1702153490, + "narHash": "sha256-F98s0+mUHtqiUk9iCApPTy23YMLmcKqTfsShpIPB40Q=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "48d839420745124e85140234ce783ccd90dab24e", + "rev": "9d87a23cdef6087c1a0c97980949e2310271a941", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e96ed92..eb7660f 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ nix-filter.url = "github:numtide/nix-filter"; crane = { url = "github:ipetkov/crane"; + inputs.nixpkgs.follows = "nixpkgs"; }; fenix = { url = "github:nix-community/fenix"; @@ -18,7 +19,7 @@ flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: let pkgs = nixpkgs.legacyPackages.${system}; - craneLib = (crane.mkLib pkgs).overrideToolchain fenix.packages.${system}.stable.toolchain; + craneLib = crane.lib.${system}.overrideToolchain fenix.packages.${system}.stable.toolchain; pkgDef = { nativeBuildInputs = with pkgs; [ just pkg-config autoPatchelfHook ]; @@ -46,7 +47,7 @@ inherit cosmic-session; }; - packages.default = cosmic-session.overrideAttrs (oldAttrs: { + packages.default = cosmic-session.overrideAttrs (oldAttrs: rec { buildPhase = '' just prefix=$out xdp_cosmic=/run/current-system/sw/bin/xdg-desktop-portal-cosmic build ''; diff --git a/src/comp.rs b/src/comp.rs index feeb103..8457d08 100644 --- a/src/comp.rs +++ b/src/comp.rs @@ -99,7 +99,6 @@ pub fn run_compositor( process_manager: &ProcessManager, exec: String, args: Vec, - env: Vec<(String, String)>, _token: CancellationToken, env_tx: oneshot::Sender>, session_dbus_tx: mpsc::Sender, @@ -120,26 +119,15 @@ pub fn run_compositor( OwnedFd::from(std_stream) }; mark_as_not_cloexec(&comp).expect("Failed to mark fd as not cloexec"); - Ok(tokio::spawn(async move { // Create a new process handler for cosmic-comp, with our compositor socket's // file descriptor as the `COSMIC_SESSION_SOCK` environment variable. - let mut comp_env = env; - comp_env.push(( - "COSMIC_SESSION_SOCK".to_string(), - comp.as_raw_fd().to_string(), - )); - // NVIDIA keeps a growing pool of pre-rendered compositor frames - // (smithay#1562 / cosmic-comp#1179). Cap it to a single buffer. - if std::path::Path::new("/proc/driver/nvidia").exists() { - comp_env.push(("__GL_MaxFramesAllowed".to_string(), "1".to_string())); - } process_manager .start_process( Process::new() .with_executable(exec) .with_args(args) - .with_env(comp_env) + .with_env([("COSMIC_SESSION_SOCK", comp.as_raw_fd().to_string())]) .with_on_exit(move |pman, _, err_code, _will_restart| { let session_dbus_tx = session_dbus_tx.clone(); async move { diff --git a/src/main.rs b/src/main.rs index b62d2ac..6b5d6bc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,6 @@ mod comp; mod notifications; mod process; mod service; -#[cfg(feature = "systemd")] mod systemd; use color_eyre::Result; @@ -16,13 +15,17 @@ use launch_pad::ProcessManager; use launch_pad::process::Process; use service::SessionRequest; use std::borrow::Cow; +#[cfg(feature = "autostart")] +use std::collections::HashSet; use std::env; use std::os::fd::AsRawFd; +#[cfg(feature = "autostart")] +use std::path::PathBuf; +#[cfg(feature = "autostart")] +use std::process::{Command, Stdio}; use std::sync::Arc; -#[cfg(any(feature = "autostart", feature = "systemd"))] -use std::{path::Path, sync::OnceLock}; #[cfg(feature = "systemd")] -use systemd::{get_systemd_env, spawn_scope}; +use systemd::{get_systemd_env, is_systemd_used, spawn_scope}; use tokio::signal::unix::{SignalKind, signal}; use tokio::sync::mpsc::{Receiver, Sender}; use tokio::sync::{Mutex, oneshot}; @@ -32,30 +35,17 @@ use tracing::Instrument; use tracing::metadata::LevelFilter; use tracing_subscriber::prelude::*; use tracing_subscriber::{EnvFilter, fmt}; -#[cfg(feature = "autostart")] -use { - std::collections::HashSet, - std::path::PathBuf, - std::process::{Command, Stdio}, -}; use crate::notifications::{ DAEMON_NOTIFICATIONS_FD, PANEL_NOTIFICATIONS_FD, notifications_process, }; #[cfg(feature = "autostart")] -const AUTOSTART_DIR: &str = "autostart"; +const AUTOSTART_DIR: &'static str = "autostart"; #[cfg(feature = "autostart")] -const ENVIRONMENT_NAME: &str = "COSMIC"; +const ENVIRONMENT_NAME: &'static str = "COSMIC"; #[tokio::main(flavor = "current_thread")] async fn main() -> Result<()> { - if let Some(arg) = env::args().nth(1) - && (arg == "--version" || arg == "-V") - { - println!("cosmic-session {}", env!("CARGO_PKG_VERSION")); - return Ok(()); - } - color_eyre::install().wrap_err("failed to install color_eyre error handler")?; let trace = tracing_subscriber::registry(); @@ -145,20 +135,10 @@ async fn start( .await; let token = CancellationToken::new(); let (env_tx, env_rx) = oneshot::channel(); - - #[cfg(feature = "systemd")] - let systemd_env = if *is_systemd_used() { - get_systemd_env().await - } else { - Vec::new() - }; - #[cfg(not(feature = "systemd"))] - let systemd_env = Vec::new(); let compositor_handle = comp::run_compositor( &process_manager, executable.clone(), args, - systemd_env.clone(), token.child_token(), env_tx, session_tx, @@ -176,49 +156,69 @@ async fn start( ); // now that cosmic-comp is ready, set XDG_SESSION_TYPE=wayland for new processes - env_vars.extend( - systemd_env - .into_iter() - .chain([("XDG_SESSION_TYPE".to_string(), "wayland".to_string())]), - ); - #[cfg(feature = "systemd")] + env_vars.push(("XDG_SESSION_TYPE".to_string(), "wayland".to_string())); systemd::set_systemd_environment("XDG_SESSION_TYPE", "wayland").await; - // expose the session version - env_vars.push(( - "COSMIC_VERSION".to_string(), - env!("CARGO_PKG_VERSION").to_string(), - )); #[cfg(feature = "systemd")] - systemd::set_systemd_environment("COSMIC_VERSION", env!("CARGO_PKG_VERSION")).await; - - #[cfg(feature = "logind")] - let _inhibit_fd = match zbus::Connection::system().await { - Ok(connection) => match logind_zbus::manager::ManagerProxy::new(&connection).await { - Ok(proxy) => match proxy - .inhibit( - logind_zbus::manager::InhibitType::HandlePowerKey, - "Cosmic Session", - "Show confirmation dialog.", - "block", - ) - .await - { - Ok(fd) => Some(fd), + let _inhibit_fd = if *is_systemd_used() { + match get_systemd_env().await { + Ok(env) => { + for systemd_env in env { + // Only update the envvar if unset + if std::env::var_os(&systemd_env.key).is_none() { + // Blacklist of envvars that we shouldn't touch (taken from KDE) + if (!systemd_env.key.starts_with("XDG_") + || systemd_env.key == "XDG_DATA_DIRS" + || systemd_env.key == "XDG_CONFIG_DIRS") + && systemd_env.key != "DISPLAY" + && systemd_env.key != "XAUTHORITY" + && systemd_env.key != "WAYLAND_DISPLAY" + && systemd_env.key != "WAYLAND_SOCKET" + && systemd_env.key != "_" + && systemd_env.key != "SHELL" + && systemd_env.key != "SHLVL" + { + env_vars.push((systemd_env.key, systemd_env.value)); + } + } + } + } + Err(err) => { + warn!("Failed to sync systemd environment {}.", err); + } + }; + #[cfg(feature = "logind")] + match zbus::Connection::system().await { + Ok(connection) => match logind_zbus::manager::ManagerProxy::new(&connection).await { + Ok(proxy) => match proxy + .inhibit( + logind_zbus::manager::InhibitType::HandlePowerKey, + "Cosmic Session", + "Show confirmation dialog.", + "block", + ) + .await + { + Ok(fd) => Some(fd), + Err(err) => { + error!("Failed to inhibit power key {err:?}"); + None + } + }, Err(err) => { - error!("Failed to inhibit power key {err:?}"); + error!("Failed to connect to logind manager {err:?}"); None } }, Err(err) => { - error!("Failed to connect to logind manager {err:?}"); + error!("Failed to connect to system dbus {err:?}"); None } - }, - Err(err) => { - error!("Failed to connect to system dbus {err:?}"); - None } + #[cfg(not(feature = "logind"))] + None + } else { + None }; let (settings_exit_tx, settings_exit_rx) = oneshot::channel(); @@ -245,10 +245,8 @@ async fn start( // - cosmic-comp is ready // - we've set any related variables // - cosmic-settings-daemon is ready - #[cfg(feature = "systemd")] systemd::start_systemd_target().await; // Always stop the target when the process exits or panics. - #[cfg(feature = "systemd")] scopeguard::defer! { systemd::stop_systemd_target(); } @@ -326,9 +324,6 @@ async fn start( let span = info_span!(parent: None, "cosmic-osd"); start_component("cosmic-osd", span, &process_manager, &env_vars).await; - let span = info_span!(parent: None, "cosmic-osk"); - start_component("cosmic-osk", span, &process_manager, &env_vars).await; - let span = info_span!(parent: None, "cosmic-bg"); start_component("cosmic-bg", span, &process_manager, &env_vars).await; @@ -381,17 +376,17 @@ async fn start( } // skip if we have an OnlyShowIn entry that doesn't include COSMIC - if let Some(only_show_in) = entry.only_show_in() - && !only_show_in.contains(&ENVIRONMENT_NAME) - { - continue; + if let Some(only_show_in) = entry.only_show_in() { + if !only_show_in.contains(&ENVIRONMENT_NAME) { + continue; + } } // ... OR we have a NotShowIn entry that includes COSMIC - if let Some(not_show_in) = entry.not_show_in() - && not_show_in.contains(&ENVIRONMENT_NAME) - { - continue; + if let Some(not_show_in) = entry.not_show_in() { + if not_show_in.contains(&ENVIRONMENT_NAME) { + continue; + } } info!( @@ -410,7 +405,7 @@ async fn start( .collect::>(); // escape them - let escaped_args = shell_words::split(&filtered_args.join(" ")); + let escaped_args = shell_words::split(&*filtered_args.join(" ")); if let Ok(args) = escaped_args { info!("trying to start {} {}", program_name, args.join(" ")); @@ -652,11 +647,3 @@ async fn start_component( error!("failed to start {}: {}", cmd, err); } } - -/// Determine if systemd is used as the init system. This should work on all -/// linux distributions. -#[cfg(any(feature = "autostart", feature = "systemd"))] -fn is_systemd_used() -> &'static bool { - static IS_SYSTEMD_USED: OnceLock = OnceLock::new(); - IS_SYSTEMD_USED.get_or_init(|| Path::new("/run/systemd/system").exists()) -} diff --git a/src/systemd.rs b/src/systemd.rs index 77c03e9..cbf64d5 100644 --- a/src/systemd.rs +++ b/src/systemd.rs @@ -1,9 +1,28 @@ // SPDX-License-Identifier: GPL-3.0-only +use std::path::Path; use std::process::{Command, Stdio}; +use std::sync::OnceLock; use zbus::Connection; use zbus::zvariant::{Array, OwnedValue}; + +#[derive(Debug)] +pub struct EnvVar { + pub key: String, + pub value: String, +} + +impl From<(&str, &str)> for EnvVar { + fn from(val: (&str, &str)) -> Self { + EnvVar { + key: val.0.to_owned(), + value: val.1.to_owned(), + } + } +} + +#[cfg(feature = "systemd")] use zbus_systemd::systemd1::ManagerProxy as SystemdManagerProxy; pub async fn set_systemd_environment(key: &str, value: &str) { @@ -27,44 +46,29 @@ pub fn stop_systemd_target() { ) } -async fn load_systemd_env() -> zbus::Result> { +/// Determine if systemd is used as the init system. This should work on all +/// linux distributions. +pub fn is_systemd_used() -> &'static bool { + static IS_SYSTEMD_USED: OnceLock = OnceLock::new(); + IS_SYSTEMD_USED.get_or_init(|| Path::new("/run/systemd/system").exists()) +} + +#[cfg(feature = "systemd")] +pub async fn get_systemd_env() -> Result, zbus::Error> { let connection = Connection::session().await?; let systemd_manager = SystemdManagerProxy::new(&connection).await?; - systemd_manager.environment().await -} + let systemd_env = systemd_manager.environment().await?; -/// Get the systemd user manager environment variables. -pub async fn get_systemd_env() -> Vec<(String, String)> { - match load_systemd_env().await { - Ok(env) => { - env.iter() - // split into key value pairs - .filter_map(|var| var.split_once("=")) - .filter(|&(key, _value)| { - // Only update the envvar if unset - std::env::var_os(key).is_none() - // Blocklist of envvars that we shouldn't touch (taken from KDE) - && (!key.starts_with("XDG_") - || key == "XDG_DATA_DIRS" - || key == "XDG_CONFIG_DIRS") - && key != "DISPLAY" - && key != "XAUTHORITY" - && key != "WAYLAND_DISPLAY" - && key != "WAYLAND_SOCKET" - && key != "_" - && key != "SHELL" - && key != "SHLVL" - }) - .map(|(key, value)| (key.to_owned(), value.to_owned())) - .collect() - } - Err(err) => { - warn!("Failed to sync systemd environment {}.", err); - Vec::new() + let mut out: Vec = Vec::new(); + for i in systemd_env { + if let Some(b) = i.split_once("=") { + out.push(b.into()); } } + Ok(out) } +#[cfg(feature = "systemd")] /// Spawn a systemd scope unit with the given name and PIDs. pub async fn spawn_scope(mut command: String, pids: Vec) -> Result<(), zbus::Error> { let connection = Connection::session().await?;