Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Nov 7, 2023
1 parent e859dd8 commit f90d975
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
- name: Prepare build
run: |
./synclibs.sh --use-head && ./autogen.sh && ./configure
./synclibs.sh --use-head && ./autogen.sh && ./configure && make sources >/dev/null
- name: Build Python wheel
run: |
tox -e${{ matrix.toxenv }}
37 changes: 6 additions & 31 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -109,39 +109,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 libevtx.pc
/bin/rm -f libevtx.spec
-rm -f Makefile
-rm -f config.status
-rm -f config.cache
-rm -f config.log
-rm -f libevtx.pc
-rm -f libevtx.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)/libfdatetime && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libevtx && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfwnt && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/libfwevt && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/evtxtools && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/pyevtx && $(MAKE) splint $(AM_MAKEFLAGS))
(cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))
(cd $(srcdir)/tests && $(MAKE) $(AM_MAKEFLAGS))
(cd $(srcdir)/ossfuzz && $(MAKE) $(AM_MAKEFLAGS))

4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ install:
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
git clone https://github.com/libyal/vstools.git ..\vstools )
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q gettext gnu-sed || true; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true; fi
- sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
"%PYTHON%" -m pip install -U pip setuptools twine wheel )
Expand Down Expand Up @@ -225,7 +225,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\libevtx C:\cygwin64\home\appveyor\libevtx &&
C:\cygwin64\bin\bash -e -l -c "cd libevtx && 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

3 changes: 2 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(
[libevtx],
[20231009],
[20231107],
[[email protected]])

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

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

AC_CONFIG_MACRO_DIR([m4])

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

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

splint:
splint-local:
@echo "Running splint on evtxexport ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(evtxexport_SOURCES)
@echo "Running splint on evtxinfo ..."
Expand Down
6 changes: 3 additions & 3 deletions evtxtools/evtxtools_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void (*evtxtools_signal_signal_handler)( evtxtools_signal_t ) = NULL;
/* Signal handler for Ctrl+C or Ctrl+Break signals
*/
BOOL WINAPI evtxtools_signal_handler(
unsigned long signal )
evtxtools_signal_t signal )
{
static char *function = "evtxtools_signal_handler";

Expand Down Expand Up @@ -112,7 +112,7 @@ int evtxtools_signal_attach(
evtxtools_signal_signal_handler = signal_handler;

if( SetConsoleCtrlHandler(
evtxtools_signal_handler,
(PHANDLER_ROUTINE) evtxtools_signal_handler,
TRUE ) == 0 )
{
libcerror_error_set(
Expand Down Expand Up @@ -179,7 +179,7 @@ int evtxtools_signal_detach(
static char *function = "evtxtools_signal_detach";

if( SetConsoleCtrlHandler(
evtxtools_signal_handler,
(PHANDLER_ROUTINE) evtxtools_signal_handler,
FALSE ) == 0 )
{
libcerror_error_set(
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 libevtx.h
/bin/rm -f libevtx/definitions.h
/bin/rm -f libevtx/features.h
/bin/rm -f libevtx/types.h
/bin/rm -f Makefile
-rm -f libevtx.h
-rm -f libevtx/definitions.h
-rm -f libevtx/features.h
-rm -f libevtx/types.h
-rm -f Makefile

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

distclean: clean
/bin/rm -f libevtx_definitions.h
/bin/rm -f libevtx.rc
/bin/rm -f Makefile
-rm -f libevtx_definitions.h
-rm -f libevtx.rc
-rm -f Makefile

splint:
sources-local: $(BUILT_SOURCES)

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

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 @@ -51,5 +51,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 @@ -56,9 +56,9 @@ MAINTAINERCLEANFILES = \
Makefile.in

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

splint:
splint-local:
@echo "Running splint on file_fuzzer ..."
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(file_fuzzer_SOURCES)
@echo "Running splint on record_fuzzer ..."
Expand Down
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 pyevtx-python2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ MAINTAINERCLEANFILES = \
Makefile.in

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

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

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

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

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

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

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

6 changes: 3 additions & 3 deletions synclibs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# Script that synchronizes the local library dependencies
#
# Version: 20230510
# Version: 20231023

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -111,12 +111,12 @@ endif
if test ${LOCAL_LIB} = "libfplist";
then
# TODO: make this more generic to strip the last \\
sed -i'~' 's/libfplist_xml_scanner.c \\/libfplist_xml_scanner.c/' ${LOCAL_LIB_MAKEFILE_AM};
sed -i'~' '/EXTRA_DIST = /,/^$/s/libfplist_xml_scanner.c \\/libfplist_xml_scanner.c/' ${LOCAL_LIB_MAKEFILE_AM};

elif test ${LOCAL_LIB} = "libodraw";
then
# TODO: make this more generic to strip the last \\
sed -i'~' 's/libodraw_cue_scanner.c \\/libodraw_cue_scanner.c/' ${LOCAL_LIB_MAKEFILE_AM};
sed -i'~' '/EXTRA_DIST = /,/^$/s/libodraw_cue_scanner.c \\/libodraw_cue_scanner.c/' ${LOCAL_LIB_MAKEFILE_AM};

else
sed -i'~' '/EXTRA_DIST = /,/^$/d' ${LOCAL_LIB_MAKEFILE_AM};
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -392,5 +392,5 @@ MAINTAINERCLEANFILES = \
Makefile.in

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

14 changes: 7 additions & 7 deletions tests/pyevtx_test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_signal_abort(self):

def test_open(self):
"""Tests the open function."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -59,7 +59,7 @@ def test_open(self):

def test_open_file_object(self):
"""Tests the open_file_object function."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -85,7 +85,7 @@ def test_open_file_object(self):

def test_close(self):
"""Tests the close function."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -96,7 +96,7 @@ def test_close(self):

def test_open_close(self):
"""Tests the open and close functions."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
return

Expand Down Expand Up @@ -150,7 +150,7 @@ def test_set_ascii_codepage(self):

def test_get_ascii_codepage(self):
"""Tests the get_ascii_codepage function and ascii_codepage property."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -167,7 +167,7 @@ def test_get_ascii_codepage(self):

def test_get_number_of_records(self):
"""Tests the get_number_of_records function and number_of_records property."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -184,7 +184,7 @@ def test_get_number_of_records(self):

def test_get_number_of_recovered_records(self):
"""Tests the get_number_of_recovered_records function and number_of_recovered_records property."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand Down
8 changes: 4 additions & 4 deletions tests/pyevtx_test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_get_version(self):

def test_check_file_signature(self):
"""Tests the check_file_signature function."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -46,7 +46,7 @@ def test_check_file_signature(self):

def test_check_file_signature_file_object(self):
"""Tests the check_file_signature_file_object function."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -56,7 +56,7 @@ def test_check_file_signature_file_object(self):

def test_open(self):
"""Tests the open function."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand All @@ -73,7 +73,7 @@ def test_open(self):

def test_open_file_object(self):
"""Tests the open_file_object function."""
test_source = unittest.source
test_source = getattr(unittest, "source", None)
if not test_source:
raise unittest.SkipTest("missing source")

Expand Down
Loading

0 comments on commit f90d975

Please sign in to comment.