Skip to content

Commit

Permalink
Revert Exiv2 to 0.27.7
Browse files Browse the repository at this point in the history
  • Loading branch information
AlienCowEatCake committed Sep 8, 2024
1 parent 3e0561e commit fd58236
Show file tree
Hide file tree
Showing 2,295 changed files with 638,542 additions and 810,992 deletions.
8 changes: 3 additions & 5 deletions src/Features.pri
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ disable_cxx11 : !system_highway {
# exiv2 options:
# disable_exiv2
# system_exiv2
disable_cxx17 : !system_exiv2 {
*msvc* : !system_exiv2 : lessThan(MSVC_VERSION, 2010) {
CONFIG *= disable_exiv2
}

Expand Down Expand Up @@ -941,10 +941,8 @@ disable_libavif | system_libavif {
}

disable_libjxl | system_libjxl {
disable_exiv2 | system_exiv2 {
disable_libheif | system_libheif {
CONFIG *= disable_brotli
}
disable_libheif | system_libheif {
CONFIG *= disable_brotli
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/ThirdParty/Exiv2/Exiv2.pri
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ include($${PWD}/../../Features.pri)

!system_exiv2 {

THIRDPARTY_EXIV2_PATH = $${PWD}/exiv2-0.28.3
THIRDPARTY_EXIV2_PATH = $${PWD}/exiv2-0.27.7-Source
THIRDPARTY_EXIV2_CONFIG_PATH = $${PWD}/config

INCLUDEPATH += $${THIRDPARTY_EXIV2_PATH}/include $${THIRDPARTY_EXIV2_CONFIG_PATH}
DEPENDPATH += $${THIRDPARTY_EXIV2_PATH}/include $${THIRDPARTY_EXIV2_CONFIG_PATH}
TR_EXCLUDE += $${THIRDPARTY_EXIV2_PATH}/* $${THIRDPARTY_EXIV2_CONFIG_PATH}/*

DEFINES += EXV_HAVE_STDINT_H

OUT_LIB_TARGET = tp_exiv2
OUT_LIB_DIR = $${OUT_PWD}/../ThirdParty/Exiv2
OUT_LIB_DIR2 = $${OUT_LIB_DIR}
Expand Down
229 changes: 104 additions & 125 deletions src/ThirdParty/Exiv2/Exiv2.pro

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/ThirdParty/Exiv2/config/cmake_cmdline.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=Off -DEXIV2_ENABLE_XMP=On -DEXIV2_ENABLE_EXTERNAL_XMP=Off -DEXIV2_ENABLE_PNG=On -DEXIV2_ENABLE_NLS=Off -DEXIV2_ENABLE_LENSDATA=On -DEXIV2_ENABLE_DYNAMIC_RUNTIME=On -DEXIV2_ENABLE_WEBREADY=Off -DEXIV2_ENABLE_CURL=Off -DEXIV2_ENABLE_BMFF=On -DEXIV2_ENABLE_BROTLI=On -DEXIV2_ENABLE_VIDEO=Off -DEXIV2_ENABLE_INIH=Off -DEXIV2_BUILD_SAMPLES=Off -DEXIV2_BUILD_EXIV2_COMMAND=Off -DEXIV2_BUILD_UNIT_TESTS=Off -DEXIV2_BUILD_FUZZ_TESTS=Off -DEXIV2_BUILD_DOC=Off -DEXIV2_TEAM_EXTRA_WARNINGS=Off -DEXIV2_TEAM_WARNINGS_AS_ERRORS=Off -DEXIV2_TEAM_USE_SANITIZERS=Off -DEXIV2_TEAM_OSS_FUZZ=Off -DEXIV2_TEAM_PACKAGING=Off -DBUILD_WITH_STACK_PROTECTOR=Off -DBUILD_WITH_CCACHE=Off -DBUILD_WITH_COVERAGE=Off -DEXIV2_ENABLE_FILESYSTEM_ACCESS=Off ..
cmake -DCMAKE_BUILD_TYPE=Release -DEXIV2_BUILD_DOC=Off -DEXIV2_BUILD_EXIV2_COMMAND=Off -DEXIV2_BUILD_SAMPLES=Off -DEXIV2_BUILD_UNIT_TESTS=Off -DEXIV2_ENABLE_BMFF=On -DEXIV2_ENABLE_CURL=Off -DEXIV2_ENABLE_EXTERNAL_XMP=Off -DEXIV2_ENABLE_LENSDATA=On -DEXIV2_ENABLE_NLS=Off -DEXIV2_ENABLE_PNG=On -DEXIV2_ENABLE_PRINTUCS2=On -DEXIV2_ENABLE_SSH=Off -DEXIV2_ENABLE_VIDEO=Off -DEXIV2_ENABLE_WEBREADY=Off -DEXIV2_ENABLE_WIN_UNICODE=Off -DEXIV2_ENABLE_XMP=On ..
90 changes: 61 additions & 29 deletions src/ThirdParty/Exiv2/config/exv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,89 @@
#ifndef _EXV_CONF_H_
#define _EXV_CONF_H_

// Defined if you want to use libssh for SshIO.
/* #undef EXV_USE_SSH */

// Define to 1 if you want to use libcurl in httpIO.
/* #undef EXV_USE_CURL */

// Define to 1 if you want to enable filesystem access
/* #undef EXV_ENABLE_FILESYSTEM */

// Define if you require webready support.
/* #undef EXV_ENABLE_WEBREADY */

// Define if you have the <libintl.h> header file.
/* #undef EXV_HAVE_LIBINTL_H */

// Define if you want translation of program messages to the user's native language
/* #undef EXV_ENABLE_NLS */

// Define if you want to enable the decoding of video metadata
/* #undef EXV_ENABLE_VIDEO */

// Define if you want BMFF support.
#define EXV_ENABLE_BMFF

// Define if you want to use the inih library.
/* #undef EXV_ENABLE_INIH */
// Define if you want video support.
/* #undef EXV_ENABLE_VIDEO */

// Define if you have the strerror_r function.
/* #undef EXV_HAVE_STRERROR_R */

// Define if the strerror_r function returns char*.
/* #undef EXV_STRERROR_R_CHAR_P */

// Define to enable the Windows unicode path support.
/* #undef EXV_UNICODE_PATH */

/* Define to `const' or to empty, depending on the second argument of `iconv'. */
/* #undef ICONV_ACCEPTS_CONST_INPUT */

#if defined(__NetBSD__)
#include <sys/param.h>
#if __NetBSD_Prereq__(9,99,17)
#define NETBSD_POSIX_ICONV 1
#if defined(ICONV_ACCEPTS_CONST_INPUT) || defined(__NetBSD__)
#define EXV_ICONV_CONST const
#else
#define NETBSD_POSIX_ICONV 0
#define EXV_ICONV_CONST
#endif

// Define if you have the <regex.h> header file.
/* #undef EXV_HAVE_REGEX_H */

// Define if have the <memory.h> header file.
/* #undef EXV_HAVE_MEMORY_H */

// Define if stdbool.h conforms to C99.
/* #undef EXV_HAVE_STDBOOL_H */

// Define if you have the <strings.h> header file.
/* #undef EXV_HAVE_STRINGS_H */

// Define if you have the mmap function.
#if !defined (_WIN32) || defined (__CYGWIN__)
#define EXV_HAVE_MMAP
#endif

// Define if you have the munmap function.
#if !defined (_WIN32) || defined (__CYGWIN__)
#define EXV_HAVE_MUNMAP
#endif

#if defined(ICONV_ACCEPTS_CONST_INPUT) || (defined(__NetBSD__) && !NETBSD_POSIX_ICONV)
#define EXV_ICONV_CONST const
#else
#define EXV_ICONV_CONST
// Define if you have <sys/stat.h> header file.
/* #undef #define EXV_HAVE_SYS_STAT_H */

// Define if you have the <sys/types.h> header file.
/* #undef EXV_HAVE_SYS_TYPES_H */

/* Define if you have the <unistd.h> header file. */
#if !defined (_WIN32) || defined (__CYGWIN__)
#define EXV_HAVE_UNISTD_H
#endif

// Define if you have the <sys/mman.h> header file.
#if !defined (_WIN32) || defined (__CYGWIN__)
#define EXV_HAVE_SYS_MMAN_H
#endif

// Define if you have the zlib library.
// Define if you have are using the zlib library.
#if defined (HAS_ZLIB)
#define EXV_HAVE_LIBZ
#endif

// Define if you have the brotli library.
#if defined (HAS_BROTLI)
#define EXV_HAVE_BROTLI
#endif
// Define if you have the <process.h> header file.
/* #undef EXV_HAVE_PROCESS_H */

/* Define if you have (Exiv2/xmpsdk) Adobe XMP Toolkit. */
#if defined (HAS_LIBEXPAT)
Expand All @@ -67,20 +96,23 @@
#define EXV_PACKAGE_NAME "exiv2"

/* Define to the full name and version of this package. */
#define EXV_PACKAGE_STRING "exiv2 0.28.3"
#define EXV_PACKAGE_STRING "exiv2 0.27.7"

/* Define to the version of this package. */
#define EXV_PACKAGE_VERSION "0.28.3"
#define EXV_PACKAGE_VERSION "0.27.7"

#define EXIV2_MAJOR_VERSION (0U)
#define EXIV2_MINOR_VERSION (28U)
#define EXIV2_PATCH_VERSION (3U)
#define EXIV2_TWEAK_VERSION (U)
#define EXIV2_MAJOR_VERSION (0)
#define EXIV2_MINOR_VERSION (27)
#define EXIV2_PATCH_VERSION (7)
#define EXIV2_TWEAK_VERSION ()

// Definition to enable translation of Nikon lens names.
#define EXV_HAVE_LENSDATA

// Define if you have the iconv function.
/* #undef EXV_HAVE_ICONV */

// Definition to enable conversion of UCS2 encoded Windows tags to UTF-8.
#define EXV_HAVE_PRINTUCS2

#endif /* !_EXV_CONF_H_ */
28 changes: 28 additions & 0 deletions src/ThirdParty/Exiv2/exiv2-0.27.7-Source/.clang-format.optional
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
BasedOnStyle: Google
Language: Cpp
Standard: Cpp03
TabWidth: 4
UseTab: Never
ColumnLimit: 120
NamespaceIndentation: All

AccessModifierOffset: -4
ContinuationIndentWidth: 4
IndentWidth: 4

BreakBeforeBraces: Custom
BraceWrapping:
AfterStruct: true
AfterClass: true
AfterFunction: true
AfterControlStatement: false
AfterEnum: true
AfterNamespace: true

AllowShortFunctionsOnASingleLine: None
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false

...
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ predicate indexK_with_fixedarray(ClassTemplateInstantiation t, ArrayIndexCall ca
t.getSimpleName() = "array" and
idx = call.getArgument(0) and
lowerBound(idx) >= 0 and
upperBound(idx) < lowerBound(t.getTemplateArgument(1))
upperBound(idx) < t.getTemplateArgument(1).(Literal).getValue().toInt()
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,34 @@
# or to provide custom queries or build logic.
name: "CodeQL"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
push:
branches: [0.28.x, main]
paths-ignore:
- "*.md"
branches: [0.27-maintenance, main]
pull_request:
# The branches below must be a subset of the branches above
branches: [0.28.x, main]
paths-ignore:
- "*.md"
branches: [0.27-maintenance, main]
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'javascript' ]
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo eatmydata apt-get -y install libexpat1-dev zlib1g-dev libbrotli-dev libinih-dev
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
config-file: .github/codeql/codeql-config.yml
Expand All @@ -56,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -70,4 +58,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# To trigger this workflow manually, go to this url and click "Run workflow":
# https://github.com/Exiv2/exiv2/actions/workflows/nightly_Linux_distributions.yml
on:
workflow_dispatch:

# Uncomment to run this workflow daily at 4am.
#
# schedule:
# - cron: 0 4 * * *

name: CI for different Linux distributions

jobs:
distros:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# arch suffering this issue: https://github.com/abseil/abseil-cpp/issues/709
# centos:8 had linking issues with gtest
container_image: ["fedora:latest", "debian:10", "archlinux:base", "ubuntu:20.04", "centos:8", "opensuse/tumbleweed", "alpine:3.13"]
compiler: [g++, clang++]
build_type: [Release, Debug]
shared_libraries: [ON, OFF]
container:
image: ${{ matrix.container_image }}
env:
CMAKE_FLAGS: -DEXIV2_TEAM_EXTRA_WARNINGS=OFF -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF -DEXIV2_ENABLE_PNG=ON -DCMAKE_INSTALL_PREFIX=install

steps:
- name: install tar in opensuse
run: |
distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')
echo $distro_id
if [[ "$distro_id" == "opensuse-tumbleweed" ]]; then zypper --non-interactive install tar gzip; fi
- uses: actions/checkout@v3
- name: install dependencies
run: ./ci/install_dependencies.sh
- name: build and compile
run: |
mkdir build && cd build
cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=${{ matrix.shared_libraries }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} ..
make -j $(nproc)
make install
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Builds and runs the fuzz target for a short amount of time. This is
# mainly to protect the fuzz target from bitrot, but hopefully will
# also help to quickly catch some bugs before the PR is merged.

name: Linux-Ubuntu Quick Fuzz on PRs

on:
pull_request:
workflow_dispatch:

jobs:
Linux:
name: 'Ubuntu 20.04 - clang/libFuzzer'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: install dependencies
run: sudo ./ci/install_dependencies.sh
- name: build and compile
run: |
mkdir build && cd build
cmake -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_CXX_COMPILER=$(which clang++) -DEXIV2_BUILD_FUZZ_TESTS=ON -DEXIV2_TEAM_USE_SANITIZERS=ON ..
make -j $(nproc)
- name: Fuzz
run: |
cd build
mkdir corpus
LSAN_OPTIONS=suppressions=../fuzz/knownleaks.txt ./bin/fuzz-read-print-write corpus ../test/data/ -dict=../fuzz/exiv2.dict -jobs=$(nproc) -workers=$(nproc) -max_total_time=120 -max_len=4096
Loading

0 comments on commit fd58236

Please sign in to comment.