git.delta.rocks / remowt / refs/commits / 7c2fb57d5b71

difftreelog

refactor more work on this project

nomswqonYaroslav Bolyukin2024-07-31parent: #a05ea00.patch.diff
in: trunk

24 files changed

modifiedCargo.lockdiffbeforeafterboth
26 "memchr",26 "memchr",
27]27]
28
29[[package]]
30name = "anstream"
31version = "0.6.15"
32source = "registry+https://github.com/rust-lang/crates.io-index"
33checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
34dependencies = [
35 "anstyle",
36 "anstyle-parse",
37 "anstyle-query",
38 "anstyle-wincon",
39 "colorchoice",
40 "is_terminal_polyfill",
41 "utf8parse",
42]
43
44[[package]]
45name = "anstyle"
46version = "1.0.8"
47source = "registry+https://github.com/rust-lang/crates.io-index"
48checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
49
50[[package]]
51name = "anstyle-parse"
52version = "0.2.5"
53source = "registry+https://github.com/rust-lang/crates.io-index"
54checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
55dependencies = [
56 "utf8parse",
57]
58
59[[package]]
60name = "anstyle-query"
61version = "1.1.1"
62source = "registry+https://github.com/rust-lang/crates.io-index"
63checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
64dependencies = [
65 "windows-sys",
66]
67
68[[package]]
69name = "anstyle-wincon"
70version = "3.0.4"
71source = "registry+https://github.com/rust-lang/crates.io-index"
72checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
73dependencies = [
74 "anstyle",
75 "windows-sys",
76]
2877
29[[package]]78[[package]]
30name = "anyhow"79name = "anyhow"
300 "libc",349 "libc",
301]350]
351
352[[package]]
353name = "clap"
354version = "4.5.11"
355source = "registry+https://github.com/rust-lang/crates.io-index"
356checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3"
357dependencies = [
358 "clap_builder",
359 "clap_derive",
360]
361
362[[package]]
363name = "clap_builder"
364version = "4.5.11"
365source = "registry+https://github.com/rust-lang/crates.io-index"
366checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa"
367dependencies = [
368 "anstream",
369 "anstyle",
370 "clap_lex",
371 "strsim",
372]
373
374[[package]]
375name = "clap_derive"
376version = "4.5.11"
377source = "registry+https://github.com/rust-lang/crates.io-index"
378checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e"
379dependencies = [
380 "heck",
381 "proc-macro2",
382 "quote",
383 "syn 2.0.72",
384]
385
386[[package]]
387name = "clap_lex"
388version = "0.7.2"
389source = "registry+https://github.com/rust-lang/crates.io-index"
390checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
391
392[[package]]
393name = "colorchoice"
394version = "1.0.2"
395source = "registry+https://github.com/rust-lang/crates.io-index"
396checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
302397
303[[package]]398[[package]]
304name = "concurrent-queue"399name = "concurrent-queue"
523source = "registry+https://github.com/rust-lang/crates.io-index"618source = "registry+https://github.com/rust-lang/crates.io-index"
524checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"619checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
620
621[[package]]
622name = "heck"
623version = "0.5.0"
624source = "registry+https://github.com/rust-lang/crates.io-index"
625checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
525626
526[[package]]627[[package]]
527name = "hermit-abi"628name = "hermit-abi"
551 "hashbrown",652 "hashbrown",
552]653]
654
655[[package]]
656name = "is_terminal_polyfill"
657version = "1.70.1"
658source = "registry+https://github.com/rust-lang/crates.io-index"
659checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
553660
554[[package]]661[[package]]
555name = "itertools"662name = "itertools"
590source = "registry+https://github.com/rust-lang/crates.io-index"697source = "registry+https://github.com/rust-lang/crates.io-index"
591checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"698checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
699
700[[package]]
701name = "log"
702version = "0.4.22"
703source = "registry+https://github.com/rust-lang/crates.io-index"
704checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
592705
593[[package]]706[[package]]
594name = "memchr"707name = "memchr"
655 "minimal-lexical",768 "minimal-lexical",
656]769]
770
771[[package]]
772name = "nu-ansi-term"
773version = "0.46.0"
774source = "registry+https://github.com/rust-lang/crates.io-index"
775checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
776dependencies = [
777 "overload",
778 "winapi",
779]
657780
658[[package]]781[[package]]
659name = "object"782name = "object"
680 "pin-project-lite",803 "pin-project-lite",
681]804]
805
806[[package]]
807name = "overload"
808version = "0.1.1"
809source = "registry+https://github.com/rust-lang/crates.io-index"
810checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
682811
683[[package]]812[[package]]
684name = "pam-client"813name = "pam-client"
733 "futures-io",862 "futures-io",
734]863]
864
865[[package]]
866name = "polkit-agent"
867version = "0.1.0"
868dependencies = [
869 "anyhow",
870 "pam-client",
871 "polkit-shared",
872 "rand",
873 "serde",
874 "tokio",
875 "tracing",
876 "tracing-subscriber",
877 "ui-prompt",
878 "uuid",
879 "zbus",
880 "zbus_polkit",
881]
882
883[[package]]
884name = "polkit-backend"
885version = "0.1.0"
886dependencies = [
887 "anyhow",
888 "clap",
889 "nix",
890 "pam-client",
891 "polkit-shared",
892 "tokio",
893 "tracing",
894 "tracing-subscriber",
895 "ui-prompt",
896 "zbus",
897 "zbus_polkit",
898]
899
900[[package]]
901name = "polkit-shared"
902version = "0.1.0"
903dependencies = [
904 "serde",
905 "zbus",
906]
735907
736[[package]]908[[package]]
737name = "polling"909name = "polling"
840source = "registry+https://github.com/rust-lang/crates.io-index"1012source = "registry+https://github.com/rust-lang/crates.io-index"
841checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"1013checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
842
843[[package]]
844name = "remowt"
845version = "0.1.0"
846dependencies = [
847 "anyhow",
848 "pam-client",
849 "serde",
850 "tokio",
851 "zbus",
852 "zbus_polkit",
853]
8541014
855[[package]]1015[[package]]
856name = "rpassword"1016name = "rpassword"
954 "digest",1114 "digest",
955]1115]
1116
1117[[package]]
1118name = "sharded-slab"
1119version = "0.1.7"
1120source = "registry+https://github.com/rust-lang/crates.io-index"
1121checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
1122dependencies = [
1123 "lazy_static",
1124]
9561125
957[[package]]1126[[package]]
958name = "shlex"1127name = "shlex"
978 "autocfg",1147 "autocfg",
979]1148]
1149
1150[[package]]
1151name = "smallvec"
1152version = "1.13.2"
1153source = "registry+https://github.com/rust-lang/crates.io-index"
1154checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
9801155
981[[package]]1156[[package]]
982name = "socket2"1157name = "socket2"
994source = "registry+https://github.com/rust-lang/crates.io-index"1169source = "registry+https://github.com/rust-lang/crates.io-index"
995checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"1170checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
1171
1172[[package]]
1173name = "strsim"
1174version = "0.11.1"
1175source = "registry+https://github.com/rust-lang/crates.io-index"
1176checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
9961177
997[[package]]1178[[package]]
998name = "syn"1179name = "syn"
1028 "windows-sys",1209 "windows-sys",
1029]1210]
1211
1212[[package]]
1213name = "thiserror"
1214version = "1.0.63"
1215source = "registry+https://github.com/rust-lang/crates.io-index"
1216checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
1217dependencies = [
1218 "thiserror-impl",
1219]
1220
1221[[package]]
1222name = "thiserror-impl"
1223version = "1.0.63"
1224source = "registry+https://github.com/rust-lang/crates.io-index"
1225checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
1226dependencies = [
1227 "proc-macro2",
1228 "quote",
1229 "syn 2.0.72",
1230]
1231
1232[[package]]
1233name = "thread_local"
1234version = "1.1.8"
1235source = "registry+https://github.com/rust-lang/crates.io-index"
1236checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
1237dependencies = [
1238 "cfg-if",
1239 "once_cell",
1240]
10301241
1031[[package]]1242[[package]]
1032name = "tokio"1243name = "tokio"
1103checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"1314checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
1104dependencies = [1315dependencies = [
1105 "once_cell",1316 "once_cell",
1317 "valuable",
1106]1318]
1319
1320[[package]]
1321name = "tracing-log"
1322version = "0.2.0"
1323source = "registry+https://github.com/rust-lang/crates.io-index"
1324checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
1325dependencies = [
1326 "log",
1327 "once_cell",
1328 "tracing-core",
1329]
1330
1331[[package]]
1332name = "tracing-subscriber"
1333version = "0.3.18"
1334source = "registry+https://github.com/rust-lang/crates.io-index"
1335checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
1336dependencies = [
1337 "nu-ansi-term",
1338 "sharded-slab",
1339 "smallvec",
1340 "thread_local",
1341 "tracing-core",
1342 "tracing-log",
1343]
11071344
1108[[package]]1345[[package]]
1109name = "typenum"1346name = "typenum"
1122 "winapi",1359 "winapi",
1123]1360]
1361
1362[[package]]
1363name = "ui-prompt"
1364version = "0.1.0"
1365dependencies = [
1366 "serde",
1367 "thiserror",
1368 "tokio",
1369 "tracing",
1370 "zbus",
1371]
11241372
1125[[package]]1373[[package]]
1126name = "unicode-ident"1374name = "unicode-ident"
1127version = "1.0.12"1375version = "1.0.12"
1128source = "registry+https://github.com/rust-lang/crates.io-index"1376source = "registry+https://github.com/rust-lang/crates.io-index"
1129checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"1377checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
1378
1379[[package]]
1380name = "utf8parse"
1381version = "0.2.2"
1382source = "registry+https://github.com/rust-lang/crates.io-index"
1383checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
1384
1385[[package]]
1386name = "uuid"
1387version = "1.10.0"
1388source = "registry+https://github.com/rust-lang/crates.io-index"
1389checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
1390dependencies = [
1391 "getrandom",
1392]
1393
1394[[package]]
1395name = "valuable"
1396version = "0.1.0"
1397source = "registry+https://github.com/rust-lang/crates.io-index"
1398checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
11301399
1131[[package]]1400[[package]]
1132name = "version_check"1401name = "version_check"
modifiedCargo.tomldiffbeforeafterboth
1[package]
2name = "remowt"
3version = "0.1.0"
4edition = "2021"
5
6[dependencies]1[workspace]
7anyhow = "1.0.86"
8pam-client = "0.5.0"
9serde = { version = "1.0.204", features = ["derive"] }
10tokio = { version = "1.39.2", features = ["rt-multi-thread", "fs", "macros"] }2members = ["cmds/*", "crates/*"]
11zbus = { version = "4.4.0", features = ["tokio"] }
12zbus_polkit = { version = "4.0.0", features = ["tokio"] }3resolver = "2"
134
addedcmds/polkit-agent/Cargo.tomldiffbeforeafterboth

no changes

addedcmds/polkit-agent/src/main.rsdiffbeforeafterboth

no changes

addedcmds/polkit-backend/Cargo.tomldiffbeforeafterboth

no changes

addedcmds/polkit-backend/etc/systemd/system/remowt-polkit-helper.servicediffbeforeafterboth

no changes

addedcmds/polkit-backend/share/dbus-1/system-services/lach.polkit.helper1.confdiffbeforeafterboth

no changes

addedcmds/polkit-backend/share/dbus-1/system.d/lach.polkit.helper1.confdiffbeforeafterboth

no changes

addedcmds/polkit-backend/src/main.rsdiffbeforeafterboth

no changes

deletedcmds/polkit-helper/Cargo.lockdiffbeforeafterboth

no changes

deletedcmds/polkit-helper/Cargo.tomldiffbeforeafterboth

no changes

deletedcmds/polkit-helper/src/main.rsdiffbeforeafterboth

no changes

addedcrates/polkit-shared/Cargo.tomldiffbeforeafterboth

no changes

addedcrates/polkit-shared/src/lib.rsdiffbeforeafterboth

no changes

addedcrates/ui-prompt/Cargo.tomldiffbeforeafterboth

no changes

addedcrates/ui-prompt/src/dbus.rsdiffbeforeafterboth

no changes

addedcrates/ui-prompt/src/lib.rsdiffbeforeafterboth

no changes

addedcrates/ui-prompt/src/rofi.rsdiffbeforeafterboth

no changes

modifiedflake.lockdiffbeforeafterboth
1{1{
2 "nodes": {2 "nodes": {
3 "crane": {
4 "inputs": {
5 "nixpkgs": [
6 "nixpkgs"
7 ]
8 },
9 "locked": {
10 "lastModified": 1721842668,
11 "narHash": "sha256-k3oiD2z2AAwBFLa4+xfU+7G5fisRXfkvrMTCJrjZzXo=",
12 "owner": "ipetkov",
13 "repo": "crane",
14 "rev": "529c1a0b1f29f0d78fa3086b8f6a134c71ef3aaf",
15 "type": "github"
16 },
17 "original": {
18 "owner": "ipetkov",
19 "repo": "crane",
20 "type": "github"
21 }
22 },
3 "flake-utils": {23 "flake-parts": {
4 "inputs": {24 "inputs": {
5 "systems": "systems"25 "nixpkgs-lib": [
26 "nixpkgs"
27 ]
6 },28 },
7 "locked": {29 "locked": {
8 "lastModified": 1710146030,30 "lastModified": 1719994518,
9 "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",31 "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
10 "owner": "numtide",32 "owner": "hercules-ci",
11 "repo": "flake-utils",33 "repo": "flake-parts",
12 "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",34 "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
13 "type": "github"35 "type": "github"
14 },36 },
15 "original": {37 "original": {
16 "owner": "numtide",38 "owner": "hercules-ci",
17 "repo": "flake-utils",39 "repo": "flake-parts",
18 "type": "github"40 "type": "github"
19 }41 }
20 },42 },
35 },57 },
36 "root": {58 "root": {
37 "inputs": {59 "inputs": {
60 "crane": "crane",
38 "flake-utils": "flake-utils",61 "flake-parts": "flake-parts",
39 "nixpkgs": "nixpkgs",62 "nixpkgs": "nixpkgs",
40 "rust-overlay": "rust-overlay"63 "rust-overlay": "rust-overlay",
64 "shelly": "shelly"
41 }65 }
42 },66 },
43 "rust-overlay": {67 "rust-overlay": {
60 "type": "github"84 "type": "github"
61 }85 }
62 },86 },
63 "systems": {87 "shelly": {
88 "inputs": {
89 "flake-parts": [
90 "flake-parts"
91 ],
92 "nixpkgs": [
93 "nixpkgs"
94 ]
95 },
64 "locked": {96 "locked": {
65 "lastModified": 1681028828,97 "lastModified": 1718420551,
66 "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",98 "narHash": "sha256-NU8NBXVPj0KuY4Tl/LtZPrbX3PmmmgPuhk/1pzm9cyk=",
67 "owner": "nix-systems",99 "owner": "CertainLach",
68 "repo": "default",100 "repo": "shelly",
69 "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",101 "rev": "4f70221f3f9ad9058f590eefb25251b6760aaa47",
70 "type": "github"102 "type": "github"
71 },103 },
72 "original": {104 "original": {
73 "owner": "nix-systems",105 "owner": "CertainLach",
74 "repo": "default",106 "repo": "shelly",
75 "type": "github"107 "type": "github"
76 }108 }
77 }109 }
modifiedflake.nixdiffbeforeafterboth
2 description = "Jrsonnet";2 description = "Jrsonnet";
3 inputs = {3 inputs = {
4 nixpkgs.url = "github:nixos/nixpkgs";4 nixpkgs.url = "github:nixos/nixpkgs";
5 flake-parts = {
5 flake-utils.url = "github:numtide/flake-utils";6 url = "github:hercules-ci/flake-parts";
7 inputs.nixpkgs-lib.follows = "nixpkgs";
8 };
6 rust-overlay = {9 rust-overlay = {
7 url = "github:oxalica/rust-overlay";10 url = "github:oxalica/rust-overlay";
8 inputs.nixpkgs.follows = "nixpkgs";11 inputs.nixpkgs.follows = "nixpkgs";
9 inputs.flake-utils.follows = "flake-utils";
10 };12 };
13 crane = {
14 url = "github:ipetkov/crane";
15 inputs.nixpkgs.follows = "nixpkgs";
16 };
17 shelly = {
18 url = "github:CertainLach/shelly";
19 inputs = {
20 flake-parts.follows = "flake-parts";
21 nixpkgs.follows = "nixpkgs";
22 };
23 };
11 };24 };
12 outputs = { nixpkgs, flake-utils, rust-overlay, ... }:25 outputs = inputs @ {
26 nixpkgs,
27 flake-parts,
28 rust-overlay,
29 crane,
30 ...
31 }:
13 flake-utils.lib.eachDefaultSystem (system:32 flake-parts.lib.mkFlake {inherit inputs;} {
33 imports = [inputs.shelly.flakeModule ./nix/nixos-modules.nix];
34 systems = nixpkgs.lib.systems.flakeExposed;
35 perSystem = {
36 config,
37 system,
38 pkgs,
39 ...
14 let40 }: let
41 rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
42 craneLib = (crane.mkLib pkgs).overrideToolchain rust;
43 in {
15 pkgs = import nixpkgs {44 _module.args.pkgs = import nixpkgs {
16 inherit system;45 inherit system;
17 overlays = [ rust-overlay.overlays.default ];46 overlays = [rust-overlay.overlays.default];
18 };47 };
19 rust = ((pkgs.rustChannelOf { date = "2024-07-26"; channel = "nightly"; }).default.override {48 packages.polkit-backend = pkgs.callPackage ./nix/polkit-backend.nix {
20 extensions = [ "rust-src" "miri" "rust-analyzer" ];49 inherit craneLib;
21 });50 };
22 in
23 rec {51 shelly.shells.default = {
24 devShell = pkgs.mkShell {52 factory = craneLib.devShell;
25 nativeBuildInputs = with pkgs;[53 packages = with pkgs; [
26 rust
27 cargo-edit54 cargo-edit
28 cargo-asm55 cargo-asm
29 cargo-outdated56 cargo-outdated
36 rustPlatform.bindgenHook63 rustPlatform.bindgenHook
37 pam64 pam
38 ];65 ];
39 };
40 }66 };
67 formatter = pkgs.alejandra;
68 };
41 );69 };
42}70}
4371
addednix/nixos-modules.nixdiffbeforeafterboth

no changes

addednix/polkit-backend.nixdiffbeforeafterboth

no changes

addedrust-toolchain.tomldiffbeforeafterboth

no changes

deletedsrc/main.rsdiffbeforeafterboth

no changes