aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/depotdownloader-json/2_7/0001-NO-NO-AND-NO.patch
diff options
context:
space:
mode:
authoryuuko <yuuko@partyvan.io>2024-11-24 01:50:02 -0800
committeryuuko <yuuko@partyvan.io>2024-11-24 14:44:58 -0800
commitc0822927113e1f62f0447587455b8f9495340c62 (patch)
tree011ce0c0253fdfe2e2df614f145eb68f6f07c346 /srcds-pkgs/depotdownloader-json/2_7/0001-NO-NO-AND-NO.patch
parentd1fd47eaa587c21661041aa5f8593f89371bdd0a (diff)
depotdownloader-json: patch 2.7.3's steamkit2 dep to leave /sys/class/net aloneHEADmaster
this was causing grief inside nix builds. will be fixed in 2.7.4 but that will take a while to land as it depends on dotnet 9.
Diffstat (limited to 'srcds-pkgs/depotdownloader-json/2_7/0001-NO-NO-AND-NO.patch')
-rw-r--r--srcds-pkgs/depotdownloader-json/2_7/0001-NO-NO-AND-NO.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/srcds-pkgs/depotdownloader-json/2_7/0001-NO-NO-AND-NO.patch b/srcds-pkgs/depotdownloader-json/2_7/0001-NO-NO-AND-NO.patch
new file mode 100644
index 0000000..27d55f9
--- /dev/null
+++ b/srcds-pkgs/depotdownloader-json/2_7/0001-NO-NO-AND-NO.patch
@@ -0,0 +1,59 @@
+From 541f9e712491a358511f8c5efdff039429f78222 Mon Sep 17 00:00:00 2001
+From: yuuko <yuuko@partyvan.io>
+Date: Sun, 24 Nov 2024 01:21:48 -0800
+Subject: [PATCH] NO, NO, AND NO.
+
+---
+ SteamKit2/SteamKit2/Util/HardwareUtils.cs | 36 +----------------------
+ 1 file changed, 1 insertion(+), 35 deletions(-)
+
+diff --git a/SteamKit2/SteamKit2/Util/HardwareUtils.cs b/SteamKit2/SteamKit2/Util/HardwareUtils.cs
+index 78f36466..7c7b942b 100644
+--- a/SteamKit2/SteamKit2/Util/HardwareUtils.cs
++++ b/SteamKit2/SteamKit2/Util/HardwareUtils.cs
+@@ -276,41 +276,7 @@ namespace SteamKit2
+
+ static List<byte[]> GetMacAddresses( bool checkForPhysicalDevice = true )
+ {
+- var netDirectories = Directory.GetDirectories( "/sys/class/net" );
+- var macs = new List<byte[]>();
+-
+- // if /sys/class/net can't be open or is empty, "/proc/net/dev" could be read here
+-
+- foreach ( var directory in netDirectories )
+- {
+- var iface = Path.GetFileName( directory );
+-
+- if ( checkForPhysicalDevice && !Directory.Exists( $"/sys/class/net/{iface}/device" ) )
+- {
+- continue;
+- }
+-
+- try
+- {
+- // ioctl could be attempted to read the mac address here
+- // Loopback mac address will be decoded to zero here
+- var addressText = File.ReadAllText( $"/sys/class/net/{iface}/address" );
+- var macAddress = Convert.FromHexString( addressText.Replace( ":", "" ).AsSpan().Trim() );
+-
+- macs.Add( macAddress );
+- }
+- catch
+- {
+- // if we can't read a file, continue to the next
+- }
+- }
+-
+- if ( checkForPhysicalDevice && macs.Count == 0 )
+- {
+- return GetMacAddresses( checkForPhysicalDevice: false );
+- }
+-
+- return macs;
++ return new List<byte[]>();
+ }
+ }
+
+--
+2.47.0
+