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

bscrypto: fix and update code, and move CLI parsing to cli11, add systemtests #1734

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

bruno-at-bareos
Copy link
Contributor

bscrypto

This PR moves CLI parsing of bscrypto to CLI11, along with some code updates and refactoring.
We also add a specific systemtest
and review the related documentation

It will certainly need a backport to 23.

this is based on the old #1350

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@bruno-at-bareos bruno-at-bareos force-pushed the dev/alaaeddineelamri/master/bscsicrypto-to-CLI11 branch from 0b584fb to 1862889 Compare May 27, 2024 08:34
alaaeddineelamri and others added 12 commits May 27, 2024 10:39
`bstrncpy` makes sure the destination string is always null
terminated, which results in the last character of the string
being replaced with `0` which in turn makes the passphrase string
missing its last character.
Remove the hardcoded 1 to explicit STDOUT_FILENO
to redirect job messages to stdout
passphrase is not a cstring (no null terminator) so it cannot be
printed with %s; bstrncpy can copy length + 1 bytes but only length
bytes were allocated; etc.
- cmake scsi-crypto option can be ON by default, it is only
  triggered if tapes device are present.
- systemtests: cleanup cryptoc cache file.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
- Fix ScsicryptoSd call in bareos-config
- developerFAQ: quote tapedevice list
  Without the quote example in copy and paste call the second
  and beyond tape drives are called by sh (due to ; separator)

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Those tests will be activated with cmake autochanger and tapes drives
flag is present in cojunction with -Dscsi-crypto=ON.
We use quadstore-vtl to test and design the tests.

- add vtl functions to global scripts
- systemtests: remove obsolete plugin option values
@bruno-at-bareos bruno-at-bareos force-pushed the dev/alaaeddineelamri/master/bscsicrypto-to-CLI11 branch from 1862889 to 6268389 Compare May 27, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants