Skip to content

Commit 3d475ec

Browse files
committed
add xz compression support
Signed-off-by: Zen <[email protected]>
1 parent 9d55e5b commit 3d475ec

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ classifiers = [
1919

2020
dependencies = [
2121
"zenlib >= 2.1.2",
22-
"pycpio >= 1.0.0"
22+
"pycpio >= 1.1.1"
2323
]
2424

2525
[options]

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ This module handles CPIO creation.
383383

384384
* `out_file` (ugrd.cpio) Sets the name of the output file, under `out_dir` unless a path is defined.
385385
* `mknod_cpio` (true) Only create device nodes within the CPIO.
386+
* `cpio_compression` (xz) Sets the compression method for the CPIO file.
386387

387388
##### General mount options
388389

src/ugrd/fs/cpio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def make_cpio(self) -> None:
3636
if out_cpio.exists():
3737
self._rotate_old(out_cpio)
3838

39-
cpio.write_cpio_file(out_cpio, _log_bump=-10, _log_init=False)
39+
cpio.write_cpio_file(out_cpio, compression=self['cpio_compression'], _log_bump=-10, _log_init=False)
4040

4141

4242
def _process_out_file(self, out_file):

src/ugrd/fs/cpio.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
out_file = "ugrd.cpio"
1+
out_file = "ugrd.cpio.xz"
22
mknod_cpio = true
3+
cpio_compression = "xz"
34

45
[imports.config_processing]
56
"ugrd.fs.cpio" = [ "_process_out_file" ]
@@ -10,3 +11,4 @@ mknod_cpio = true
1011
[custom_parameters]
1112
out_file = "str" # The name of the cpio file to create.
1213
mknod_cpio = "bool" # When enabled, mknod is not used to create device nodes, they are just created in the cpio.
14+
cpio_compression = "str" # The compression method to use for the cpio file. Currently, only xz is supported.

0 commit comments

Comments
 (0)