- update to version 2.4.80
- add fix-tests-pr-111.patch to skip an optional test depending on third party data OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymisp?expand=0&rev=5
This commit is contained in:
74
fix-tests-pr-111.patch
Normal file
74
fix-tests-pr-111.patch
Normal file
@@ -0,0 +1,74 @@
|
||||
From d59e70ce8425b610d1e5a9cde77cfb26af9ba184 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Wagner <wagner@cert.at>
|
||||
Date: Wed, 20 Sep 2017 11:15:13 +0200
|
||||
Subject: [PATCH 1/2] TST: update test requirements
|
||||
|
||||
---
|
||||
.travis.yml | 2 +-
|
||||
setup.py | 9 ++++++++-
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/.travis.yml b/.travis.yml
|
||||
index 5f93e2fc..391d973e 100644
|
||||
--- a/.travis.yml
|
||||
+++ b/.travis.yml
|
||||
@@ -20,7 +20,7 @@ install:
|
||||
- pip install -U nose
|
||||
- pip install coveralls
|
||||
- pip install codecov
|
||||
- - pip install requests-mock pytest
|
||||
+ - pip install requests-mock
|
||||
- pip install https://github.com/lief-project/packages/raw/lief-master-latest/pylief-0.7.0.dev.zip
|
||||
- pip install git+https://github.com/kbandla/pydeep.git
|
||||
- pip install python-magic
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 553666f1..5b5d2737 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -26,8 +26,15 @@
|
||||
'Topic :: Security',
|
||||
'Topic :: Internet',
|
||||
],
|
||||
- test_suite="tests",
|
||||
+ test_suite="tests.test_offline",
|
||||
install_requires=['six', 'requests', 'python-dateutil', 'jsonschema'],
|
||||
+ tests_require=[
|
||||
+ 'jsonschema',
|
||||
+ 'python-dateutil',
|
||||
+ 'python-magic',
|
||||
+ 'requests-mock',
|
||||
+ 'six'
|
||||
+ ],
|
||||
include_package_data=True,
|
||||
package_data={'pymisp': ['data/*.json', 'data/misp-objects/schema_objects.json',
|
||||
'data/misp-objects/schema_relationships.json',
|
||||
|
||||
From 0790e571a1819f6aaff82005a47132c2b6cd8494 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Wagner <wagner@cert.at>
|
||||
Date: Wed, 20 Sep 2017 11:15:33 +0200
|
||||
Subject: [PATCH 2/2] TST: skip test with optional files if not existing
|
||||
|
||||
---
|
||||
tests/test_offline.py | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/test_offline.py b/tests/test_offline.py
|
||||
index 25229c02..47e43a50 100644
|
||||
--- a/tests/test_offline.py
|
||||
+++ b/tests/test_offline.py
|
||||
@@ -233,9 +233,12 @@ def make_objects(self, path):
|
||||
|
||||
def test_objects(self, m):
|
||||
paths = ['cmd.exe', 'tmux', 'MachO-OSX-x64-ls']
|
||||
- for path in paths:
|
||||
- json_blob = self.make_objects(os.path.join('tests',
|
||||
- 'viper-test-files', 'test_files', path))
|
||||
+ try:
|
||||
+ for path in paths:
|
||||
+ json_blob = self.make_objects(os.path.join('tests',
|
||||
+ 'viper-test-files', 'test_files', path))
|
||||
+ except IOError: # Can be replaced with FileNotFoundError when support for python 2 is dropped
|
||||
+ return unittest.SkipTest()
|
||||
print(json_blob)
|
||||
|
||||
if __name__ == '__main__':
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5351f04c343557b1234505ab6b118cdd858478cba47825023dd583ef2f248bf3
|
||||
size 70141
|
||||
3
pymisp-2.4.80.tar.gz
Normal file
3
pymisp-2.4.80.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7480acada8cba9472a85070c57baad89ae9deed826a7515a4c149ac48920c273
|
||||
size 75528
|
||||
@@ -1,3 +1,53 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 20 09:37:12 UTC 2017 - sebix+novell.com@sebix.at
|
||||
|
||||
- update to version 2.4.80
|
||||
- Properly initialize a new malware sample. [Raphaël Vinot]
|
||||
- Merge branch 'master' of github.com:MISP/PyMISP. [Raphaël Vinot]
|
||||
- Permission issue... [Alexandre Dulaunoy]
|
||||
- Merge branch 'objects' [Raphaël Vinot]
|
||||
- Bump misp object. [Raphaël Vinot]
|
||||
- Allow to get the list of known types out of MISPEvent again. [Raphaël
|
||||
Vinot]
|
||||
- Merge branch 'objects' of github.com:MISP/PyMISP into objects.
|
||||
[Raphaël Vinot]
|
||||
- Changed source => object / destination => referenced. [iglocska]
|
||||
- Use MISPAbstract as a master class everywhere. [Raphaël Vinot]
|
||||
This is probably breaking everything.... ¯\_(ツ)_/¯
|
||||
- Bump miso-objects. [Raphaël Vinot]
|
||||
- Changed two fields in object references. [iglocska]
|
||||
- source_uuid => object_uuid
|
||||
- destination_uuid => referenced_uuid
|
||||
- Some more refactoring. [Raphaël Vinot]
|
||||
- Some more refactoring and cleanup. [Raphaël Vinot]
|
||||
- Update object definitions. [Raphaël Vinot]
|
||||
- Update PE generator. [Raphaël Vinot]
|
||||
- Refactoring in order to load objects. [Raphaël Vinot]
|
||||
- Add support for multiple entries of the same type in an object.
|
||||
[Raphaël Vinot]
|
||||
- Remove some python versions from travis. [Raphaël Vinot]
|
||||
- Do not try to run code requiring lief. [Raphaël Vinot]
|
||||
- Remove ImportError. [Raphaël Vinot]
|
||||
- Install deps in travis. [Raphaël Vinot]
|
||||
- Update tests. [Raphaël Vinot]
|
||||
- Do not fail if pymisp is not installed. [Raphaël Vinot]
|
||||
- Add support for ELF and MachO objects. [Raphaël Vinot]
|
||||
- Update get_template_id, cleanup. [Raphaël Vinot]
|
||||
- Refactor all the things. [Raphaël Vinot]
|
||||
Add script for MISP core, make everything generic.
|
||||
- Fixing undefined ressources_path. [edhoedt]
|
||||
- Update function names in mispevent. [Raphaël Vinot]
|
||||
- Re-enable python < 3.5 support. [Raphaël Vinot]
|
||||
- Update file/pe/pe-sections objects creator. [Raphaël Vinot]
|
||||
- Doesn't require describe_types in MISPAttribute's constructor.
|
||||
[Raphaël Vinot]
|
||||
- Update accordingly to the current server implementation. [Raphaël
|
||||
Vinot]
|
||||
- Re-enable python2 support... [Raphaël Vinot]
|
||||
- Initial commit supporting MISP Objects. [Raphaël Vinot]
|
||||
- ChangeLog updated to the latest version. [Alexandre Dulaunoy]
|
||||
- add fix-tests-pr-111.patch to skip an optional test depending on third party data
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 7 20:05:10 UTC 2017 - sebix+novell.com@sebix.at
|
||||
|
||||
|
||||
@@ -20,13 +20,15 @@
|
||||
%{!?license: %global license %doc}
|
||||
%bcond_without test
|
||||
Name: python-pymisp
|
||||
Version: 2.4.79
|
||||
Version: 2.4.80
|
||||
Release: 0
|
||||
Summary: Python API for MISP
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/MISP/PyMISP
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pymisp/pymisp-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM fix-tests-pr-111.patch -- skip an optional test depending on third party data
|
||||
Patch0: https://github.com/MISP/PyMISP/pull/111.patch#/fix-tests-pr-111.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
@@ -34,6 +36,7 @@ BuildRequires: python-rpm-macros
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module jsonschema}
|
||||
BuildRequires: %{python_module python-dateutil}
|
||||
BuildRequires: %{python_module python-magic}
|
||||
BuildRequires: %{python_module requests-mock}
|
||||
BuildRequires: %{python_module requests}
|
||||
%endif
|
||||
@@ -45,8 +48,9 @@ BuildRequires: python3-recommonmark
|
||||
Requires: python-jsonschema
|
||||
Requires: python-python-dateutil
|
||||
Requires: python-requests
|
||||
Suggests: %{name}-doc
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Recommends: %{name}-doc
|
||||
Recommends: python-magic
|
||||
Suggests: python-pydeep
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
@@ -65,7 +69,8 @@ Examples and HTML documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n pymisp-%{version}
|
||||
sed -i '1s/^#!.*//' pymisp/tools/neo4j.py pymisp/tools/openioc.py pymisp/mispevent.py pymisp/tools/stix.py pymisp/exceptions.py pymisp/api.py examples/edit_user_json.py examples/get.py examples/create_events.py examples/events/create_dummy_event.py examples/searchall.py examples/ioc-2-misp/ioc2misp.py examples/del.py examples/add_user_json.py examples/test_sign.py examples/sighting.py examples/delete_user.py examples/misp2clamav.py examples/get_network_activity.py examples/copy_list.py examples/situational-awareness/attribute_treemap.py examples/events/create_massive_dummy_events.py examples/add_user.py examples/up.py examples/feed-generator/generate.py examples/yara_dump.py examples/suricata.py examples/yara.py examples/tags.py examples/graphdb/make_neo4j.py examples/edit_user.py examples/last.py examples/et2misp.py examples/stats.py examples/upload.py examples/suricata.py examples/upload.py examples/sighting.py examples/get_network_activity.py examples/yara.py examples/events/create_massive_dummy_events.py examples/add_user_json.py examples/tags.py examples/edit_user_json.py examples/last.py examples/feed-generator/generate.py examples/stats.py examples/del.py examples/searchall.py examples/situational-awareness/attribute_treemap.py examples/up.py examples/delete_user.py examples/misp2clamav.py examples/edit_user.py examples/get.py examples/create_events.py examples/events/create_dummy_event.py examples/test_sign.py examples/copy_list.py examples/yara_dump.py examples/add_user.py examples/ioc-2-misp/ioc2misp.py examples/et2misp.py examples/graphdb/make_neo4j.py examples/search.py examples/addtag.py examples/tagstatistics.py examples/add_named_attribute.py examples/users_list.py examples/sharing_groups.py examples/addtag2.py
|
||||
%patch0 -p1
|
||||
find pymisp examples -name "*.py" -type f -exec sed -i '1s/^#!.*//' '{}' \+
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -87,9 +92,8 @@ rm tests/test.py
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc README.md
|
||||
%%license LICENSE
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
|
||||
%files -n %{name}-doc
|
||||
|
||||
Reference in New Issue
Block a user