PiSCSI / piscsi

PiSCSI allows a Raspberry Pi to function as emulated SCSI devices (hard disk, CD-ROM, and others) for vintage SCSI-based computers and devices. This is a fork of the RaSCSI project by GIMONS.
https://piscsi.org
BSD 3-Clause "New" or "Revised" License
535 stars 82 forks source link

Prepare C++ code for Debian Bookworm, update C++ standard to C++-20 #1179

Closed uweseimet closed 11 months ago

uweseimet commented 1 year ago

Debian Bookworm was released recently, and it's very likely just a matter of weeks until there is an official Raspberry Pi OS based on Bookworm. This is a list of changes and code improvements that can be applied:

There is an "issue_1179" branch that reflects these changes. The code in this branch passes the test suite on a Pi with Bullseye and on a Pi that was updated from Bullseye to Bookworm.

>lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
>gcc --version
gcc (Raspbian 12.2.0-14+rpi1) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Note: This SonarCloud rule (applied for C++-20 only)

Transparent comparator should be used with associative "std::string" containers

should be disabled. It's not helpful/relevant for PiSCSI but just leads to rather complicated declarations of unordered maps.

akuker commented 1 year ago

Buster has been moved to "legacy" support, so seems like a reasonable change.

uweseimet commented 1 year ago

The plan is to wait for the officlal Raspberry Pi OS based on bookworm before merging the changes. Testing can already be done on an upgraded bullseye distribution.

uweseimet commented 1 year ago

I assume bookworm will be released together with the Pi 5, which is supposed to be released next month.