core: téléchargement avec reprise, archives tar et persistance

- Downloader : HEAD + Range avec reprise, re-probe à chaque essai (URL CDN
  signées), retries bornés, fichier partiel conservé, repli sans Range,
  annulation, progression et ETA
- licence : fichier temporaire renommé à la fin ; le placeholder vide
  « licenses_<id>_<ts>.tar » renvoyé par Majestic pendant la génération de
  la licence est jeté et la requête relancée (cause du bug ENOENT de l'app
  officielle)
- archives (libarchive) : vérification complète, extraction qui ignore
  UpdateInfo.xml, refus des chemins absolus/.., liens ignorés (FAT32)
- persistance : vehicles.json compatible avec l'app officielle (BOM inclus),
  réglages + téléchargement en attente, chemins XDG / Haiku, écriture atomique
- CLI : download, verify, extract ; Ctrl-C annule proprement
- tests : faux CDN (coupures, sans Range, 4xx, annulation), tar
  ustar/gnu/pax/v7, corruption, traversal (42 cas, 322 assertions)
- validé en réel : firmware RCC 8,39 Go téléchargé, interrompu, repris et
  vérifié (ustar, 16 entrées)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
yann64andClaude Opus 5.5 committed 2026-11-28 19:00:21 +01:00
1 parent 95704f9882
commit 543347a1e6
17 files changed
+2168 -40

No files matched your search

+5 -1
View File
@@ -6,8 +6,12 @@ add_executable(openpu_tests
test_models.cpp
test_http.cpp
test_api_client.cpp
test_download.cpp
test_archive.cpp
test_storage.cpp
)
target_link_libraries(openpu_tests PRIVATE openpu_core openpu_warnings)
find_package(LibArchive REQUIRED)
target_link_libraries(openpu_tests PRIVATE openpu_core openpu_warnings LibArchive::LibArchive)
if(TARGET doctest::doctest)
target_link_libraries(openpu_tests PRIVATE doctest::doctest)
endif()