Skip to content

Commit

Permalink
Merge remote-tracking branch 'libyal-libpff/main' into tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jlepere-everlaw committed Jul 31, 2024
2 parents 89ef015 + 2b160d2 commit ca18661
Show file tree
Hide file tree
Showing 425 changed files with 28,030 additions and 22,862 deletions.
73 changes: 45 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Build from source.
name: build
on: [push, pull_request]
permissions: read-all
jobs:
build_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
include:
Expand All @@ -22,11 +23,14 @@ jobs:
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--enable-wide-character-type'
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--with-zlib=no'
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--enable-static-executables=yes --enable-multi-threading-support=no'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev
Expand All @@ -41,30 +45,46 @@ jobs:
- name: Run tests
run: |
tests/runtests.sh
build_dist:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- architecture: 'x64'
compiler: 'gcc'
configure_options: ''
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
- name: Building from source
env:
CC: ${{ matrix.compiler }}
run: |
tests/build.sh ${{ matrix.configure_options }}
- name: Run tests
run: |
make distcheck
build_python_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--enable-python'
python_version: ''
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--enable-python2'
python_version: '2'
- architecture: 'x64'
compiler: 'gcc'
configure_options: '--enable-python3'
python_version: '3'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo add-apt-repository universe &&
sudo apt-get update &&
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev python2-dev python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
Expand All @@ -79,29 +99,25 @@ jobs:
run: |
tests/runtests.sh
build_setup_py_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- architecture: 'x64'
compiler: 'gcc'
configure_options: ''
python-version: 2.7
- architecture: 'x64'
compiler: 'gcc'
configure_options: ''
python-version: 3.8
python-version: '3.10'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
run: |
sudo add-apt-repository universe &&
sudo apt-get update &&
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev python2-dev python3-dev python-dev-is-python3
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3
- name: Building from source
env:
CC: ${{ matrix.compiler }}
Expand All @@ -111,7 +127,7 @@ jobs:
run: |
python setup.py build
coverage_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
include:
Expand All @@ -122,7 +138,7 @@ jobs:
compiler: 'gcc'
configure_options: '--enable-wide-character-type'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev
Expand All @@ -142,7 +158,8 @@ jobs:
for DIRECTORY in `find . -maxdepth 1 -type d`; do \
(cd ${DIRECTORY} && find . -maxdepth 1 -name \*.gcno -type f -exec gcov -pb {} \;) \
done
- name: Upload coverage data
run: |
git clone https://github.com/codecov/codecov-bash.git ../codecov-bash
/bin/bash ../codecov-bash/codecov -n linux-${{ matrix.architecture }}-gcc-no-optimization -X gcov;
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
name: linux-${{ matrix.architecture }}-gcc-no-optimization
token: ${{ secrets.CODECOV_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/build_freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Build from source on FreeBSD.
name: build_freebsd
on: [push]
permissions: read-all
jobs:
build_freebsd:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Building from source
id: build_freebsd
uses: vmactions/freebsd-vm@v1
with:
usesh: true
mem: 4096
# Note that the test scripts require bash
prepare: |
pkg install -y autoconf automake bash gettext git libtool pkgconf
run: |
tests/build.sh
tests/runtests.sh
5 changes: 3 additions & 2 deletions .github/workflows/build_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: build_shared
on:
push:
branches: [main]
permissions: read-all
jobs:
build_shared_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
include:
Expand All @@ -16,7 +17,7 @@ jobs:
compiler: 'gcc'
configure_options: '--enable-wide-character-type'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get -y install autoconf automake autopoint build-essential git libtool pkg-config zlib1g-dev
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Build wheel from source using tox.
name: build_wheel
on: [push, pull_request]
permissions: read-all
jobs:
build_wheel:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- python-version: '3.7'
toxenv: 'py37'
- python-version: '3.8'
toxenv: 'py38'
- python-version: '3.9'
toxenv: 'py39'
- python-version: '3.10'
toxenv: 'py310'
- python-version: '3.11'
toxenv: 'py311'
- python-version: '3.12'
toxenv: 'py312'
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo add-apt-repository universe &&
sudo add-apt-repository -y ppa:deadsnakes/ppa &&
sudo apt-get update &&
sudo apt-get install -y autoconf automake autopoint build-essential git libtool pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools
- name: Install tox
run: |
python3 -m pip install tox
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
- name: Prepare build
run: |
./synclibs.sh --use-head && ./autogen.sh && ./configure && make sources >/dev/null
- name: Build Python wheel
run: |
tox -e${{ matrix.toxenv }}
24 changes: 19 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Files to ignore by git
#
# Version: 20200912
# Version: 20231119

# Generic auto-generated build files
*~
Expand All @@ -25,10 +25,13 @@
*.swp
*.Tpo
*.trs
*.whl
/*.egg-info/
__pycache__
.deps
.dirstamp
.libs
.tox
INSTALL
Makefile
Makefile.bcc
Expand Down Expand Up @@ -82,6 +85,7 @@ stamp-h[1-9]
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/nls.m4
/m4/pkg.m4
/m4/po.m4
/m4/printf-posix.m4
/m4/progtest.m4
Expand Down Expand Up @@ -123,39 +127,48 @@ stamp-h[1-9]
/libpff.spec
/libpff/libpff.rc
/libpff/libpff_definitions.h
/pypff-python[23]/*.[ch]
/setup.cfg
/jpff/classnoinst.stamp
/pfftools/*.exe
/pfftools/pffexport
/pfftools/pffinfo
/tests/*.exe
/tests/input
/tests/notify_stream.log
/tests/pff_test_allocation_table
/tests/pff_test_attached_file_io_handle
/tests/pff_test_attachment
/tests/pff_test_bit_stream
/tests/pff_test_block_descriptor
/tests/pff_test_block_tree
/tests/pff_test_block_tree_node
/tests/pff_test_checksum
/tests/pff_test_column_definition
/tests/pff_test_compression
/tests/pff_test_data_array
/tests/pff_test_data_array_entry
/tests/pff_test_data_block
/tests/pff_test_deflate
/tests/pff_test_descriptors_index
/tests/pff_test_encryption
/tests/pff_test_error
/tests/pff_test_file
/tests/pff_test_file_header
/tests/pff_test_folder
/tests/pff_test_free_map
/tests/pff_test_huffman_tree
/tests/pff_test_index
/tests/pff_test_index_node
/tests/pff_test_index_tree
/tests/pff_test_index_value
/tests/pff_test_io_handle
/tests/pff_test_io_handle2
/tests/pff_test_item
/tests/pff_test_item_descriptor
/tests/pff_test_item_tree
/tests/pff_test_item_values
/tests/pff_test_local_descriptor_node
/tests/pff_test_local_descriptor_value
/tests/pff_test_local_descriptors
/tests/pff_test_local_descriptors_node
/tests/pff_test_local_descriptors_tree
/tests/pff_test_mapi_value
/tests/pff_test_message
/tests/pff_test_multi_value
Expand All @@ -170,6 +183,7 @@ stamp-h[1-9]
/tests/pff_test_support
/tests/pff_test_table
/tests/pff_test_table_block_index
/tests/pff_test_table_header
/tests/pff_test_table_index_value
/tests/pff_test_tools_info_handle
/tests/pff_test_tools_output
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Acknowledgements: libpff

Copyright (C) 2008-2021, Joachim Metz <[email protected]>
Copyright (C) 2008-2024, Joachim Metz <[email protected]>

This code is derived from information and software contributed by:
* Earlier work on the PST file format in libpst by
Expand Down
Loading

0 comments on commit ca18661

Please sign in to comment.