From 2da11e52a30d0cec6144109cb653471500b7e1e7 Mon Sep 17 00:00:00 2001 From: Erik Birgiser Date: Mon, 3 Jun 2024 13:40:41 +0300 Subject: [PATCH] Added option to build local RPM package for Fedora Signed-off-by: Erik Birgiser --- Cargo.toml | 5 +++++ README.md | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index e907ba49..67082faa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,3 +63,8 @@ fuse3 = { version = "0.7.1", features = ["tokio-runtime", "unprivileged"] } [package.metadata.aur] depends = ["fuse3"] + +[package.metadata.generate-rpm] +assets = [ + { source = "target/release/rencfs", dest = "/usr/bin/rencfs", mode = "755" } +] diff --git a/README.md b/README.md index 97f7a820..e44a9180 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,12 @@ Ubuntu sudo apt-get update && sudo apt-get install fuse3 build-essential ``` +Fedora + +```bash +sudo dnf update && sudo dnf install fuse3 +``` + ### Build for debug ```bash @@ -282,6 +288,25 @@ cargo build --release cargo run -- --mount-point MOUNT_POINT --data-dir DATA_DIR ``` +### Build local RPM for Fedora + +This is using [cargo-generate-rpm](https://crates.io/crates/cargo-generate-rpm) + +```bash +cargo install cargo-generate-rpm +cargo build --release +cargo generate-rpm +``` + +The generated RPM will be located here: `target/generate-rpm`. + +#### Install and run local RPM + +```bash +cd target/generate-rpm/ +sudo dnf localinstall rencfs-xxx.x86_64.rpm +``` + ## Developing inside a Container See here how to configure for [VsCode](https://code.visualstudio.com/docs/devcontainers/containers)