From 63068f601869b46292dbec91f8863bdf3e86e581 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Wed, 28 Aug 2024 05:35:59 +0200 Subject: [PATCH] Applied updates --- .github/workflows/build.yml | 16 ++++++------- .github/workflows/build_freebsd.yml | 2 +- .github/workflows/build_ossfuzz.yml | 35 +++++++++++++++++++++++++++++ .github/workflows/build_shared.yml | 5 +---- appveyor.yml | 3 +++ configure.ac | 2 +- libewf.ini | 3 ++- tests/ewf_test_support.c | 2 +- 8 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/build_ossfuzz.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba8817ea..7b28685f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config zlib1g-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config zlib1g-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -90,7 +90,7 @@ jobs: - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev libfuse-dev + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config zlib1g-dev libfuse-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -114,7 +114,7 @@ jobs: - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev libfuse3-dev + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config zlib1g-dev libfuse3-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi @@ -141,7 +141,7 @@ jobs: run: | sudo add-apt-repository universe && sudo apt-get update && - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev 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 @@ -167,14 +167,14 @@ jobs: steps: - 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 byacc flex git libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config zlib1g-dev python3-dev python-dev-is-python3 - name: Building from source env: CC: ${{ matrix.compiler }} @@ -198,7 +198,7 @@ jobs: - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config zlib1g-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi diff --git a/.github/workflows/build_freebsd.yml b/.github/workflows/build_freebsd.yml index 538f8a03..aa4a38da 100644 --- a/.github/workflows/build_freebsd.yml +++ b/.github/workflows/build_freebsd.yml @@ -15,7 +15,7 @@ jobs: mem: 4096 # Note that the test scripts require bash prepare: | - pkg install -y autoconf automake bash byacc flex fusefs-libs gettext git libtool openssl pkgconf + pkg install -y autoconf automake bash fusefs-libs gettext git libtool openssl pkgconf run: | tests/build.sh tests/runtests.sh diff --git a/.github/workflows/build_ossfuzz.yml b/.github/workflows/build_ossfuzz.yml new file mode 100644 index 00000000..0c28d0e3 --- /dev/null +++ b/.github/workflows/build_ossfuzz.yml @@ -0,0 +1,35 @@ +# Build OSSFuzz fuzz targets from source. +name: build_ossfuzz +on: + push: + branches: [main] +permissions: read-all +jobs: + build_ossfuzz: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - architecture: 'x64' + compiler: 'gcc' + configure_options: '' + steps: + - name: Install build dependencies + run: | + sudo apt-get -y install git + - uses: actions/checkout@v4 + with: + repository: google/oss-fuzz + path: oss-fuzz + - name: Build OSSFuzz fuzz targets + working-directory: oss-fuzz + run: | + mkdir -p projects/libewf + cp projects/libyal/build.sh projects/libewf/ + cp projects/libyal/project.yaml projects/libewf/ + head -n 20 projects/libyal/Dockerfile > projects/libewf/Dockerfile + echo "RUN git clone --depth 1 https://github.com/libyal/libewf.git libewf" >> projects/libewf/Dockerfile + tail -n 3 projects/libyal/Dockerfile >> projects/libewf/Dockerfile + python3 infra/helper.py build_image --pull libewf + python3 infra/helper.py build_fuzzers --sanitizer address libewf + python3 infra/helper.py check_build libewf diff --git a/.github/workflows/build_shared.yml b/.github/workflows/build_shared.yml index b8f39d1c..d6510d5f 100644 --- a/.github/workflows/build_shared.yml +++ b/.github/workflows/build_shared.yml @@ -10,9 +10,6 @@ jobs: strategy: matrix: include: - - architecture: 'x64' - compiler: 'gcc' - configure_options: '' - architecture: 'x64' compiler: 'gcc' configure_options: '--enable-wide-character-type' @@ -20,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - name: Install build dependencies run: | - sudo apt-get -y install autoconf automake autopoint build-essential byacc flex git libssl-dev libtool pkg-config zlib1g-dev + sudo apt-get -y install autoconf automake autopoint build-essential git libfuse3-dev libssl-dev libtool pkg-config zlib1g-dev - name: Download test data run: | if test -x "synctestdata.sh"; then ./synctestdata.sh; fi diff --git a/appveyor.yml b/appveyor.yml index 268ca932..0259988a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -269,6 +269,9 @@ install: Else { .\syncdokan.ps1 } } +- ps: If (($env:BUILD_ENVIRONMENT -eq "msbuild") -And (Test-Path ".\synctestdata.ps1")) { + .\synctestdata.ps1 } +- sh: if ( test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode" ) && test -f "./synctestdata.sh"; then ./synctestdata.sh; fi - cmd: if [%TARGET%]==[vs2010] ( pushd ..\dokan && set PYTHONPATH=..\vstools && diff --git a/configure.ac b/configure.ac index 0971878e..eac946ba 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libewf], - [20240520], + [20240827], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/libewf.ini b/libewf.ini index 202f2915..16fab324 100644 --- a/libewf.ini +++ b/libewf.ini @@ -4,10 +4,11 @@ status: "experimental" year_of_creation: "2006" data_format: "Expert Witness Compression Format (EWF)" documenation_url: "https://github.com/libyal/libewf/tree/main/documentation" -features: ["debug_output"] +features: ["debug_output", "ossfuzz", "python_bindings", "tools"] [library] build_dependencies: ["bzip2", "crypto", "zlib"] +features: ["pthread", "source_glob", "wide_character_type"] public_types: ["access_control_entry", "attribute", "data_chunk", "file_entry", "handle", "source", "subject"] [python_module] diff --git a/tests/ewf_test_support.c b/tests/ewf_test_support.c index d9c749ec..5c687838 100644 --- a/tests/ewf_test_support.c +++ b/tests/ewf_test_support.c @@ -1914,7 +1914,7 @@ int ewf_test_glob_wide_get_segment_filename( libcerror_error_free( &error ); - segment_filename = (char *) 0x12345678UL; + segment_filename = (wchar_t *) 0x12345678UL; result = libewf_glob_wide_get_segment_filename( L"test.E01",