Skip to content

Commit

Permalink
Changed pyfsext to be the default ext2, ext3 and ext4 back-end log2ti…
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed May 22, 2021
1 parent 7cb6a87 commit b5d1469
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 21 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Run tox tests on Ubuntu Docker images using GIFT PPA
name: test_tox
on: [push, pull_request]
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions config/dpkg/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dfvfs (20210501-1) unstable; urgency=low
dfvfs (20210522-1) unstable; urgency=low

* Auto-generated

-- Log2Timeline maintainers <log2timeline-maintainers@googlegroups.com> Sat, 01 May 2021 09:05:17 +0200
-- Log2Timeline maintainers <log2timeline-maintainers@googlegroups.com> Sat, 22 May 2021 07:42:09 +0200
2 changes: 1 addition & 1 deletion config/dpkg/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Homepage: https://github.com/log2timeline/dfvfs

Package: python3-dfvfs
Architecture: all
Depends: libbde-python3 (>= 20140531), libewf-python3 (>= 20131210), libfsapfs-python3 (>= 20201107), libfsext-python3 (>= 20210424), libfshfs-python3 (>= 20201103), libfsntfs-python3 (>= 20200921), libfsxfs-python3 (>= 20201114), libfvde-python3 (>= 20160719), libfwnt-python3 (>= 20160418), libluksde-python3 (>= 20200101), libmodi-python3 (>= 20210405), libqcow-python3 (>= 20201213), libsigscan-python3 (>= 20191221), libsmdev-python3 (>= 20140529), libsmraw-python3 (>= 20140612), libvhdi-python3 (>= 20201014), libvmdk-python3 (>= 20140421), libvsgpt-python3 (>= 20210207), libvshadow-python3 (>= 20160109), libvslvm-python3 (>= 20160109), python3-cffi-backend (>= 1.9.1), python3-cryptography (>= 2.0.2), python3-dfdatetime (>= 20200809), python3-dtfabric (>= 20170524), python3-idna (>= 2.5), python3-pytsk3 (>= 20210419), python3-yaml (>= 3.10), ${python3:Depends}, ${misc:Depends}
Depends: libbde-python3 (>= 20140531), libewf-python3 (>= 20131210), libfsapfs-python3 (>= 20201107), libfsext-python3 (>= 20210424), libfshfs-python3 (>= 20201103), libfsntfs-python3 (>= 20200921), libfsxfs-python3 (>= 20201114), libfvde-python3 (>= 20160719), libfwnt-python3 (>= 20160418), libluksde-python3 (>= 20200101), libmodi-python3 (>= 20210405), libqcow-python3 (>= 20201213), libsigscan-python3 (>= 20191221), libsmdev-python3 (>= 20140529), libsmraw-python3 (>= 20140612), libvhdi-python3 (>= 20201014), libvmdk-python3 (>= 20140421), libvsgpt-python3 (>= 20210207), libvshadow-python3 (>= 20160109), libvslvm-python3 (>= 20160109), python3-cffi-backend (>= 1.9.1), python3-cryptography (>= 2.0.2), python3-dfdatetime (>= 20210509), python3-dtfabric (>= 20170524), python3-idna (>= 2.5), python3-pytsk3 (>= 20210419), python3-yaml (>= 3.10), ${python3:Depends}, ${misc:Depends}
Description: Python 3 module of dfVFS
dfVFS, or Digital Forensics Virtual File System, provides read-only access to
file-system objects from various storage media types and file formats. The goal
Expand Down
2 changes: 1 addition & 1 deletion dependencies.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version_property: __version__

[dfdatetime]
dpkg_name: python3-dfdatetime
minimum_version: 20200809
minimum_version: 20210509
rpm_name: python3-dfdatetime
version_property: __version__

Expand Down
2 changes: 1 addition & 1 deletion dfvfs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
storage media types and file formats.
"""

__version__ = '20210501'
__version__ = '20210522'
2 changes: 1 addition & 1 deletion dfvfs/lib/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
TYPE_INDICATOR_VSHADOW])

# The preferred back-ends.
PREFERRED_EXT_BACK_END = TYPE_INDICATOR_TSK
PREFERRED_EXT_BACK_END = TYPE_INDICATOR_EXT
PREFERRED_GPT_BACK_END = TYPE_INDICATOR_TSK_PARTITION
PREFERRED_HFS_BACK_END = TYPE_INDICATOR_TSK
PREFERRED_NTFS_BACK_END = TYPE_INDICATOR_NTFS
Expand Down
2 changes: 1 addition & 1 deletion dfvfs/vfs/tsk_file_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def CopyFromDateTimeString(self, time_string):
microseconds = date_time_values.get('microseconds', 0)

self._timestamp = self._GetNumberOfSecondsFromElements(
year, month, day_of_month, hours, minutes, seconds, None)
year, month, day_of_month, hours, minutes, seconds)
self.fraction_of_second = microseconds

if pytsk3.TSK_VERSION_NUM >= 0x040200ff:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pip >= 7.0.0
PyYAML >= 3.10
cffi >= 1.9.1
cryptography >= 2.0.2
dfdatetime >= 20200809
dfdatetime >= 20210509
dtfabric >= 20170524
idna >= 2.5
libbde-python >= 20140531
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ requires = libbde-python3 >= 20140531
libvslvm-python3 >= 20160109
python3-cffi >= 1.9.1
python3-cryptography >= 2.0.2
python3-dfdatetime >= 20200809
python3-dfdatetime >= 20210509
python3-dtfabric >= 20170524
python3-idna >= 2.5
python3-pytsk3 >= 20210419
Expand Down
9 changes: 6 additions & 3 deletions tests/helpers/source_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ def testScanOnLVM(self):

scan_node = scan_node.sub_nodes[0].GetSubNodeByLocation('/')
self.assertIsNotNone(scan_node)
self.assertEqual(scan_node.type_indicator, definitions.TYPE_INDICATOR_TSK)
self.assertEqual(
scan_node.type_indicator, definitions.PREFERRED_EXT_BACK_END)

def testScanOnMBRPartitionedImage(self):
"""Test the Scan function on a MBR partitioned image."""
Expand All @@ -459,7 +460,8 @@ def testScanOnMBRPartitionedImage(self):

scan_node = scan_node.sub_nodes[6].GetSubNodeByLocation('/')
self.assertIsNotNone(scan_node)
self.assertEqual(scan_node.type_indicator, definitions.TYPE_INDICATOR_TSK)
self.assertEqual(
scan_node.type_indicator, definitions.PREFERRED_EXT_BACK_END)

def testScanOnVSS(self):
"""Test the Scan function on VSS."""
Expand Down Expand Up @@ -654,7 +656,8 @@ def testScanOnRAW(self):
scan_node = self._GetTestScanNode(scan_context)
self.assertIsNotNone(scan_node)
self.assertIsNotNone(scan_node.path_spec)
self.assertEqual(scan_node.type_indicator, definitions.TYPE_INDICATOR_TSK)
self.assertEqual(
scan_node.type_indicator, definitions.PREFERRED_EXT_BACK_END)

self.assertEqual(len(scan_node.sub_nodes), 0)

Expand Down
17 changes: 9 additions & 8 deletions tests/helpers/volume_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,13 +751,14 @@ def testGetBasePathSpecsOnRAW(self):
definitions.TYPE_INDICATOR_OS, location=test_path)
test_raw_path_spec = path_spec_factory.Factory.NewPathSpec(
definitions.TYPE_INDICATOR_RAW, parent=test_os_path_spec)
test_tsk_path_spec = path_spec_factory.Factory.NewPathSpec(
definitions.TYPE_INDICATOR_TSK, location='/', parent=test_raw_path_spec)
test_ext_path_spec = path_spec_factory.Factory.NewPathSpec(
definitions.PREFERRED_EXT_BACK_END, location='/',
parent=test_raw_path_spec)

test_mediator = TestVolumeScannerMediator()
test_scanner = volume_scanner.VolumeScanner(mediator=test_mediator)

expected_base_path_specs = [test_tsk_path_spec.comparable]
expected_base_path_specs = [test_ext_path_spec.comparable]

base_path_specs = test_scanner.GetBasePathSpecs(test_path)
base_path_specs = [
Expand Down Expand Up @@ -785,22 +786,22 @@ def testGetBasePathSpecsOnPartitionedImage(self):
test_tsk_partition_path_spec = path_spec_factory.Factory.NewPathSpec(
definitions.TYPE_INDICATOR_TSK_PARTITION, location='/p1', part_index=2,
start_offset=0x00000200, parent=test_raw_path_spec)
test_tsk_path_spec1 = path_spec_factory.Factory.NewPathSpec(
definitions.TYPE_INDICATOR_TSK, location='/',
test_ext_path_spec1 = path_spec_factory.Factory.NewPathSpec(
definitions.PREFERRED_EXT_BACK_END, location='/',
parent=test_tsk_partition_path_spec)

test_tsk_partition_path_spec = path_spec_factory.Factory.NewPathSpec(
definitions.TYPE_INDICATOR_TSK_PARTITION, location='/p2', part_index=6,
start_offset=0x00010600, parent=test_raw_path_spec)
test_tsk_path_spec2 = path_spec_factory.Factory.NewPathSpec(
definitions.TYPE_INDICATOR_TSK, location='/',
test_ext_path_spec2 = path_spec_factory.Factory.NewPathSpec(
definitions.PREFERRED_EXT_BACK_END, location='/',
parent=test_tsk_partition_path_spec)

test_mediator = TestVolumeScannerMediator()
test_scanner = volume_scanner.VolumeScanner(mediator=test_mediator)

expected_base_path_specs = [
test_tsk_path_spec1.comparable, test_tsk_path_spec2.comparable]
test_ext_path_spec1.comparable, test_ext_path_spec2.comparable]

base_path_specs = test_scanner.GetBasePathSpecs(test_path)
base_path_specs = [
Expand Down
4 changes: 4 additions & 0 deletions utils/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class DependencyDefinition(object):
rpm_name (str): name of the rpm package that provides the dependency.
skip_check (bool): True if the dependency should be skipped by the
CheckDependencies or CheckTestDependencies methods of DependencyHelper.
skip_requires (bool): True if the dependency should be excluded from
requirements.txt or setup.py install_requires.
version_property (str): name of the version attribute or function.
"""

Expand All @@ -46,6 +48,7 @@ def __init__(self, name):
self.python3_only = False
self.rpm_name = None
self.skip_check = None
self.skip_requires = None
self.version_property = None


Expand All @@ -63,6 +66,7 @@ class DependencyDefinitionReader(object):
'python3_only',
'rpm_name',
'skip_check',
'skip_requires',
'version_property'])

def _GetConfigValue(self, config_parser, section_name, value_name):
Expand Down

0 comments on commit b5d1469

Please sign in to comment.