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 520fb02 commit b76f142
Show file tree
Hide file tree
Showing 34 changed files with 329 additions and 382 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]
/libewf/libewf.rc
/libewf/libewf_definitions.h
/pyewf-python[23]/*.[ch]
/setup.cfg
/ewf.net/ewf.net.rc
/ewftools/*.exe
/ewftools/ewfacquire
Expand Down
43 changes: 11 additions & 32 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ PKGCONFIG_FILES = \
libewf.pc.in

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

SPEC_FILES = \
Expand Down Expand Up @@ -102,40 +105,16 @@ 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 libewf.pc
/bin/rm -f libewf.spec
/bin/rm -f dpkg/changelog
/bin/rm -f dpkg/shlibs.local.ex
-rm -f Makefile
-rm -f config.status
-rm -f config.cache
-rm -f config.log
-rm -f libewf.pc
-rm -f libewf.spec
-rm -f dpkg/changelog
-rm -f dpkg/shlibs.local.ex
@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)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libcdatetime && $(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)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libmfdata && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libhmac && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libewf && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libodraw && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libsmdev && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libsmraw && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/ewftools && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))
(cd $(srcdir)/tests && $(MAKE) splint $(AM_MAKEFLAGS))

15 changes: 14 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,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/[email protected]/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/[email protected]/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 @@ -111,6 +117,7 @@ environment:
PYTHON: "/usr/local/opt/[email protected]/bin/python3"
PYTHON_CONFIG: "/usr/local/opt/[email protected]/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 @@ -146,6 +153,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 @@ -273,7 +286,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\libewf-legacy C:\cygwin64\home\appveyor\libewf-legacy &&
C:\cygwin64\bin\bash -e -l -c "cd libewf-legacy && 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

2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ AC_CONFIG_SRCDIR(
[include/libewf.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 @@ -271,6 +272,7 @@ AC_CONFIG_FILES([libewf/libewf.rc])
AC_CONFIG_FILES([ewf.net/ewf.net.rc])
AC_CONFIG_FILES([libewf.pc])
AC_CONFIG_FILES([libewf.spec])
AC_CONFIG_FILES([setup.cfg])
dnl Generate a source configuration file
AC_CONFIG_HEADERS([common/config.h])

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

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

2 changes: 1 addition & 1 deletion ewf.net/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

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

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

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

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

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

splint:
splint-local:
@echo "Running splint on ewfacquire ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(ewfacquire_SOURCES)
@echo "Running splint on ewfacquirestream ..."
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ MAINTAINERCLEANFILES = \
Makefile.in

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

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 libewf.h
/bin/rm -f libewf/definitions.h
/bin/rm -f libewf/features.h
/bin/rm -f libewf/types.h
/bin/rm -f Makefile
-rm -f libewf.h
-rm -f libewf/definitions.h
-rm -f libewf/features.h
-rm -f libewf/types.h
-rm -f Makefile

2 changes: 1 addition & 1 deletion libewf-legacy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ year_of_creation: "2008"
[tools]
build_dependencies: ["crypto", "fuse", "lex", "uuid", "yacc"]
description: "Several tools for reading and writing EWF files"
names: ["ewfaqcuire", "ewfaqcuirestream", "ewfexport", "ewfinfo", "ewfmount", "ewfverify"]
names: ["ewfacquire", "ewfacquirestream", "ewfexport", "ewfinfo", "ewfmount", "ewfverify"]

[mount_tool]
missing_backend_error: "No sub system to mount EWF."
Expand Down
10 changes: 6 additions & 4 deletions libewf/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,13 @@ MAINTAINERCLEANFILES = \
Makefile.in

distclean: clean
/bin/rm -f libewf_definitions.h
/bin/rm -f libewf.rc
/bin/rm -f Makefile
-rm -f libewf_definitions.h
-rm -f libewf.rc
-rm -f Makefile

splint:
sources-local: $(BUILT_SOURCES)

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

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

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

splint:
splint-local:
@echo "Running splint on libmfdata ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libmfdata_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 @@ -22,5 +22,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 @@ -72,5 +72,5 @@ MAINTAINERCLEANFILES = \
Makefile.in

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

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:

Loading

0 comments on commit b76f142

Please sign in to comment.