From 0a17633de360fddb6b16060199a0628099239cf2 Mon Sep 17 00:00:00 2001 From: nucleogenic Date: Mon, 1 Aug 2022 13:47:23 +0100 Subject: [PATCH 01/20] Add HTTPS support to web UI --- easyinstall.sh | 17 +++++++++++++++++ python/web/service-infra/nginx-default.conf | 10 ++++++++++ 2 files changed, 27 insertions(+) diff --git a/easyinstall.sh b/easyinstall.sh index 71464b6b..350ef59c 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -55,6 +55,8 @@ OLED_INSTALL_PATH="$BASE/python/oled" CTRLBOARD_INSTALL_PATH="$BASE/python/ctrlboard" PYTHON_COMMON_PATH="$BASE/python/common" SYSTEMD_PATH="/etc/systemd/system" +SSL_CERTS_PATH="/etc/ssl/certs" +SSL_KEYS_PATH="/etc/ssl/private" HFS_FORMAT=/usr/bin/hformat HFDISK_BIN=/usr/bin/hfdisk LIDO_DRIVER=$BASE/lido-driver.img @@ -147,6 +149,21 @@ function installRaScsiWebInterface() { sudo usermod -a -G $USER www-data + if [ -f "$SSL_CERTS_PATH/rascsi-web.crt" ]; then + echo "SSL certificate $SSL_CERTS_PATH/rascsi-web.crt already exists." + else + echo "SSL certificate $SSL_CERTS_PATH/rascsi-web.crt does not exist; creating self-signed certificate..." + sudo mkdir -p "$SSL_CERTS_PATH" || true + sudo mkdir -p "$SSL_KEYS_PATH" || true + sudo openssl req -x509 -nodes -sha256 -days 3650 \ + -newkey rsa:4096 \ + -keyout "$SSL_KEYS_PATH/rascsi-web.key" \ + -out "$SSL_CERTS_PATH/rascsi-web.crt" \ + -subj '/CN=rascsi' \ + -addext 'subjectAltName=DNS:rascsi' \ + -addext 'extendedKeyUsage=serverAuth' + fi + sudo systemctl reload nginx || true } diff --git a/python/web/service-infra/nginx-default.conf b/python/web/service-infra/nginx-default.conf index 58804911..2e3c62f1 100644 --- a/python/web/service-infra/nginx-default.conf +++ b/python/web/service-infra/nginx-default.conf @@ -3,6 +3,16 @@ server { listen [::]:80 default_server; listen 80 default_server; + listen 443 ssl http2; + listen [::]:443 ssl http2; + + ssl_certificate /etc/ssl/certs/rascsi-web.crt; + ssl_certificate_key /etc/ssl/private/rascsi-web.key; + ssl_session_timeout 1d; + ssl_session_cache shared:MozSSL:10m; + ssl_session_tickets off; + ssl_protocols TLSv1.3; + ssl_prefer_server_ciphers off; location / { proxy_pass http://127.0.0.1:8080; From b902ae6ff953c836dad64b857f271c3a467ce8bd Mon Sep 17 00:00:00 2001 From: akuker <34318535+akuker@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:31:15 -0500 Subject: [PATCH 02/20] #782 compiler interprets 08 as octal, which is invalid (#784) Co-authored-by: Tony Kuker --- src/raspberrypi/rascsi_version.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raspberrypi/rascsi_version.cpp b/src/raspberrypi/rascsi_version.cpp index 1622751d..71bcbbc1 100644 --- a/src/raspberrypi/rascsi_version.cpp +++ b/src/raspberrypi/rascsi_version.cpp @@ -13,7 +13,7 @@ // The following should be updated for each release const int rascsi_major_version = 22; // Last two digits of year -const int rascsi_minor_version = 08; // Month +const int rascsi_minor_version = 8; // Month const int rascsi_patch_version = -1; // Patch number - increment for each update static char rascsi_version_string[30]; // Allow for string up to "XX.XX.XXX" + null character + "development build" From 078d0fc99f077ee47cd8900132662414efc7e248 Mon Sep 17 00:00:00 2001 From: nucleogenic Date: Fri, 5 Aug 2022 00:28:22 +0100 Subject: [PATCH 03/20] Fix error preventing ReturnCodeMapper using payloads without parameters, formatting to avoid wrapping of messages --- python/web/src/return_code_mapper.py | 56 +++++++++++++++++----------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/python/web/src/return_code_mapper.py b/python/web/src/return_code_mapper.py index 6b596f1c..3f30ff91 100644 --- a/python/web/src/return_code_mapper.py +++ b/python/web/src/return_code_mapper.py @@ -9,25 +9,35 @@ class ReturnCodeMapper: """Class for mapping between rascsi return codes and translated strings""" MESSAGES = { - ReturnCodes.DELETEFILE_SUCCESS: _("File deleted: %(file_path)s"), - ReturnCodes.DELETEFILE_FILE_NOT_FOUND: _("File to delete not found: %(file_path)s"), - ReturnCodes.RENAMEFILE_SUCCESS: _("File moved to: %(target_path)s"), - ReturnCodes.RENAMEFILE_UNABLE_TO_MOVE: _("Unable to move file to: %(target_path)s"), - ReturnCodes.DOWNLOADFILETOISO_SUCCESS: _("Created CD-ROM ISO image with " - "arguments \"%(value)s\""), - ReturnCodes.DOWNLOADTODIR_SUCCESS: _("%(file_name)s downloaded to %(save_dir)s"), - ReturnCodes.WRITEFILE_SUCCESS: _("File created: %(target_path)s"), - ReturnCodes.WRITEFILE_COULD_NOT_WRITE: _("Could not create file: %(target_path)s"), - ReturnCodes.READCONFIG_SUCCESS: _("Loaded configurations from: %(file_name)s"), - ReturnCodes.READCONFIG_COULD_NOT_READ: _("Could not read configuration " - "file: %(file_name)s"), - ReturnCodes.READCONFIG_INVALID_CONFIG_FILE_FORMAT: _("Invalid configuration file format"), - ReturnCodes.READDRIVEPROPS_SUCCESS: _("Read properties from file: %(file_path)s"), - ReturnCodes.READDRIVEPROPS_COULD_NOT_READ: _("Could not read properties from " - "file: %(file_path)s"), - ReturnCodes.ATTACHIMAGE_COULD_NOT_ATTACH: _("Cannot insert an image for %(device_type)s " - "into a %(current_device_type)s device"), - } + ReturnCodes.DELETEFILE_SUCCESS: + _("File deleted: %(file_path)s"), + ReturnCodes.DELETEFILE_FILE_NOT_FOUND: + _("File to delete not found: %(file_path)s"), + ReturnCodes.RENAMEFILE_SUCCESS: + _("File moved to: %(target_path)s"), + ReturnCodes.RENAMEFILE_UNABLE_TO_MOVE: + _("Unable to move file to: %(target_path)s"), + ReturnCodes.DOWNLOADFILETOISO_SUCCESS: + _("Created CD-ROM ISO image with arguments \"%(value)s\""), + ReturnCodes.DOWNLOADTODIR_SUCCESS: + _("%(file_name)s downloaded to %(save_dir)s"), + ReturnCodes.WRITEFILE_SUCCESS: + _("File created: %(target_path)s"), + ReturnCodes.WRITEFILE_COULD_NOT_WRITE: + _("Could not create file: %(target_path)s"), + ReturnCodes.READCONFIG_SUCCESS: + _("Loaded configurations from: %(file_name)s"), + ReturnCodes.READCONFIG_COULD_NOT_READ: + _("Could not read configuration file: %(file_name)s"), + ReturnCodes.READCONFIG_INVALID_CONFIG_FILE_FORMAT: + _("Invalid configuration file format"), + ReturnCodes.READDRIVEPROPS_SUCCESS: + _("Read properties from file: %(file_path)s"), + ReturnCodes.READDRIVEPROPS_COULD_NOT_READ: + _("Could not read properties from file: %(file_path)s"), + ReturnCodes.ATTACHIMAGE_COULD_NOT_ATTACH: + _("Cannot insert an image for %(device_type)s into a %(current_device_type)s device"), + } @staticmethod def add_msg(payload): @@ -36,10 +46,14 @@ class ReturnCodeMapper: if "return_code" not in payload: return payload - parameters = payload["parameters"] + parameters = payload.get("parameters") - payload["msg"] = lazy_gettext( + if parameters: + payload["msg"] = lazy_gettext( ReturnCodeMapper.MESSAGES[payload["return_code"]], **parameters, ) + else: + payload["msg"] = lazy_gettext(ReturnCodeMapper.MESSAGES[payload["return_code"]]) + return payload From 8cd50da2d3e8231e4a62b1ead35b8004c9f8254e Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 5 Aug 2022 07:30:20 -0700 Subject: [PATCH 04/20] 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 --- README.md | 2 +- easyinstall.sh | 2 ++ python/web/README.md | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e7f675ef..442fc01b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ RaSCSI Reloaded is using the . (for the first release of the month). Hot fixes, if necessary, will be released as ... For example, the first release in January 2021 will be release "21.01". If a hot-fix is needed for this release, the first hotfix will be "21.01.1". +- A tag will be created for each "release". The releases will be named .. where the release number is incremented for each subsequent release tagged in the same calendar month. The first release of the month of January 2021 is called "21.01.01", the second one in the same month "21.01.02 and so on. Typically, releases will only be planned every few months. diff --git a/easyinstall.sh b/easyinstall.sh index 350ef59c..da4bab1b 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -1065,6 +1065,7 @@ function runChoice() { echo "- Modify user groups and permissions" echo "- Install binaries to /usr/local/bin" echo "- Install manpages to /usr/local/man" + echo "- Create a self-signed certificate in /etc/ssl" sudoCheck configureTokenAuth stopOldWebInterface @@ -1213,6 +1214,7 @@ function runChoice() { echo "- Modify and enable Apache2 and Nginx web service" echo "- Create directories and change permissions" echo "- Modify user groups and permissions" + echo "- Create a self-signed certificate in /etc/ssl" sudoCheck updateRaScsiGit createCfgDir diff --git a/python/web/README.md b/python/web/README.md index 5be61e1e..641bc2f6 100644 --- a/python/web/README.md +++ b/python/web/README.md @@ -55,7 +55,7 @@ To create a new localization, it needs to be added to the LANGAUGES constant in web/settings.py. To localize messages coming from the RaSCSI backend, update also code in raspberrypi/localizer.cpp in the RaSCSI C++ code. -Once this is done, it is time to localize the Python code. The below steps are derived from the [Flask-Babel documentation](https://flask-babel.tkte.ch/#translating-applications). +Once this is done, it is time to localize the Python code. The below steps are derived from the [Flask-Babel documentation](https://python-babel.github.io/flask-babel/index.html#translating-applications). First, generate the raw messages.pot file containing extracted strings. @@ -68,7 +68,7 @@ $ pybabel extract -F babel.cfg -o messages.pot . When adding a localization for a new language, initialize the directory structure. Replace 'xx' with the two character code for the language. ``` -$ pybabel init -i messages.pot -d translations -l xx +$ pybabel init -i messages.pot -d src/translations -l xx ``` ### Update an existing loclization From be8e6c878ebbd815d0226642e664aabe25033bdf Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Fri, 5 Aug 2022 11:46:52 -0700 Subject: [PATCH 05/20] Fix typo in README (#788) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 442fc01b..5efb80bf 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ RaSCSI Reloaded is using the .. where the release number is incremented for each subsequent release tagged in the same calendar month. The first release of the month of January 2021 is called "21.01.01", the second one in the same month "21.01.02 and so on. +- A tag will be created for each "release". The releases will be named .. where the release number is incremented for each subsequent release tagged in the same calendar month. The first release of the month of January 2021 is called "21.01.01", the second one in the same month "21.01.02" and so on. Typically, releases will only be planned every few months. From b5e6438a45ad88d62bb0502a21e992db418c8c5a Mon Sep 17 00:00:00 2001 From: nucleogenic Date: Fri, 12 Aug 2022 04:19:02 +0100 Subject: [PATCH 06/20] Allow images to be extracted from StuffIt, tarball, gzip, and 7z archives --- easyinstall.sh | 2 +- python/common/src/rascsi/common_settings.py | 9 + python/common/src/rascsi/file_cmds.py | 167 +++++++++------- python/common/src/rascsi/return_codes.py | 4 + python/common/src/util/__init__.py | 0 python/common/src/util/run.py | 45 +++++ python/common/src/util/unarchiver.py | 201 ++++++++++++++++++++ python/web/src/return_code_mapper.py | 8 + python/web/src/settings.py | 2 - python/web/src/static/style.css | 2 + python/web/src/templates/index.html | 63 +++--- python/web/src/web.py | 57 +++--- python/web/start.sh | 5 + 13 files changed, 438 insertions(+), 127 deletions(-) create mode 100644 python/common/src/util/__init__.py create mode 100644 python/common/src/util/run.py create mode 100644 python/common/src/util/unarchiver.py diff --git a/easyinstall.sh b/easyinstall.sh index 350ef59c..0a93c177 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -82,7 +82,7 @@ function sudoCheck() { # install all dependency packages for RaSCSI Service function installPackages() { - sudo apt-get update && sudo apt-get install git libspdlog-dev libpcap-dev genisoimage python3 python3-venv python3-dev python3-pip nginx libpcap-dev protobuf-compiler bridge-utils libev-dev libevdev2 -y .+)".$' + unar_result_no_files = "No files extracted." + unar_file_extracted = \ + r"^ (?P.+). \(((?P[0-9]+) B)?(?P(dir)?(, )?(rsrc)?)\)\.\.\. (?P[A-Z]+)\.$" + + lines = process["stdout"].rstrip("\n").split("\n") + + if lines[-1] == unar_result_no_files: + raise UnarNoFilesExtractedError + + if match(unar_result_success, lines[-1]): + extracted_members = [] + + for line in lines[1:-1]: + if line_matches := match(unar_file_extracted, line): + matches = line_matches.groupdict() + member = { + "name": str(pathlib.PurePath(matches["path"]).name), + "path": matches["path"], + "size": matches["size"] or 0, + "is_dir": False, + "is_resource_fork": False, + "absolute_path": str(pathlib.PurePath(tmp_dir).joinpath(matches["path"])), + } + + member_types = matches.get("types", "").removeprefix(", ").split(", ") + + if "dir" in member_types: + member["is_dir"] = True + + if "rsrc" in member_types: + if not fork_output_type: + continue + + member["is_resource_fork"] = True + + # Update names/paths to match unar resource fork naming convention + if fork_output_type == FORK_OUTPUT_TYPE_HIDDEN: + member["name"] = f"._{member['name']}" + else: + member["name"] += ".rsrc" + member["path"] = str(pathlib.PurePath(member["path"]).parent.joinpath(member["name"])) + member["absolute_path"] = str(pathlib.PurePath(tmp_dir).joinpath(member["path"])) + + logging.debug("Extracted: %s -> %s", member['path'], member['absolute_path']) + extracted_members.append(member) + else: + raise UnarUnexpectedOutputError(f"Unexpected output: {line}") + + moved = [] + skipped = [] + for member in sorted(extracted_members, key=lambda m: m["path"]): + source_path = pathlib.Path(member["absolute_path"]) + target_path = pathlib.Path(output_dir).joinpath(member["path"]) + member["absolute_path"] = str(target_path) + + if target_path.exists(): + logging.info("Skipping temp file/dir as the target already exists: %s", target_path) + skipped.append(member) + continue + + if member["is_dir"]: + logging.debug("Creating empty dir: %s -> %s", source_path, target_path) + target_path.mkdir(parents=True, exist_ok=True) + moved.append(member) + continue + + # The parent dir may not be specified as a member, so ensure it exists + target_path.parent.mkdir(parents=True, exist_ok=True) + logging.debug("Moving temp file: %s -> %s", source_path, target_path) + source_path.rename(target_path) + moved.append(member) + + return { + "extracted": moved, + "skipped": skipped, + } + + raise UnarUnexpectedOutputError(lines[-1]) + + +def inspect_archive(file_path, **kwargs): + """ + Calls `lsar` to inspect the contents of an archive + Takes (str) file_path + Returns (dict) of (str) format, (list) members + """ + if not pathlib.Path(file_path): + raise FileNotFoundError(f"File {file_path} does not exist") + + process = run("lsar", ["-json", "--", file_path]) + + if process["returncode"] != 0: + raise LsarCommandError(f"Non-zero return code: {process['returncode']}") + + try: + archive_info = loads(process["stdout"]) + except JSONDecodeError as error: + raise LsarOutputError(f"Unable to read JSON output from lsar: {error.msg}") from error + + members = [{ + "name": pathlib.PurePath(member.get("XADFileName")).name, + "path": member.get("XADFileName"), + "size": member.get("XADFileSize"), + "is_dir": member.get("XADIsDirectory"), + "is_resource_fork": member.get("XADIsResourceFork"), + "raw": member, + } for member in archive_info.get("lsarContents", [])] + + return { + "format": archive_info.get("lsarFormatName"), + "members": members, + } + + +class UnarCommandError(Exception): + """ Command execution was unsuccessful """ + pass + + +class UnarNoFilesExtractedError(Exception): + """ Command completed, but no files extracted """ + + +class UnarUnexpectedOutputError(Exception): + """ Command output not recognized """ + + +class LsarCommandError(Exception): + """ Command execution was unsuccessful """ + + +class LsarOutputError(Exception): + """ Command output could not be parsed""" diff --git a/python/web/src/return_code_mapper.py b/python/web/src/return_code_mapper.py index 3f30ff91..94d9a5f3 100644 --- a/python/web/src/return_code_mapper.py +++ b/python/web/src/return_code_mapper.py @@ -37,6 +37,14 @@ class ReturnCodeMapper: _("Could not read properties from file: %(file_path)s"), ReturnCodes.ATTACHIMAGE_COULD_NOT_ATTACH: _("Cannot insert an image for %(device_type)s into a %(current_device_type)s device"), + ReturnCodes.EXTRACTIMAGE_SUCCESS: + _("Extracted %(count)s file(s)"), + ReturnCodes.EXTRACTIMAGE_NO_FILES_SPECIFIED: + _("Unable to extract archive: No files were specified"), + ReturnCodes.EXTRACTIMAGE_NO_FILES_EXTRACTED: + _("No files were extracted (existing files are skipped)"), + ReturnCodes.EXTRACTIMAGE_COMMAND_ERROR: + _("Unable to extract archive: %(error)s"), } @staticmethod diff --git a/python/web/src/settings.py b/python/web/src/settings.py index f7988200..5ce3fea4 100644 --- a/python/web/src/settings.py +++ b/python/web/src/settings.py @@ -12,8 +12,6 @@ AFP_DIR = f"{HOME_DIR}/afpshare" MAX_FILE_SIZE = getenv("MAX_FILE_SIZE", str(1024 * 1024 * 1024 * 4)) # 4gb -ARCHIVE_FILE_SUFFIX = "zip" - # The file name of the default config file that loads when rascsi-web starts DEFAULT_CONFIG = f"default.{rascsi.common_settings.CONFIG_FILE_SUFFIX}" # File containing canonical drive properties diff --git a/python/web/src/static/style.css b/python/web/src/static/style.css index cf7ebf5c..48fc91c6 100644 --- a/python/web/src/static/style.css +++ b/python/web/src/static/style.css @@ -35,12 +35,14 @@ table, tr, td { color: white; font-size:20px; background-color:red; + white-space: pre-line; } .message { color: white; font-size:20px; background-color:green; + white-space: pre-line; } td.inactive { diff --git a/python/web/src/templates/index.html b/python/web/src/templates/index.html index 49c2d096..fb984d71 100644 --- a/python/web/src/templates/index.html +++ b/python/web/src/templates/index.html @@ -185,41 +185,41 @@ - {% elif file["zip_members"] %} + {% elif file["archive_contents"] %}
{{ file["name"] }}
    - {% for member in file["zip_members"] %} - {% if not member.lower().endswith(PROPERTIES_SUFFIX) %} -
  • - {% if member + "." + PROPERTIES_SUFFIX in file["zip_members"] %} -
    {{ member }} -
    - - - -
    -
    -
      + {% for member in file["archive_contents"] %} + {% if not member["is_properties_file"] %}
    • - {{ member + "." + PROPERTIES_SUFFIX }} + {% if member["related_properties_file"] %} +
      + + +
      + + + +
      +
      +
        +
      • {{ member["related_properties_file"] }}
      • +
      +
      + {% else %} + +
      + + + +
      + {% endif %}
    • -
    -
    - {% else %} - -
    - - - -
    {% endif %} -
  • - {% endif %} - {% endfor %} + {% endfor %}
@@ -238,11 +238,12 @@ {{ _("Attached!") }} {% else %} - {% if file["name"].lower().endswith(ARCHIVE_FILE_SUFFIX) %} -
- - - + {% if file["archive_contents"] %} + + + {% set pipe = joiner("|") %} + +
{% else %}
diff --git a/python/web/src/web.py b/python/web/src/web.py index d5eb8848..c38a2b61 100644 --- a/python/web/src/web.py +++ b/python/web/src/web.py @@ -8,9 +8,9 @@ import argparse from pathlib import Path from functools import wraps from grp import getgrall -from ast import literal_eval import bjoern +from rascsi.return_codes import ReturnCodes from werkzeug.utils import secure_filename from simplepam import authenticate from flask_babel import Babel, Locale, refresh, _ @@ -37,6 +37,7 @@ from rascsi.common_settings import ( CFG_DIR, CONFIG_FILE_SUFFIX, PROPERTIES_SUFFIX, + ARCHIVE_FILE_SUFFIXES, RESERVATIONS, ) @@ -55,7 +56,6 @@ from web_utils import ( from settings import ( AFP_DIR, MAX_FILE_SIZE, - ARCHIVE_FILE_SUFFIX, DEFAULT_CONFIG, DRIVE_PROPERTIES_FILE, AUTH_GROUP, @@ -133,14 +133,13 @@ def index(): scsi_ids, recommended_id = get_valid_scsi_ids(devices["device_list"], reserved_scsi_ids) formatted_devices = sort_and_format_devices(devices["device_list"]) - valid_file_suffix = "."+", .".join( + valid_file_suffix = "." + ", .".join( server_info["sahd"] + server_info["schd"] + server_info["scrm"] + server_info["scmo"] + server_info["sccd"] + - [ARCHIVE_FILE_SUFFIX] - ) + ARCHIVE_FILE_SUFFIXES) if "username" in session: username = session["username"] @@ -182,7 +181,6 @@ def index(): mo_file_suffix=tuple(server_info["scmo"]), username=username, auth_active=auth_active(AUTH_GROUP)["status"], - ARCHIVE_FILE_SUFFIX=ARCHIVE_FILE_SUFFIX, PROPERTIES_SUFFIX=PROPERTIES_SUFFIX, REMOVABLE_DEVICE_TYPES=ractl_cmd.get_removable_device_types(), DISK_DEVICE_TYPES=ractl_cmd.get_disk_device_types(), @@ -945,33 +943,38 @@ def copy(): return redirect(url_for("index")) -@APP.route("/files/unzip", methods=["POST"]) +@APP.route("/files/extract_image", methods=["POST"]) @login_required -def unzip(): +def extract_image(): """ - Unzips all files in a specified zip archive, or a single file in the zip archive + Extracts all or a subset of files in the specified archive """ - zip_file = request.form.get("zip_file") - zip_member = request.form.get("zip_member") or False - zip_members = request.form.get("zip_members") or False + archive_file = request.form.get("archive_file") + archive_members_raw = request.form.get("archive_members") or None + archive_members = archive_members_raw.split("|") if archive_members_raw else None - if zip_members: - zip_members = literal_eval(zip_members) + extract_result = file_cmd.extract_image( + archive_file, + archive_members + ) - process = file_cmd.unzip_file(zip_file, zip_member, zip_members) - if process["status"]: - if not process["msg"]: - flash(_("Aborted unzip: File(s) with the same name already exists."), "error") - return redirect(url_for("index")) - flash(_("Unzipped the following files:")) - for msg in process["msg"]: - flash(msg) - if process["prop_flag"]: - flash(_("Properties file(s) have been moved to %(directory)s", directory=CFG_DIR)) - return redirect(url_for("index")) + if extract_result["return_code"] == ReturnCodes.EXTRACTIMAGE_SUCCESS: + flash(ReturnCodeMapper.add_msg(extract_result).get("msg")) + + for properties_file in extract_result["properties_files_moved"]: + if properties_file["status"]: + flash(_("Properties file %(file)s moved to %(directory)s", + file=properties_file['name'], + directory=CFG_DIR + )) + else: + flash(_("Failed to move properties file %(file)s to %(directory)s", + file=properties_file['name'], + directory=CFG_DIR + ), "error") + else: + flash(ReturnCodeMapper.add_msg(extract_result).get("msg"), "error") - flash(_("Failed to unzip %(zip_file)s", zip_file=zip_file), "error") - flash(process["msg"], "error") return redirect(url_for("index")) diff --git a/python/web/start.sh b/python/web/start.sh index a2013a7a..7954c0ea 100755 --- a/python/web/start.sh +++ b/python/web/start.sh @@ -25,6 +25,11 @@ if ! command -v unzip &> /dev/null ; then echo "Run 'sudo apt install unzip' to fix." ERROR=1 fi +if ! command -v unar &> /dev/null ; then + echo "unar could not be found" + echo "Run 'sudo apt install unar' to fix." + ERROR=1 +fi if [ $ERROR = 1 ] ; then echo echo "Fix errors and re-run ./start.sh" From 440fa650095c723fcccb5dd661a17119f629c2b1 Mon Sep 17 00:00:00 2001 From: Uwe Seimet <48174652+uweseimet@users.noreply.github.com> Date: Sat, 20 Aug 2022 02:34:31 +0200 Subject: [PATCH 07/20] Return partial mode page data depending on allocation length (#793) --- src/raspberrypi/devices/mode_page_device.cpp | 44 ++++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/raspberrypi/devices/mode_page_device.cpp b/src/raspberrypi/devices/mode_page_device.cpp index d625d580..5f7e3dde 100644 --- a/src/raspberrypi/devices/mode_page_device.cpp +++ b/src/raspberrypi/devices/mode_page_device.cpp @@ -50,43 +50,41 @@ int ModePageDevice::AddModePages(const DWORD *cdb, BYTE *buf, int max_length) return 0; } - int size = 0; + // Holds all mode page data + vector result; vector page0; for (auto const& page : pages) { - if (size + (int)page.second.size() > max_length) { - LOGWARN("Mode page data size exceeds reserved buffer size"); + // The specification mandates that page 0 must be returned after all others + if (page.first) { + size_t offset = result.size(); - page0.clear(); - - break; + // Page data + result.insert(result.end(), page.second.begin(), page.second.end()); + // Page code, PS bit may already have been set + result[offset] |= page.first; + // Page payload size + result[offset + 1] = page.second.size() - 2; } else { - // The specification mandates that page 0 must be returned after all others - if (page.first) { - // Page data - memcpy(&buf[size], page.second.data(), page.second.size()); - // Page code, PS bit may already have been set - buf[size] |= page.first; - // Page payload size - buf[size + 1] = page.second.size() - 2; - - size += page.second.size(); - } - else { - page0 = page.second; - } + page0 = page.second; } } // Page 0 must be last if (!page0.empty()) { - memcpy(&buf[size], page0.data(), page0.size()); + size_t offset = result.size(); + + // Page data + result.insert(result.end(), page0.begin(), page0.end()); // Page payload size - buf[size + 1] = page0.size() - 2; - size += page0.size(); + result[offset + 1] = page0.size() - 2; } + // Do not return more than the requested number of bytes + size_t size = (size_t)max_length < result.size() ? max_length : result.size(); + memcpy(buf, result.data(), size); + return size; } From 4f36fab55fe065e19b723d7cacf0d1dbf5fa9971 Mon Sep 17 00:00:00 2001 From: nucleogenic Date: Tue, 23 Aug 2022 03:24:08 +0100 Subject: [PATCH 08/20] Fix Python 3.7 compatibility (#800) --- python/common/src/util/unarchiver.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python/common/src/util/unarchiver.py b/python/common/src/util/unarchiver.py index f2a94c0a..7bbb4b9a 100644 --- a/python/common/src/util/unarchiver.py +++ b/python/common/src/util/unarchiver.py @@ -79,7 +79,8 @@ def extract_archive(file_path, **kwargs): extracted_members = [] for line in lines[1:-1]: - if line_matches := match(unar_file_extracted, line): + line_matches = match(unar_file_extracted, line) + if line_matches: matches = line_matches.groupdict() member = { "name": str(pathlib.PurePath(matches["path"]).name), @@ -90,7 +91,11 @@ def extract_archive(file_path, **kwargs): "absolute_path": str(pathlib.PurePath(tmp_dir).joinpath(matches["path"])), } - member_types = matches.get("types", "").removeprefix(", ").split(", ") + member_types = matches.get("types", "") + if member_types.startswith(", "): + member_types = member_types[2:].split(", ") + else: + member_types = member_types.split(", ") if "dir" in member_types: member["is_dir"] = True From 8846871e477f3f4a67d077b2536e4a9394b1b7c3 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 25 Aug 2022 17:56:53 -0700 Subject: [PATCH 09/20] 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 --- easyinstall.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/easyinstall.sh b/easyinstall.sh index f358fad1..4f27a6b3 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -770,7 +770,7 @@ function setupWirelessNetworking() { # Downloads, compiles, and installs Netatalk (AppleShare server) function installNetatalk() { - NETATALK_VERSION="2-220702" + NETATALK_VERSION="2-220801" AFP_SHARE_PATH="$HOME/afpshare" AFP_SHARE_NAME="Pi File Server" @@ -793,7 +793,7 @@ function installMacproxy { echo -n "Enter a port number 1024 - 65535, or press Enter to use the default port: " read -r CHOICE - if [ $CHOICE -ge "1024" ] && [ $CHOICE -le "65535" ]; then + if [[ $CHOICE -ge "1024" ]] && [[ $CHOICE -le "65535" ]]; then PORT=$CHOICE else echo "Using the default port $PORT" @@ -801,20 +801,19 @@ function installMacproxy { ( sudo apt-get update && sudo apt-get install python3 python3-venv --assume-yes ) Date: Thu, 25 Aug 2022 17:57:44 -0700 Subject: [PATCH 10/20] 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 --- README.md | 8 ++++++-- python/README.md | 17 +++++++++++++---- python/web/README.md | 6 +++++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5efb80bf..5a428d39 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,14 @@ RaSCSI Reloaded is using the GitHub Forking and Pull Request workflow to create your own fork where you can make changes, and then contribute it back to the project. Please remember to always make Pull Requests against the *develop* branch. + +If you want to add a new translation, or improve upon an existing one, please follow the instructions in the Web Interface README. Once the translation is complete, please use the same workflow as above to contribute it to the project. + I sell on Tindie -# Github Sponsors -Thank you to all of the Github sponsors who support the development community! +# GitHub Sponsors +Thank you to all of the GitHub sponsors who support the development community! Special thank you to the Gold level sponsors! - @mikelord68 diff --git a/python/README.md b/python/README.md index aa945662..23bfe886 100644 --- a/python/README.md +++ b/python/README.md @@ -1,12 +1,21 @@ -# RaSCSI Python Apps +# RaSCSI Reloaded Python Apps -This directory contains Python-based clients for RaSCSI as well as common +This directory contains Python-based clients for RaSCSI Reloaded as well as common packages that are shared among the clients. The following paragraphs in this README contain instructions that are shared among all Python apps. -### Static analysis with pylint +## Supported Python interpreter + +The policy in this project is to support the Python 3 interpreter that comes +standard with the current stable, as well as previous stable release of Debian. + +At the time of writing they are: +- Python 3.9.2 in [Debian Bullseye](https://packages.debian.org/bullseye/python3) +- Python 3.7.3 in [Debian Buster](https://packages.debian.org/buster/python3) + +## Static analysis with pylint It is recommended to run pylint against new code to protect against bugs and keep the code readable and maintainable. @@ -29,4 +38,4 @@ pylint web/src/web.py pylint common/src pylint web/src pylint oled/src -``` \ No newline at end of file +``` diff --git a/python/web/README.md b/python/web/README.md index 641bc2f6..cb610eaa 100644 --- a/python/web/README.md +++ b/python/web/README.md @@ -40,7 +40,7 @@ $ git push pi master ## Localizing the Web Interface -We use the Flask-Babel library and Flask/Jinja2 extension for i18n. +We use the Flask-Babel library and Flask/Jinja2 extension for internationalization (i18n). It uses the 'pybabel' command line tool for extracting and compiling localizations. The Web Interface start script will automatically compile localizations upon launch. @@ -114,6 +114,10 @@ msgstr "" "drivrutiner och inställningar." ``` +### Contributing to the project + +New or updated localizations are treated just like any other code change. See the [project README](https://github.com/akuker/RASCSI/tree/rdmark-readme-contributions#how-do-i-contribute) for further information. + ### (Optional) See translation stats for a localization Install the gettext package and use msgfmt to see the translation progress. ``` From 4a870a137c1f948ace0f54fdf1f0813b8d4eac1d Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 25 Aug 2022 17:59:18 -0700 Subject: [PATCH 11/20] Swedish localization update for the next 2208 release (#798) * Update Swedish localization for the 2208 release * Fix typo --- .../translations/sv/LC_MESSAGES/messages.po | 393 +++++++++--------- 1 file changed, 201 insertions(+), 192 deletions(-) diff --git a/python/web/src/translations/sv/LC_MESSAGES/messages.po b/python/web/src/translations/sv/LC_MESSAGES/messages.po index 96b3b48e..9a61bf1f 100644 --- a/python/web/src/translations/sv/LC_MESSAGES/messages.po +++ b/python/web/src/translations/sv/LC_MESSAGES/messages.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: RaSCSI 68kmla Edition\n" +"Project-Id-Version: RaSCSI Reloaded\n" "Report-Msgid-Bugs-To: https://github.com/akuker/RASCSI/issues\n" -"POT-Creation-Date: 2022-07-30 18:12-0700\n" -"PO-Revision-Date: 2021-12-24 16:16-0800\n" +"POT-Creation-Date: 2022-08-20 19:38-0700\n" +"PO-Revision-Date: 2022-08-20 20:16-0800\n" "Last-Translator: Daniel Markstedt \n" "Language: sv\n" "Language-Team: N/A\n" @@ -18,71 +18,71 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" -#: src/return_code_mapper.py:12 +#: src/return_code_mapper.py:13 #, python-format msgid "File deleted: %(file_path)s" msgstr "Raderade filen %(file_path)s" -#: src/return_code_mapper.py:13 +#: src/return_code_mapper.py:15 #, python-format msgid "File to delete not found: %(file_path)s" msgstr "Kunde ej radera filen %(file_path)s" -#: src/return_code_mapper.py:14 +#: src/return_code_mapper.py:17 #, python-format msgid "File moved to: %(target_path)s" msgstr "Flyttade filen till %(target_path)s" -#: src/return_code_mapper.py:15 +#: src/return_code_mapper.py:19 #, python-format msgid "Unable to move file to: %(target_path)s" msgstr "Kunde ej flytta filen till %(target_path)s" -#: src/return_code_mapper.py:16 +#: src/return_code_mapper.py:21 #, python-format msgid "Created CD-ROM ISO image with arguments \"%(value)s\"" msgstr "Skapade en cd-rom ISO-fil med argumentet \"%(value)s\"" -#: src/return_code_mapper.py:18 +#: src/return_code_mapper.py:23 #, python-format msgid "%(file_name)s downloaded to %(save_dir)s" msgstr "Laddade ner %(file_name)s till %(save_dir)s" -#: src/return_code_mapper.py:19 +#: src/return_code_mapper.py:25 #, python-format msgid "File created: %(target_path)s" msgstr "Skapade filen %(target_path)s" -#: src/return_code_mapper.py:20 +#: src/return_code_mapper.py:27 #, python-format msgid "Could not create file: %(target_path)s" msgstr "Kunde ej skapa filen %(target_path)s" -#: src/return_code_mapper.py:21 +#: src/return_code_mapper.py:29 #, python-format msgid "Loaded configurations from: %(file_name)s" msgstr "Laddade konfigurationer från %(file_name)s" -#: src/return_code_mapper.py:22 +#: src/return_code_mapper.py:31 #, python-format msgid "Could not read configuration file: %(file_name)s" msgstr "Kunde ej läsa konfigurationer från filen %(file_name)s" -#: src/return_code_mapper.py:24 +#: src/return_code_mapper.py:33 msgid "Invalid configuration file format" msgstr "Ogiltigt konfigurationsfilformat" -#: src/return_code_mapper.py:25 +#: src/return_code_mapper.py:35 #, python-format msgid "Read properties from file: %(file_path)s" msgstr "Läste egenskaper från filen %(file_path)s" -#: src/return_code_mapper.py:26 +#: src/return_code_mapper.py:37 #, python-format msgid "Could not read properties from file: %(file_path)s" msgstr "Kunde ej läsa egenskaper från filen %(file_path)s" -#: src/return_code_mapper.py:28 +#: src/return_code_mapper.py:39 #, python-format msgid "" "Cannot insert an image for %(device_type)s into a %(current_device_type)s" @@ -91,6 +91,24 @@ msgstr "" "Det går inte att mata in en skiva av typ %(device_type)s i en enhet av " "typ %(current_device_type)s" +#: src/return_code_mapper.py:41 +#, python-format +msgid "Extracted %(count)s file(s)" +msgstr "Packade upp %(count)s fil(er)" + +#: src/return_code_mapper.py:43 +msgid "Unable to extract archive: No files were specified" +msgstr "Kunde ej packa upp arkivet: Inga filer valdes" + +#: src/return_code_mapper.py:45 +msgid "No files were extracted (existing files are skipped)" +msgstr "Inga filer packages upp (hoppade över existerande filer)" + +#: src/return_code_mapper.py:47 +#, python-format +msgid "Unable to extract archive: %(error)s" +msgstr "Kunde ej packa upp arkivet: %(error)s" + #: src/socket_cmds_flask.py:34 #, python-format msgid "" @@ -118,7 +136,7 @@ msgstr "" "RaSCSIs webbgränssnitt fick en ogiltig respons från RaSCSI. Gå tillbaks " "och försök igen. Om samma fel upprepas så rapportera en bugg." -#: src/web.py:105 +#: src/web.py:106 msgid "" "RaSCSI is password protected. Start the Web Interface with the --password" " parameter." @@ -126,41 +144,41 @@ msgstr "" "RaSCSI är lösenordsskyddat. Start webbgränssnittet med parametern " "--password ." -#: src/web.py:209 +#: src/web.py:208 #, python-format msgid "Could not read drive properties from %(properties_file)s" msgstr "Kunde ej läsa egenskaper från %(properties_file)s" -#: src/web.py:274 +#: src/web.py:273 #, python-format msgid "You must log in with credentials for a user in the '%(group)s' group" msgstr "Du måste logga in som en användare som tillhör %(group)s-gruppen" -#: src/web.py:332 src/web.py:835 +#: src/web.py:331 src/web.py:834 #, python-format msgid "Image file created: %(file_name)s" msgstr "Skapade skivbildsfil %(file_name)s" -#: src/web.py:449 +#: src/web.py:448 msgid "An error occurred when fetching logs." msgstr "Ett fel inträffade när vi skaffade loggar." -#: src/web.py:464 +#: src/web.py:463 #, python-format msgid "Log level set to %(value)s" msgstr "Bytte loggnivån till %(value)s" -#: src/web.py:491 +#: src/web.py:490 #, python-format msgid "Please follow the instructions at %(url)s" msgstr "Följ instruktionerna på %(url)s" -#: src/web.py:510 +#: src/web.py:509 #, python-format msgid "Attached %(device_type)s to SCSI ID %(id_number)s LUN %(unit_number)s" msgstr "Anslöt %(device_type)s till SCSI-id %(id_number)s LUN %(unit_number)s" -#: src/web.py:562 +#: src/web.py:561 #, python-format msgid "" "Attached %(file_name)s as %(device_type)s to SCSI ID %(id_number)s LUN " @@ -169,7 +187,7 @@ msgstr "" "Anslöt %(file_name)s som %(device_type)s till SCSI-id %(id_number)s LUN " "%(unit_number)s" -#: src/web.py:567 +#: src/web.py:566 #, python-format msgid "" "The image file size %(file_size)s bytes is not a multiple of " @@ -180,7 +198,7 @@ msgstr "" "RaSCSI ignorerar den överflödiga datan. Skivbilden är möjligen förstörd, " "så var försiktig när du använder den." -#: src/web.py:576 +#: src/web.py:575 #, python-format msgid "" "Failed to attach %(file_name)s to SCSI ID %(id_number)s LUN " @@ -189,125 +207,125 @@ msgstr "" "Kunde inte ansluta %(file_name)s till SCSI-id %(id_number)s LUN " "%(unit_number)s" -#: src/web.py:590 +#: src/web.py:589 msgid "Detached all SCSI devices" msgstr "Kopplade ifrån alla SCSI-enheter" -#: src/web.py:607 +#: src/web.py:606 #, python-format msgid "Detached SCSI ID %(id_number)s LUN %(unit_number)s" msgstr "Kopplade ifrån SCSI-id %(id_number)s LUN %(unit_number)s" -#: src/web.py:611 +#: src/web.py:610 #, python-format msgid "Failed to detach SCSI ID %(id_number)s LUN %(unit_number)s" msgstr "Kunde ej koppla ifrån SCSI-id %(id_number)s LUN %(unit_number)s" -#: src/web.py:628 +#: src/web.py:627 #, python-format msgid "Ejected SCSI ID %(id_number)s LUN %(unit_number)s" msgstr "Utmatade SCSI-id %(id_number)s LUN %(unit_number)s" -#: src/web.py:632 +#: src/web.py:631 #, python-format msgid "Failed to eject SCSI ID %(id_number)s LUN %(unit_number)s" msgstr "Kunde ej mata ut skiva från SCSI-id %(id_number)s LUN %(unit_number)s" -#: src/web.py:655 +#: src/web.py:654 msgid "DEVICE INFO" msgstr "ENHETSDETALJER" -#: src/web.py:657 +#: src/web.py:656 #, python-format msgid "SCSI ID: %(id_number)s" msgstr "SCSI-id: %(id_number)s" -#: src/web.py:658 +#: src/web.py:657 #, python-format msgid "LUN: %(unit_number)s" msgstr "LUN: %(unit_number)s" -#: src/web.py:659 +#: src/web.py:658 #, python-format msgid "Type: %(device_type)s" msgstr "Typ: %(device_type)s" -#: src/web.py:660 +#: src/web.py:659 #, python-format msgid "Status: %(device_status)s" msgstr "Status: %(device_status)s" -#: src/web.py:661 +#: src/web.py:660 #, python-format msgid "File: %(image_file)s" msgstr "Fil: %(image_file)s" -#: src/web.py:662 +#: src/web.py:661 #, python-format msgid "Parameters: %(value)s" msgstr "Parametrar: %(value)s" -#: src/web.py:663 +#: src/web.py:662 #, python-format msgid "Vendor: %(value)s" msgstr "Tillverkare: %(value)s" -#: src/web.py:664 +#: src/web.py:663 #, python-format msgid "Product: %(value)s" msgstr "Produkt: %(value)s" -#: src/web.py:665 +#: src/web.py:664 #, python-format msgid "Revision: %(revision_number)s" msgstr "Revision: %(revision_number)s" -#: src/web.py:666 +#: src/web.py:665 #, python-format msgid "Block Size: %(value)s bytes" msgstr "Blockstorlek: %(value)s byte" -#: src/web.py:667 +#: src/web.py:666 #, python-format msgid "Image Size: %(value)s bytes" msgstr "Skivbildsstorlek: %(value)s byte" -#: src/web.py:686 +#: src/web.py:685 #, python-format msgid "Reserved SCSI ID %(id_number)s" msgstr "Reserverat SCSI-id %(id_number)s" -#: src/web.py:689 +#: src/web.py:688 #, python-format msgid "Failed to reserve SCSI ID %(id_number)s" msgstr "Kunde ej reservera SCSI-id %(id_number)s" -#: src/web.py:705 +#: src/web.py:704 #, python-format msgid "Released the reservation for SCSI ID %(id_number)s" msgstr "Frigjorde SCSI-id %(id_number)s" -#: src/web.py:708 +#: src/web.py:707 #, python-format msgid "Failed to release the reservation for SCSI ID %(id_number)s" msgstr "Kunde ej frigöra SCSI-id %(id_number)s" -#: src/web.py:747 +#: src/web.py:746 #, python-format msgid "Saved image as: %(file_name)s" msgstr "Sparade bildfilen som %(file_name)s" -#: src/web.py:749 +#: src/web.py:748 #, python-format msgid "Failed to create CD-ROM image from %(url)s" msgstr "Kunde ej skapa CD-ROM-bildfil från %(url)s" -#: src/web.py:760 +#: src/web.py:759 #, python-format msgid "Attached to SCSI ID %(id_number)s" msgstr "Anslöt till SCSI-id %(id_number)s" -#: src/web.py:763 +#: src/web.py:762 #, python-format msgid "" "Failed to attach image to SCSI ID %(id_number)s. Try attaching it " @@ -316,45 +334,37 @@ msgstr "" "Kunde ej ansluta bildfilen till SCSI-id %(id_number)s. Försök ansluta den" " manuellt." -#: src/web.py:783 src/web.py:802 +#: src/web.py:782 src/web.py:801 #, python-format msgid "Failed to download file from %(url)s" msgstr "Kunde ej ladda ner filen från %(url)s" -#: src/web.py:862 +#: src/web.py:861 #, python-format msgid "Image file deleted: %(file_name)s" msgstr "Filen %(file_name)s har blivit raderad" -#: src/web.py:894 +#: src/web.py:893 #, python-format msgid "Image file renamed to: %(file_name)s" msgstr "Filen har blivit omdöpt till %(file_name)s" -#: src/web.py:926 +#: src/web.py:925 #, python-format msgid "Copy of image file saved as: %(file_name)s" msgstr "Kopierade filen och sparade den som %(file_name)s" -#: src/web.py:963 -msgid "Aborted unzip: File(s) with the same name already exists." -msgstr "Uppackning stoppad: En eller flera filer med samma namn existerar redan." - -#: src/web.py:965 -msgid "Unzipped the following files:" -msgstr "Packade up dessa filer:" - -#: src/web.py:969 +#: src/web.py:966 #, python-format -msgid "Properties file(s) have been moved to %(directory)s" -msgstr "En eller flera egenskapsfiler har blivit flyttade till %(directory)s" +msgid "Properties file %(file)s moved to %(directory)s" +msgstr "Egenskapsfil %(file)s flyttades till %(directory)s" -#: src/web.py:972 +#: src/web.py:971 #, python-format -msgid "Failed to unzip %(zip_file)s" -msgstr "Kunde ej packa up %(zip_file)s" +msgid "Failed to move properties file %(file)s to %(directory)s" +msgstr "Kunde ej flytta egenskapsfilen %(file)s till %(directory)s" -#: src/web.py:990 +#: src/web.py:994 #, python-format msgid "Changed Web Interface language to %(locale)s" msgstr "Bytte webbgränssnittets språk till %(locale)s" @@ -550,7 +560,7 @@ msgid "Save as:" msgstr "Spara som:" #: src/templates/drives.html:41 src/templates/drives.html:88 -#: src/templates/drives.html:131 src/templates/index.html:575 +#: src/templates/drives.html:131 src/templates/index.html:576 msgid "Create" msgstr "Skapa" @@ -574,7 +584,7 @@ msgstr "Skapa för:" msgid "Removable Drives" msgstr "Uttagbara enheter" -#: src/templates/drives.html:138 src/templates/index.html:301 +#: src/templates/drives.html:138 src/templates/index.html:302 #, python-format msgid "%(disk_space)s MB disk space remaining on the Pi" msgstr "%(disk_space)s MB återstår på Pi-systemets skiva" @@ -616,7 +626,7 @@ msgstr "Ladda" msgid "Detach all current device and Load configuration?" msgstr "Koppla ifrån alla enheter och ladda konfigurationen?" -#: src/templates/index.html:30 src/templates/index.html:293 +#: src/templates/index.html:30 src/templates/index.html:294 msgid "Delete" msgstr "Radera" @@ -628,12 +638,12 @@ msgstr "Radera konfigurationsfilen?" msgid "Save" msgstr "Spara" -#: src/templates/index.html:41 src/templates/index.html:251 +#: src/templates/index.html:41 src/templates/index.html:252 msgid "ID" msgstr "Id" -#: src/templates/index.html:43 src/templates/index.html:259 -#: src/templates/index.html:360 +#: src/templates/index.html:43 src/templates/index.html:260 +#: src/templates/index.html:361 msgid "LUN" msgstr "LUN" @@ -657,8 +667,8 @@ msgstr "Produkt" msgid "Actions" msgstr "Handlingar" -#: src/templates/index.html:84 src/templates/index.html:278 -#: src/templates/index.html:362 +#: src/templates/index.html:84 src/templates/index.html:279 +#: src/templates/index.html:363 msgid "Attach" msgstr "Anslut" @@ -740,7 +750,7 @@ msgstr "" msgid "Size" msgstr "Storlek" -#: src/templates/index.html:167 src/templates/index.html:326 +#: src/templates/index.html:167 src/templates/index.html:327 msgid "Parameters and Actions" msgstr "Parametrar och handlingar" @@ -748,16 +758,16 @@ msgstr "Parametrar och handlingar" msgid "Properties File" msgstr "Egenskapsfil" -#: src/templates/index.html:203 src/templates/index.html:217 -msgid "Unzip" +#: src/templates/index.html:205 src/templates/index.html:217 +msgid "Extract" msgstr "Packa upp" -#: src/templates/index.html:203 src/templates/index.html:217 -msgid "Unzipping a single file..." +#: src/templates/index.html:205 src/templates/index.html:217 +msgid "Extracting a single file..." msgstr "Packar upp en fil..." -#: src/templates/index.html:232 src/templates/index.html:416 -#: src/templates/index.html:574 +#: src/templates/index.html:232 src/templates/index.html:417 +#: src/templates/index.html:575 msgid "MB" msgstr "MB" @@ -765,46 +775,46 @@ msgstr "MB" msgid "Attached!" msgstr "Ansluten!" -#: src/templates/index.html:245 -msgid "Unzip All" +#: src/templates/index.html:246 +msgid "Extract All" msgstr "Packa upp allt" -#: src/templates/index.html:245 -msgid "Unzipping all files..." +#: src/templates/index.html:246 +msgid "Extracting all files..." msgstr "Packar upp alla filer..." -#: src/templates/index.html:267 +#: src/templates/index.html:268 msgid "Select media type" msgstr "Välj filbildstyp" -#: src/templates/index.html:281 +#: src/templates/index.html:282 #, python-format msgid "Enter new file name for: %(file_name)s" msgstr "Ange ett nytt filnamn åt %(file_name)s" -#: src/templates/index.html:284 +#: src/templates/index.html:285 msgid "Rename" msgstr "Döp om" -#: src/templates/index.html:286 +#: src/templates/index.html:287 #, python-format msgid "Save copy of %(file_name)s as:" msgstr "Spara kopia av %(file_name)s som:" -#: src/templates/index.html:289 +#: src/templates/index.html:290 msgid "Copy" msgstr "Kopiera" -#: src/templates/index.html:291 +#: src/templates/index.html:292 #, python-format msgid "Delete file: %(file_name)s?" msgstr "Radera filen %(file_name)s?" -#: src/templates/index.html:306 +#: src/templates/index.html:307 msgid "Attach Peripheral Device" msgstr "Anslut tillbehör" -#: src/templates/index.html:309 +#: src/templates/index.html:310 #, python-format msgid "" "DaynaPORT SCSI/Link and DaynaPORT SCSI/Link och X68000-värdbryggan är nätverksenheter." -#: src/templates/index.html:312 +#: src/templates/index.html:313 msgid "" "If you have a DHCP setup, choose only the interface you have configured " "the bridge with. You can ignore the inet field when attaching." @@ -821,7 +831,7 @@ msgstr "" "Om du använder DHCP, välj endast nätverskgränssnittet som bryggan är " "konfigurerad med. Du kan ignorera inet-fältet." -#: src/templates/index.html:313 +#: src/templates/index.html:314 #, python-format msgid "" "Configure the network bridge by running easyinstall.sh, or follow the wikin." -#: src/templates/index.html:315 +#: src/templates/index.html:316 msgid "" "The rascsi_bridge network bridge is active and ready to be used " "by an emulated network adapter!" @@ -838,7 +848,7 @@ msgstr "" "Nätverksbryggan rascsi_bridge är påslagen och kan användas av " "det emulerade gränssnittet!" -#: src/templates/index.html:319 +#: src/templates/index.html:320 #, python-format msgid "" "The Printer and Host Services device are currently supported on " @@ -848,20 +858,20 @@ msgstr "" "Skrivaren och värdtjänsterna kräver att drivrutiner installeras först." -#: src/templates/index.html:325 +#: src/templates/index.html:326 msgid "Peripheral" msgstr "Tillbehör" -#: src/templates/index.html:352 src/templates/index.html:499 +#: src/templates/index.html:353 src/templates/index.html:500 msgid "SCSI ID:" msgstr "SCSI-id:" -#: src/templates/index.html:369 +#: src/templates/index.html:370 #, python-format msgid "Macproxy is running at %(ip_addr)s (default port 5000)" msgstr "Macproxy är tillgängligt på %(ip_addr)s (vanligtvis port 5000)" -#: src/templates/index.html:371 +#: src/templates/index.html:372 #, python-format msgid "" "Install Macproxy to browse the Web with any " @@ -870,11 +880,11 @@ msgstr "" "Installera Macproxy för att surfa på nätet med " "gamla webbläsare. Den är inte bara till för Macar!" -#: src/templates/index.html:377 +#: src/templates/index.html:378 msgid "Upload File" msgstr "Ladda up fil" -#: src/templates/index.html:380 +#: src/templates/index.html:381 #, python-format msgid "" "Uploads file to %(directory)s. The largest file size accepted is" @@ -883,7 +893,7 @@ msgstr "" "Ladda upp fil till %(directory)s. Den största tillåtna " "filstorleken är %(max_file_size)s MB." -#: src/templates/index.html:381 +#: src/templates/index.html:382 msgid "" "For unrecognized file types, try renaming hard drive images to '.hds', " "CD-ROM images to '.iso', and removable drive images to '.hdr' before " @@ -893,20 +903,20 @@ msgstr "" "hårddiskbildfiler till '.hds', cd-bildfiler till '.iso', och utmatbara " "bildfiler till '.hdr' innan du laddar upp dem." -#: src/templates/index.html:382 +#: src/templates/index.html:383 #, python-format msgid "Recognized file types: %(valid_file_suffix)s" msgstr "Kända filtyper: %(valid_file_suffix)s" -#: src/templates/index.html:402 +#: src/templates/index.html:403 msgid "Drop files here to upload" msgstr "Släpp filer här för att ladda upp" -#: src/templates/index.html:403 +#: src/templates/index.html:404 msgid "Your browser does not support drag'n'drop file uploads." msgstr "Din webbläsare stöder ej filuppladdning via dra och släpp." -#: src/templates/index.html:404 +#: src/templates/index.html:405 msgid "" "Please use the fallback form below to upload your files like in the olden" " days." @@ -914,90 +924,90 @@ msgstr "" "Använd reservformuläret nedan för att ladda upp dina filer på gammaldags " "vis." -#: src/templates/index.html:405 +#: src/templates/index.html:406 msgid "File is too big: {{filesize}}MB. Max filesize: {{maxFilesize}}MB." msgstr "" "Filen är för stor: {{filesize}}MB. Största möjliga storlek: " "{{maxFilesize}}MB." -#: src/templates/index.html:406 +#: src/templates/index.html:407 msgid "You can't upload files of this type." msgstr "Du kan ej ladda upp filer av den här typen." -#: src/templates/index.html:407 +#: src/templates/index.html:408 msgid "Server responded with code: {{statusCode}}" msgstr "Servern svarade med kod: {{statusCode}}" -#: src/templates/index.html:408 +#: src/templates/index.html:409 msgid "Cancel upload" msgstr "Avbryt uppladdning" -#: src/templates/index.html:409 +#: src/templates/index.html:410 msgid "Upload canceled." msgstr "Uppladdningen avbröts." -#: src/templates/index.html:410 +#: src/templates/index.html:411 msgid "Are you sure you want to cancel this upload?" msgstr "Är du säker på att du vill avbryta uppladdningen?" -#: src/templates/index.html:411 +#: src/templates/index.html:412 msgid "Remove file" msgstr "Radera fil" -#: src/templates/index.html:412 +#: src/templates/index.html:413 msgid "You can not upload any more files." msgstr "Du kan inte ladda upp några fler filer." -#: src/templates/index.html:414 +#: src/templates/index.html:415 msgid "TB" msgstr "TB" -#: src/templates/index.html:415 +#: src/templates/index.html:416 msgid "GB" msgstr "GB" -#: src/templates/index.html:417 +#: src/templates/index.html:418 msgid "KB" msgstr "KB" -#: src/templates/index.html:418 +#: src/templates/index.html:419 msgid "b" msgstr "b" -#: src/templates/index.html:427 +#: src/templates/index.html:428 msgid "Download File to Images" msgstr "Ladda ner fil till skivbildskatalogen" -#: src/templates/index.html:430 +#: src/templates/index.html:431 #, python-format msgid "Given a URL, download that file to the %(directory)s directory." msgstr "" "Ta en webbadress och ladda ner en fil till katalogen " "%(directory)s" -#: src/templates/index.html:438 src/templates/index.html:464 -#: src/templates/index.html:508 +#: src/templates/index.html:439 src/templates/index.html:465 +#: src/templates/index.html:509 msgid "URL:" msgstr "Webbadress:" -#: src/templates/index.html:439 src/templates/index.html:465 -#: src/templates/index.html:509 +#: src/templates/index.html:440 src/templates/index.html:466 +#: src/templates/index.html:510 msgid "URL" msgstr "Webbadress" -#: src/templates/index.html:440 src/templates/index.html:466 +#: src/templates/index.html:441 src/templates/index.html:467 msgid "Download" msgstr "Ladda ner" -#: src/templates/index.html:440 +#: src/templates/index.html:441 msgid "Downloading File to Images..." msgstr "Laddar ner filen till skivbildskatalogen..." -#: src/templates/index.html:450 +#: src/templates/index.html:451 msgid "Download File to AppleShare" msgstr "Ladda ner fil till AppleShare" -#: src/templates/index.html:453 +#: src/templates/index.html:454 #, python-format msgid "" "Given a URL, download that file to the %(directory)s directory " @@ -1006,11 +1016,11 @@ msgstr "" "Ta en webbadress och ladda ner en fil till katalogen " "%(directory)s och fildela den över AFP." -#: src/templates/index.html:454 +#: src/templates/index.html:455 msgid "Manage the files you download here through AppleShare on your vintage Mac." msgstr "Hantera dessa filer via AppleShare på din gamla Mac." -#: src/templates/index.html:455 +#: src/templates/index.html:456 #, python-format msgid "" "Requires Netatalk to be installed and configured " @@ -1019,25 +1029,25 @@ msgstr "" "Kräver att Netatalk är installerat och inställt " "på lämpligt vis för ditt nätverk." -#: src/templates/index.html:466 +#: src/templates/index.html:467 msgid "Downloading File to AppleShare..." msgstr "Laddar ner fil till AppleShare..." -#: src/templates/index.html:473 +#: src/templates/index.html:474 msgid "The AppleShare server is running. No active connections." msgstr "AppleShare-servern är aktiv. Inga klienter är anslutna." -#: src/templates/index.html:475 +#: src/templates/index.html:476 #, python-format msgid "%(value)d active AFP connection" msgstr "%(value)d aktiv AFP-klient" -#: src/templates/index.html:477 +#: src/templates/index.html:478 #, python-format msgid "%(value)d active AFP connections" msgstr "%(value)d aktiva AFP-klienter" -#: src/templates/index.html:480 +#: src/templates/index.html:481 #, python-format msgid "" "Install Netatalk to use the AppleShare File " @@ -1046,11 +1056,11 @@ msgstr "" "Installera Netatalk för att använda AppleShare-" "fildelning." -#: src/templates/index.html:487 +#: src/templates/index.html:488 msgid "Download File and Create CD-ROM image" msgstr "Ladda ner fil och skapa en cd-bildfil" -#: src/templates/index.html:490 +#: src/templates/index.html:491 msgid "" "Create an ISO file system CD-ROM image with the downloaded file, and " "mount it on the given SCSI ID." @@ -1058,16 +1068,16 @@ msgstr "" "Skapar en cd-bildfil med ISO-filsystem som innehåller den nedladdade " "filen. Sedan ansluts den till det angivna SCSI-id:t." -#: src/templates/index.html:491 +#: src/templates/index.html:492 msgid "HFS is for Mac OS, Joliet for Windows, and Rock Ridge for POSIX." msgstr "HFS är för Mac OS, Joliet för Windows, samt Rock Ridge för POSIX." -#: src/templates/index.html:492 +#: src/templates/index.html:493 #, python-format msgid "On Mac OS, a compatible CD-ROM driver is required." msgstr "På Mac OS krävs kompatibla cd-drivrutiner." -#: src/templates/index.html:493 +#: src/templates/index.html:494 msgid "" "If the downloaded file is a zip archive, we will attempt to unzip it and " "store the resulting files." @@ -1075,27 +1085,27 @@ msgstr "" "Om den nedladdade filen är en zipfil så försöker vi packa up den och " "spara de uppackade filerna på cd-bildfilen." -#: src/templates/index.html:510 src/templates/index.html:555 +#: src/templates/index.html:511 src/templates/index.html:556 msgid "Type:" msgstr "Typ:" -#: src/templates/index.html:531 +#: src/templates/index.html:532 msgid "Download and Mount CD-ROM image" msgstr "Ladda ner och mata in cd-bildfil" -#: src/templates/index.html:531 +#: src/templates/index.html:532 msgid "Downloading File and generating CD-ROM image..." msgstr "Laddar ner fil och tillverkar cd-bildfil..." -#: src/templates/index.html:541 +#: src/templates/index.html:542 msgid "Create Empty Disk Image File" msgstr "Skapa en tom skivbilsdfil" -#: src/templates/index.html:544 +#: src/templates/index.html:545 msgid "The Generic image type is recommended for most computer platforms." msgstr "Det allmänna formatet är rekommederad för de flesta datorsystem." -#: src/templates/index.html:545 +#: src/templates/index.html:546 msgid "" "APPLE GENUINE (.hda) and NEC GENUINE (.hdn) image types will make RaSCSI " "behave as a particular drive type that are recognized by Mac and PC98 " @@ -1105,7 +1115,7 @@ msgstr "" "RaSCSI beter sig som en typ av hårddisk som Macar och PC98-datorer känner" " igen." -#: src/templates/index.html:546 +#: src/templates/index.html:547 msgid "" "SASI images should only be used on the original Sharp X68000, or other " "legacy systems that utilize this pre-SCSI standard." @@ -1114,43 +1124,43 @@ msgstr "" "X68000-modeller, eller andra riktigt gamla system som använder denna " "föregångare till SCSI." -#: src/templates/index.html:553 +#: src/templates/index.html:554 msgid "File Name:" msgstr "Filnamn:" -#: src/templates/index.html:554 +#: src/templates/index.html:555 msgid "File Name" msgstr "Filnamn" -#: src/templates/index.html:558 +#: src/templates/index.html:559 msgid "SCSI Hard Disk image (Generic) [.hds]" msgstr "SCSI-hårddisk (allmän) [.hds]" -#: src/templates/index.html:561 +#: src/templates/index.html:562 msgid "SCSI Hard Disk image (APPLE GENUINE) [.hda]" msgstr "SCSI-hårddisk (APPLE GENUINE) [.hda]" -#: src/templates/index.html:564 +#: src/templates/index.html:565 msgid "SCSI Hard Disk image (NEC GENUINE) [.hdn]" msgstr "SCSI-hårddisk (NEC GENUINE) [.hdn]" -#: src/templates/index.html:567 +#: src/templates/index.html:568 msgid "SCSI Removable Media Disk image (Generic) [.hdr]" msgstr "SCSI utmatbar skiva (allmän) [.hdr]" -#: src/templates/index.html:570 +#: src/templates/index.html:571 msgid "SASI Hard Disk image (Legacy) [.hdf]" msgstr "SASI-hårddisk (föråldrad) [.hdf]" -#: src/templates/index.html:573 +#: src/templates/index.html:574 msgid "Size:" msgstr "Storlek:" -#: src/templates/index.html:585 +#: src/templates/index.html:586 msgid "Create Named Drive" msgstr "Skapa benämnd skiva" -#: src/templates/index.html:588 +#: src/templates/index.html:589 msgid "" "Create pairs of images and properties files from a list of real-life " "drives." @@ -1158,7 +1168,7 @@ msgstr "" "Skapar ett par av skivbilds- och egenskapsfiler från en lista av verkliga" " enheter." -#: src/templates/index.html:589 +#: src/templates/index.html:590 msgid "" "This will make RaSCSI use certain vendor strings and block sizes that may" " improve compatibility with certain systems." @@ -1166,79 +1176,79 @@ msgstr "" "På så vis kommer RaSCSI använda vissa tillverkarattribut och " "blockstorlekar som kan hjälpa till med kompatibilitet." -#: src/templates/index.html:592 +#: src/templates/index.html:593 msgid "Create a named disk image that mimics real-life drives" msgstr "Skapa en benämnd skivbildfil som låstas vara en riktig enhet" -#: src/templates/index.html:598 +#: src/templates/index.html:599 msgid "Logging" msgstr "Loggar" -#: src/templates/index.html:601 +#: src/templates/index.html:602 msgid "Fetch a certain number of lines of system logs with the given scope." msgstr "Skaffar ett visst antal loggar för en viss systemprocess." -#: src/templates/index.html:608 +#: src/templates/index.html:609 msgid "Log Lines:" msgstr "Antal loggar:" -#: src/templates/index.html:610 +#: src/templates/index.html:611 msgid "Scope:" msgstr "Process:" -#: src/templates/index.html:613 +#: src/templates/index.html:614 msgid "All logs" msgstr "Alla loggar" -#: src/templates/index.html:628 +#: src/templates/index.html:629 msgid "Show Logs" msgstr "Skaffa loggar" -#: src/templates/index.html:638 +#: src/templates/index.html:639 msgid "Server Log Level" msgstr "Serverns loggnivå" -#: src/templates/index.html:641 +#: src/templates/index.html:642 msgid "Change the log level of the RaSCSI backend process." msgstr "Byt loggnivån för RaSCSI-servern" -#: src/templates/index.html:642 +#: src/templates/index.html:643 msgid "The current dropdown selection indicates the active log level." msgstr "Det nuvarande valet i rullgardinsmenyn påvisar aktiv loggnivå." -#: src/templates/index.html:649 +#: src/templates/index.html:650 msgid "Log Level:" msgstr "Loggnivå:" -#: src/templates/index.html:657 +#: src/templates/index.html:658 msgid "Set Log Level" msgstr "Byt loggnivå" -#: src/templates/index.html:667 +#: src/templates/index.html:668 msgid "Language" msgstr "Språk" -#: src/templates/index.html:670 +#: src/templates/index.html:671 msgid "Change the Web Interface language." msgstr "Byt webbgränssnittets språk." -#: src/templates/index.html:677 +#: src/templates/index.html:678 msgid "Language:" msgstr "Språk:" -#: src/templates/index.html:685 +#: src/templates/index.html:686 msgid "Change Language" msgstr "Byt språk" -#: src/templates/index.html:695 +#: src/templates/index.html:696 msgid "Raspberry Pi Operations" msgstr "Raspberry Pi-kommandon" -#: src/templates/index.html:698 +#: src/templates/index.html:699 msgid "Reboot or shut down the Raspberry Pi that RaSCSI is running on." msgstr "Starta om eller stäng av Raspberry Pi-systemet som RaSCSI körs på." -#: src/templates/index.html:699 +#: src/templates/index.html:700 msgid "" "IMPORTANT: Always shut down the Pi before turning off the power. Failing " "to do so may lead to data loss." @@ -1246,27 +1256,26 @@ msgstr "" "VIKTIGT: Stäng alltid av Pi-systemet innan du kopplar ur strömmen. På så " "vis undviker du risken att förlora data." -#: src/templates/index.html:705 +#: src/templates/index.html:706 msgid "Reboot the Raspberry Pi?" msgstr "Vill du starta om din Raspberry Pi?" -#: src/templates/index.html:705 +#: src/templates/index.html:706 msgid "Rebooting the Raspberry Pi..." msgstr "Startar om Raspberry Pi..." -#: src/templates/index.html:706 +#: src/templates/index.html:707 msgid "Reboot Raspberry Pi" msgstr "Starta om Raspberry Pi" -#: src/templates/index.html:710 +#: src/templates/index.html:711 msgid "Shut down the Raspberry Pi?" msgstr "Vill du stänga av din Raspberry Pi?" -#: src/templates/index.html:710 +#: src/templates/index.html:711 msgid "Shutting down the Raspberry Pi..." msgstr "Stänger av Raspberry Pi..." -#: src/templates/index.html:711 +#: src/templates/index.html:712 msgid "Shut Down Raspberry Pi" msgstr "Stäng av Raspberry Pi" - From aacc8e0c29debb11d6ef20f83b1da543dcf5c1bb Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 25 Aug 2022 17:59:57 -0700 Subject: [PATCH 12/20] 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 --- easyinstall.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/easyinstall.sh b/easyinstall.sh index 4f27a6b3..458bc747 100755 --- a/easyinstall.sh +++ b/easyinstall.sh @@ -13,7 +13,7 @@ logo="""  ~ (║|_____|║) ~\n ( : ║ .  __ ║ : )\n  ~ .╚╦═════╦╝. ~\n -  (  ¯¯¯¯¯¯¯  ) RaSCSI Assistant\n +  (  ¯¯¯¯¯¯¯  ) RaSCSI Reloaded Assistant\n    '~ .~~~. ~'\n        '~'\n """ @@ -90,7 +90,7 @@ function cachePipPackages(){ pushd $WEB_INSTALL_PATH # Refresh the sudo authentication, which shouldn't trigger another password prompt sudo -v - sudo pip install -r ./requirements.txt + sudo pip3 install -r ./requirements.txt popd } @@ -1066,11 +1066,11 @@ function runChoice() { echo "- Install manpages to /usr/local/man" echo "- Create a self-signed certificate in /etc/ssl" sudoCheck + createImagesDir + createCfgDir configureTokenAuth stopOldWebInterface updateRaScsiGit - createImagesDir - createCfgDir installPackages stopRaScsiScreen stopRaScsi @@ -1108,9 +1108,10 @@ function runChoice() { echo "- Install binaries to /usr/local/bin" echo "- Install manpages to /usr/local/man" sudoCheck + createImagesDir + createCfgDir configureTokenAuth updateRaScsiGit - createImagesDir installPackages stopRaScsiScreen stopRaScsi @@ -1197,8 +1198,8 @@ function runChoice() { echo "- Install binaries to /usr/local/bin" echo "- Install manpages to /usr/local/man" sudoCheck - updateRaScsiGit createImagesDir + updateRaScsiGit installPackages stopRaScsi compileRaScsi @@ -1216,8 +1217,8 @@ function runChoice() { echo "- Modify user groups and permissions" echo "- Create a self-signed certificate in /etc/ssl" sudoCheck - updateRaScsiGit createCfgDir + updateRaScsiGit installPackages preparePythonCommon cachePipPackages From 15c14e0404c57f542a38ab576b01dbf5041fd2b5 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 25 Aug 2022 18:01:39 -0700 Subject: [PATCH 13/20] Rebrand to RaSCSI Reloaded in C++ codebase (#805) --- src/raspberrypi/command_context.h | 2 +- src/raspberrypi/config.h | 2 +- src/raspberrypi/controllers/sasidev_ctrl.cpp | 2 +- src/raspberrypi/controllers/sasidev_ctrl.h | 2 +- src/raspberrypi/controllers/scsidev_ctrl.cpp | 2 +- src/raspberrypi/controllers/scsidev_ctrl.h | 2 +- src/raspberrypi/devices/cfilesystem.cpp | 2 +- src/raspberrypi/devices/cfilesystem.h | 2 +- src/raspberrypi/devices/ctapdriver.cpp | 2 +- src/raspberrypi/devices/ctapdriver.h | 2 +- src/raspberrypi/devices/device.cpp | 2 +- src/raspberrypi/devices/device.h | 2 +- src/raspberrypi/devices/device_factory.cpp | 2 +- src/raspberrypi/devices/device_factory.h | 2 +- src/raspberrypi/devices/dispatcher.h | 2 +- src/raspberrypi/devices/file_support.cpp | 2 +- src/raspberrypi/devices/file_support.h | 2 +- src/raspberrypi/devices/host_services.cpp | 2 +- src/raspberrypi/devices/host_services.h | 2 +- src/raspberrypi/devices/interfaces/scsi_block_commands.h | 2 +- src/raspberrypi/devices/interfaces/scsi_mmc_commands.h | 2 +- src/raspberrypi/devices/interfaces/scsi_primary_commands.h | 2 +- src/raspberrypi/devices/interfaces/scsi_printer_commands.h | 2 +- src/raspberrypi/devices/mode_page_device.cpp | 2 +- src/raspberrypi/devices/mode_page_device.h | 2 +- src/raspberrypi/devices/primary_device.cpp | 2 +- src/raspberrypi/devices/primary_device.h | 2 +- src/raspberrypi/devices/sasihd.cpp | 2 +- src/raspberrypi/devices/sasihd.h | 2 +- src/raspberrypi/devices/scsi_daynaport.cpp | 2 +- src/raspberrypi/devices/scsi_daynaport.h | 2 +- src/raspberrypi/devices/scsi_host_bridge.cpp | 2 +- src/raspberrypi/devices/scsi_host_bridge.h | 2 +- src/raspberrypi/devices/scsi_printer.cpp | 2 +- src/raspberrypi/devices/scsi_printer.h | 2 +- src/raspberrypi/devices/scsicd.cpp | 2 +- src/raspberrypi/devices/scsicd.h | 2 +- src/raspberrypi/devices/scsihd.cpp | 2 +- src/raspberrypi/devices/scsihd.h | 2 +- src/raspberrypi/devices/scsihd_nec.cpp | 2 +- src/raspberrypi/devices/scsihd_nec.h | 2 +- src/raspberrypi/devices/scsimo.cpp | 2 +- src/raspberrypi/devices/scsimo.h | 2 +- src/raspberrypi/exceptions.h | 2 +- src/raspberrypi/gpiobus.cpp | 2 +- src/raspberrypi/gpiobus.h | 2 +- src/raspberrypi/localizer.cpp | 2 +- src/raspberrypi/localizer.h | 2 +- src/raspberrypi/log.h | 2 +- src/raspberrypi/monitor/data_sample.cpp | 3 ++- src/raspberrypi/monitor/data_sample.h | 2 +- src/raspberrypi/monitor/sm_html_report.cpp | 2 +- src/raspberrypi/monitor/sm_json_report.cpp | 2 +- src/raspberrypi/monitor/sm_reports.h | 3 ++- src/raspberrypi/monitor/sm_vcd_report.cpp | 3 ++- src/raspberrypi/os.h | 2 +- src/raspberrypi/protobuf_util.cpp | 2 +- src/raspberrypi/protobuf_util.h | 2 +- src/raspberrypi/rascsi.cpp | 2 +- src/raspberrypi/rascsi_image.cpp | 2 +- src/raspberrypi/rascsi_image.h | 2 +- src/raspberrypi/rascsi_response.cpp | 2 +- src/raspberrypi/rascsi_response.h | 2 +- src/raspberrypi/rascsi_version.cpp | 2 +- src/raspberrypi/rascsi_version.h | 2 +- src/raspberrypi/rasctl.cpp | 2 +- src/raspberrypi/rasctl_commands.cpp | 2 +- src/raspberrypi/rasctl_commands.h | 2 +- src/raspberrypi/rasctl_display.cpp | 2 +- src/raspberrypi/rasctl_display.h | 2 +- src/raspberrypi/rasdump.cpp | 2 +- src/raspberrypi/rasutil.cpp | 2 +- src/raspberrypi/rasutil.h | 2 +- src/raspberrypi/sasidump.cpp | 2 +- src/raspberrypi/scsimon.cpp | 2 +- 75 files changed, 78 insertions(+), 75 deletions(-) diff --git a/src/raspberrypi/command_context.h b/src/raspberrypi/command_context.h index 37ae76ba..7bbe6bc3 100644 --- a/src/raspberrypi/command_context.h +++ b/src/raspberrypi/command_context.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/config.h b/src/raspberrypi/config.h index bde2641f..abb4d8c5 100644 --- a/src/raspberrypi/config.h +++ b/src/raspberrypi/config.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/controllers/sasidev_ctrl.cpp b/src/raspberrypi/controllers/sasidev_ctrl.cpp index 80dd2b64..2067846f 100644 --- a/src/raspberrypi/controllers/sasidev_ctrl.cpp +++ b/src/raspberrypi/controllers/sasidev_ctrl.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/controllers/sasidev_ctrl.h b/src/raspberrypi/controllers/sasidev_ctrl.h index 5917cf39..0f78c011 100644 --- a/src/raspberrypi/controllers/sasidev_ctrl.h +++ b/src/raspberrypi/controllers/sasidev_ctrl.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/controllers/scsidev_ctrl.cpp b/src/raspberrypi/controllers/scsidev_ctrl.cpp index a6fcdd6e..92d2b180 100644 --- a/src/raspberrypi/controllers/scsidev_ctrl.cpp +++ b/src/raspberrypi/controllers/scsidev_ctrl.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/controllers/scsidev_ctrl.h b/src/raspberrypi/controllers/scsidev_ctrl.h index 7d4fb0b0..8ac4fa49 100644 --- a/src/raspberrypi/controllers/scsidev_ctrl.h +++ b/src/raspberrypi/controllers/scsidev_ctrl.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/cfilesystem.cpp b/src/raspberrypi/devices/cfilesystem.cpp index ee4eddd3..a5070d1a 100644 --- a/src/raspberrypi/devices/cfilesystem.cpp +++ b/src/raspberrypi/devices/cfilesystem.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/devices/cfilesystem.h b/src/raspberrypi/devices/cfilesystem.h index 21f9593a..d1989ea7 100644 --- a/src/raspberrypi/devices/cfilesystem.h +++ b/src/raspberrypi/devices/cfilesystem.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/devices/ctapdriver.cpp b/src/raspberrypi/devices/ctapdriver.cpp index e089fb14..e7710dcc 100644 --- a/src/raspberrypi/devices/ctapdriver.cpp +++ b/src/raspberrypi/devices/ctapdriver.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/devices/ctapdriver.h b/src/raspberrypi/devices/ctapdriver.h index a582a451..60ebd5af 100644 --- a/src/raspberrypi/devices/ctapdriver.h +++ b/src/raspberrypi/devices/ctapdriver.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/devices/device.cpp b/src/raspberrypi/devices/device.cpp index 98e60f62..5e7dee2f 100644 --- a/src/raspberrypi/devices/device.cpp +++ b/src/raspberrypi/devices/device.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/device.h b/src/raspberrypi/devices/device.h index a47f601a..03df3b2f 100644 --- a/src/raspberrypi/devices/device.h +++ b/src/raspberrypi/devices/device.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/device_factory.cpp b/src/raspberrypi/devices/device_factory.cpp index 5fb7680b..6cc94228 100644 --- a/src/raspberrypi/devices/device_factory.cpp +++ b/src/raspberrypi/devices/device_factory.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/device_factory.h b/src/raspberrypi/devices/device_factory.h index 3edff4c2..5628f3b8 100644 --- a/src/raspberrypi/devices/device_factory.h +++ b/src/raspberrypi/devices/device_factory.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/dispatcher.h b/src/raspberrypi/devices/dispatcher.h index b702cd94..690da75d 100644 --- a/src/raspberrypi/devices/dispatcher.h +++ b/src/raspberrypi/devices/dispatcher.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/file_support.cpp b/src/raspberrypi/devices/file_support.cpp index 89219627..6b7cb1ef 100644 --- a/src/raspberrypi/devices/file_support.cpp +++ b/src/raspberrypi/devices/file_support.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/file_support.h b/src/raspberrypi/devices/file_support.h index a111bbb0..803dbfa4 100644 --- a/src/raspberrypi/devices/file_support.h +++ b/src/raspberrypi/devices/file_support.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/host_services.cpp b/src/raspberrypi/devices/host_services.cpp index fde70440..10bca4e3 100644 --- a/src/raspberrypi/devices/host_services.cpp +++ b/src/raspberrypi/devices/host_services.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/host_services.h b/src/raspberrypi/devices/host_services.h index 46d506c2..28a0292c 100644 --- a/src/raspberrypi/devices/host_services.h +++ b/src/raspberrypi/devices/host_services.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/interfaces/scsi_block_commands.h b/src/raspberrypi/devices/interfaces/scsi_block_commands.h index 584f6af8..0733d017 100644 --- a/src/raspberrypi/devices/interfaces/scsi_block_commands.h +++ b/src/raspberrypi/devices/interfaces/scsi_block_commands.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/interfaces/scsi_mmc_commands.h b/src/raspberrypi/devices/interfaces/scsi_mmc_commands.h index d275490e..d4666e14 100644 --- a/src/raspberrypi/devices/interfaces/scsi_mmc_commands.h +++ b/src/raspberrypi/devices/interfaces/scsi_mmc_commands.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/interfaces/scsi_primary_commands.h b/src/raspberrypi/devices/interfaces/scsi_primary_commands.h index 585c90e5..902239f5 100644 --- a/src/raspberrypi/devices/interfaces/scsi_primary_commands.h +++ b/src/raspberrypi/devices/interfaces/scsi_primary_commands.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/devices/interfaces/scsi_printer_commands.h b/src/raspberrypi/devices/interfaces/scsi_printer_commands.h index c4ad78b4..45729472 100644 --- a/src/raspberrypi/devices/interfaces/scsi_printer_commands.h +++ b/src/raspberrypi/devices/interfaces/scsi_printer_commands.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/mode_page_device.cpp b/src/raspberrypi/devices/mode_page_device.cpp index 5f7e3dde..b1e5d4ae 100644 --- a/src/raspberrypi/devices/mode_page_device.cpp +++ b/src/raspberrypi/devices/mode_page_device.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/mode_page_device.h b/src/raspberrypi/devices/mode_page_device.h index 19ec9db0..87358482 100644 --- a/src/raspberrypi/devices/mode_page_device.h +++ b/src/raspberrypi/devices/mode_page_device.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/primary_device.cpp b/src/raspberrypi/devices/primary_device.cpp index 7ecd96e2..60e0d537 100644 --- a/src/raspberrypi/devices/primary_device.cpp +++ b/src/raspberrypi/devices/primary_device.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/primary_device.h b/src/raspberrypi/devices/primary_device.h index bce506c3..fd8e4a2a 100644 --- a/src/raspberrypi/devices/primary_device.h +++ b/src/raspberrypi/devices/primary_device.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/sasihd.cpp b/src/raspberrypi/devices/sasihd.cpp index 9f36d118..36c91591 100644 --- a/src/raspberrypi/devices/sasihd.cpp +++ b/src/raspberrypi/devices/sasihd.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/sasihd.h b/src/raspberrypi/devices/sasihd.h index df0aa1e9..003fa2d4 100644 --- a/src/raspberrypi/devices/sasihd.h +++ b/src/raspberrypi/devices/sasihd.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsi_daynaport.cpp b/src/raspberrypi/devices/scsi_daynaport.cpp index a763a77f..1ab19fd5 100644 --- a/src/raspberrypi/devices/scsi_daynaport.cpp +++ b/src/raspberrypi/devices/scsi_daynaport.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2020 akuker diff --git a/src/raspberrypi/devices/scsi_daynaport.h b/src/raspberrypi/devices/scsi_daynaport.h index dbdbd639..6a2d409a 100644 --- a/src/raspberrypi/devices/scsi_daynaport.h +++ b/src/raspberrypi/devices/scsi_daynaport.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2020 akuker diff --git a/src/raspberrypi/devices/scsi_host_bridge.cpp b/src/raspberrypi/devices/scsi_host_bridge.cpp index bb84e8de..4a4a6f10 100644 --- a/src/raspberrypi/devices/scsi_host_bridge.cpp +++ b/src/raspberrypi/devices/scsi_host_bridge.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsi_host_bridge.h b/src/raspberrypi/devices/scsi_host_bridge.h index d212ea4b..0da3f5bf 100644 --- a/src/raspberrypi/devices/scsi_host_bridge.h +++ b/src/raspberrypi/devices/scsi_host_bridge.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsi_printer.cpp b/src/raspberrypi/devices/scsi_printer.cpp index 3445fcfc..f00a84ac 100644 --- a/src/raspberrypi/devices/scsi_printer.cpp +++ b/src/raspberrypi/devices/scsi_printer.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/scsi_printer.h b/src/raspberrypi/devices/scsi_printer.h index e24dfddd..41f685db 100644 --- a/src/raspberrypi/devices/scsi_printer.h +++ b/src/raspberrypi/devices/scsi_printer.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2022 Uwe Seimet diff --git a/src/raspberrypi/devices/scsicd.cpp b/src/raspberrypi/devices/scsicd.cpp index 65f9c933..83ab1cdb 100644 --- a/src/raspberrypi/devices/scsicd.cpp +++ b/src/raspberrypi/devices/scsicd.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsicd.h b/src/raspberrypi/devices/scsicd.h index 8d98408e..af213567 100644 --- a/src/raspberrypi/devices/scsicd.h +++ b/src/raspberrypi/devices/scsicd.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsihd.cpp b/src/raspberrypi/devices/scsihd.cpp index b066d2b7..60219f04 100644 --- a/src/raspberrypi/devices/scsihd.cpp +++ b/src/raspberrypi/devices/scsihd.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsihd.h b/src/raspberrypi/devices/scsihd.h index d6d3ed43..46ccbda7 100644 --- a/src/raspberrypi/devices/scsihd.h +++ b/src/raspberrypi/devices/scsihd.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsihd_nec.cpp b/src/raspberrypi/devices/scsihd_nec.cpp index f7af9bbe..2a02a75d 100644 --- a/src/raspberrypi/devices/scsihd_nec.cpp +++ b/src/raspberrypi/devices/scsihd_nec.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsihd_nec.h b/src/raspberrypi/devices/scsihd_nec.h index b00cec60..c3562e59 100644 --- a/src/raspberrypi/devices/scsihd_nec.h +++ b/src/raspberrypi/devices/scsihd_nec.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsimo.cpp b/src/raspberrypi/devices/scsimo.cpp index ea8b909f..30d58af5 100644 --- a/src/raspberrypi/devices/scsimo.cpp +++ b/src/raspberrypi/devices/scsimo.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/devices/scsimo.h b/src/raspberrypi/devices/scsimo.h index 4562ca74..77aae122 100644 --- a/src/raspberrypi/devices/scsimo.h +++ b/src/raspberrypi/devices/scsimo.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2001-2006 PI.(ytanaka@ipc-tokai.or.jp) diff --git a/src/raspberrypi/exceptions.h b/src/raspberrypi/exceptions.h index e9c7e431..01227bf5 100644 --- a/src/raspberrypi/exceptions.h +++ b/src/raspberrypi/exceptions.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/gpiobus.cpp b/src/raspberrypi/gpiobus.cpp index e12c4935..0987c3ca 100644 --- a/src/raspberrypi/gpiobus.cpp +++ b/src/raspberrypi/gpiobus.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/gpiobus.h b/src/raspberrypi/gpiobus.h index 2154ad8e..14b0cf11 100644 --- a/src/raspberrypi/gpiobus.h +++ b/src/raspberrypi/gpiobus.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/localizer.cpp b/src/raspberrypi/localizer.cpp index 63c75071..ce37b615 100644 --- a/src/raspberrypi/localizer.cpp +++ b/src/raspberrypi/localizer.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/localizer.h b/src/raspberrypi/localizer.h index c660e0b0..712ba5cf 100644 --- a/src/raspberrypi/localizer.h +++ b/src/raspberrypi/localizer.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/log.h b/src/raspberrypi/log.h index 7347376d..51d8861e 100644 --- a/src/raspberrypi/log.h +++ b/src/raspberrypi/log.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/monitor/data_sample.cpp b/src/raspberrypi/monitor/data_sample.cpp index ea8ec048..96e85670 100644 --- a/src/raspberrypi/monitor/data_sample.cpp +++ b/src/raspberrypi/monitor/data_sample.cpp @@ -1,6 +1,7 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) for Raspberry Pi +// SCSI Target Emulator RaSCSI Reloaded +// for Raspberry Pi // // Copyright (C) 2020-2021 akuker // diff --git a/src/raspberrypi/monitor/data_sample.h b/src/raspberrypi/monitor/data_sample.h index e153dc2c..8fcba808 100644 --- a/src/raspberrypi/monitor/data_sample.h +++ b/src/raspberrypi/monitor/data_sample.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2020-2021 akuker diff --git a/src/raspberrypi/monitor/sm_html_report.cpp b/src/raspberrypi/monitor/sm_html_report.cpp index 30f45b96..45d8f6a0 100644 --- a/src/raspberrypi/monitor/sm_html_report.cpp +++ b/src/raspberrypi/monitor/sm_html_report.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/monitor/sm_json_report.cpp b/src/raspberrypi/monitor/sm_json_report.cpp index 2da7942b..a9a4dd7b 100644 --- a/src/raspberrypi/monitor/sm_json_report.cpp +++ b/src/raspberrypi/monitor/sm_json_report.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/monitor/sm_reports.h b/src/raspberrypi/monitor/sm_reports.h index 3976e133..4309cc0a 100644 --- a/src/raspberrypi/monitor/sm_reports.h +++ b/src/raspberrypi/monitor/sm_reports.h @@ -1,6 +1,7 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) for Raspberry Pi +// SCSI Target Emulator RaSCSI Reloaded +// for Raspberry Pi // // Copyright (C) 2020-2021 akuker // diff --git a/src/raspberrypi/monitor/sm_vcd_report.cpp b/src/raspberrypi/monitor/sm_vcd_report.cpp index 762a949b..473422fa 100644 --- a/src/raspberrypi/monitor/sm_vcd_report.cpp +++ b/src/raspberrypi/monitor/sm_vcd_report.cpp @@ -1,6 +1,7 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) for Raspberry Pi +// SCSI Target Emulator RaSCSI Reloaded +// for Raspberry Pi // // Copyright (C) 2020-2021 akuker // diff --git a/src/raspberrypi/os.h b/src/raspberrypi/os.h index 3be011fb..e741db95 100644 --- a/src/raspberrypi/os.h +++ b/src/raspberrypi/os.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/protobuf_util.cpp b/src/raspberrypi/protobuf_util.cpp index 90c71d07..675da508 100644 --- a/src/raspberrypi/protobuf_util.cpp +++ b/src/raspberrypi/protobuf_util.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/protobuf_util.h b/src/raspberrypi/protobuf_util.h index e07efd66..e4b615e6 100644 --- a/src/raspberrypi/protobuf_util.h +++ b/src/raspberrypi/protobuf_util.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index 79711f4d..5de182ae 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/rascsi_image.cpp b/src/raspberrypi/rascsi_image.cpp index b171a759..ead8efde 100644 --- a/src/raspberrypi/rascsi_image.cpp +++ b/src/raspberrypi/rascsi_image.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rascsi_image.h b/src/raspberrypi/rascsi_image.h index be1d828a..1fa5165c 100644 --- a/src/raspberrypi/rascsi_image.h +++ b/src/raspberrypi/rascsi_image.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rascsi_response.cpp b/src/raspberrypi/rascsi_response.cpp index afa04959..4174e44f 100644 --- a/src/raspberrypi/rascsi_response.cpp +++ b/src/raspberrypi/rascsi_response.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rascsi_response.h b/src/raspberrypi/rascsi_response.h index d8c70474..eba4cef2 100644 --- a/src/raspberrypi/rascsi_response.h +++ b/src/raspberrypi/rascsi_response.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rascsi_version.cpp b/src/raspberrypi/rascsi_version.cpp index 71bcbbc1..13b0755e 100644 --- a/src/raspberrypi/rascsi_version.cpp +++ b/src/raspberrypi/rascsi_version.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2020 akuker diff --git a/src/raspberrypi/rascsi_version.h b/src/raspberrypi/rascsi_version.h index a39ced4e..ee0941d4 100644 --- a/src/raspberrypi/rascsi_version.h +++ b/src/raspberrypi/rascsi_version.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2020 akuker diff --git a/src/raspberrypi/rasctl.cpp b/src/raspberrypi/rasctl.cpp index 09e746c1..7c029277 100644 --- a/src/raspberrypi/rasctl.cpp +++ b/src/raspberrypi/rasctl.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/rasctl_commands.cpp b/src/raspberrypi/rasctl_commands.cpp index f192432d..773f8294 100644 --- a/src/raspberrypi/rasctl_commands.cpp +++ b/src/raspberrypi/rasctl_commands.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rasctl_commands.h b/src/raspberrypi/rasctl_commands.h index 35c3f8a2..bbb8ec24 100644 --- a/src/raspberrypi/rasctl_commands.h +++ b/src/raspberrypi/rasctl_commands.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rasctl_display.cpp b/src/raspberrypi/rasctl_display.cpp index 92172589..96e3f35d 100644 --- a/src/raspberrypi/rasctl_display.cpp +++ b/src/raspberrypi/rasctl_display.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rasctl_display.h b/src/raspberrypi/rasctl_display.h index 864027a4..a7f20480 100644 --- a/src/raspberrypi/rasctl_display.h +++ b/src/raspberrypi/rasctl_display.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rasdump.cpp b/src/raspberrypi/rasdump.cpp index d7cfe80d..3f3a5d43 100644 --- a/src/raspberrypi/rasdump.cpp +++ b/src/raspberrypi/rasdump.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/rasutil.cpp b/src/raspberrypi/rasutil.cpp index b7551d77..bcc8dc52 100644 --- a/src/raspberrypi/rasutil.cpp +++ b/src/raspberrypi/rasutil.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/rasutil.h b/src/raspberrypi/rasutil.h index dd5d52a1..6cb55150 100644 --- a/src/raspberrypi/rasutil.h +++ b/src/raspberrypi/rasutil.h @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Copyright (C) 2021 Uwe Seimet diff --git a/src/raspberrypi/sasidump.cpp b/src/raspberrypi/sasidump.cpp index 92d6dc48..10bd5be1 100644 --- a/src/raspberrypi/sasidump.cpp +++ b/src/raspberrypi/sasidump.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. diff --git a/src/raspberrypi/scsimon.cpp b/src/raspberrypi/scsimon.cpp index 092cc24d..560613db 100644 --- a/src/raspberrypi/scsimon.cpp +++ b/src/raspberrypi/scsimon.cpp @@ -1,6 +1,6 @@ //--------------------------------------------------------------------------- // -// SCSI Target Emulator RaSCSI (*^..^*) +// SCSI Target Emulator RaSCSI Reloaded // for Raspberry Pi // // Powered by XM6 TypeG Technology. From aeb657699647b4be25e38587cac0d104a80ff2d6 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Thu, 25 Aug 2022 18:04:49 -0700 Subject: [PATCH 14/20] Add drive property for a generic 512 byte block size CD-ROM drive. Issue#417 (#808) --- python/web/src/drive_properties.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/python/web/src/drive_properties.json b/python/web/src/drive_properties.json index eb3880fd..0b5a1c60 100644 --- a/python/web/src/drive_properties.json +++ b/python/web/src/drive_properties.json @@ -430,5 +430,17 @@ "file_type": null, "description": "Emulates Apple CD ROM drive for use with Macintosh computers.", "url": "" +}, +{ + "device_type": "SCCD", + "vendor": null, + "product": null, + "revision": null, + "block_size": 512, + "size": null, + "name": "Generic CD-ROM 512 block size", + "file_type": null, + "description": "For use with host systems that expect the non-standard 512 byte block size for CD-ROM drives, such as Akai samplers.", + "url": "" } ] From c6da145f0f9a4e3fde65bd2357a8fd86bca12f67 Mon Sep 17 00:00:00 2001 From: akuker <34318535+akuker@users.noreply.github.com> Date: Fri, 26 Aug 2022 03:19:42 -0500 Subject: [PATCH 15/20] handle the return value of write() (#810) Co-authored-by: Tony Kuker --- src/raspberrypi/devices/scsi_printer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raspberrypi/devices/scsi_printer.cpp b/src/raspberrypi/devices/scsi_printer.cpp index f00a84ac..2711596f 100644 --- a/src/raspberrypi/devices/scsi_printer.cpp +++ b/src/raspberrypi/devices/scsi_printer.cpp @@ -257,9 +257,9 @@ bool SCSIPrinter::WriteBytes(BYTE *buf, uint32_t length) LOGTRACE("Appending %d byte(s) to printer output file", length); - write(fd, buf, length); + uint32_t num_written = write(fd, buf, length); - return true; + return (num_written == length); } bool SCSIPrinter::CheckReservation(SCSIDEV *controller) From 52802019de3a363ae1f76625570bc1eac74a979f Mon Sep 17 00:00:00 2001 From: akuker <34318535+akuker@users.noreply.github.com> Date: Fri, 26 Aug 2022 09:32:10 -0500 Subject: [PATCH 16/20] Update CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f9857ddc..20e3089e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @akuker @erichelgeson +* @akuker @erichelgeson @rdmark From eeae12ac4d3edc6eda2aa3730585b992c53b40b3 Mon Sep 17 00:00:00 2001 From: Uwe Seimet <48174652+uweseimet@users.noreply.github.com> Date: Fri, 26 Aug 2022 16:50:18 +0200 Subject: [PATCH 17/20] Host services do not support an image file (#812) --- src/raspberrypi/devices/device.h | 2 +- src/raspberrypi/devices/host_services.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/raspberrypi/devices/device.h b/src/raspberrypi/devices/device.h index 03df3b2f..b2f069f2 100644 --- a/src/raspberrypi/devices/device.h +++ b/src/raspberrypi/devices/device.h @@ -167,7 +167,7 @@ public: const string GetPaddedName() const; bool SupportsParams() const { return supports_params; } - bool SupportsFile() const { return !supports_params; } + virtual bool SupportsFile() const { return !supports_params; } void SupportsParams(bool supports_paams) { this->supports_params = supports_paams; } const unordered_map GetParams() const { return params; } const string GetParam(const string&); diff --git a/src/raspberrypi/devices/host_services.h b/src/raspberrypi/devices/host_services.h index 28a0292c..73c21325 100644 --- a/src/raspberrypi/devices/host_services.h +++ b/src/raspberrypi/devices/host_services.h @@ -32,6 +32,8 @@ public: int ModeSense6(const DWORD *, BYTE *); int ModeSense10(const DWORD *, BYTE *, int); + bool SupportsFile() const override { return false; } + private: typedef ModePageDevice super; From 41ddc5fc3325c66e98cc2f2c38e6514b3f2e4ddd Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Sat, 27 Aug 2022 18:38:23 -0700 Subject: [PATCH 18/20] 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. --- python/web/README.md | 4 +++- python/web/src/templates/drives.html | 4 ++-- python/web/src/templates/index.html | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/python/web/README.md b/python/web/README.md index cb610eaa..6487bf9c 100644 --- a/python/web/README.md +++ b/python/web/README.md @@ -21,7 +21,9 @@ You may edit the files under `mock/bin` to simulate Linux command responses. TODO: rascsi-web uses protobuf commands to send and receive data from rascsi. A separate mocking solution will be needed for this interface. -## Pushing to the Pi via git +## (Optional) Pushing to the Pi via git + +This is a setup for pushing code changes from your local development environment to the Raspberry Pi without a roundtrip to the remote GitHub repository. Setup a bare repo on the rascsi ``` diff --git a/python/web/src/templates/drives.html b/python/web/src/templates/drives.html index accaee99..0d007ce4 100644 --- a/python/web/src/templates/drives.html +++ b/python/web/src/templates/drives.html @@ -34,7 +34,7 @@ - + {{ _("Size:") }} {{ _("B") }} .{{ hd.file_type }} @@ -124,7 +124,7 @@ - + {{ _("Size:") }} {{ _("B") }} .{{ rm.file_type }} diff --git a/python/web/src/templates/index.html b/python/web/src/templates/index.html index fb984d71..e2d86f57 100644 --- a/python/web/src/templates/index.html +++ b/python/web/src/templates/index.html @@ -258,7 +258,7 @@ {% endfor %} - + {% if file["detected_type"] != "UNDEFINED" %} {{ file['detected_type_name'] }} @@ -337,7 +337,7 @@ {% for key, value in device_types[type]["params"].items() %} {% if value.isnumeric() %} - + {% elif key == "interface" %} - + @@ -416,7 +416,7 @@ gb: "{{ _("GB") }}", mb: "{{ _("MB") }}", kb: "{{ _("KB") }}", - b: "{{ _("b") }}" + b: "{{ _("B") }}" } } @@ -572,7 +572,7 @@ - + @@ -607,7 +607,7 @@
- +