driverclient 0.2.10__tar.gz → 0.2.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {driverclient-0.2.10 → driverclient-0.2.12}/PKG-INFO +1 -1
- {driverclient-0.2.10 → driverclient-0.2.12}/pyproject.toml +1 -1
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/__init__.py +1 -1
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/config.py +17 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/core/http.py +13 -1
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/ops/capture.py +23 -6
- {driverclient-0.2.10 → driverclient-0.2.12}/.gitignore +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/README.md +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/__main__.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/config.json +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/core/__init__.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/core/hardware.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/core/hwid.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/core/proc.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/events.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/main.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/ops/__init__.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/ops/automate.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/ops/diagnose.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/ops/install.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/ops/resolve.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/ops/scan.py +0 -0
- {driverclient-0.2.10 → driverclient-0.2.12}/src/driverclient/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: driverclient
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.12
|
|
4
4
|
Summary: Driver Server client with an embeddable connector for config injection at runtime.
|
|
5
5
|
Project-URL: Homepage, https://example.com/driverclient
|
|
6
6
|
Author-email: Raja Sanaullah <sanaullah@99technologies.com>
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "driverclient"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.12"
|
|
8
8
|
description = "Driver Server client with an embeddable connector for config injection at runtime."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -31,6 +31,16 @@ DEFAULTS: dict = {
|
|
|
31
31
|
"cache_ttl_minutes": 15,
|
|
32
32
|
|
|
33
33
|
# ── Capture ───────────────────────────────────────────────────────────
|
|
34
|
+
# Skip packages larger than this (MB) during capture — keeps the repo light.
|
|
35
|
+
# A complete driver = its full size; a few (Intel graphics ~1 GB) are huge and
|
|
36
|
+
# bloat upload/scan/forward. Windows inbox display covers the machine until
|
|
37
|
+
# graphics is installed later (WU/vendor), like OS imaging never bundles it.
|
|
38
|
+
# Everything smaller (network/storage/chipset/audio/camera/…) is captured.
|
|
39
|
+
# 0 = capture EVERYTHING including graphics (the outbox forward is a separate
|
|
40
|
+
# non-blocking loop that retries transient failures, so big packages don't
|
|
41
|
+
# block or get lost). Set >0 only if you want a lighter repo.
|
|
42
|
+
"capture_max_package_mb": 0,
|
|
43
|
+
|
|
34
44
|
# [".inf", ".sys", ".cat"] — minimum for server to redistribute and install
|
|
35
45
|
# [".inf", ".sys", ".cat", ".dll"] — adds co-installer DLLs
|
|
36
46
|
# ["*"] — all files in the driver package directory
|
|
@@ -68,6 +78,13 @@ DEFAULTS: dict = {
|
|
|
68
78
|
"timeout_long": 120,
|
|
69
79
|
"timeout_install": 600,
|
|
70
80
|
"timeout_wmi_slow": 90,
|
|
81
|
+
|
|
82
|
+
# Package-upload timeout scales with archive size instead of a flat 60s so a
|
|
83
|
+
# ~1 GB graphics package never times out mid-transfer. This is the assumed
|
|
84
|
+
# worst-case sustained upload throughput (MB/s) used to derive the socket
|
|
85
|
+
# timeout ceiling: timeout ≈ compressed_MB / this + timeout_short. Lower = more
|
|
86
|
+
# slack (safer against timeouts), higher = tighter. Floor is timeout_medium.
|
|
87
|
+
"upload_min_throughput_mbps": 2,
|
|
71
88
|
}
|
|
72
89
|
|
|
73
90
|
_config: dict | None = None
|
|
@@ -117,7 +117,19 @@ def http_upload_package(
|
|
|
117
117
|
Retries up to max_retries times with exponential backoff.
|
|
118
118
|
"""
|
|
119
119
|
cfg = get()
|
|
120
|
-
|
|
120
|
+
|
|
121
|
+
# Scale the socket timeout by archive size. A fixed timeout_medium (60s) times
|
|
122
|
+
# out mid-transfer on big packages (Intel graphics ~1 GB compressed), which the
|
|
123
|
+
# retry loop then re-sends from scratch — churn, or an outright drop. urllib's
|
|
124
|
+
# timeout is per-socket-op (not a total deadline), so a generous value is only a
|
|
125
|
+
# ceiling on a single stall, never a cap on the whole upload. Treat the caller/
|
|
126
|
+
# config timeout as a floor and give large archives proportionally more time,
|
|
127
|
+
# assuming a conservative sustained throughput.
|
|
128
|
+
floor = timeout or cfg["timeout_medium"]
|
|
129
|
+
size_mb = len(archive_bytes) / (1024 * 1024)
|
|
130
|
+
min_mbps = float(cfg.get("upload_min_throughput_mbps", 2) or 2)
|
|
131
|
+
scaled = int(size_mb / max(min_mbps, 0.1)) + int(cfg.get("timeout_short", 30))
|
|
132
|
+
t = max(floor, scaled)
|
|
121
133
|
|
|
122
134
|
boundary = uuid.uuid4().hex
|
|
123
135
|
meta_bytes = json.dumps({**metadata, "archive_encoding": content_encoding}).encode()
|
|
@@ -709,13 +709,30 @@ def _do_export(pkg: dict, cfg: dict) -> dict | None:
|
|
|
709
709
|
published_name=published, error=r.stderr[:120])
|
|
710
710
|
return None
|
|
711
711
|
|
|
712
|
+
# Skip giant packages (default: none). A complete driver = its full size,
|
|
713
|
+
# and a few drivers (notably Intel graphics ~1 GB) are huge. Those bloat
|
|
714
|
+
# the repo and slow upload/scan/forward; Windows' inbox display driver
|
|
715
|
+
# covers the machine until graphics is installed later (WU/vendor), the
|
|
716
|
+
# same way OS imaging never bundles graphics. Everything else — network,
|
|
717
|
+
# storage, chipset, audio, camera, etc. — is small and stays in the repo.
|
|
718
|
+
# Set capture_max_package_mb=0 to capture everything (incl. graphics).
|
|
719
|
+
max_mb = int(cfg.get("capture_max_package_mb", 0) or 0)
|
|
720
|
+
if max_mb > 0:
|
|
721
|
+
total = sum(f.stat().st_size for f in dest.rglob("*") if f.is_file())
|
|
722
|
+
if total > max_mb * 1024 * 1024:
|
|
723
|
+
events.warn("dump",
|
|
724
|
+
f" [skip] {published} is {total / 1e6:.0f} MB > cap "
|
|
725
|
+
f"{max_mb} MB — skipping (install via WU/vendor)",
|
|
726
|
+
published_name=published, size_mb=int(total / 1e6),
|
|
727
|
+
cap_mb=max_mb)
|
|
728
|
+
return None
|
|
729
|
+
|
|
712
730
|
try:
|
|
713
|
-
# Pack EVERY file pnputil /export-driver produced —
|
|
714
|
-
#
|
|
715
|
-
#
|
|
716
|
-
#
|
|
717
|
-
#
|
|
718
|
-
# specified" (broken link D). Completeness is the repo's contract.
|
|
731
|
+
# Pack EVERY file pnputil /export-driver produced — the driver's INF
|
|
732
|
+
# references them all (verified even for large packages), so this is
|
|
733
|
+
# the complete, installable set. The old extension filter dropped
|
|
734
|
+
# INF-referenced payloads (e.g. a camera's SPITDevMft.dll) → install
|
|
735
|
+
# failed with "cannot find the file specified" (broken link D).
|
|
719
736
|
archive_bytes, archive_name, encoding = pack_driver_archive(
|
|
720
737
|
dest, Path(original).stem, ["*"]
|
|
721
738
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|