From 0e2418513513b8ff7d834aa320986ef747e05fbee75b1fb6689615c446ab725e Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Sun, 19 Jan 2020 02:18:55 +0000 Subject: [PATCH 1/4] Accepting request 765198 from home:mcepl:branches:security:forensics Packaged as a dependency for python-dfVFS OBS-URL: https://build.opensuse.org/request/show/765198 OBS-URL: https://build.opensuse.org/package/show/security:forensics/python-dfdatetime?expand=0&rev=15 --- python-dfdatetime.changes | 36 ++---------------------------------- python-dfdatetime.spec | 39 +++++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 50 deletions(-) diff --git a/python-dfdatetime.changes b/python-dfdatetime.changes index 10e9385..e00955e 100644 --- a/python-dfdatetime.changes +++ b/python-dfdatetime.changes @@ -1,36 +1,4 @@ ------------------------------------------------------------------- -Mon Aug 19 19:37:10 UTC 2019 - Greg Freemyer - -- update to v0~20190517 - * changelog not provided -- Added Requires: python-mock to allow self-test to be manually run - -------------------------------------------------------------------- -Thu Jan 11 21:43:13 UTC 2018 - Greg.Freemyer@gmail.com - -- update to v0~20180110 - * deprecated a functions - * added new functions - -------------------------------------------------------------------- -Tue Oct 3 16:08:32 UTC 2017 - Greg.Freemyer@gmail.com - -- update to v0~20170719 - * various improvements including - new format support - added sanity checks -- implement python singlespec syntax -- remove the lines that delete *.pyc and *.pyo files, - they no longer cause problems - -------------------------------------------------------------------- -Sat Jul 30 22:27:27 UTC 2016 - jengelh@inai.de - -- Use python macros for filelists. - Use hardlinks for fdupes, it's cheaper. - -------------------------------------------------------------------- -Thu Jul 28 20:57:06 UTC 2016 - Greg.Freemyer@gmail.com - -- initial package v0~20160323 +Fri Jan 17 10:12:11 UTC 2020 - Matej Cepl +- Initial effort to package dfdatetime 20190517 diff --git a/python-dfdatetime.spec b/python-dfdatetime.spec index ec39dec..9611e29 100644 --- a/python-dfdatetime.spec +++ b/python-dfdatetime.spec @@ -1,7 +1,7 @@ # # spec file for package python-dfdatetime # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,45 +16,52 @@ # -%define timestamp 20190517 %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 +%define modname dfdatetime Name: python-dfdatetime -Version: 0~%{timestamp} +Version: 20190517 Release: 0 -Summary: Digital Forensics Date and Time (dfDateTime) +Summary: Digital Forensics date and time (dfDateTime) License: Apache-2.0 Group: Development/Languages/Python -Url: https://github.com/log2timeline/dfdatetime -Source: https://github.com/log2timeline/dfdatetime/releases/download/%{timestamp}/dfdatetime-%{timestamp}.tar.gz +URL: https://github.com/log2timeline/dfdatetime +Source: https://files.pythonhosted.org/packages/source/d/%{modname}/%{modname}-%{version}.tar.gz BuildRequires: %{python_module devel} +BuildRequires: %{python_module mock >= 2.0.0} +BuildRequires: %{python_module pbr >= 4.2.0} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six >= 1.1.0} BuildRequires: fdupes BuildRequires: python-rpm-macros -#Python-mock is used for internal self-test at a minimum -Requires: python-mock -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %python_subpackages %description -dfDateTime, or Digital Forensics date and time, provides date and time objects to preserve accuracy and precision. +dfDateTime, or Digital Forensics date and time, provides date and time +objects to preserve accuracy and precision. %prep -%setup -q -n dfdatetime-%{timestamp} +%setup -q -n %{modname}-%{version} %build %python_build %install %python_install -# these doc files are installed to the wrong place -rm -rf %{buildroot}/usr/share/doc/dfdatetime -%fdupes %{buildroot}/%{_prefix} +# setup.py install helpfully installs files where it shouldn’t +rm -rfv %{buildroot}%{_datadir}/doc/%{modname} + +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Using pytest leads to some horribly-looking crashes, not sure what's +# going on. +%python_exec ./run_tests.py %files %{python_files} -%defattr(-,root,root) %license LICENSE %doc ACKNOWLEDGEMENTS AUTHORS README -%{python_sitelib}/dfdatetime* +%{python_sitelib}/* %changelog From b78797c25833009d92abf5ffc6724c3affafb37eafcf911abce2e70a4ad7eeee Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Sun, 19 Jan 2020 23:59:19 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/security:forensics/python-dfdatetime?expand=0&rev=16 --- python-dfdatetime.changes | 40 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/python-dfdatetime.changes b/python-dfdatetime.changes index e00955e..217728f 100644 --- a/python-dfdatetime.changes +++ b/python-dfdatetime.changes @@ -1,4 +1,42 @@ ------------------------------------------------------------------- Fri Jan 17 10:12:11 UTC 2020 - Matej Cepl -- Initial effort to package dfdatetime 20190517 +- Convert to python3 only + +------------------------------------------------------------------- +Mon Aug 19 19:37:10 UTC 2019 - Greg Freemyer + +- update to v0~20190517 + * changelog not provided +- Added Requires: python-mock to allow self-test to be manually run + +------------------------------------------------------------------- +Thu Jan 11 21:43:13 UTC 2018 - Greg.Freemyer@gmail.com + +- update to v0~20180110 + * deprecated a functions + * added new functions + +------------------------------------------------------------------- +Tue Oct 3 16:08:32 UTC 2017 - Greg.Freemyer@gmail.com + +- update to v0~20170719 + * various improvements including + new format support + added sanity checks +- implement python singlespec syntax +- remove the lines that delete *.pyc and *.pyo files, + they no longer cause problems + +------------------------------------------------------------------- +Sat Jul 30 22:27:27 UTC 2016 - jengelh@inai.de + +- Use python macros for filelists. + Use hardlinks for fdupes, it's cheaper. + +------------------------------------------------------------------- +Thu Jul 28 20:57:06 UTC 2016 - Greg.Freemyer@gmail.com + +- initial package v0~20160323 + + From a353f0f43e19baeef806b401d66f0afd6652daad78ac0f5235c2f86a6db516d2 Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Fri, 24 Jan 2020 03:27:38 +0000 Subject: [PATCH 3/4] Restore version OBS-URL: https://build.opensuse.org/package/show/security:forensics/python-dfdatetime?expand=0&rev=17 --- python-dfdatetime.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-dfdatetime.spec b/python-dfdatetime.spec index 9611e29..5c62c83 100644 --- a/python-dfdatetime.spec +++ b/python-dfdatetime.spec @@ -17,10 +17,11 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define timestamp 20190517 %define skip_python2 1 %define modname dfdatetime Name: python-dfdatetime -Version: 20190517 +Version: 0~%{timestamp} Release: 0 Summary: Digital Forensics date and time (dfDateTime) License: Apache-2.0 From d573e6c6c1d4437474a34dfb4f2ffcb2224b5ac7ecedd9eb7967af21acecce8b Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Fri, 24 Jan 2020 03:47:08 +0000 Subject: [PATCH 4/4] finish restoring version number OBS-URL: https://build.opensuse.org/package/show/security:forensics/python-dfdatetime?expand=0&rev=18 --- python-dfdatetime.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-dfdatetime.spec b/python-dfdatetime.spec index 5c62c83..dc0f95b 100644 --- a/python-dfdatetime.spec +++ b/python-dfdatetime.spec @@ -27,7 +27,7 @@ Summary: Digital Forensics date and time (dfDateTime) License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/log2timeline/dfdatetime -Source: https://files.pythonhosted.org/packages/source/d/%{modname}/%{modname}-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/d/%{modname}/%{modname}-%{timestamp}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module mock >= 2.0.0} BuildRequires: %{python_module pbr >= 4.2.0} @@ -43,7 +43,7 @@ dfDateTime, or Digital Forensics date and time, provides date and time objects to preserve accuracy and precision. %prep -%setup -q -n %{modname}-%{version} +%setup -q -n %{modname}-%{timestamp} %build %python_build