systemd/SOURCES/1175-hwdb-Add-hwbd-definitions-for-maker-tools.patch

114 lines
3.2 KiB
Diff

From 29cba709aec7f84d72cfb420b643fe0df44c5ded Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Sat, 21 Jun 2025 20:01:18 +0200
Subject: [PATCH] hwdb: Add hwbd definitions for maker tools
As originally added back in 2016 in 68ea57b21d4d ("Added support
for 3D printers to uaccess (ID_MAKER_TOOL)").
The first devices added would be 3D printers compatible with Flashprint
from Flashforge, as listed in this connector plugin:
https://github.com/Mrnt/OctoPrint-FlashForge/blob/master/octoprint_flashforge/__init__.py#L28
See https://github.com/flathub/com.flashforge.FlashPrint/issues/59
(cherry picked from commit 3dcb56f5e0fe4d937a003bf89496a27b52c5c69e)
Resolves: RHEL-72697
---
hwdb.d/70-maker-tools.hwdb | 72 ++++++++++++++++++++++++++++++++++++++
hwdb.d/parse_hwdb.py | 1 +
2 files changed, 73 insertions(+)
create mode 100644 hwdb.d/70-maker-tools.hwdb
diff --git a/hwdb.d/70-maker-tools.hwdb b/hwdb.d/70-maker-tools.hwdb
new file mode 100644
index 0000000000..acbd61de02
--- /dev/null
+++ b/hwdb.d/70-maker-tools.hwdb
@@ -0,0 +1,72 @@
+# This file is part of systemd.
+#
+# Database for maker tools, like CNCs, laser cutters, 3D printers,
+# or any other so called "maker tools" and and that should be
+# accessible to the seat owner.
+#
+# Permitted keys:
+# Specify if a device is a maker tool
+# ID_MAKER_TOOL=1|0
+
+###########################################################
+# Dremel
+###########################################################
+# Dremel IdeaBuilder 3D20
+usb:v2A89p8889*
+ ID_MAKER_TOOL=1
+
+# Dremel IdeaBuilder 3D45
+usb:v2A89p888D*
+ ID_MAKER_TOOL=1
+
+###########################################################
+# Flashforge
+###########################################################
+# Flashforge Dreamer
+usb:v2B71p0001*
+ ID_MAKER_TOOL=1
+
+# Flashforge Finder v1
+usb:v2B71p0002*
+ ID_MAKER_TOOL=1
+
+# Flashforge Guider II
+usb:v2B71p0004*
+ ID_MAKER_TOOL=1
+
+# Flashforge Inventor
+usb:v2B71p0005*
+ ID_MAKER_TOOL=1
+
+# Flashforge Finder v2
+usb:v2B71p0007*
+ ID_MAKER_TOOL=1
+
+# Flashforge Guider IIs
+usb:v2B71p0009*
+ ID_MAKER_TOOL=1
+
+# Flashforge Dreamer NX
+usb:v2B71p000A*
+ ID_MAKER_TOOL=1
+
+# Flashforge Creator Max
+usb:v2B71p00E7*
+ ID_MAKER_TOOL=1
+
+# Flashforge Finder v2.12
+usb:v2B71p00EE*
+ ID_MAKER_TOOL=1
+
+# FlashForge Creator Pro 2
+usb:v2B71p000E*
+ ID_MAKER_TOOL=1
+
+###########################################################
+# PowerSpec
+###########################################################
+# PowerSpec Ultra 3DPrinter
+usb:v0315p0001*
+usb:v2B71p00F6*
+usb:v2B71p00FF
+ ID_MAKER_TOOL=1
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
index 60022e3095..9a599e735c 100755
--- a/hwdb.d/parse_hwdb.py
+++ b/hwdb.d/parse_hwdb.py
@@ -176,6 +176,7 @@ def property_grammar():
('ID_INPUT_TOUCHSCREEN', id_input_setting),
('ID_INPUT_TRACKBALL', id_input_setting),
('ID_SIGNAL_ANALYZER', Or((Literal('0'), Literal('1')))),
+ ('ID_MAKER_TOOL', Or((Literal('0'), Literal('1')))),
('ID_HARDWARE_WALLET', Or((Literal('0'), Literal('1')))),
('ID_SOFTWARE_RADIO', Or((Literal('0'), Literal('1')))),
('ID_MM_DEVICE_IGNORE', Or((Literal('0'), Literal('1')))),