Skip to content

Commit

Permalink
wip: begin package layer
Browse files Browse the repository at this point in the history
  • Loading branch information
cilki committed Jul 27, 2024
1 parent 72feb0a commit ff6b22a
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 167 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: build_artifacts
name: linux_artifacts
path: target/${{ matrix.target }}/debug/sandpolis

android:
Expand Down Expand Up @@ -66,12 +66,10 @@ jobs:
working-directory: sandpolis-client-mobile
run: |
x doctor
x build --arch arm64 --platform android --format apk
cd ..
tree -L 5 target
x build --release --arch arm64 --platform android --format apk
- uses: actions/upload-artifact@v4
with:
name: build_artifacts
name: android_artifacts
path: target/x/debug/android/*.apk

33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

93 changes: 0 additions & 93 deletions plugin/sandpolis-plugin-update/state.json

This file was deleted.

18 changes: 11 additions & 7 deletions sandpolis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ tokio = { version = "1.34.0", default-features = false, features = ["rt", "macro
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
uuid = { version = "1.10.0", features = ["v7", "serde"] }
dialoguer = { version = "0.11.0" }

# Server dependencies
axum-macros = { version = "0.4.1", optional = true }
axum-server = { version = "0.6.0", features = ["tls-rustls"], optional = true }
axum = { version = "0.7.4", optional = true }
rcgen = { version = "0.13.1", optional = true }

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

# Agent dependencies
sysinfo = { version = "0.30.13", optional = true }
dialoguer = { version = "0.11.0", optional = true }

[features]
server = [ "dep:axum", "dep:axum-server", "dep:axum-macros", "local-database" ]
agent = [ "dep:sysinfo", "dep:dialoguer" ]
server = [ "dep:axum", "dep:axum-server", "dep:axum-macros", "dep:rcgen", "local-database" ]
agent = [ "dep:sysinfo" ]
probe = [ "agent" ]
client = [ "dep:bevy", "dep:bevy_rapier2d", "dep:bevy_egui", "dep:egui" ]

# Layers
layer-account = []
layer-alerts = []
layer-desktop = []
layer-filesystem = []
layer-shell = []
layer-health = []
layer-inventory = []
layer-account = []
layer-logging = []
layer-meta = []
layer-packages = []
layer-shell = []

default = [ "local-database", "layer-desktop", "layer-filesystem", "layer-shell", "layer-inventory", "layer-account", "layer-logging", "layer-meta" ]
default = [ "local-database", "layer-desktop", "layer-filesystem", "layer-shell", "layer-inventory", "layer-account", "layer-logging" ]
local-database = []
wayland = [ "bevy/wayland" ]
rcgen = ["dep:rcgen"]
Empty file.
File renamed without changes.
24 changes: 0 additions & 24 deletions sandpolis/src/api/layer/update.rs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions sandpolis/src/core/layer/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod package;
76 changes: 76 additions & 0 deletions sandpolis/src/core/layer/package.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// message RQ_InstallOrUpgradePackages {
// repeated string package = 1;
// }

// message RQ_RemovePackages {
// repeated string package = 1;
// }

// message RQ_RefreshPackages {
// }

pub enum PackageManager {
Pacman,
Apt,
Nix,
}

#[derive(CouchDocument)]
pub struct Package {
/// Canonical name/identifier
pub name: String,

/// Package version string
pub version: String,

/// Type of package manager that manages this package
pub manager: PackageManager,

/// Textual description of the package
pub description: Option<String>,

/// Latest available version of the package that can be installed
pub latest_available: Option<String>,

/// Latest version of the upstream package
pub latest_upstream: Option<String>,

/// System architecture type
pub architecture: Option<String>,

/// Package size in bytes as an archive
pub package_size: Option<u64>,

/// Package size when extracted and installed
pub installed_size: Option<u64>,

/// Package homepage URL
pub upstream_url: Option<String>,

/// URL to download the package
pub remote_location: Option<String>,

/// Remote repository URL
pub repository: Option<String>,

/// File contents of the package
pub files: Option<Vec<String>>,

/// Whether the package was explicitly installed or installed as a dependency of another package
pub explicit: Option<bool>,

/// Licenses under which the package is distributed
pub licenses: Option<Vec<String>>,

/// Other packages that this package requires
pub dependencies: Option<Vec<String>>,

/// Other packages that require this package
pub usages: Option<Vec<String>>,

/// Epoch timestamp when the package was built
pub build_time: Option<u64>,

/// Epoch timestamp when the package was most recently installed
pub install_time: Option<u64>,
}
Loading

0 comments on commit ff6b22a

Please sign in to comment.