0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-20 07:35:26 +00:00
mglae d96f86708b chrome: use new deb_extract_data python script to unpack chrome.deb
Recent Google chrome.deb files for Ubuntu do have two issues in our environment:

1) The ar archive contains illegal file mode 644 instead of 100644. Busybox ar
   is refusing this.
2) The xz/lzma compression is using CRC64. Busybox only implements CRC32.

Work around is using Python code to unpack ar archive and tar.xz.

Co-authored-by: CvH <1355173+CvH@users.noreply.github.com>
2023-01-11 21:29:17 +00:00

19 lines
456 B
Python

#!/usr/bin/python3
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)
import sys
sys.path.append('/storage/.kodi/addons/browser.chrome/resources')
import unix_ar
import tarfile
if len(sys.argv) != 3:
print("Parameter error", file=sys.stderr)
sys.exit(1)
ar = unix_ar.open(sys.argv[1])
tarball = ar.open('data.tar.xz/')
tar = tarfile.open(fileobj=tarball)
tar.extractall(path=sys.argv[2])