Commit Graph

942 Commits

Author SHA1 Message Date
dependabot[bot]
d642b49bf6
Bump protobuf from 3.19.1 to 3.19.5 in /python/oled (#857)
* Bump protobuf from 3.19.1 to 3.19.5 in /python/oled

Bumps [protobuf](https://github.com/protocolbuffers/protobuf) from 3.19.1 to 3.19.5.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.19.1...v3.19.5)
2022-09-25 10:47:33 -07:00
Daniel Markstedt
922c3b214a Calculate image sizes for the Product string using MiB/KiB units 2022-09-22 11:50:47 -07:00
Daniel Markstedt
1938a8b45f Rename the Host Bridge INQUIRY product to RASCSI BRIDGE, as expected by the RASETHER.SYS driver. 2022-09-22 09:03:36 -07:00
Daniel Markstedt
e7775a72cc
Generate list of image types to create programmatically in the Web UI (#850)
* Generate list of image types to create programmatically based on rascsi capabilities, rather than a hard-coded list in the Web UI.

* Add explicit sorting of dicts for display in the Web UI, to avoid random order in certain environments.

* Remove redundant sorting line, and add code comments.

* Add helptext for the SCSI-1 image type
2022-09-21 17:14:53 -07:00
n4al
e6ade9d510
Adding new translations for Spanish (#848)
* Updating the Spanish translation

* Spanish localisation for new strings
2022-09-21 11:12:10 +02:00
Uwe Seimet
119dd55ef0
Cleanup (memory management, STL containers, type safety) based on SonarCloud report (#845)
* Removed static/global variable

* No need for ControllerManager as a singleton

* Updated factory handling

* Replaced loops

* Added const

* Added translations, fixed TODO, simplified operation creation

* Fixed SonarCloud warnings

* Replaced void * by BYTE *

* Added explicit mode_page_datetime struct

* Unit test updates

* Use enum classes

* Upddated file size check

* Use C++ output formatting

* Removed unused code

* Use array for garbage buffer

* Fixed data returned by READ CAPACITY(10)

* For mode pages: Replaced BYTE by std::byte

* Use std::byte for INQUIRY

* Use std::byte for REQUEST SENSE

* Replaced C array by vector

* Replaced C style array

* Replaced BYTE by std::byte

* Replaced DWORD

* Use more byte arreys

* Updated CTapDriver initialization/deletion

* Made status uint32_t instead of DWORD

* Replaced command byte array by vector

* Updated error handling

* Removed obsolete casts

* Improved locality of code

* rw_command has become obsolete

* Dynamically allocate command byte buffer

* Simplified receiving commands

* Use references

* Type safety update, dispatcher update

* Removed macros, replaced BOOL/FALSE/TRUE
2022-09-21 08:27:51 +02:00
Uwe Seimet
241e739d3a
Memory management update, SonarCloud fixes, fix for issue #841 (#842)
- Memory management updates, more fixed Sonar issues
* Replaced macros, fixed other sonar issues
* Added const, replaced enum with a single value by constant
* Updated object initializations
* Fixed potential strncpy overflow reported by gcc 8.3
2022-09-15 23:01:10 +02:00
akuker
e64c2f7254
Breakup GPIOBUS (#843)
* moved gpiobus

* moved gpiobus and systimer into hardware abstraction layer

* split up gpiobus by connection type

* merge develop changes

* revert compiler setting change

* registers working

* updates

* updates

* Revert "updates"

This reverts commit 0134b81061.

* Revert "updates"

This reverts commit 4bf0416ab4.

* Revert "registers working"

This reverts commit f5ee073eaf.

* Address comment in #843. Restore -Wextra

Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-09-10 16:40:24 -05:00
Uwe Seimet
f0c36fba77
SonarCloud coverage setup, fixed numerous SonarCloud issues (#840)
* SonarCloud coverage setup, fixed numerous SonarCloud issues

* Code cleanup
2022-09-10 07:59:41 +02:00
nucleogenic
882e567f2c
Merge pull request #819 from nucleogenic/docker-dev-environment
Docker environment for development and testing
2022-09-08 12:57:48 +01:00
nucleogenic
673da6312b
Add Docker environment for development and testing of the web UI
Add --token parameter to easyinstall.sh

Add --skip-token parameter to easyinstall.sh

Install required apt packages explicitly (--no-install-recommends)

Allow standalone RaSCSI and web UI installations to specify an auth token

Add development mode to web UI (web/start.sh --dev-mode)

Initial Docker-based development environment for Python and web UI

Bump protobuf version

Workaround for Flask development server and asyncio incompatibility

Build Python protobuf interface on container launch, if it doesn’t exist

Allow containers to be configured with environment variables, add support for token authentication

Move web UI live editing setup out of main Docker Compose config

Update dockerignore to exclude by default

Update README

Add OS_DISTRO, OS_VERSION and OS_ARCH build args

Allow extracted files to be moved to target when crossing a filesystem boundary

Reduce noise from watchmedo auto-restarts

Update Docker tag structure to rascsi:{build}-{platform}-{variant}

Prevent Docker Compose from attempting to pull images from Docker registry

Add workaround for issue #821

Allow container processes to be stopped with Ctrl+C

Update README, bind to ports 8080/8443 on the Docker host by default

Update README to clarify audience and no board connectivity

Add AIBOM and GAMERNIUM to --connect_type validation

Update cfilesystem.patch following rebase
2022-09-08 12:19:30 +01:00
Uwe Seimet
d80fbec03d
Added support for .hd1 (SCSI-1) image files (#828)
* Added support for .hd1 (SCSI-1) image files

* Update c-cpp.yml

* Fixed unit test warnings

* Fixed wrong scan default default (must be 1, not -1)

* Updated max length check

* Removed file not present in develop branch

* Added unit test

* Added workflow configurations and README updates (#832)

* automated test try 1

* filter branches

* filter branches

* filter branches

* filter branches

* filter branches

* Configured build and test CI workflows

* enable for all branches

* Update README.md

* Update README.md

Co-authored-by: Tony Kuker <akuker@gmail.com>

* Fix simple SonarCloud issues (#834)

* Fixing SonarCloud issues, first round

* Fixing SonarCLoud issues, next round

* Fixing SonarQube issues, next round

* Fixed warning

* Replaced empty constructors/destructors with = default;

* Fixed warning

* Replaced new

* Use constants instead of macros

* Use structured binding declarations

* Use init statements for if

* Use string views

* Use enum class, use using instead of typedef

* Fixed more SonarCloud warnings

* Replaced redundant/duplicate types with auto

* Devlared methods const

* Memory management update

* Fixed warning

* Added missing const

* Improved RaScsiResponse memory management

* Improved memory management

* Improved memory management

* Replaced macros by constants, removed unused constants

* Made member private

* Fixed warning

* Added comment

* Fixed shadowing warnings

* Cleanup

* Cleanup

* Cleanup

* Fixed shadowing warning

* Removed unused code

* Fixed more warnings

* Removed obsolete casts

* Fixed warnings

* Removed unused field

* Removed library not needed by rasctl

* Include cleanup

* Updated platform check for better compatibility

* Improved check for invalid option. This prevents rasctl to break on macos.

* Updated option check

* Fixed typo

* Added TODO

* Removed macro

* Scope update

* Replaced macro

* Added TODO, update memory management

* Fixed typo

* Replaced NULL by nullptr

* Use more structured bindings

* Added TODO

* Use calloc instead of mallco to not need memset

* Fixed warnings

* Fixed SonarQube initialization issues

* Fixed warning

* Cleaned up override/virtual/final

* Fixed warnings

* Constructor update

* Fixed tests

* Improved memory management

* Added missing const

* Added const

* Fixed two bugs reported by SonarCloud

* Fix SonarCloud hotspot

* Fixed memory management

* Memory management update

* Addressing hotspot by using strncpy

* Fixed SonarCloud issues

* Fixed SonarQube issues

* Added missing const

* Added const

* Added const

* Suppress false positive

* Added SonarQube suppressions for false positives

* Added suppresoin

* Fixed code smells

* Reverted changes that is a SonarQube issue, but caused problems with -O3

* Removed TODO based on review

* Update c-cpp.yml

* Finalized merge

Co-authored-by: akuker <34318535+akuker@users.noreply.github.com>
Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-09-07 21:45:00 -05:00
n4al
e7004e4ea9
Updating the Spanish translation (#839) 2022-09-07 21:43:15 -05:00
Troy
a56aae6d78
Apple Mode Page support for SCHD & SCCD (#835)
Co-authored-by: Troy <jokker@gmail.com>
2022-09-07 21:37:07 -05:00
Uwe Seimet
05db0e4688
Fix simple SonarCloud issues (#834)
* Fixing SonarCloud issues, first round

* Fixing SonarCLoud issues, next round

* Fixing SonarQube issues, next round

* Fixed warning

* Replaced empty constructors/destructors with = default;

* Fixed warning

* Replaced new

* Use constants instead of macros

* Use structured binding declarations

* Use init statements for if

* Use string views

* Use enum class, use using instead of typedef

* Fixed more SonarCloud warnings

* Replaced redundant/duplicate types with auto

* Devlared methods const

* Memory management update

* Fixed warning

* Added missing const

* Improved RaScsiResponse memory management

* Improved memory management

* Improved memory management

* Replaced macros by constants, removed unused constants

* Made member private

* Fixed warning

* Added comment

* Fixed shadowing warnings

* Cleanup

* Cleanup

* Cleanup

* Fixed shadowing warning

* Removed unused code

* Fixed more warnings

* Removed obsolete casts

* Fixed warnings

* Removed unused field

* Removed library not needed by rasctl

* Include cleanup

* Updated platform check for better compatibility

* Improved check for invalid option. This prevents rasctl to break on macos.

* Updated option check

* Fixed typo

* Added TODO

* Removed macro

* Scope update

* Replaced macro

* Added TODO, update memory management

* Fixed typo

* Replaced NULL by nullptr

* Use more structured bindings

* Added TODO

* Use calloc instead of mallco to not need memset

* Fixed warnings

* Fixed SonarQube initialization issues

* Fixed warning

* Cleaned up override/virtual/final

* Fixed warnings

* Constructor update

* Fixed tests

* Improved memory management

* Added missing const

* Added const

* Fixed two bugs reported by SonarCloud

* Fix SonarCloud hotspot

* Fixed memory management

* Memory management update

* Addressing hotspot by using strncpy

* Fixed SonarCloud issues

* Fixed SonarQube issues

* Added missing const

* Added const

* Added const

* Suppress false positive

* Added SonarQube suppressions for false positives

* Added suppresoin

* Fixed code smells

* Reverted changes that is a SonarQube issue, but caused problems with -O3

* Removed TODO based on review
2022-09-07 09:38:42 -05:00
akuker
34242a29ba
Added workflow configurations and README updates (#832)
* automated test try 1

* filter branches

* filter branches

* filter branches

* filter branches

* filter branches

* Configured build and test CI workflows

* enable for all branches

* Update README.md

* Update README.md

Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-09-06 08:17:33 +02:00
Daniel Markstedt
1d15122798
Merge pull request #829 from nucleogenic/python-remove-sahd-refs
Python updates following SASI removal
2022-09-03 09:58:24 -07:00
nucleogenic
8c7ab75835
Update web UI following SASI removal; clean up references to SAHD in Python sources 2022-09-03 17:43:51 +01:00
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