initfs: Move archive-common package into initfs-tools
This commit is contained in:
Generated
+1
-16
@@ -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",
|
||||
|
||||
@@ -5,7 +5,6 @@ members = [
|
||||
"daemon",
|
||||
"init",
|
||||
"initfs",
|
||||
"initfs/archive-common",
|
||||
"initfs/tools",
|
||||
"ipcd",
|
||||
"logd",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = ".."}
|
||||
@@ -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.
@@ -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 =
|
||||
Reference in New Issue
Block a user