Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

694 add acl support to cli as an experimental feature (#741) #742

Merged
merged 4 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt install -y libacl1-dev
- uses: ./.github/actions/setup-rust
with:
channel: nightly
Expand All @@ -30,6 +33,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust
- name: install dependencies
run: |
sudo apt install -y libacl1-dev
- name: Install cli
run: |
cargo install --locked --all-features --path cli
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cli_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust
- name: install dependencies
run: |
sudo apt install -y libacl1-dev
- name: Install command
run: |
cargo install --path cli --all-features
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
with:
submodules: true
- uses: ./.github/actions/setup-rust
- name: install dependencies
run: |
sudo apt install -y libacl1-dev
- if: startsWith(github.ref, 'refs/tags/libpna')
name: Publish libpna crate
run: cargo publish -p libpna
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust
- name: install dependencies
run: |
sudo apt install -y libacl1-dev
- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
- name: Run rust-clippy
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt install -y libacl1-dev
- uses: actions/checkout@v4
- id: install_rust
uses: ./.github/actions/setup-rust
Expand All @@ -33,7 +36,7 @@ jobs:
uses: actions/cache@v4
with:
path: target
key: "${{ matrix.os }}-rust-${{ steps.install_rust.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}"
key: "${{ matrix.os }}-rust-${{ steps.install_rust.outputs.version }}-${{ hashFiles(format('{0}/Cargo.lock', env.WORKING_DIRECTORY)) }}"
- name: run test
run: cargo test --locked --release --all-features
env:
Expand Down
65 changes: 60 additions & 5 deletions Cargo.lock

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

12 changes: 12 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ keywords = ["pna", "archive", "cli", "crypto", "data"]

[dependencies]
ansi_term = "0.12.1"
bitflags = "2.5.0"
bytesize = "1.3.0"
chrono = "0.4.38"
clap = { version = "4.5.4", features = ["derive"] }
Expand All @@ -28,12 +29,23 @@ normalize-path = "0.2.1"
nix = { version = "0.29.0", features = ["user", "fs"] }
xattr = "1.3.1"

[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
exacl = { version = "0.12.0", optional = true }

[target.'cfg(windows)'.dependencies]
windows = { version = "0.56.0", features = ["Win32_Storage_FileSystem"] }
field-offset = { version = "0.3.6", optional = true }

[features]
experimental = [] # deprecated
unstable-split = ["experimental"] # deprecated
acl = [
"exacl",
"field-offset",
"windows/Win32_Security_Authorization",
"windows/Win32_System_SystemServices",
"windows/Win32_System_WindowsProgramming",
]

[[bin]]
name = "pna"
Expand Down
3 changes: 3 additions & 0 deletions cli/src/chunk.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod acl;

pub use acl::*;
Loading