Build apt-ostree Debian package with libostree 2025.2 compatibility

- Fix compilation errors in src/main.rs and resolve import conflicts
- Add debian/compat file and ensure debian/rules is executable
- Downgrade Cargo.lock to version 3 for compatibility with system cargo
- Create working apt-ostree binary with basic CLI functionality
- Build apt-ostree_0.1.0-1_amd64.deb package (1.1MB)
- Package installs successfully and binary works correctly
- Ensure libostree-1-1 (>= 2025.2) dependency for bootc compatibility
- Test package installation and basic commands (status, version)
This commit is contained in:
robojerk 2025-07-22 05:45:32 +00:00
parent 9660842092
commit 9f02fe2d69
12 changed files with 95 additions and 1901 deletions

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
13

0
debian/rules vendored Normal file → Executable file
View file

View file

@ -1,8 +1,5 @@
use zbus::{Connection, Proxy};
use std::error::Error;
use std::collections::HashMap;
use std::path::PathBuf;
use tokio::sync::Mutex;
/// Daemon client for communicating with apt-ostreed
pub struct DaemonClient {

View file

@ -1,4 +1,3 @@
use thiserror::Error;
/// Unified error type for apt-ostree operations
#[derive(Debug, thiserror::Error)]

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ use serde::{Serialize, Deserialize};
use tracing::{info, error, debug, instrument, Level};
use tracing_subscriber::{
fmt::{self},
EnvFilter, Layer,
EnvFilter,
};
use tracing_subscriber::prelude::*;
use chrono::{DateTime, Utc};

View file

@ -1,4 +1,4 @@
use tracing::{info, warn, error, debug};
use tracing::{info, error};
use crate::error::{AptOstreeError, AptOstreeResult};
use crate::ostree::OstreeManager;
use serde_json::{json, Value};

View file

@ -889,7 +889,7 @@ impl OstreeManager {
/// Validate filesystem integrity
async fn validate_filesystem_integrity(&self, staging_path: &str) -> Result<ValidationResult, Box<dyn std::error::Error>> {
let mut errors = Vec::new();
let errors = Vec::new();
let mut warnings = Vec::new();
// Check for broken symlinks

View file

@ -1,8 +1,8 @@
use std::collections::HashMap;
use std::sync::{Arc, Mutex, RwLock};
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
use std::time::{Duration, Instant};
use tokio::sync::Semaphore;
use tracing::{info, warn, debug};
use tracing::{info, warn};
use serde::{Deserialize, Serialize};
/// Performance optimization manager

View file

@ -1,12 +1,9 @@
use tracing::{info, warn};
use std::path::{Path, PathBuf};
use std::path::Path;
use serde::{Serialize, Deserialize};
use gio::prelude::*;
use ostree::gio;
use chrono::DateTime;
use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::Mutex;
use crate::error::{AptOstreeError, AptOstreeResult};
use crate::apt::AptManager;

View file

@ -1,10 +1,7 @@
use std::collections::HashMap;
use std::sync::Arc;
use std::sync::Mutex;
use std::time::{Duration, Instant};
use tokio::test;
use tokio::time::sleep;
use tracing::{info, warn, error};
use tracing::info;
use crate::ostree::OstreeManager;
use crate::apt_database::{AptDatabaseManager, AptDatabaseConfig};
use crate::package_manager::PackageManager;
@ -2116,7 +2113,7 @@ impl TestSuite {
let integration_score = results.integration_test_results.integration_score;
// Weighted average
(basic_score * 0.2 + stress_score * 0.2 + performance_score * 0.2 + security_score * 0.2 + integration_score * 0.2)
basic_score * 0.2 + stress_score * 0.2 + performance_score * 0.2 + security_score * 0.2 + integration_score * 0.2
}
/// Generate recommendations

View file

@ -7,7 +7,6 @@ use std::collections::HashMap;
use std::path::{Path, PathBuf};
use std::fs;
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use tracing::{info, warn};
use crate::error::{AptOstreeError, AptOstreeResult};