From 8c99a75c65bd7f1e4dc02ca9cd4c6699fbeb67a65bea4195d48cf2b7bf4ce7a9 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 23 Jan 2021 22:22:39 +0000 Subject: [PATCH] Accepting request 866265 from home:sebix new package OBS-URL: https://build.opensuse.org/request/show/866265 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-oletools?expand=0&rev=1 --- .gitattributes | 24 +++++++++ .gitignore | 4 ++ oletools-0.56.zip | 3 ++ python-oletools.changes | 4 ++ python-oletools.spec | 110 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 145 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 oletools-0.56.zip create mode 100644 python-oletools.changes create mode 100644 python-oletools.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/oletools-0.56.zip b/oletools-0.56.zip new file mode 100644 index 0000000..fbbb9db --- /dev/null +++ b/oletools-0.56.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8481cd60352399e15e9290ac57862a65952e9c83e3526ba833991a5c78f5cca1 +size 3085812 diff --git a/python-oletools.changes b/python-oletools.changes new file mode 100644 index 0000000..2d70f87 --- /dev/null +++ b/python-oletools.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sat Jan 23 18:16:58 UTC 2021 - Sebastian Wagner + +- initial package for version 0.56 diff --git a/python-oletools.spec b/python-oletools.spec new file mode 100644 index 0000000..7204cf4 --- /dev/null +++ b/python-oletools.spec @@ -0,0 +1,110 @@ +# +# spec file for package python-oletools +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-oletools +Version: 0.56 +Release: 0 +Summary: Tools to analyze security characteristics of MS Office and OLE files +License: MIT AND BSD-2-Clause +URL: http://www.decalage.info/python/oletools +Source: https://files.pythonhosted.org/packages/source/o/oletools/oletools-%{version}.zip +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +# SECTION test requirements +BuildRequires: %{python_module colorclass} +BuildRequires: %{python_module easygui} +BuildRequires: %{python_module msoffcrypto-tool} +BuildRequires: %{python_module olefile >= 0.46} +BuildRequires: %{python_module pytest-runner} +BuildRequires: %{python_module pyparsing >= 2.1.0} +# /SECTION +BuildRequires: unzip +BuildRequires: fdupes +Requires: python-colorclass +Requires: python-easygui +Requires: python-msoffcrypto-tool +Requires: python-olefile >= 0.46 +Recommends: python-pcodedmp >= 1.2.5 +Requires: python-pyparsing >= 2.1.0 +BuildArch: noarch +%python_subpackages + +%description +Python tools to analyze security characteristics of MS Office and OLE files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), for Malware Analysis and Incident Response (DFIR) + +%prep +%setup -q -n oletools-%{version} +find oletools -name "*.py" -exec sed -i '1{/\/bin\/env python/d;}' {} \+ +find oletools -name "*.py" -exec sed -i 's/\r\n/\n/' {} \+ + +%build +%python_build + +%install +%python_install +# remove actually optional dependency from requires +sed -i '1{/pcodedmp/d;}' %{buildroot}%{python_sitelib}/oletools-*.egg-info/requires.txt +%python_clone -a %{buildroot}%{_bindir}/ezhexviewer +%python_clone -a %{buildroot}%{_bindir}/mraptor +%python_clone -a %{buildroot}%{_bindir}/mraptor3 +%python_clone -a %{buildroot}%{_bindir}/olebrowse +%python_clone -a %{buildroot}%{_bindir}/oledir +%python_clone -a %{buildroot}%{_bindir}/oleid +%python_clone -a %{buildroot}%{_bindir}/olemap +%python_clone -a %{buildroot}%{_bindir}/olemeta +%python_clone -a %{buildroot}%{_bindir}/oletimes +%python_clone -a %{buildroot}%{_bindir}/olevba +%python_clone -a %{buildroot}%{_bindir}/olevba3 +%python_clone -a %{buildroot}%{_bindir}/pyxswf +%python_clone -a %{buildroot}%{_bindir}/rtfobj +%python_clone -a %{buildroot}%{_bindir}/oleobj +%python_clone -a %{buildroot}%{_bindir}/msodde +%python_clone -a %{buildroot}%{_bindir}/olefile +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest -k 'not test_rough_doctype and not test_encrypted and not test_crypt_return' + +%post +%python_install_alternative ezhexviewer mraptor mraptor3 olebrowse oledir oleid olemap olemeta oletimes olevba olevba3 pyxswf rtfobj oleobj msodde olefile + +%postun +%python_uninstall_alternative ezhexviewer + +%files %{python_files} +%doc README.md README.rst +%python_alternative %{_bindir}/ezhexviewer +%python_alternative %{_bindir}/mraptor +%python_alternative %{_bindir}/mraptor3 +%python_alternative %{_bindir}/olebrowse +%python_alternative %{_bindir}/oledir +%python_alternative %{_bindir}/oleid +%python_alternative %{_bindir}/olemap +%python_alternative %{_bindir}/olemeta +%python_alternative %{_bindir}/oletimes +%python_alternative %{_bindir}/olevba +%python_alternative %{_bindir}/olevba3 +%python_alternative %{_bindir}/pyxswf +%python_alternative %{_bindir}/rtfobj +%python_alternative %{_bindir}/oleobj +%python_alternative %{_bindir}/msodde +%python_alternative %{_bindir}/olefile +%{python_sitelib}/* + +%changelog