Commit Graph

1205 Commits

Author SHA1 Message Date
Daniel Markstedt
ba675b38a6 Bump Netatalk Webmin module to 1.3 (#1454) 2024-05-01 16:15:44 +09:00
Daniel Markstedt
e3cdd105d2 Revert fixes for DEC vendor specific pages and CD-ROM block size changing (#1451)
* Revert "Don't ResizeCache on sector change if no filename is defined (#1438)"

This reverts commit dd9a3296d4.

* Revert "Add ModeSense page 0x25 (DEC special function control page) (#1412)"

This reverts commit 1121b8d9d6.

* Revert "DiskCache needs a size"

This reverts commit 7cc8df271c.

* Revert "Honor sector size change via ModeSelect6 in scsicd (#1406)"

This reverts commit b7f65d33e2.

* Revert "Multiple fixes for ModeSelect (#1405)"

This reverts commit ad5eae93e7.
2024-05-01 16:15:44 +09:00
dependabot[bot]
116d0aac34 Bump idna from 3.6 to 3.7 in /python/web
Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.6...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 16:15:44 +09:00
dependabot[bot]
09509ec357 Bump idna from 3.4 to 3.7 in /python/common
Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 16:15:43 +09:00
dependabot[bot]
041638f91e Bump pillow from 10.2.0 to 10.3.0 in /python/oled
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.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.2.0...10.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 16:15:43 +09:00
dependabot[bot]
2890c5128e Bump pillow from 10.2.0 to 10.3.0 in /python/ctrlboard
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.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.2.0...10.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 16:15:43 +09:00
Daniel Markstedt
8859930ebf Python: bump flake8 to 7.0.0, while removing attrs, py and tomli 2024-05-01 16:15:43 +09:00
dependabot[bot]
510765b0c7 Bump black from 22.8.0 to 24.3.0 in /python/web (#1444)
* Bump black from 22.8.0 to 24.3.0 in /python/web

Bumps [black](https://github.com/psf/black) from 22.8.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.8.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Github CI: Backend web test runner use python 3.9.19

* Reformat python sources with black

* Docker: Bump to python 3.9-slim image for pytest

* Bump pytest version to 8.1.1

* Bump more library versions, and freeze them

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Markstedt <daniel@mindani.net>
2024-05-01 16:15:43 +09:00
Klaus Kämpf
f0640afaac Don't ResizeCache on sector change if no filename is defined (#1438)
* Add tests for issue#1426

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

* add test without medium

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

* Don't resize DiskCache without a file

DiskCache computes its size from a file.
Skip ResizeCache Without file (i.e. 'empty' CD)

Fixes #1426

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
2024-05-01 16:15:43 +09:00
Uwe Seimet
a2487302db Fix wrong warning about CD-ROM image file size 2024-05-01 16:15:43 +09:00
Daniel Markstedt
b784c85728 Update Swedish translations 2024-05-01 16:15:43 +09:00
Daniel Markstedt
8d057b6f5b Bump Webmin module versions 2024-05-01 16:15:43 +09:00
Daniel Markstedt
4aa832ced4 Local Netatalk install script, bump to v2.3.1 2024-05-01 16:15:43 +09:00
Uwe Seimet
a8dc184845 Properly close file to be printed (#1428) 2024-05-01 16:15:43 +09:00
Daniel Markstedt
31b793a9cb Update unit tests 2024-05-01 16:15:43 +09:00
Daniel Markstedt
4d1eb9ac2a Update unit tests 2024-05-01 16:15:43 +09:00
Daniel Markstedt
888cbd085e Recognize .cdr and .toast as CD-ROM image file endings 2024-05-01 16:15:43 +09:00
dependabot[bot]
4f1c93b1f5 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-05-01 16:15:43 +09:00
dependabot[bot]
3edc89c180 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-05-01 16:15:43 +09:00
Klaus Kämpf
28c1741736 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-05-01 16:15:43 +09:00
Klaus Kämpf
70dfadeb1b DiskCache needs a size
otherwise its constructor assertion (block > 0) will fail.

Fixes #1418

Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
2024-05-01 16:15:43 +09:00
Daniel Markstedt
02237ed5a0 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-05-01 16:15:43 +09:00
Uwe Seimet
e27d7af4b9 Fix remote interface communication issue (broken pipe) (#1415) 2024-05-01 16:15:43 +09:00
dependabot[bot]
6d8a68522f 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-05-01 16:15:43 +09:00
Delan Azabani
b7ecb8b8e2 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-05-01 16:15:43 +09:00
Klaus Kämpf
28a43b3390 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-05-01 16:15:43 +09:00
Klaus Kämpf
ef99c7bf6b 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-05-01 16:15:43 +09:00
Daniel Markstedt
15eb80e938 Control Board: Use Pillow 10 API for getting text size 2024-05-01 16:15:43 +09:00
Daniel Markstedt
c7d34bbb99 Freeze Python requirements for the Control Board client 2024-05-01 16:15:43 +09:00
Daniel Markstedt
d9cb374bc0 Install and use the vsftpd webmin module 2024-05-01 16:15:43 +09:00
Daniel Markstedt
9812f283ba Web UI: Bump dropzone library to v6.0.0-beta2 2024-05-01 16:15:43 +09:00
Daniel Markstedt
b230071aa8 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()
2024-05-01 16:15:43 +09:00
Daniel Markstedt
0dbd3adc06 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
2024-05-01 16:15:43 +09:00
Daniel Markstedt
53e33388ec easyinstall.sh: fix typos in script syntax (#1391)
* easyinstall.sh: fix typo in sudoCache() function name

* Fix typo in apt-get command
2024-05-01 16:15:43 +09:00
Daniel Markstedt
5f0aea451e Revert "scsictl: Create files with binary/JSON or text format protobuf data (#1369)"
This reverts commit abc5c4b9ac.
2024-05-01 16:15:43 +09:00
Uwe Seimet
432a0fd491 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
2024-05-01 16:15:43 +09:00
Uwe Seimet
4e3df76fa8 scsictl: Create files with binary/JSON or text format protobuf data (#1369) 2024-05-01 16:15:43 +09:00
i-to-z
55c908f839 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
2024-05-01 16:15:43 +09:00
PiSCSI User
105a729048 revert moving webmin to sub-path 2024-05-01 16:15:43 +09:00
Uwe Seimet
ddfd40d5c9 Fix typo (choice 0) in easyinstall.sh (#1372)
* Fix typo (choice 0) in easyinstall.sh

Co-authored-by: Frank Danapfel
2024-05-01 16:15:42 +09:00
PiSCSI User
507bfc19c1 Re-added Webmin links for AFP & SMB 2024-05-01 16:15:42 +09:00
PiSCSI User
d25b5f6c2a consolidate Webmin links 2024-05-01 16:15:42 +09:00
PiSCSI User
660cca12e2 work with sub-path changes in #1354 2024-05-01 16:15:42 +09:00
PiSCSI User
d6d03996cb tweak to Webmin links 2024-05-01 16:15:42 +09:00
Benjamin Krein
de9b65ac04 config webmin at /webmin path in nginx 2024-05-01 16:15:42 +09:00
Benjamin Krein
e4414640e1 automate interaction for webmin install 2024-05-01 16:15:42 +09:00
Benjamin Krein
521ffe92b7 reset Python venv if RESET_VENV is set 2024-05-01 16:15:42 +09:00
Uwe Seimet
67a3bf2227 Replace system timer by C++ standard time for timeout of 3 s (#1361) 2024-05-01 16:15:42 +09:00
Uwe Seimet
5f24e80a9c Improve BSD compile-time compatibility (#1342) 2024-05-01 16:15:42 +09:00
Uwe Seimet
7372996cf8 Use a standard timer for the DaynaPort delay work-around (#1357)
* Do not use the proprietary system timer for the DaynaPort delay work-around
2024-05-01 16:15:42 +09:00