initfs: Move archive-common package into initfs-tools

This commit is contained in:
bjorn3
2026-02-17 19:50:00 +01:00
parent 5c1f034a27
commit c611054bbd
11 changed files with 7 additions and 42 deletions
Generated
+1 -16
View File
@@ -163,17 +163,6 @@ version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
[[package]]
name = "archive-common"
version = "0.1.0"
dependencies = [
"anyhow",
"log",
"pathdiff",
"plain",
"redox-initfs",
]
[[package]]
name = "arrayvec"
version = "0.7.6"
@@ -1750,10 +1739,6 @@ dependencies = [
name = "redox-initfs"
version = "0.2.0"
dependencies = [
"anyhow",
"archive-common",
"env_logger",
"log",
"plain",
]
@@ -1762,10 +1747,10 @@ name = "redox-initfs-tools"
version = "0.2.0"
dependencies = [
"anyhow",
"archive-common",
"clap 4.5.58",
"env_logger",
"log",
"pathdiff",
"plain",
"redox-initfs",
"twox-hash",
-1
View File
@@ -5,7 +5,6 @@ members = [
"daemon",
"init",
"initfs",
"initfs/archive-common",
"initfs/tools",
"ipcd",
"logd",
-7
View File
@@ -14,10 +14,3 @@ plain = "0.2"
default = ["std"]
std = []
[dev-dependencies]
# FIXME remove loggers
anyhow.workspace = true
archive-common = {path = "archive-common"}
env_logger = "0.8"
log.workspace = true
-12
View File
@@ -1,12 +0,0 @@
[package]
name = "archive-common"
version = "0.1.0"
authors = ["4lDO2 <4lDO2@protonmail.com>", "Kamil Koczurek <koczurekk@gmail.com>"]
edition = "2021"
[dependencies]
anyhow.workspace = true
log.workspace = true
pathdiff = "0.2.1"
plain = "0.2"
redox-initfs = {path = ".."}
+1 -1
View File
@@ -21,8 +21,8 @@ anyhow.workspace = true
clap = {version = "4", features = ["cargo"]}
env_logger = "0.8"
log.workspace = true
pathdiff = "0.2.1"
plain = "0.2"
twox-hash = "1.6"
archive-common = {path = "../archive-common"}
redox-initfs = {path = ".."}
Binary file not shown.
+1 -1
View File
@@ -3,7 +3,7 @@ use std::path::Path;
use anyhow::{Context, Result};
use clap::{Arg, Command};
use archive_common::{self as archive, Args, DEFAULT_MAX_SIZE};
use redox_initfs_tools::{self as archive, Args, DEFAULT_MAX_SIZE};
fn main() -> Result<()> {
let matches = Command::new("redox-initfs-ar")
@@ -1,6 +1,6 @@
use std::{collections::HashMap, path::Path};
use anyhow::{Context, Result, anyhow};
use anyhow::{anyhow, Context, Result};
use redox_initfs::{InitFs, InodeKind, InodeStruct};
#[derive(Debug, Clone, PartialEq)]
@@ -74,13 +74,13 @@ fn build_tree<'a>(fs: InitFs<'a>, inode: InodeStruct<'a>) -> anyhow::Result<Node
fn archive_and_read() -> Result<()> {
env_logger::init();
let args = archive_common::Args {
let args = redox_initfs_tools::Args {
destination_path: Path::new("out.img"),
source: Path::new("data"),
bootstrap_code: None,
max_size: archive_common::DEFAULT_MAX_SIZE,
max_size: redox_initfs_tools::DEFAULT_MAX_SIZE,
};
archive_common::archive(&args).context("failed to archive")?;
redox_initfs_tools::archive(&args).context("failed to archive")?;
let data = std::fs::read(args.destination_path).context("failed to read new archive")?;
let filesystem =