Commit Graph

521 Commits

Author SHA1 Message Date
Miro Hrončok 7baa535f27 Enable https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup on power and arm
https://bugzilla.redhat.com/show_bug.cgi?id=1795575 is "fixed for almost a month"
2020-02-28 18:34:31 +01:00
Miro Hrončok 66b21b9b89 Rebased to 3.8.2 final
All patches applied cleanly.
2020-02-26 15:03:31 +01:00
Miro Hrončok 471a304653 Update the ensurepip module to work with setuptools >= 45
setuptools 45.x is Python 3 only and changed the name of the wheel
2020-02-24 21:49:54 +01:00
Nicolas Chauvet 086f5b2234 Use __isa_bits instead of crafted value
This is easier to read and the appropriate macro to use here

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2020-02-24 19:53:58 +00:00
Marcel Plch b6982963b8 Rebase to v3.8.2rc2 2020-02-24 17:22:04 +01:00
Miro Hrončok e2dce1ef0e Rebased to 3.8.2rc1
Patches 339 and 341 were backports, now included.
No other patches changes required.
2020-02-12 11:40:41 +01:00
Lumir Balhar e90b6d950b Use compileall2 module for byte-compilation in the python3 package 2020-01-31 07:46:43 +00:00
Tomas Orsava 97e152a6da De-hardcode py_SOVERSION in the files section 2020-01-30 20:52:35 +00:00
Miro Hrončok b1c7775af7 Fix test_zipfile.test_add_file_after_2107() 2020-01-30 17:50:12 +01:00
Miro Hrončok a7179c0ac5 Temporarily don't use -fno-semantic-interposition on power and arm
Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1795575
2020-01-30 17:50:12 +01:00
Victor Stinner bb05cf63a4 Run the test suite with --timeout=1800 2020-01-30 17:50:12 +01:00
Miro Hrončok acf2f58231 ctypes: Disable checks for union types being passed by value
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1794572
Fixed upstream: https://bugs.python.org/issue16575
2020-01-30 17:50:10 +01:00
Fedora Release Engineering 1e4e35f9c2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 16:28:16 +00:00
Miro Hrončok a262879258 Update to Python 3.8.1
No patches changes since 3.8.1rc1.
2019-12-19 12:21:03 +01:00
Miro Hrončok 8d46a842b6 Rebased to Python 3.8.1rc1
All patches applied cleanly.

Among other things, this contains the necessary fix for gcc 10 support:
 https://bugs.python.org/issue38965
2019-12-10 14:38:19 +01:00
Charalampos Stratakis 141731d4d0 Build Python with -fno-semantic-interposition
The compiler flag has been added to CFLAGS_NODIST and
LDFLAGS_NODIST. This will compile the core interpreter
and the stdlib modules with -fno-semantic-interposition
but will not affect user build and rpm C extension modules
compiled by distutils.

This has the effect of speeding up the interpreter up to
27%, depending on the workload, with the drawback of disabling
the capability of using LD_PRELOAD to override symbols in
libpython.

https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
2019-12-03 19:39:22 +01:00
Miro Hrončok 4b316fdc3f Reintroduce the OPENSSL_CONF=/non-existing-file workaround
Since crypto-policies-20191002-1.gitc93dc99.fc32, the maximum version of TLS
is customized in Fedora as well.

See https://bugzilla.redhat.com/show_bug.cgi?id=1778357
and https://bugs.python.org/issue38815

This reverts commit b33b4a5162.
2019-12-02 18:24:24 +01:00
Miro Hrončok 25c078cff5 Recommend python3-tkinter when tk is installed
The tkinter module is part of the Python's standard library, however it is in
a separate subpackage to save an unwanted dependency on tk.

When tk is installed, we recommend the subpackage to provide more upstream-like
experience, but still provide a way out.
2019-11-28 15:45:05 +01:00
Tomas Orsava a50a780039 New bcond main_python
The bcond flatpackage assumed that if building *without* flatpackage,
that we want to build the main Python for the distribution. However, in
some instances we want a non-flatpackage build of Python that is *not*
the main Python in the distro.
Therefore I have split the main-Python setting into its own bcond.
2019-11-26 15:34:21 +00:00
Miro Hrončok 6e14981d8b Add "downstream only" explanations to various patches
Suggested by Neal Gompa in https://bugzilla.redhat.com/show_bug.cgi?id=1774417
2019-11-25 13:20:27 +01:00
Miro Hrončok 102b2bcc79 Verify upstream sources with GPG
This is now a recommended thing to do:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_source_file_verification

Regardless if it adds actual security, it should prevent problems like this one:
https://mail.python.org/archives/list/python-dev@python.org/message/OYNQS2BZYABXACBRHBHV4RCEPQU5R6EP/
2019-11-01 08:09:41 +01:00
Miro Hrončok 10ec9de2ef Update to Python 3.8.0 final 2019-10-15 19:43:42 +02:00
Miro Hrončok 796e80bd9a Pass -Og to EXTRA_CFLAGS as well as to CFLAGS_NODIST
- to CFLAGS_NODIST to take precedence as CFLAGS_NODIST go after EXTRA_CFLAGS
 - to EXTRA_CFLAGS to "bake it in" and build extension modules with -Og
 - call make regen-all with the same flags, as it invokes gcc as well
2019-10-15 19:42:25 +02:00
Charalampos Stratakis 577a903f29 Make the debug build compile with -Og
Due to Python's handling of CFLAGS and the way we
were passing extra compiler flags through the SPEC
the -Og flag for the debug build was overridden by
the -O2 flag, resulting in various side effects.

See: https://bugs.python.org/issue37631

Resolves: rhbz#1678277
2019-10-03 13:03:23 +00:00
Miro Hrončok 9a14f3e986 Rebased to Python 3.8.0rc1
Rebased patches: 102
Removed patches already merged upstream: 331
2019-10-01 23:05:55 +02:00
Kalev Lember cbb927f346 Avoid using _prefix macro for /usr/lib/debug dir
In case of flatpak module builds, _prefix is redefined as /app.
rpm-build however hardcodes /usr/lib/debug without using the _prefix
macro, so do the same here to match this.

This fixes building Python as a flatpak module.

https://bugzilla.redhat.com/show_bug.cgi?id=1737933#c14
2019-09-25 15:54:58 +02:00
Miro Hrončok e702ad4c2b Rebased to Python 3.8.0b4
Patch 189 rebased for new setuptools/pip version.

Patch 331 added to fix clang: https://bugzilla.redhat.com/show_bug.cgi?id=1715016

importlib.metadata is now a simple module, not a folder.
2019-08-30 17:55:01 +02:00
Miro Hrončok 7b9cec6bb1 Enable Profile-guided optimization for all arches, not just x86
This increases the build time (to ~2 hours on armv7hl Koji),
but should bring more optimized Python to architectures other than x86.

The build time overhead is not so big on Python 3.8,
as only a limited number of tests is used.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1741015
2019-08-19 16:49:13 +02:00
Miro Hrončok c4cab72129 Rebuilt for Python 3.8 2019-08-14 23:07:29 +02:00
Miro Hrončok 8fe9ebffa8 Bootstrap for Python 3.8 2019-08-14 19:46:57 +02:00
Miro Hrončok 1e3b8fac07 Rebase to 3.8.0b3
https://fedoraproject.org/wiki/Changes/Python3.8
2019-08-12 19:10:51 +02:00
Miro Hrončok e2599943a2 Conditionalize python3-devel runtime dependencies on RPM packages and setuptools
Installing python3-devel currently brings in:

- annobin
- dwz
- efi-srpm-macros
- fpc-srpm-macros
- ghc-srpm-macros
- gnat-srpm-macros
- go-srpm-macros
- nim-srpm-macros
- ocaml-srpm-macros
- openblas-srpm-macros
- perl-srpm-macros
- python-rpm-macros
- python-srpm-macros
- python3-rpm-generators
- python3-rpm-macros
- qt5-srpm-macros
- redhat-rpm-config
- rust-srpm-macros

For somebody who needs python3-devel to build extension modules,
those are all useless, so we conditionalize it on rpm-build.

Based on the reason for setuptools dependency, we do the same here
(but note that python3 already recommends it).
2019-08-11 11:37:21 +02:00
Fedora Release Engineering 5c6b2e2b5c - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 17:22:20 +00:00
Miro Hrončok 46d035d896 Keep the LICENSE.txt file in lib/pythonX.Y dir
The license() builtin tries to read it and virtualenv tries to copy it.

See https://github.com/pypa/virtualenv/issues/1352

Up until now, the license() builtin juts felt back to:

    See https://www.python.org/psf/license/

However it should output the full license text.

Virtualenv ~16.6 warns:

    No LICENSE.txt / LICENSE found in source

Technically, it is probably possible to install the package without
%license files, but that would simply resort to the previous noncritical
behavior.

This fix is not critical and hence it doesn't bump release, for easier
backporting to all our Python packages.
2019-07-22 18:38:17 +02:00
Miro Hrončok ec995d8172 Restore pyc to TIMESTAMP invalidation mode as default in rpmbubild
See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
2019-07-15 17:38:09 +02:00
Lumir Balhar a664336af9 Move test.support module to python3-test subpackage
More info: https://fedoraproject.org/wiki/Changes/Move_test.support_module_to_python3-test_subpackage
2019-07-15 15:28:54 +02:00
Miro Hrončok 337d3348c9 Python now means Python 3
- https://fedoraproject.org/wiki/Changes/Python_means_Python3
- The python-unversioned-command package is no longer Python 2, but 3
- The python, pydoc, python-config, python-debug, idle, pygettext.py and
  msgfmt.py commands are now in python3
2019-07-15 15:06:48 +02:00
Miro Hrončok 0f89ab9113 Remove obsolete obsoletes 2019-07-12 18:41:02 +02:00
Miro Hrončok f7475de5fc Add %python_provide provides
This allows easier compatibility back and forth once (and if)
https://fedoraproject.org/wiki/Changes/Python_means_Python3
happens. This is not the full implementation of the change,
as the python-unversioned package still needs to be added.

This is currently a no-op as %python_provide does nothing
for python3.
2019-07-09 15:42:18 +00:00
Miro Hrončok 663a998388 Update to 3.7.4 2019-07-09 11:00:50 +02:00
Miro Hrončok f585cd7ec1 Update to 3.7.4rc2 2019-07-03 00:37:56 +02:00
Miro Hrončok 9f5808cf53 Don't let RPM set SOURCE_DATE_EPOCH based on the latest %changelog date
It breaks tests with: can't find '__main__' module in .../test_zip.zip

Reported at https://bugs.python.org/issue34022
Tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1724753
2019-06-27 20:17:39 +02:00
Miro Hrončok b33b4a5162 Remove the OPENSSL_CONF=/non-existing-file workaround
The test was fixed upstream to expect different config on Fedora.

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1618753

(Note that we still keep that on the CI for older Python versions.)
2019-06-26 10:30:21 +02:00
Miro Hrončok dd5f80b1b8 Update to 3.7.4rc1
- reenable test_asyncio
 - drop merged CVE fixes (patches 320, 324)
2019-06-25 23:16:36 +02:00
Miro Hrončok d3803a6dd6 Security fix for CVE-2019-9740 and CVE-2019-9947
Disallow control chars in http URLs
Fixed upstream: https://bugs.python.org/issue30458
2019-05-07 18:06:05 +02:00
Charalampos Stratakis 1b92cc7981 Fix handling of pre-normalization characters in urlsplit 2019-05-07 15:46:35 +00:00
Patrik Kopkan 8f86cfe696 add symlink for python3.Xm manpages 2019-04-23 14:52:08 +02:00
Victor Stinner 9733ead195 Reenable test_posix.test_fs_holes()
Since 2012, when the test was skipped from Python 3.3.0b1 (commit
3b4dd24c42), Linux now have a good
support for punching holes in filesystems.

Only 00160-disable-test_fs_holes-in-rpm-build.patch and
00163-disable-parts-of-test_socket-in-rpm-build.patch patches used
@unittest._skipInRpmBuild @unittest._expectedFailureInRpmBuild
decorators, but these 2 patches have been removed: remove
00132-add-rpmbuild-hooks-to-unittest.patch and
WITHIN_PYTHON_RPM_BUILD environment variable as well.
2019-03-29 17:17:41 +01:00
Miro Hrončok 6caee321b2 Update to 3.7.3 2019-03-27 01:03:17 +01:00
Miro Hrončok 45a4368c6e Rebase to 3.7.3rc1
Patches merged upstream: 317, 320
Patches rebased: 189 (pip and setuptools versions only)
2019-03-21 13:10:27 +00:00