switch-to-configuration: bump deps and add more logging (#422798)

authored by

Jared Baur and committed by
GitHub
ae1f7093 9cd5f467

+279 -165
+3 -1
nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md
··· 46 46 47 47 By default, some units are filtered from the outputs to make it less spammy. 48 48 This can be disabled for development or testing by setting the environment variable 49 - `STC_DISPLAY_ALL_UNITS=1` 49 + `STC_DISPLAY_ALL_UNITS=1`. 50 + 51 + More detailed output can be displayed by setting `STC_DEBUG=1`. 50 52 51 53 Most of these actions are either self-explaining but some of them have to do 52 54 with our units or the activation script. For this reason, these topics are
+1 -4
pkgs/by-name/sw/switch-to-configuration-ng/package.nix
··· 13 13 14 14 src = ./src; 15 15 16 - cargoLock = { 17 - lockFile = ./src/Cargo.lock; 18 - outputHashes."rust-ini-0.21.1" = "sha256-0nSBhme/g+mVsYdiq0Ash0ek9WEdvbf/b9FRxA7sauk="; 19 - }; 16 + cargoLock.lockFile = ./src/Cargo.lock; 20 17 21 18 nativeBuildInputs = [ pkg-config ]; 22 19 buildInputs = [ dbus ];
+229 -148
pkgs/by-name/sw/switch-to-configuration-ng/src/Cargo.lock
··· 1 1 # This file is automatically @generated by Cargo. 2 2 # It is not intended for manual editing. 3 - version = 3 3 + version = 4 4 4 5 5 [[package]] 6 6 name = "aho-corasick" ··· 12 12 ] 13 13 14 14 [[package]] 15 - name = "ansi_term" 16 - version = "0.12.1" 15 + name = "anstream" 16 + version = "0.6.19" 17 17 source = "registry+https://github.com/rust-lang/crates.io-index" 18 - checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 18 + checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" 19 19 dependencies = [ 20 - "winapi", 20 + "anstyle", 21 + "anstyle-parse", 22 + "anstyle-query", 23 + "anstyle-wincon", 24 + "colorchoice", 25 + "is_terminal_polyfill", 26 + "utf8parse", 21 27 ] 22 28 23 29 [[package]] 24 - name = "anyhow" 25 - version = "1.0.86" 30 + name = "anstyle" 31 + version = "1.0.11" 26 32 source = "registry+https://github.com/rust-lang/crates.io-index" 27 - checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" 33 + checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" 28 34 29 35 [[package]] 30 - name = "atty" 31 - version = "0.2.14" 36 + name = "anstyle-parse" 37 + version = "0.2.7" 32 38 source = "registry+https://github.com/rust-lang/crates.io-index" 33 - checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 39 + checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" 34 40 dependencies = [ 35 - "hermit-abi", 36 - "libc", 37 - "winapi", 41 + "utf8parse", 42 + ] 43 + 44 + [[package]] 45 + name = "anstyle-query" 46 + version = "1.1.3" 47 + source = "registry+https://github.com/rust-lang/crates.io-index" 48 + checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" 49 + dependencies = [ 50 + "windows-sys", 51 + ] 52 + 53 + [[package]] 54 + name = "anstyle-wincon" 55 + version = "3.0.9" 56 + source = "registry+https://github.com/rust-lang/crates.io-index" 57 + checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" 58 + dependencies = [ 59 + "anstyle", 60 + "once_cell_polyfill", 61 + "windows-sys", 38 62 ] 39 63 40 64 [[package]] 41 - name = "bitflags" 42 - version = "1.3.2" 65 + name = "anyhow" 66 + version = "1.0.98" 43 67 source = "registry+https://github.com/rust-lang/crates.io-index" 44 - checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 68 + checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" 45 69 46 70 [[package]] 47 71 name = "bitflags" 48 - version = "2.5.0" 72 + version = "2.9.1" 49 73 source = "registry+https://github.com/rust-lang/crates.io-index" 50 - checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 74 + checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" 51 75 52 76 [[package]] 53 77 name = "cfg-if" 54 - version = "1.0.0" 78 + version = "1.0.1" 55 79 source = "registry+https://github.com/rust-lang/crates.io-index" 56 - checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 80 + checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" 57 81 58 82 [[package]] 59 83 name = "cfg_aliases" 60 - version = "0.1.1" 84 + version = "0.2.1" 61 85 source = "registry+https://github.com/rust-lang/crates.io-index" 62 - checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 86 + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 63 87 64 88 [[package]] 65 89 name = "clap" 66 - version = "2.34.0" 90 + version = "4.5.41" 91 + source = "registry+https://github.com/rust-lang/crates.io-index" 92 + checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9" 93 + dependencies = [ 94 + "clap_builder", 95 + ] 96 + 97 + [[package]] 98 + name = "clap_builder" 99 + version = "4.5.41" 67 100 source = "registry+https://github.com/rust-lang/crates.io-index" 68 - checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 101 + checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d" 69 102 dependencies = [ 70 - "ansi_term", 71 - "atty", 72 - "bitflags 1.3.2", 103 + "anstream", 104 + "anstyle", 105 + "clap_lex", 73 106 "strsim", 74 - "textwrap", 75 - "unicode-width", 76 - "vec_map", 77 107 ] 78 108 79 109 [[package]] 110 + name = "clap_lex" 111 + version = "0.7.5" 112 + source = "registry+https://github.com/rust-lang/crates.io-index" 113 + checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" 114 + 115 + [[package]] 116 + name = "colorchoice" 117 + version = "1.0.4" 118 + source = "registry+https://github.com/rust-lang/crates.io-index" 119 + checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" 120 + 121 + [[package]] 80 122 name = "const-random" 81 123 version = "0.1.18" 82 124 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 98 140 99 141 [[package]] 100 142 name = "crunchy" 101 - version = "0.2.2" 143 + version = "0.2.4" 102 144 source = "registry+https://github.com/rust-lang/crates.io-index" 103 - checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 145 + checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" 104 146 105 147 [[package]] 106 148 name = "dbus" ··· 115 157 116 158 [[package]] 117 159 name = "dbus-codegen" 118 - version = "0.11.0" 160 + version = "0.12.0" 119 161 source = "registry+https://github.com/rust-lang/crates.io-index" 120 - checksum = "bcd91775d91fc83c7d526aa7c08078bac0b30f382706689901ac819fe6ddc812" 162 + checksum = "cf7b8c78e020d2eb0bb7ad986a86c5e5477d66d3cb13ea23a0faf896dd72a1db" 121 163 dependencies = [ 122 164 "clap", 123 165 "dbus", ··· 126 168 127 169 [[package]] 128 170 name = "deranged" 129 - version = "0.3.11" 171 + version = "0.4.0" 130 172 source = "registry+https://github.com/rust-lang/crates.io-index" 131 - checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 173 + checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" 132 174 dependencies = [ 133 175 "powerfmt", 134 176 ] ··· 143 185 ] 144 186 145 187 [[package]] 146 - name = "error-chain" 147 - version = "0.12.4" 148 - source = "registry+https://github.com/rust-lang/crates.io-index" 149 - checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" 150 - dependencies = [ 151 - "version_check", 152 - ] 153 - 154 - [[package]] 155 188 name = "getrandom" 156 - version = "0.2.15" 189 + version = "0.2.16" 157 190 source = "registry+https://github.com/rust-lang/crates.io-index" 158 - checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 191 + checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 159 192 dependencies = [ 160 193 "cfg-if", 161 194 "libc", ··· 164 197 165 198 [[package]] 166 199 name = "glob" 167 - version = "0.3.1" 200 + version = "0.3.2" 168 201 source = "registry+https://github.com/rust-lang/crates.io-index" 169 - checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 202 + checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 170 203 171 204 [[package]] 172 205 name = "hashbrown" ··· 175 208 checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 176 209 177 210 [[package]] 178 - name = "hermit-abi" 179 - version = "0.1.19" 211 + name = "hostname" 212 + version = "0.4.1" 180 213 source = "registry+https://github.com/rust-lang/crates.io-index" 181 - checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 214 + checksum = "a56f203cd1c76362b69e3863fd987520ac36cf70a8c92627449b2f64a8cf7d65" 182 215 dependencies = [ 216 + "cfg-if", 183 217 "libc", 218 + "windows-link", 184 219 ] 185 220 186 221 [[package]] 187 - name = "hostname" 188 - version = "0.3.1" 222 + name = "is_terminal_polyfill" 223 + version = "1.70.1" 189 224 source = "registry+https://github.com/rust-lang/crates.io-index" 190 - checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" 191 - dependencies = [ 192 - "libc", 193 - "match_cfg", 194 - "winapi", 195 - ] 225 + checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 196 226 197 227 [[package]] 198 228 name = "itoa" 199 - version = "1.0.11" 229 + version = "1.0.15" 200 230 source = "registry+https://github.com/rust-lang/crates.io-index" 201 - checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 231 + checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 202 232 203 233 [[package]] 204 234 name = "libc" 205 - version = "0.2.155" 235 + version = "0.2.174" 206 236 source = "registry+https://github.com/rust-lang/crates.io-index" 207 - checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 237 + checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" 208 238 209 239 [[package]] 210 240 name = "libdbus-sys" ··· 217 247 218 248 [[package]] 219 249 name = "log" 220 - version = "0.4.21" 250 + version = "0.4.27" 221 251 source = "registry+https://github.com/rust-lang/crates.io-index" 222 - checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 223 - 224 - [[package]] 225 - name = "match_cfg" 226 - version = "0.1.0" 227 - source = "registry+https://github.com/rust-lang/crates.io-index" 228 - checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" 252 + checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 229 253 230 254 [[package]] 231 255 name = "memchr" 232 - version = "2.7.4" 256 + version = "2.7.5" 233 257 source = "registry+https://github.com/rust-lang/crates.io-index" 234 - checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 258 + checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" 235 259 236 260 [[package]] 237 261 name = "nix" 238 - version = "0.28.0" 262 + version = "0.30.1" 239 263 source = "registry+https://github.com/rust-lang/crates.io-index" 240 - checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" 264 + checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" 241 265 dependencies = [ 242 - "bitflags 2.5.0", 266 + "bitflags", 243 267 "cfg-if", 244 268 "cfg_aliases", 245 269 "libc", ··· 262 286 263 287 [[package]] 264 288 name = "once_cell" 265 - version = "1.19.0" 289 + version = "1.21.3" 290 + source = "registry+https://github.com/rust-lang/crates.io-index" 291 + checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 292 + 293 + [[package]] 294 + name = "once_cell_polyfill" 295 + version = "1.70.1" 266 296 source = "registry+https://github.com/rust-lang/crates.io-index" 267 - checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 297 + checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" 268 298 269 299 [[package]] 270 300 name = "ordered-multimap" ··· 278 308 279 309 [[package]] 280 310 name = "pkg-config" 281 - version = "0.3.30" 311 + version = "0.3.32" 282 312 source = "registry+https://github.com/rust-lang/crates.io-index" 283 - checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 313 + checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 284 314 285 315 [[package]] 286 316 name = "powerfmt" ··· 290 320 291 321 [[package]] 292 322 name = "proc-macro2" 293 - version = "1.0.86" 323 + version = "1.0.95" 294 324 source = "registry+https://github.com/rust-lang/crates.io-index" 295 - checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" 325 + checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 296 326 dependencies = [ 297 327 "unicode-ident", 298 328 ] 299 329 300 330 [[package]] 301 331 name = "quote" 302 - version = "1.0.36" 332 + version = "1.0.40" 303 333 source = "registry+https://github.com/rust-lang/crates.io-index" 304 - checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 334 + checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 305 335 dependencies = [ 306 336 "proc-macro2", 307 337 ] 308 338 309 339 [[package]] 310 340 name = "regex" 311 - version = "1.10.5" 341 + version = "1.11.1" 312 342 source = "registry+https://github.com/rust-lang/crates.io-index" 313 - checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" 343 + checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 314 344 dependencies = [ 315 345 "aho-corasick", 316 346 "memchr", ··· 320 350 321 351 [[package]] 322 352 name = "regex-automata" 323 - version = "0.4.7" 353 + version = "0.4.9" 324 354 source = "registry+https://github.com/rust-lang/crates.io-index" 325 - checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" 355 + checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 326 356 dependencies = [ 327 357 "aho-corasick", 328 358 "memchr", ··· 331 361 332 362 [[package]] 333 363 name = "regex-syntax" 334 - version = "0.8.4" 364 + version = "0.8.5" 335 365 source = "registry+https://github.com/rust-lang/crates.io-index" 336 - checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 366 + checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 337 367 338 368 [[package]] 339 369 name = "rust-ini" 340 - version = "0.21.1" 341 - source = "git+https://github.com/zonyitoo/rust-ini?rev=5748ae57a178216a920b88dfac1296618e967447#5748ae57a178216a920b88dfac1296618e967447" 370 + version = "0.21.2" 371 + source = "registry+https://github.com/rust-lang/crates.io-index" 372 + checksum = "e7295b7ce3bf4806b419dc3420745998b447178b7005e2011947b38fc5aa6791" 342 373 dependencies = [ 343 374 "cfg-if", 344 375 "ordered-multimap", 345 - "trim-in-place", 346 376 ] 347 377 348 378 [[package]] 349 379 name = "serde" 350 - version = "1.0.203" 380 + version = "1.0.219" 351 381 source = "registry+https://github.com/rust-lang/crates.io-index" 352 - checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" 382 + checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 353 383 dependencies = [ 354 384 "serde_derive", 355 385 ] 356 386 357 387 [[package]] 358 388 name = "serde_derive" 359 - version = "1.0.203" 389 + version = "1.0.219" 360 390 source = "registry+https://github.com/rust-lang/crates.io-index" 361 - checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" 391 + checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 362 392 dependencies = [ 363 393 "proc-macro2", 364 394 "quote", ··· 367 397 368 398 [[package]] 369 399 name = "strsim" 370 - version = "0.8.0" 400 + version = "0.11.1" 371 401 source = "registry+https://github.com/rust-lang/crates.io-index" 372 - checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 402 + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 373 403 374 404 [[package]] 375 405 name = "switch-to-configuration" ··· 388 418 389 419 [[package]] 390 420 name = "syn" 391 - version = "2.0.67" 421 + version = "2.0.104" 392 422 source = "registry+https://github.com/rust-lang/crates.io-index" 393 - checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90" 423 + checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" 394 424 dependencies = [ 395 425 "proc-macro2", 396 426 "quote", ··· 399 429 400 430 [[package]] 401 431 name = "syslog" 402 - version = "6.1.1" 432 + version = "7.0.0" 403 433 source = "registry+https://github.com/rust-lang/crates.io-index" 404 - checksum = "dfc7e95b5b795122fafe6519e27629b5ab4232c73ebb2428f568e82b1a457ad3" 434 + checksum = "019f1500a13379b7d051455df397c75770de6311a7a188a699499502704d9f10" 405 435 dependencies = [ 406 - "error-chain", 407 436 "hostname", 408 437 "libc", 409 438 "log", ··· 411 440 ] 412 441 413 442 [[package]] 414 - name = "textwrap" 415 - version = "0.11.0" 416 - source = "registry+https://github.com/rust-lang/crates.io-index" 417 - checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 418 - dependencies = [ 419 - "unicode-width", 420 - ] 421 - 422 - [[package]] 423 443 name = "time" 424 - version = "0.3.36" 444 + version = "0.3.41" 425 445 source = "registry+https://github.com/rust-lang/crates.io-index" 426 - checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" 446 + checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" 427 447 dependencies = [ 428 448 "deranged", 429 449 "itoa", ··· 438 458 439 459 [[package]] 440 460 name = "time-core" 441 - version = "0.1.2" 461 + version = "0.1.4" 442 462 source = "registry+https://github.com/rust-lang/crates.io-index" 443 - checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 463 + checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" 444 464 445 465 [[package]] 446 466 name = "time-macros" 447 - version = "0.2.18" 467 + version = "0.2.22" 448 468 source = "registry+https://github.com/rust-lang/crates.io-index" 449 - checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" 469 + checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" 450 470 dependencies = [ 451 471 "num-conv", 452 472 "time-core", ··· 462 482 ] 463 483 464 484 [[package]] 465 - name = "trim-in-place" 466 - version = "0.1.7" 467 - source = "registry+https://github.com/rust-lang/crates.io-index" 468 - checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" 469 - 470 - [[package]] 471 485 name = "unicode-ident" 472 - version = "1.0.12" 486 + version = "1.0.18" 473 487 source = "registry+https://github.com/rust-lang/crates.io-index" 474 - checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 475 - 476 - [[package]] 477 - name = "unicode-width" 478 - version = "0.1.13" 479 - source = "registry+https://github.com/rust-lang/crates.io-index" 480 - checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" 481 - 482 - [[package]] 483 - name = "vec_map" 484 - version = "0.8.2" 485 - source = "registry+https://github.com/rust-lang/crates.io-index" 486 - checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 488 + checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 487 489 488 490 [[package]] 489 - name = "version_check" 490 - version = "0.9.4" 491 + name = "utf8parse" 492 + version = "0.2.2" 491 493 source = "registry+https://github.com/rust-lang/crates.io-index" 492 - checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 494 + checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 493 495 494 496 [[package]] 495 497 name = "wasi" 496 - version = "0.11.0+wasi-snapshot-preview1" 498 + version = "0.11.1+wasi-snapshot-preview1" 497 499 source = "registry+https://github.com/rust-lang/crates.io-index" 498 - checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 500 + checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 499 501 500 502 [[package]] 501 503 name = "winapi" ··· 520 522 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 521 523 522 524 [[package]] 525 + name = "windows-link" 526 + version = "0.1.3" 527 + source = "registry+https://github.com/rust-lang/crates.io-index" 528 + checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" 529 + 530 + [[package]] 531 + name = "windows-sys" 532 + version = "0.59.0" 533 + source = "registry+https://github.com/rust-lang/crates.io-index" 534 + checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 535 + dependencies = [ 536 + "windows-targets", 537 + ] 538 + 539 + [[package]] 540 + name = "windows-targets" 541 + version = "0.52.6" 542 + source = "registry+https://github.com/rust-lang/crates.io-index" 543 + checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 544 + dependencies = [ 545 + "windows_aarch64_gnullvm", 546 + "windows_aarch64_msvc", 547 + "windows_i686_gnu", 548 + "windows_i686_gnullvm", 549 + "windows_i686_msvc", 550 + "windows_x86_64_gnu", 551 + "windows_x86_64_gnullvm", 552 + "windows_x86_64_msvc", 553 + ] 554 + 555 + [[package]] 556 + name = "windows_aarch64_gnullvm" 557 + version = "0.52.6" 558 + source = "registry+https://github.com/rust-lang/crates.io-index" 559 + checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 560 + 561 + [[package]] 562 + name = "windows_aarch64_msvc" 563 + version = "0.52.6" 564 + source = "registry+https://github.com/rust-lang/crates.io-index" 565 + checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 566 + 567 + [[package]] 568 + name = "windows_i686_gnu" 569 + version = "0.52.6" 570 + source = "registry+https://github.com/rust-lang/crates.io-index" 571 + checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 572 + 573 + [[package]] 574 + name = "windows_i686_gnullvm" 575 + version = "0.52.6" 576 + source = "registry+https://github.com/rust-lang/crates.io-index" 577 + checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 578 + 579 + [[package]] 580 + name = "windows_i686_msvc" 581 + version = "0.52.6" 582 + source = "registry+https://github.com/rust-lang/crates.io-index" 583 + checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 584 + 585 + [[package]] 586 + name = "windows_x86_64_gnu" 587 + version = "0.52.6" 588 + source = "registry+https://github.com/rust-lang/crates.io-index" 589 + checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 590 + 591 + [[package]] 592 + name = "windows_x86_64_gnullvm" 593 + version = "0.52.6" 594 + source = "registry+https://github.com/rust-lang/crates.io-index" 595 + checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 596 + 597 + [[package]] 598 + name = "windows_x86_64_msvc" 599 + version = "0.52.6" 600 + source = "registry+https://github.com/rust-lang/crates.io-index" 601 + checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 602 + 603 + [[package]] 523 604 name = "xml-rs" 524 - version = "0.8.20" 605 + version = "0.8.27" 525 606 source = "registry+https://github.com/rust-lang/crates.io-index" 526 - checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" 607 + checksum = "6fd8403733700263c6eb89f192880191f1b83e332f7a20371ddcf421c4a337c7"
+4 -6
pkgs/by-name/sw/switch-to-configuration-ng/src/Cargo.toml
··· 10 10 dbus = "0.9.7" 11 11 glob = "0.3.1" 12 12 log = "0.4.21" 13 - nix = { version = "0.28.0", features = ["fs", "signal"] } 13 + nix = { version = "0.30.1", features = ["fs", "signal"] } 14 14 regex = "1.10.4" 15 - rust-ini = { git = "https://github.com/zonyitoo/rust-ini", rev = "5748ae57a178216a920b88dfac1296618e967447", features = [ 16 - "inline-comment", 17 - ] } 18 - syslog = "6.1.1" 15 + rust-ini = { version = "0.21.2", features = ["inline-comment"] } 16 + syslog = "7.0.0" 19 17 20 18 [build-dependencies] 21 - dbus-codegen = "0.11.0" 19 + dbus-codegen = "0.12.0"
+42 -6
pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs
··· 123 123 // Allow for this switch-to-configuration to remain consistent with the perl implementation. 124 124 // Perl's "die" uses errno to set the exit code: https://perldoc.perl.org/perlvar#%24%21 125 125 fn die() -> ! { 126 - std::process::exit(std::io::Error::last_os_error().raw_os_error().unwrap_or(1)); 126 + let code = match std::io::Error::last_os_error().raw_os_error().unwrap_or(1) { 127 + // Ensure that even if errno did not point to a helpful error code, we still have a 128 + // non-zero exit code 129 + 0 => 1, 130 + other => other, 131 + }; 132 + 133 + std::process::exit(code); 127 134 } 128 135 129 136 fn parse_os_release() -> Result<HashMap<String, String>> { ··· 259 266 &unit_file_content, 260 267 ParseOption { 261 268 enabled_quote: true, 269 + enabled_indented_mutiline_value: false, 270 + enabled_preserve_key_leading_whitespace: false, 262 271 // Allow for escaped characters that won't get interpreted by the INI parser. These 263 272 // often show up in systemd unit files device/mount/swap unit names (e.g. dev-disk-by\x2dlabel-root.device). 264 273 enabled_escape: false, ··· 907 916 submitted_jobs: &Rc<RefCell<HashMap<dbus::Path<'static>, Job>>>, 908 917 ) { 909 918 while !submitted_jobs.borrow().is_empty() { 919 + log::debug!( 920 + "waiting for submitted jobs to finish, still have {} job(s)", 921 + submitted_jobs.borrow().len() 922 + ); 910 923 _ = conn.process(Duration::from_millis(500)); 911 924 } 912 925 } ··· 959 972 .restart_unit("nixos-activation.service", "replace") 960 973 .context("Failed to restart nixos-activation.service")?; 961 974 975 + log::debug!("waiting for nixos activation to finish"); 962 976 while !*nixos_activation_done.borrow() { 963 977 _ = dbus_conn 964 978 .process(Duration::from_secs(500)) ··· 987 1001 988 1002 /// Performs switch-to-configuration functionality for the entire system 989 1003 fn do_system_switch(action: Action) -> anyhow::Result<()> { 1004 + log::debug!("Performing system switch"); 1005 + 990 1006 let out = PathBuf::from(required_env("OUT")?); 991 1007 let toplevel = PathBuf::from(required_env("TOPLEVEL")?); 992 1008 let distro_id = required_env("DISTRO_ID")?; ··· 994 1010 let install_bootloader = required_env("INSTALL_BOOTLOADER")?; 995 1011 let locale_archive = required_env("LOCALE_ARCHIVE")?; 996 1012 let new_systemd = PathBuf::from(required_env("SYSTEMD")?); 1013 + let log_level = if std::env::var("STC_DEBUG").is_ok() { 1014 + LevelFilter::Debug 1015 + } else { 1016 + LevelFilter::Info 1017 + }; 997 1018 998 1019 let action = ACTION.get_or_init(|| action); 1020 + log::debug!("Using action {:?}", action); 999 1021 1000 1022 // The action that is to be performed (like switch, boot, test, dry-activate) Also exposed via 1001 1023 // environment variable from now on ··· 1027 1049 std::fs::set_permissions("/run/nixos", perms) 1028 1050 .context("Failed to set permissions on /run/nixos directory")?; 1029 1051 1052 + log::debug!("Creating lock file /run/nixos/switch-to-configuration.lock"); 1030 1053 let Ok(lock) = std::fs::OpenOptions::new() 1031 1054 .append(true) 1032 1055 .create(true) ··· 1036 1059 die(); 1037 1060 }; 1038 1061 1062 + log::debug!("Acquiring lock on file /run/nixos/switch-to-configuration.lock"); 1039 1063 let Ok(_lock) = Flock::lock(lock, FlockArg::LockExclusiveNonblock) else { 1040 1064 eprintln!("Could not acquire lock"); 1041 1065 die(); 1042 1066 }; 1043 1067 1044 - if syslog::init(Facility::LOG_USER, LevelFilter::Debug, Some("nixos")).is_err() { 1068 + if syslog::init(Facility::LOG_USER, log_level, Some("nixos")).is_err() { 1045 1069 bail!("Failed to initialize logger"); 1046 1070 } 1047 1071 ··· 1051 1075 != "1" 1052 1076 { 1053 1077 do_pre_switch_check(&pre_switch_check, &toplevel, action)?; 1078 + log::debug!("Done performing pre-switch checks"); 1054 1079 } 1055 1080 1056 1081 if *action == Action::Check { ··· 1060 1085 // Install or update the bootloader. 1061 1086 if matches!(action, Action::Switch | Action::Boot) { 1062 1087 do_install_bootloader(&install_bootloader, &toplevel)?; 1088 + log::debug!("Done performing bootloader installation"); 1063 1089 } 1064 1090 1065 1091 // Just in case the new configuration hangs the system, do a sync now. ··· 1640 1666 eprintln!("restarting systemd..."); 1641 1667 _ = systemd.reexecute(); // we don't get a dbus reply here 1642 1668 1669 + log::debug!("waiting for systemd restart to finish"); 1643 1670 while !*systemd_reload_status.borrow() { 1644 1671 _ = dbus_conn 1645 1672 .process(Duration::from_millis(500)) ··· 1654 1681 1655 1682 // Make systemd reload its units. 1656 1683 _ = systemd.reload(); // we don't get a dbus reply here 1684 + log::debug!("waiting for systemd reload to finish"); 1657 1685 while !*systemd_reload_status.borrow() { 1658 1686 _ = dbus_conn 1659 1687 .process(Duration::from_millis(500)) ··· 1690 1718 .canonicalize() 1691 1719 .context("Failed to get full path to /proc/self/exe")?; 1692 1720 1721 + log::debug!("Performing user switch for {name}"); 1693 1722 std::process::Command::new(&myself) 1694 1723 .uid(uid) 1695 1724 .gid(gid) ··· 1865 1894 // 1866 1895 // Wait for events from systemd to settle. process() will return true if we have received any 1867 1896 // messages on the bus. 1868 - while dbus_conn 1869 - .process(Duration::from_millis(250)) 1870 - .unwrap_or_default() 1871 - {} 1897 + let mut waited = Duration::from_millis(0); 1898 + let wait_interval = Duration::from_millis(250); 1899 + let max_wait = Duration::from_secs(90); 1900 + log::debug!("waiting for systemd events to settle"); 1901 + while dbus_conn.process(wait_interval).unwrap_or_default() { 1902 + waited += wait_interval; 1903 + if waited >= max_wait { 1904 + log::debug!("timed out waiting systemd events to settle"); 1905 + break; 1906 + } 1907 + } 1872 1908 1873 1909 let new_active_units = get_active_units(&systemd)?; 1874 1910