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

RPC: Add TarExtract command, some small fixes #3685

Merged
merged 9 commits into from
Jun 8, 2024

Conversation

Willy-JL
Copy link
Contributor

@Willy-JL Willy-JL commented Jun 4, 2024

What's new

  • RPC storage command to extract tar file to destination (needs Storage: TarExtract request flipperzero-protobuf#50, probably need to update submodule if/when it is merged)
  • Fixed extract failing if not extracting at /ext or /int, this is because first directory entry in tar is / and path_concat() would result in /path/to/dest/ with trailing slash. This is a basic fix but might be worth changing the behavior of the path library in such edge cases?
  • Added some missing storage state resets, all other functions had them so it seemed like they should be there, revert if i misunderstood :D

Verification

  • Storage operations, backup and restore, work fine over RPC
  • Tar files (like resources.tar, so USTAR format) can be extracted to chosen destination (not sure on easiest way to make one-off RPC calls to test)

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@hedger hedger added the Core+Services HAL, furi & core system services label Jun 5, 2024
@gsurkov
Copy link
Member

gsurkov commented Jun 6, 2024

@Willy-JL

not sure on easiest way to make one-off RPC calls to test

We have some python scripts for that purpose which can be found here.

In the meantime, I've added support for TarExtractRequest at flipperdevices/flipperzero_protobuf_py#25

applications/services/rpc/rpc_storage.c Outdated Show resolved Hide resolved
gsurkov
gsurkov previously approved these changes Jun 7, 2024
@skotopes skotopes merged commit 2f9ca17 into flipperdevices:dev Jun 8, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core+Services HAL, furi & core system services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants