summaryrefslogtreecommitdiff
path: root/tools/binman/btool/bzip2.py
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2022-08-19 16:25:34 +0200
committerSimon Glass <sjg@chromium.org>2022-08-20 18:07:33 -0600
commit45aa2798008cc5fc04ecc8a1928b7cf40d6d89d1 (patch)
tree8e9fe80df9fdc832c92511c751e40b2faab94218 /tools/binman/btool/bzip2.py
parent867eed12846d90012c3fd712559204918639765d (diff)
binman: Add bzip2 bintool
Add bzip2 bintool to binman to support on-the-fly compression. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/btool/bzip2.py')
-rw-r--r--tools/binman/btool/bzip2.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/binman/btool/bzip2.py b/tools/binman/btool/bzip2.py
new file mode 100644
index 00000000000..9be87a621f2
--- /dev/null
+++ b/tools/binman/btool/bzip2.py
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2022 Weidmüller Interface GmbH & Co. KG
+# Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
+#
+"""Bintool implementation for bzip2
+
+bzip2 allows compression and decompression of files.
+
+Documentation is available via::
+
+ man bzip2
+"""
+
+from binman import bintool
+
+# pylint: disable=C0103
+class Bintoolbzip2(bintool.BintoolPacker):
+ """Compression/decompression using the bzip2 algorithm
+
+ This bintool supports running `bzip2` to compress and decompress data, as
+ used by binman.
+
+ It is also possible to fetch the tool, which uses `apt` to install it.
+
+ Documentation is available via::
+
+ man bzip2
+ """
+ def __init__(self, name):
+ super().__init__(name, version_regex=r'bzip2.*Version ([0-9.]+)')