Skip to content

Commit ff6b22a

Browse files
committed
wip: begin package layer
1 parent 72feb0a commit ff6b22a

File tree

15 files changed

+150
-167
lines changed

15 files changed

+150
-167
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- uses: actions/upload-artifact@v4
3737
with:
38-
name: build_artifacts
38+
name: linux_artifacts
3939
path: target/${{ matrix.target }}/debug/sandpolis
4040

4141
android:
@@ -66,12 +66,10 @@ jobs:
6666
working-directory: sandpolis-client-mobile
6767
run: |
6868
x doctor
69-
x build --arch arm64 --platform android --format apk
70-
cd ..
71-
tree -L 5 target
69+
x build --release --arch arm64 --platform android --format apk
7270
7371
- uses: actions/upload-artifact@v4
7472
with:
75-
name: build_artifacts
73+
name: android_artifacts
7674
path: target/x/debug/android/*.apk
7775

Cargo.lock

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/sandpolis-plugin-update/agent/src/main/java/org/s7s/plugin/update/agent/java/UpdateExe.java

Lines changed: 0 additions & 30 deletions
This file was deleted.

plugin/sandpolis-plugin-update/state.json

Lines changed: 0 additions & 93 deletions
This file was deleted.

sandpolis/Cargo.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ tokio = { version = "1.34.0", default-features = false, features = ["rt", "macro
2626
tracing = "0.1.40"
2727
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
2828
uuid = { version = "1.10.0", features = ["v7", "serde"] }
29+
dialoguer = { version = "0.11.0" }
2930

3031
# Server dependencies
3132
axum-macros = { version = "0.4.1", optional = true }
3233
axum-server = { version = "0.6.0", features = ["tls-rustls"], optional = true }
3334
axum = { version = "0.7.4", optional = true }
35+
rcgen = { version = "0.13.1", optional = true }
3436

3537
# Client dependencies
3638
bevy = { version = "0.14.0", optional = true }
@@ -40,23 +42,25 @@ egui = { version = "0.28", optional = true }
4042

4143
# Agent dependencies
4244
sysinfo = { version = "0.30.13", optional = true }
43-
dialoguer = { version = "0.11.0", optional = true }
4445

4546
[features]
46-
server = [ "dep:axum", "dep:axum-server", "dep:axum-macros", "local-database" ]
47-
agent = [ "dep:sysinfo", "dep:dialoguer" ]
47+
server = [ "dep:axum", "dep:axum-server", "dep:axum-macros", "dep:rcgen", "local-database" ]
48+
agent = [ "dep:sysinfo" ]
4849
probe = [ "agent" ]
4950
client = [ "dep:bevy", "dep:bevy_rapier2d", "dep:bevy_egui", "dep:egui" ]
5051

5152
# Layers
53+
layer-account = []
54+
layer-alerts = []
5255
layer-desktop = []
5356
layer-filesystem = []
54-
layer-shell = []
57+
layer-health = []
5558
layer-inventory = []
56-
layer-account = []
5759
layer-logging = []
58-
layer-meta = []
60+
layer-packages = []
61+
layer-shell = []
5962

60-
default = [ "local-database", "layer-desktop", "layer-filesystem", "layer-shell", "layer-inventory", "layer-account", "layer-logging", "layer-meta" ]
63+
default = [ "local-database", "layer-desktop", "layer-filesystem", "layer-shell", "layer-inventory", "layer-account", "layer-logging" ]
6164
local-database = []
6265
wayland = [ "bevy/wayland" ]
66+
rcgen = ["dep:rcgen"]

sandpolis/src/agent/layer/package/mod.rs

Whitespace-only changes.

sandpolis/src/api/layer/update.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

sandpolis/src/core/layer/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod package;

sandpolis/src/core/layer/package.rs

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// message RQ_InstallOrUpgradePackages {
2+
// repeated string package = 1;
3+
// }
4+
5+
// message RQ_RemovePackages {
6+
// repeated string package = 1;
7+
// }
8+
9+
// message RQ_RefreshPackages {
10+
// }
11+
12+
pub enum PackageManager {
13+
Pacman,
14+
Apt,
15+
Nix,
16+
}
17+
18+
#[derive(CouchDocument)]
19+
pub struct Package {
20+
/// Canonical name/identifier
21+
pub name: String,
22+
23+
/// Package version string
24+
pub version: String,
25+
26+
/// Type of package manager that manages this package
27+
pub manager: PackageManager,
28+
29+
/// Textual description of the package
30+
pub description: Option<String>,
31+
32+
/// Latest available version of the package that can be installed
33+
pub latest_available: Option<String>,
34+
35+
/// Latest version of the upstream package
36+
pub latest_upstream: Option<String>,
37+
38+
/// System architecture type
39+
pub architecture: Option<String>,
40+
41+
/// Package size in bytes as an archive
42+
pub package_size: Option<u64>,
43+
44+
/// Package size when extracted and installed
45+
pub installed_size: Option<u64>,
46+
47+
/// Package homepage URL
48+
pub upstream_url: Option<String>,
49+
50+
/// URL to download the package
51+
pub remote_location: Option<String>,
52+
53+
/// Remote repository URL
54+
pub repository: Option<String>,
55+
56+
/// File contents of the package
57+
pub files: Option<Vec<String>>,
58+
59+
/// Whether the package was explicitly installed or installed as a dependency of another package
60+
pub explicit: Option<bool>,
61+
62+
/// Licenses under which the package is distributed
63+
pub licenses: Option<Vec<String>>,
64+
65+
/// Other packages that this package requires
66+
pub dependencies: Option<Vec<String>>,
67+
68+
/// Other packages that require this package
69+
pub usages: Option<Vec<String>>,
70+
71+
/// Epoch timestamp when the package was built
72+
pub build_time: Option<u64>,
73+
74+
/// Epoch timestamp when the package was most recently installed
75+
pub install_time: Option<u64>,
76+
}

0 commit comments

Comments
 (0)