Commit Graph

1181 Commits

Author SHA1 Message Date
Uwe Seimet
4ae03e2ec7 Properly close file to be printed (#1428) 2024-02-03 07:51:44 +09:00
Daniel Markstedt
274b93fe27 Update unit tests 2024-01-27 07:22:19 +09:00
Daniel Markstedt
12d43f370d Update unit tests 2024-01-27 07:22:19 +09:00
Daniel Markstedt
040e5532a8 Recognize .cdr and .toast as CD-ROM image file endings 2024-01-27 07:22:19 +09:00
dependabot[bot]
c983598bce Bump pillow from 10.0.1 to 10.2.0 in /python/oled
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 07:30:58 +09:00
dependabot[bot]
be2cb569ca Bump pillow from 10.0.1 to 10.2.0 in /python/ctrlboard
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 07:30:14 +09:00
Klaus Kämpf
1121b8d9d6
Add ModeSense page 0x25 (DEC special function control page) (#1412)
* Add ModeSense page 0x25 (DECSpecialFunctionControlPage)

VAXServer 3100 (CPU KA41-E) console firmware issues ModeSense(6)
page 0x25 when probing for disks. A disk won't be recognized if
this returns an error.

The DEC SCSI specification[1], section 8.5 documents this page.

[1] https://manx-docs.org/collections/antonio/dec/dec-scsi.pdf

Fixes #1410

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
2024-01-18 16:55:38 -08:00
Klaus Kämpf
7cc8df271c DiskCache needs a size
otherwise its constructor assertion (block > 0) will fail.

Fixes #1418

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
2024-01-18 13:44:33 +09:00
Daniel Markstedt
818addb0e0
CI workflow: Build unit tests in debug mode (#1417)
* Run CI jobs on push events only when merged to develop or main

* Build unit tests with debug flags
2024-01-18 13:38:55 +09:00
Uwe Seimet
7a986c84aa Fix remote interface communication issue (broken pipe) (#1415) 2024-01-16 10:56:25 +09:00
dependabot[bot]
f935556887
Bump jinja2 from 3.1.2 to 3.1.3 in /python/web (#1411)
* Bump jinja2 from 3.1.2 to 3.1.3 in /python/web

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-13 16:19:33 +09:00
Delan Azabani
2f483fdd9c
Fix problems installing on Raspberry Pi OS 12 (bookworm) (#1408)
* Fix problems installing on Raspberry Pi OS 12 (bookworm)

* don’t cachePipPackages in option 1

* add gcc to required packages for web container
2024-01-11 14:11:06 +09:00
Klaus Kämpf
b7f65d33e2
Honor sector size change via ModeSelect6 in scsicd (#1406)
* Make ModeSelect() non-const

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* Implement ModeSelect for scsicd

and honor sector size setting.

DEC's VMS can't handle 2k sector sizes and uses ModeSelect6 to set the
sector size to 512 bytes.

Fixes #1397

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* Test sector size setting via ModeSelect in SCSICD

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* Re-calculate total blocks when sector size changes

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* Reset CD data tracks after sector size change

The track calculation is based on sector size and must be reset after
change of sector size.

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* resize cache after change of sector size

The disk cache is based on sector size and must be resized when the
sector size changes.

Disk::ResizeCache needs a `raw` parameter, make this value accessible
from the current cache.

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* Make GetRawMode const

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

---------

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
2024-01-10 06:36:24 +09:00
Klaus Kämpf
ad5eae93e7
Multiple fixes for ModeSelect (#1405)
* Allow 'empty' ModeSelect6

tl;dr

Treat a computed length of 0 as `has_valid_page_code`.

Details:

The SRM console (aka 'BIOS') of DEC Alpha sends an empty
ModeSelect6 with the following data:
~~~
ModeSelect6, CDB $151000000c00
~~~

That makes 12 byte(s) as follows
~~~
  0  1  2  3   4   5  6  7   8   9 10 11
 00 00 00 08  00  00 00 00  00  00 02 00
~~~

decoding it (accoring to [1], Section 8.3.3, Table 94) gives us

Mode Data Length 0
Medium Type      0
Device-specific  0
Block desc len   8

Density Code     0
Number of blks   0
Reserved         0
Block length     512

`scsi_command_util::ModeSelect` computes
~~~
offset = 4 + buf[3];
~~~

giving 12 and

~~~
length -= offset;
~~~

giving 0.

Thus it never enters the `while` loop and `has_valid_page_code` stays
`false`, raising an error.

[1] [Small Computer System Interface - 2 rev 10L.pdf](https://dn790004.ca.archive.org/0/items/SCSISpecificationDocumentsSCSIDocuments/Small%20Computer%20System%20Interface%20-%202%20rev%2010L.pdf)

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* Allow ModeSelect with page code 1

OpenVMS Alpha (the operating system, not the SRM BIOS) uses
ModeSelect6 with a page code of 1.

The semantics are unknown, just accepting it works for me.

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>

* Fix page length computation in ModeSelect

tl;dr

The 'skip to next ModeSelect page' computation was off-by-one, either not
taking the page code itself into account or missing the fact that the
page length is given as `n - 1`.

Fix:

Add 1 to the computed length.

Details:

OpenVMS Alpha sends a ModeSelect6 as follows
~~~
command:

ModeSelect6, CDB $151000001900

payload:

 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
00 00 00 08 00 00 00 00 00 00 02 00 01 0a 24 00 00 00 00 00 00 00 00 00 00
~~~

This translates to (accoring to [1], Section 8.3.3)

~~~
Mode Data Length 0
Medium Type      0
Device-specific  0
Block desc len   8
~~~

with the following offset / length computation _before_ the `while` loop
~~~
offset = 12
length = 13
~~~

The first payload section is
~~~
 4  5  6  7  8  9 10 11
00 00 00 00 00 00 02 00
~~~

translating to

~~~
Density Code     0
Number of blks   0
Reserved         0
Block length   0x200 512
~~~

Then follows a pagecode 1 as
~~~
12 13 14 15 16 17 18 19 20 21 22 23 24
01 0a 24 00 00 00 00 00 00 00 00 00 00
~~~

translating to
~~~~
Page code        1
Page length -1  10
Mode parameters 24 00 00 00 00 00 00 00 00 00 00
~~~

computing (inside the `while` loop, as `// Advance to the next page`)

~~~
size =  10 + 2 = 12
~~~

followed by new `offset` and `length` values

~~~
offset = 25
length = 1
~~~

So it stays in the `while` loop (and has a larger-than-buffer `offset`
value)

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
2024-01-07 15:06:35 +09:00
Daniel Markstedt
256650908b Control Board: Use Pillow 10 API for getting text size 2023-12-18 00:41:51 -08:00
Daniel Markstedt
cd5666ae14 Freeze Python requirements for the Control Board client 2023-12-16 01:32:32 -08:00
Daniel Markstedt
24e60faed6 Install and use the vsftpd webmin module 2023-12-14 18:02:18 -08:00
Daniel Markstedt
6d88932b85 Web UI: Bump dropzone library to v6.0.0-beta2 2023-12-14 05:35:39 -08:00
Daniel Markstedt
7268084819
Control board client regression fixes (#1394)
* Control board client should use new FileCmds initiator

* Restore informative logging, but drop to debug level

* Use the correct object to call list_images()
2023-12-11 15:56:35 +09:00
Daniel Markstedt
05b9e0eb18
Web UI: Rework the Attach Device section to be universal (#1393)
* Correct German translation for Key

* Web UI: Rework the Attach Device section to be universal

* Web UI: Warn when working dirs are missing

* Refactor tests to use global endpoint constants

* Add fallback for unknown disk type devices

* Rearrange the index page sections

* Move Macproxy help text to admins page

* Remove image list exception for SCHD

* Show Settings button when auth is diabled

* Tweak CSS styles for both themes

* Move Eject action next to the file name, and improve UI labels
2023-12-07 17:38:24 -08:00
Daniel Markstedt
0f352396be
easyinstall.sh: fix typos in script syntax (#1391)
* easyinstall.sh: fix typo in sudoCache() function name

* Fix typo in apt-get command
2023-11-27 16:02:01 +09:00
Daniel Markstedt
28959aaf97 Revert "scsictl: Create files with binary/JSON or text format protobuf data (#1369)"
This reverts commit abc5c4b9ac.
2023-11-27 09:11:43 +09:00
Uwe Seimet
4d1a10cb6b
Fix missing logging for a LUN when the LUN is explicitly specified (#1379)
* Fix missing logging for a LUN when the LUN is explicitly specified

* Do not suppress controller messages when LUN is specified

* Fix misleading logging for DaynaPort
2023-11-26 13:25:54 +09:00
Uwe Seimet
abc5c4b9ac
scsictl: Create files with binary/JSON or text format protobuf data (#1369) 2023-11-20 07:40:53 +01:00
i-to-z
287b9d7623
Added ability to set the TYPE/CREATOR resource fork attributes of file(s) inside newly-created cd-rom ISO images of type HFS (#1377)
* Added ability to set the TYPE/CREATOR resource fork attributes of file(s) inside newly-created cd-rom ISO images of type HFS

* Added file genisoimage_hfs_resource_fork_map.txt under python/web and modified web.py to find it at that location
2023-11-19 15:39:02 -08:00
Benjamin Krein
e6f23662c8
Revert moving webmin to sub-path (#1381)
This reverts the parts of #1354 that moved Webmin to a URL sub-path
`/webmin` which is breaking Webmin authentication.

Issue #1380 has been opened to re-address moving Webmin to a sub-path
properly in a future change.

This PR retains the Settings page UI tweaks to Webmin but just uses the
direct URL to port `10000`.
2023-11-18 19:57:16 -05:00
PiSCSI User
fe1d2dd421 revert moving webmin to sub-path 2023-11-18 16:12:46 +00:00
Uwe Seimet
e5b99d4fa9
Fix typo (choice 0) in easyinstall.sh (#1372)
* Fix typo (choice 0) in easyinstall.sh

Co-authored-by: Frank Danapfel
2023-11-17 13:00:03 +01:00
Benjamin Krein
abedf4ed23
Merge pull request #1354 from benjamink/webmin-via-url-path
Config Nginx to serve Webmin via /webmin path
2023-11-17 05:54:29 -05:00
Benjamin Krein
984a2e11dd
Merge pull request #1353 from benjamink/webmin-install-fixes
Fix missing webmin install automation flags
2023-11-17 05:53:52 -05:00
Benjamin Krein
4bbb94d914
Merge pull request #1352 from benjamink/reset-venv-with-env-var
Reset Python venv if RESET_VENV is set
2023-11-17 05:53:20 -05:00
Uwe Seimet
a7c71e4fbb
Replace system timer by C++ standard time for timeout of 3 s (#1361) 2023-11-16 12:40:10 +01:00
Uwe Seimet
bb602040e2
Improve BSD compile-time compatibility (#1342) 2023-11-16 12:37:50 +01:00
PiSCSI User
ee934c880c Re-added Webmin links for AFP & SMB 2023-11-15 13:31:03 +00:00
PiSCSI User
fbce380907 consolidate Webmin links 2023-11-15 10:54:40 +00:00
Uwe Seimet
70bcb78d24
Use a standard timer for the DaynaPort delay work-around (#1357)
* Do not use the proprietary system timer for the DaynaPort delay work-around
2023-11-15 07:51:21 +01:00
Uwe Seimet
ec9f83f9df
Improve performance when reading sectors (#1344) 2023-11-15 07:44:46 +01:00
Uwe Seimet
28abbb5034
Temporary fix for compiler issue (#1359)
* Fix bookworm compiler issue

* fix to Docker for workaround

---------

Co-authored-by: Benjamin Krein <superbenk@gmail.com>
2023-11-15 07:36:07 +01:00
PiSCSI User
018fd7e590 Merge branch 'webmin-link-formatting' into webmin-via-url-path 2023-11-15 02:01:01 +00:00
PiSCSI User
e5678f623f work with sub-path changes in #1354 2023-11-15 01:58:35 +00:00
PiSCSI User
8493cf4ba8 tweak to Webmin links 2023-11-15 01:44:42 +00:00
Uwe Seimet
98f9292690
NetBSD compatibility: Increase daynaport minimum packet size to 128 bytes (#1334) (#1335)
* NetBSD compatibility: Increase daynaport minimum packet size to 128 bytes
2023-11-14 16:13:14 +01:00
Uwe Seimet
baf89dcf86
Use standard C++ timer for long timeouts (#1327), remove unused code (#1328)
* Replace timer in WaitSignal()

' Remove unused code

* Remove unused file
2023-11-14 16:03:25 +01:00
Uwe Seimet
7fa9abe5a3
Remove fullspec/standard sub-folder (#1324)
* Remove fullspec/standard sub-folder
2023-11-14 15:51:36 +01:00
Uwe Seimet
71780449ff
Move sector sizes lists from DeviceFactory to the respective devices (#1323) 2023-11-14 15:32:46 +01:00
Uwe Seimet
f6d00a0e96
Fix error count calculation (#1356) 2023-11-14 15:16:23 +01:00
Uwe Seimet
f7bc77d978
Add initial IDE setup (#1326) 2023-11-14 15:13:45 +01:00
Benjamin Krein
bd01c031c6 config webmin at /webmin path in nginx 2023-11-13 19:30:06 -05:00
Benjamin Krein
1f3e3e1245 automate interaction for webmin install 2023-11-13 19:16:04 -05:00
Benjamin Krein
67fd85b175 reset Python venv if RESET_VENV is set 2023-11-13 17:52:05 -05:00