dissect.squashfs 1.5.dev4__tar.gz → 1.6.dev2__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.
Files changed (31) hide show
  1. {dissect.squashfs-1.5.dev4/dissect.squashfs.egg-info → dissect_squashfs-1.6.dev2}/PKG-INFO +7 -3
  2. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect/squashfs/c_squashfs.py +2 -3
  3. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect/squashfs/squashfs.py +40 -3
  4. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2/dissect.squashfs.egg-info}/PKG-INFO +7 -3
  5. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect.squashfs.egg-info/requires.txt +6 -1
  6. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/pyproject.toml +7 -2
  7. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tox.ini +6 -5
  8. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/COPYRIGHT +0 -0
  9. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/LICENSE +0 -0
  10. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/MANIFEST.in +0 -0
  11. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/README.md +0 -0
  12. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect/squashfs/__init__.py +0 -0
  13. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect/squashfs/compression.py +0 -0
  14. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect/squashfs/exceptions.py +0 -0
  15. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect.squashfs.egg-info/SOURCES.txt +0 -0
  16. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect.squashfs.egg-info/dependency_links.txt +0 -0
  17. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/dissect.squashfs.egg-info/top_level.txt +0 -0
  18. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/setup.cfg +0 -0
  19. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/__init__.py +0 -0
  20. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/conftest.py +0 -0
  21. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/data/gzip-opts.sqfs +0 -0
  22. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/data/gzip.sqfs +0 -0
  23. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/data/lz4.sqfs +0 -0
  24. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/data/lzma.sqfs +0 -0
  25. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/data/lzo.sqfs +0 -0
  26. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/data/xz.sqfs +0 -0
  27. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/data/zstd.sqfs +0 -0
  28. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/docs/Makefile +0 -0
  29. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/docs/conf.py +0 -0
  30. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/docs/index.rst +0 -0
  31. {dissect.squashfs-1.5.dev4 → dissect_squashfs-1.6.dev2}/tests/test_squashfs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dissect.squashfs
3
- Version: 1.5.dev4
3
+ Version: 1.6.dev2
4
4
  Summary: A Dissect module implementing a parser for the SquashFS file system, commonly used in appliance or device firmware
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License: Affero General Public License v3
@@ -22,12 +22,16 @@ Requires-Python: ~=3.9
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  License-File: COPYRIGHT
25
- Requires-Dist: dissect.cstruct<4.0.dev,>=3.0.dev
26
- Requires-Dist: dissect.util<4.0.dev,>=3.0.dev
25
+ Requires-Dist: dissect.cstruct<5,>=4.dev
26
+ Requires-Dist: dissect.util<4,>=3
27
27
  Provides-Extra: full
28
28
  Requires-Dist: lz4; extra == "full"
29
29
  Requires-Dist: python-lzo; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "full"
30
30
  Requires-Dist: zstandard; extra == "full"
31
+ Provides-Extra: dev
32
+ Requires-Dist: dissect.squashfs[full]; extra == "dev"
33
+ Requires-Dist: dissect.cstruct<5.0.dev,>=4.0.dev; extra == "dev"
34
+ Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
31
35
 
32
36
  # dissect.squashfs
33
37
 
@@ -1,6 +1,6 @@
1
1
  import stat
2
2
 
3
- from dissect import cstruct
3
+ from dissect.cstruct import cstruct
4
4
 
5
5
  squashfs_def = """
6
6
  #define SQUASHFS_MAGIC 0x73717368
@@ -319,8 +319,7 @@ struct zstd_comp_opts {
319
319
  };
320
320
  """
321
321
 
322
- c_squashfs = cstruct.cstruct()
323
- c_squashfs.load(squashfs_def)
322
+ c_squashfs = cstruct().load(squashfs_def)
324
323
 
325
324
  INODE_STRUCT_MAP = {
326
325
  c_squashfs.SQUASHFS_DIR_TYPE: c_squashfs.squashfs_dir_inode_header,
@@ -11,7 +11,6 @@ from datetime import datetime
11
11
  from functools import cache, cached_property, lru_cache
12
12
  from typing import BinaryIO, Iterator, Optional, Union
13
13
 
14
- from dissect.cstruct import Instance
15
14
  from dissect.util import ts
16
15
  from dissect.util.stream import RunlistStream
17
16
 
@@ -213,7 +212,27 @@ class INode:
213
212
  def __repr__(self) -> str:
214
213
  return f"<inode {self.inode_number} ({self.block}, {self.offset})>"
215
214
 
216
- def _metadata(self) -> tuple[Instance, int, int]:
215
+ def _metadata(
216
+ self,
217
+ ) -> tuple[
218
+ c_squashfs.squashfs_base_inode_header
219
+ | c_squashfs.squashfs_dir_inode_header
220
+ | c_squashfs.squashfs_reg_inode_header
221
+ | c_squashfs.squashfs_symlink_inode_header
222
+ | c_squashfs.squashfs_dev_inode_header
223
+ | c_squashfs.squashfs_dev_inode_header
224
+ | c_squashfs.squashfs_base_inode_header
225
+ | c_squashfs.squashfs_base_inode_header
226
+ | c_squashfs.squashfs_ldir_inode_header
227
+ | c_squashfs.squashfs_lreg_inode_header
228
+ | c_squashfs.squashfs_symlink_inode_header
229
+ | c_squashfs.squashfs_ldev_inode_header
230
+ | c_squashfs.squashfs_ldev_inode_header
231
+ | c_squashfs.squashfs_lipc_inode_header
232
+ | c_squashfs.squashfs_lipc_inode_header,
233
+ int,
234
+ int,
235
+ ]:
217
236
  base_struct = c_squashfs.squashfs_base_inode_header
218
237
 
219
238
  block = self.fs.sb.inode_table_start + self.block
@@ -235,7 +254,25 @@ class INode:
235
254
  return header, data_block, data_offset
236
255
 
237
256
  @cached_property
238
- def header(self) -> Instance:
257
+ def header(
258
+ self,
259
+ ) -> (
260
+ c_squashfs.squashfs_base_inode_header
261
+ | c_squashfs.squashfs_dir_inode_header
262
+ | c_squashfs.squashfs_reg_inode_header
263
+ | c_squashfs.squashfs_symlink_inode_header
264
+ | c_squashfs.squashfs_dev_inode_header
265
+ | c_squashfs.squashfs_dev_inode_header
266
+ | c_squashfs.squashfs_base_inode_header
267
+ | c_squashfs.squashfs_base_inode_header
268
+ | c_squashfs.squashfs_ldir_inode_header
269
+ | c_squashfs.squashfs_lreg_inode_header
270
+ | c_squashfs.squashfs_symlink_inode_header
271
+ | c_squashfs.squashfs_ldev_inode_header
272
+ | c_squashfs.squashfs_ldev_inode_header
273
+ | c_squashfs.squashfs_lipc_inode_header
274
+ | c_squashfs.squashfs_lipc_inode_header
275
+ ):
239
276
  header, _, _ = self._metadata()
240
277
  return header
241
278
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dissect.squashfs
3
- Version: 1.5.dev4
3
+ Version: 1.6.dev2
4
4
  Summary: A Dissect module implementing a parser for the SquashFS file system, commonly used in appliance or device firmware
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License: Affero General Public License v3
@@ -22,12 +22,16 @@ Requires-Python: ~=3.9
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  License-File: COPYRIGHT
25
- Requires-Dist: dissect.cstruct<4.0.dev,>=3.0.dev
26
- Requires-Dist: dissect.util<4.0.dev,>=3.0.dev
25
+ Requires-Dist: dissect.cstruct<5,>=4.dev
26
+ Requires-Dist: dissect.util<4,>=3
27
27
  Provides-Extra: full
28
28
  Requires-Dist: lz4; extra == "full"
29
29
  Requires-Dist: python-lzo; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "full"
30
30
  Requires-Dist: zstandard; extra == "full"
31
+ Provides-Extra: dev
32
+ Requires-Dist: dissect.squashfs[full]; extra == "dev"
33
+ Requires-Dist: dissect.cstruct<5.0.dev,>=4.0.dev; extra == "dev"
34
+ Requires-Dist: dissect.util<4.0.dev,>=3.0.dev; extra == "dev"
31
35
 
32
36
  # dissect.squashfs
33
37
 
@@ -1,4 +1,9 @@
1
- dissect.cstruct<4.0.dev,>=3.0.dev
1
+ dissect.cstruct<5,>=4.dev
2
+ dissect.util<4,>=3
3
+
4
+ [dev]
5
+ dissect.squashfs[full]
6
+ dissect.cstruct<5.0.dev,>=4.0.dev
2
7
  dissect.util<4.0.dev,>=3.0.dev
3
8
 
4
9
  [full]
@@ -25,8 +25,8 @@ classifiers = [
25
25
  "Topic :: Utilities",
26
26
  ]
27
27
  dependencies = [
28
- "dissect.cstruct>=3.0.dev,<4.0.dev",
29
- "dissect.util>=3.0.dev,<4.0.dev",
28
+ "dissect.cstruct>=4.dev,<5",
29
+ "dissect.util>=3,<4",
30
30
  ]
31
31
  dynamic = ["version"]
32
32
 
@@ -43,6 +43,11 @@ full = [
43
43
  "python-lzo; platform_system != 'Windows' or platform_python_implementation != 'PyPy'",
44
44
  "zstandard",
45
45
  ]
46
+ dev = [
47
+ "dissect.squashfs[full]",
48
+ "dissect.cstruct>=4.0.dev,<5.0.dev",
49
+ "dissect.util>=3.0.dev,<4.0.dev",
50
+ ]
46
51
 
47
52
  [tool.black]
48
53
  line-length = 120
@@ -5,13 +5,14 @@ envlist = lint, py3, pypy3
5
5
  # locally installed tox to have a minimum version 3.3.0. This means the names
6
6
  # of the configuration options are still according to the tox 3.x syntax.
7
7
  minversion = 4.4.3
8
- # This version of virtualenv will install setuptools version 65.5.0 and pip
9
- # 22.3. These versions fully support python projects defined only through a
10
- # pyproject.toml file (PEP-517/PEP-518/PEP-621)
11
- requires = virtualenv>=20.16.6
8
+ # This version of virtualenv will install setuptools version 68.2.2 and pip
9
+ # 23.3.1. These versions fully support python projects defined only through a
10
+ # pyproject.toml file (PEP-517/PEP-518/PEP-621). This pip version also support
11
+ # the proper version resolving with (sub-)dependencies defining dev extra's.
12
+ requires = virtualenv>=20.24.6
12
13
 
13
14
  [testenv]
14
- extras = full
15
+ extras = dev
15
16
  deps =
16
17
  pytest
17
18
  pytest-cov