Compare commits

...

10 Commits

Author SHA1 Message Date
Daniel Markstedt 9418b8db6f
Merge 3223f2ad64 into ea4dce02fb 2024-04-26 19:44:25 +03:00
Daniel Markstedt ea4dce02fb Nicer badges on README.md
Plus: Remove the badge for the Tindie store that is taking a break.
2024-04-23 08:01:24 +09:00
Daniel Markstedt 1919eb34bb Bump software copyright year to 2024 2024-04-23 08:00:58 +09:00
Daniel Markstedt a7538980d7 Bump to netatalk 2.3.2 2024-04-23 08:00:42 +09:00
Daniel Markstedt 85dc2cf0be
Bump Netatalk Webmin module to 1.3 (#1454) 2024-04-20 15:24:15 -07:00
Daniel Markstedt 3223f2ad64 Disable piscsi_bridge creation 2024-02-17 20:13:41 +09:00
Daniel Markstedt 5c74ca177f Disable piscsi_bridge creation 2024-02-17 20:07:26 +09:00
Daniel Markstedt 6b867346bc Disable piscsi_bridge creation 2024-02-17 20:06:00 +09:00
Daniel Markstedt 806fa25609 Disable piscsi_bridge creation 2024-02-17 19:57:01 +09:00
Daniel Markstedt a307a85d2f Disable piscsi_bridge creation 2024-02-17 19:23:52 +09:00
9 changed files with 37 additions and 12 deletions

View File

@ -1,9 +1,17 @@
# What is PiSCSI?
[![Build Status](https://github.com/PiSCSI/piscsi/actions/workflows/cpp.yml/badge.svg)](https://github.com/PiSCSI/piscsi/actions/workflows/cpp.yml)
[![Project releases](https://img.shields.io/github/release/PiSCSI/piscsi)](https://github.com/PiSCSI/piscsi/releases)
[![Project contributors](https://img.shields.io/github/contributors/PiSCSI/piscsi)](https://github.com/PiSCSI/piscsi/graphs/contributors)
[![License: BSD 3-Clause](https://img.shields.io/github/license/PiSCSI/piscsi)](https://github.com/PiSCSI/piscsi/blob/develop/LICENSE)
[<img src="https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg" height="20" />](https://sonarcloud.io/summary/new_code?id=akuker-PISCSI)
PiSCSI is a virtual SCSI device emulator that runs on a Raspberry Pi. It runs in userspace, and can emulate several SCSI devices at one time. There is a control interface to attach / detach drives during runtime, as well as insert and eject removable media. This project is aimed at users of vintage Macintosh and Atari computers and more (see [compatibility list](https://github.com/PiSCSI/piscsi/wiki/Compatibility)) from the 1980's and 1990's.
Please check out the full story with much more detail on the [wiki](https://github.com/PiSCSI/piscsi/wiki)!
# How do I contribute?
PiSCSI is using the <a href="https://datasift.github.io/gitflow/IntroducingGitFlow.html">Gitflow Workflow</a>. A quick overview:
- The *main* branch should always reflect the contents of the last stable release
@ -17,9 +25,8 @@ When you are ready to contribute code to PiSCSI, follow the <a href="https://doc
If you want to add a new translation, or improve upon an existing one, please follow the <a href="https://github.com/PiSCSI/piscsi/tree/master/python/web#localizing-the-web-interface">instructions in the Web Interface README</a>. Once the translation is complete, please use the same workflow as above to contribute it to the project.
<a href="https://www.tindie.com/stores/landogriffin/?ref=offsite_badges&utm_source=sellers_akuker&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg)](https://sonarcloud.io/summary/new_code?id=akuker_PISCSI)
# GitHub Sponsors
Thank you to all of the GitHub sponsors who support the development community!
Special thank you to the Gold level sponsors!

View File

@ -29,8 +29,9 @@ using namespace std;
using namespace piscsi_util;
using namespace network_util;
const string CTapDriver::BRIDGE_NAME = "piscsi_bridge";
// const string CTapDriver::BRIDGE_NAME = "piscsi_bridge";
#if 0
static string br_setif(int br_socket_fd, const string& bridgename, const string& ifname, bool add) {
#ifndef __linux__
return "if_nametoindex: Linux is required";
@ -47,6 +48,7 @@ static string br_setif(int br_socket_fd, const string& bridgename, const string&
return "";
#endif
}
#endif
string ip_link(int fd, const char* ifname, bool up) {
#ifndef __linux__
@ -113,6 +115,7 @@ bool CTapDriver::Init(const param_map& const_params)
return false;
}
#if 0
const int br_socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0);
if (br_socket_fd < 0) {
LogErrno("Can't open bridge socket");
@ -121,15 +124,17 @@ bool CTapDriver::Init(const param_map& const_params)
close(ip_fd);
return false;
}
#endif
auto cleanUp = [&] (const string& error) {
LogErrno(error);
close(m_hTAP);
close(ip_fd);
close(br_socket_fd);
// close(br_socket_fd);
return false;
};
#if 0
// Check if the bridge has already been created
// TODO Find an alternative to accessing a file, there is most likely a system call/ioctl
if (access(string("/sys/class/net/" + BRIDGE_NAME).c_str(), F_OK)) {
@ -162,6 +167,7 @@ bool CTapDriver::Init(const param_map& const_params)
else {
spdlog::info(BRIDGE_NAME + " is already available");
}
#endif
spdlog::trace(">ip link set piscsi0 up");
@ -169,11 +175,13 @@ bool CTapDriver::Init(const param_map& const_params)
return cleanUp(error);
}
#if 0
spdlog::trace(">brctl addif " + BRIDGE_NAME + " piscsi0");
if (const string error = br_setif(br_socket_fd, BRIDGE_NAME, "piscsi0", true); !error.empty()) {
return cleanUp(error);
}
#endif
spdlog::trace("Getting the MAC address");
@ -186,7 +194,7 @@ bool CTapDriver::Init(const param_map& const_params)
memcpy(m_MacAddr.data(), ifr.ifr_hwaddr.sa_data, m_MacAddr.size());
close(ip_fd);
close(br_socket_fd);
// close(br_socket_fd);
spdlog::info("Tap device " + string(ifr.ifr_name) + " created");
@ -197,6 +205,7 @@ bool CTapDriver::Init(const param_map& const_params)
void CTapDriver::CleanUp() const
{
if (m_hTAP != -1) {
#if 0
if (const int br_socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0); br_socket_fd < 0) {
LogErrno("Can't open bridge socket");
} else {
@ -207,6 +216,7 @@ void CTapDriver::CleanUp() const
}
close(br_socket_fd);
}
#endif
// Release TAP device
close(m_hTAP);
@ -243,6 +253,7 @@ pair<string, string> CTapDriver::ExtractAddressAndMask(const string& s)
return { address, netmask };
}
#if 0
string CTapDriver::SetUpEth0(int socket_fd, const string& bridge_interface)
{
#ifdef __linux__
@ -261,7 +272,9 @@ string CTapDriver::SetUpEth0(int socket_fd, const string& bridge_interface)
return "";
}
#endif
#if 0
string CTapDriver::SetUpNonEth0(int socket_fd, int ip_fd, const string& s)
{
#ifdef __linux__
@ -301,6 +314,7 @@ string CTapDriver::SetUpNonEth0(int socket_fd, int ip_fd, const string& s)
return "";
}
#endif
string CTapDriver::IpLink(bool enable) const
{

View File

@ -29,7 +29,7 @@ using namespace std;
class CTapDriver
{
static const string BRIDGE_NAME;
// static const string BRIDGE_NAME;
const inline static string DEFAULT_IP = "10.10.20.1/24"; //NOSONAR This hardcoded IP address is safe
@ -56,7 +56,7 @@ public:
private:
static string SetUpEth0(int, const string&);
//static string SetUpEth0(int, const string&);
static string SetUpNonEth0(int, int, const string&);
static pair<string, string> ExtractAddressAndMask(const string&);

View File

@ -72,10 +72,12 @@ bool SCSIDaynaPort::Init(const param_map& params)
return true;
}
#if 0
void SCSIDaynaPort::CleanUp()
{
tap.CleanUp();
}
#endif
vector<uint8_t> SCSIDaynaPort::InquiryInternal() const
{

View File

@ -57,7 +57,7 @@ public:
~SCSIDaynaPort() override = default;
bool Init(const param_map&) override;
void CleanUp() override;
// void CleanUp() override;
param_map GetDefaultParams() const override { return tap.GetDefaultParams(); }

View File

@ -67,10 +67,12 @@ bool SCSIBR::Init(const param_map& params)
#endif
}
#if 0
void SCSIBR::CleanUp()
{
tap.CleanUp();
}
#endif
vector<uint8_t> SCSIBR::InquiryInternal() const
{

View File

@ -36,7 +36,7 @@ public:
~SCSIBR() override = default;
bool Init(const param_map&) override;
void CleanUp() override;
// void CleanUp() override;
param_map GetDefaultParams() const override { return tap.GetDefaultParams(); }

View File

@ -112,7 +112,7 @@ string piscsi_util::Banner(string_view app)
s << "Version " << piscsi_get_version_string() << " (" << __DATE__ << ' ' << __TIME__ << ")\n";
s << "Powered by XM6 TypeG Technology / ";
s << "Copyright (C) 2016-2020 GIMONS\n";
s << "Copyright (C) 2020-2023 Contributors to the PiSCSI project\n";
s << "Copyright (C) 2020-2024 Contributors to the PiSCSI project\n";
return s.str();
}

View File

@ -772,7 +772,7 @@ function createFileSharingDir() {
# Downloads, compiles, and installs Netatalk (AppleShare server)
function installNetatalk() {
NETATALK_VERSION="2.3.1"
NETATALK_VERSION="2.3.2"
NETATALK_CONFIG_PATH="/etc/netatalk"
NETATALK_OPTIONS="--base-dir=$BASE/tmp/netatalk-$NETATALK_VERSION --cores=$CORES --share-name='$FILE_SHARE_NAME' --share-path='$FILE_SHARE_PATH'"
@ -951,7 +951,7 @@ function installSamba() {
function installWebmin() {
WEBMIN_PATH="/usr/share/webmin"
WEBMIN_NETATALK_MODULE_CONFIG="/etc/webmin/netatalk2/config"
WEBMIN_NETATALK_MODULE_VERSION="1.2"
WEBMIN_NETATALK_MODULE_VERSION="1.3"
WEBMIN_VSFTPD_MODULE_VERSION="2024-01-26"
if [ -d "$WEBMIN_PATH" ]; then