Commit Graph

1024 Commits

Author SHA1 Message Date
Uwe Seimet ddeede2beb
SASI code removal, error handling update, bug fixes, code cleanup (#806)
Summary ov most important changes triggered by the SASI code removal:

- Removed the SASI controller code
- New controller management. There is a new controller base class AbstractController and a class ControllerManager managing the controller lifecycle. The lifecycle management was removed from rasci.cpp and is covered by unit tests.
- New device management. The DeviceFactory manages the device lifecycle instead of rascsi.cpp. The new code is covered by unit tests.
- The lifecycle managment uses C++ collections with variable size instead of arrays with hard-coded sizes.
- The ScsiController method contains most of what was previously contained in scsidev_ctrl.cpp plus the code from sasidev_ctrl.cpp that was relevant for SCSI.
- scsi_command_util contains helper methods used for identical SCSI command implementations of more than one device
- Devices know their controllers, so that the controller instance does not need to be passed to each SCSI command. This change helps to decouple the devices from the controller. The phase_handler interface is also part of this decoupling.
- Use scsi_command_exception for propagating SCSI command execution errors, This resolves issues with the previous error handling, which was based on return values and often on magic numbers.
- Removed legacy SCSI error codes, all errors are now encoded by sense_key::, asc:: and status::.
- Fixed various warnings reported with -Wextra, -Weffc++ and -Wpedantic.
- Use constructor member initialization lists (recommended for ISO C++)
- Consistently use new/delete instead of malloc/free (recommended for ISO C++), resulting in better type safety and error handling
- Replaced variable sized arrays on the stack (violates ISO C++ and can cause a stack overflow)
- Replaced NULL by nullptr (recommended for C++), resulting in better type safety
- Use more const member functions in order to avoid side effects
- The format device page can now also be changed for hard disk drives (Fujitsu M2624S supports this, for instance), not just for MOs.
- Better encapsulation, updated access specifiers in many places
- Removed unused methods and method arguments
- Fixed a number of TODOs
- Added/updated unit tests for a lot of non-legacy classes
- Makefile support for creating HTML coverage reports with lcov/genhtml
2022-09-03 16:53:53 +02:00
Daniel Markstedt 2411afb2c4
Remove file extension validation in upload form (#826)
* Remove file extension validation in upload form. Improve on the related help text.

* Split up image and archive file suffixes.
2022-09-03 09:14:13 +02:00
Uwe Seimet 355b42703b
Add libgmock-dev to package list (for building and running tests on the Pi) (#824) 2022-09-02 11:20:34 -05:00
Uwe Seimet e649a014d5
Removed unused binary file foo.hda (#817) 2022-08-31 13:19:37 -05:00
akuker c05b5b58a1
Update easyinstall.sh (#820) 2022-08-31 17:50:09 +02:00
Tony Kuker 06dfb48fdc Update version for next development version 2022-08-28 22:22:17 +01:00
Tony Kuker b5ddb88e6a Update revision number for release 22.08.01 2022-08-28 22:19:06 +01:00
Uwe Seimet 7fc84c4217
Initial unit tests based on GoogleTest and GoogleMock (#802)
* Initial dummy test

* Makefile update

* Make protected method visible

* Test update

* Test update

* Updated mode page device

* Only build tests with explicit test target

* make test builds and executes tests

* Replaced constant

* Added TODO

* Merged develop

* Added unit test

* Comment update

* Unit test update

* Added tests

* Added tests

* Test cleanup

* Updated error handling

* Reverted MODE SENSE change

* Reverted last change

* Use GoogleMock

* Comment update

* Signature update

* Cleanup

* Cleanup

* Further cleanup

* Removed obsolete comment

* Updated error handling

* Cleanup

* Added TODO

* Added test

* Added test

* Renaming

* Added test

* Cleanup

* Header update

* Added two tests

* Renaming

* Fixed test argument order

* Namespaces are needed in order to avoid name clashes

* Added test

* Added tests

* Added tests

* Added tests

* Added tests

* Updated host services test

* Merge with develop

* Moved code

* Renaming

* Added tests

* Added tests

* Initial device tests

* Test cleanup

* Added test

* Removed cast

* RASCSI_TEST target has to depend on SRC_PROTOBUF
2022-08-28 12:25:08 -05:00
Daniel Markstedt 41ddc5fc33
Allow custom drive sizes in bespoke UI; other sundry improvements (#813)
* Allow custom drive image sizes in the bespoke UI. Addresses Issue#748

* Clarify what the Pi repo mirror setup is good for.

* Use the number input type for rudimentary input validation.

* Append byte unit.

* More granular input validation using html5 attributes. Max allowed input is 256GiB in bytes.

* Correct use of html5 number input elements.
2022-08-27 20:38:23 -05:00
Uwe Seimet eeae12ac4d
Host services do not support an image file (#812) 2022-08-26 09:50:18 -05:00
akuker 52802019de
Update CODEOWNERS 2022-08-26 09:32:10 -05:00
akuker c6da145f0f
handle the return value of write() (#810)
Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-08-26 10:19:42 +02:00
Daniel Markstedt aeb6576996
Add drive property for a generic 512 byte block size CD-ROM drive. Issue#417 (#808) 2022-08-25 20:04:49 -05:00
Daniel Markstedt 15c14e0404
Rebrand to RaSCSI Reloaded in C++ codebase (#805) 2022-08-25 20:01:39 -05:00
Daniel Markstedt aacc8e0c29
easyinstall: use pip3 consistently, create working dirs early, etc. (#801)
* Use the pip3 alias to work on older systems, such as Buster

* Put Reloaded into the main menu

* Make sure working dirs are created earlier in the process. Issue#803
2022-08-25 19:59:57 -05:00
Daniel Markstedt 4a870a137c
Swedish localization update for the next 2208 release (#798)
* Update Swedish localization for the 2208 release

* Fix typo
2022-08-25 19:59:18 -05:00
Daniel Markstedt 9302955416
Add concrete instructions on how to contribute code. (#797)
* Add concrete instructions on how to contribute code.

* Document the Python interpreter support policy

* Clarify contribution guidelines
2022-08-25 19:57:44 -05:00
Daniel Markstedt 8846871e47
Bump to Netatalk 2.220801 and Macproxy 22.8 (#796)
* Bump to Netatalk 2.220801

* Bump Macproxy version to 22.8, while refactoring and fixing bugs in the install script
2022-08-25 19:56:53 -05:00
Daniel Markstedt 72c9f1c6ab
Merge pull request #804 from nucleogenic/fix-python-3.7-compat
Fix Python 3.7 compatibility (#800)
2022-08-23 22:14:25 -07:00
nucleogenic 4f36fab55f
Fix Python 3.7 compatibility (#800) 2022-08-23 03:24:08 +01:00
Uwe Seimet 440fa65009
Return partial mode page data depending on allocation length (#793) 2022-08-19 19:34:31 -05:00
Daniel Markstedt 161bd32ba7
Merge pull request #789 from nucleogenic/webui-add-extra-archive-format-support
Allow images to be extracted from StuffIt, tarball, gzip, and 7z
2022-08-19 10:56:39 -07:00
nucleogenic b5e6438a45
Allow images to be extracted from StuffIt, tarball, gzip, and 7z archives 2022-08-12 04:19:02 +01:00
Daniel Markstedt be8e6c878e
Fix typo in README (#788) 2022-08-05 13:46:52 -05:00
Daniel Markstedt 8cd50da2d3
Fixes to README and easyinstall text (#787)
* Update web README to point to the right dir and url

* Notify that an ssl cert is being created.

* Document the de-facto release number strategy of this project.

Co-authored-by: RaSCSI User <user@rascsi.com>
2022-08-05 09:30:20 -05:00
Daniel Markstedt a523e1febe
Merge pull request #785 from nucleogenic/webui-return-code-mapper-tweaks
Enhancements to ReturnCodeMapper
2022-08-04 16:44:13 -07:00
nucleogenic 078d0fc99f
Fix error preventing ReturnCodeMapper using payloads without parameters, formatting to avoid wrapping of messages 2022-08-05 00:37:29 +01:00
Daniel Markstedt 4e622a9ea9
Merge pull request #783 from nucleogenic/webui-https-support
Add HTTPS support to web UI
2022-08-04 15:59:26 -07:00
akuker b902ae6ff9
#782 compiler interprets 08 as octal, which is invalid (#784)
Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-08-02 16:31:15 +02:00
nucleogenic 0a17633de3
Add HTTPS support to web UI 2022-08-01 16:09:01 +01:00
Tony Kuker 136e915f0c Update version for next development version 2022-08-01 01:43:29 +01:00
Tony Kuker 81524490b1 Merge tag 'v22.07.01' into develop
RaSCSI Reloaded version 22.07.01
2022-08-01 01:42:47 +01:00
Tony Kuker ca3ded37f2 Update revision number for release 2022-08-01 01:41:10 +01:00
nucleogenic 7a18939171
Add support for --log-level argument to web UI (#781)
Increase verbosity of web UI log format

Add critical to supported log levels for completeness
2022-07-31 19:02:14 -05:00
Daniel Markstedt a09885cdfe
Turn on web UI auth by default, and remove the stand alone option from the script. (#780) 2022-07-31 17:21:31 -05:00
Daniel Markstedt 4b874ab135
Merge pull request #779 from akuker/akuker-precache-pip
Download and cache pip packages as part of easyinstall
2022-07-30 23:38:20 -07:00
Daniel Markstedt 23f2633a77
Swedish localization for 2207 (#778)
* Update Swedish localizations

* Fix error
2022-07-30 22:09:48 -05:00
Daniel Markstedt 87718ce53f
Bump to Netatalk v2.220702 while removing install script logic that is now in an install script in the Netatalk code. (#777) 2022-07-30 22:07:31 -05:00
RaSCSI User 0768803425 Download and cache pip packages as part of easyinstall 2022-07-31 02:59:52 +01:00
Daniel Markstedt de5dff49be
Merge pull request #776 from nucleogenic/webui-escape-command-arguments
Fix unescaped shell arguments
2022-07-30 16:10:05 -07:00
nucleogenic ca918818bf
Fix unescaped shell arguments 2022-07-30 21:01:22 +01:00
Daniel Markstedt 956b4bcf0b
Merge pull request #767 from akuker/dependabot/pip/python/ctrlboard/pillow-9.0.1
Bump pillow from 9.0.0 to 9.0.1 in /python/ctrlboard
2022-07-29 08:27:42 -07:00
Daniel Markstedt 34a3d77ff5
Merge pull request #774 from akuker/rdmark_fix_issue_773
Create the secret file in .config/rascsi instead.
2022-07-29 08:25:03 -07:00
Daniel Markstedt 8265d25d88 Create the secret file in .config/rascsi instead. Plus some added code comments, and removing a superfluous sudo -v. 2022-07-28 22:48:18 -07:00
Daniel Markstedt e51517ca60
Rebrand to RaSCSI Reloaded in key places in the code (#772)
* Add Reloaded to readme

* Add Reloaded to prominent places in the web app

* Add Reloaded to the rascsi startup message
2022-07-26 10:20:50 -05:00
nucleogenic dc1414ba71
Add RASCSI host and port arguments to web/start.sh (#771)
* Fix data type of --rascsi-port argument

* Add support for --rascsi-host and --rascsi-port arguments

* Add short parameter names, increase specificity of web port parameter
2022-07-25 21:47:11 -07:00
Daniel Markstedt 94c98b4577
Merge pull request #768 from philenotfound/master
In case all IDs are reserved recommend 0
2022-06-30 22:50:14 -07:00
Phil Eichinger a33a228b6b In case all IDs are reserved recommend 0
Otherwise the occupied list is empty and this exception brings down the
whole web interface.

This can be easily provoked by just reserving all IDs in the web interface.
2022-06-30 23:17:55 +02:00
dependabot[bot] da0f9527cc
Bump pillow from 9.0.0 to 9.0.1 in /python/ctrlboard
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.0.0 to 9.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.0.0...9.0.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-28 23:21:12 +00:00
Tony Kuker 348b5dd026 Merge tag 'v22.05.02'
RaSCSI version 22.05.02
2022-06-28 18:20:11 -05:00