Skip to content

Commit

Permalink
Applied updates and changes for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Oct 28, 2023
1 parent 41a13a0 commit e8e539e
Show file tree
Hide file tree
Showing 38 changed files with 565 additions and 496 deletions.
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@v3
- 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 }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Files to ignore by git
#
# Version: 20230405
# Version: 20230926

# 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 @@ -125,6 +128,7 @@ stamp-h[1-9]
/libfvde/libfvde.rc
/libfvde/libfvde_definitions.h
/pyfvde-python[23]/*.[ch]
/setup.cfg
/fvdetools/*.exe
/fvdetools/fvdeinfo
/fvdetools/fvdemount
Expand Down
40 changes: 9 additions & 31 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ PKGCONFIG_FILES = \
libfvde.pc.in

SETUP_PY_FILES = \
pyproject.toml \
setup.cfg \
setup.cfg.in \
setup.py

SPEC_FILES = \
Expand Down Expand Up @@ -101,39 +104,14 @@ library:
(cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))

distclean: clean
/bin/rm -f Makefile
/bin/rm -f config.status
/bin/rm -f config.cache
/bin/rm -f config.log
/bin/rm -f libfvde.pc
/bin/rm -f libfvde.spec
-rm -f Makefile
-rm -f config.status
-rm -f config.cache
-rm -f config.log
-rm -f libfvde.pc
-rm -f libfvde.spec
@for dir in ${subdirs}; do \
(cd $$dir && $(MAKE) distclean) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"

splint:
(cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfplist && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libhmac && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcaes && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfvde && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/fvdetools && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/pyfvde && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/po && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/tests && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/ossfuzz && $(MAKE) splint $(AM_MAKEFLAGS))

15 changes: 14 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,24 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: clang
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: ""
- TARGET: macos-x64-gcc
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: ""
- TARGET: macos-x64-gcc-python
BUILD_ENVIRONMENT: xcode
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
PYTHON: "/usr/local/opt/python@3.11/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/python@3.11/bin/python3-config"
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: "--enable-python"
Expand All @@ -105,6 +111,7 @@ environment:
PYTHON: "/usr/local/opt/python@3.11/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/python@3.11/bin/python3-config"
HOMEBREW_NO_INSTALL_CLEANUP: 1
CC: gcc
CFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix"
Expand Down Expand Up @@ -140,6 +147,12 @@ environment:
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.11
TOXENV: py311
- TARGET: macos-tox-py312
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.12
TOXENV: py312
- TARGET: cygwin64-gcc
BUILD_ENVIRONMENT: cygwin64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
Expand Down Expand Up @@ -260,7 +273,7 @@ build_script:
- sh: if test ${BUILD_ENVIRONMENT} = "xcode"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; tests/build.sh ${CONFIGURE_OPTIONS}; fi
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
"%PYTHON%" setup.py bdist_wheel )
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make >/dev/null && tox -e${TOXENV}; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then export PATH="/usr/local/opt/gettext/bin:$PATH"; export SED="/usr/local/bin/gsed"; ./synclibs.sh && ./autogen.sh && ./configure --disable-nls --disable-shared-libs && make sources >/dev/null && tox -e${TOXENV}; fi
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
xcopy /i /q /s C:\projects\libfvde C:\cygwin64\home\appveyor\libfvde &&
C:\cygwin64\bin\bash -e -l -c "cd libfvde && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O './config.guess' && wget -q 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O './config.sub'" &&
Expand Down
6 changes: 3 additions & 3 deletions common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f config.h
/bin/rm -f types.h
/bin/rm -f Makefile
-rm -f config.h
-rm -f types.h
-rm -f Makefile

4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ AC_PREREQ([2.71])

AC_INIT(
[libfvde],
[20230913],
[20231028],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
[include/libfvde.h.in])

AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar])
AM_EXTRA_RECURSIVE_TARGETS([sources splint])

AC_CONFIG_MACRO_DIR([m4])

Expand Down Expand Up @@ -225,6 +226,7 @@ AC_CONFIG_FILES([dpkg/changelog])
AC_CONFIG_FILES([libfvde/libfvde.rc])
AC_CONFIG_FILES([libfvde.pc])
AC_CONFIG_FILES([libfvde.spec])
AC_CONFIG_FILES([setup.cfg])
dnl Generate a source configuration file
AC_CONFIG_HEADERS([common/config.h])

Expand Down
4 changes: 2 additions & 2 deletions fvdetools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f Makefile
-rm -f Makefile

splint:
splint-local:
@echo "Running splint on fvdeinfo ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(fvdeinfo_SOURCES)
@echo "Running splint on fvdemount ..."
Expand Down
10 changes: 5 additions & 5 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f libfvde.h
/bin/rm -f libfvde/definitions.h
/bin/rm -f libfvde/features.h
/bin/rm -f libfvde/types.h
/bin/rm -f Makefile
-rm -f libfvde.h
-rm -f libfvde/definitions.h
-rm -f libfvde/features.h
-rm -f libfvde/types.h
-rm -f Makefile

10 changes: 6 additions & 4 deletions libfvde/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f libfvde_definitions.h
/bin/rm -f libfvde.rc
/bin/rm -f Makefile
-rm -f libfvde_definitions.h
-rm -f libfvde.rc
-rm -f Makefile

splint:
sources-local: $(BUILT_SOURCES)

splint-local:
@echo "Running splint on libfvde ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfvde_la_SOURCES)

6 changes: 5 additions & 1 deletion m4/libcrypto.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcrypto required headers and functions
dnl
dnl Version: 20230701
dnl Version: 20231007

dnl Function to detect whether openssl/evp.h can be used in combination with zlib.h
AC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE],
Expand Down Expand Up @@ -687,6 +687,10 @@ AC_DEFUN([AX_LIBCRYPTO_CHECK_LIB],
ac_cv_libcrypto_CPPFLAGS="$openssl_CFLAGS"
ac_cv_libcrypto_LIBADD="$openssl_LIBS"
AS_IF(
[test "x$ac_cv_libcrypto_LIBADD" = x],
[ac_cv_libcrypto_LIBADD="-lcrypto"])
dnl On Cygwin also link zlib since libcrypto relies on it
AS_CASE(
[$host],
Expand Down
10 changes: 5 additions & 5 deletions m4/python.m4
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
dnl Functions for Python bindings
dnl
dnl Version: 20211114
dnl Version: 20230923

dnl Function to check if the python binary is available
dnl "python${PYTHON_VERSION} python python# python#.#"
AC_DEFUN([AX_PROG_PYTHON],
[AS_IF(
[test "x${PYTHON_VERSION}" != x],
[ax_python_progs="python${PYTHON_VERSION}"],
[ax_python_progs="python python3 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5"])
[ax_python_progs="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5"])
AC_CHECK_PROGS(
[PYTHON],
[$ax_python_progs])
Expand Down Expand Up @@ -58,7 +58,7 @@ AC_DEFUN([AX_PROG_PYTHON2],
dnl Function to check if the python3 binary is available
dnl "python3 python3.#"
AC_DEFUN([AX_PROG_PYTHON3],
[ax_python3_progs="python3 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0"
[ax_python3_progs="python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0"
AC_CHECK_PROGS(
[PYTHON3],
[$ax_python3_progs])
Expand Down Expand Up @@ -95,7 +95,7 @@ AC_DEFUN([AX_PROG_PYTHON_CONFIG],
[test "x${PYTHON_CONFIG}" = x],
[AC_CHECK_PROGS(
[PYTHON_CONFIG],
[python-config python3-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config])
[python-config python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config])
])
AS_IF(
[test "x${PYTHON_CONFIG}" = x],
Expand Down Expand Up @@ -131,7 +131,7 @@ AC_DEFUN([AX_PROG_PYTHON3_CONFIG],
[test "x${PYTHON3_CONFIG}" = x],
[AC_CHECK_PROGS(
[PYTHON3_CONFIG],
[python3-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config])
[python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config])
])
AS_IF(
[test "x${PYTHON3_CONFIG}" = x],
Expand Down
2 changes: 1 addition & 1 deletion manuals/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f Makefile
-rm -f Makefile

2 changes: 1 addition & 1 deletion msvscpp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f Makefile
-rm -f Makefile

4 changes: 2 additions & 2 deletions ossfuzz/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f Makefile
-rm -f Makefile

splint:
splint-local:
@echo "Running splint on volume_fuzzer ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(volume_fuzzer_SOURCES)

3 changes: 3 additions & 0 deletions po/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ MSGID_BUGS_ADDRESS = @PACKAGE_BUGREPORT@
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =

# Additional make targets.
sources splint:

4 changes: 2 additions & 2 deletions pyfvde-python2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ MAINTAINERCLEANFILES = \
Makefile.in

clean-local:
/bin/rm -f pyfvde*.[ch]
-rm -f pyfvde*.[ch]

distclean: clean
/bin/rm -f Makefile
-rm -f Makefile

4 changes: 2 additions & 2 deletions pyfvde-python3/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ MAINTAINERCLEANFILES = \
Makefile.in

clean-local:
/bin/rm -f pyfvde*.[ch]
-rm -f pyfvde*.[ch]

distclean: clean
/bin/rm -f Makefile
-rm -f Makefile

2 changes: 1 addition & 1 deletion pyfvde/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f Makefile
-rm -f Makefile

Loading

0 comments on commit e8e539e

Please sign in to comment.