commit c508914e43a0a2fce3d29c685fc06bbcecd4aaa637b9a99b56d8335a00a87ef0 Author: Adrian Schröter Date: Fri May 3 21:50:06 2024 +0200 Sync from SUSE:SLFO:Main python-pefile revision fa29467f8898149afdd4dbce6adf6e7c diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.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 +*.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/pefile-2023.2.7.tar.gz b/pefile-2023.2.7.tar.gz new file mode 100644 index 0000000..f4a4a0e --- /dev/null +++ b/pefile-2023.2.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc +size 74854 diff --git a/python-pefile.changes b/python-pefile.changes new file mode 100644 index 0000000..7b3dfe0 --- /dev/null +++ b/python-pefile.changes @@ -0,0 +1,99 @@ +------------------------------------------------------------------- +Sat Jun 10 09:48:44 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Sun Mar 26 19:55:48 UTC 2023 - Dirk Müller + +- update to 2023.2.7: + * accept dot in valid charset for name + * Remove future from dependencies + * Add machine types + * Incorporate PEP 238 and PEP 3120 + * Generate GUID fields of CV_INFO_PDB70 readable by Python + * Dynamic relocations support + * Add Export Hash Method + * Loosen export symbol validation + +------------------------------------------------------------------- +Mon Jun 6 22:43:35 UTC 2022 - Greg Freemyer + +- update to version 2022.5.30 + * Merged pull request #344 from elicn/faster-reloc: Speed up relocation process + * Merged pull request #175 from tdube/patch-1: Fix catch-all exception clause in parse_resources_directory + * Turn data into a bytearray to avoid copying data around (from elicn) + * Merged pull request #343 from mat-gas/master: various performances improvements (30-50% in certain workflows, 15-25% in average) + * Merged pull request #340 from dinateper/feature/PEfile_context_manager: Update PE to allow with statements + * Removed legacy Python 2 code + * Miscellaneous other fixes. + +- add %define skip_python2 1 + +------------------------------------------------------------------- +Wed Apr 24 11:33:25 UTC 2019 - pgajdos@suse.com + +- version update to 2019.4.18 + * speed up parsing of files with many ordinals or exports + * other merged PRs and issues fixed since the last release + +------------------------------------------------------------------- +Tue Dec 4 12:51:24 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Fri Nov 16 19:07:57 UTC 2018 - Todd R + +- Update to version 2018.8.8 + * Fixed tests + * Fixed bug accessing warnings attribute from the PE object + * Fix is_driver()'s behavior under Python 3. + * Fix a bug attempting to handle an invalid string + * Modified version information to handle multiple version + information that may exist within a single file. + * Prevent division by zero when pe.trim() returns no data + +------------------------------------------------------------------- +Thu Oct 19 00:59:49 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version +- Update to version 2017.9.3 + * No changelog +- Drop unneeded force_version.patch + +------------------------------------------------------------------- +Thu May 14 21:30:03 UTC 2015 - Greg.Freemyer@gmail.com + +- upgrade to v1.2.10-139 + * Merged path from ThreatGrid's Wesley Brown. Thanks! + Summary: changed memory mapping usage, + revamped to use bytearrays rather than list, + complete rewrite of the checksum generation algorithm to be much more memory efficient, + less susceptible to PE bomb attacks + * Corrected some doctrings + * Added WIndow 8 support + * Added more subsystem types + * Added Mandiant's ordlookup to resolve the names for some symbols + * Better handling of the Rich Header +- updated license to BSD-3-Clause +- moved UserDB.txt to /usr/share/python-pefile + * This is a PE file signature database. + * It is available to callers of python-pefile, + but the caller must explicitely point the USERDB variable at it. +- Add force-version.patch because upstream depends on SCR checkout mechanism + +------------------------------------------------------------------- +Tue Nov 20 19:25:06 UTC 2012 - saschpe@suse.de + +- Cleanup excessive macro usage +- Fix SLE_11_SP2 build (not noarch there) +- No need for dos2unix, sed is enough + +------------------------------------------------------------------- +Fri Sep 21 20:49:38 UTC 2012 - Greg.Freemyer@gmail.com + +- initial package +- v1.2.10-121 +- call dos2unix on a couple text files that have dos line endings + diff --git a/python-pefile.spec b/python-pefile.spec new file mode 100644 index 0000000..c5e014e --- /dev/null +++ b/python-pefile.spec @@ -0,0 +1,71 @@ +# +# spec file for package python-pefile +# +# Copyright (c) 2023 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-pefile +Version: 2023.2.7 +Release: 0 +Summary: A python module to work with PE (pertable executable) files +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/erocarrera/pefile +Source: https://files.pythonhosted.org/packages/source/p/pefile/pefile-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch + +%python_subpackages + +%description +Portable Executable reader module. + +All the PE file basic structures are available with their default names as +attributes of the instance returned. + +Processed elements such as the import table are made available with lowercase +names, to differentiate them from the upper case basic structure names. + +pefile has been tested against many edge cases such as corrupted and malformed +PEs as well as malware, which often attempts to abuse the format way beyond its +standard use. To the best of my knowledge most of the abuse is handled +gracefully. + +%prep +%setup -q -n pefile-%{version} +sed -i -e '/^#!\//, 1d' pefile.py + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +# Tests not in sdist and have good reason to at time of writing: +# https://github.com/erocarrera/pefile/issues/82#issuecomment-192018385 +# https://github.com/erocarrera/pefile/issues/171 +# %%check +# %%python_exec setup.py test + +%files %{python_files} +%doc README +%license LICENSE +%{python_sitelib}/* + +%changelog