Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
Arch-excludes
February 2022
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
arch-excludes@lists.fedoraproject.org
2 participants
377 discussions
Start a n
N
ew thread
Architecture specific change in rpms/rust-infer.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/rust-infer.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-infer.git/commit/?id=55b227087…
. Change: +ExclusiveArch: %{rust_arches} Thanks. Full change: ============ commit c4a26fa4f4a282671330d65f872b7c62f137a124 Author: Rémi Lauzier <remilauzier(a)protonmail.com> Date: Wed Feb 23 17:44:39 2022 -0500 Fix build diff --git a/rust-infer.spec b/rust-infer.spec index d8ca821..9aaba76 100644 --- a/rust-infer.spec +++ b/rust-infer.spec @@ -5,6 +5,8 @@ %global debug_package %{nil} %global crate infer +# Fix an issue with rpm refusing sample files +%global _binaries_in_noarch_packages_terminate_build 0 Name: rust-%{crate} Version: 0.7.0 commit 55b22708728b40e8ddc70c12fbbf536a7d238739 Author: Rémi Lauzier <remilauzier(a)protonmail.com> Date: Wed Feb 23 17:28:34 2022 -0500 Initial import; Fixes RHBZ#2054456 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f7964a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/infer-0.7.0.crate diff --git a/rust-infer.spec b/rust-infer.spec new file mode 100644 index 0000000..d8ca821 --- /dev/null +++ b/rust-infer.spec @@ -0,0 +1,109 @@ +# Generated by rust2rpm 20 +# * Description grammar fix +#
https://github.com/bojand/infer/pull/55
+%bcond_without check +%global debug_package %{nil} + +%global crate infer + +Name: rust-%{crate} +Version: 0.7.0 +Release: %autorelease +Summary: Small crate to infer file type based on magic number signatures + +# Upstream license specification: MIT +License: MIT +URL:
https://crates.io/crates/infer
+Source: %{crates_source} + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Small crate to infer file type based on magic number signatures.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+cfb-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+cfb-devel %{_description} + +This package contains library source intended for building other packages which +use the "cfb" feature of the "%{crate}" crate. + +%files -n %{name}+cfb-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..6e7a968 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (infer-0.7.0.crate) = 7afe563adf24f18fe6ff741d9099283a57649ade04bf6f3dc84aad462b65231b0d16240d36fe8d8dd8466a37b6fd5589e14ae3dc9f6191cb9351fcf4b559f453
1
0
0
0
Architecture specific change in rpms/rust-infer.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/rust-infer.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-infer.git/commit/?id=55b227087…
. Change: +ExclusiveArch: %{rust_arches} Thanks. Full change: ============ commit c4a26fa4f4a282671330d65f872b7c62f137a124 Author: Rémi Lauzier <remilauzier(a)protonmail.com> Date: Wed Feb 23 17:44:39 2022 -0500 Fix build diff --git a/rust-infer.spec b/rust-infer.spec index d8ca821..9aaba76 100644 --- a/rust-infer.spec +++ b/rust-infer.spec @@ -5,6 +5,8 @@ %global debug_package %{nil} %global crate infer +# Fix an issue with rpm refusing sample files +%global _binaries_in_noarch_packages_terminate_build 0 Name: rust-%{crate} Version: 0.7.0 commit 55b22708728b40e8ddc70c12fbbf536a7d238739 Author: Rémi Lauzier <remilauzier(a)protonmail.com> Date: Wed Feb 23 17:28:34 2022 -0500 Initial import; Fixes RHBZ#2054456 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f7964a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/infer-0.7.0.crate diff --git a/rust-infer.spec b/rust-infer.spec new file mode 100644 index 0000000..d8ca821 --- /dev/null +++ b/rust-infer.spec @@ -0,0 +1,109 @@ +# Generated by rust2rpm 20 +# * Description grammar fix +#
https://github.com/bojand/infer/pull/55
+%bcond_without check +%global debug_package %{nil} + +%global crate infer + +Name: rust-%{crate} +Version: 0.7.0 +Release: %autorelease +Summary: Small crate to infer file type based on magic number signatures + +# Upstream license specification: MIT +License: MIT +URL:
https://crates.io/crates/infer
+Source: %{crates_source} + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Small crate to infer file type based on magic number signatures.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+cfb-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+cfb-devel %{_description} + +This package contains library source intended for building other packages which +use the "cfb" feature of the "%{crate}" crate. + +%files -n %{name}+cfb-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..6e7a968 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (infer-0.7.0.crate) = 7afe563adf24f18fe6ff741d9099283a57649ade04bf6f3dc84aad462b65231b0d16240d36fe8d8dd8466a37b6fd5589e14ae3dc9f6191cb9351fcf4b559f453
1
0
0
0
Architecture specific change in rpms/rust-infer.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/rust-infer.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-infer.git/commit/?id=55b227087…
. Change: +ExclusiveArch: %{rust_arches} Thanks. Full change: ============ commit c4a26fa4f4a282671330d65f872b7c62f137a124 Author: Rémi Lauzier <remilauzier(a)protonmail.com> Date: Wed Feb 23 17:44:39 2022 -0500 Fix build diff --git a/rust-infer.spec b/rust-infer.spec index d8ca821..9aaba76 100644 --- a/rust-infer.spec +++ b/rust-infer.spec @@ -5,6 +5,8 @@ %global debug_package %{nil} %global crate infer +# Fix an issue with rpm refusing sample files +%global _binaries_in_noarch_packages_terminate_build 0 Name: rust-%{crate} Version: 0.7.0 commit 55b22708728b40e8ddc70c12fbbf536a7d238739 Author: Rémi Lauzier <remilauzier(a)protonmail.com> Date: Wed Feb 23 17:28:34 2022 -0500 Initial import; Fixes RHBZ#2054456 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f7964a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/infer-0.7.0.crate diff --git a/rust-infer.spec b/rust-infer.spec new file mode 100644 index 0000000..d8ca821 --- /dev/null +++ b/rust-infer.spec @@ -0,0 +1,109 @@ +# Generated by rust2rpm 20 +# * Description grammar fix +#
https://github.com/bojand/infer/pull/55
+%bcond_without check +%global debug_package %{nil} + +%global crate infer + +Name: rust-%{crate} +Version: 0.7.0 +Release: %autorelease +Summary: Small crate to infer file type based on magic number signatures + +# Upstream license specification: MIT +License: MIT +URL:
https://crates.io/crates/infer
+Source: %{crates_source} + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging + +%global _description %{expand: +Small crate to infer file type based on magic number signatures.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license LICENSE +%doc README.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+cfb-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+cfb-devel %{_description} + +This package contains library source intended for building other packages which +use the "cfb" feature of the "%{crate}" crate. + +%files -n %{name}+cfb-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..6e7a968 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (infer-0.7.0.crate) = 7afe563adf24f18fe6ff741d9099283a57649ade04bf6f3dc84aad462b65231b0d16240d36fe8d8dd8466a37b6fd5589e14ae3dc9f6191cb9351fcf4b559f453
1
0
0
0
Architecture specific change in rpms/pypy3.9.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/pypy3.9.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=49ad6567e89c…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=831c9929b304…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=efbf3a366175…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=5aa1d86125bb…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=faa7ffb04460…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=083ef4d302f9…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=f27d32f53000…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=9d0ffbc9d5d8…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=82dcbae2321e…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=720aa9bae8b7…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=a6780ec4355a…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=b929faae35b0…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=91071982692c…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=ad0d37c68389…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=6b002d36f3cb…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=693a83b0c291…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=817c77d554b6…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=347fb465b0fc…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=343676a8999d…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=4a3038ff5634…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=43ee7785260f…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=a0374180ff79…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=d39359a3af6a…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=f756cfcb34f7…
. Change: -%ifarch s390 s390x +%ifarch %{valgrind_arches} +%ifarch %{ix86} x86_64 %{arm} +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 -%ifarch %{power64} -ExcludeArch: %{power64} +ExcludeArch: %{power64} +ExcludeArch: aarch64 %{power64} +%ifarch %{power64} -%ifnarch aarch64 ppc64le +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x +%ifarch s390 s390x +%ifarch %{ix86} x86_64 %{arm} +ExcludeArch: aarch64 +ExcludeArch: aarch64 armv7hl s390 s390x +ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 s390 s390x ppc64le ppc64 +ExcludeArch: aarch64 s390 s390x -%ifarch x86_64 +%ifarch x86_64 +%ifnarch aarch64 ppc64le +%ifnarch s390 +%ifarch %{ix86} x86_64 ppc ppc64 s390x +%ifarch %{ix86} x86_64 Thanks. Full change: ============ commit a22e7e57d16affe5b643363e6d12a2f1401e98df Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 23 02:34:56 2022 +0100 Stop providing pypy3.9(abi) = 7.3, it makes no sense This was added long time ago to try to mimic python(abi) but in this form it converged to nonsense. diff --git a/pypy3.9.spec b/pypy3.9.spec index 62b1600..2fa86bf 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -172,7 +172,6 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} -Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} # This is when pypy3 package was replaced: commit c2195a845be83a63ee47f34a61e2cc6c51adabe7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:07:03 2022 +0100 Update to 7.3.8 final diff --git a/.gitignore b/.gitignore index 8ffefa5..2cc60f0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /pypy3.8-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc2-src.tar.bz2 +/pypy3.9-v7.3.8-src.tar.bz2 diff --git a/pypy3.9.spec b/pypy3.9.spec index bb4ea19..62b1600 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -1,6 +1,6 @@ %global basever 7.3 %global micro 8 -%global pre rc2 +#global pre ... %global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} @@ -806,6 +806,9 @@ CheckPyPy pypy%{pyversion}-c %changelog +* Tue Feb 22 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8-1 +- Update to 7.3.8 final + * Fri Feb 11 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc2-1 - Update to 7.3.8rc2 diff --git a/sources b/sources index 9d9ec1d..31f6e92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.9-v7.3.8rc2-src.tar.bz2) = 40fc0dd45bf24bc9a1bfa259bce11ee706ac73dd29f66a3e2a16bb9ca5c6683d4aedaf21394875ab3facb31eb65f4d497eaa3c10ef4394251ecb4b4a85511197 +SHA512 (pypy3.9-v7.3.8-src.tar.bz2) = aed018738af7a225f516ec37d059d539f486d9dd427fe000805147b197f496d5fcb0387e47008524753ad18224aebeb1e68f9e2093acbe37468e02bff92f7126 commit c45eac312a942d4fe6f5f8d0e6f28fd37343ee36 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:04:57 2022 +0100 Add comment above the %soname_version definition diff --git a/pypy3.9.spec b/pypy3.9.spec index f7e7b9b..bb4ea19 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -447,6 +447,8 @@ BuildPyPy \ %global installation_archive_name pypy%{pyversion}-%{version_} %global packaging_builddir builddir %global packaged_prefix %{packaging_builddir}/%{installation_archive_name} +# We will set an arbitrary downstream-only soname version, as it is required +# See
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
%global soname_version 0.1 %{bootstrap_python_interp} pypy/tool/release/package.py --archive-name '%{installation_archive_name}' --builddir '%{packaging_builddir}' --no-embedded-dependencies commit f97fb4af2949675ebe660503b3ebc307d4818fad Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:03:31 2022 +0100 Explain how the removed sources list was created diff --git a/pypy3.9.spec b/pypy3.9.spec index 1e56c79..f7e7b9b 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -472,6 +472,8 @@ rm %{packaged_prefix}/include/README # 7. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} # 8. remove sources, we don't install them +# this list was created by inspecting rpmlint output before it was added +# sources that look like they might be tests are kept and included in the test subpackage rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp commit 1b34489b242ea4fa5a0936725b07654eba9605a3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:02:10 2022 +0100 Add reversed "keep this synced" comments diff --git a/pypy3.9.spec b/pypy3.9.spec index cb53228..1e56c79 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -773,6 +773,7 @@ CheckPyPy pypy%{pyversion}-c %files test +# Keep this synced with %%excluded %%files in libs %{pypylibdir}/_ctypes_test.* %{pypylibdir}/_pypy_testcapi.* %{pypylibdir}/_test* @@ -794,6 +795,8 @@ CheckPyPy pypy%{pyversion}-c %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif + +# Keep this synced with %%excluded %%files in libs %{pypylibdir}/cffi/*.h %{pypylibdir}/hpy/devel/ commit a426a21cc460d036b4dedd1a9c2ebc82c9eda8db Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:00:38 2022 +0100 Rename pypy2_build to build_using_pypy2 to be less confusing diff --git a/pypy3.9.spec b/pypy3.9.spec index adb16eb..cb53228 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -108,8 +108,8 @@ Source189: 189-use-rpm-wheels.patch # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%bcond_without pypy2_build -%if %{with pypy2_build} +%bcond_without build_using_pypy2 +%if %{with build_using_pypy2} BuildRequires: pypy2 %global bootstrap_python_interp pypy2 %else @@ -321,7 +321,7 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif -%if %{without pypy2_build} +%if %{without build_using_pypy2} # use the pycparser from PyPy even on CPython ln -s lib_pypy/cffi/_pycparser pycparser %endif commit da61e64d93d761b8b56fd2568e9b8886a9f2e5b7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:58:22 2022 +0100 Make -test and -devel require both main package and -libs explicitly Requiring just the main package would do, but this way it's easier to see directly. CPython does the same. diff --git a/pypy3.9.spec b/pypy3.9.spec index 19737a7..adb16eb 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -186,6 +186,7 @@ Conflicts: pypy3 < 7.3.7-1 # It's intended for the libs package not to drag in the interpreter, see #
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
#
https://bugzilla.redhat.com/show_bug.cgi?id=1862082
+# All other packages require the main package explicitly. %global __requires_exclude ^/usr/bin/pypy %description @@ -251,6 +252,7 @@ Libraries required by the various PyPy implementations of Python %{pyversion}. %package test Summary: Tests for PyPy%{pyversion} +Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} @@ -266,6 +268,7 @@ Useful when you want to run the test suite of PyPy%{pyversion}. %package devel Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} +Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} Provides: pypy3-devel = %{version}-%{release} commit a0e5980f846af150de18317f8aefc49eba59ecde Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:56:44 2022 +0100 Nitpick: patch the ELF, not a link to it diff --git a/pypy3.9.spec b/pypy3.9.spec index 0499757..19737a7 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -462,7 +462,7 @@ rm %{packaged_prefix}/bin/*.debug #
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so -patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} # 6. remove stray README rm %{packaged_prefix}/include/README commit d3586d269a298076b1be480cfdfa1e33cd29dee3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:55:45 2022 +0100 Mimic CPython, %exclude ensurepip/_bundled when built with RPM wheels diff --git a/pypy3.9.spec b/pypy3.9.spec index 09265f8..0499757 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -737,6 +737,9 @@ CheckPyPy pypy%{pyversion}-c %license %{pypylibdir}/cffi/_pycparser/ply/LICENSE %license %{pypylibdir}/hpy.dist-info/LICENSE %{pypylibdir}/ +%if %{with rpmwheels} +%exclude %{pypylibdir}/ensurepip/_bundled +%endif %if "%{_lib}" == "lib64" %{_prefix}/lib/pypy%{pyversion}/ %endif commit 7926d81ad4f10b12f89059692316d4853ec5cad6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Feb 11 09:54:04 2022 +0100 Update to 7.3.8rc2 diff --git a/.gitignore b/.gitignore index 3f09cde..8ffefa5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /pypy3.8-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc1-src.tar.bz2 +/pypy3.9-v7.3.8rc2-src.tar.bz2 diff --git a/pypy3.9.spec b/pypy3.9.spec index 4c1a3de..09265f8 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -1,6 +1,6 @@ %global basever 7.3 %global micro 8 -%global pre rc1 +%global pre rc2 %global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} @@ -793,6 +793,9 @@ CheckPyPy pypy%{pyversion}-c %changelog +* Fri Feb 11 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc2-1 +- Update to 7.3.8rc2 + * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 - Move to a CPython-like installation layout diff --git a/sources b/sources index 2cd33d0..9d9ec1d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.9-v7.3.8rc1-src.tar.bz2) = d1b1942fbacc7f8d642c85ceb4c4c9796e73bd5836615e2db81f4ddabf9e4f94c230f2d946ea9c49b642d41304aeed3906df1931a52ec40c56d14f1028139978 +SHA512 (pypy3.9-v7.3.8rc2-src.tar.bz2) = 40fc0dd45bf24bc9a1bfa259bce11ee706ac73dd29f66a3e2a16bb9ca5c6683d4aedaf21394875ab3facb31eb65f4d497eaa3c10ef4394251ecb4b4a85511197 commit f83fb4944938ec7256d81cb1c6faffd9284bc07f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 21:00:18 2022 +0100 Cleanup parts of the installation diff --git a/pypy3.9.spec b/pypy3.9.spec index 96449a7..4c1a3de 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -454,19 +454,21 @@ BuildPyPy \ rm %{packaged_prefix}/bin/python* # 2. remove the "pypy" symbolic link, we still want pypy2 to be that for now rm %{packaged_prefix}/bin/pypy -# 3. remove the "pypy3"symbolic link, if this is not the main pypy3 +# 3. remove the "pypy3" symbolic link, if this is not the main pypy3 %{!?with_main_pypy3:rm %{packaged_prefix}/bin/pypy3} -# 4. move libpypy3.9-c.so to lib(64) and soname version it +# 4. remove the .debug executbale and library +rm %{packaged_prefix}/bin/*.debug +# 5. move libpypy3.9-c.so to lib(64) and soname version it #
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} -# 5. remove stray README +# 6. remove stray README rm %{packaged_prefix}/include/README -# 6. copy the main LICENSE file to pypy's libdir, as does CPython +# 7. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} -# 7. Remove sources, we don't install them +# 8. remove sources, we don't install them rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp @@ -590,13 +592,6 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} %endif -# wtf? This is probably masking some bigger problem, but let's do this for now -mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : - -# since 5.10.0, the debug binaries are built and shipped, making the -# pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{_bindir}/*.debug - %check commit 49ad6567e89c18c6a5caae92ac961fcfe4356aa9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 20:58:42 2022 +0100 Remove an useless s390(x) z10 sed, we are at z13+ in Fedora diff --git a/pypy3.9.spec b/pypy3.9.spec index e9cb58a..96449a7 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -327,11 +327,6 @@ rm lib-python/3/idlelib/idle.bat rm lib-python/3/distutils/command/*.exe %build -%ifarch s390 s390x -# pypy3 requires z10 at least -%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /') -%endif - # Top memory usage is about 4.5GB on arm7hf free commit 831c9929b304069e0b18ec88a5bcf0a21d374204 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 20:58:24 2022 +0100 Use %{valgrind_arches} diff --git a/pypy3.9.spec b/pypy3.9.spec index 097ec4a..e9cb58a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -137,7 +137,7 @@ BuildRequires: xz-devel BuildRequires: python-rpm-macros -%ifnarch s390 +%ifarch %{valgrind_arches} BuildRequires: valgrind-devel %endif commit 03bdb932315d1e7896accf2fdac60801a21929de Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 11:21:37 2022 +0100 Final touches to the rpmlintrc file diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc index 7c88006..8b50ec4 100644 --- a/pypy3.9.rpmlintrc +++ b/pypy3.9.rpmlintrc @@ -29,6 +29,9 @@ addFilter(r'no-manual-page-for-binary pypy(3(\.\d+)?)?') # missing documentation from subpackages addFilter(r'^pypy3(\.\d+)?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') +# Obviously deliberately empty file(s) +addFilter(r'hidden-file-or-dir /usr/lib(64)?/pypy3\.\d+/.*\.empty') + # we have extra tokens at the end of %endif/%else directives, we consider them useful addFilter(r'extra tokens at the end of %(endif|else) directive') commit a2df6900a7f0e566d45ee8e73a9016174a65d944 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 11:11:52 2022 +0100 Stop shipping C sources, move some headers to -devel, one to -test diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc index 2aa2ce3..7c88006 100644 --- a/pypy3.9.rpmlintrc +++ b/pypy3.9.rpmlintrc @@ -20,6 +20,7 @@ addFilter(r'only-non-binary-in-usr-lib') # some devel files that are deliberately needed addFilter(r'devel-file-in-non-devel-package /usr/include/pypy3\.\d+m?/pyconfig-(32|64)\.h') addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/distutils/tests/xxmodule\.c') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/_.*test.*\.[ch]') # SORRY, NOT SORRY: # manual pages diff --git a/pypy3.9.spec b/pypy3.9.spec index 76cf42f..097ec4a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -471,6 +471,12 @@ patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{so rm %{packaged_prefix}/include/README # 6. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} +# 7. Remove sources, we don't install them +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/_cffi_src/openssl/src +rm %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_pypy_*.c # Create the prefix and move stuff into it mkdir -p %{buildroot}%{_prefix} @@ -763,6 +769,11 @@ CheckPyPy pypy%{pyversion}-c %exclude %{pypylibdir}/*/test/ %exclude %{pypylibdir}/*/tests/ %exclude %{pypylibdir}/idlelib/idle_test/ +%exclude %{pypylibdir}/testcapi_long.h + +# Keep this synced with %%files devel below +%exclude %{pypylibdir}/cffi/*.h +%exclude %{pypylibdir}/hpy/devel/ %files test @@ -777,6 +788,7 @@ CheckPyPy pypy%{pyversion}-c %{pypylibdir}/*/test/ %{pypylibdir}/*/tests/ %{pypylibdir}/idlelib/idle_test/ +%{pypylibdir}/testcapi_long.h %files devel @@ -786,6 +798,8 @@ CheckPyPy pypy%{pyversion}-c %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif +%{pypylibdir}/cffi/*.h +%{pypylibdir}/hpy/devel/ %changelog commit 2c935f984efe043a0a873cc1b19cfd3e64ea132e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:18:37 2022 +0100 Introduce an rpminspect config file Copied from python3.10, "python" replaced with "pypy" badfuncs library path changed. diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..0b7b36d --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,28 @@ +# exclude test XML data (not always valid) from XML validity check: +xml: + ignore: + - /usr/lib*/pypy*/test/xmltestdata/* + - /usr/lib*/pypy*/test/xmltestdata/*/* + +# exclude _socket from ipv4 only functions check, it has both ipv4 and ipv6 only +badfuncs: + ignore: + - /usr/lib*/libpypy*.so* + +# don't report changed content of compiled files +# that is expected with every toolchain update and not reproducible yet +changedfiles: + # note that this is a posix regex, so no \d + exclude_path: (\.so(\.[0-9]+(\.[0-9]+)?)?$|^/usr/bin/pypy[0-9]+\.[0-9]+d?m?$) + +# files change size all the time, we don't need to VERIFY it +# however, the INFO is useful, so we don't disable the check entirely +filesize: + # artificially large number, TODO a better way + size_threshold: 100000 + + +# completely disabled inspections: +inspections: + # we know about our patches, no need to report anything + patches: off commit 5658a2e3cc6492f1ba6cd4b0faf3e6a17062b012 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:05:29 2022 +0100 Introduce an rpmlintrc config file Copied from python3.10, "python" replaced with "pypy" and various rules removed. Added the unexpanded macro in: Requires: emacs-filesystem filter. This is not a complete filter, but allows me to see the extra errors/warnings. diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc new file mode 100644 index 0000000..2aa2ce3 --- /dev/null +++ b/pypy3.9.rpmlintrc @@ -0,0 +1,70 @@ +# KNOWN BUGS: +#
https://bugzilla.redhat.com/show_bug.cgi?id=1489816
+addFilter(r'crypto-policy-non-compliance-openssl') + + +# TESTS: +addFilter(r'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/pypy3\.\d+/test') + + +# OTHER DELIBERATES: +# chroot function +addFilter(r'missing-call-to-chdir-with-chroot') + +# intentionally hardcoded +addFilter(r'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|pypy%{pyversion})') + +# we have non binary stuff, python files +addFilter(r'only-non-binary-in-usr-lib') + +# some devel files that are deliberately needed +addFilter(r'devel-file-in-non-devel-package /usr/include/pypy3\.\d+m?/pyconfig-(32|64)\.h') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/distutils/tests/xxmodule\.c') + +# SORRY, NOT SORRY: +# manual pages +addFilter(r'no-manual-page-for-binary pypy(3(\.\d+)?)?') + +# missing documentation from subpackages +addFilter(r'^pypy3(\.\d+)?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') + +# we have extra tokens at the end of %endif/%else directives, we consider them useful +addFilter(r'extra tokens at the end of %(endif|else) directive') + + +# RPMLINT IMPERFECTIONS +#
https://github.com/rpm-software-management/rpmlint/issues/123
+addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3393') +#
https://github.com/rpm-software-management/rpmlint/pull/133
+addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3394') + +#
https://bugzilla.redhat.com/show_bug.cgi?id=1550562
+#
https://github.com/rpm-software-management/rpmlint/issues/128
+addFilter(r'python-bytecode-inconsistent-mtime .* 1970') + +# debugsource +addFilter(r'^pypy3(\.\d+)?-debugsource\.[^:]+: (E|W): no-documentation') + +# debuginfo +addFilter(r'^pypy3(\.\d+)?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)') + +# we just don't have the macro installed when rpmlint runs, but the package is BuildRequired +addFilter(r'Possible unexpanded macro in:\s+Requires:\s+emacs-filesystem') + +# this is OK for F28+ +addFilter(r'library-without-ldconfig-post') + +# debug package contains devel and non-devel files +addFilter(r'pypy3(\.\d+)?-debug\.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package') + +# Python modules don't need to be linked against libc +# Since 3.8 they are no longer linked against libpypy-c +addFilter(r'(E|W): library-not-linked-against-libc /usr/lib(64)?/pypy3\.\d+/') +addFilter(r'(E|W): shared-lib-without-dependency-information /usr/lib(64)?/pypy3\.\d+/') + +# specfile-errors are listed twice, once with reason and once without +# we filter out the empty ones +addFilter(r'\bpypy3(\.\d+)?\.(src|spec): (E|W): specfile-error\s+$') + +# SPELLING ERRORS +addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ') commit b2b5021b67266f6162dda93b10401187441728aa Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:02:54 2022 +0100 Create a test subpackage, similar to python3-test diff --git a/pypy3.9.spec b/pypy3.9.spec index 61b9197..76cf42f 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -249,6 +249,20 @@ Provides: bundled(python3dist(hpy)) = 0.0.3 Libraries required by the various PyPy implementations of Python %{pyversion}. +%package test +Summary: Tests for PyPy%{pyversion} +Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} + +%if %{with main_pypy3} +Provides: pypy3-test = %{version}-%{release} +Provides: pypy3-test%{?_isa} = %{version}-%{release} +%endif + +%description test +Various testing modules of PyPy%{pyversion}. +Useful when you want to run the test suite of PyPy%{pyversion}. + + %package devel Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} @@ -737,6 +751,33 @@ CheckPyPy pypy%{pyversion}-c %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif +# Keep this synced with %%files test below +%exclude %{pypylibdir}/_ctypes_test.* +%exclude %{pypylibdir}/_pypy_testcapi.* +%exclude %{pypylibdir}/_test* +%exclude %{pypylibdir}/__pycache__/_ctypes_test.* +%exclude %{pypylibdir}/__pycache__/_pypy_testcapi.* +%exclude %{pypylibdir}/__pycache__/_test* +%exclude %{pypylibdir}/test/ +%exclude %{pypylibdir}/*/testing/ +%exclude %{pypylibdir}/*/test/ +%exclude %{pypylibdir}/*/tests/ +%exclude %{pypylibdir}/idlelib/idle_test/ + + +%files test +%{pypylibdir}/_ctypes_test.* +%{pypylibdir}/_pypy_testcapi.* +%{pypylibdir}/_test* +%{pypylibdir}/__pycache__/_ctypes_test.* +%{pypylibdir}/__pycache__/_pypy_testcapi.* +%{pypylibdir}/__pycache__/_test* +%{pypylibdir}/test/ +%{pypylibdir}/*/testing/ +%{pypylibdir}/*/test/ +%{pypylibdir}/*/tests/ +%{pypylibdir}/idlelib/idle_test/ + %files devel %dir %{_includedir}/pypy%{pyversion} @@ -752,6 +793,7 @@ CheckPyPy pypy%{pyversion}-c - Update to 7.3.8rc1 - Move to a CPython-like installation layout - Stop requiring pypy3.9 from pypy3.9-libs +- Split tests into pypy3.9-test * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit 9779ff55f44132f304aa85598f79c1090021e1ba Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 17:54:33 2022 +0100 Move main %files to the top diff --git a/pypy3.9.spec b/pypy3.9.spec index db83a56..61b9197 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -713,6 +713,12 @@ CheckPyPy pypy%{pyversion}-c # is just confusing for the user. %global _docdir_fmt %{name} +%files +%doc README.rst +%{?with_main_pypy3:%{_bindir}/pypy3} +%{_bindir}/pypy%{pyversion} + + %files libs %doc README.rst %license %{pypylibdir}/LICENSE @@ -732,12 +738,6 @@ CheckPyPy pypy%{pyversion}-c %endif -%files -%doc README.rst -%{?with_main_pypy3:%{_bindir}/pypy3} -%{_bindir}/pypy%{pyversion} - - %files devel %dir %{_includedir}/pypy%{pyversion} %{_includedir}/pypy%{pyversion}/*.h commit c6e52d457c672e6244aa8f0d5b9bf5f6ff4b7e72 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 17:52:43 2022 +0100 Define %{pypylibdir} for easier %files diff --git a/pypy3.9.spec b/pypy3.9.spec index 8b41f86..db83a56 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -429,6 +429,8 @@ BuildPyPy \ %install +%global pypylibdir %{_libdir}/pypy%{pyversion} + # First, run packaging script, it will prep the installation tree in builddir %global installation_archive_name pypy%{pyversion}-%{version_} %global packaging_builddir builddir @@ -463,7 +465,7 @@ mv %{packaged_prefix}/include %{buildroot}%{_includedir} mv %{packaged_prefix}/%{_lib} %{buildroot}%{_libdir} # Create directories we want to own -install -d -m 0755 %{buildroot}%{_libdir}/pypy%{pyversion}/site-packages/__pycache__ +install -d -m 0755 %{buildroot}%{pypylibdir}/site-packages/__pycache__ %if "%{_lib}" == "lib64" # The 64-bit version needs to create "site-packages" in /usr/lib/ (for # pure-Python modules) as well as in /usr/lib64/ (for packages with extension @@ -713,12 +715,12 @@ CheckPyPy pypy%{pyversion}-c %files libs %doc README.rst -%license %{_libdir}/pypy%{pyversion}/LICENSE -%license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{_libdir}/pypy%{pyversion}/cffi.dist-info/LICENSE -%license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE -%{_libdir}/pypy%{pyversion}/ +%license %{pypylibdir}/LICENSE +%license %{pypylibdir}/_cffi_ssl/LICENSE +%license %{pypylibdir}/cffi.dist-info/LICENSE +%license %{pypylibdir}/cffi/_pycparser/ply/LICENSE +%license %{pypylibdir}/hpy.dist-info/LICENSE +%{pypylibdir}/ %if "%{_lib}" == "lib64" %{_prefix}/lib/pypy%{pyversion}/ %endif commit 70c239aa7011b7fc5973bd54c8010321515efdaa Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:04:46 2022 +0100 Remove the non-shadow_stack option, it has not been used in years If desired, it can be salvaged from git history. diff --git a/pypy3.9.spec b/pypy3.9.spec index d2eb615..8b41f86 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -53,10 +53,6 @@ URL:
http://pypy.org/
# Should we build the emacs JIT-viewing mode? %bcond_without emacs -# Forcibly use the shadow-stack option for detecting GC roots, rather than -# relying on hacking up generated assembler with regexps: -%bcond_without shadow_stack - # Easy way to turn off the selftests: %bcond_without selftests @@ -378,35 +374,8 @@ BuildPyPy() { # How will we track garbage-collection roots in the generated code? #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
-%if %{with shadow_stack} - # This is the most portable option, and avoids a reliance on non-guaranteed - # behaviors within GCC's code generator: use an explicitly-maintained stack - # of root pointers: - %global gcrootfinder_options --gcrootfinder=shadowstack - export CFLAGS=$(echo "$RPM_OPT_FLAGS") -%else - # Go with the default, which is "asmgcc" - - %global gcrootfinder_options %{nil} - - #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
- # The generated Makefile compiles the .c files into assembler (.s), rather - # than direct to .o It then post-processes this assembler to locate - # garbage-collection roots (building .lbl.s and .gcmap files, and a - # "gcmaptable.s"). (The modified .lbl.s files have extra code injected - # within them). - # Unfortunately, the code to do this: - # pypy-1.4/pypy/translator/c/gcc/trackgcroot.py - # doesn't interract well with the results of using our standard build flags. - # For now, filter our CFLAGS of everything that could be conflicting with - # pypy. Need to check these and reenable ones that are okay later. - # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') - -%endif - # The generated C code leads to many thousands of warnings of the form: # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] # Suppress them: @@ -429,7 +398,7 @@ BuildPyPy() { PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ $INTERP ../../rpython/bin/rpython \ - %{gcrootfinder_options} \ + --gcrootfinder=shadowstack \ $Options \ targetpypystandalone \ --platlibdir=%{_lib} commit 8950772c1a115a687a27d3a7c79db5d6043d0f0a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:03:38 2022 +0100 Rename use_self_when_building to pypy2_build, make it a bcond diff --git a/pypy3.9.spec b/pypy3.9.spec index 7f78c2a..d2eb615 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -105,22 +105,20 @@ Source189: 189-use-rpm-wheels.patch # Build-time requirements: -# pypy's can be rebuilt using itself, rather than with CPython; doing so +# pypy's can be rebuilt using pypy2, rather than with CPython 2; doing so # halves the build time. # -# Turn it off with this boolean, to revert back to rebuilding using CPython +# Turn it off with this bcond, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 1 -%if 0%{use_self_when_building} -# pypy3 can only be build with pypy2 +%bcond_without pypy2_build +%if %{with pypy2_build} BuildRequires: pypy2 %global bootstrap_python_interp pypy2 %else -# pypy3 can only be build with python2 # exception to use Python 2:
https://pagure.io/fesco/issue/2130
-BuildRequires: python27 +BuildRequires: python2.7 %global bootstrap_python_interp python2 %endif @@ -310,7 +308,7 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif -%if ! 0%{use_self_when_building} +%if %{without pypy2_build} # use the pycparser from PyPy even on CPython ln -s lib_pypy/cffi/_pycparser pycparser %endif commit 7ab528fd756f1ff5b61148d872b7352b04a0d374 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:00:46 2022 +0100 Convert bool globals to bconds diff --git a/pypy3.9.spec b/pypy3.9.spec index 7b958cb..7f78c2a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -45,20 +45,20 @@ URL:
http://pypy.org/
# it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. %ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 -%global with_jit 1 +%bcond_without jit %else -%global with_jit 0 +%bcond_with jit %endif # Should we build the emacs JIT-viewing mode? -%global with_emacs 1 +%bcond_without emacs # Forcibly use the shadow-stack option for detecting GC roots, rather than # relying on hacking up generated assembler with regexps: -%global shadow_stack 1 +%bcond_without shadow_stack # Easy way to turn off the selftests: -%global run_selftests 1 +%bcond_without selftests # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -151,7 +151,7 @@ BuildRequires: valgrind-devel BuildRequires: time BuildRequires: /usr/bin/free -%if %{run_selftests} +%if %{with selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -163,7 +163,7 @@ BuildRequires: /usr/bin/execstack BuildRequires: /usr/bin/patchelf # For byte-compiling the JIT-viewing mode: -%if %{with_emacs} +%if %{with emacs} BuildRequires: emacs %endif @@ -199,7 +199,7 @@ PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations of the standard types (strings, dictionaries, etc.). -%if 0%{with_jit} +%if %{with jit} This build of PyPy has JIT-compilation enabled. %else This build of PyPy has JIT-compilation disabled, as it is not supported on this @@ -212,7 +212,7 @@ Summary: Run-time libraries used by PyPy implementations of Python %{pyversion} # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) -%if %{with_emacs} +%if %{with emacs} Requires: emacs-filesystem >= %{_emacs_version} %endif @@ -380,7 +380,7 @@ BuildPyPy() { # How will we track garbage-collection roots in the generated code? #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
-%if 0%{shadow_stack} +%if %{with shadow_stack} # This is the most portable option, and avoids a reliance on non-guaranteed # behaviors within GCC's code generator: use an explicitly-maintained stack # of root pointers: @@ -449,14 +449,14 @@ BuildPyPy() { BuildPyPy \ pypy3 \ -%if 0%{with_jit} +%if %{with jit} "-Ojit" \ %else "-O2" \ %endif %{nil} -%if %{with_emacs} +%if %{with emacs} %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif @@ -595,7 +595,7 @@ find \ # are acceptable. # Install the JIT trace mode for Emacs: -%if %{with_emacs} +%if %{with emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc @@ -735,9 +735,9 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -%if %{run_selftests} +%if %{with selftests} CheckPyPy pypy%{pyversion}-c -%endif # run_selftests +%endif # with selftests # Because there's a bunch of binary subpackages and creating # /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that @@ -757,7 +757,7 @@ CheckPyPy pypy%{pyversion}-c %endif %{_libdir}/libpypy%{pyversion}-c.so.%{soname_version} -%if %{with_emacs} +%if %{with emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif commit d9b44f86786bdc6cb3d8f6837c34bce06facebb2 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:57:36 2022 +0100 Remove some unneeded globals diff --git a/pypy3.9.spec b/pypy3.9.spec index 4c1c2d1..7b958cb 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -53,9 +53,6 @@ URL:
http://pypy.org/
# Should we build the emacs JIT-viewing mode? %global with_emacs 1 -# Easy way to enable/disable verbose logging: -%global verbose_logs 0 - # Forcibly use the shadow-stack option for detecting GC roots, rather than # relying on hacking up generated assembler with regexps: %global shadow_stack 1 @@ -63,8 +60,6 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pylibver 3 - # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -303,7 +298,7 @@ for f in rpython/translator/goal/bpnn.py ; do done # Replace all lib-python and lib_pypy python shebangs with pypy3 (those will be shipped with pypy3-libs) -find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ +find lib-python/3 lib_pypy -name "*.py" -exec \ sed -r -i '1s@^#!\s*/usr/bin.*(python|pypy).*@#!/usr/bin/%{name}@' \ "{}" \ \; commit 07d1426dd44178550c3e884d3cdf8ae8beb2ae49 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:54:42 2022 +0100 Stop requiring pypy3.9 from pypy3.9-libs diff --git a/pypy3.9.spec b/pypy3.9.spec index 938fe5a..4c1c2d1 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -192,6 +192,13 @@ Obsoletes: pypy3 < 7.3.4-4 Conflicts: pypy3 < 7.3.7-1 %endif +# This prevents ALL subpackages built from this spec to require +# /usr/bin/pypy*. Granularity per subpackage is impossible. +# It's intended for the libs package not to drag in the interpreter, see +#
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1862082
+%global __requires_exclude ^/usr/bin/pypy + %description PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations @@ -780,6 +787,7 @@ CheckPyPy pypy%{pyversion}-c * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 - Move to a CPython-like installation layout +- Stop requiring pypy3.9 from pypy3.9-libs * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit 5bfc7634fca83257ad20c151d9a0dfe8fdd207f7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:29:50 2022 +0100 Remove RHEL 6 conditional diff --git a/pypy3.9.spec b/pypy3.9.spec index 0fb47da..938fe5a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -51,11 +51,7 @@ URL:
http://pypy.org/
%endif # Should we build the emacs JIT-viewing mode? -%if 0%{?rhel} == 6 -%global with_emacs 0 -%else %global with_emacs 1 -%endif # Easy way to enable/disable verbose logging: %global verbose_logs 0 commit fea8a43609c92af70832bfa2e0d02509bf4f173a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:28:24 2022 +0100 Remove tl;dr comments and commented out code diff --git a/pypy3.9.spec b/pypy3.9.spec index 5c7a095..0fb47da 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -38,70 +38,12 @@ URL:
http://pypy.org/
# Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels -# PyPy consists of an implementation of an interpreter (with JIT compilation) -# for the full Python language written in a high-level language, leaving many -# of the implementation details as "pluggable" policies. -# -# The implementation language is then compiled down to .c code, from which we -# obtain a binary. -# -# This allows us to build a near-arbitrary collection of different -# implementations of Python with differing tradeoffs -# -# (As it happens, the implementation language is itself Python, albeit a -# restricted subset "RPython", chosen to making it amenable to being compiled. -# The result implements the full Python language though) - -# We could build many different implementations of Python. -# For now, let's focus on the implementation that appears to be receiving the -# most attention upstream: the JIT-enabled build, with all standard -# optimizations - -# Building a configuration can take significant time: - -# A build of pypy (with jit) on i686 took 77 mins: -# [Timer] Timings: -# [Timer] annotate --- 583.3 s -# [Timer] rtype_lltype --- 760.9 s -# [Timer] pyjitpl_lltype --- 567.3 s -# [Timer] backendopt_lltype --- 375.6 s -# [Timer] stackcheckinsertion_lltype --- 54.1 s -# [Timer] database_c --- 852.2 s -# [Timer] source_c --- 1007.3 s -# [Timer] compile_c --- 419.9 s -# [Timer] =========================================== -# [Timer] Total: --- 4620.5 s -# -# A build of pypy (nojit) on x86_64 took about an hour: -# [Timer] Timings: -# [Timer] annotate --- 537.5 s -# [Timer] rtype_lltype --- 667.3 s -# [Timer] backendopt_lltype --- 385.4 s -# [Timer] stackcheckinsertion_lltype --- 42.5 s -# [Timer] database_c --- 625.3 s -# [Timer] source_c --- 1040.2 s -# [Timer] compile_c --- 273.9 s -# [Timer] =========================================== -# [Timer] Total: --- 3572.0 s - - # We will build a "pypy" binary. # # Unfortunately, the JIT support is only available on some architectures. -# -# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the -# following options: -# 'i386', 'x86' -# 'x86-without-sse2': -# 'x86_64' -# 'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI) -# 'cli' -# 'llvm' -# # We will only build with JIT support on those architectures, and build without # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. - %ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 %global with_jit 1 %else @@ -592,51 +534,6 @@ find \ # approach is to postprocess the ELF file: execstack --clear-execstack %{buildroot}%{_bindir}/pypy%{pyversion} -# pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly -# different bytecode format to CPython. It doesn't use .pyo files: the -O flag -# is treated as a "dummy optimization flag for compatibility with C Python" -# -# pypy-1.4/pypy/module/imp/importing.py has this comment: - # XXX picking a magic number is a mess. So far it works because we - # have only two extra opcodes, which bump the magic number by +1 and - # +2 respectively, and CPython leaves a gap of 10 when it increases - # its own magic number. To avoid assigning exactly the same numbers - # as CPython we always add a +2. We'll have to think again when we - # get at the fourth new opcode :-( - # - # * CALL_LIKELY_BUILTIN +1 - # * CALL_METHOD +2 - # - # In other words: - # - # default_magic -- used by CPython without the -U option - # default_magic + 1 -- used by CPython with the -U option - # default_magic + 2 -- used by PyPy without any extra opcode - # ... - # default_magic + 5 -- used by PyPy with both extra opcodes -# - -# pypy-1.4/pypy/interpreter/pycode.py has: -# -# default_magic = (62141+2) | 0x0a0d0000 # this PyPy's magic -# # (62131=CPython 2.5.1) -# giving a value for "default_magic" for PyPy of 0xa0df2bf. -# Note that this corresponds to the "default_magic + 2" from the comment above - -# In my builds: -# $ ./pypy --info | grep objspace.opcodes -# objspace.opcodes.CALL_LIKELY_BUILTIN: False -# objspace.opcodes.CALL_METHOD: True -# so I'd expect the magic number to be: -# 0x0a0df2bf + 2 (the flag for CALL_METHOD) -# giving -# 0x0a0df2c1 -# -# I'm seeing -# c1 f2 0d 0a -# as the first four bytes of the .pyc files, which is consistent with this. - - # Bytecompile all of the .py files we ship, using our pypy binary, giving us # .pyc files for pypy. # @@ -840,11 +737,6 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600 -#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python -#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test -#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log - %if %{run_selftests} CheckPyPy pypy%{pyversion}-c %endif # run_selftests commit ddfaf6f8242ba77ceccf44428008f34e07a6019f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:21:52 2022 +0100 Declare bundled cffi diff --git a/pypy3.9.spec b/pypy3.9.spec index 5829c32..5c7a095 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -11,6 +11,7 @@ Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT # Python standard library is Python # pypy/module/unicodedata is UCD +# Bundled cffi is is MIT # Bundled pycparser is is BSD # Bundled pycparser.ply is BSD # Bundled bits from cryptography are ASL 2.0 or BSD @@ -295,6 +296,9 @@ Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} } +# Find the version in lib_pypy/cffi.dist-info/METADATA +Provides: bundled(python3dist(cffi)) = 1.15.0 + # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.21 @@ -854,6 +858,7 @@ CheckPyPy pypy%{pyversion}-c %doc README.rst %license %{_libdir}/pypy%{pyversion}/LICENSE %license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{_libdir}/pypy%{pyversion}/cffi.dist-info/LICENSE %license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE %license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE %{_libdir}/pypy%{pyversion}/ commit 446ee50e4ed1722fa87e3d7ce920f0bfe2e1552c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 8 21:02:33 2022 +0100 Move to a CPython-like installation layout diff --git a/pypy3.9.spec b/pypy3.9.spec index 6336e3d..5829c32 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -124,7 +124,6 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy%{pyversion} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -227,6 +226,7 @@ BuildRequires: perl-interpreter %endif BuildRequires: /usr/bin/execstack +BuildRequires: /usr/bin/patchelf # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -518,12 +518,47 @@ BuildPyPy \ %install -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{pypyprefix} - - -# Run installing script, archive-name pypy%{pyversion} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name pypy%{pyversion} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies +# First, run packaging script, it will prep the installation tree in builddir +%global installation_archive_name pypy%{pyversion}-%{version_} +%global packaging_builddir builddir +%global packaged_prefix %{packaging_builddir}/%{installation_archive_name} +%global soname_version 0.1 + +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name '%{installation_archive_name}' --builddir '%{packaging_builddir}' --no-embedded-dependencies + +# Mangle some paths to match CPython, +# see
https://mail.python.org/pipermail/pypy-dev/2022-January/016310.html
and the replies there +# 1. remove the "python" executables, we still want CPython as the python command +rm %{packaged_prefix}/bin/python* +# 2. remove the "pypy" symbolic link, we still want pypy2 to be that for now +rm %{packaged_prefix}/bin/pypy +# 3. remove the "pypy3"symbolic link, if this is not the main pypy3 +%{!?with_main_pypy3:rm %{packaged_prefix}/bin/pypy3} +# 4. move libpypy3.9-c.so to lib(64) and soname version it +#
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
+mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} +ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} +# 5. remove stray README +rm %{packaged_prefix}/include/README +# 6. copy the main LICENSE file to pypy's libdir, as does CPython +cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} + +# Create the prefix and move stuff into it +mkdir -p %{buildroot}%{_prefix} +mv %{packaged_prefix}/bin %{buildroot}%{_bindir} +mv %{packaged_prefix}/include %{buildroot}%{_includedir} +mv %{packaged_prefix}/%{_lib} %{buildroot}%{_libdir} + +# Create directories we want to own +install -d -m 0755 %{buildroot}%{_libdir}/pypy%{pyversion}/site-packages/__pycache__ +%if "%{_lib}" == "lib64" +# The 64-bit version needs to create "site-packages" in /usr/lib/ (for +# pure-Python modules) as well as in /usr/lib64/ (for packages with extension +# modules). +install -d -m 0755 %{buildroot}%{_prefix}/lib/pypy%{pyversion}/site-packages/__pycache__ +%endif # Remove shebang lines from .py files that aren't executable, and @@ -542,8 +577,6 @@ find \ \) \ \) -mkdir -p %{buildroot}/%{pypyprefix}/site-packages - # The generated machine code doesn't need an executable stack, but # one of the assembler files (gcmaptable.s) doesn't have the necessary # metadata to inform gcc of that, and thus gcc pessimistically assumes @@ -553,12 +586,7 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: -execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 - -ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} -%if %{with main_pypy3} -ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 -%endif +execstack --clear-execstack %{buildroot}%{_bindir}/pypy%{pyversion} # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -610,31 +638,18 @@ ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # # Note that some of the test files deliberately contain syntax errors, so # we are running it in subshell, to be able to ignore the failures and not to terminate the build. -(%{py_byte_compile %{buildroot}%{pypyprefix}/bin/pypy3 %{buildroot}%{pypyprefix}}) || : - +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +(%{py_byte_compile %{buildroot}%{_bindir}/pypy%{pyversion} %{buildroot}}) || : -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _sqlite3' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _curses' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import curses' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import syslog' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'from _sqlite3 import *' - -# Header files for C extension modules. -# Upstream's packaging process (pypy/tool/release/package.py) -# creates an "include" subdir and copies all *.h/*.inl from "include" there -# (it also has an apparently out-of-date comment about copying them from -# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't -# seem to do this as of 2011-01-13) - -# FIXME: arguably these should be instead put into a subdir below /usr/include, -# it's not yet clear to me how upstream plan to deal with the C extension -# interface going forward, so let's just mimic upstream for now. -%global pypy_include_dir %{pypyprefix}/include -mkdir -p %{buildroot}%{pypy_include_dir} -rm -f %{buildroot}%{pypy_include_dir}/README +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _tkinter' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import tkinter' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _sqlite3' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _curses' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import curses' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import syslog' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'from _sqlite3 import *' +unset LD_LIBRARY_PATH # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) @@ -692,17 +707,12 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} %endif -# Remove files we don't want: -rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ - %{buildroot}%{pypyprefix}/README.rst - # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : # since 5.10.0, the debug binaries are built and shipped, making the # pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{pypyprefix}/bin/pypy%{pyversion}.debug -rm -f %{buildroot}%{pypyprefix}/bin/libpypy%{pyversion}-c.so.debug +rm -f %{buildroot}%{_bindir}/*.debug %check @@ -842,31 +852,32 @@ CheckPyPy pypy%{pyversion}-c %files libs %doc README.rst +%license %{_libdir}/pypy%{pyversion}/LICENSE +%license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE +%{_libdir}/pypy%{pyversion}/ +%if "%{_lib}" == "lib64" +%{_prefix}/lib/pypy%{pyversion}/ +%endif +%{_libdir}/libpypy%{pyversion}-c.so.%{soname_version} -%dir %{pypyprefix} -%license %{pypyprefix}/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/hpy.dist-info/LICENSE -%{pypyprefix}/%{_lib}/pypy%{pyversion}/ -%{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif + %files %doc README.rst -%if %{with main_pypy3} -%{_bindir}/pypy3 -%endif +%{?with_main_pypy3:%{_bindir}/pypy3} %{_bindir}/pypy%{pyversion} -%{pypyprefix}/bin/ + %files devel -%dir %{pypy_include_dir} -%dir %{pypy_include_dir}/pypy%{pyversion} -%{pypy_include_dir}/pypy%{pyversion}/*.h +%dir %{_includedir}/pypy%{pyversion} +%{_includedir}/pypy%{pyversion}/*.h +%{_libdir}/libpypy%{pyversion}-c.so %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif @@ -875,6 +886,7 @@ CheckPyPy pypy%{pyversion}-c %changelog * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 +- Move to a CPython-like installation layout * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit bc25649d52fadaa744d301804d8cd1b488dafe48 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 16:09:54 2022 +0100 Set platlibdir diff --git a/pypy3.9.spec b/pypy3.9.spec index 29bad37..6336e3d 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -489,7 +489,8 @@ BuildPyPy() { $INTERP ../../rpython/bin/rpython \ %{gcrootfinder_options} \ $Options \ - targetpypystandalone + targetpypystandalone \ + --platlibdir=%{_lib} echo "--------------------------------------------------------------" echo "--------------------------------------------------------------" @@ -844,10 +845,10 @@ CheckPyPy pypy%{pyversion}-c %dir %{pypyprefix} %license %{pypyprefix}/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/hpy.dist-info/LICENSE -%{pypyprefix}/lib/pypy%{pyversion}/ +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/hpy.dist-info/LICENSE +%{pypyprefix}/%{_lib}/pypy%{pyversion}/ %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el commit 3588ca0647df14cc8830ce4cff4dcb76a72c9ebc Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 16:09:13 2022 +0100 Build with the default OpenSSL version (i.e. 3 on Fedora 36+) diff --git a/pypy3.9.spec b/pypy3.9.spec index 5341906..29bad37 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -204,7 +204,7 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl1.1-devel +BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel commit 9886df00eb114957891c7b2368eadd464e48e2e8 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 19:56:59 2022 +0100 Not main pypy yet diff --git a/pypy3.9.spec b/pypy3.9.spec index 7db20aa..5341906 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -130,11 +130,7 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal -%if 0%{?fedora} >= 36 -%bcond_without main_pypy3 -%else %bcond_with main_pypy3 -%endif %ifarch %{ix86} x86_64 %{arm} %global _package_note_linker gold commit 32ffa63874f3b1c0b00b7d6b8cf96065afba4df5 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 00:30:08 2022 +0100 PyPy 3.9 diff --git a/.gitignore b/.gitignore index 9a71710..3f09cde 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /pypy3.7-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.8rc1-src.tar.bz2 +/pypy3.9-v7.3.8rc1-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 5b61035..4ad6f24 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -2,23 +2,26 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init_ index 597a1ef9ee..3bfab52083 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,6 +1,7 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path --import pkgutil import sys - import runpy - import tempfile -@@ -9,9 +10,24 @@ import subprocess +@@ -6,13 +8,29 @@ import tempfile + import subprocess + from importlib import resources - __all__ = ["version", "bootstrap"] +-from . import _bundled +- --_SETUPTOOLS_VERSION = "56.0.0" -+_WHEEL_DIR = "/usr/share/python-wheels/" --_PIP_VERSION = "21.1.1" + __all__ = ["version", "bootstrap"] +-_SETUPTOOLS_VERSION = "58.1.0" +-_PIP_VERSION = "21.2.4" ++ ++_WHEEL_DIR = "/usr/share/python-wheels/" ++ +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,17 +38,18 @@ index 597a1ef9ee..3bfab52083 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - ++ _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), -@@ -101,13 +117,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + ("pip", _PIP_VERSION, "py3"), +@@ -101,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version, py_tag in _PROJECTS: - wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) -- whl = pkgutil.get_data( -- "ensurepip", -- "_bundled/{}".format(wheel_name), +- whl = resources.read_binary( +- _bundled, +- wheel_name, - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) diff --git a/pypy3.8.spec b/pypy3.9.spec similarity index 99% rename from pypy3.8.spec rename to pypy3.9.spec index ac339fc..7db20aa 100644 --- a/pypy3.8.spec +++ b/pypy3.9.spec @@ -1,7 +1,7 @@ %global basever 7.3 %global micro 8 %global pre rc1 -%global pyversion 3.8 +%global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} %global version_ %{basever}.%{micro}%{?pre} @@ -289,8 +289,8 @@ Obsoletes: pypy3-libs < 7.3.4-4 Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 21.1.1 -Provides: bundled(python3dist(setuptools)) = 56.0.0 +Provides: bundled(python3dist(pip)) = 21.2.4 +Provides: bundled(python3dist(setuptools)) = 58.1.0 %endif # Provides for the bundled libmpdec @@ -340,7 +340,6 @@ Header files for building C extension modules against PyPy%{pyversion}. %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl -rmdir lib-python/3/ensurepip/_bundled %endif @@ -705,8 +704,8 @@ mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : # since 5.10.0, the debug binaries are built and shipped, making the # pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{pypyprefix}/bin/pypy3.debug -rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug +rm -f %{buildroot}%{pypyprefix}/bin/pypy%{pyversion}.debug +rm -f %{buildroot}%{pypyprefix}/bin/libpypy%{pyversion}-c.so.debug %check @@ -714,7 +713,7 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %{?libmpdec_version: # Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual # provides for in the SPEC. -test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ +test "$(%{goal_dir}/pypy%{pyversion}-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ "%{libmpdec_version}" } @@ -836,7 +835,7 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy3-c +CheckPyPy pypy%{pyversion}-c %endif # run_selftests # Because there's a bunch of binary subpackages and creating @@ -869,7 +868,6 @@ CheckPyPy pypy3-c %files devel %dir %{pypy_include_dir} -%{pypy_include_dir}/*.h %dir %{pypy_include_dir}/pypy%{pyversion} %{pypy_include_dir}/pypy%{pyversion}/*.h %if %{with main_pypy3} diff --git a/sources b/sources index e9e0e29..2cd33d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.8-v7.3.8rc1-src.tar.bz2) = 69eca2ef7c44e15e4b09f36450a985770b3867e41fcd15101881b04fce817f9c8eba3cb783b42fe6509d38e8a4ecfa94573d97cfb902c7c1de9acc2a4d2d760c +SHA512 (pypy3.9-v7.3.8rc1-src.tar.bz2) = d1b1942fbacc7f8d642c85ceb4c4c9796e73bd5836615e2db81f4ddabf9e4f94c230f2d946ea9c49b642d41304aeed3906df1931a52ec40c56d14f1028139978 diff --git a/tests/tests.yml b/tests/tests.yml index a8dc641..6ac1743 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3.8 VERSION=3.8 ./venv.sh + run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh required_packages: - gcc - python3-tox - - pypy3.8-devel + - pypy3.9-devel commit f2558e7a2649b7eefe5091fafb137031c83ef7f6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 15:52:41 2022 +0100 Time and free is always needed diff --git a/pypy3.8.spec b/pypy3.8.spec index d065377..ac339fc 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -218,14 +218,14 @@ BuildRequires: python-rpm-macros BuildRequires: valgrind-devel %endif +# For recording stats: +BuildRequires: time +BuildRequires: /usr/bin/free + %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel -# For use in the selftests, for recording stats: -BuildRequires: time -BuildRequires: /usr/bin/free - # For use in the selftests, for imposing a per-test timeout: BuildRequires: perl-interpreter %endif commit 82b51bb82d8691fe2e9116ed84579e039759fb44 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 00:24:13 2022 +0100 Update to 7.3.8rc1 diff --git a/.gitignore b/.gitignore index 19134eb..9a71710 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /pypy3.7-v7.3.6-src.tar.bz2 /pypy3.7-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.7-src.tar.bz2 +/pypy3.8-v7.3.8rc1-src.tar.bz2 diff --git a/pypy3.8.spec b/pypy3.8.spec index c7496f2..d065377 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -1,8 +1,11 @@ %global basever 7.3 +%global micro 8 +%global pre rc1 %global pyversion 3.8 Name: pypy%{pyversion} -Version: %{basever}.7 -Release: 3%{?dist} +Version: %{basever}.%{micro}%{?pre:~%{pre}} +%global version_ %{basever}.%{micro}%{?pre} +Release: 1%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -138,7 +141,7 @@ URL:
http://pypy.org/
%endif # Source and patches: -Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
+Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version_}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -297,7 +300,7 @@ Provides: bundled(libmpdec) = %{libmpdec_version} } # Find the version in lib_pypy/cffi/_pycparser/__init__.py -Provides: bundled(python3dist(pycparser)) = 2.20 +Provides: bundled(python3dist(pycparser)) = 2.21 # Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py Provides: bundled(python3dist(ply)) = 3.9 @@ -329,7 +332,7 @@ Header files for building C extension modules against PyPy%{pyversion}. %prep -%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +%autosetup -n pypy%{pyversion}-v%{version_}-src -p1 -S git # Temporary workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1954999
%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}} @@ -639,7 +642,7 @@ rm -f %{buildroot}%{pypy_include_dir}/README # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) -%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src +%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version_}-src mkdir -p %{buildroot}%{pypy_debuginfo_dir} # copy over everything: @@ -875,6 +878,9 @@ CheckPyPy pypy3-c %changelog +* Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 +- Update to 7.3.8rc1 + * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/sources b/sources index d769b2c..e9e0e29 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.8-v7.3.7-src.tar.bz2) = 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2 +SHA512 (pypy3.8-v7.3.8rc1-src.tar.bz2) = 69eca2ef7c44e15e4b09f36450a985770b3867e41fcd15101881b04fce817f9c8eba3cb783b42fe6509d38e8a4ecfa94573d97cfb902c7c1de9acc2a4d2d760c commit efbf3a36617566de70d28c78eca89e6a16ce7399 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Jan 25 21:13:36 2022 +0000 Tell package notes that gold is used diff --git a/pypy3.8.spec b/pypy3.8.spec index b92f8bb..c7496f2 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -133,6 +133,9 @@ URL:
http://pypy.org/
%bcond_with main_pypy3 %endif +%ifarch %{ix86} x86_64 %{arm} +%global _package_note_linker gold +%endif # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
commit 6ce261182dce610b705de950809665a3a16245ed Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jan 21 09:52:45 2022 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.8.spec b/pypy3.8.spec index bbaba87..b92f8bb 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -2,7 +2,7 @@ %global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -872,6 +872,9 @@ CheckPyPy pypy3-c %changelog +* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+ * Sat Jan 08 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-2 - Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
commit 735b46af379d49ff93f3e12d0580bd3fa5c3664b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Jan 8 20:32:26 2022 +0100 Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
diff --git a/pypy3.8.spec b/pypy3.8.spec index 5a698ab..bbaba87 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -2,7 +2,7 @@ %global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -872,6 +872,9 @@ CheckPyPy pypy3-c %changelog +* Sat Jan 08 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-2 +- Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
+ * Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 - Initial pypy3.8 package - Supplement tox commit 8e9e05932790eec6430420c03b6e344e6a35f457 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 19:42:12 2022 +0100 There are no "old" wheels present now diff --git a/pypy3.8.spec b/pypy3.8.spec index a36ea94..5a698ab 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -335,10 +335,6 @@ Header files for building C extension modules against PyPy%{pyversion}. %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl rmdir lib-python/3/ensurepip/_bundled -%else -# we don't want to ship the old ones anyway -rm lib-python/3/ensurepip/_bundled/pip-20.0* -rm lib-python/3/ensurepip/_bundled/setuptools-44* %endif commit d696dc3174c48be80d800216f1918c41320c6763 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 17:21:30 2022 +0100 Also conflict with previous main pypy3 diff --git a/pypy3.8.spec b/pypy3.8.spec index 469aa6f..a36ea94 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -245,7 +245,10 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} +# This is when pypy3 package was replaced: Obsoletes: pypy3 < 7.3.4-4 +# This is when pypy3 was provided by pypy3.7: +Conflicts: pypy3 < 7.3.7-1 %endif %description commit d56524c195d563134c417f66c129ce734ef6ed16 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Nov 11 11:43:54 2021 +0100 Update to Python 3.8 - sync patch 189 with the python3.8 package - remove ppc64 only patch, since it did not apply and we don't have ppc64 since F29
https://fedoraproject.org/wiki/Changes/DiscontinuePPC64
- supplement tox
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproj…
diff --git a/.gitignore b/.gitignore index b95796f..19134eb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /pypy3.7-v7.3.5-src.tar.bz2 /pypy3.7-v7.3.6-src.tar.bz2 /pypy3.7-v7.3.7-src.tar.bz2 +/pypy3.8-v7.3.7-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch deleted file mode 100644 index c0dd76b..0000000 --- a/011-no-faulthandler.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit ea4d6a12548eea7ce0424feea13a499fb7085e96 -Author: rpm-build <rpm-build> -Date: Wed Mar 29 04:31:55 2017 +0200 - - 011-no-faulthandler.patch - -diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py -index faa1ba7..2edadc9 100644 ---- a/lib-python/3/test/support/__init__.py -+++ b/lib-python/3/test/support/__init__.py -@@ -7,7 +7,6 @@ import collections.abc - import contextlib - import datetime - import errno --import faulthandler - import fnmatch - import functools - import gc -@@ -70,6 +69,11 @@ try: - except ImportError: - resource = None - -+try: -+ import faulthandler -+except ImportError: -+ faulthandler = None -+ - __all__ = [ - # globals - "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", -@@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): - finally: - started = [t for t in started if t.is_alive()] - if started: -- faulthandler.dump_traceback(sys.stdout) -+ if faulthandler is not None: -+ faulthandler.dump_traceback(sys.stdout) - raise AssertionError('Unable to join %d threads' % len(started)) - - @contextlib.contextmanager diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 8fd8a55..5b61035 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,21 +1,24 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 94d40b0..9135b80 100644 +index 597a1ef9ee..3bfab52083 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,3 +1,5 @@ +@@ -1,6 +1,7 @@ +import distutils.version +import glob import os import os.path - import pkgutil -@@ -9,9 +11,24 @@ import tempfile - __all__ = ["version", "bootstrap"] +-import pkgutil + import sys + import runpy + import tempfile +@@ -9,9 +10,24 @@ import subprocess + __all__ = ["version", "bootstrap"] --_SETUPTOOLS_VERSION = "47.1.0" +-_SETUPTOOLS_VERSION = "56.0.0" +_WHEEL_DIR = "/usr/share/python-wheels/" --_PIP_VERSION = "20.1.1" +-_PIP_VERSION = "21.1.1" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,7 +38,7 @@ index 94d40b0..9135b80 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), -@@ -103,13 +120,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -101,13 +117,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version, py_tag in _PROJECTS: @@ -50,6 +53,6 @@ index 94d40b0..9135b80 100644 + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) - + additional_paths.append(os.path.join(tmpdir, wheel_name)) - + diff --git a/pypy3.7.spec b/pypy3.8.spec similarity index 98% rename from pypy3.7.spec rename to pypy3.8.spec index e7b257d..469aa6f 100644 --- a/pypy3.7.spec +++ b/pypy3.8.spec @@ -1,5 +1,5 @@ %global basever 7.3 -%global pyversion 3.7 +%global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 Release: 1%{?dist} @@ -127,7 +127,7 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal -%if 0%{?fedora} >= 35 +%if 0%{?fedora} >= 36 %bcond_without main_pypy3 %else %bcond_with main_pypy3 @@ -163,9 +163,6 @@ Patch7: 007-remove-startup-message.patch #
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
Patch9: 009-add-libxcrypt-support.patch -# It seems ppc64 has no faulthandler -Patch11: 011-no-faulthandler.patch - # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -283,8 +280,8 @@ Obsoletes: pypy3-libs < 7.3.4-4 Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 20.1.1 -Provides: bundled(python3dist(setuptools)) = 47.1.0 +Provides: bundled(python3dist(pip)) = 21.1.1 +Provides: bundled(python3dist(setuptools)) = 56.0.0 %endif # Provides for the bundled libmpdec @@ -319,6 +316,8 @@ Provides: pypy3-devel%{?_isa} = %{version}-%{release} Obsoletes: pypy3-devel < 7.3.4-4 %endif +Supplements: tox + %description devel Header files for building C extension modules against PyPy%{pyversion}. @@ -844,11 +843,11 @@ CheckPyPy pypy3-c %doc README.rst %dir %{pypyprefix} -%dir %{pypyprefix}/lib-python %license %{pypyprefix}/LICENSE -%{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib_pypy/ -%license %{pypyprefix}/lib_pypy/*/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/hpy.dist-info/LICENSE +%{pypyprefix}/lib/pypy%{pyversion}/ %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el @@ -866,6 +865,8 @@ CheckPyPy pypy3-c %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%dir %{pypy_include_dir}/pypy%{pyversion} +%{pypy_include_dir}/pypy%{pyversion}/*.h %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif @@ -873,8 +874,8 @@ CheckPyPy pypy3-c %changelog * Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 -- Update to 7.3.7 -- Fixes: rhbz#2003682 +- Initial pypy3.8 package +- Supplement tox * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 diff --git a/sources b/sources index ce1117b..d769b2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.7-src.tar.bz2) = 99099f17682b606864753b76a6a0cdf860bc2bf79588ee53e7d0586d3f8f6ab6820240666bd3646ade6523dd5adc6999116d4db4285c688984dc33d4fa7743c6 +SHA512 (pypy3.8-v7.3.7-src.tar.bz2) = 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2 diff --git a/tests/tests.yml b/tests/tests.yml index 5242663..a8dc641 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3.7 VERSION=3.7 ./venv.sh + run: PYTHON=pypy3.8 VERSION=3.8 ./venv.sh required_packages: - gcc - python3-tox - - pypy3.7-devel + - pypy3.8-devel commit cde65b8b859a1112ae3413ea5b006086b303c39f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 19:35:25 2022 +0100 Declare bundled hpy diff --git a/pypy3.7.spec b/pypy3.7.spec index 71f97b7..e7b257d 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -11,6 +11,7 @@ Summary: Python %{pyversion} implementation with a Just-In-Time compiler # Bundled pycparser is is BSD # Bundled pycparser.ply is BSD # Bundled bits from cryptography are ASL 2.0 or BSD +# Bundled hpy is MIT # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new @@ -301,6 +302,9 @@ Provides: bundled(python3dist(ply)) = 3.9 # Find the version in lib_pypy/_cffi_ssl/cryptography/__about__.py Provides: bundled(python3dist(cryptography)) = 2.7 +# Find the version in lib_pypy/hpy.dist-info/METADATA +Provides: bundled(python3dist(hpy)) = 0.0.3 + %description libs Libraries required by the various PyPy implementations of Python %{pyversion}. commit 19c06ca1e99eeca40b99a42867a43f3333512bd9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 10 12:14:57 2021 +0100 Include the Python version in the summary and description diff --git a/pypy3.7.spec b/pypy3.7.spec index 956b601..71f97b7 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -3,7 +3,7 @@ Name: pypy%{pyversion} Version: %{basever}.7 Release: 1%{?dist} -Summary: Python 3 implementation with a Just-In-Time compiler +Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT # Python standard library is Python @@ -251,9 +251,9 @@ Obsoletes: pypy3 < 7.3.4-4 %endif %description -PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU -architectures, and various optimized implementations of the standard types -(strings, dictionaries, etc) +PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler +on some CPU architectures, and various optimized implementations +of the standard types (strings, dictionaries, etc.). %if 0%{with_jit} This build of PyPy has JIT-compilation enabled. @@ -264,7 +264,7 @@ CPU architecture. %package libs -Summary: Run-time libraries used by PyPy implementations of Python 3 +Summary: Run-time libraries used by PyPy implementations of Python %{pyversion} # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) @@ -302,11 +302,11 @@ Provides: bundled(python3dist(ply)) = 3.9 Provides: bundled(python3dist(cryptography)) = 2.7 %description libs -Libraries required by the various PyPy implementations of Python 3. +Libraries required by the various PyPy implementations of Python %{pyversion}. %package devel -Summary: Development tools for working with PyPy3 +Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} %if %{with main_pypy3} @@ -316,7 +316,7 @@ Obsoletes: pypy3-devel < 7.3.4-4 %endif %description devel -Header files for building C extension modules against PyPy3 +Header files for building C extension modules against PyPy%{pyversion}. %prep commit 3af63e71e486829ccebd4062d5c740cb72445805 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Nov 11 11:28:41 2021 +0100 Update to 7.3.7 diff --git a/.gitignore b/.gitignore index 5f5c5c9..b95796f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /pypy3.7-v7.3.4-src.tar.bz2 /pypy3.7-v7.3.5-src.tar.bz2 /pypy3.7-v7.3.6-src.tar.bz2 +/pypy3.7-v7.3.7-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 7f6b535..956b601 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,7 +1,7 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.6 +Version: %{basever}.7 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler @@ -868,6 +868,10 @@ CheckPyPy pypy3-c %changelog +* Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 +- Update to 7.3.7 +- Fixes: rhbz#2003682 + * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 - Remove windows executable binaries diff --git a/sources b/sources index 240358d..ce1117b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.6-src.tar.bz2) = 3c484672c9ac278c6b07e5e9ca09b26afca1069241e89650c44325dde7b4484c117d8d78224b64760eb30b054f2c5349ce91685b69c7d86d293427059bb48814 +SHA512 (pypy3.7-v7.3.7-src.tar.bz2) = 99099f17682b606864753b76a6a0cdf860bc2bf79588ee53e7d0586d3f8f6ab6820240666bd3646ade6523dd5adc6999116d4db4285c688984dc33d4fa7743c6 commit 1ea6c65445b33803708d12de1a732a9b21252ce9 Author: Tomáš Hrnčiar <thrnciar(a)redhat.com> Date: Wed Oct 27 08:50:53 2021 +0200 Remove windows executable binaries diff --git a/pypy3.7.spec b/pypy3.7.spec index dc7f624..7f6b535 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -368,6 +368,9 @@ rm lib-python/3/idlelib/idle.bat ln -s lib_pypy/cffi/_pycparser pycparser %endif +# Remove windows executable binaries +rm lib-python/3/distutils/command/*.exe + %build %ifarch s390 s390x # pypy3 requires z10 at least @@ -867,6 +870,7 @@ CheckPyPy pypy3-c %changelog * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 +- Remove windows executable binaries - Fixes: rhbz#2003682 * Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 commit b6c45f14344f3fbfed87b37735317b1961ad0ee3 Author: Tomáš Hrnčiar <thrnciar(a)redhat.com> Date: Wed Oct 27 08:48:25 2021 +0200 Update to 7.3.6 diff --git a/.gitignore b/.gitignore index dc1ee9b..5f5c5c9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /pypy3.6-v7.3.1-src.tar.bz2 /pypy3.7-v7.3.4-src.tar.bz2 /pypy3.7-v7.3.5-src.tar.bz2 +/pypy3.7-v7.3.6-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 460bfcf..dc7f624 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.5 -Release: 2%{?dist} +Version: %{basever}.6 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,10 @@ CheckPyPy pypy3-c %changelog +* Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 +- Update to 7.3.6 +- Fixes: rhbz#2003682 + * Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 - Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 diff --git a/sources b/sources index 9b40959..240358d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.5-src.tar.bz2) = 253d2efc81d55fb392ab810741e3a633f664e1908b2c26db7a8830c971655cca6be1b8d34581d13aa2d738a4a4c8ba23c2c90333b6e03d4608372e8013ea723b +SHA512 (pypy3.7-v7.3.6-src.tar.bz2) = 3c484672c9ac278c6b07e5e9ca09b26afca1069241e89650c44325dde7b4484c117d8d78224b64760eb30b054f2c5349ce91685b69c7d86d293427059bb48814 commit 90c4be783ba4a948b5617a2cd6188cdd23cd1479 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Sep 20 14:42:23 2021 +0200 Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 diff --git a/pypy3.7.spec b/pypy3.7.spec index 38872c8..460bfcf 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -204,7 +204,7 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl-devel +BuildRequires: openssl1.1-devel BuildRequires: gdbm-devel BuildRequires: xz-devel @@ -865,8 +865,8 @@ CheckPyPy pypy3-c %changelog -* Tue Sep 14 2021 Sahana Prasad <sahana(a)redhat.com> - 7.3.5-2 -- Rebuilt with OpenSSL 3.0.0 +* Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 +- Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 * Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 - Update to 7.3.5 commit 49e2552d6fbebc8d09339fc439a8aa443e5aa690 Author: Sahana Prasad <sahana(a)redhat.com> Date: Tue Sep 14 19:12:24 2021 +0200 Rebuilt with OpenSSL 3.0.0 diff --git a/pypy3.7.spec b/pypy3.7.spec index af43aed..38872c8 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -2,7 +2,7 @@ %global pyversion 3.7 Name: pypy%{pyversion} Version: %{basever}.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,9 @@ CheckPyPy pypy3-c %changelog +* Tue Sep 14 2021 Sahana Prasad <sahana(a)redhat.com> - 7.3.5-2 +- Rebuilt with OpenSSL 3.0.0 + * Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 - Update to 7.3.5 - Fixes: rhbz#1992600 commit 83ef54a660af6c9e84e78ebc1f188784cda7ddc6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Aug 16 18:13:20 2021 +0200 Update to 7.3.5 diff --git a/.gitignore b/.gitignore index c4b4267..dc1ee9b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /pypy3.6-v7.3.0-src.tar.bz2 /pypy3.6-v7.3.1-src.tar.bz2 /pypy3.7-v7.3.4-src.tar.bz2 +/pypy3.7-v7.3.5-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 33e04c9..af43aed 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.4 -Release: 4%{?dist} +Version: %{basever}.5 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,10 @@ CheckPyPy pypy3-c %changelog +* Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 +- Update to 7.3.5 +- Fixes: rhbz#1992600 + * Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 - Rename pypy3 to pypy3.7 - pypy-stackless was removed diff --git a/sources b/sources index 60e1bdc..9b40959 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.4-src.tar.bz2) = c570d34f284f41dcd8dd909216c69831dd83b8501423c7635a4fe506fb16fd3705cf87975a664735e52d0b805a0432267d611a993437d17aac3defe4b9ea4401 +SHA512 (pypy3.7-v7.3.5-src.tar.bz2) = 253d2efc81d55fb392ab810741e3a633f664e1908b2c26db7a8830c971655cca6be1b8d34581d13aa2d738a4a4c8ba23c2c90333b6e03d4608372e8013ea723b commit 27985bbcb8631a6af65c76bde080577242960df5 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Tue Aug 10 13:38:40 2021 +0200 Add bcond main_pypy3 to differentiate whether package is main pypy package or not diff --git a/pypy3.7.spec b/pypy3.7.spec index a660404..33e04c9 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -126,6 +126,12 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal +%if 0%{?fedora} >= 35 +%bcond_without main_pypy3 +%else +%bcond_with main_pypy3 +%endif + # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
@@ -237,10 +243,12 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%if %{with main_pypy3} Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} Obsoletes: pypy3 < 7.3.4-4 +%endif %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -264,9 +272,11 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +%if %{with main_pypy3} Provides: pypy3-libs = %{version}-%{release} Provides: pypy3-libs%{?_isa} = %{version}-%{release} Obsoletes: pypy3-libs < 7.3.4-4 +%endif %if %{with rpmwheels} Requires: python-setuptools-wheel @@ -299,9 +309,11 @@ Libraries required by the various PyPy implementations of Python 3. Summary: Development tools for working with PyPy3 Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} +%if %{with main_pypy3} Provides: pypy3-devel = %{version}-%{release} Provides: pypy3-devel%{?_isa} = %{version}-%{release} Obsoletes: pypy3-devel < 7.3.4-4 +%endif %description devel Header files for building C extension modules against PyPy3 @@ -537,7 +549,9 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} +%if %{with main_pypy3} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 +%endif # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -662,12 +676,14 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif +%if %{with main_pypy3} # Install macros for rpm: install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} +%endif # Remove files we don't want: rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ @@ -828,8 +844,8 @@ CheckPyPy pypy3-c %license %{pypyprefix}/lib_pypy/*/LICENSE %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypy3trace-mode.el -%{_emacs_sitelispdir}/pypy3trace-mode.elc +%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el +%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif %files commit 86f73ef2399e7e79e12a312bc017a25e51d949df Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Aug 9 12:52:43 2021 +0200 Removes pypy-stackless as it is not needed anymore diff --git a/pypy3.7.spec b/pypy3.7.spec index 9133480..a660404 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -78,19 +78,6 @@ URL:
http://pypy.org/
# [Timer] compile_c --- 273.9 s # [Timer] =========================================== # [Timer] Total: --- 3572.0 s -# -# -# A build of pypy-stackless on i686 took about 87 mins: -# [Timer] Timings: -# [Timer] annotate --- 584.2 s -# [Timer] rtype_lltype --- 777.3 s -# [Timer] backendopt_lltype --- 365.9 s -# [Timer] stackcheckinsertion_lltype --- 39.3 s -# [Timer] database_c --- 1089.6 s -# [Timer] source_c --- 1868.6 s -# [Timer] compile_c --- 490.4 s -# [Timer] =========================================== -# [Timer] Total: --- 5215.3 s # We will build a "pypy" binary. @@ -116,9 +103,6 @@ URL:
http://pypy.org/
%global with_jit 0 %endif -# Should we build a "pypy-stackless" binary? -%global with_stackless 0 - # Should we build the emacs JIT-viewing mode? %if 0%{?rhel} == 6 %global with_emacs 0 @@ -323,19 +307,6 @@ Obsoletes: pypy3-devel < 7.3.4-4 Header files for building C extension modules against PyPy3 -%if 0%{with_stackless} -%package stackless -Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs%{?_isa} = %{version}-%{release} - -Provides: pypy3-stackless = %{version}-%{release} -Provides: pypy3-stackless%{?_isa} = %{version}-%{release} -Obsoletes: pypy3-stackless < 7.3.4-4 - -%description stackless -Build of PyPy3 with support for micro-threads for massive concurrency -%endif - %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git @@ -522,12 +493,6 @@ BuildPyPy \ %endif %{nil} -%if 0%{with_stackless} -BuildPyPy \ - pypy3-stackless \ - "--stackless" -%endif - %if %{with_emacs} %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif @@ -845,11 +810,6 @@ CheckPyPy() { %if %{run_selftests} CheckPyPy pypy3-c - -%if 0%{with_stackless} -CheckPyPy pypy3-stackless -%endif - %endif # run_selftests # Because there's a bunch of binary subpackages and creating @@ -887,12 +847,6 @@ CheckPyPy pypy3-stackless %{_rpmconfigdir}/macros.d/macros.pypy3 %endif -%if 0%{with_stackless} -%files stackless -%doc README.rst -%{_bindir}/pypy-stackless -%endif - %changelog * Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 commit b8466c1e8afa8093205b6100a27540f753b5c9d9 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Aug 9 12:45:19 2021 +0200 Rename pypy3 to pypy3.7 diff --git a/pypy3.spec b/pypy3.7.spec similarity index 97% rename from pypy3.spec rename to pypy3.7.spec index 2bd5917..9133480 100644 --- a/pypy3.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 -Name: pypy3 -Version: %{basever}.4 %global pyversion 3.7 -Release: 3%{?dist} +Name: pypy%{pyversion} +Version: %{basever}.4 +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -136,7 +136,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{basever} +%global pypyprefix %{_libdir}/pypy%{pyversion} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -254,8 +254,9 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} -Provides: pypy%{pyversion} = %{version}-%{release} -Provides: pypy%{pyversion}%{?_isa} = %{version}-%{release} +Provides: pypy3 = %{version}-%{release} +Provides: pypy3%{?_isa} = %{version}-%{release} +Obsoletes: pypy3 < 7.3.4-4 %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -279,8 +280,9 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif -Provides: pypy%{pyversion}-libs = %{version}-%{release} -Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} +Provides: pypy3-libs = %{version}-%{release} +Provides: pypy3-libs%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-libs < 7.3.4-4 %if %{with rpmwheels} Requires: python-setuptools-wheel @@ -311,10 +313,11 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Summary: Development tools for working with PyPy3 -Requires: pypy3%{?_isa} = %{version}-%{release} +Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} -Provides: pypy%{pyversion}-devel = %{version}-%{release} -Provides: pypy%{pyversion}-devel%{?_isa} = %{version}-%{release} +Provides: pypy3-devel = %{version}-%{release} +Provides: pypy3-devel%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-devel < 7.3.4-4 %description devel Header files for building C extension modules against PyPy3 @@ -325,8 +328,9 @@ Header files for building C extension modules against PyPy3 Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} -Provides: pypy%{pyversion}-stackless = %{version}-%{release} -Provides: pypy%{pyversion}-stackless%{?_isa} = %{version}-%{release} +Provides: pypy3-stackless = %{version}-%{release} +Provides: pypy3-stackless%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-stackless < 7.3.4-4 %description stackless Build of PyPy3 with support for micro-threads for massive concurrency @@ -534,8 +538,8 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -# Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies +# Run installing script, archive-name pypy%{pyversion} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name pypy%{pyversion} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies # Remove shebang lines from .py files that aren't executable, and @@ -701,7 +705,7 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ +rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now @@ -840,10 +844,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy %{name}-c +CheckPyPy pypy3-c %if 0%{with_stackless} -CheckPyPy %{name}-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -870,16 +874,18 @@ CheckPyPy %{name}-stackless %files %doc README.rst +%if %{with main_pypy3} %{_bindir}/pypy3 +%endif %{_bindir}/pypy%{pyversion} %{pypyprefix}/bin/ -%exclude %{_libdir}/%{name}-%{version}.tar.bz2 - %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 +%endif %if 0%{with_stackless} %files stackless @@ -889,6 +895,10 @@ CheckPyPy %{name}-stackless %changelog +* Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 +- Rename pypy3 to pypy3.7 +- pypy-stackless was removed + * Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.4-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
diff --git a/tests/tests.yml b/tests/tests.yml index 827cb90..5242663 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.7 ./venv.sh + run: PYTHON=pypy3.7 VERSION=3.7 ./venv.sh required_packages: - gcc - python3-tox - - pypy3-devel + - pypy3.7-devel commit 716f2f638d30f78656b784f42dd633aac492804e Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 23 04:30:08 2021 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 3b11f44..2bd5917 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.4 %global pyversion 3.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -889,6 +889,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.4-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+ * Wed Jul 21 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-2 - Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros - Fixes: rhbz#1976656 commit e90c1b5d85ebcaed6e89cf8bf6b2327210769370 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Wed Jul 21 16:19:29 2021 +0200 Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros diff --git a/pypy3.spec b/pypy3.spec index 025102c..3b11f44 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.4 %global pyversion 3.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -143,10 +143,6 @@ URL:
http://pypy.org/
%global goal_dir pypy/goal -# Turn off the brp-python-bytecompile postprocessing script -# We manually invoke it later on, using the freshly built pypy binary -%global __brp_python_bytecompile %{nil} - # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
@@ -221,6 +217,9 @@ BuildRequires: expat-devel BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel + +BuildRequires: python-rpm-macros + %ifnarch s390 BuildRequires: valgrind-devel %endif @@ -617,19 +616,12 @@ ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # Bytecompile all of the .py files we ship, using our pypy binary, giving us -# .pyc files for pypy. The script actually does the work twice (passing in -O -# the second time) but it's simplest to reuse that script. -# -# The script has special-casing for .py files below -# /usr/lib{64}/python[0-9].[0-9] -# but given that we're installing into a different path, the supplied "default" -# implementation gets used instead. +# .pyc files for pypy. # # Note that some of the test files deliberately contain syntax errors, so -# we pass 0 for the second argument ("errors_terminate"): -/usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}%{pypyprefix}/bin/pypy3 \ - 0 +# we are running it in subshell, to be able to ignore the failures and not to terminate the build. +(%{py_byte_compile %{buildroot}%{pypyprefix}/bin/pypy3 %{buildroot}%{pypyprefix}}) || : + %{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' %{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' @@ -897,6 +889,10 @@ CheckPyPy %{name}-stackless %changelog +* Wed Jul 21 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-2 +- Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros +- Fixes: rhbz#1976656 + * Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.4-1 - Update to 7.3.4 - pypy3 is now Python 3.7 commit f24f8ff0ada28610e3a6801d602c3effea640fe5 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 21 01:35:55 2021 +0200 Update to 7.3.4, PyPy3.7 diff --git a/.gitignore b/.gitignore index 849f483..c4b4267 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /pypy3.6-v7.2.0-src.tar.bz2 /pypy3.6-v7.3.0-src.tar.bz2 /pypy3.6-v7.3.1-src.tar.bz2 +/pypy3.7-v7.3.4-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index e093956..c0dd76b 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -30,7 +30,7 @@ index faa1ba7..2edadc9 100644 "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", @@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): finally: - started = [t for t in started if t.isAlive()] + started = [t for t in started if t.is_alive()] if started: - faulthandler.dump_traceback(sys.stdout) + if faulthandler is not None: diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 0032ba9..8fd8a55 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,25 +1,21 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 6b35b3d..97fc83b 100644 +index 94d40b0..9135b80 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,16 +1,34 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path import pkgutil - import sys -+import runpy - import tempfile - - +@@ -9,9 +11,24 @@ import tempfile __all__ = ["version", "bootstrap"] - - --_SETUPTOOLS_VERSION = "44.0.0" + + +-_SETUPTOOLS_VERSION = "47.1.0" +_WHEEL_DIR = "/usr/share/python-wheels/" - --_PIP_VERSION = "20.0.2" + +-_PIP_VERSION = "20.1.1" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -36,36 +32,14 @@ index 6b35b3d..97fc83b 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - + _PROJECTS = [ - ("setuptools", _SETUPTOOLS_VERSION), -@@ -23,10 +41,18 @@ def _run_pip(args, additional_paths=None): - if additional_paths is not None: - sys.path = additional_paths + sys.path - -- # Install the bundled software -- import pip._internal.cli.main -- return pip._internal.cli.main.main(args) -+ # Invoke pip as if it's the main module, and catch the exit. -+ backup_argv = sys.argv[:] -+ sys.argv[1:] = args -+ try: -+ # run_module() alters sys.modules and sys.argv, but restores them at exit -+ runpy.run_module("pip", run_name="__main__", alter_sys=True) -+ except SystemExit as exc: -+ return exc.code -+ finally: -+ sys.argv[:] = backup_argv - -+ raise SystemError("pip did not exit, this should never happen") - - def version(): - """ -@@ -93,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + ("setuptools", _SETUPTOOLS_VERSION, "py3"), +@@ -103,13 +120,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] - for project, version in _PROJECTS: -- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) + for project, version, py_tag in _PROJECTS: +- wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) - whl = pkgutil.get_data( - "ensurepip", - "_bundled/{}".format(wheel_name), diff --git a/pypy3.spec b/pypy3.spec index 7b4d004..025102c 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ %global basever 7.3 Name: pypy3 -Version: %{basever}.1 -%global pyversion 3.6 -Release: 6%{?dist} +Version: %{basever}.4 +%global pyversion 3.7 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -25,7 +25,9 @@ URL:
http://pypy.org/
# with the packaged version. # The version information can be found at lib_pypy/_libmpdec/mpdecimal.h # defined as MPD_VERSION. -%global libmpdec_version 2.4.1 +# See
https://foss.heptapod.net/pypy/pypy/-/issues/3024
+# With PyPy 7.3.4, the decimal module is not compiled +#%%global libmpdec_version 2.4.1 # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise @@ -146,7 +148,7 @@ URL:
http://pypy.org/
%global __brp_python_bytecompile %{nil} # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
+Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -285,13 +287,15 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 20.0.2 -Provides: bundled(python3dist(setuptools)) = 44.0.0 +Provides: bundled(python3dist(pip)) = 20.1.1 +Provides: bundled(python3dist(setuptools)) = 47.1.0 %endif # Provides for the bundled libmpdec +%{?libmpdec_version: Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} +} # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.20 @@ -341,8 +345,8 @@ rm lib-python/3/ensurepip/_bundled/*.whl rmdir lib-python/3/ensurepip/_bundled %else # we don't want to ship the old ones anyway -rm lib-python/3/ensurepip/_bundled/pip-8.1.2-* -rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-* +rm lib-python/3/ensurepip/_bundled/pip-20.0* +rm lib-python/3/ensurepip/_bundled/setuptools-44* %endif @@ -532,7 +536,7 @@ mkdir -p %{buildroot}/%{pypyprefix} # Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies # Remove shebang lines from .py files that aren't executable, and @@ -564,7 +568,6 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # approach is to postprocess the ELF file: execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 -ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 @@ -720,11 +723,12 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check +%{?libmpdec_version: # Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual # provides for in the SPEC. test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ "%{libmpdec_version}" - +} topdir=$(pwd) @@ -893,6 +897,11 @@ CheckPyPy %{name}-stackless %changelog +* Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.4-1 +- Update to 7.3.4 +- pypy3 is now Python 3.7 +- Fixes rhbz#1961933 + * Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.1-6 - Provide missing bundled library information diff --git a/sources b/sources index 0b7b357..60e1bdc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 +SHA512 (pypy3.7-v7.3.4-src.tar.bz2) = c570d34f284f41dcd8dd909216c69831dd83b8501423c7635a4fe506fb16fd3705cf87975a664735e52d0b805a0432267d611a993437d17aac3defe4b9ea4401 diff --git a/tests/tests.yml b/tests/tests.yml index c3a91f3..827cb90 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.6 ./venv.sh + run: PYTHON=pypy3 VERSION=3.7 ./venv.sh required_packages: - gcc - python3-tox commit f592f0db6a04e430152a0909b3471683c0c95849 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue May 25 22:05:10 2021 +0200 Provide missing bundled library information diff --git a/pypy3.spec b/pypy3.spec index 2184360..7b4d004 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,14 +2,20 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler +# PyPy is MIT +# Python standard library is Python +# pypy/module/unicodedata is UCD +# Bundled pycparser is is BSD +# Bundled pycparser.ply is BSD +# Bundled bits from cryptography are ASL 2.0 or BSD # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new # licensing terms -License: MIT and Python and UCD +License: MIT and Python and UCD and BSD and (ASL 2.0 or BSD) URL:
http://pypy.org/
# High-level configuration of the build: @@ -279,14 +285,23 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 20.0.2 -Provides: bundled(python3-setuptools) = 44.0.0 +Provides: bundled(python3dist(pip)) = 20.0.2 +Provides: bundled(python3dist(setuptools)) = 44.0.0 %endif # Provides for the bundled libmpdec Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} +# Find the version in lib_pypy/cffi/_pycparser/__init__.py +Provides: bundled(python3dist(pycparser)) = 2.20 + +# Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py +Provides: bundled(python3dist(ply)) = 3.9 + +# Find the version in lib_pypy/_cffi_ssl/cryptography/__about__.py +Provides: bundled(python3dist(cryptography)) = 2.7 + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -878,6 +893,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.1-6 +- Provide missing bundled library information + * Wed May 19 2021 Charalampos Stratakis <cstratak(a)redhat.com> - 7.3.1-5 - Add virtual provides for the bundled libmpdec (rhbz#1943359) commit a45f4e982edfb10e5ec9dae376ba282d6030e88e Author: Charalampos Stratakis <cstratak(a)redhat.com> Date: Thu May 20 00:10:33 2021 +0200 Add virtual provides for the bundled libmpdec (rhbz#1943359) diff --git a/pypy3.spec b/pypy3.spec index 57590db..2184360 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -14,6 +14,13 @@ URL:
http://pypy.org/
# High-level configuration of the build: +# libmpdec (mpdecimal package in Fedora) is tightly coupled with the +# decimal module. We keep it bundled as to avoid incompatibilities +# with the packaged version. +# The version information can be found at lib_pypy/_libmpdec/mpdecimal.h +# defined as MPD_VERSION. +%global libmpdec_version 2.4.1 + # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels @@ -276,6 +283,10 @@ Provides: bundled(python3-pip) = 20.0.2 Provides: bundled(python3-setuptools) = 44.0.0 %endif +# Provides for the bundled libmpdec +Provides: bundled(mpdecimal) = %{libmpdec_version} +Provides: bundled(libmpdec) = %{libmpdec_version} + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -693,6 +704,13 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check + +# Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual +# provides for in the SPEC. +test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ + "%{libmpdec_version}" + + topdir=$(pwd) SkipTest() { @@ -860,6 +878,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed May 19 2021 Charalampos Stratakis <cstratak(a)redhat.com> - 7.3.1-5 +- Add virtual provides for the bundled libmpdec (rhbz#1943359) + * Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
commit 10fe1a9ce92d4e78add6f3b961d0600a9e72fe51 Author: Charalampos Stratakis <cstratak(a)redhat.com> Date: Thu May 20 00:09:06 2021 +0200 Temporary workaround for missing %apply_patch in RPM 4.17 alpha diff --git a/pypy3.spec b/pypy3.spec index 79848ea..57590db 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -306,6 +306,8 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +# Temporary workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1954999
+%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}} %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} commit 7e40fae162577d96896fe74dc35072e5ee3e8ea3 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Wed Jan 27 08:56:57 2021 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index fd45393..79848ea 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+ * Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-3 - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
commit 2db1dabba5dce3ef2b86a0432eb42488e0be3bda Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Aug 1 07:17:17 2020 +0000 - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index ad7423f..fd45393 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,10 @@ CheckPyPy %{name}-stackless %changelog +* Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-3 +- Second attempt - Rebuilt for +
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ * Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
commit a68c6873ebaceff0dbddeec347b44f1ea70df1f7 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Tue Jul 28 23:22:44 2020 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index ebca79e..ad7423f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ * Wed Apr 15 2020 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.1-1 - Update to 7.3.1 commit 598f61d5f284c0a353b971350aedf5dd710ddf50 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Apr 20 13:08:30 2020 +0200 Update to 7.3.1 diff --git a/.gitignore b/.gitignore index 9058264..849f483 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /pypy3.6-v7.1.1-src.tar.bz2 /pypy3.6-v7.2.0-src.tar.bz2 /pypy3.6-v7.3.0-src.tar.bz2 +/pypy3.6-v7.3.1-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index c84b0cb..0032ba9 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,24 +1,25 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 7a0d3ee..2c9d676 100644 +index 6b35b3d..97fc83b 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,6 +1,7 @@ +@@ -1,16 +1,34 @@ +import distutils.version +import glob import os import os.path --import pkgutil + import pkgutil import sys ++import runpy import tempfile - -@@ -8,9 +9,24 @@ import tempfile + + __all__ = ["version", "bootstrap"] - - --_SETUPTOOLS_VERSION = "41.2.0" + + +-_SETUPTOOLS_VERSION = "44.0.0" +_WHEEL_DIR = "/usr/share/python-wheels/" - --_PIP_VERSION = "19.2.3" + +-_PIP_VERSION = "20.0.2" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,10 +36,32 @@ index 7a0d3ee..2c9d676 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - + _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -93,13 +109,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -23,10 +41,18 @@ def _run_pip(args, additional_paths=None): + if additional_paths is not None: + sys.path = additional_paths + sys.path + +- # Install the bundled software +- import pip._internal.cli.main +- return pip._internal.cli.main.main(args) ++ # Invoke pip as if it's the main module, and catch the exit. ++ backup_argv = sys.argv[:] ++ sys.argv[1:] = args ++ try: ++ # run_module() alters sys.modules and sys.argv, but restores them at exit ++ runpy.run_module("pip", run_name="__main__", alter_sys=True) ++ except SystemExit as exc: ++ return exc.code ++ finally: ++ sys.argv[:] = backup_argv + ++ raise SystemError("pip did not exit, this should never happen") + + def version(): + """ +@@ -93,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version in _PROJECTS: @@ -53,6 +76,6 @@ index 7a0d3ee..2c9d676 100644 + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) - + additional_paths.append(os.path.join(tmpdir, wheel_name)) - + diff --git a/pypy3.spec b/pypy3.spec index 63edae4..ebca79e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ %global basever 7.3 Name: pypy3 -Version: %{basever}.0 +Version: %{basever}.1 %global pyversion 3.6 -Release: 3%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -14,11 +14,6 @@ URL:
http://pypy.org/
# High-level configuration of the build: -# Build with -fcommon -#
https://bugzilla.redhat.com/show_bug.cgi?id=1796821
-#
https://bitbucket.org/pypy/pypy/issues/3163
-%define _legacy_common_support 1 - # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels @@ -277,8 +272,8 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 9.0.1 -Provides: bundled(python3-setuptools) = 28.8.0 +Provides: bundled(python3-pip) = 20.0.2 +Provides: bundled(python3-setuptools) = 44.0.0 %endif %description libs @@ -863,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 15 2020 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.1-1 +- Update to 7.3.1 + * Wed Feb 12 2020 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-3 - Update the ensurepip module to work with setuptools >= 45 diff --git a/sources b/sources index 2bd7601..0b7b357 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.3.0-src.tar.bz2) = 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 +SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 commit 2032d986801b3a542282dd6341b01ce5cfe7e347 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 12 13:30:25 2020 +0100 Update the ensurepip module to work with setuptools >= 45 setuptools 45.x is Python 3 only and changed the name of the wheel diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 9441309..c84b0cb 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,8 +1,8 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 9f5d151..8b81155 100644 +index 7a0d3ee..2c9d676 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,16 +1,27 @@ +@@ -1,6 +1,7 @@ +import distutils.version +import glob import os @@ -11,20 +11,25 @@ index 9f5d151..8b81155 100644 import sys import tempfile - +@@ -8,9 +9,24 @@ import tempfile __all__ = ["version", "bootstrap"] -+_WHEEL_DIR = "/usr/share/python-wheels/" -_SETUPTOOLS_VERSION = "41.2.0" ++_WHEEL_DIR = "/usr/share/python-wheels/" -_PIP_VERSION = "19.2.3" ++_wheels = {} ++ +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) -+ suffix = "-py2.py3-none-any.whl" -+ pattern = "{}*{}".format(prefix, suffix) -+ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern)) -+ return str(max(versions, key=distutils.version.LooseVersion)) ++ _wheels[pkg] = {} ++ for suffix in "-py2.py3-none-any.whl", "-py3-none-any.whl": ++ pattern = "{}*{}".format(prefix, suffix) ++ for path in glob.glob(pattern): ++ version_str = path[len(prefix):-len(suffix)] ++ _wheels[pkg][version_str] = os.path.basename(path) ++ return str(max(_wheels[pkg], key=distutils.version.LooseVersion)) + + +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") @@ -33,16 +38,18 @@ index 9f5d151..8b81155 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, +@@ -93,13 +109,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + # additional paths that need added to sys.path additional_paths = [] for project, version in _PROJECTS: - wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) +- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) - whl = pkgutil.get_data( - "ensurepip", - "_bundled/{}".format(wheel_name), - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) ++ wheel_name = _wheels[project][version] + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) diff --git a/pypy3.spec b/pypy3.spec index e17f3a4..63edae4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -863,6 +863,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Feb 12 2020 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-3 +- Update the ensurepip module to work with setuptools >= 45 + * Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
commit 64a5625b90ea9129c1a509ef184c67c97b5699ae Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 12 20:01:06 2020 +0100 Build with -fcommon diff --git a/pypy3.spec b/pypy3.spec index a30e912..e17f3a4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -14,6 +14,11 @@ URL:
http://pypy.org/
# High-level configuration of the build: +# Build with -fcommon +#
https://bugzilla.redhat.com/show_bug.cgi?id=1796821
+#
https://bitbucket.org/pypy/pypy/issues/3163
+%define _legacy_common_support 1 + # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels commit 1dceae177ceb5daa5cfc82db2a6afa9a3d3b37d2 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Jan 30 10:15:13 2020 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 7257616..a30e912 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+ * Sat Dec 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-1 - Update to 7.3.0 commit 41c6994849a04d82eb969a306751bf35afe90735 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Dec 28 11:22:21 2019 +0100 Update to 7.3.0 diff --git a/.gitignore b/.gitignore index 4b53676..9058264 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /pypy3.5-v7.0.0-src.tar.bz2 /pypy3.6-v7.1.1-src.tar.bz2 /pypy3.6-v7.2.0-src.tar.bz2 +/pypy3.6-v7.3.0-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 4a62d57..9441309 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -16,9 +16,9 @@ index 9f5d151..8b81155 100644 +_WHEEL_DIR = "/usr/share/python-wheels/" --_SETUPTOOLS_VERSION = "40.6.2" +-_SETUPTOOLS_VERSION = "41.2.0" --_PIP_VERSION = "18.1" +-_PIP_VERSION = "19.2.3" +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) + suffix = "-py2.py3-none-any.whl" diff --git a/d81c769a235307f6671a8fa916f48d6896cbb823.patch b/d81c769a235307f6671a8fa916f48d6896cbb823.patch deleted file mode 100644 index 8debd29..0000000 --- a/d81c769a235307f6671a8fa916f48d6896cbb823.patch +++ /dev/null @@ -1,49 +0,0 @@ -# HG changeset patch -# User Armin Rigo <arigo(a)tunes.org> -# Date 1571380165 -7200 -# Node ID d81c769a235307f6671a8fa916f48d6896cbb823 -# Parent f27546b858f97bfa286a891e1474579759028784 -Arguably, clarify the logic. The real motivation is a gcc bug, see issue #3086 - -diff --git a/rpython/jit/backend/aarch64/opassembler.py b/rpython/jit/backend/aarch64/opassembler.py ---- a/rpython/jit/backend/aarch64/opassembler.py -+++ b/rpython/jit/backend/aarch64/opassembler.py -@@ -808,9 +808,7 @@ - # Inline a series of STR operations, starting at 'dstaddr_loc'. - # - self.mc.gen_load_int(r.ip0.value, 0) -- i = 0 -- adjustment = 0 -- needs_adjustment = itemsize < 8 and (startbyte % 8) -+ i = dst_i = 0 - total_size = size_box.getint() - while i < total_size: - sz = itemsize -@@ -818,19 +816,19 @@ - next_group += 8 - if next_group <= total_size: - sz = 8 -+ if dst_i % 8: # unaligned? -+ self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, dst_i) -+ dst_i = 0 - if sz == 8: -- if needs_adjustment: -- self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, i) -- adjustment = -i -- needs_adjustment = False -- self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, dst_i) - elif sz == 4: -- self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, dst_i) - elif sz == 2: -- self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, dst_i) - else: -- self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, dst_i) - i += sz -+ dst_i += sz - - else: - if isinstance(size_box, ConstInt): diff --git a/pypy3.spec b/pypy3.spec index 785179e..7257616 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.2 +%global basever 7.3 Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -164,9 +164,6 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch -#
https://bitbucket.org/pypy/pypy/issues/3086
-Patch12: d81c769a235307f6671a8fa916f48d6896cbb823.patch - # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -861,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Dec 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-1 +- Update to 7.3.0 + * Wed Oct 23 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-2 - Enable JIT on aarch64 diff --git a/sources b/sources index 25bbbb3..2bd7601 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.2.0-src.tar.bz2) = bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc +SHA512 (pypy3.6-v7.3.0-src.tar.bz2) = 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 commit 5aa1d86125bbb751ef5edc25907f659c20d31797 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Oct 23 17:03:00 2019 +0200 Enable JIT on aarch64, add upstream workaround diff --git a/d81c769a235307f6671a8fa916f48d6896cbb823.patch b/d81c769a235307f6671a8fa916f48d6896cbb823.patch new file mode 100644 index 0000000..8debd29 --- /dev/null +++ b/d81c769a235307f6671a8fa916f48d6896cbb823.patch @@ -0,0 +1,49 @@ +# HG changeset patch +# User Armin Rigo <arigo(a)tunes.org> +# Date 1571380165 -7200 +# Node ID d81c769a235307f6671a8fa916f48d6896cbb823 +# Parent f27546b858f97bfa286a891e1474579759028784 +Arguably, clarify the logic. The real motivation is a gcc bug, see issue #3086 + +diff --git a/rpython/jit/backend/aarch64/opassembler.py b/rpython/jit/backend/aarch64/opassembler.py +--- a/rpython/jit/backend/aarch64/opassembler.py ++++ b/rpython/jit/backend/aarch64/opassembler.py +@@ -808,9 +808,7 @@ + # Inline a series of STR operations, starting at 'dstaddr_loc'. + # + self.mc.gen_load_int(r.ip0.value, 0) +- i = 0 +- adjustment = 0 +- needs_adjustment = itemsize < 8 and (startbyte % 8) ++ i = dst_i = 0 + total_size = size_box.getint() + while i < total_size: + sz = itemsize +@@ -818,19 +816,19 @@ + next_group += 8 + if next_group <= total_size: + sz = 8 ++ if dst_i % 8: # unaligned? ++ self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, dst_i) ++ dst_i = 0 + if sz == 8: +- if needs_adjustment: +- self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, i) +- adjustment = -i +- needs_adjustment = False +- self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, dst_i) + elif sz == 4: +- self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, dst_i) + elif sz == 2: +- self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, dst_i) + else: +- self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, dst_i) + i += sz ++ dst_i += sz + + else: + if isinstance(size_box, ConstInt): diff --git a/pypy3.spec b/pypy3.spec index 70caacc..785179e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -95,8 +95,7 @@ URL:
http://pypy.org/
# it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -# aarch64:
https://bitbucket.org/pypy/pypy/issues/3086
-%ifarch %{ix86} x86_64 %{arm} %{power64} s390x +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 %global with_jit 1 %else %global with_jit 0 @@ -165,6 +164,9 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +#
https://bitbucket.org/pypy/pypy/issues/3086
+Patch12: d81c769a235307f6671a8fa916f48d6896cbb823.patch + # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -859,6 +861,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Oct 23 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-2 +- Enable JIT on aarch64 + * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) - Enable aarch64 (without JIT) commit faa7ffb044605fcf1d807ada72eeb88ccf4181a1 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 19 00:41:56 2019 +0200 Build everything with pypy, but fix the cpython build w/out pycparser diff --git a/pypy3.spec b/pypy3.spec index 0ab7125..70caacc 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -179,25 +179,15 @@ Source189: 189-use-rpm-wheels.patch # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%ifarch %{power64} -# the build is unreliable with pypy+power, getting random failures -# so better have a bit slower build than having to build until it pass -%global use_self_when_building 0 -%else %global use_self_when_building 1 -%endif - %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 -# no pypy-pycparser available ATM %global bootstrap_python_interp pypy2 %else - - # pypy3 can only be build with python2 -BuildRequires: python2-devel -BuildRequires: python2-pycparser +# exception to use Python 2:
https://pagure.io/fesco/issue/2130
+BuildRequires: python27 %global bootstrap_python_interp python2 %endif @@ -356,6 +346,11 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif +%if ! 0%{use_self_when_building} + # use the pycparser from PyPy even on CPython + ln -s lib_pypy/cffi/_pycparser pycparser +%endif + %build %ifarch s390 s390x # pypy3 requires z10 at least commit 8d646e7dd1de54fcf25b0d37ccc3b087b8e7554e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Oct 18 19:02:40 2019 +0200 Fix %{pypy3_version} for PyPy 3.10 diff --git a/macros.pypy3 b/macros.pypy3 index f138a39..d11474b 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -1,5 +1,5 @@ %__pypy3 /usr/bin/pypy3 %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") -%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") %pypy3_pypy_version %(%{__pypy3} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))") commit 083ef4d302f9f87e71603a93650baea2929ab127 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Oct 17 20:29:42 2019 +0200 Enable power64 (with JIT) diff --git a/pypy3.spec b/pypy3.spec index e7f3045..0ab7125 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,9 +12,6 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
-ExcludeArch: %{power64} - # High-level configuration of the build: # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package @@ -870,6 +867,7 @@ CheckPyPy %{name}-stackless * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) - Enable aarch64 (without JIT) +- Enable power64 (with JIT) * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit f27d32f53000b43d7e821e764b9b8a073e0c8e58 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Oct 15 02:03:21 2019 +0200 Enable aarch64 without JIT See
https://bitbucket.org/pypy/pypy/issues/3086
diff --git a/pypy3.spec b/pypy3.spec index cf46f81..e7f3045 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,9 +12,8 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# aarch64: Not available yet # ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
-ExcludeArch: aarch64 %{power64} +ExcludeArch: %{power64} # High-level configuration of the build: @@ -99,6 +98,7 @@ ExcludeArch: aarch64 %{power64} # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. +# aarch64:
https://bitbucket.org/pypy/pypy/issues/3086
%ifarch %{ix86} x86_64 %{arm} %{power64} s390x %global with_jit 1 %else @@ -869,6 +869,7 @@ CheckPyPy %{name}-stackless %changelog * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) +- Enable aarch64 (without JIT) * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit 2f53e9f20a92cd7efc8798ba5d6766812eaea195 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Oct 14 20:40:57 2019 +0200 Update to 7.2.0 diff --git a/.gitignore b/.gitignore index 910808c..4b53676 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /pypy3-v6.0.0-src.tar.bz2 /pypy3.5-v7.0.0-src.tar.bz2 /pypy3.6-v7.1.1-src.tar.bz2 +/pypy3.6-v7.2.0-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index 9d7165d..e093956 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -5,18 +5,18 @@ Date: Wed Mar 29 04:31:55 2017 +0200 011-no-faulthandler.patch diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py -index 5d7f308..4424637 100644 +index faa1ba7..2edadc9 100644 --- a/lib-python/3/test/support/__init__.py +++ b/lib-python/3/test/support/__init__.py -@@ -6,7 +6,6 @@ if __name__ != 'test.support': - import collections.abc +@@ -7,7 +7,6 @@ import collections.abc import contextlib + import datetime import errno -import faulthandler import fnmatch import functools import gc -@@ -65,6 +64,11 @@ try: +@@ -70,6 +69,11 @@ try: except ImportError: resource = None @@ -28,7 +28,7 @@ index 5d7f308..4424637 100644 __all__ = [ # globals "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", -@@ -2060,7 +2064,8 @@ def start_threads(threads, unlock=None): +@@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): finally: started = [t for t in started if t.isAlive()] if started: diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index eb8b10e..4a62d57 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -16,9 +16,9 @@ index 9f5d151..8b81155 100644 +_WHEEL_DIR = "/usr/share/python-wheels/" --_SETUPTOOLS_VERSION = "28.8.0" +-_SETUPTOOLS_VERSION = "40.6.2" --_PIP_VERSION = "9.0.1" +-_PIP_VERSION = "18.1" +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) + suffix = "-py2.py3-none-any.whl" @@ -33,22 +33,6 @@ index 9f5d151..8b81155 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -24,8 +35,13 @@ def _run_pip(args, additional_paths=None): - sys.path = additional_paths + sys.path - - # Install the bundled software -- import pip -- pip.main(args) -+ try: -+ # pip 10 -+ from pip._internal import main -+ except ImportError: -+ # pip 9 -+ from pip import main -+ main(args) - - - def version(): @@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: diff --git a/pypy3.spec b/pypy3.spec index 225a1f3..cf46f81 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.1 +%global basever 7.2 Name: pypy3 -Version: %{basever}.1 +Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -867,6 +867,9 @@ CheckPyPy %{name}-stackless %changelog +* Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 +- Update to 7.2.0 (#1757707) + * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
diff --git a/sources b/sources index aa4e777..25bbbb3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.1.1-src.tar.bz2) = 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473 +SHA512 (pypy3.6-v7.2.0-src.tar.bz2) = bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc commit 707f9490c0c9ae2b3cac2b0c6e9503888c5efad0 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 26 11:47:24 2019 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index b781dfb..225a1f3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -867,6 +867,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+ * Fri May 24 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.1.1-1 - Update to 7.1.1 (#1689198) - pypy3 is now Python 3.6 commit 7fc9514b60f515a33dc339d19b94a21dd9943232 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 12 14:48:12 2019 +0200 Keep the LICENSE file in lib/pythonX.Y dir Virtualenv tries to copy it. See
https://github.com/pypa/virtualenv/issues/1352
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. diff --git a/pypy3.spec b/pypy3.spec index 1f45c89..b781dfb 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -688,7 +688,6 @@ install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ - %{buildroot}%{pypyprefix}/LICENSE \ %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now @@ -828,18 +827,19 @@ CheckPyPy %{name}-stackless %endif # run_selftests # Because there's a bunch of binary subpackages and creating -# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that +# /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that # is just confusing for the user. %global _docdir_fmt %{name} %files libs -%license LICENSE %doc README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python +%license %{pypyprefix}/LICENSE %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib_pypy/ +%license %{pypyprefix}/lib_pypy/*/LICENSE %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy3trace-mode.el @@ -847,7 +847,6 @@ CheckPyPy %{name}-stackless %endif %files -%license LICENSE %doc README.rst %{_bindir}/pypy3 %{_bindir}/pypy%{pyversion} @@ -862,7 +861,6 @@ CheckPyPy %{name}-stackless %if 0%{with_stackless} %files stackless -%license LICENSE %doc README.rst %{_bindir}/pypy-stackless %endif commit cac755a96a589f8c15a50ed6ac9d121e336de51c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 24 10:29:13 2019 +0200 Update to 7.1.1, pypy3 is now Python 3.6
https://bugzilla.redhat.com/show_bug.cgi?id=1689198
diff --git a/.gitignore b/.gitignore index 1361620..910808c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /pypy3-v5.10.1-src.tar.bz2 /pypy3-v6.0.0-src.tar.bz2 /pypy3.5-v7.0.0-src.tar.bz2 +/pypy3.6-v7.1.1-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index f96d232..9d7165d 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -4,60 +4,6 @@ Date: Wed Mar 29 04:31:55 2017 +0200 011-no-faulthandler.patch -diff --git a/lib-python/3/test/regrtest.py b/lib-python/3/test/regrtest.py -index c1d85f6..3d3072c 100755 ---- a/lib-python/3/test/regrtest.py -+++ b/lib-python/3/test/regrtest.py -@@ -124,7 +124,6 @@ import importlib - - import argparse - import builtins --import faulthandler - import io - import json - import locale -@@ -152,7 +151,10 @@ try: - import _multiprocessing, multiprocessing.process - except ImportError: - multiprocessing = None -- -+try: -+ import faulthandler -+except ImportError: -+ faulthandler = None - - # Some times __path__ and __file__ are not absolute (e.g. while running from - # Lib/) and, if we change the CWD to run the tests in a temporary dir, some -@@ -486,17 +488,18 @@ def main(tests=None, **kwargs): - directly to set the values that would normally be set by flags - on the command line. - """ -- # Display the Python traceback on fatal errors (e.g. segfault) -- faulthandler.enable(all_threads=True) -- -- # Display the Python traceback on SIGALRM or SIGUSR1 signal -- signals = [] -- if hasattr(signal, 'SIGALRM'): -- signals.append(signal.SIGALRM) -- if hasattr(signal, 'SIGUSR1'): -- signals.append(signal.SIGUSR1) -- for signum in signals: -- faulthandler.register(signum, chain=True) -+ if faulthandler: -+ # Display the Python traceback on fatal errors (e.g. segfault) -+ faulthandler.enable(all_threads=True) -+ -+ # Display the Python traceback on SIGALRM or SIGUSR1 signal -+ signals = [] -+ if hasattr(signal, 'SIGALRM'): -+ signals.append(signal.SIGALRM) -+ if hasattr(signal, 'SIGUSR1'): -+ signals.append(signal.SIGUSR1) -+ for signum in signals: -+ faulthandler.register(signum, chain=True) - - replace_stdout() - diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py index 5d7f308..4424637 100644 --- a/lib-python/3/test/support/__init__.py diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 2caefe2..eb8b10e 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,5 +1,5 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 25c5567..6d8d09c 100644 +index 9f5d151..8b81155 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py @@ -1,16 +1,27 @@ @@ -31,9 +31,9 @@ index 25c5567..6d8d09c 100644 + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - # pip currently requires ssl support, so we try to provide a nicer - # error message when that is missing (
http://bugs.python.org/issue19744
) -@@ -37,8 +48,13 @@ def _run_pip(args, additional_paths=None): + _PROJECTS = [ + ("setuptools", _SETUPTOOLS_VERSION), +@@ -24,8 +35,13 @@ def _run_pip(args, additional_paths=None): sys.path = additional_paths + sys.path # Install the bundled software @@ -49,7 +49,7 @@ index 25c5567..6d8d09c 100644 def version(): -@@ -93,12 +109,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, +@@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) diff --git a/pypy3.spec b/pypy3.spec index 201a8ac..1f45c89 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.0 +%global basever 7.1 Name: pypy3 -Version: %{basever}.0 -%global pyversion 3.5 -Release: 2%{?dist} +Version: %{basever}.1 +%global pyversion 3.6 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -134,8 +134,7 @@ ExcludeArch: aarch64 %{power64} # Turn off the brp-python-bytecompile postprocessing script # We manually invoke it later on, using the freshly built pypy binary -%global __os_install_post \ - %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%global __brp_python_bytecompile %{nil} # Source and patches: Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
@@ -321,13 +320,6 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git -# While this is 7.0.0, it has 7.1.0-alpha0 listed inside -# We sed it out to avoid user confusion -sed -i 's/7\.1\.0/7.0.0/' pypy/doc/conf.py -sed -i 's/7\.1\.0-alpha0/7.0.0/g' pypy/module/cpyext/include/patchlevel.h pypy/doc/how-to-release.rst -sed -i 's/0x07010000/0x07000000/' pypy/module/cpyext/include/patchlevel.h -sed -i 's/7, 1, 0, "alpha"/7, 0, 0, "final"/' pypy/module/sys/version.py - %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} @@ -737,7 +729,7 @@ CheckPyPy() { # Use regrtest to explicitly list all tests: ( ./$ExeName -c \ - "from test.regrtest import findtests; print('\n'.join(findtests()))" + "from test.libregrtest.runtest import findtests; print('\n'.join(findtests()))" ) > testnames.txt # Skip some tests: @@ -877,6 +869,10 @@ CheckPyPy %{name}-stackless %changelog +* Fri May 24 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.1.1-1 +- Update to 7.1.1 (#1689198) +- pypy3 is now Python 3.6 + * Thu May 16 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-2 - Show the version as 7.0.0 diff --git a/sources b/sources index 294934f..aa4e777 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.5-v7.0.0-src.tar.bz2) = 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2 +SHA512 (pypy3.6-v7.1.1-src.tar.bz2) = 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473 diff --git a/tests/tests.yml b/tests/tests.yml index ce6f13f..c3a91f3 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.5 ./venv.sh + run: PYTHON=pypy3 VERSION=3.6 ./venv.sh required_packages: - gcc - python3-tox commit 3e4b7200d351e351effedb134c8a2adaab71201e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 17 00:56:47 2019 +0200 Show the version as 7.0.0 While this is 7.0.0, it has 7.1.0-alpha0 listed inside, we sed it out to avoid user confusion. diff --git a/pypy3.spec b/pypy3.spec index 6c452df..201a8ac 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -321,6 +321,14 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +# While this is 7.0.0, it has 7.1.0-alpha0 listed inside +# We sed it out to avoid user confusion +sed -i 's/7\.1\.0/7.0.0/' pypy/doc/conf.py +sed -i 's/7\.1\.0-alpha0/7.0.0/g' pypy/module/cpyext/include/patchlevel.h pypy/doc/how-to-release.rst +sed -i 's/0x07010000/0x07000000/' pypy/module/cpyext/include/patchlevel.h +sed -i 's/7, 1, 0, "alpha"/7, 0, 0, "final"/' pypy/module/sys/version.py + + %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl @@ -869,6 +877,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu May 16 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-2 +- Show the version as 7.0.0 + * Thu Feb 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-1 - Update to 7.0.0 (#1673127) commit 124d766f70858e217aac1b9c297c4c313ccf95df Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Mar 1 00:06:59 2019 +0100 Update to 7.0.0 (#1673127) diff --git a/.gitignore b/.gitignore index 2025c8c..1361620 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /pypy3-v5.10.0-src.tar.bz2 /pypy3-v5.10.1-src.tar.bz2 /pypy3-v6.0.0-src.tar.bz2 +/pypy3.5-v7.0.0-src.tar.bz2 diff --git a/009-add-libxcrypt-support.patch b/009-add-libxcrypt-support.patch index ec17216..f3c9a7d 100644 --- a/009-add-libxcrypt-support.patch +++ b/009-add-libxcrypt-support.patch @@ -1,13 +1,13 @@ diff --git a/pypy/module/crypt/interp_crypt.py b/pypy/module/crypt/interp_crypt.py -index d227b6a..da969e6 100644 +index bd13f6f..1022c9e 100644 --- a/pypy/module/crypt/interp_crypt.py +++ b/pypy/module/crypt/interp_crypt.py -@@ -6,7 +6,7 @@ import sys - if sys.platform.startswith('darwin'): - eci = ExternalCompilationInfo() +@@ -9,7 +9,7 @@ elif sys.platform.startswith('linux'): + # crypt() is defined only in crypt.h on some Linux variants (eg. Fedora 28) + eci = ExternalCompilationInfo(libraries=['crypt'], includes=["crypt.h"]) else: - eci = ExternalCompilationInfo(libraries=['crypt']) + eci = ExternalCompilationInfo(libraries=['crypt'], includes=['crypt.h']) c_crypt = rffi.llexternal('crypt', [rffi.CCHARP, rffi.CCHARP], rffi.CCHARP, compilation_info=eci, releasegil=False) - + diff --git a/302-fix-multiprocessing-regression-on-newer-glibcs.patch b/302-fix-multiprocessing-regression-on-newer-glibcs.patch deleted file mode 100644 index db723a8..0000000 --- a/302-fix-multiprocessing-regression-on-newer-glibcs.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User Miro Hrončok <miro(a)hroncok.cz> -# Date 1524655710 -7200 -# Wed Apr 25 13:28:30 2018 +0200 -# Branch issue33329 -# Node ID 6501fdc3a80fa2bc3b8c70bfaf94a31c3b3432c0 -# Parent a07f07034d281bec8c776f9e1ee7c5b9aea74007 -Fix multiprocessing regression on newer glibcs - -Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some -reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom -is commonly used to select all signals for blocking with `pthread_sigmask`. -So we ignore the sigaddset() return value until we expose sigfillset() -to provide a better idiom. - -Co-authored-by: Antoine Pitrou <antoine(a)python.org> - -diff -r a07f07034d28 -r 6501fdc3a80f pypy/module/signal/interp_signal.py ---- a/pypy/module/signal/interp_signal.py Tue Apr 24 10:00:00 2018 +0200 -+++ b/pypy/module/signal/interp_signal.py Wed Apr 25 13:28:30 2018 +0200 -@@ -379,10 +379,10 @@ - for w_signum in space.unpackiterable(self.w_signals): - signum = space.int_w(w_signum) - check_signum_in_range(space, signum) -- err = c_sigaddset(self.mask, signum) -- if err: -- raise oefmt(space.w_ValueError, -- "signal number %d out of range", signum) -+ # bpo-33329: ignore c_sigaddset() return value as it can fail -+ # for some reserved signals, but we want the `range(1, NSIG)` -+ # idiom to allow selecting all valid signals. -+ c_sigaddset(self.mask, signum) - return self.mask - - def __exit__(self, *args): diff --git a/pypy3.spec b/pypy3.spec index 00494e3..6c452df 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 6.0 +%global basever 7.0 Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 5%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -138,7 +138,7 @@ ExcludeArch: aarch64 %{power64} %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-v%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -174,12 +174,6 @@ Patch11: 011-no-faulthandler.patch # We conditionally apply this, but we use autosetup, so we use Source here Source189: 189-use-rpm-wheels.patch -# Fix multiprocessing regression on newer glibcs -# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
-# and:
https://bugs.python.org/issue33329
-# and:
https://bitbucket.org/pypy/pypy/pull-requests/607
-Patch302: 302-fix-multiprocessing-regression-on-newer-glibcs.patch - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -224,18 +218,13 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel +BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif -%if 0%{?fedora} >= 26 -BuildRequires: compat-openssl10-devel -%else -BuildRequires: openssl-devel -%endif - %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -266,6 +255,8 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} +Provides: pypy%{pyversion} = %{version}-%{release} +Provides: pypy%{pyversion}%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -289,6 +280,9 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +Provides: pypy%{pyversion}-libs = %{version}-%{release} +Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} + %if %{with rpmwheels} Requires: python-setuptools-wheel Requires: python-pip-wheel @@ -305,6 +299,9 @@ Libraries required by the various PyPy implementations of Python 3. Summary: Development tools for working with PyPy3 Requires: pypy3%{?_isa} = %{version}-%{release} +Provides: pypy%{pyversion}-devel = %{version}-%{release} +Provides: pypy%{pyversion}-devel%{?_isa} = %{version}-%{release} + %description devel Header files for building C extension modules against PyPy3 @@ -313,12 +310,16 @@ Header files for building C extension modules against PyPy3 %package stackless Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} + +Provides: pypy%{pyversion}-stackless = %{version}-%{release} +Provides: pypy%{pyversion}-stackless%{?_isa} = %{version}-%{release} + %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-v%{version}-src -p1 -S git +%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} @@ -868,6 +869,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Feb 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-1 +- Update to 7.0.0 (#1673127) + * Sat Feb 02 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
diff --git a/sources b/sources index 2a76651..294934f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v6.0.0-src.tar.bz2) = ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e +SHA512 (pypy3.5-v7.0.0-src.tar.bz2) = 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2 commit 9d9b0859329520bcb7159023c03f12d2807d39da Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Feb 2 05:16:48 2019 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 5f5203b..00494e3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -868,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Feb 02 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+ * Mon Jan 14 2019 Björn Esser <besser82(a)fedoraproject.org> - 6.0.0-4 - Rebuilt for libcrypt.so.2 (#1666033) commit f8cbccf6e2a244ea2a453c8913e7e1afa23819e8 Author: Björn Esser <besser82(a)fedoraproject.org> Date: Mon Jan 14 19:14:13 2019 +0100 Rebuilt for libcrypt.so.2 (#1666033) diff --git a/pypy3.spec b/pypy3.spec index 7fc7257..5f5203b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -868,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Mon Jan 14 2019 Björn Esser <besser82(a)fedoraproject.org> - 6.0.0-4 +- Rebuilt for libcrypt.so.2 (#1666033) + * Tue Aug 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-3 - Use RPM packaged wheels commit e0becb7cbf6a7549fab9d9a40299888ceae794fe Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 20 12:37:22 2018 +0200 Enable basic venv smoke test in the CI diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ce6f13f --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,17 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "
https://src.fedoraproject.org/tests/python.git
" + dest: "python" + tests: + - smoke: + dir: python/smoke + run: PYTHON=pypy3 VERSION=3.5 ./venv.sh + required_packages: + - gcc + - python3-tox + - pypy3-devel commit 6f8b7baed90a92dcbd3bed71bf98fa1c073bec3a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Aug 21 12:10:46 2018 +0200 Use RPM packaged wheels diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch new file mode 100644 index 0000000..2caefe2 --- /dev/null +++ b/189-use-rpm-wheels.patch @@ -0,0 +1,67 @@ +diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py +index 25c5567..6d8d09c 100644 +--- a/lib-python/3/ensurepip/__init__.py ++++ b/lib-python/3/ensurepip/__init__.py +@@ -1,16 +1,27 @@ ++import distutils.version ++import glob + import os + import os.path +-import pkgutil + import sys + import tempfile + + + __all__ = ["version", "bootstrap"] + ++_WHEEL_DIR = "/usr/share/python-wheels/" + +-_SETUPTOOLS_VERSION = "28.8.0" + +-_PIP_VERSION = "9.0.1" ++def _get_most_recent_wheel_version(pkg): ++ prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) ++ suffix = "-py2.py3-none-any.whl" ++ pattern = "{}*{}".format(prefix, suffix) ++ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern)) ++ return str(max(versions, key=distutils.version.LooseVersion)) ++ ++ ++_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") ++ ++_PIP_VERSION = _get_most_recent_wheel_version("pip") + + # pip currently requires ssl support, so we try to provide a nicer + # error message when that is missing (
http://bugs.python.org/issue19744
) +@@ -37,8 +48,13 @@ def _run_pip(args, additional_paths=None): + sys.path = additional_paths + sys.path + + # Install the bundled software +- import pip +- pip.main(args) ++ try: ++ # pip 10 ++ from pip._internal import main ++ except ImportError: ++ # pip 9 ++ from pip import main ++ main(args) + + + def version(): +@@ -93,12 +109,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, + additional_paths = [] + for project, version in _PROJECTS: + wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) +- whl = pkgutil.get_data( +- "ensurepip", +- "_bundled/{}".format(wheel_name), +- ) +- with open(os.path.join(tmpdir, wheel_name), "wb") as fp: +- fp.write(whl) ++ with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: ++ with open(os.path.join(tmpdir, wheel_name), "wb") as fp: ++ fp.write(sfp.read()) + + additional_paths.append(os.path.join(tmpdir, wheel_name)) + diff --git a/pypy3.spec b/pypy3.spec index 7193654..7fc7257 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -18,6 +18,10 @@ ExcludeArch: aarch64 %{power64} # High-level configuration of the build: +# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package +# Uses upstream bundled prebuilt wheels otherwise +%bcond_without rpmwheels + # PyPy consists of an implementation of an interpreter (with JIT compilation) # for the full Python language written in a high-level language, leaving many # of the implementation details as "pluggable" policies. @@ -165,6 +169,11 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +# Instead of bundled wheels, use our RPM packaged wheels from +# /usr/share/python-wheels +# We conditionally apply this, but we use autosetup, so we use Source here +Source189: 189-use-rpm-wheels.patch + # Fix multiprocessing regression on newer glibcs # See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
# and:
https://bugs.python.org/issue33329
@@ -249,6 +258,11 @@ BuildRequires: emacs # For %%autosetup -S git BuildRequires: %{_bindir}/git +%if %{with rpmwheels} +BuildRequires: python-setuptools-wheel +BuildRequires: python-pip-wheel +%endif + # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} @@ -275,6 +289,14 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +%if %{with rpmwheels} +Requires: python-setuptools-wheel +Requires: python-pip-wheel +%else +Provides: bundled(python3-pip) = 9.0.1 +Provides: bundled(python3-setuptools) = 28.8.0 +%endif + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -298,6 +320,17 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy3-v%{version}-src -p1 -S git +%if %{with rpmwheels} +%apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} +rm lib-python/3/ensurepip/_bundled/*.whl +rmdir lib-python/3/ensurepip/_bundled +%else +# we don't want to ship the old ones anyway +rm lib-python/3/ensurepip/_bundled/pip-8.1.2-* +rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-* +%endif + + # Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2: find -name "*.py" -exec \ sed \ @@ -835,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Aug 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-3 +- Use RPM packaged wheels + * Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
commit 9d0ffbc9d5d861af1635230e55a86c7bc77438b7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Aug 21 11:48:21 2018 +0200 Poor ppc64(le), it just doesn't build :( diff --git a/pypy3.spec b/pypy3.spec index ccbd579..7193654 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,8 +12,9 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# Not available yet -ExcludeArch: aarch64 +# aarch64: Not available yet +# ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
+ExcludeArch: aarch64 %{power64} # High-level configuration of the build: commit e47185bc51db6ff0d04546479b77bdfe84b586c2 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Jul 15 16:25:45 2018 +0200 Drop RHEL5 conditional diff --git a/pypy3.spec b/pypy3.spec index 2e1edb6..ccbd579 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -104,7 +104,7 @@ ExcludeArch: aarch64 %global with_stackless 0 # Should we build the emacs JIT-viewing mode? -%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%if 0%{?rhel} == 6 %global with_emacs 0 %else %global with_emacs 1 commit 3f667ce3366f6971e86aa07783bbc2a370043c5a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Jul 15 16:23:25 2018 +0200 BR gcc diff --git a/pypy3.spec b/pypy3.spec index fb1ac73..2e1edb6 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -202,6 +202,8 @@ BuildRequires: python2-pycparser %endif +BuildRequires: gcc + BuildRequires: libffi-devel BuildRequires: tcl-devel BuildRequires: tk-devel commit f7ac519b1ef348af1d5b57d089f2d7b2109388f6 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 13 23:12:32 2018 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index b1add4a..fb1ac73 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -832,6 +832,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+ * Wed Apr 25 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-1 - Fix failing taskotron check - New release 6.0.0 (#1571489) commit 18c888e5f5972bd6391a59f77794b317c359cec1 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 25 14:20:20 2018 +0200 New release 6.0.0 (#1571489) Fix multiprocessing regression on newer glibcs (#1569933) diff --git a/.gitignore b/.gitignore index 67b6ee0..2025c8c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /pypy3-v5.9.0-src.tar.bz2 /pypy3-v5.10.0-src.tar.bz2 /pypy3-v5.10.1-src.tar.bz2 +/pypy3-v6.0.0-src.tar.bz2 diff --git a/302-fix-multiprocessing-regression-on-newer-glibcs.patch b/302-fix-multiprocessing-regression-on-newer-glibcs.patch new file mode 100644 index 0000000..db723a8 --- /dev/null +++ b/302-fix-multiprocessing-regression-on-newer-glibcs.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Miro Hrončok <miro(a)hroncok.cz> +# Date 1524655710 -7200 +# Wed Apr 25 13:28:30 2018 +0200 +# Branch issue33329 +# Node ID 6501fdc3a80fa2bc3b8c70bfaf94a31c3b3432c0 +# Parent a07f07034d281bec8c776f9e1ee7c5b9aea74007 +Fix multiprocessing regression on newer glibcs + +Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some +reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom +is commonly used to select all signals for blocking with `pthread_sigmask`. +So we ignore the sigaddset() return value until we expose sigfillset() +to provide a better idiom. + +Co-authored-by: Antoine Pitrou <antoine(a)python.org> + +diff -r a07f07034d28 -r 6501fdc3a80f pypy/module/signal/interp_signal.py +--- a/pypy/module/signal/interp_signal.py Tue Apr 24 10:00:00 2018 +0200 ++++ b/pypy/module/signal/interp_signal.py Wed Apr 25 13:28:30 2018 +0200 +@@ -379,10 +379,10 @@ + for w_signum in space.unpackiterable(self.w_signals): + signum = space.int_w(w_signum) + check_signum_in_range(space, signum) +- err = c_sigaddset(self.mask, signum) +- if err: +- raise oefmt(space.w_ValueError, +- "signal number %d out of range", signum) ++ # bpo-33329: ignore c_sigaddset() return value as it can fail ++ # for some reserved signals, but we want the `range(1, NSIG)` ++ # idiom to allow selecting all valid signals. ++ c_sigaddset(self.mask, signum) + return self.mask + + def __exit__(self, *args): diff --git a/pypy3.spec b/pypy3.spec index a14b96d..b1add4a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 5.10 +%global basever 6.0 Name: pypy3 -Version: %{basever}.1 +Version: %{basever}.0 %global pyversion 3.5 -Release: 8%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -164,6 +164,12 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +# Fix multiprocessing regression on newer glibcs +# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
+# and:
https://bugs.python.org/issue33329
+# and:
https://bitbucket.org/pypy/pypy/pull-requests/607
+Patch302: 302-fix-multiprocessing-regression-on-newer-glibcs.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -826,8 +832,10 @@ CheckPyPy %{name}-stackless %changelog -* Sat Apr 14 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-8 +* Wed Apr 25 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-1 - Fix failing taskotron check +- New release 6.0.0 (#1571489) +- Fix multiprocessing regression on newer glibcs (#1569933) * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 - Provide pypy3(abi) = 5.10 diff --git a/sources b/sources index afb3c83..2a76651 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.10.1-src.tar.bz2) = 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5 +SHA512 (pypy3-v6.0.0-src.tar.bz2) = ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e commit b70eb98951063c00fb114a91f935d8991ca0e927 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Apr 15 00:25:48 2018 +0200 Remove Windows bat file diff --git a/pypy3.spec b/pypy3.spec index 0aa26f8..a14b96d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -309,6 +309,9 @@ find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ "{}" \ \; +# Not needed on Linux +rm lib-python/3/idlelib/idle.bat + %ifarch %{ix86} x86_64 %{arm} sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif commit 1b41795b2f455df4a5773c050253c26279595ba7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Apr 14 10:55:05 2018 +0200 Fix shebangs (reported mangled by taskotron) diff --git a/pypy3.spec b/pypy3.spec index bf093ac..0aa26f8 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -185,14 +185,14 @@ Patch11: 011-no-faulthandler.patch # pypy3 can only be build with pypy2 BuildRequires: pypy2 # no pypy-pycparser available ATM -%global bootstrap_python_interp pypy +%global bootstrap_python_interp pypy2 %else # pypy3 can only be build with python2 BuildRequires: python2-devel BuildRequires: python2-pycparser -%global bootstrap_python_interp python +%global bootstrap_python_interp python2 %endif @@ -289,10 +289,10 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy3-v%{version}-src -p1 -S git -# Replace /usr/local/bin/python shebangs with /usr/bin/python: +# Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2: find -name "*.py" -exec \ sed \ - -i -e "s|/usr/local/bin/python|/usr/bin/python|" \ + -i -r -e "s@/usr/(local/)?bin/(env )?python(2|3)?@/usr/bin/%{bootstrap_python_interp}@" \ "{}" \ \; @@ -303,9 +303,9 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done -# Replace all lib-python python shebangs with pypy -find lib-python/%{pylibver} -name "*.py" -exec \ - sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \ +# Replace all lib-python and lib_pypy python shebangs with pypy3 (those will be shipped with pypy3-libs) +find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ + sed -r -i '1s@^#!\s*/usr/bin.*(python|pypy).*@#!/usr/bin/%{name}@' \ "{}" \ \; @@ -823,6 +823,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Apr 14 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-8 +- Fix failing taskotron check + * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 - Provide pypy3(abi) = 5.10 commit cac18deee0e00c9ee8b4fce8d4507796a1561298 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Apr 12 00:23:12 2018 +0200 Provide pypy3(abi) = 5.10 diff --git a/pypy3.spec b/pypy3.spec index 196243f..bf093ac 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -241,7 +241,8 @@ BuildRequires: emacs BuildRequires: %{_bindir}/git # Metadata for the core package (the JIT build): -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Provides: %{name}(abi) = %{basever} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -822,6 +823,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 +- Provide pypy3(abi) = 5.10 + * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-6 - RPM macros improvements commit fe844b70bdc354e3d454bb43ed578f3b4898bac7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 11 12:09:36 2018 +0200 Add macro with pypy version (aka 5.10, not 3.5) diff --git a/macros.pypy3 b/macros.pypy3 index 796b872..f138a39 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -2,3 +2,4 @@ %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3_pypy_version %(%{__pypy3} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))") diff --git a/pypy3.spec b/pypy3.spec index 958f998..196243f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -822,6 +822,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-6 +- RPM macros improvements + * Tue Apr 10 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-5 - Remove the rightmost version number from the path - rhbz#1516885:
https://bugzilla.redhat.com/show_bug.cgi?id=1516885
commit df12619f2b234a4f954e7e043fdac5d0f4701d7b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 11 12:06:37 2018 +0200 Remove %pypy3dir definition, it is useless diff --git a/macros.pypy3 b/macros.pypy3 index ef1f600..796b872 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -2,4 +2,3 @@ %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") -%pypy3dir %{_builddir}/pypy3-%{name}-%{version}-%{release} commit cf5da9288bd0e56d5b0e203cee650cc39f2e3e85 Author: Michal Cyprian <m.cyprian(a)gmail.com> Date: Wed Apr 11 01:31:31 2018 +0200 Remove the rightmost version number from the path diff --git a/pypy3.spec b/pypy3.spec index 22092d4..958f998 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,8 @@ +%global basever 5.10 Name: pypy3 -Version: 5.10.1 +Version: %{basever}.1 %global pyversion 3.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -119,7 +120,7 @@ ExcludeArch: aarch64 # Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{version} +%global pypyprefix %{_libdir}/pypy3-%{basever} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -464,8 +465,8 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -# Run installing script, archive-name %{name}-%{version} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{version} --builddir %{buildroot}/%{_libdir} +# Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} # Remove shebang lines from .py files that aren't executable, and @@ -639,7 +640,7 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ +rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ %{buildroot}%{pypyprefix}/LICENSE \ %{buildroot}%{pypyprefix}/README.rst @@ -821,6 +822,10 @@ CheckPyPy %{name}-stackless %changelog +* Tue Apr 10 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-5 +- Remove the rightmost version number from the path +- rhbz#1516885:
https://bugzilla.redhat.com/show_bug.cgi?id=1516885
+ * Thu Mar 29 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-4 - Add patch for libxcrypt commit c54059a679944400a51e891b164e564befa14cbb Author: Michal Cyprian <m.cyprian(a)gmail.com> Date: Thu Mar 29 21:24:14 2018 +0200 Add patch for libxcrypt diff --git a/009-add-libxcrypt-support.patch b/009-add-libxcrypt-support.patch new file mode 100644 index 0000000..ec17216 --- /dev/null +++ b/009-add-libxcrypt-support.patch @@ -0,0 +1,13 @@ +diff --git a/pypy/module/crypt/interp_crypt.py b/pypy/module/crypt/interp_crypt.py +index d227b6a..da969e6 100644 +--- a/pypy/module/crypt/interp_crypt.py ++++ b/pypy/module/crypt/interp_crypt.py +@@ -6,7 +6,7 @@ import sys + if sys.platform.startswith('darwin'): + eci = ExternalCompilationInfo() + else: +- eci = ExternalCompilationInfo(libraries=['crypt']) ++ eci = ExternalCompilationInfo(libraries=['crypt'], includes=['crypt.h']) + c_crypt = rffi.llexternal('crypt', [rffi.CCHARP, rffi.CCHARP], rffi.CCHARP, + compilation_info=eci, releasegil=False) + diff --git a/pypy3.spec b/pypy3.spec index 2ed9d59..22092d4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -155,6 +155,11 @@ Patch6: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch7: 007-remove-startup-message.patch +# Glibc's libcrypt was replaced with libxcrypt in f28, crypt.h header has +# to be added to privent compilation error. +#
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
+Patch9: 009-add-libxcrypt-support.patch + # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch @@ -816,6 +821,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Mar 29 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-4 +- Add patch for libxcrypt + * Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.10.1-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
commit 664896a6c60437d635c7b940c30ec541d0e94f87 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Feb 9 06:17:45 2018 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 5a9fcba..2ed9d59 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -816,6 +816,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.10.1-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+ * Sat Jan 20 2018 Björn Esser <besser82(a)fedoraproject.org> - 5.10.1-2 - Rebuilt for switch to libxcrypt commit 43f3327530097638befd17ecc0d7054493cc45b9 Author: Björn Esser <besser82(a)fedoraproject.org> Date: Sat Jan 20 23:07:39 2018 +0100 Rebuilt for switch to libxcrypt diff --git a/pypy3.spec b/pypy3.spec index 76aed7c..5a9fcba 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -816,6 +816,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Jan 20 2018 Björn Esser <besser82(a)fedoraproject.org> - 5.10.1-2 +- Rebuilt for switch to libxcrypt + * Fri Jan 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-1 - Update to 5.10.1 (#1533689) - Removed two upstreamed patches commit 8b06f1af625208abd6fd0fa5817f8df53e824916 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jan 19 16:19:55 2018 +0100 Only BR /usr/bin/git, it should be enough for autosetup diff --git a/pypy3.spec b/pypy3.spec index db72cad..76aed7c 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -232,7 +232,7 @@ BuildRequires: emacs %endif # For %%autosetup -S git -BuildRequires: git +BuildRequires: %{_bindir}/git # Metadata for the core package (the JIT build): Requires: pypy3-libs%{?_isa} = %{version}-%{release} commit 93cd7d04ccff833ff161ec02c1fbfb2d940fca9e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jan 12 10:01:38 2018 +0100 Update to 5.10.1 (#1533689) diff --git a/.gitignore b/.gitignore index 40caefb..67b6ee0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /pypy3-v5.7.0-src.tar.bz2 /pypy3-v5.9.0-src.tar.bz2 /pypy3-v5.10.0-src.tar.bz2 +/pypy3-v5.10.1-src.tar.bz2 diff --git a/012-time-sleep-i686-overflow.patch b/012-time-sleep-i686-overflow.patch deleted file mode 100644 index 7dc6cf3..0000000 --- a/012-time-sleep-i686-overflow.patch +++ /dev/null @@ -1,55 +0,0 @@ -# HG changeset patch -# User Ronan Lamy <ronan.lamy(a)gmail.com> -# Date 1514473067 -3600 -# Branch py3.5 -# Node ID f145d85043878194d7eee33b2049063843e032d8 -# Parent d7d2710e65359e1e8d69e82612cb96f2f3921de7 -Fix issue #2717 - -diff --git a/pypy/interpreter/test/test_timeutils.py b/pypy/interpreter/test/test_timeutils.py -new file mode 100644 -index 0000000..873b2b4 ---- /dev/null -+++ b/pypy/interpreter/test/test_timeutils.py -@@ -0,0 +1,13 @@ -+import pytest -+from rpython.rlib.rarithmetic import r_longlong -+from pypy.interpreter.error import OperationError -+from pypy.interpreter.timeutils import timestamp_w -+ -+def test_timestamp_w(space): -+ w_1_year = space.newint(365 * 24 * 3600) -+ result = timestamp_w(space, w_1_year) -+ assert isinstance(result, r_longlong) -+ assert result // 10 ** 9 == space.int_w(w_1_year) -+ w_millenium = space.mul(w_1_year, space.newint(1000)) -+ with pytest.raises(OperationError): # timestamps overflow after ~300 years -+ timestamp_w(space, w_millenium) -diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py -index 336426b..7918dc8 100644 ---- a/pypy/interpreter/timeutils.py -+++ b/pypy/interpreter/timeutils.py -@@ -3,7 +3,7 @@ Access to the time module's high-resolution monotonic clock - """ - import math - from rpython.rlib.rarithmetic import ( -- r_longlong, ovfcheck, ovfcheck_float_to_longlong) -+ r_longlong, ovfcheck_float_to_longlong) - from pypy.interpreter.error import oefmt - - SECS_TO_NS = 10 ** 9 -@@ -28,10 +28,10 @@ def timestamp_w(space, w_secs): - raise oefmt(space.w_OverflowError, - "timestamp %R too large to convert to C _PyTime_t", w_secs) - else: -- sec = space.int_w(w_secs) - try: -- result = ovfcheck(sec * SECS_TO_NS) -+ sec = space.bigint_w(w_secs).tolonglong() -+ result = sec * r_longlong(SECS_TO_NS) - except OverflowError: - raise oefmt(space.w_OverflowError, -- "timestamp too large to convert to C _PyTime_t") -- return r_longlong(result) -+ "timestamp %R too large to convert to C _PyTime_t", w_secs) -+ return result diff --git a/013-fix-typeerror.patch b/013-fix-typeerror.patch deleted file mode 100644 index 86b0650..0000000 --- a/013-fix-typeerror.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Miro Hrončok <miro(a)hroncok.cz> -# Date 1514415016 0 -# Branch hroncok/fix-typeerror-str-does-not-support-the-b-1514414905375 -# Node ID 0551d04959425ea4a8ff7e87a5d357d03936cde0 -# Parent a4194a67868fa916074416e96456d07d52b1a1a1 -Fix: TypeError: 'str' does not support the buffer interface - -Fixes
https://bitbucket.org/pypy/pypy/issues/2718
- -diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py ---- a/lib_pypy/pyrepl/unix_console.py -+++ b/lib_pypy/pyrepl/unix_console.py -@@ -500,7 +500,7 @@ - os.write(self.output_fd, fmt[:x]) - fmt = fmt[y:] - delay = int(m.group(1)) -- if '*' in m.group(2): -+ if b'*' in m.group(2): - delay *= self.height - if self._pad: - nchars = (bps*delay)/1000 diff --git a/pypy3.spec b/pypy3.spec index dc1aa8e..db72cad 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 -Version: 5.10.0 +Version: 5.10.1 %global pyversion 3.5 -Release: 3%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -158,12 +158,6 @@ Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch -#
https://bitbucket.org/pypy/pypy/issues/2717
-Patch12: 012-time-sleep-i686-overflow.patch - -#
https://bitbucket.org/pypy/pypy/issues/2718
-Patch13: 013-fix-typeerror.patch - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -822,6 +816,10 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jan 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-1 +- Update to 5.10.1 (#1533689) +- Removed two upstreamed patches + * Fri Dec 29 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-3 - Remove never used InstallPyPy function - Actually call execstack as originally intended diff --git a/sources b/sources index d9f03a4..afb3c83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.10.0-src.tar.bz2) = 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b +SHA512 (pypy3-v5.10.1-src.tar.bz2) = 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5 commit 82dcbae2321eac8b49b7e987dfe170bdd2e19c56 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 29 19:50:56 2017 +0100 On power, use cpython2 to build pypy3 diff --git a/pypy3.spec b/pypy3.spec index 50ecfc0..dc1aa8e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -171,10 +171,16 @@ Patch13: 013-fix-typeerror.patch # # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: - # Note, pypy3 is built with pypy2, so no dependency cycle +%ifarch %{power64} +# the build is unreliable with pypy+power, getting random failures +# so better have a bit slower build than having to build until it pass +%global use_self_when_building 0 +%else %global use_self_when_building 1 +%endif + %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 @@ -821,6 +827,7 @@ CheckPyPy %{name}-stackless - Actually call execstack as originally intended - Use execstack on all arches (it's available now) - Don't ship the debug binaries +- On power, use cpython2 to build pypy3 * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) commit 720aa9bae8b7478b99bcb277238fcae6cca364d9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 29 14:12:06 2017 +0100 Remove the debug builds (the package was ~350 MB) Also: - Remove never used InstallPyPy function - Actually call execstack as originally intended - Use execstack on all arches (it's available now) diff --git a/pypy3.spec b/pypy3.spec index 218ec39..50ecfc0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.0 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -224,10 +224,7 @@ BuildRequires: /usr/bin/free BuildRequires: perl-interpreter %endif -# No prelink on these arches -%ifnarch aarch64 ppc64le BuildRequires: /usr/bin/execstack -%endif # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -458,39 +455,6 @@ BuildPyPy \ %install -# Install the various executables: - -InstallPyPy() { - ExeName=$1 - - # To ensure compatibility with virtualenv, pypy finds its libraries - # relative to itself; this happens within - # pypy/translator/goal/app_main.py:get_library_path - # which calls sys.pypy_initial_path(dirname) on the dir containing - # the executable, with symlinks resolved. - # - # Hence we make /usr/bin/pypy be a symlink to the real binary, which we - # place within /usr/lib[64]/pypy-1.* as pypy - # - # This ought to enable our pypy build to work with virtualenv - # (rhbz#742641) - install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{pypyprefix}/$ExeName - ln -s %{pypyprefix}/$ExeName %{buildroot}/%{_bindir} - - # The generated machine code doesn't need an executable stack, but - # one of the assembler files (gcmaptable.s) doesn't have the necessary - # metadata to inform gcc of that, and thus gcc pessimistically assumes - # that the built binary does need an executable stack. - # - # Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
- # - # I tried various approaches involving fixing the build, but the simplest - # approach is to postprocess the ELF file: -%ifnarch aarch64 ppc64le - execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName -%endif -} - mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} @@ -517,6 +481,17 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages +# The generated machine code doesn't need an executable stack, but +# one of the assembler files (gcmaptable.s) doesn't have the necessary +# metadata to inform gcc of that, and thus gcc pessimistically assumes +# that the built binary does need an executable stack. +# +# Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
+# +# I tried various approaches involving fixing the build, but the simplest +# approach is to postprocess the ELF file: +execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 + ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 @@ -666,6 +641,12 @@ rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : +# since 5.10.0, the debug binaries are built and shipped, making the +# pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why +rm -f %{buildroot}%{pypyprefix}/bin/pypy3.debug +rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug + + %check topdir=$(pwd) @@ -835,6 +816,12 @@ CheckPyPy %{name}-stackless %changelog +* Fri Dec 29 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-3 +- Remove never used InstallPyPy function +- Actually call execstack as originally intended +- Use execstack on all arches (it's available now) +- Don't ship the debug binaries + * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) - Use pypy2 when building (it's faster and works this time) commit 9c955b3defcb09be770be0be46c3761fc0185d0b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Dec 28 17:47:00 2017 +0100 Use pypy2 when building (it's faster and works this time) diff --git a/pypy3.spec b/pypy3.spec index dc8c53d..218ec39 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -174,7 +174,7 @@ Patch13: 013-fix-typeerror.patch # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 0 +%global use_self_when_building 1 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 @@ -837,6 +837,7 @@ CheckPyPy %{name}-stackless %changelog * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) +- Use pypy2 when building (it's faster and works this time) * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) commit e858e84bf97e61dd4d1a72466862ac6cb8e57296 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Dec 28 17:45:36 2017 +0100 Fixed upstream issues #2717 and #2718 (re-enable test_socket) diff --git a/012-time-sleep-i686-overflow.patch b/012-time-sleep-i686-overflow.patch new file mode 100644 index 0000000..7dc6cf3 --- /dev/null +++ b/012-time-sleep-i686-overflow.patch @@ -0,0 +1,55 @@ +# HG changeset patch +# User Ronan Lamy <ronan.lamy(a)gmail.com> +# Date 1514473067 -3600 +# Branch py3.5 +# Node ID f145d85043878194d7eee33b2049063843e032d8 +# Parent d7d2710e65359e1e8d69e82612cb96f2f3921de7 +Fix issue #2717 + +diff --git a/pypy/interpreter/test/test_timeutils.py b/pypy/interpreter/test/test_timeutils.py +new file mode 100644 +index 0000000..873b2b4 +--- /dev/null ++++ b/pypy/interpreter/test/test_timeutils.py +@@ -0,0 +1,13 @@ ++import pytest ++from rpython.rlib.rarithmetic import r_longlong ++from pypy.interpreter.error import OperationError ++from pypy.interpreter.timeutils import timestamp_w ++ ++def test_timestamp_w(space): ++ w_1_year = space.newint(365 * 24 * 3600) ++ result = timestamp_w(space, w_1_year) ++ assert isinstance(result, r_longlong) ++ assert result // 10 ** 9 == space.int_w(w_1_year) ++ w_millenium = space.mul(w_1_year, space.newint(1000)) ++ with pytest.raises(OperationError): # timestamps overflow after ~300 years ++ timestamp_w(space, w_millenium) +diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py +index 336426b..7918dc8 100644 +--- a/pypy/interpreter/timeutils.py ++++ b/pypy/interpreter/timeutils.py +@@ -3,7 +3,7 @@ Access to the time module's high-resolution monotonic clock + """ + import math + from rpython.rlib.rarithmetic import ( +- r_longlong, ovfcheck, ovfcheck_float_to_longlong) ++ r_longlong, ovfcheck_float_to_longlong) + from pypy.interpreter.error import oefmt + + SECS_TO_NS = 10 ** 9 +@@ -28,10 +28,10 @@ def timestamp_w(space, w_secs): + raise oefmt(space.w_OverflowError, + "timestamp %R too large to convert to C _PyTime_t", w_secs) + else: +- sec = space.int_w(w_secs) + try: +- result = ovfcheck(sec * SECS_TO_NS) ++ sec = space.bigint_w(w_secs).tolonglong() ++ result = sec * r_longlong(SECS_TO_NS) + except OverflowError: + raise oefmt(space.w_OverflowError, +- "timestamp too large to convert to C _PyTime_t") +- return r_longlong(result) ++ "timestamp %R too large to convert to C _PyTime_t", w_secs) ++ return result diff --git a/013-fix-typeerror.patch b/013-fix-typeerror.patch new file mode 100644 index 0000000..86b0650 --- /dev/null +++ b/013-fix-typeerror.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Miro Hrončok <miro(a)hroncok.cz> +# Date 1514415016 0 +# Branch hroncok/fix-typeerror-str-does-not-support-the-b-1514414905375 +# Node ID 0551d04959425ea4a8ff7e87a5d357d03936cde0 +# Parent a4194a67868fa916074416e96456d07d52b1a1a1 +Fix: TypeError: 'str' does not support the buffer interface + +Fixes
https://bitbucket.org/pypy/pypy/issues/2718
+ +diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py +--- a/lib_pypy/pyrepl/unix_console.py ++++ b/lib_pypy/pyrepl/unix_console.py +@@ -500,7 +500,7 @@ + os.write(self.output_fd, fmt[:x]) + fmt = fmt[y:] + delay = int(m.group(1)) +- if '*' in m.group(2): ++ if b'*' in m.group(2): + delay *= self.height + if self._pad: + nchars = (bps*delay)/1000 diff --git a/pypy3.spec b/pypy3.spec index 6843000..dc8c53d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -158,6 +158,12 @@ Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +#
https://bitbucket.org/pypy/pypy/issues/2717
+Patch12: 012-time-sleep-i686-overflow.patch + +#
https://bitbucket.org/pypy/pypy/issues/2718
+Patch13: 013-fix-typeerror.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -711,12 +717,6 @@ CheckPyPy() { # test_multiprocessing, so skip it for now: SkipTest test_multiprocessing - # the timeout tests are hanging on i686 - # see
https://bitbucket.org/pypy/pypy/issues/2717
- %ifarch %{ix86} - SkipTest test_socket - %endif - echo "== Test names ==" cat testnames.txt echo "=================" @@ -835,6 +835,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 +- Fixed upstream issues #2717 and #2718 (re-enable test_socket) + * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) commit 27657069ff6fedfdeedc1770738261f4662213bd Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Dec 27 15:58:25 2017 +0100 Temporarily skip test_socket on ix86 diff --git a/pypy3.spec b/pypy3.spec index 24d9504..6843000 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -711,6 +711,12 @@ CheckPyPy() { # test_multiprocessing, so skip it for now: SkipTest test_multiprocessing + # the timeout tests are hanging on i686 + # see
https://bitbucket.org/pypy/pypy/issues/2717
+ %ifarch %{ix86} + SkipTest test_socket + %endif + echo "== Test names ==" cat testnames.txt echo "=================" @@ -833,6 +839,7 @@ CheckPyPy %{name}-stackless - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) - Enable JIT on power and s390x +- Temporarily skip test_socket on ix86 * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) commit a6780ec4355a7d2691bf8441b76b77186fb1b22d Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Dec 27 15:57:17 2017 +0100 Enable JIT on power and s390x diff --git a/pypy3.spec b/pypy3.spec index cb0d323..24d9504 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -93,7 +93,7 @@ ExcludeArch: aarch64 # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -%ifarch %{ix86} x86_64 %{arm} +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x %global with_jit 1 %else %global with_jit 0 @@ -832,6 +832,7 @@ CheckPyPy %{name}-stackless * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) +- Enable JIT on power and s390x * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) commit 2b72df539cd5d8839277452408071a8200689b29 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Dec 26 11:56:15 2017 +0100 Update to 5.10 (#1528841) diff --git a/.gitignore b/.gitignore index 602e7b0..40caefb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /pypy3.3-v5.5.0-alpha-src.tar.bz2 /pypy3-v5.7.0-src.tar.bz2 /pypy3-v5.9.0-src.tar.bz2 +/pypy3-v5.10.0-src.tar.bz2 diff --git a/pypy3.spec b/pypy3.spec index 9e9d37a..cb0d323 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,5 +1,5 @@ Name: pypy3 -Version: 5.9.0 +Version: 5.10.0 %global pyversion 3.5 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler @@ -171,7 +171,7 @@ Patch11: 011-no-faulthandler.patch %global use_self_when_building 0 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 -BuildRequires: pypy +BuildRequires: pypy2 # no pypy-pycparser available ATM %global bootstrap_python_interp pypy %else @@ -179,7 +179,7 @@ BuildRequires: pypy # pypy3 can only be build with python2 BuildRequires: python2-devel -BuildRequires: python-pycparser +BuildRequires: python2-pycparser %global bootstrap_python_interp python %endif @@ -829,6 +829,10 @@ CheckPyPy %{name}-stackless %changelog +* Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 +- Update to 5.10 (#1528841) +- Use pypy2 and python2-pycparser (note the twos) + * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) - Remove merged patches diff --git a/sources b/sources index 728ee37..d9f03a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.9.0-src.tar.bz2) = 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd +SHA512 (pypy3-v5.10.0-src.tar.bz2) = 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b commit 6eb88b178404d837b4ff02920550faaacb5cd92e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Oct 20 20:31:31 2017 +0200 Update to 5.9 (#1504427) diff --git a/.gitignore b/.gitignore index 3fcf7b6..602e7b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /pypy3-2.4.0-src.tar.bz2 /pypy3.3-v5.2.0-alpha1-src.tar.bz2 /pypy3.3-v5.5.0-alpha-src.tar.bz2 +/pypy3-v5.7.0-src.tar.bz2 +/pypy3-v5.9.0-src.tar.bz2 diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch deleted file mode 100644 index 58ceb01..0000000 --- a/009-raise-an-error-when-STARTTLS-fails.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4c0f6a6fe6c71009ab4a6b3716e70af021e04904 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Sat, 2 Jul 2016 20:18:12 +0200 -Subject: [PATCH] Raise an error when STARTTLS fails - -CVE-2016-0772 python: smtplib StartTLS stripping attack -rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
-rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
- -Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> -- in changeset 101887:d590114c2394 3.4 --
https://hg.python.org/cpython/rev/d590114c2394
---- - lib-python/3/smtplib.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py -index 57f181b..5656cc6 100755 ---- a/lib-python/3/smtplib.py -+++ b/lib-python/3/smtplib.py -@@ -680,6 +680,11 @@ class SMTP: - self.ehlo_resp = None - self.esmtp_features = {} - self.does_esmtp = 0 -+ else: -+ # RFC 3207: -+ # 501 Syntax error (no parameters allowed) -+ # 454 TLS not available due to temporary reason -+ raise SMTPResponseException(resp, reply) - return (resp, reply) - - def sendmail(self, from_addr, to_addrs, msg, mail_options=[], --- -2.9.0 - diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch deleted file mode 100644 index bed386c..0000000 --- a/010-disabled-HTTP-header-injections-in-http.client.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 9a8db191cf8a3557a24e91081bf434d581b98c5a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Sat, 2 Jul 2016 20:20:58 +0200 -Subject: [PATCH] Disabled HTTP header injections in http.client. - -CVE-2016-5699 python: http protocol steam injection attack -rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
-rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- -Based on an upstream change by Demian Brecht and Serhiy Storchaka -- in changeset 94952:bf3e1c9b80e9 3.4 --
https://hg.python.org/cpython/rev/bf3e1c9b80e9
---- - lib-python/3/http/client.py | 37 +++++++++++++++++++++++++ - lib-python/3/test/test_httplib.py | 57 +++++++++++++++++++++++++++++++++++++++ - 2 files changed, 94 insertions(+) - -diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py -index e05c84d..476d6c8 100644 ---- a/lib-python/3/http/client.py -+++ b/lib-python/3/http/client.py -@@ -70,6 +70,7 @@ import email.parser - import email.message - import io - import os -+import re - import socket - import collections - from urllib.parse import urlsplit -@@ -217,6 +218,34 @@ _MAXLINE = 65536 - _MAXHEADERS = 100 - - -+# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) -+# -+# VCHAR = %x21-7E -+# obs-text = %x80-FF -+# header-field = field-name ":" OWS field-value OWS -+# field-name = token -+# field-value = *( field-content / obs-fold ) -+# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] -+# field-vchar = VCHAR / obs-text -+# -+# obs-fold = CRLF 1*( SP / HTAB ) -+# ; obsolete line folding -+# ; see Section 3.2.4 -+ -+# token = 1*tchar -+# -+# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" -+# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" -+# / DIGIT / ALPHA -+# ; any VCHAR, except delimiters -+# -+# VCHAR defined in
http://tools.ietf.org/html/rfc5234#appendix-B.1
-+ -+# the patterns for both name and value are more leniant than RFC -+# definitions to allow for backwards compatibility -+_is_legal_header_name = re.compile(b'^[^:\s][^:\r\n]*$').match -+_is_illegal_header_value = re.compile(b'\n(?![ \t])|\r(?![ \t\n])').search -+ - class HTTPMessage(email.message.Message): - # XXX The only usage of this method is in - # http.server.CGIHTTPRequestHandler. Maybe move the code there so -@@ -1035,12 +1064,20 @@ class HTTPConnection: - - if hasattr(header, 'encode'): - header = header.encode('ascii') -+ -+ if not _is_legal_header_name(header): -+ raise ValueError('Invalid header name %r' % (header,)) -+ - values = list(values) - for i, one_value in enumerate(values): - if hasattr(one_value, 'encode'): - values[i] = one_value.encode('latin-1') - elif isinstance(one_value, int): - values[i] = str(one_value).encode('ascii') -+ -+ if _is_illegal_header_value(values[i]): -+ raise ValueError('Invalid header value %r' % (values[i],)) -+ - value = b'\r\n\t'.join(values) - header = header + b': ' + value - self._output(header) -diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py -index c8ded92..fd71bea 100644 ---- a/lib-python/3/test/test_httplib.py -+++ b/lib-python/3/test/test_httplib.py -@@ -134,6 +134,33 @@ class HeaderTests(TestCase): - conn.putheader('Content-length', 42) - self.assertIn(b'Content-length: 42', conn._buffer) - -+ conn.putheader('Foo', ' bar ') -+ self.assertIn(b'Foo: bar ', conn._buffer) -+ conn.putheader('Bar', '\tbaz\t') -+ self.assertIn(b'Bar: \tbaz\t', conn._buffer) -+ conn.putheader('Authorization', 'Bearer mytoken') -+ self.assertIn(b'Authorization: Bearer mytoken', conn._buffer) -+ conn.putheader('IterHeader', 'IterA', 'IterB') -+ self.assertIn(b'IterHeader: IterA\r\n\tIterB', conn._buffer) -+ conn.putheader('LatinHeader', b'\xFF') -+ self.assertIn(b'LatinHeader: \xFF', conn._buffer) -+ conn.putheader('Utf8Header', b'\xc3\x80') -+ self.assertIn(b'Utf8Header: \xc3\x80', conn._buffer) -+ conn.putheader('C1-Control', b'next\x85line') -+ self.assertIn(b'C1-Control: next\x85line', conn._buffer) -+ conn.putheader('Embedded-Fold-Space', 'is\r\n allowed') -+ self.assertIn(b'Embedded-Fold-Space: is\r\n allowed', conn._buffer) -+ conn.putheader('Embedded-Fold-Tab', 'is\r\n\tallowed') -+ self.assertIn(b'Embedded-Fold-Tab: is\r\n\tallowed', conn._buffer) -+ conn.putheader('Key Space', 'value') -+ self.assertIn(b'Key Space: value', conn._buffer) -+ conn.putheader('KeySpace ', 'value') -+ self.assertIn(b'KeySpace : value', conn._buffer) -+ conn.putheader(b'Nonbreak\xa0Space', 'value') -+ self.assertIn(b'Nonbreak\xa0Space: value', conn._buffer) -+ conn.putheader(b'\xa0NonbreakSpace', 'value') -+ self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer) -+ - def test_ipv6host_header(self): - # Default host header on IPv6 transaction should wrapped by [] if - # its actual IPv6 address -@@ -153,6 +180,36 @@ class HeaderTests(TestCase): - conn.request('GET', '/foo') - self.assertTrue(sock.data.startswith(expected)) - -+ def test_invalid_headers(self): -+ conn = client.HTTPConnection('
example.com
') -+ conn.sock = FakeSocket('') -+ conn.putrequest('GET', '/') -+ -+ #
http://tools.ietf.org/html/rfc7230#section-3.2.4
, whitespace is no -+ # longer allowed in header names -+ cases = ( -+ (b'Invalid\r\nName', b'ValidValue'), -+ (b'Invalid\rName', b'ValidValue'), -+ (b'Invalid\nName', b'ValidValue'), -+ (b'\r\nInvalidName', b'ValidValue'), -+ (b'\rInvalidName', b'ValidValue'), -+ (b'\nInvalidName', b'ValidValue'), -+ (b' InvalidName', b'ValidValue'), -+ (b'\tInvalidName', b'ValidValue'), -+ (b'Invalid:Name', b'ValidValue'), -+ (b':InvalidName', b'ValidValue'), -+ (b'ValidName', b'Invalid\r\nValue'), -+ (b'ValidName', b'Invalid\rValue'), -+ (b'ValidName', b'Invalid\nValue'), -+ (b'ValidName', b'InvalidValue\r\n'), -+ (b'ValidName', b'InvalidValue\r'), -+ (b'ValidName', b'InvalidValue\n'), -+ ) -+ for name, value in cases: -+ with self.subTest((name, value)): -+ with self.assertRaisesRegex(ValueError, 'Invalid header'): -+ conn.putheader(name, value) -+ - - class BasicTest(TestCase): - def test_status_lines(self): --- -2.9.0 - diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index f0154eb..f96d232 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -1,30 +1,37 @@ -diff --git pypy3-v5.5.0-src/lib-python/3/test/regrtest.py pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new -index 8d18a9297a..e99322ebe1 100755 ---- pypy3-v5.5.0-src/lib-python/3/test/regrtest.py -+++ pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new -@@ -169,7 +169,6 @@ option '-uall,-gui'. - import importlib +commit ea4d6a12548eea7ce0424feea13a499fb7085e96 +Author: rpm-build <rpm-build> +Date: Wed Mar 29 04:31:55 2017 +0200 + + 011-no-faulthandler.patch + +diff --git a/lib-python/3/test/regrtest.py b/lib-python/3/test/regrtest.py +index c1d85f6..3d3072c 100755 +--- a/lib-python/3/test/regrtest.py ++++ b/lib-python/3/test/regrtest.py +@@ -124,7 +124,6 @@ import importlib + import argparse import builtins -import faulthandler - import getopt import io import json -@@ -197,6 +196,10 @@ try: - import multiprocessing.process + import locale +@@ -152,7 +151,10 @@ try: + import _multiprocessing, multiprocessing.process except ImportError: multiprocessing = None +- +try: + import faulthandler +except ImportError: + faulthandler = None - # Some times __path__ and __file__ are not absolute (e.g. while running from -@@ -283,17 +286,18 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, + # Lib/) and, if we change the CWD to run the tests in a temporary dir, some +@@ -486,17 +488,18 @@ def main(tests=None, **kwargs): + directly to set the values that would normally be set by flags on the command line. """ - - # Display the Python traceback on fatal errors (e.g. segfault) - faulthandler.enable(all_threads=True) - @@ -51,3 +58,37 @@ index 8d18a9297a..e99322ebe1 100755 replace_stdout() +diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py +index 5d7f308..4424637 100644 +--- a/lib-python/3/test/support/__init__.py ++++ b/lib-python/3/test/support/__init__.py +@@ -6,7 +6,6 @@ if __name__ != 'test.support': + import collections.abc + import contextlib + import errno +-import faulthandler + import fnmatch + import functools + import gc +@@ -65,6 +64,11 @@ try: + except ImportError: + resource = None + ++try: ++ import faulthandler ++except ImportError: ++ faulthandler = None ++ + __all__ = [ + # globals + "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", +@@ -2060,7 +2064,8 @@ def start_threads(threads, unlock=None): + finally: + started = [t for t in started if t.isAlive()] + if started: +- faulthandler.dump_traceback(sys.stdout) ++ if faulthandler is not None: ++ faulthandler.dump_traceback(sys.stdout) + raise AssertionError('Unable to join %d threads' % len(started)) + + @contextlib.contextmanager diff --git a/pypy3.spec b/pypy3.spec index f878bb2..9e9d37a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,7 @@ Name: pypy3 -Version: 5.5.0 -Release: 6%{?dist} +Version: 5.9.0 +%global pyversion 3.5 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -131,7 +132,7 @@ ExcludeArch: aarch64 %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v%{version}-alpha-src.tar…
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-v%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -141,36 +142,21 @@ Source2: macros.pypy3 # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch0: 001-nevertty.patch +Patch1: 001-nevertty.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler # and linker are captured: -Patch1: 006-always-log-stdout.patch +Patch6: 006-always-log-stdout.patch # Disable the printing of a quote from IRC on startup (these are stored in # ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could # cause confusion for end-users (and many are in-jokes within the PyPy # community that won't make sense outside of it). [Sorry to be a killjoy] -Patch2: 007-remove-startup-message.patch - - -# CVE-2016-0772 python: smtplib StartTLS stripping attack -# rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
-# rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
-# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/d590114c2394
-# Raise an error when STARTTLS fails -Patch4: 009-raise-an-error-when-STARTTLS-fails.patch - -# CVE-2016-5699 python: http protocol steam injection attack -# rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
-# rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
-# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
-# Disabled HTTP header injections in http.client -Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch +Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler -Patch6: 011-no-faulthandler.patch +Patch11: 011-no-faulthandler.patch # Build-time requirements: @@ -186,12 +172,14 @@ Patch6: 011-no-faulthandler.patch %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy +# no pypy-pycparser available ATM %global bootstrap_python_interp pypy %else # pypy3 can only be build with python2 BuildRequires: python2-devel +BuildRequires: python-pycparser %global bootstrap_python_interp python %endif @@ -523,8 +511,9 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages -ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 -ln -s pypy3.3 %{buildroot}/%{_bindir}/pypy3 +ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} +ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} +ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -790,10 +779,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy-c +CheckPyPy %{name}-c %if 0%{with_stackless} -CheckPyPy pypy3-stackless +CheckPyPy %{name}-stackless %endif %endif # run_selftests @@ -821,7 +810,7 @@ CheckPyPy pypy3-stackless %license LICENSE %doc README.rst %{_bindir}/pypy3 -%{_bindir}/pypy3.3 +%{_bindir}/pypy%{pyversion} %{pypyprefix}/bin/ %exclude %{_libdir}/%{name}-%{version}.tar.bz2 @@ -840,6 +829,13 @@ CheckPyPy pypy3-stackless %changelog +* Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 +- Update to 5.9 (#1504427) +- Remove merged patches +- Reindex the patches to match the filenames +- Rebase the faulthandler Patch11 +- BR python-pycparser + * Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-6 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/sources b/sources index 5155d51..728ee37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -536008fd7b17af8878915393fc1ecfc3 pypy3.3-v5.5.0-alpha-src.tar.bz2 +SHA512 (pypy3-v5.9.0-src.tar.bz2) = 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd commit 79816c5293727d3eb45debfb1ba42e5bc8b3db29 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Aug 3 06:35:52 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 6997965..f878bb2 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-6 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+ * Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
commit aebba1447fc82a76bc6e7102083198e340d076bd Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Jul 27 09:23:17 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 73f75d3..6997965 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+ * Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
commit 717803cfa0815090a04163482c395a46dced8f02 Author: Petr Písař <ppisar(a)redhat.com> Date: Wed Jul 12 14:43:49 2017 +0200 perl dependency renamed to perl-interpreter <
https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules
> diff --git a/pypy3.spec b/pypy3.spec index c74d495..73f75d3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -227,7 +227,7 @@ BuildRequires: time BuildRequires: /usr/bin/free # For use in the selftests, for imposing a per-test timeout: -BuildRequires: perl +BuildRequires: perl-interpreter %endif # No prelink on these arches commit 51ae82f0cce74a6fb047e40d45173c75bffc41f9 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Feb 11 08:09:09 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 5598133..c74d495 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+ * Sun Nov 13 2016 Dan Horák <dan[at]danny.cz> - 5.5.0-3 - set z10 as the base CPU for s390(x) build commit b929faae35b08942da1a1d1d994b26e3400f48c3 Author: Dan Horák <dan(a)danny.cz> Date: Sun Nov 13 09:22:11 2016 +0100 - set z10 as the base CPU for s390(x) build diff --git a/pypy3.spec b/pypy3.spec index 903acb9..5598133 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -316,6 +316,11 @@ find lib-python/%{pylibver} -name "*.py" -exec \ %endif %build +%ifarch s390 s390x +# pypy3 requires z10 at least +%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /') +%endif + # Top memory usage is about 4.5GB on arm7hf free @@ -835,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Sun Nov 13 2016 Dan Horák <dan[at]danny.cz> - 5.5.0-3 +- set z10 as the base CPU for s390(x) build + * Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 5.5.0-2 - Also build on arm and s390* commit 404c37f2ddb3343127726d561cd86b1a6488cd7f Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 09:29:11 2016 -0500 Restore renaming of pypytrace-mode to pypy3trace-mode diff --git a/pypy3.spec b/pypy3.spec index 837273b..903acb9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -650,8 +650,9 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} -install -m0644 -p -D -t %{buildroot}/%{_emacs_sitelispdir} \ - rpython/jit/tool/pypytrace-mode.{el,elc} +mkdir -p %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: commit 91071982692c6dd8da9894e3180cd7bb5b4d290e Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 08:10:01 2016 -0500 It turns out ppc has no gold So use gold on arm/i686/amd64 only. diff --git a/pypy3.spec b/pypy3.spec index 16d5f46..837273b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -311,7 +311,9 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; -sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py +%ifarch %{ix86} x86_64 %{arm} + sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py +%endif %build # Top memory usage is about 4.5GB on arm7hf commit ad0d37c683891eaf084a84e4a9f2205ce3c5585b Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 06:51:54 2016 -0500 Also build on arm and s390* diff --git a/pypy3.spec b/pypy3.spec index b6e6d0b..16d5f46 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -11,7 +11,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 armv7hl s390 s390x +ExcludeArch: aarch64 # High-level configuration of the build: @@ -311,7 +311,10 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; +sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py + %build +# Top memory usage is about 4.5GB on arm7hf free BuildPyPy() { @@ -829,6 +832,9 @@ CheckPyPy pypy3-stackless %changelog +* Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 5.5.0-2 +- Also build on arm and s390* + * Sat Oct 15 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.5.0-1 - PyPy 3.3 5.5.0 - On Fedora 26+, BR compat-openssl10-devel commit 37fe95796cc55f2af8290bf78c32226b2ac09fc3 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 06:51:35 2016 -0500 Make the spec file a tiny bit shorter diff --git a/pypy3.spec b/pypy3.spec index 0245be9..b6e6d0b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -260,7 +260,6 @@ CPU architecture. %package libs -Group: Development/Languages Summary: Run-time libraries used by PyPy implementations of Python 3 # We supply an emacs mode for the JIT viewer. @@ -274,7 +273,6 @@ Libraries required by the various PyPy implementations of Python 3. %package devel -Group: Development/Languages Summary: Development tools for working with PyPy3 Requires: pypy3%{?_isa} = %{version}-%{release} @@ -284,7 +282,6 @@ Header files for building C extension modules against PyPy3 %if 0%{with_stackless} %package stackless -Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless @@ -516,8 +513,8 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages -ln -s %{pypyprefix}/bin/pypy3 %{buildroot}/%{_bindir}/pypy3 ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 +ln -s pypy3.3 %{buildroot}/%{_bindir}/pypy3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -648,19 +645,17 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} -mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +install -m0644 -p -D -t %{buildroot}/%{_emacs_sitelispdir} \ + rpython/jit/tool/pypytrace-mode.{el,elc} %endif # Install macros for rpm: -mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d -install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d +install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 -rm -f %{buildroot}%{pypyprefix}/LICENSE -rm -f %{buildroot}%{pypyprefix}/README.rst +rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ + %{buildroot}%{pypyprefix}/LICENSE \ + %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : commit 6b002d36f3cb6a967ccf98fb1e66330fdd7dda09 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 15:32:20 2016 -0500 Also exclude armv7hl Build generates a lot of warnings and errors, and fails despite having 4GB RAM + 4GB swap available. The error is /usr/bin/ld: failed to set dynamic section sizes: Memory exhausted collect2: error: ld returned 1 exit status but this might be caused by the earlier errors. diff --git a/pypy3.spec b/pypy3.spec index d6bb1dd..0245be9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -3,7 +3,6 @@ Version: 5.5.0 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler -Group: Development/Languages # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new @@ -12,7 +11,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 armv7hl s390 s390x # High-level configuration of the build: commit 0b4deeff51596dd2f8ec1b9ced18caa60f6ddaa0 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 07:57:41 2016 -0500 Add BR for free diff --git a/pypy3.spec b/pypy3.spec index 3c5f5c5..d6bb1dd 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -225,6 +225,7 @@ BuildRequires: gc-devel # For use in the selftests, for recording stats: BuildRequires: time +BuildRequires: /usr/bin/free # For use in the selftests, for imposing a per-test timeout: BuildRequires: perl commit 56984a45242e2ed09394b206e3cda14aef15fafa Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 07:50:10 2016 -0500 Print the amount of available memory diff --git a/pypy3.spec b/pypy3.spec index 934a434..3c5f5c5 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -315,6 +315,7 @@ find lib-python/%{pylibver} -name "*.py" -exec \ \; %build +free BuildPyPy() { ExeName=$1 commit 693a83b0c291b9c876f08bdc5e81c6718bf71929 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Mon Nov 7 23:43:54 2016 -0500 Add a hack to fix tests, and restore building on ppc* I didn't test ppc64le yet, but at least ppc64 builds fine with the kludge. diff --git a/pypy3.spec b/pypy3.spec index 0c266d0..934a434 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,7 +12,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x ppc64le ppc64 +ExcludeArch: aarch64 s390 s390x # High-level configuration of the build: @@ -661,6 +661,9 @@ rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 rm -f %{buildroot}%{pypyprefix}/LICENSE rm -f %{buildroot}%{pypyprefix}/README.rst +# wtf? This is probably masking some bigger problem, but let's do this for now +mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : + %check topdir=$(pwd) commit 817c77d554b6dd380fd335a29c43dce88ba052a5 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Thu Nov 3 18:42:18 2016 -0400 Also exclude ppc64* The tests are failing (looks like pypy wasn't tested on ppc64 at all), and I cannot solve this without access to the hardware. diff --git a/pypy3.spec b/pypy3.spec index d826142..0c266d0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,7 +12,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 s390 s390x ppc64le ppc64 # High-level configuration of the build: commit aa6a9d04d6a20b99222a9e8db25a1e669ccc7eb4 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Thu Nov 3 14:49:28 2016 -0400 PPC64 has no faulthandler diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch new file mode 100644 index 0000000..f0154eb --- /dev/null +++ b/011-no-faulthandler.patch @@ -0,0 +1,53 @@ +diff --git pypy3-v5.5.0-src/lib-python/3/test/regrtest.py pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +index 8d18a9297a..e99322ebe1 100755 +--- pypy3-v5.5.0-src/lib-python/3/test/regrtest.py ++++ pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +@@ -169,7 +169,6 @@ option '-uall,-gui'. + import importlib + + import builtins +-import faulthandler + import getopt + import io + import json +@@ -197,6 +196,10 @@ try: + import multiprocessing.process + except ImportError: + multiprocessing = None ++try: ++ import faulthandler ++except ImportError: ++ faulthandler = None + + + # Some times __path__ and __file__ are not absolute (e.g. while running from +@@ -283,17 +286,18 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, + on the command line. + """ + +- # Display the Python traceback on fatal errors (e.g. segfault) +- faulthandler.enable(all_threads=True) +- +- # Display the Python traceback on SIGALRM or SIGUSR1 signal +- signals = [] +- if hasattr(signal, 'SIGALRM'): +- signals.append(signal.SIGALRM) +- if hasattr(signal, 'SIGUSR1'): +- signals.append(signal.SIGUSR1) +- for signum in signals: +- faulthandler.register(signum, chain=True) ++ if faulthandler: ++ # Display the Python traceback on fatal errors (e.g. segfault) ++ faulthandler.enable(all_threads=True) ++ ++ # Display the Python traceback on SIGALRM or SIGUSR1 signal ++ signals = [] ++ if hasattr(signal, 'SIGALRM'): ++ signals.append(signal.SIGALRM) ++ if hasattr(signal, 'SIGUSR1'): ++ signals.append(signal.SIGUSR1) ++ for signum in signals: ++ faulthandler.register(signum, chain=True) + + replace_stdout() + diff --git a/pypy3.spec b/pypy3.spec index ea45edf..d826142 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -170,6 +170,9 @@ Patch4: 009-raise-an-error-when-STARTTLS-fails.patch # Disabled HTTP header injections in http.client Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch +# It seems ppc64 has no faulthandler +Patch6: 011-no-faulthandler.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so commit 347fb465b0fc7717f6e6b171b895c0c01f6d77a3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:52:20 2016 +0200 Exclude not available arches diff --git a/pypy3.spec b/pypy3.spec index 8652182..ea45edf 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -11,6 +11,9 @@ Group: Development/Languages License: MIT and Python and UCD URL:
http://pypy.org/
+# Not available yet +ExcludeArch: aarch64 s390 s390x + # High-level configuration of the build: # PyPy consists of an implementation of an interpreter (with JIT compilation) commit c12d8bfa0bbfd60c56c641dbe8d522681f3d35cf Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:17:55 2016 +0200 Sources for 347975d diff --git a/.gitignore b/.gitignore index 60f26ec..3fcf7b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pypy3-2.4.0-src.tar.bz2 /pypy3.3-v5.2.0-alpha1-src.tar.bz2 +/pypy3.3-v5.5.0-alpha-src.tar.bz2 diff --git a/sources b/sources index 0e4fa7b..5155d51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e4bbd6fe42481a17f705611d76914eda pypy3.3-v5.2.0-alpha1-src.tar.bz2 +536008fd7b17af8878915393fc1ecfc3 pypy3.3-v5.5.0-alpha-src.tar.bz2 commit 347975dbf4523b2a8636ff70c59a5b537b9b4375 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:11:41 2016 +0200 PyPy 3.3 5.5.0 diff --git a/pypy3.spec b/pypy3.spec index 67819c7..8652182 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 -Version: 5.2.0 -Release: 0.1.alpha1%{?dist} +Version: 5.5.0 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -129,7 +129,7 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v%{version}-alpha-src.tar…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -201,13 +201,18 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif +%if 0%{?fedora} >= 26 +BuildRequires: compat-openssl10-devel +%else +BuildRequires: openssl-devel +%endif + %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -281,7 +286,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3.3-v5.2.0-alpha1-src -p1 -S git +%autosetup -n pypy3-v%{version}-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -803,6 +808,8 @@ CheckPyPy pypy3-stackless %{_bindir}/pypy3.3 %{pypyprefix}/bin/ +%exclude %{_libdir}/%{name}-%{version}.tar.bz2 + %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h @@ -817,6 +824,10 @@ CheckPyPy pypy3-stackless %changelog +* Sat Oct 15 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.5.0-1 +- PyPy 3.3 5.5.0 +- On Fedora 26+, BR compat-openssl10-devel + * Sat Jul 02 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.2.0-0.1.alpha1 - First alpha build of PyPy 3.3 commit 343676a8999d3e5b141b58ec6c9d8e167304ed9f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 8 14:38:18 2016 +0200 First alpha build of PyPy 3.3 diff --git a/.gitignore b/.gitignore index c9f3d9d..60f26ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pypy3-2.4.0-src.tar.bz2 +/pypy3.3-v5.2.0-alpha1-src.tar.bz2 diff --git a/001-nevertty.patch b/001-nevertty.patch new file mode 100644 index 0000000..b1db988 --- /dev/null +++ b/001-nevertty.patch @@ -0,0 +1,13 @@ +diff --git a/rpython/tool/ansi_print.py b/rpython/tool/ansi_print.py +index bfa40be..29dd332 100644 +--- a/rpython/tool/ansi_print.py ++++ b/rpython/tool/ansi_print.py +@@ -7,7 +7,7 @@ from py.io import ansi_print + from rpython.tool.ansi_mandelbrot import Driver + + +-isatty = getattr(sys.stderr, 'isatty', lambda: False) ++isatty = lambda: False + mandelbrot_driver = Driver() + wrote_dot = False # global shared state + diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch index 5d49335..0635200 100644 --- a/006-always-log-stdout.patch +++ b/006-always-log-stdout.patch @@ -1,7 +1,8 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py ---- pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:35:37.680237338 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:41:04.113098738 +0200 -@@ -138,6 +138,8 @@ class Platform(object): +diff --git a/rpython/translator/platform/__init__.py b/rpython/translator/platform/__init__.py +index 051668b..6e59acc 100644 +--- a/rpython/translator/platform/__init__.py ++++ b/rpython/translator/platform/__init__.py +@@ -140,6 +140,8 @@ class Platform(object): self._handle_error(returncode, stdout, stderr, outname) def _handle_error(self, returncode, stdout, stderr, outname): diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index 2ff9068..9654d1c 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -1,12 +1,24 @@ -diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py ---- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 -+++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 -@@ -4,7 +4,7 @@ import sys - irc_header = "And now for something completely different" - - --def interactive_console(mainmodule=None, quiet=False): -+def interactive_console(mainmodule=None, quiet=True): - # set sys.{ps1,ps2} just before invoking the interactive interpreter. This - # mimics what CPython does in pythonrun.c - if not hasattr(sys, 'ps1'): +diff --git a/lib_pypy/_pypy_interact.py b/lib_pypy/_pypy_interact.py +index 9542f54..5e44fb4 100644 +--- a/lib_pypy/_pypy_interact.py ++++ b/lib_pypy/_pypy_interact.py +@@ -13,19 +13,6 @@ def interactive_console(mainmodule=None, quiet=False): + sys.ps1 = '>>>> ' + if not hasattr(sys, 'ps2'): + sys.ps2 = '.... ' +- # +- if not quiet: +- try: +- from _pypy_irc_topic import some_topic +- text = "%s: ``%s''" % ( irc_header, some_topic()) +- while len(text) >= 80: +- i = text[:80].rfind(' ') +- print(text[:i]) +- text = text[i+1:] +- print(text) +- except ImportError: +- pass +- # + run_interactive = run_simple_interactive_console + try: + if not os.isatty(sys.stdin.fileno()): diff --git a/008-maximum-recursion-depth.patch b/008-maximum-recursion-depth.patch deleted file mode 100644 index 6d3d157..0000000 --- a/008-maximum-recursion-depth.patch +++ /dev/null @@ -1,179 +0,0 @@ -diff --git a/rpython/jit/metainterp/blackhole.py b/rpython/jit/metainterp/blackhole.py -index 9b14943..b9d1c4c 100644 ---- a/rpython/jit/metainterp/blackhole.py -+++ b/rpython/jit/metainterp/blackhole.py -@@ -1052,35 +1052,45 @@ class BlackholeInterpreter(object): - - @arguments("cpu", "i", "R", "d", returns="i") - def bhimpl_residual_call_r_i(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, None, args_r, None, calldescr) - @arguments("cpu", "i", "R", "d", returns="r") - def bhimpl_residual_call_r_r(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, None, args_r, None, calldescr) - @arguments("cpu", "i", "R", "d") - def bhimpl_residual_call_r_v(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, None, args_r, None, calldescr) - - @arguments("cpu", "i", "I", "R", "d", returns="i") - def bhimpl_residual_call_ir_i(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, args_i, args_r, None, calldescr) - @arguments("cpu", "i", "I", "R", "d", returns="r") - def bhimpl_residual_call_ir_r(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, args_i, args_r, None, calldescr) - @arguments("cpu", "i", "I", "R", "d") - def bhimpl_residual_call_ir_v(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, args_i, args_r, None, calldescr) - - @arguments("cpu", "i", "I", "R", "F", "d", returns="i") - def bhimpl_residual_call_irf_i(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d", returns="r") - def bhimpl_residual_call_irf_r(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d", returns="f") - def bhimpl_residual_call_irf_f(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_f(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d") - def bhimpl_residual_call_irf_v(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, args_i, args_r, args_f, calldescr) - - # conditional calls - note that they cannot return stuff -@@ -1108,44 +1118,54 @@ class BlackholeInterpreter(object): - - @arguments("cpu", "j", "R", returns="i") - def bhimpl_inline_call_r_i(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "R", returns="r") - def bhimpl_inline_call_r_r(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "R") - def bhimpl_inline_call_r_v(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - - @arguments("cpu", "j", "I", "R", returns="i") - def bhimpl_inline_call_ir_i(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", returns="r") - def bhimpl_inline_call_ir_r(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "I", "R") - def bhimpl_inline_call_ir_v(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - - @arguments("cpu", "j", "I", "R", "F", returns="i") - def bhimpl_inline_call_irf_i(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F", returns="r") - def bhimpl_inline_call_irf_r(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F", returns="f") - def bhimpl_inline_call_irf_f(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_f(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F") - def bhimpl_inline_call_irf_v(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - -@@ -1438,6 +1458,8 @@ class BlackholeInterpreter(object): - if not self.nextblackholeinterp: - self._exit_frame_with_exception(current_exc) - return current_exc -+ finally: -+ workaround2200.active = False - # - # pass the frame's return value to the caller - caller = self.nextblackholeinterp -@@ -1656,3 +1678,10 @@ def convert_and_run_from_pyjitpl(metainterp, raising_exception=False): - current_exc = lltype.nullptr(rclass.OBJECTPTR.TO) - # - _run_forever(firstbh, current_exc) -+ -+# ____________________________________________________________ -+ -+class WorkaroundIssue2200(object): -+ pass -+workaround2200 = WorkaroundIssue2200() -+workaround2200.active = False -diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py -index ad81456..c820185 100644 ---- a/rpython/jit/metainterp/test/test_ajit.py -+++ b/rpython/jit/metainterp/test/test_ajit.py -@@ -4044,3 +4044,30 @@ class TestLLtype(BaseLLtypeTests, LLJitMixin): - res = self.interp_operations(f, [17]) - assert res == 42 - self.check_operations_history(guard_true=1, guard_false=0) -+ -+ def test_issue2200_recursion(self): -+ # Reproduces issue #2200. This test contains no recursion, -+ # but due to an unlikely combination of factors it ends up -+ # creating an RPython-level recursion, one per loop iteration. -+ # The recursion is: blackhole interp from the failing guard -> -+ # does the call to enter() as a normal call -> enter() runs -+ # can_enter_jit() as if we're interpreted -> we enter the JIT -+ # again from the start of the loop -> the guard fails again -+ # during the next iteration -> blackhole interp. All arrows -+ # in the previous sentence are one or more levels of RPython -+ # function calls. -+ driver = JitDriver(greens=[], reds=["i"]) -+ def enter(i): -+ driver.can_enter_jit(i=i) -+ def f(): -+ set_param(None, 'trace_eagerness', 999999) -+ i = 0 -+ while True: -+ driver.jit_merge_point(i=i) -+ i += 1 -+ if i >= 300: -+ return i -+ promote(i + 1) # a failing guard -+ enter(i) -+ -+ self.meta_interp(f, []) -diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py -index 805933e..ca47f03 100644 ---- a/rpython/jit/metainterp/warmstate.py -+++ b/rpython/jit/metainterp/warmstate.py -@@ -405,6 +405,14 @@ class WarmEnterState(object): - bound_reached(hash, None, *args) - return - -+ # Workaround for issue #2200, maybe temporary. This is not -+ # a proper fix, but only a hack that should work well enough -+ # for PyPy's main jitdriver... See test_issue2200_recursion -+ from rpython.jit.metainterp.blackhole import workaround2200 -+ if workaround2200.active: -+ workaround2200.active = False -+ return -+ - # Here, we have found 'cell'. - # - if cell.flags & (JC_TRACING | JC_TEMPORARY): diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch index ba1cc53..58ceb01 100644 --- a/009-raise-an-error-when-STARTTLS-fails.patch +++ b/009-raise-an-error-when-STARTTLS-fails.patch @@ -1,6 +1,6 @@ -From 9092f6266c3054befff053aa943632856cedbdba Mon Sep 17 00:00:00 2001 +From 4c0f6a6fe6c71009ab4a6b3716e70af021e04904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Fri, 1 Jul 2016 11:42:53 +0200 +Date: Sat, 2 Jul 2016 20:18:12 +0200 Subject: [PATCH] Raise an error when STARTTLS fails CVE-2016-0772 python: smtplib StartTLS stripping attack @@ -15,10 +15,10 @@ Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> 1 file changed, 5 insertions(+) diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py -index 679e478..1aacfaf 100644 +index 57f181b..5656cc6 100755 --- a/lib-python/3/smtplib.py +++ b/lib-python/3/smtplib.py -@@ -666,6 +666,11 @@ class SMTP: +@@ -680,6 +680,11 @@ class SMTP: self.ehlo_resp = None self.esmtp_features = {} self.does_esmtp = 0 diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch index 10591d5..bed386c 100644 --- a/010-disabled-HTTP-header-injections-in-http.client.patch +++ b/010-disabled-HTTP-header-injections-in-http.client.patch @@ -1,6 +1,6 @@ -From 82dc922c7c4771ef789f5b395f54a603c693b05e Mon Sep 17 00:00:00 2001 +From 9a8db191cf8a3557a24e91081bf434d581b98c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Fri, 1 Jul 2016 13:08:55 +0200 +Date: Sat, 2 Jul 2016 20:20:58 +0200 Subject: [PATCH] Disabled HTTP header injections in http.client. CVE-2016-5699 python: http protocol steam injection attack @@ -16,7 +16,7 @@ Based on an upstream change by Demian Brecht and Serhiy Storchaka 2 files changed, 94 insertions(+) diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py -index 5466d06..1d215d8 100644 +index e05c84d..476d6c8 100644 --- a/lib-python/3/http/client.py +++ b/lib-python/3/http/client.py @@ -70,6 +70,7 @@ import email.parser @@ -27,9 +27,9 @@ index 5466d06..1d215d8 100644 import socket import collections from urllib.parse import urlsplit -@@ -207,6 +208,34 @@ MAXAMOUNT = 1048576 - # maximal line length when calling readline(). - _MAXLINE = 65536 +@@ -217,6 +218,34 @@ _MAXLINE = 65536 + _MAXHEADERS = 100 + +# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) +# @@ -62,7 +62,7 @@ index 5466d06..1d215d8 100644 class HTTPMessage(email.message.Message): # XXX The only usage of this method is in # http.server.CGIHTTPRequestHandler. Maybe move the code there so -@@ -953,12 +982,20 @@ class HTTPConnection: +@@ -1035,12 +1064,20 @@ class HTTPConnection: if hasattr(header, 'encode'): header = header.encode('ascii') @@ -73,7 +73,7 @@ index 5466d06..1d215d8 100644 values = list(values) for i, one_value in enumerate(values): if hasattr(one_value, 'encode'): - values[i] = one_value.encode('latin1') + values[i] = one_value.encode('latin-1') elif isinstance(one_value, int): values[i] = str(one_value).encode('ascii') + @@ -84,12 +84,12 @@ index 5466d06..1d215d8 100644 header = header + b': ' + value self._output(header) diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py -index 420302c..31d3bd0 100644 +index c8ded92..fd71bea 100644 --- a/lib-python/3/test/test_httplib.py +++ b/lib-python/3/test/test_httplib.py @@ -134,6 +134,33 @@ class HeaderTests(TestCase): conn.putheader('Content-length', 42) - self.assertTrue(b'Content-length: 42' in conn._buffer) + self.assertIn(b'Content-length: 42', conn._buffer) + conn.putheader('Foo', ' bar ') + self.assertIn(b'Foo: bar ', conn._buffer) diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch deleted file mode 100644 index c97eaf3..0000000 --- a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py ---- pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-27 10:35:37.648237156 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-28 10:15:58.200426205 +0200 -@@ -25,7 +25,7 @@ class AnsiLog: - self.kw_to_color = self.KW_TO_COLOR.copy() - self.kw_to_color.update(kw_to_color) - self.file = file -- self.fancy = True -+ self.fancy = False - self.isatty = getattr(sys.stderr, 'isatty', lambda: False) - if self.fancy and self.isatty(): - self.mandelbrot_driver = Driver() diff --git a/pypy3.spec b/pypy3.spec index 5666e56..67819c7 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 -Version: 2.4.0 -Release: 6%{?dist} +Version: 5.2.0 +Release: 0.1.alpha1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -116,7 +116,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/%{name}-%{version} +%global pypyprefix %{_libdir}/pypy3-%{version} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -129,17 +129,17 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/%{name}-%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.%{name} +Source2: macros.pypy3 # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch0: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +Patch0: 001-nevertty.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler @@ -152,9 +152,6 @@ Patch1: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch2: 007-remove-startup-message.patch -#
https://bugzilla.redhat.com/show_bug.cgi?id=1307889
-#
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
-Patch3: 008-maximum-recursion-depth.patch # CVE-2016-0772 python: smtplib StartTLS stripping attack # rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
@@ -180,7 +177,7 @@ Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 1 +%global use_self_when_building 0 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy @@ -205,6 +202,8 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel +BuildRequires: gdbm-devel +BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif @@ -234,7 +233,7 @@ BuildRequires: emacs BuildRequires: git # Metadata for the core package (the JIT build): -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -266,7 +265,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pypy3%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -276,13 +275,13 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n %{name}-%{version}-src -p1 -S git +%autosetup -n pypy3.3-v5.2.0-alpha1-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -304,20 +303,6 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; -# Hacky fix to allow the curses module to build on x86_64; otherwise we get: -# cffi.ffiplatform.VerificationError: anonymous MEVENT: wrong total size -# (we have 24, but C compiler says 20) -#
https://github.com/archlinuxcn/repo/commit/560a75090333b6de8a1de960acac5e62…
-%ifarch x86_64 - _type=unsigned -%else - _type=uint32_t -%endif - -sed -i -e "s/typedef unsigned long mmask_t/typedef $_type mmask_t/" \ - -e "s/typedef unsigned long chtype/typedef $_type chtype/" \ - lib_pypy/_curses.py - %build BuildPyPy() { @@ -379,8 +364,7 @@ BuildPyPy() { # of root pointers: %global gcrootfinder_options --gcrootfinder=shadowstack - # Prevent memory exhaustion - export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-g//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS") %else # Go with the default, which is "asmgcc" @@ -399,7 +383,7 @@ BuildPyPy() { # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//' -e 's/-g//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') %endif @@ -425,7 +409,6 @@ BuildPyPy() { PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ $INTERP ../../rpython/bin/rpython \ - --output=$ExeName \ %{gcrootfinder_options} \ $Options \ targetpypystandalone @@ -442,7 +425,7 @@ BuildPyPy() { } BuildPyPy \ - %{name} \ + pypy3 \ %if 0%{with_jit} "-Ojit" \ %else @@ -452,7 +435,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - %{name}-stackless \ + pypy3-stackless \ "--stackless" %endif @@ -498,35 +481,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy %{name} - -%if 0%{with_stackless} -InstallPyPy %{name}-stackless -%endif - -# Install the various support libraries as described at: -#
http://codespeak.net/pypy/dist/pypy/doc/getting-started-python.html#install…
-# which refers to a "PREFIX" found relative to the location of the binary. -# Given that the pypy binaries will be in /usr/bin, PREFIX can be -# "../share/pypy-1.2" relative to that directory, i.e. /usr/share/pypy-1.2 -# -# Running "strace" on a built binary indicates that it searches within -# PREFIX/lib-python/modified-2.5.2 -# not -# PREFIX/lib-python/modified.2.5.2 -# as given on the above page, i.e. it uses '-' not '.' +# Run installing script, archive-name %{name}-%{version} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{version} --builddir %{buildroot}/%{_libdir} -cp -a lib-python %{buildroot}/%{pypyprefix} - -cp -a lib_pypy %{buildroot}/%{pypyprefix} - -# Remove a text file that documents which selftests fail on Win32: -rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt - -# Remove a text file containing upstream's recipe for syncing stdlib in -# their hg repository with cpython's: -rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: @@ -546,6 +504,8 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages +ln -s %{pypyprefix}/bin/pypy3 %{buildroot}/%{_bindir}/pypy3 +ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -604,16 +564,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/%{name} \ + %{buildroot}%{pypyprefix}/bin/pypy3 \ 0 -%{buildroot}/%{pypyprefix}/%{name} -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/%{name} -c 'import tkinter' -%{buildroot}/%{pypyprefix}/%{name} -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/%{name} -c 'import _curses' -%{buildroot}/%{pypyprefix}/%{name} -c 'import curses' -%{buildroot}/%{pypyprefix}/%{name} -c 'import syslog' -%{buildroot}/%{pypyprefix}/%{name} -c 'from _sqlite3 import *' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _sqlite3' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _curses' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import curses' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import syslog' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -626,8 +586,8 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # it's not yet clear to me how upstream plan to deal with the C extension # interface going forward, so let's just mimic upstream for now. %global pypy_include_dir %{pypyprefix}/include -mkdir -p %{buildroot}/%{pypy_include_dir} -cp include/*.h %{buildroot}/%{pypy_include_dir} +mkdir -p %{buildroot}%{pypy_include_dir} +rm -f %{buildroot}%{pypy_include_dir}/README # Capture the RPython source code files from the build within the debuginfo @@ -677,16 +637,18 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d -# Remove build script from the package -rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py +# Remove files we don't want: +rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 +rm -f %{buildroot}%{pypyprefix}/LICENSE +rm -f %{buildroot}%{pypyprefix}/README.rst %check topdir=$(pwd) @@ -807,10 +769,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy %{name} +CheckPyPy pypy-c %if 0%{with_stackless} -CheckPyPy %{name}-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -826,37 +788,39 @@ CheckPyPy %{name}-stackless %dir %{pypyprefix} %dir %{pypyprefix}/lib-python -%{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/%{name}trace-mode.el -%{_emacs_sitelispdir}/%{name}trace-mode.elc +%{_emacs_sitelispdir}/pypy3trace-mode.el +%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif %files %license LICENSE %doc README.rst -%{_bindir}/%{name} -%{pypyprefix}/%{name} +%{_bindir}/pypy3 +%{_bindir}/pypy3.3 +%{pypyprefix}/bin/ %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{_rpmconfigdir}/macros.d/macros.%{name} +%{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless %license LICENSE %doc README.rst -%{_bindir}/%{name}-stackless +%{_bindir}/pypy-stackless %endif %changelog -* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-6 +* Sat Jul 02 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.2.0-0.1.alpha1 +- First alpha build of PyPy 3.3 + +* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-3 - Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack - Raise an error when STARTTLS fails - rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
@@ -867,18 +831,6 @@ CheckPyPy %{name}-stackless - rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
-* Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 -- Fix FTBFS (#1307889) -- Add patch to fix maximum recursion depth error during build -- Don't use -g flag to prevent memory exhaustion -- Add fix form Arch Linux to prevent VerificationError during the build - -* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
- -* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 -- Bump release to rebuild with new execstack - * Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/sources b/sources index e4d98b7..0e4fa7b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -96ba72916114d16904e12562b5d84e51 pypy3-2.4.0-src.tar.bz2 +e4bbd6fe42481a17f705611d76914eda pypy3.3-v5.2.0-alpha1-src.tar.bz2 commit 092bdc18b3bd62174ce8db6323a5a1f59d080fd9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 1 15:59:13 2016 +0200 Fix for CVE-2016-0772 and CVE-2016-5699 Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack - Raise an error when STARTTLS fails - rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
- rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
- Fixed upstream:
https://hg.python.org/cpython/rev/d590114c2394
Fix for: CVE-2016-5699 python: http protocol steam injection attack - rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
- rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch new file mode 100644 index 0000000..ba1cc53 --- /dev/null +++ b/009-raise-an-error-when-STARTTLS-fails.patch @@ -0,0 +1,35 @@ +From 9092f6266c3054befff053aa943632856cedbdba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> +Date: Fri, 1 Jul 2016 11:42:53 +0200 +Subject: [PATCH] Raise an error when STARTTLS fails + +CVE-2016-0772 python: smtplib StartTLS stripping attack +rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+ +Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> +- in changeset 101887:d590114c2394 3.4 +-
https://hg.python.org/cpython/rev/d590114c2394
+--- + lib-python/3/smtplib.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py +index 679e478..1aacfaf 100644 +--- a/lib-python/3/smtplib.py ++++ b/lib-python/3/smtplib.py +@@ -666,6 +666,11 @@ class SMTP: + self.ehlo_resp = None + self.esmtp_features = {} + self.does_esmtp = 0 ++ else: ++ # RFC 3207: ++ # 501 Syntax error (no parameters allowed) ++ # 454 TLS not available due to temporary reason ++ raise SMTPResponseException(resp, reply) + return (resp, reply) + + def sendmail(self, from_addr, to_addrs, msg, mail_options=[], +-- +2.9.0 + diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch new file mode 100644 index 0000000..10591d5 --- /dev/null +++ b/010-disabled-HTTP-header-injections-in-http.client.patch @@ -0,0 +1,163 @@ +From 82dc922c7c4771ef789f5b395f54a603c693b05e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> +Date: Fri, 1 Jul 2016 13:08:55 +0200 +Subject: [PATCH] Disabled HTTP header injections in http.client. + +CVE-2016-5699 python: http protocol steam injection attack +rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+ +Based on an upstream change by Demian Brecht and Serhiy Storchaka +- in changeset 94952:bf3e1c9b80e9 3.4 +-
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+--- + lib-python/3/http/client.py | 37 +++++++++++++++++++++++++ + lib-python/3/test/test_httplib.py | 57 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 94 insertions(+) + +diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py +index 5466d06..1d215d8 100644 +--- a/lib-python/3/http/client.py ++++ b/lib-python/3/http/client.py +@@ -70,6 +70,7 @@ import email.parser + import email.message + import io + import os ++import re + import socket + import collections + from urllib.parse import urlsplit +@@ -207,6 +208,34 @@ MAXAMOUNT = 1048576 + # maximal line length when calling readline(). + _MAXLINE = 65536 + ++# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) ++# ++# VCHAR = %x21-7E ++# obs-text = %x80-FF ++# header-field = field-name ":" OWS field-value OWS ++# field-name = token ++# field-value = *( field-content / obs-fold ) ++# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] ++# field-vchar = VCHAR / obs-text ++# ++# obs-fold = CRLF 1*( SP / HTAB ) ++# ; obsolete line folding ++# ; see Section 3.2.4 ++ ++# token = 1*tchar ++# ++# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" ++# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" ++# / DIGIT / ALPHA ++# ; any VCHAR, except delimiters ++# ++# VCHAR defined in
http://tools.ietf.org/html/rfc5234#appendix-B.1
++ ++# the patterns for both name and value are more leniant than RFC ++# definitions to allow for backwards compatibility ++_is_legal_header_name = re.compile(b'^[^:\s][^:\r\n]*$').match ++_is_illegal_header_value = re.compile(b'\n(?![ \t])|\r(?![ \t\n])').search ++ + class HTTPMessage(email.message.Message): + # XXX The only usage of this method is in + # http.server.CGIHTTPRequestHandler. Maybe move the code there so +@@ -953,12 +982,20 @@ class HTTPConnection: + + if hasattr(header, 'encode'): + header = header.encode('ascii') ++ ++ if not _is_legal_header_name(header): ++ raise ValueError('Invalid header name %r' % (header,)) ++ + values = list(values) + for i, one_value in enumerate(values): + if hasattr(one_value, 'encode'): + values[i] = one_value.encode('latin1') + elif isinstance(one_value, int): + values[i] = str(one_value).encode('ascii') ++ ++ if _is_illegal_header_value(values[i]): ++ raise ValueError('Invalid header value %r' % (values[i],)) ++ + value = b'\r\n\t'.join(values) + header = header + b': ' + value + self._output(header) +diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py +index 420302c..31d3bd0 100644 +--- a/lib-python/3/test/test_httplib.py ++++ b/lib-python/3/test/test_httplib.py +@@ -134,6 +134,33 @@ class HeaderTests(TestCase): + conn.putheader('Content-length', 42) + self.assertTrue(b'Content-length: 42' in conn._buffer) + ++ conn.putheader('Foo', ' bar ') ++ self.assertIn(b'Foo: bar ', conn._buffer) ++ conn.putheader('Bar', '\tbaz\t') ++ self.assertIn(b'Bar: \tbaz\t', conn._buffer) ++ conn.putheader('Authorization', 'Bearer mytoken') ++ self.assertIn(b'Authorization: Bearer mytoken', conn._buffer) ++ conn.putheader('IterHeader', 'IterA', 'IterB') ++ self.assertIn(b'IterHeader: IterA\r\n\tIterB', conn._buffer) ++ conn.putheader('LatinHeader', b'\xFF') ++ self.assertIn(b'LatinHeader: \xFF', conn._buffer) ++ conn.putheader('Utf8Header', b'\xc3\x80') ++ self.assertIn(b'Utf8Header: \xc3\x80', conn._buffer) ++ conn.putheader('C1-Control', b'next\x85line') ++ self.assertIn(b'C1-Control: next\x85line', conn._buffer) ++ conn.putheader('Embedded-Fold-Space', 'is\r\n allowed') ++ self.assertIn(b'Embedded-Fold-Space: is\r\n allowed', conn._buffer) ++ conn.putheader('Embedded-Fold-Tab', 'is\r\n\tallowed') ++ self.assertIn(b'Embedded-Fold-Tab: is\r\n\tallowed', conn._buffer) ++ conn.putheader('Key Space', 'value') ++ self.assertIn(b'Key Space: value', conn._buffer) ++ conn.putheader('KeySpace ', 'value') ++ self.assertIn(b'KeySpace : value', conn._buffer) ++ conn.putheader(b'Nonbreak\xa0Space', 'value') ++ self.assertIn(b'Nonbreak\xa0Space: value', conn._buffer) ++ conn.putheader(b'\xa0NonbreakSpace', 'value') ++ self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer) ++ + def test_ipv6host_header(self): + # Default host header on IPv6 transaction should wrapped by [] if + # its actual IPv6 address +@@ -153,6 +180,36 @@ class HeaderTests(TestCase): + conn.request('GET', '/foo') + self.assertTrue(sock.data.startswith(expected)) + ++ def test_invalid_headers(self): ++ conn = client.HTTPConnection('
example.com
') ++ conn.sock = FakeSocket('') ++ conn.putrequest('GET', '/') ++ ++ #
http://tools.ietf.org/html/rfc7230#section-3.2.4
, whitespace is no ++ # longer allowed in header names ++ cases = ( ++ (b'Invalid\r\nName', b'ValidValue'), ++ (b'Invalid\rName', b'ValidValue'), ++ (b'Invalid\nName', b'ValidValue'), ++ (b'\r\nInvalidName', b'ValidValue'), ++ (b'\rInvalidName', b'ValidValue'), ++ (b'\nInvalidName', b'ValidValue'), ++ (b' InvalidName', b'ValidValue'), ++ (b'\tInvalidName', b'ValidValue'), ++ (b'Invalid:Name', b'ValidValue'), ++ (b':InvalidName', b'ValidValue'), ++ (b'ValidName', b'Invalid\r\nValue'), ++ (b'ValidName', b'Invalid\rValue'), ++ (b'ValidName', b'Invalid\nValue'), ++ (b'ValidName', b'InvalidValue\r\n'), ++ (b'ValidName', b'InvalidValue\r'), ++ (b'ValidName', b'InvalidValue\n'), ++ ) ++ for name, value in cases: ++ with self.subTest((name, value)): ++ with self.assertRaisesRegex(ValueError, 'Invalid header'): ++ conn.putheader(name, value) ++ + + class BasicTest(TestCase): + def test_status_lines(self): +-- +2.9.0 + diff --git a/pypy3.spec b/pypy3.spec index e31b4d4..5666e56 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -156,6 +156,20 @@ Patch2: 007-remove-startup-message.patch #
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
Patch3: 008-maximum-recursion-depth.patch +# CVE-2016-0772 python: smtplib StartTLS stripping attack +# rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+# rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/d590114c2394
+# Raise an error when STARTTLS fails +Patch4: 009-raise-an-error-when-STARTTLS-fails.patch + +# CVE-2016-5699 python: http protocol steam injection attack +# rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+# rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+# Disabled HTTP header injections in http.client +Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -842,6 +856,17 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-6 +- Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack +- Raise an error when STARTTLS fails +- rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+- rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+- Fixed upstream:
https://hg.python.org/cpython/rev/d590114c2394
+- Fix for: CVE-2016-5699 python: http protocol steam injection attack +- rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+- rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+ * Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 - Fix FTBFS (#1307889) - Add patch to fix maximum recursion depth error during build commit 4a3038ff5634b498b5afbf2552eeec9ae5d6e03b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 13 02:07:16 2016 +0200 Fix FTBFS (#1307889) - Add patch to fix maximum recursion depth error during build - Don't use -g flag to prevent memory exhaustion - Add fix form Arch Linux to prevent VerificationError during the build diff --git a/008-maximum-recursion-depth.patch b/008-maximum-recursion-depth.patch new file mode 100644 index 0000000..6d3d157 --- /dev/null +++ b/008-maximum-recursion-depth.patch @@ -0,0 +1,179 @@ +diff --git a/rpython/jit/metainterp/blackhole.py b/rpython/jit/metainterp/blackhole.py +index 9b14943..b9d1c4c 100644 +--- a/rpython/jit/metainterp/blackhole.py ++++ b/rpython/jit/metainterp/blackhole.py +@@ -1052,35 +1052,45 @@ class BlackholeInterpreter(object): + + @arguments("cpu", "i", "R", "d", returns="i") + def bhimpl_residual_call_r_i(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, None, args_r, None, calldescr) + @arguments("cpu", "i", "R", "d", returns="r") + def bhimpl_residual_call_r_r(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, None, args_r, None, calldescr) + @arguments("cpu", "i", "R", "d") + def bhimpl_residual_call_r_v(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, None, args_r, None, calldescr) + + @arguments("cpu", "i", "I", "R", "d", returns="i") + def bhimpl_residual_call_ir_i(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, args_i, args_r, None, calldescr) + @arguments("cpu", "i", "I", "R", "d", returns="r") + def bhimpl_residual_call_ir_r(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, args_i, args_r, None, calldescr) + @arguments("cpu", "i", "I", "R", "d") + def bhimpl_residual_call_ir_v(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, args_i, args_r, None, calldescr) + + @arguments("cpu", "i", "I", "R", "F", "d", returns="i") + def bhimpl_residual_call_irf_i(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d", returns="r") + def bhimpl_residual_call_irf_r(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d", returns="f") + def bhimpl_residual_call_irf_f(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_f(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d") + def bhimpl_residual_call_irf_v(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, args_i, args_r, args_f, calldescr) + + # conditional calls - note that they cannot return stuff +@@ -1108,44 +1118,54 @@ class BlackholeInterpreter(object): + + @arguments("cpu", "j", "R", returns="i") + def bhimpl_inline_call_r_i(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "R", returns="r") + def bhimpl_inline_call_r_r(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "R") + def bhimpl_inline_call_r_v(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + + @arguments("cpu", "j", "I", "R", returns="i") + def bhimpl_inline_call_ir_i(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", returns="r") + def bhimpl_inline_call_ir_r(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "I", "R") + def bhimpl_inline_call_ir_v(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + + @arguments("cpu", "j", "I", "R", "F", returns="i") + def bhimpl_inline_call_irf_i(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F", returns="r") + def bhimpl_inline_call_irf_r(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F", returns="f") + def bhimpl_inline_call_irf_f(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_f(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F") + def bhimpl_inline_call_irf_v(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + +@@ -1438,6 +1458,8 @@ class BlackholeInterpreter(object): + if not self.nextblackholeinterp: + self._exit_frame_with_exception(current_exc) + return current_exc ++ finally: ++ workaround2200.active = False + # + # pass the frame's return value to the caller + caller = self.nextblackholeinterp +@@ -1656,3 +1678,10 @@ def convert_and_run_from_pyjitpl(metainterp, raising_exception=False): + current_exc = lltype.nullptr(rclass.OBJECTPTR.TO) + # + _run_forever(firstbh, current_exc) ++ ++# ____________________________________________________________ ++ ++class WorkaroundIssue2200(object): ++ pass ++workaround2200 = WorkaroundIssue2200() ++workaround2200.active = False +diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py +index ad81456..c820185 100644 +--- a/rpython/jit/metainterp/test/test_ajit.py ++++ b/rpython/jit/metainterp/test/test_ajit.py +@@ -4044,3 +4044,30 @@ class TestLLtype(BaseLLtypeTests, LLJitMixin): + res = self.interp_operations(f, [17]) + assert res == 42 + self.check_operations_history(guard_true=1, guard_false=0) ++ ++ def test_issue2200_recursion(self): ++ # Reproduces issue #2200. This test contains no recursion, ++ # but due to an unlikely combination of factors it ends up ++ # creating an RPython-level recursion, one per loop iteration. ++ # The recursion is: blackhole interp from the failing guard -> ++ # does the call to enter() as a normal call -> enter() runs ++ # can_enter_jit() as if we're interpreted -> we enter the JIT ++ # again from the start of the loop -> the guard fails again ++ # during the next iteration -> blackhole interp. All arrows ++ # in the previous sentence are one or more levels of RPython ++ # function calls. ++ driver = JitDriver(greens=[], reds=["i"]) ++ def enter(i): ++ driver.can_enter_jit(i=i) ++ def f(): ++ set_param(None, 'trace_eagerness', 999999) ++ i = 0 ++ while True: ++ driver.jit_merge_point(i=i) ++ i += 1 ++ if i >= 300: ++ return i ++ promote(i + 1) # a failing guard ++ enter(i) ++ ++ self.meta_interp(f, []) +diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py +index 805933e..ca47f03 100644 +--- a/rpython/jit/metainterp/warmstate.py ++++ b/rpython/jit/metainterp/warmstate.py +@@ -405,6 +405,14 @@ class WarmEnterState(object): + bound_reached(hash, None, *args) + return + ++ # Workaround for issue #2200, maybe temporary. This is not ++ # a proper fix, but only a hack that should work well enough ++ # for PyPy's main jitdriver... See test_issue2200_recursion ++ from rpython.jit.metainterp.blackhole import workaround2200 ++ if workaround2200.active: ++ workaround2200.active = False ++ return ++ + # Here, we have found 'cell'. + # + if cell.flags & (JC_TRACING | JC_TEMPORARY): diff --git a/pypy3.spec b/pypy3.spec index 53c2241..e31b4d4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -152,6 +152,9 @@ Patch1: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch2: 007-remove-startup-message.patch +#
https://bugzilla.redhat.com/show_bug.cgi?id=1307889
+#
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
+Patch3: 008-maximum-recursion-depth.patch # Build-time requirements: @@ -287,6 +290,20 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; +# Hacky fix to allow the curses module to build on x86_64; otherwise we get: +# cffi.ffiplatform.VerificationError: anonymous MEVENT: wrong total size +# (we have 24, but C compiler says 20) +#
https://github.com/archlinuxcn/repo/commit/560a75090333b6de8a1de960acac5e62…
+%ifarch x86_64 + _type=unsigned +%else + _type=uint32_t +%endif + +sed -i -e "s/typedef unsigned long mmask_t/typedef $_type mmask_t/" \ + -e "s/typedef unsigned long chtype/typedef $_type chtype/" \ + lib_pypy/_curses.py + %build BuildPyPy() { @@ -348,7 +365,8 @@ BuildPyPy() { # of root pointers: %global gcrootfinder_options --gcrootfinder=shadowstack - export CFLAGS=$(echo "$RPM_OPT_FLAGS") + # Prevent memory exhaustion + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-g//') %else # Go with the default, which is "asmgcc" @@ -367,7 +385,7 @@ BuildPyPy() { # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//' -e 's/-g//') %endif @@ -824,6 +842,12 @@ CheckPyPy %{name}-stackless %changelog +* Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 +- Fix FTBFS (#1307889) +- Add patch to fix maximum recursion depth error during build +- Don't use -g flag to prevent memory exhaustion +- Add fix form Arch Linux to prevent VerificationError during the build + * Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
commit 37de776457faff9eeedd146ed613f098a688d9cf Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Feb 4 18:47:53 2016 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 04952a9..53c2241 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+ * Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 - Bump release to rebuild with new execstack commit ffbf97517e896aea68cb51cb99a36e5bf95422e8 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Aug 4 11:50:06 2015 -0400 Bump release to rebuild with new execstack diff --git a/pypy3.spec b/pypy3.spec index afc59f7..04952a9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 +- Bump release to rebuild with new execstack + * Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
commit a039768e93ec1249319bb9b49149c6981717b0ab Author: Dennis Gilmore <dennis(a)ausil.us> Date: Thu Jun 18 18:15:59 2015 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index fbacd83..afc59f7 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+ * Wed Sep 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.4.0-1 - Update to 2.4.0 commit a7f7d048aa94963f46c11bea18071aef0fb8c954 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jun 11 11:40:02 2015 +0200 Sync with pypy diff --git a/pypy3.spec b/pypy3.spec index 6e6bd46..fbacd83 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -116,7 +116,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{version} +%global pypyprefix %{_libdir}/%{name}-%{version} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -129,11 +129,11 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/%{name}-%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy3 +Source2: macros.%{name} # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -217,7 +217,7 @@ BuildRequires: emacs BuildRequires: git # Metadata for the core package (the JIT build): -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -249,7 +249,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: pypy3%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -259,13 +259,13 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-2.4.0-src -p1 -S git +%autosetup -n %{name}-%{version}-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -410,7 +410,7 @@ BuildPyPy() { } BuildPyPy \ - pypy3 \ + %{name} \ %if 0%{with_jit} "-Ojit" \ %else @@ -420,7 +420,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - pypy3-stackless \ + %{name}-stackless \ "--stackless" %endif @@ -466,10 +466,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy pypy3 +InstallPyPy %{name} %if 0%{with_stackless} -InstallPyPy pypy3-stackless +InstallPyPy %{name}-stackless %endif @@ -572,16 +572,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/pypy3 \ + %{buildroot}/%{_bindir}/%{name} \ 0 -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import tkinter' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _curses' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import curses' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import syslog' -%{buildroot}/%{pypyprefix}/pypy3 -c 'from _sqlite3 import *' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/%{name} -c 'import tkinter' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _curses' +%{buildroot}/%{pypyprefix}/%{name} -c 'import curses' +%{buildroot}/%{pypyprefix}/%{name} -c 'import syslog' +%{buildroot}/%{pypyprefix}/%{name} -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -645,8 +645,8 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc %endif # Install macros for rpm: @@ -775,10 +775,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy3 +CheckPyPy %{name} %if 0%{with_stackless} -CheckPyPy pypy3-stackless +CheckPyPy %{name}-stackless %endif %endif # run_selftests @@ -800,26 +800,26 @@ CheckPyPy pypy3-stackless %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypy3trace-mode.el -%{_emacs_sitelispdir}/pypy3trace-mode.elc +%{_emacs_sitelispdir}/%{name}trace-mode.el +%{_emacs_sitelispdir}/%{name}trace-mode.elc %endif %files %license LICENSE %doc README.rst -%{_bindir}/pypy3 -%{pypyprefix}/pypy3 +%{_bindir}/%{name} +%{pypyprefix}/%{name} %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{_rpmconfigdir}/macros.d/macros.pypy3 +%{_rpmconfigdir}/macros.d/macros.%{name} %if 0%{with_stackless} %files stackless %license LICENSE %doc README.rst -%{_bindir}/pypy-stackless +%{_bindir}/%{name}-stackless %endif commit 908d523efb68df54d872af8a8c6324e0f8f7f106 Merge: ff9537b 5f5775a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun May 10 16:16:10 2015 +0200 Merge with pypy + package review (#1215732) history commit 5f5775aa52401c7c7261d2e610fa796420e51b9d Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun May 10 16:04:51 2015 +0200 Remove unused patches diff --git a/008-fix-dynamic-symbols-script.patch b/008-fix-dynamic-symbols-script.patch deleted file mode 100644 index 5b1d551..0000000 --- a/008-fix-dynamic-symbols-script.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py ---- a/pypy/translator/platform/posix.py -+++ b/pypy/translator/platform/posix.py -@@ -48,8 +48,10 @@ - response_file = self._make_response_file("dynamic-symbols-") - f = response_file.open("w") - f.write("{\n") -+ f.write(" global:\n") - for sym in eci.export_symbols: -- f.write("%s;\n" % (sym,)) -+ f.write(" %s;\n" % (sym,)) -+ f.write(" local:*;\n") - f.write("};") - f.close() - diff --git a/config.patch b/config.patch deleted file mode 100644 index bf81d7d..0000000 --- a/config.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py ---- pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:35:37.679237332 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:47:41.506354482 +0200 -@@ -32,19 +32,20 @@ class BaseLinux(BasePosix): - return self._pkg_config("libffi", "--libs-only-L", - ['/usr/lib/libffi']) - -- def library_dirs_for_libffi_a(self): -- # places where we need to look for libffi.a -- # XXX obscuuure! only look for libffi.a if run with translate.py -- if 'translate' in sys.modules: -- if sys.maxint > 2**32: -- host = 'x86_64' -- else: -- host = 'x86' -- return self.library_dirs_for_libffi() + [ -- '/usr/lib', -- '/usr/lib/%s-linux-gnu/' % host] -- else: -- return [] -+ #Fedora, at least, has the shared version but not the static: -+ #def library_dirs_for_libffi_a(self): -+ # # places where we need to look for libffi.a -+ # # XXX obscuuure! only look for libffi.a if run with translate.py -+ # if 'translate' in sys.modules: -+ # if sys.maxint > 2**32: -+ # host = 'x86_64' -+ # else: -+ # host = 'x86' -+ # return self.library_dirs_for_libffi() + [ -+ # '/usr/lib', -+ # '/usr/lib/%s-linux-gnu/' % host] -+ # else: -+ # return [] - - - class Linux(BaseLinux): diff --git a/more-readable-c-code.patch b/more-readable-c-code.patch deleted file mode 100644 index 92d340f..0000000 --- a/more-readable-c-code.patch +++ /dev/null @@ -1,693 +0,0 @@ -diff -up pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code pypy-pypy-release-1.7/pypy/interpreter/pycode.py ---- pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/interpreter/pycode.py 2011-11-21 16:16:15.673463780 -0500 -@@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non - from pypy.interpreter.astcompiler.consts import ( - CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, - CO_GENERATOR, CO_CONTAINSGLOBALS) -+from pypy.interpreter.pytraceback import offset2lineno - from pypy.rlib.rarithmetic import intmask - from pypy.rlib.debug import make_sure_not_resized - from pypy.rlib import jit -@@ -81,6 +82,7 @@ class PyCode(eval.Code): - self.hidden_applevel = hidden_applevel - self.magic = magic - self._signature = cpython_code_signature(self) -+ self._cached_source = None - self._initialize() - - def _initialize(self): -@@ -397,3 +399,23 @@ class PyCode(eval.Code): - - def repr(self, space): - return space.wrap(self.get_repr()) -+ -+ def get_linenum_for_offset(self, offset): -+ # Given a bytecode offset, return a 1-based index into the lines of the -+ # source code -+ return offset2lineno(self, offset) -+ -+ def _ensure_source(self): -+ # Lazily grab the source lines into self._cached_source (or raise -+ # an IOError) -+ if not self._cached_source: -+ f = open(self.co_filename, 'r') -+ source = [line.rstrip() for line in f.readlines()] -+ f.close() -+ self._cached_source = source -+ -+ def get_source_text(self, linenum): -+ # Given a 1-based index, get the corresponding line of source code (or -+ # raise an IOError) -+ self._ensure_source() -+ return self._cached_source[linenum - 1] -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/model.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/model.py 2011-11-21 16:15:36.599466455 -0500 -@@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden - - __metaclass__ = type - -+class SourceLoc(object): -+ # A srcloc is a specific location within the RPython source code, -+ # intended for human display -+ __slots__ = ('code', # code object -+ 'linenum' # 1-based index, as displayed to a user -+ ) -+ def __init__(self, code, linenum): -+ self.code = code -+ self.linenum = linenum -+ -+ def get_text(self): -+ # Get the actual source text of this line -+ return self.code.get_source_text(self.linenum) -+ -+ def __eq__(self, other): -+ return self.code == other.code and self.linenum == other.linenum -+ -+ def __ne__(self, other): -+ if other: -+ return self.code != other.code or self.linenum != other.linenum -+ else: -+ return True -+ -+class CodeLoc(object): -+ # A codeloc is a specific location within the RPython bytecode -+ __slots__ = ('code', # code object -+ 'offset' # int index into bytecode, or -1 -+ ) -+ -+ def __init__(self, code, offset): -+ self.code = code -+ self.offset = offset -+ -+ def __str__(self): -+ if self.offset >= 0: -+ return "%s@%d" % (self.code.co_name, self.offset) -+ else: -+ return "" -+ -+ def __ne__(self, other): -+ if other: -+ return self.code != other.code or self.offset != other.offset -+ else: -+ return True -+ -+ def __cmp__(self, other): -+ # Partial ordering, for those locations that have an offset: -+ if other: -+ if self.offset >= 0 and other.offset >= 0: -+ return self.offset - other.offset -+ return 0 -+ -+ def get_source_loc(self): -+ # Convert to a SourceLoc: -+ return SourceLoc(self.code, self.code.get_linenum_for_offset(self.offset)) -+ -+class OperationLoc(object): -+ # An oploc is the location within the RPython source code of a given -+ # operation -+ # -+ # This is a list consisting of CodeLoc instances, some of which may be None -+ # -+ # For the simple case, this is list of length 1 with a single CodeLoc -+ # -+ # For an operation inside an inlined callsite, we have a list of length 2: -+ # [codeloc of callsite, -+ # codeloc of operation within inlined body] -+ # -+ # For more interesting inlined cases, we have a chain of source locations: -+ # [codeloc of callsite, -+ # codeloc of inner callsite, -+ # ... , -+ # codeloc of innermost inlined callsite, -+ # codeloc of operation within inlined body] -+ # -+ -+ __slots__ = ('codelocs', ) -+ -+ def __init__(self, codelocs): -+ self.codelocs = codelocs -+ -+ def __str__(self): -+ return '[' + ' > '.join(str(codeloc) for codeloc in self.codelocs) + ']' -+ -+ def __cmp__(self, other): -+ return cmp(self.codelocs, other.codelocs) -+ -+def block_comparator(blk0, blk1): -+ ''' -+ Sort function for blocks, putting them in an ordering that attempts to -+ maximize readability of the generated C code -+ ''' -+ # print 'comparing %r and %r' % (blk0, blk1) -+ # Put the start/end block at the top/bottom: -+ if blk0.isstartblock: -+ return -1 -+ -+ if blk1.isstartblock: -+ return 1 -+ -+ # Order blocks by the offset, where present: -+ if blk0.operations: -+ if blk1.operations: -+ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) -+ else: -+ return -1 -+ else: -+ if blk1.operations: -+ return 1 -+ else: -+ return 0 -+ -+def edge_comparator(edge0, edge1): -+ return block_comparator(edge0.target, edge1.target) - - class FunctionGraph(object): - __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] -@@ -94,6 +208,21 @@ class FunctionGraph(object): - seen[block] = True - stack += block.exits[::-1] - -+ def iterblocks_by_source(self): -+ # Try to preserve logical source ordering in the blocks -+ block = self.startblock -+ yield block -+ seen = {block: True} -+ stack = list(block.exits[::-1]) -+ stack.sort(edge_comparator) -+ while stack: -+ block = stack.pop().target -+ if block not in seen: -+ yield block -+ seen[block] = True -+ stack += block.exits[::-1] -+ stack.sort(edge_comparator) -+ - def iterlinks(self): - block = self.startblock - seen = {block: True} -@@ -183,14 +312,14 @@ class Block(object): - self.exits = [] # list of Link(s) - - def at(self): -- if self.operations and self.operations[0].offset >= 0: -- return "@%d" % self.operations[0].offset -+ if self.operations: -+ return str(self.operations[0].oploc) - else: - return "" - - def __str__(self): - if self.operations: -- txt = "block@%d" % self.operations[0].offset -+ txt = "block%s" % self.operations[0].oploc - else: - if (not self.exits) and len(self.inputargs) == 1: - txt = "return block" -@@ -245,6 +374,21 @@ class Block(object): - from pypy.translator.tool.graphpage import try_show - try_show(self) - -+ def isreturnblock(self): -+ return (not self.operations) and (not self.exits) and len(self.inputargs) == 1 -+ -+ def get_base_label(self, blocknum): -+ # Generate a more friendly C label for this block -+ if self.operations: -+ txt = "block" -+ elif (not self.exits) and len(self.inputargs) == 1: -+ txt = "return_block" -+ elif (not self.exits) and len(self.inputargs) == 2: -+ txt = "raise_block" -+ else: -+ txt = "codeless_block" -+ return '%s%d' % (txt, blocknum) -+ - - class Variable(object): - __slots__ = ["_name", "_nr", "concretetype"] -@@ -331,13 +475,15 @@ class WrapException(Exception): - - - class SpaceOperation(object): -- __slots__ = "opname args result offset".split() -+ __slots__ = "opname args result oploc".split() - -- def __init__(self, opname, args, result, offset=-1): -+ def __init__(self, opname, args, result, oploc=None): - self.opname = intern(opname) # operation name - self.args = list(args) # mixed list of var/const - self.result = result # either Variable or Constant instance -- self.offset = offset # offset in code string -+ if oploc is None: -+ oploc = OperationLoc([None]) -+ self.oploc = oploc - - def __eq__(self, other): - return (self.__class__ is other.__class__ and -@@ -352,8 +498,9 @@ class SpaceOperation(object): - return hash((self.opname,tuple(self.args),self.result)) - - def __repr__(self): -- return "%r = %s(%s)" % (self.result, self.opname, -- ", ".join(map(repr, self.args))) -+ return "%r = %s(%s) (%s)" % (self.result, self.opname, -+ ", ".join(map(repr, self.args)), -+ self.oploc) - - class Atom(object): - def __init__(self, name): -@@ -427,8 +574,7 @@ def copygraph(graph, shallow=False, varm - for op in oplist: - copyop = SpaceOperation(op.opname, - [copyvar(v) for v in op.args], -- copyvar(op.result), op.offset) -- #copyop.offset = op.offset -+ copyvar(op.result), op.oploc) - result.append(copyop) - return result - newblock.operations = copyoplist(block.operations) -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py 2011-11-21 16:15:36.600466455 -0500 -@@ -315,7 +315,9 @@ class FlowObjSpace(ObjSpace): - def do_operation(self, name, *args_w): - spaceop = SpaceOperation(name, args_w, Variable()) - if hasattr(self, 'executioncontext'): # not here during bootstrapping -- spaceop.offset = self.executioncontext.crnt_offset -+ codeloc = CodeLoc(self.executioncontext.code, -+ self.executioncontext.crnt_offset) -+ spaceop.oploc = OperationLoc([codeloc]) - self.executioncontext.recorder.append(spaceop) - return spaceop.result - -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py 2011-11-21 16:15:36.600466455 -0500 -@@ -119,3 +119,25 @@ def test_variable(): - assert v2.renamed - assert v2.name.startswith("foobar_") and v2.name != v.name - assert v2.name.split('_', 1)[1].isdigit() -+ -+def test_source_locations(): -+ # Invent some random offsets into the code: -+ co = sample_function.__code__ -+ codelocA = CodeLoc(co, 42) -+ codelocB = CodeLoc(co, 87) -+ -+ assert str(codelocA) == 'sample_function@42' -+ assert str(codelocB) == 'sample_function@87' -+ -+ assert cmp(codelocA, codelocB) < 0 -+ assert cmp(codelocB, codelocA) > 0 -+ -+ oplocA = OperationLoc([codelocA]) -+ oplocB = OperationLoc([codelocB]) -+ -+ assert str(oplocA) == '[sample_function@42]' -+ assert str(oplocB) == '[sample_function@87]' -+ -+ assert cmp(oplocA, oplocB) < 0 -+ assert cmp(oplocB, oplocA) > 0 -+ -diff -up pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/rpython/rtyper.py ---- pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/rpython/rtyper.py 2011-11-21 16:15:36.601466455 -0500 -@@ -800,7 +800,7 @@ class HighLevelOp(object): - return vars - - def genop(self, opname, args_v, resulttype=None): -- return self.llops.genop(opname, args_v, resulttype) -+ return self.llops.genop(opname, args_v, resulttype, self.spaceop.oploc) - - def gendirectcall(self, ll_function, *args_v): - return self.llops.gendirectcall(ll_function, *args_v) -@@ -935,7 +935,7 @@ class LowLevelOpList(list): - v.concretetype)) - return v - -- def genop(self, opname, args_v, resulttype=None): -+ def genop(self, opname, args_v, resulttype=None, oploc=None): - try: - for v in args_v: - v.concretetype -@@ -944,7 +944,7 @@ class LowLevelOpList(list): - " and pass its result to genop()," - " never hop.args_v directly.") - vresult = Variable() -- self.append(SpaceOperation(opname, args_v, vresult)) -+ self.append(SpaceOperation(opname, args_v, vresult, oploc)) - if resulttype is None: - vresult.concretetype = Void - return None -diff -up pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py ---- pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py 2011-11-21 16:15:36.601466455 -0500 -@@ -4,6 +4,7 @@ from pypy.translator.simplify import get - from pypy.translator.unsimplify import copyvar - from pypy.objspace.flow.model import Variable, Constant, Block, Link - from pypy.objspace.flow.model import SpaceOperation, c_last_exception -+from pypy.objspace.flow.model import OperationLoc - from pypy.objspace.flow.model import FunctionGraph - from pypy.objspace.flow.model import mkentrymap, checkgraph - from pypy.annotation import model as annmodel -@@ -231,6 +232,7 @@ class BaseInliner(object): - self.varmap = {} - self._copied_blocks = {} - self.op = block.operations[index_operation] -+ self.callsite_oploc = self.op.oploc - self.graph_to_inline = self.get_graph_from_op(self.op) - self.exception_guarded = False - if (block.exitswitch == c_last_exception and -@@ -290,7 +292,9 @@ class BaseInliner(object): - - def copy_operation(self, op): - args = [self.get_new_name(arg) for arg in op.args] -- result = SpaceOperation(op.opname, args, self.get_new_name(op.result)) -+ new_oploc = OperationLoc(self.callsite_oploc.codelocs[:] + op.oploc.codelocs[:]) -+ result = SpaceOperation(op.opname, args, self.get_new_name(op.result), -+ new_oploc) - return result - - def copy_block(self, block): -diff -up pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/funcgen.py ---- pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/c/funcgen.py 2011-11-21 16:15:36.602466455 -0500 -@@ -1,4 +1,6 @@ - import sys -+import inspect -+import dis - from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring - from pypy.translator.c.support import cdecl - from pypy.translator.c.support import llvalue_from_constant, gen_assignments -@@ -22,6 +24,38 @@ LOCALVAR = 'l_%s' - - KEEP_INLINED_GRAPHS = False - -+def block_comparator(blk0, blk1): -+ ''' -+ Sort function for blocks, putting them in an ordering that attempts to -+ maximize readability of the generated C code -+ ''' -+ # print 'comparing %r and %r' % (blk0, blk1) -+ # Put the start/end block at the top/bottom: -+ if blk0.isstartblock: -+ return -1 -+ -+ if blk1.isstartblock: -+ return 1 -+ -+ # Order blocks by the offset, where present: -+ if blk0.operations: -+ if blk1.operations: -+ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) -+ else: -+ return -1 -+ else: -+ if blk1.operations: -+ return 1 -+ else: -+ return 0 -+ -+def escape_c_comments(py_src): -+ # Escape C comments within RPython source, to avoid generating bogus -+ # comments in our generated C source: -+ py_src = py_src.replace('/*', '') -+ py_src = py_src.replace('*/', '') -+ return py_src -+ - class FunctionCodeGenerator(object): - """ - Collects information about a function which we have to generate -@@ -207,14 +241,57 @@ class FunctionCodeGenerator(object): - - def cfunction_body(self): - graph = self.graph -- yield 'goto block0;' # to avoid a warning "this label is not used" -+ # Try to print python source code: -+ if hasattr(graph, 'func'): -+ filename = inspect.getfile(graph.func) -+ #yield '/* name: %r */' % filename -+ try: -+ src, startline = inspect.getsourcelines(graph.func) -+ except IOError: -+ pass # No source found -+ except IndexError: -+ pass # Bulletproofing -+ else: -+ yield '/* Python source %r' % filename -+ for i, line in enumerate(src): -+ line = line.rstrip() -+ line = escape_c_comments(line) -+ # FuncNode.funcgen_implementation treats lines ending in ':' -+ # as C blocks, which messes up the formatting. -+ # Work around this: -+ if line.endswith(':'): -+ line += ' ' -+ yield ' * %4d : %s' % (startline + i, line) -+ yield ' */' -+ -+ label = graph.startblock.get_base_label(self.blocknum[graph.startblock]) -+ yield 'goto %s;' % label # to avoid a warning "this label is not used" -+ -+ # Sort the blocks into a (hopefully) readable order: -+ blocks = list(graph.iterblocks_by_source()) -+ blocks.sort(block_comparator) - - # generate the body of each block -- for block in graph.iterblocks(): -+ for block in blocks: -+ cursrcloc = None - myblocknum = self.blocknum[block] - yield '' -- yield 'block%d:' % myblocknum -+ yield '%s:' % block.get_base_label(myblocknum) -+ #yield "/* repr(block): %r */" % (block, ) -+ #yield "/* type(block): %r */" % (type(block), ) - for i, op in enumerate(block.operations): -+ #yield "/* type(op): %r */" % (type(op), ) -+ #yield "/* op.oploc: %s */" % (op.oploc, ) -+ codeloc = op.oploc.codelocs[-1] -+ if codeloc: -+ srcloc = codeloc.get_source_loc() -+ if srcloc != cursrcloc: -+ try: -+ yield "/* %s:%d : %s */" % (codeloc.code.co_name, srcloc.linenum, escape_c_comments(srcloc.get_text())) -+ cursrcloc = srcloc -+ except IOError: -+ pass -+ - for line in self.gen_op(op): - yield line - if len(block.exits) == 0: -@@ -306,7 +383,7 @@ class FunctionCodeGenerator(object): - assignments.append((a2typename, dest, src)) - for line in gen_assignments(assignments): - yield line -- label = 'block%d' % self.blocknum[link.target] -+ label = link.target.get_base_label(self.blocknum[link.target]) - if link.target in self.innerloops: - loop = self.innerloops[link.target] - if link is loop.links[-1]: # link that ends a loop -diff -up pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py ---- pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py 2011-11-21 16:15:36.602466455 -0500 -@@ -1,4 +1,5 @@ - import autopath, sys, os, py -+import re - from pypy.rpython.lltypesystem.lltype import * - from pypy.annotation import model as annmodel - from pypy.translator.translator import TranslationContext -@@ -532,3 +533,130 @@ def test_inhibit_tail_call(): - else: - assert 0, "the call was not found in the C source" - assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] -+ -+def get_generated_c_source(fn, types): -+ # Return a (optimized fn, c source code, c source filename) 3-tuple -+ t = Translation(fn) -+ t.annotate(types) -+ c_filename_path = t.source_c() -+ h = c_filename_path.open() -+ src = h.read() -+ h.close() -+ c_fn = t.compile_c() -+ return (c_fn, src, c_filename_path) -+ -+def extract_c_function(c_src, fname): -+ # Extract the source for a given C function out of a the given src string -+ # Makes assumptions about the layout of the source -+ pattern = '^(.+) \**%s\(.*\) {$' % fname -+ within_fn = False -+ result = '' -+ for line in c_src.splitlines(): -+ if within_fn: -+ result += line + '\n' -+ if line.startswith('}'): -+ return result -+ else: -+ m = re.match(pattern, line) -+ if m: -+ within_fn = True -+ result += line + '\n' -+ return result -+ -+ -+ -+def test_generated_c_source(): -+ # Verify that generate C source "looks good" -+ # We'll use is_perfect_number, as it contains a loop and a conditional -+ -+ # Generate C source code -+ from pypy.translator.test.snippet import is_perfect_number -+ c_fn, c_src, c_filename_path = get_generated_c_source(is_perfect_number, -+ [int]) -+ -+ # Locate the C source for the type-specialized function: -+ c_fn_src = extract_c_function(c_src, 'pypy_g_is_perfect_number') -+ -+ # Verify that the C source contains embedded comments containing the lines -+ # of the python source: -+ expected_comment_lines = [ -+ '/* is_perfect_number:31 : while div < n: */', -+ '/* is_perfect_number:32 : if n % div == 0: */', -+ '/* is_perfect_number:33 : sum += div */', -+ '/* is_perfect_number:34 : div += 1 */', -+ '/* is_perfect_number:35 : return n == sum */'] -+ for exp_line in expected_comment_lines: -+ assert exp_line in c_fn_src -+ -+ # Verify that the lines occur in the correct order -+ # ...we do this by filtering the function's generated C source to just -+ # those lines containing our comments (and dropping whitespace): -+ lines = c_fn_src.splitlines() -+ lines = [line.strip() -+ for line in lines -+ if '/* is_perfect_number:' in line] -+ -+ # ...we should now have exact equality: the ordering should be as expected, -+ # and each comment should appear exactly once: -+ assert lines == expected_comment_lines -+ -+ # Ensure that the generated C function does the right thing: -+ assert c_fn(5) == False -+ assert c_fn(6) == True -+ assert c_fn(7) == False -+ -+ assert c_fn(5.0) == False -+ assert c_fn(6.0) == True -+ assert c_fn(7.0) == False -+ -+ assert c_fn(5L) == False -+ assert c_fn(6L) == True -+ assert c_fn(7L) == False -+ -+ try: -+ c_fn('hello world') -+ except: -+ pass -+ else: -+ raise 'Was expected exception' -+ -+def test_escaping_c_comments(): -+ # Ensure that c comments within RPython code get escaped when we generate -+ # our .c code (to avoid generating bogus C) -+ # See e.g. pypy.module.cpyext.dictobject's PyDict_Next, which has a -+ # docstring embedding a C comment -+ def c_style_comment(a, b): -+ '''Here is a C-style comment within an RPython docstring: -+ /* hello world */ -+ ''' -+ # and here's one in a string literal: -+ return '/* hello world a:%s b:%s */' % (a, b) -+ -+ def cplusplus_style_comment(a, b): -+ '''Here is a C++-style comment within an RPython docstring: -+ // hello world -+ ''' -+ # and here are some in string literals, and one as the floor division -+ # operator: -+ return '// hello world: a // b = %s' % (a // b) -+ -+ for fn_name, exp_output in [('c_style_comment', -+ '/* hello world a:6 b:3 */'), -+ ('cplusplus_style_comment', -+ '// hello world: a // b = 2')]: -+ fn = locals()[fn_name] -+ -+ c_fn, c_src, c_filename_path = get_generated_c_source(fn, [int, int]) -+ # If the above survived, then the C compiler managed to handle -+ # the generated C code -+ -+ # Verify that the generated code works (i.e. that we didn't -+ # accidentally change the meaning): -+ assert c_fn(6, 3) == exp_output -+ -+ # Ensure that at least part of the docstrings made it into the C -+ # code: -+ c_fn_src = extract_c_function(c_src, 'pypy_g_' + fn_name) -+ assert 'Here is a ' in c_fn_src -+ assert 'style comment within an RPython docstring' in c_fn_src -+ -diff -up pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/driver.py ---- pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/driver.py 2011-11-21 16:15:36.603466455 -0500 -@@ -535,6 +535,7 @@ class TranslationDriver(SimpleTaskEngine - dstname = self.compute_exe_name() + '.staticdata.info' - shutil.copy(str(fname), str(dstname)) - self.log.info('Static data info written to %s' % dstname) -+ return c_source_filename - - # - task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -up pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/gensupp.py ---- pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/gensupp.py 2011-11-21 16:15:36.603466455 -0500 -@@ -14,8 +14,8 @@ def ordered_blocks(graph): - allblocks = [] - for block in graph.iterblocks(): - # first we order by offset in the code string -- if block.operations: -- ofs = block.operations[0].offset -+ if block.operations and block.operations[0].oploc.codelocs[0]: -+ ofs = block.operations[0].oploc.codelocs[0].offset - else: - ofs = sys.maxint - # then we order by input variable name or value -diff -up pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/interactive.py ---- pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/interactive.py 2011-11-21 16:15:36.604466454 -0500 -@@ -138,7 +138,7 @@ class Translation(object): - def source_c(self, argtypes=None, **kwds): - self.update_options(argtypes, kwds) - self.ensure_backend('c') -- self.driver.source_c() -+ return self.driver.source_c() - - def source_cl(self, argtypes=None, **kwds): - self.update_options(argtypes, kwds) -diff -up pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py ---- pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py 2011-11-21 16:15:36.604466454 -0500 -@@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam - # "return result" - block = Block(wrapper_inputargs) - wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) -+ if hasattr(graph, 'func'): -+ wgraph.func = graph.func - translator.update_call_graph(wgraph, graph, object()) - translator.graphs.append(wgraph) - block.operations[:] = newops -diff -up pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/simplify.py ---- pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/simplify.py 2011-11-21 16:15:36.605466454 -0500 -@@ -292,7 +292,7 @@ def join_blocks(graph): - return renaming.get(v, v) - def rename_op(op): - args = [rename(a) for a in op.args] -- op = SpaceOperation(op.opname, args, rename(op.result), op.offset) -+ op = SpaceOperation(op.opname, args, rename(op.result), op.oploc) - # special case... - if op.opname == 'indirect_call': - if isinstance(op.args[0], Constant): diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch deleted file mode 100644 index 2391f32..0000000 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py ---- pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-27 10:35:37.762237806 +0200 -+++ pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-28 10:13:03.182536196 +0200 -@@ -587,7 +587,7 @@ class ProcessTestCase(BaseTestCase): - for i in range(1024): - # Windows raises IOError. Others raise OSError. - with self.assertRaises(EnvironmentError) as c: -- subprocess.Popen(['nonexisting_i_hope'], -+ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - # ignore errors that indicate the command was not found commit ff9537b3ed920fc031a5b18ab8b27efd0a194202 Author: Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> Date: Fri May 8 17:05:34 2015 +0000 Initial setup of the repo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 commit 36afc7f79102c83960c3d6bf8f4a8620554c0137 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue May 5 18:32:38 2015 +0200 Replace all lib-python python shebangs with pypy diff --git a/pypy3.spec b/pypy3.spec index edbfd2f..6e6bd46 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -281,6 +281,11 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done +# Replace all lib-python python shebangs with pypy +find lib-python/%{pylibver} -name "*.py" -exec \ + sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \ + "{}" \ + \; %build commit 976314ef808d7b7dbe2bc8961a5de2deae1cdc9f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:49:51 2015 +0200 Build with pypy diff --git a/pypy3.spec b/pypy3.spec index 218ce3e..edbfd2f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -161,7 +161,9 @@ Patch2: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -%global use_self_when_building 0 +# Note, pypy3 is built with pypy2, so no dependency cycle + +%global use_self_when_building 1 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy commit 980f988cc4d495d359155cf3c1d12b2dfc81a08f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:48:44 2015 +0200 BR git for %autosetup -S git diff --git a/pypy3.spec b/pypy3.spec index 77ffa2d..218ce3e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -211,6 +211,8 @@ BuildRequires: /usr/bin/execstack BuildRequires: emacs %endif +# For %%autosetup -S git +BuildRequires: git # Metadata for the core package (the JIT build): Requires: pypy3-libs%{?_isa} = %{version}-%{release} commit 819b9f5595c2ac93d1a8a693a647a006f2c9bbc0 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:47:32 2015 +0200 Use %global instead of %define diff --git a/pypy3.spec b/pypy3.spec index e992b00..77ffa2d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -337,14 +337,14 @@ BuildPyPy() { # This is the most portable option, and avoids a reliance on non-guaranteed # behaviors within GCC's code generator: use an explicitly-maintained stack # of root pointers: - %define gcrootfinder_options --gcrootfinder=shadowstack + %global gcrootfinder_options --gcrootfinder=shadowstack export CFLAGS=$(echo "$RPM_OPT_FLAGS") %else # Go with the default, which is "asmgcc" - %define gcrootfinder_options %{nil} + %global gcrootfinder_options %{nil} #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
# The generated Makefile compiles the .c files into assembler (.s), rather commit 524d40e5a2091088f5a28f16c996b757acbeb06b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 20:05:42 2015 +0200 Remove build script from the package diff --git a/pypy3.spec b/pypy3.spec index 3b40c9a..e992b00 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -644,6 +644,9 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d +# Remove build script from the package +rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py + %check topdir=$(pwd) commit cfca1560fdf042a07e2f7108eafc072b93f2617c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 20:01:21 2015 +0200 Use git in %autosetup to avoid .orig files diff --git a/pypy3.spec b/pypy3.spec index 2f9ed15..3b40c9a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -261,7 +261,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-2.4.0-src -p1 +%autosetup -n pypy3-2.4.0-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ commit 1120251a081f3a611d8d3f742b184985833e9998 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 19:58:39 2015 +0200 Change python-devel to python2-devel diff --git a/pypy3.spec b/pypy3.spec index 0c5b340..2f9ed15 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -170,7 +170,7 @@ BuildRequires: pypy # pypy3 can only be build with python2 -BuildRequires: python-devel +BuildRequires: python2-devel %global bootstrap_python_interp python %endif commit a7610e26e5c7a0bbaa8a7810daa04a625ae357af Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 19:51:45 2015 +0200 Don't mark RPM macros in /etc as %config diff --git a/pypy3.spec b/pypy3.spec index d9e54fd..0c5b340 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -801,7 +801,7 @@ CheckPyPy pypy3-stackless %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 +%{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless commit 7e82938b0f41850371be195e7be814fedd889d08 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:35:23 2015 +0200 Share the docdir across subpackages diff --git a/pypy3.spec b/pypy3.spec index 85a2dfc..d9e54fd 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -771,6 +771,10 @@ CheckPyPy pypy3-stackless %endif # run_selftests +# Because there's a bunch of binary subpackages and creating +# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that +# is just confusing for the user. +%global _docdir_fmt %{name} %files libs %license LICENSE commit 1842b1b13e95edfcea412981ed8f4cbe3e7a8383 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:26:21 2015 +0200 Require pypy3-libs with %{?_isa} diff --git a/pypy3.spec b/pypy3.spec index 93e53f0..85a2dfc 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -213,7 +213,7 @@ BuildRequires: emacs # Metadata for the core package (the JIT build): -Requires: pypy3-libs = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -245,7 +245,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: pypy3 = %{version}-%{release} +Requires: pypy3%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -255,7 +255,7 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif commit 7e5676a0456e5e3c711d481fe1e949c0448975ec Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:24:57 2015 +0200 Use %autosetup diff --git a/pypy3.spec b/pypy3.spec index 99c2a31..93e53f0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -261,10 +261,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%setup -q -n pypy3-2.4.0-src -%patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build -%patch1 -p1 -%patch2 -p1 +%autosetup -n pypy3-2.4.0-src -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ commit e7218e672da6a8e5c553080c36c8e72087e55817 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:16:19 2015 +0200 Use %license diff --git a/pypy3.spec b/pypy3.spec index 5bee793..99c2a31 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -776,7 +776,8 @@ CheckPyPy pypy3-stackless %files libs -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python @@ -791,7 +792,8 @@ CheckPyPy pypy3-stackless %endif %files -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{_bindir}/pypy3 %{pypyprefix}/pypy3 @@ -802,7 +804,8 @@ CheckPyPy pypy3-stackless %if 0%{with_stackless} %files stackless -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{_bindir}/pypy-stackless %endif commit 146960e8a0ae6b7d82f10d6a2c24e60cf3eadd59 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:15:27 2015 +0200 Removed deprecated statements diff --git a/pypy3.spec b/pypy3.spec index 95ee959..5bee793 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -10,7 +10,6 @@ Group: Development/Languages # licensing terms License: MIT and Python and UCD URL:
http://pypy.org/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # High-level configuration of the build: @@ -425,8 +424,6 @@ BuildPyPy \ %install -rm -rf $RPM_BUILD_ROOT - # Install the various executables: InstallPyPy() { @@ -778,12 +775,7 @@ CheckPyPy pypy3-stackless %endif # run_selftests -%clean -rm -rf $RPM_BUILD_ROOT - - %files libs -%defattr(-,root,root,-) %doc LICENSE README.rst %dir %{pypyprefix} @@ -799,20 +791,17 @@ rm -rf $RPM_BUILD_ROOT %endif %files -%defattr(-,root,root,-) %doc LICENSE README.rst %{_bindir}/pypy3 %{pypyprefix}/pypy3 %files devel -%defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h %config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless -%defattr(-,root,root,-) %doc LICENSE README.rst %{_bindir}/pypy-stackless %endif commit 26c3863db65451cb67c67cd4e72a826698ef7bdf Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Apr 25 00:48:59 2015 +0200 Change pypy2 spec to pypy3 diff --git a/.gitignore b/.gitignore index a61aa79..c9f3d9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1 @@ -/pypy-1.4.1-src.tar.bz2 -/pypy-1.5-src.tar.bz2 -/release-1.6.tar.bz2 -/release-1.7.tar.bz2 -/release-1.8.tar.bz2 -/release-1.9.tar.bz2 -/release-2.0-beta-1.tar.bz2 -/release-2.0.2.tar.bz2 -/release-2.1.0.tar.bz2 -/pypy-2.2-src.tar.bz2 -/pypy-2.2.1-src.tar.bz2 -/pypy-2.3-src.tar.bz2 -/release-2.3.1.tar.bz2 -/pypy-2.4.0-src.tar.bz2 +/pypy3-2.4.0-src.tar.bz2 diff --git a/macros.pypy b/macros.pypy deleted file mode 100644 index 5f40b6f..0000000 --- a/macros.pypy +++ /dev/null @@ -1,5 +0,0 @@ -%__pypy /usr/bin/pypy -%pypy_sitelib %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -%pypy_sitearch %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") -%pypy_version %(%{__pypy} -c "import sys; sys.stdout.write(sys.version[:3])") -%pypydir %{_builddir}/pypy-%{name}-%{version}-%{release} diff --git a/macros.pypy3 b/macros.pypy3 new file mode 100644 index 0000000..ef1f600 --- /dev/null +++ b/macros.pypy3 @@ -0,0 +1,5 @@ +%__pypy3 /usr/bin/pypy3 +%pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") +%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3dir %{_builddir}/pypy3-%{name}-%{version}-%{release} diff --git a/pypy.spec b/pypy3.spec similarity index 94% rename from pypy.spec rename to pypy3.spec index 4a3e56c..95ee959 100644 --- a/pypy.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ -Name: pypy +Name: pypy3 Version: 2.4.0 Release: 1%{?dist} -Summary: Python implementation with a Just-In-Time compiler +Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages # LGPL and another free license we'd need to ask spot about are present in some @@ -117,8 +117,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy-%{version} -%global pylibver 2.7 +%global pypyprefix %{_libdir}/pypy3-%{version} +%global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -130,11 +130,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy +Source2: macros.pypy3 # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -164,19 +164,15 @@ Patch2: 007-remove-startup-message.patch %global use_self_when_building 0 %if 0%{use_self_when_building} +# pypy3 can only be build with pypy2 BuildRequires: pypy %global bootstrap_python_interp pypy %else -# Python 2.6 or later is needed, so on RHEL5 (2.4) we need to use the alternate -# python26 rpm: -%if 0%{?rhel} == 5 -BuildRequires: python26-devel -%global bootstrap_python_interp python26 -%else + +# pypy3 can only be build with python2 BuildRequires: python-devel %global bootstrap_python_interp python -%endif %endif @@ -218,10 +214,10 @@ BuildRequires: emacs # Metadata for the core package (the JIT build): -Requires: pypy-libs = %{version}-%{release} +Requires: pypy3-libs = %{version}-%{release} %description -PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU +PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations of the standard types (strings, dictionaries, etc) @@ -235,7 +231,7 @@ CPU architecture. %package libs Group: Development/Languages -Summary: Run-time libraries used by PyPy implementations of Python +Summary: Run-time libraries used by PyPy implementations of Python 3 # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) @@ -244,39 +240,29 @@ Requires: emacs-filesystem >= %{_emacs_version} %endif %description libs -Libraries required by the various PyPy implementations of Python. +Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages -Summary: Development tools for working with PyPy -Requires: pypy = %{version}-%{release} +Summary: Development tools for working with PyPy3 +Requires: pypy3 = %{version}-%{release} %description devel -Header files for building C extension modules against PyPy +Header files for building C extension modules against PyPy3 %if 0%{with_stackless} %package stackless Group: Development/Languages -Summary: Stackless Python interpreter built using PyPy -Requires: pypy-libs = %{version}-%{release} +Summary: Stackless Python interpreter built using PyPy3 +Requires: pypy3-libs = %{version}-%{release} %description stackless -Build of PyPy with support for micro-threads for massive concurrency +Build of PyPy3 with support for micro-threads for massive concurrency %endif -%if 0%{with_stackless} -%package stackless -Group: Development/Languages -Summary: Stackless Python interpreter built using PyPy -Requires: pypy-libs = %{version}-%{release} -%description stackless -Build of PyPy with support for micro-threads for massive concurrency -%endif - - %prep -%setup -q -n pypy-2.4.0-src +%setup -q -n pypy3-2.4.0-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -295,8 +281,6 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done -rm -rf lib-python/3 - %build @@ -421,7 +405,7 @@ BuildPyPy() { } BuildPyPy \ - pypy \ + pypy3 \ %if 0%{with_jit} "-Ojit" \ %else @@ -431,7 +415,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - pypy-stackless \ + pypy3-stackless \ "--stackless" %endif @@ -479,10 +463,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy pypy +InstallPyPy pypy3 %if 0%{with_stackless} -InstallPyPy pypy-stackless +InstallPyPy pypy3-stackless %endif @@ -585,16 +569,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/pypy \ + %{buildroot}/%{_bindir}/pypy3 \ 0 -%{buildroot}/%{pypyprefix}/pypy -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/pypy -c 'import Tkinter' -%{buildroot}/%{pypyprefix}/pypy -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/pypy -c 'import _curses' -%{buildroot}/%{pypyprefix}/pypy -c 'import curses' -%{buildroot}/%{pypyprefix}/pypy -c 'import syslog' -%{buildroot}/%{pypyprefix}/pypy -c 'from _sqlite3 import *' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import tkinter' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _curses' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import curses' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy3 -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -658,7 +642,8 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: @@ -694,7 +679,7 @@ CheckPyPy() { # Use regrtest to explicitly list all tests: ( ./$ExeName -c \ - "from test.regrtest import findtests; print '\n'.join(findtests())" + "from test.regrtest import findtests; print('\n'.join(findtests()))" ) > testnames.txt # Skip some tests: @@ -784,10 +769,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy +CheckPyPy pypy3 %if 0%{with_stackless} -CheckPyPy pypy-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -809,21 +794,21 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypytrace-mode.el -%{_emacs_sitelispdir}/pypytrace-mode.elc +%{_emacs_sitelispdir}/pypy3trace-mode.el +%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif %files %defattr(-,root,root,-) %doc LICENSE README.rst -%{_bindir}/pypy -%{pypyprefix}/pypy +%{_bindir}/pypy3 +%{pypyprefix}/pypy3 %files devel %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy +%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless diff --git a/sources b/sources index ab6b8f5..e4d98b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6a25a212e7c5121f1f3988c118d05695 pypy-2.4.0-src.tar.bz2 +96ba72916114d16904e12562b5d84e51 pypy3-2.4.0-src.tar.bz2 commit e76c4a29685bfaf725af1ae1991d5b1fb7b7701c Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 23 12:20:25 2014 +0200 Update to 2.4.0 diff --git a/.gitignore b/.gitignore index 1babd6b..a61aa79 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /pypy-2.2.1-src.tar.bz2 /pypy-2.3-src.tar.bz2 /release-2.3.1.tar.bz2 +/pypy-2.4.0-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index daf5015..4a3e56c 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.3.1 -Release: 4%{?dist} +Version: 2.4.0 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.3.1.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -276,7 +276,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-32f35069a16d +%setup -q -n pypy-2.4.0-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -295,6 +295,8 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done +rm -rf lib-python/3 + %build @@ -832,6 +834,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Sep 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.4.0-1 +- Update to 2.4.0 + * Tue Sep 02 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-4 - Move devel subpackage requires so that it gets picked up by rpm diff --git a/sources b/sources index b80a17c..ab6b8f5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e9d26e6ed2ca809a791d88137e90629b release-2.3.1.tar.bz2 +6a25a212e7c5121f1f3988c118d05695 pypy-2.4.0-src.tar.bz2 commit f7434bab3f45aaf75e2d6b05664c9fd78197c10a Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 2 10:01:18 2014 +0200 Bump spec diff --git a/pypy.spec b/pypy.spec index 6f90d89..daf5015 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -832,6 +832,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 02 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-4 +- Move devel subpackage requires so that it gets picked up by rpm + * Sun Aug 17 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.1-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
commit 5efcdc8fe2e02fffb9ffce1004f3d25a8e86d593 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 2 09:57:46 2014 +0200 Move devel subpackage requires so that it gets picked up by rpm Up to this point it belonged to the description, so pypy-devel did not require pypy. diff --git a/pypy.spec b/pypy.spec index f811755..6f90d89 100644 --- a/pypy.spec +++ b/pypy.spec @@ -250,11 +250,11 @@ Libraries required by the various PyPy implementations of Python. %package devel Group: Development/Languages Summary: Development tools for working with PyPy +Requires: pypy = %{version}-%{release} + %description devel Header files for building C extension modules against PyPy -Requires: pypy = %{version}-%{release} - %if 0%{with_stackless} %package stackless commit 7498717b84a98b28987846d94baf9177cf5b36ee Author: Peter Robinson <pbrobinson(a)fedoraproject.org> Date: Sun Aug 17 20:41:57 2014 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 8ab5959..f811755 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -832,6 +832,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Aug 17 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.1-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+ * Mon Jul 7 2014 Peter Robinson <pbrobinson(a)fedoraproject.org> 2.3.1-2 - ARMv7 is supported for JIT - no prelink on aarch64/ppc64le commit 43ee7785260fd8f42b86e62be70de5bc361a34d7 Author: Peter Robinson <pbrobinson(a)gmail.com> Date: Mon Jul 7 23:07:38 2014 +0100 ARMv7 is supported for JIT, no prelink on aarch64/ppc64le diff --git a/pypy.spec b/pypy.spec index 7c4106a..8ab5959 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -78,20 +78,20 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # # Unfortunately, the JIT support is only available on some architectures. # -# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the +# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the # following options: # 'i386', 'x86' # 'x86-without-sse2': # 'x86_64' +# 'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI) # 'cli' # 'llvm' # # We will only build with JIT support on those architectures, and build without # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -# -%ifarch %{ix86} x86_64 -# FIXME: is there a better way of expressing "intel" here? + +%ifarch %{ix86} x86_64 %{arm} %global with_jit 1 %else %global with_jit 0 @@ -206,7 +206,10 @@ BuildRequires: time BuildRequires: perl %endif +# No prelink on these arches +%ifnarch aarch64 ppc64le BuildRequires: /usr/bin/execstack +%endif # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -466,7 +469,9 @@ InstallPyPy() { # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: +%ifnarch aarch64 ppc64le execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName +%endif } mkdir -p %{buildroot}/%{_bindir} @@ -827,6 +832,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jul 7 2014 Peter Robinson <pbrobinson(a)fedoraproject.org> 2.3.1-2 +- ARMv7 is supported for JIT +- no prelink on aarch64/ppc64le + * Sun Jun 08 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-1 - Update to 2.3.1 commit edc736c1c58fc920291a8e672c906b76d6e87a31 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Sun Jun 8 20:55:40 2014 +0200 Update to 2.3.1 diff --git a/.gitignore b/.gitignore index f59302b..1babd6b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /pypy-2.2-src.tar.bz2 /pypy-2.2.1-src.tar.bz2 /pypy-2.3-src.tar.bz2 +/release-2.3.1.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 96e21d5..7c4106a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.3 -Release: 5%{?dist} +Version: 2.3.1 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.3.1.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-394146e9bb67 +%setup -q -n pypy-pypy-32f35069a16d %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jun 08 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-1 +- Update to 2.3.1 + * Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources index 8f25b0c..b80a17c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c93a8e47f3b3109af2f66d2bd766eb97 pypy-2.3-src.tar.bz2 +e9d26e6ed2ca809a791d88137e90629b release-2.3.1.tar.bz2 commit 1972c9c31b94769515b1972a39a9d4efe493e6d6 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Sat Jun 7 13:12:20 2014 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 6bdb671..96e21d5 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+ * Tue May 27 2014 Dennis Gilmore <dennis(a)ausil.us> - 2.3-4 - valgrind is available everywhere except 31 bit s390 commit a0374180ff792eb0a2b41434d1a3a47efe340d3e Author: Dennis Gilmore <dennis(a)ausil.us> Date: Tue May 27 16:16:43 2014 -0500 valgrind is available everywhere except 31 bit s390 diff --git a/pypy.spec b/pypy.spec index 096bd7d..6bdb671 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -191,7 +191,7 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel -%ifarch %{ix86} x86_64 ppc ppc64 s390x +%ifnarch s390 BuildRequires: valgrind-devel %endif @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 27 2014 Dennis Gilmore <dennis(a)ausil.us> - 2.3-4 +- valgrind is available everywhere except 31 bit s390 + * Wed May 21 2014 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.3-3 - Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
commit ce731cfa651140b831eeeabd176c041b6f9f4943 Author: Jaroslav Škarvada <jskarvad(a)redhat.com> Date: Wed May 21 12:32:28 2014 +0200 - Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
diff --git a/pypy.spec b/pypy.spec index 39b18d8..096bd7d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed May 21 2014 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.3-3 +- Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
+ * Thu May 15 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-2 - Rebuilt (f21-python) commit a3993a30d37ff85750008622cc987a4650786896 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu May 15 12:20:24 2014 +0200 Rebuilt (f21-python) diff --git a/pypy.spec b/pypy.spec index 6e050f3..39b18d8 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu May 15 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-2 +- Rebuilt (f21-python) + * Tue May 13 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-1 - Updated to 2.3 commit db10290f0939d5c2dfd4d437bc2f98888752a48b Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Wed May 14 12:40:14 2014 +0200 Update to 2.3 diff --git a/.gitignore b/.gitignore index da7257b..f59302b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /release-2.1.0.tar.bz2 /pypy-2.2-src.tar.bz2 /pypy-2.2.1-src.tar.bz2 +/pypy-2.3-src.tar.bz2 diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index 1dddb69..2ff9068 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -2,7 +2,7 @@ diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46c --- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 +++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 @@ -4,7 +4,7 @@ import sys - import os + irc_header = "And now for something completely different" -def interactive_console(mainmodule=None, quiet=False): diff --git a/pypy.spec b/pypy.spec index c46997a..6e050f3 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.2.1 -Release: 3%{?dist} +Version: 2.3 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-2.2.1-src +%setup -q -n pypy-pypy-394146e9bb67 %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 13 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-1 +- Updated to 2.3 + * Mon Mar 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-3 - Put RPM macros in proper location diff --git a/sources b/sources index f8f0564..8f25b0c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ec9f48702323f9e93654ba73dd46720 pypy-2.2.1-src.tar.bz2 +c93a8e47f3b3109af2f66d2bd766eb97 pypy-2.3-src.tar.bz2 commit bca3bcda512353328ab9a768e28d0ac7b6904aa6 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Mar 11 09:05:43 2014 +0100 Also chenge files section diff --git a/pypy.spec b/pypy.spec index 85003c1..c46997a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -816,7 +816,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_sysconfdir}/rpm/macros.pypy +%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy %if 0%{with_stackless} %files stackless commit 4dbc78c1aab1cf75870cf055ad54a46262e3fafb Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Mar 10 09:17:48 2014 +0100 Also add changelog entry diff --git a/pypy.spec b/pypy.spec index 6e73099..85003c1 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Mar 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-3 +- Put RPM macros in proper location + * Thu Jan 16 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-2 - Fixed errors due to missing __pycache__ commit 355feb2755aa6396e4fa0b512652ce25c2502ca7 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Feb 3 13:24:01 2014 +0100 Put rpm macros in proper location diff --git a/pypy.spec b/pypy.spec index 8604207..6e73099 100644 --- a/pypy.spec +++ b/pypy.spec @@ -655,8 +655,8 @@ cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} %endif # Install macros for rpm: -mkdir -p %{buildroot}/%{_sysconfdir}/rpm -install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm +mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d +install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d %check topdir=$(pwd) commit f8a7311107aa7a76736e8e763a17148340131c32 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Fri Jan 17 10:46:17 2014 +0100 Fix errors due to missing __pycache__ diff --git a/pypy.spec b/pypy.spec index 21987ac..8604207 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -581,10 +581,13 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 -%{goal_dir}/pypy -c 'import _tkinter' -%{goal_dir}/pypy -c 'import _sqlite3' -%{goal_dir}/pypy -c 'import _curses' -%{goal_dir}/pypy -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/pypy -c 'import Tkinter' +%{buildroot}/%{pypyprefix}/pypy -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/pypy -c 'import _curses' +%{buildroot}/%{pypyprefix}/pypy -c 'import curses' +%{buildroot}/%{pypyprefix}/pypy -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -824,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 16 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-2 +- Fixed errors due to missing __pycache__ + * Thu Dec 05 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-1 - Updated to 2.2.1 - Several bundled modules (tkinter, sqlite3, curses, syslog) were commit 2cbecfd01cab504997f12fd8b434035e083dcec6 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu Jan 2 10:47:41 2014 +0100 Update to 2.2.1 diff --git a/.gitignore b/.gitignore index fa54eea..da7257b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /release-2.0.2.tar.bz2 /release-2.1.0.tar.bz2 /pypy-2.2-src.tar.bz2 +/pypy-2.2.1-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index cfb219f..21987ac 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,5 +1,5 @@ Name: pypy -Version: 2.2.0 +Version: 2.2.1 Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-2.2-src +%setup -q -n pypy-2.2.1-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -768,6 +768,11 @@ CheckPyPy() { echo "--------------------------------------------------------------" } +#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600 +#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python +#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test +#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log + %if %{run_selftests} CheckPyPy pypy @@ -819,6 +824,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Dec 05 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-1 +- Updated to 2.2.1 +- Several bundled modules (tkinter, sqlite3, curses, syslog) were + not bytecompiled properly during build, that is now fixed +- prepared new tests, not enabled yet + * Thu Nov 14 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.0-1 - Updated to 2.2.0 diff --git a/sources b/sources index d5b9932..f8f0564 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5a5a3822605d7d811066b1b279da3c6e pypy-2.2-src.tar.bz2 +7ec9f48702323f9e93654ba73dd46720 pypy-2.2.1-src.tar.bz2 commit a79a105a7453f9b3f55d296774b2b28a256d8318 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu Jan 2 10:45:26 2014 +0100 Bytecompiled bunch of modules diff --git a/pypy.spec b/pypy.spec index cd225b9..cfb219f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -181,6 +181,10 @@ BuildRequires: python-devel %endif BuildRequires: libffi-devel +BuildRequires: tcl-devel +BuildRequires: tk-devel + +BuildRequires: sqlite-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel @@ -577,6 +581,10 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 +%{goal_dir}/pypy -c 'import _tkinter' +%{goal_dir}/pypy -c 'import _sqlite3' +%{goal_dir}/pypy -c 'import _curses' +%{goal_dir}/pypy -c 'import syslog' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) commit 66ffb916e263ca7b45e75d7a209248c04f918264 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Nov 12 10:19:28 2013 +0100 Updated to 2.2.0 diff --git a/.gitignore b/.gitignore index cad553e..fa54eea 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /release-2.0-beta-1.tar.bz2 /release-2.0.2.tar.bz2 /release-2.1.0.tar.bz2 +/pypy-2.2-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index e7ef81f..cd225b9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,5 +1,5 @@ Name: pypy -Version: 2.1.0 +Version: 2.2.0 Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.1.0.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -162,7 +162,7 @@ Patch2: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -%global use_self_when_building 1 +%global use_self_when_building 0 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -269,7 +269,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-352c78d2e80f +%setup -q -n pypy-2.2-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -811,6 +811,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Nov 14 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.0-1 +- Updated to 2.2.0 + * Thu Aug 15 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.1-1 - Updated to 2.1.0 diff --git a/sources b/sources index fff5a1a..d5b9932 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59af571317843a1759cb1ff392c26260 release-2.1.0.tar.bz2 +5a5a3822605d7d811066b1b279da3c6e pypy-2.2-src.tar.bz2 commit febbbdb0e4b360dffdd77a04e5101afc16e463a8 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Fri Aug 16 10:12:29 2013 +0200 Updated to 2.1.0 diff --git a/.gitignore b/.gitignore index 63a65d6..cad553e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /release-1.9.tar.bz2 /release-2.0-beta-1.tar.bz2 /release-2.0.2.tar.bz2 +/release-2.1.0.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 1c72138..e7ef81f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,8 +1,6 @@ -%global alphatag b1 - Name: pypy -Version: 2.0.2 -Release: 5%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,50 +130,28 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.1.0.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy - -# Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: config.patch +Source2: macros.pypy # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch - -# Try to improve the readability of the generated .c code, by adding in the -# RPython source as comments where possible. -# A version of this was sent upstream as: -#
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
-# TODO: get this into the upstream bug tracker, and finish inlining -# support (rhbz#666963) -Patch4: more-readable-c-code.patch - -# In my koji builds, /root/bin is in the PATH for some reason -# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" -# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising -# OSError: [Errno 13] Permission denied -# when it tries to read /root/bin, rather than raising "No such file" -# -# Work around this by specifying an absolute path for the non-existant -# executable -# Not yet sent upstream -Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +Patch0: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler # and linker are captured: -Patch6: 006-always-log-stdout.patch +Patch1: 006-always-log-stdout.patch # Disable the printing of a quote from IRC on startup (these are stored in # ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could # cause confusion for end-users (and many are in-jokes within the PyPy # community that won't make sense outside of it). [Sorry to be a killjoy] -Patch7: 007-remove-startup-message.patch +Patch2: 007-remove-startup-message.patch # Build-time requirements: @@ -186,37 +162,7 @@ Patch7: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -# I'm disabling the self-hosting for now, due to a fatal error seen inside the -# JIT, presumably whilst JIT-compiling something within the translator's -# inliner. -# -# Specifically, building pypy-1.4.1-7.fc15.src.rpm on x86_64 using pypy-1.4.1-5.fc15.x86_64 -#
http://koji.fedoraproject.org/koji/taskinfo?taskID=2721517
-# failed with this RPython traceback: -# ... snip ... -# [rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctransform.asmgcroot.ShapeDecompressor instance at 0x00000000f0b5bc80> has no attribute 'addr' -# [rtyper] specializing: 179300 / 180508 blocks (99%) -# [rtyper] specializing: 180500 / 180566 blocks (99%) -# [rtyper] -=- specialized 1363 more blocks -=- -# [rtyper] specializing: 180600 / 180777 blocks (99%) -# [rtyper] -=- specialized 211 more blocks -=- -# [backendopt:inlining] phase with threshold factor: 32.4 -# [backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic -# [x86/regalloc] Bogus arg in operation 76 at 0 -# RPython traceback: -# File "implement_62.c", line 39979, in send_bridge_to_backend -# File "implement_69.c", line 65301, in Assembler386_assemble_bridge -# File "implement_72.c", line 8078, in RegAlloc_prepare_bridge -# File "implement_40.c", line 53061, in RegAlloc__prepare -# File "implement_44.c", line 14305, in RegAlloc__compute_vars_longevity -# Fatal RPython error: NotImplementedError -# -# This appears to be deep within pypy/jit/backend/x86/regalloc.py which has -# called "not_implemented" to emit this message to stderr, before raising the -# exception: -# [x86/regalloc] Bogus arg in operation 76 at 0 - -%global use_self_when_building 0 +%global use_self_when_building 1 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -234,12 +180,6 @@ BuildRequires: python-devel %endif - -# FIXME: I'm seeing errors like this in the logs: -# [translation:WARNING] The module '_rawffi' is disabled -# [translation:WARNING] because importing pypy.rlib.libffi raised ImportError -# [translation:WARNING] 'libffi.a' not found in ['/usr/lib/libffi', '/usr/lib'] -# Presumably we need to fix things to support dynamically-linked libffi BuildRequires: libffi-devel BuildRequires: zlib-devel @@ -269,11 +209,6 @@ BuildRequires: /usr/bin/execstack BuildRequires: emacs %endif -# pypy is bundling these so we delete them in %%prep. I don't think they are -# needed unless we build pypy targetted at running on the jvm. -#BuildRequires: jna -#BuildRequires: jasmin # Not yet in Fedora - # Metadata for the core package (the JIT build): Requires: pypy-libs = %{version}-%{release} @@ -334,47 +269,10 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-f66246c46ca3 -%patch0 -p1 -b .configure-fedora -%patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build - -# Disabled for now, as it needs regenerating for 1.8 -#patch4 -p1 -b .more-readable-c-code -# Fails on 1.8 with this error: -# [translation:ERROR] Error: -# [translation:ERROR] Traceback (most recent call last): -# [translation:ERROR] File "translate.py", line 309, in main -# [translation:ERROR] drv.proceed(goals) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 811, in proceed -# [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/tool/taskengine.py", line 116, in _execute -# [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 287, in _do -# [translation:ERROR] res = func() -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 530, in task_source_c -# [translation:ERROR] exe_name=exe_name) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 252, in generate_source -# [translation:ERROR] split=self.split) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 989, in gen_source -# [translation:ERROR] sg.gen_readable_parts_of_source(f) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 843, in gen_readable_parts_of_source -# [translation:ERROR] for node, impl in nodeiter: -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 729, in subiter -# [translation:ERROR] impl = '\n'.join(list(node.implementation())).split('\n') -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 867, in implementation -# [translation:ERROR] for s in self.funcgen_implementation(funcgen): -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 901, in funcgen_implementation -# [translation:ERROR] for line in bodyiter: -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 272, in cfunction_body -# [translation:ERROR] blocks.sort(block_comparator) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 34, in block_comparator -# [translation:ERROR] if blk0.isstartblock: -# [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' - -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 - +%setup -q -n pypy-pypy-352c78d2e80f +%patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build +%patch1 -p1 +%patch2 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -383,15 +281,6 @@ find -name "*.py" -exec \ "{}" \ \; -find . -name '*.jar' -exec rm \{\} \; - -# Remove stray ".svn" directories present within the 1.4.1 tarball -# (reported as
https://codespeak.net/issue/pypy-dev/issue612
) -find . -path '*/.svn*' -delete - -# Remove DOS batch files: -find -name "*.bat"|xargs rm -f - for f in rpython/translator/goal/bpnn.py ; do # Detect shebang lines && remove them: sed -e '/^#!/Q 0' -e 'Q 1' $f \ @@ -399,6 +288,7 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done + %build BuildPyPy() { @@ -540,10 +430,10 @@ BuildPyPy \ %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif + %install rm -rf $RPM_BUILD_ROOT - # Install the various executables: InstallPyPy() { @@ -921,6 +811,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 15 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.1-1 +- Updated to 2.1.0 + * Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0.2-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources index a37f747..fff5a1a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -328a509c092b5477f99be8dd452d81c2 release-2.0.2.tar.bz2 +59af571317843a1759cb1ff392c26260 release-2.1.0.tar.bz2 commit 309e1cf6aab2cc2ecf9ae9897a22f271a9d4fb9c Author: Dennis Gilmore <dennis(a)ausil.us> Date: Sun Aug 4 01:04:23 2013 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 8f28baf..1c72138 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0.2-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+ * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-4 - Patch1 fix commit b4e1c2185a5384e5ba4d898fe7fbca0ad3db45c2 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 10:44:06 2013 +0200 Patch1 fix diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch index 257f60f..c97eaf3 100644 --- a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +++ b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch @@ -1,7 +1,6 @@ -diff --git a/pypy/tool/ansi_print.py b/pypy/tool/ansi_print.py -index 3eff27c..fac4ba2 100644 ---- a/pypy/tool/ansi_print.py -+++ b/pypy/tool/ansi_print.py +diff -rup pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py +--- pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-27 10:35:37.648237156 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-28 10:15:58.200426205 +0200 @@ -25,7 +25,7 @@ class AnsiLog: self.kw_to_color = self.KW_TO_COLOR.copy() self.kw_to_color.update(kw_to_color) diff --git a/pypy.spec b/pypy.spec index 2470609..8f28baf 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-4 +- Patch1 fix + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-3 - Yet another Sources fix commit 8c737bc2aa985ae04d4540daefef663e827f8ba2 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 10:29:01 2013 +0200 Yet another Sources fix diff --git a/.gitignore b/.gitignore index 2793282..63a65d6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /release-1.8.tar.bz2 /release-1.9.tar.bz2 /release-2.0-beta-1.tar.bz2 +/release-2.0.2.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 66a66a9..2470609 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2#/pypy-pypy-f66246…
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-3 +- Yet another Sources fix + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-2 - Fixed Source URL diff --git a/sources b/sources index e7d211b..a37f747 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4a346df59983e4a5c50e8ee211f80619 release-2.0-beta-1.tar.bz2 +328a509c092b5477f99be8dd452d81c2 release-2.0.2.tar.bz2 commit 5694529edb24cba3edd56720cee077b791e8378c Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 09:24:07 2013 +0200 Fixed Source URL diff --git a/pypy.spec b/pypy.spec index 1ce9198..66a66a9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2#/pypy-pypy-f66246…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-2 +- Fixed Source URL + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-1 - 2.0.2, patch 8 does not seem necessary anymore commit c3a10ade23f8dac35b5ef0edc6f2c23856705044 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 08:57:35 2013 +0200 Updated to 2.0.2 diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch index 2df1f00..5d49335 100644 --- a/006-always-log-stdout.patch +++ b/006-always-log-stdout.patch @@ -1,6 +1,7 @@ ---- pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py.always_log_stdout 2012-07-06 11:13:46.878979461 -0400 -+++ pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py 2012-07-06 11:25:26.281235732 -0400 -@@ -126,6 +126,8 @@ class Platform(object): +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:35:37.680237338 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:41:04.113098738 +0200 +@@ -138,6 +138,8 @@ class Platform(object): self._handle_error(returncode, stdout, stderr, outname) def _handle_error(self, returncode, stdout, stderr, outname): diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index e05586b..1dddb69 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -1,21 +1,12 @@ ---- pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py.remove_startup_message 2012-07-06 12:10:46.504228264 -0400 -+++ pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py 2012-07-06 12:11:01.986034714 -0400 -@@ -13,18 +13,6 @@ def interactive_console(mainmodule=None) - sys.ps2 = '.... ' - # - try: -- from _pypy_irc_topic import some_topic -- text = "And now for something completely different: ``%s''" % ( -- some_topic(),) -- while len(text) >= 80: -- i = text[:80].rfind(' ') -- print text[:i] -- text = text[i+1:] -- print text -- except ImportError: -- pass -- # -- try: - if not os.isatty(sys.stdin.fileno()): - # Bail out if stdin is not tty-like, as pyrepl wouldn't be happy - # For example, with: +diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py +--- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 ++++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 +@@ -4,7 +4,7 @@ import sys + import os + + +-def interactive_console(mainmodule=None, quiet=False): ++def interactive_console(mainmodule=None, quiet=True): + # set sys.{ps1,ps2} just before invoking the interactive interpreter. This + # mimics what CPython does in pythonrun.c + if not hasattr(sys, 'ps1'): diff --git a/config.patch b/config.patch index a11f397..bf81d7d 100644 --- a/config.patch +++ b/config.patch @@ -1,7 +1,7 @@ -diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-2346207d9946/pypy/translator/platform/linux.py ---- pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/pypy/translator/platform/linux.py 2012-02-10 09:06:20.393066016 -0500 -@@ -31,13 +31,14 @@ class BaseLinux(BasePosix): +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:35:37.679237332 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:47:41.506354482 +0200 +@@ -32,19 +32,20 @@ class BaseLinux(BasePosix): return self._pkg_config("libffi", "--libs-only-L", ['/usr/lib/libffi']) @@ -9,15 +9,27 @@ diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedo - # places where we need to look for libffi.a - # XXX obscuuure! only look for libffi.a if run with translate.py - if 'translate' in sys.modules: -- return self.library_dirs_for_libffi() + ['/usr/lib'] +- if sys.maxint > 2**32: +- host = 'x86_64' +- else: +- host = 'x86' +- return self.library_dirs_for_libffi() + [ +- '/usr/lib', +- '/usr/lib/%s-linux-gnu/' % host] - else: - return [] -+ # Fedora, at least, has the shared version but not the static: ++ #Fedora, at least, has the shared version but not the static: + #def library_dirs_for_libffi_a(self): + # # places where we need to look for libffi.a + # # XXX obscuuure! only look for libffi.a if run with translate.py + # if 'translate' in sys.modules: -+ # return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # if sys.maxint > 2**32: ++ # host = 'x86_64' ++ # else: ++ # host = 'x86' ++ # return self.library_dirs_for_libffi() + [ ++ # '/usr/lib', ++ # '/usr/lib/%s-linux-gnu/' % host] + # else: + # return [] diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch index 9071be5..2391f32 100644 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -1,6 +1,7 @@ ---- pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py.orig 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py 2012-02-10 09:14:08.312216221 -0500 -@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): +diff -rup pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-27 10:35:37.762237806 +0200 ++++ pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-28 10:13:03.182536196 +0200 +@@ -587,7 +587,7 @@ class ProcessTestCase(BaseTestCase): for i in range(1024): # Windows raises IOError. Others raise OSError. with self.assertRaises(EnvironmentError) as c: diff --git a/pypy.spec b/pypy.spec index dbcbc8d..1ce9198 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,8 +1,8 @@ %global alphatag b1 Name: pypy -Version: 2.0 -Release: 0.2.%{alphatag}%{?dist} +Version: 2.0.2 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -123,7 +123,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %global pylibver 2.7 # We refer to this subdir of the source tree in a few places during the build: -%global goal_dir pypy/translator/goal +%global goal_dir pypy/goal # Turn off the brp-python-bytecompile postprocessing script @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -177,21 +177,6 @@ Patch6: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch7: 007-remove-startup-message.patch -# With pypy-1.9-1.fc17.x86_64, the pypy binary exposes about 200k symbols to -# the dynamic linker: -# $ eu-readelf -s $(which pypy) | head -# Symbol table [ 5] '.dynsym' contains 194163 entries: -# which is far more than necessary. -# Fix the version script for the linker as invoked thus in the Makefile: -# "-Wl,--export-dynamic,--version-script=../dynamic-symbols-6" -# so that it contains a "local: *;" clause, thus hiding the bulk of the -# symbols from the dynamic linker. -# Ideally we'd add: -# __attribute__ ((visibility ("hidden"))) -# to most symbols, allowing the compiler to potentially generate better code. -# Not yet reported upstream -Patch8: 008-fix-dynamic-symbols-script.patch - # Build-time requirements: @@ -349,7 +334,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-07e08e9c885c +%setup -q -n pypy-pypy-f66246c46ca3 %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -389,7 +374,6 @@ Build of PyPy with support for micro-threads for massive concurrency %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: @@ -408,9 +392,7 @@ find . -path '*/.svn*' -delete # Remove DOS batch files: find -name "*.bat"|xargs rm -f -# The "demo" directory gets auto-installed by virture of being listed in %doc -# Remove shebang lines from demo .py files, and remove executability from them: -for f in demo/bpnn.py ; do +for f in rpython/translator/goal/bpnn.py ; do # Detect shebang lines && remove them: sed -e '/^#!/Q 0' -e 'Q 1' $f \ && sed -i '1d' $f @@ -522,15 +504,11 @@ BuildPyPy() { RPM_BUILD_ROOT= \ PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ - $INTERP translate.py \ -%if 0%{verbose_logs} - --translation-verbose \ -%endif - --cflags="$CFLAGS" \ - --batch \ + $INTERP ../../rpython/bin/rpython \ --output=$ExeName \ %{gcrootfinder_options} \ - $Options + $Options \ + targetpypystandalone echo "--------------------------------------------------------------" echo "--------------------------------------------------------------" @@ -559,7 +537,7 @@ BuildPyPy \ %endif %if %{with_emacs} -%{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el +%{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif %install @@ -772,7 +750,7 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} %endif # Install macros for rpm: @@ -908,7 +886,7 @@ rm -rf $RPM_BUILD_ROOT %files libs %defattr(-,root,root,-) -%doc LICENSE README demo +%doc LICENSE README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python @@ -924,7 +902,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy %{pypyprefix}/pypy @@ -937,12 +915,15 @@ rm -rf $RPM_BUILD_ROOT %if 0%{with_stackless} %files stackless %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy-stackless %endif %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-1 +- 2.0.2, patch 8 does not seem necessary anymore + * Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0-0.2.b1 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
commit fd80b8a933ad44429dfb88ee58aecaf24faf9135 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Thu Feb 14 12:48:36 2013 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index b29583d..dbcbc8d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0 -Release: 0.1.%{alphatag}%{?dist} +Release: 0.2.%{alphatag}%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -943,6 +943,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0-0.2.b1 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+ * Tue Dec 11 2012 David Malcolm <dmalcolm(a)redhat.com> - 2.0-0.1.b1 - 2.0b1 (drop upstreamed patch 9) commit 8e0c0345a5ec642705520ed20aad13dfb15ec7c2 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Dec 13 06:16:11 2012 -0500 2.0-0.1.b1 diff --git a/.gitignore b/.gitignore index 4c551cc..2793282 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /release-1.7.tar.bz2 /release-1.8.tar.bz2 /release-1.9.tar.bz2 +/release-2.0-beta-1.tar.bz2 diff --git a/009-add-PyInt_AsUnsignedLongLongMask.patch b/009-add-PyInt_AsUnsignedLongLongMask.patch deleted file mode 100644 index dae7e16..0000000 --- a/009-add-PyInt_AsUnsignedLongLongMask.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/pypy/module/cpyext/intobject.py b/pypy/module/cpyext/intobject.py ---- a/pypy/module/cpyext/intobject.py -+++ b/pypy/module/cpyext/intobject.py -@@ -6,7 +6,7 @@ - PyObject, PyObjectFields, CONST_STRING, CANNOT_FAIL, Py_ssize_t) - from pypy.module.cpyext.pyobject import ( - make_typedescr, track_reference, RefcountState, from_ref) --from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST -+from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST, r_ulonglong - from pypy.objspace.std.intobject import W_IntObject - import sys - -@@ -83,6 +83,20 @@ - num = space.bigint_w(w_int) - return num.uintmask() - -+@cpython_api([PyObject], rffi.ULONGLONG, error=-1) -+def PyInt_AsUnsignedLongLongMask(space, w_obj): -+ """Will first attempt to cast the object to a PyIntObject or -+ PyLongObject, if it is not already one, and then return its value as -+ unsigned long long, without checking for overflow. -+ """ -+ w_int = space.int(w_obj) -+ if space.is_true(space.isinstance(w_int, space.w_int)): -+ num = space.int_w(w_int) -+ return r_ulonglong(num) -+ else: -+ num = space.bigint_w(w_int) -+ return num.ulonglongmask() -+ - @cpython_api([PyObject], lltype.Signed, error=CANNOT_FAIL) - def PyInt_AS_LONG(space, w_int): - """Return the value of the object w_int. No error checking is performed.""" -diff --git a/pypy/module/cpyext/test/test_intobject.py b/pypy/module/cpyext/test/test_intobject.py ---- a/pypy/module/cpyext/test/test_intobject.py -+++ b/pypy/module/cpyext/test/test_intobject.py -@@ -34,6 +34,11 @@ - assert (api.PyInt_AsUnsignedLongMask(space.wrap(10**30)) - == 10**30 % ((sys.maxint + 1) * 2)) - -+ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(sys.maxint)) -+ == sys.maxint) -+ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(10**30)) -+ == 10**30 % (2**64)) -+ - def test_coerce(self, space, api): - class Coerce(object): - def __int__(self): diff --git a/pypy.spec b/pypy.spec index 057fbdd..b29583d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,8 @@ +%global alphatag b1 + Name: pypy -Version: 1.9 -Release: 4%{?dist} +Version: 2.0 +Release: 0.1.%{alphatag}%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -191,12 +193,6 @@ Patch7: 007-remove-startup-message.patch Patch8: 008-fix-dynamic-symbols-script.patch -# Cherrypick upstream patch to add PyInt_AsUnsignedLongLongMask (used by -# the rpm python bindings); see
https://bugs.pypy.org/issue1211
-# This is
https://bitbucket.org/pypy/pypy/changeset/542d481517d3
-Patch9: 009-add-PyInt_AsUnsignedLongLongMask.patch - - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -353,7 +349,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-341e1e3821ff +%setup -q -n pypy-pypy-07e08e9c885c %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -394,7 +390,6 @@ Build of PyPy with support for micro-threads for massive concurrency %patch6 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: @@ -631,6 +626,10 @@ cp -a lib_pypy %{buildroot}/%{pypyprefix} # Remove a text file that documents which selftests fail on Win32: rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt +# Remove a text file containing upstream's recipe for syncing stdlib in +# their hg repository with cpython's: +rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt + # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: find \ @@ -944,6 +943,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 11 2012 David Malcolm <dmalcolm(a)redhat.com> - 2.0-0.1.b1 +- 2.0b1 (drop upstreamed patch 9) + * Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.9-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/sources b/sources index 2a64332..e7d211b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f92c0171a9578a3e4a0f74947ec596ab release-1.9.tar.bz2 +4a346df59983e4a5c50e8ee211f80619 release-2.0-beta-1.tar.bz2 commit cd9f89c255519e6d52d820882b9cc72cc74932b7 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Fri Jul 20 23:22:27 2012 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 2ed932b..057fbdd 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -944,6 +944,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.9-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+ * Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 - log all output from "make" (patch 6) - disable the MOTD at startup (patch 7) commit 26f62305fe07f9429bb6f4dc47d8749d7bd8ca7f Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Jul 10 16:45:52 2012 -0400 1.9-3 * Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 - log all output from "make" (patch 6) - disable the MOTD at startup (patch 7) - hide symbols from the dynamic linker (patch 8) - add PyInt_AsUnsignedLongLongMask (patch 9) - capture the Makefile, the typeids.txt, and the dynamic-symbols file within the debuginfo package diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch new file mode 100644 index 0000000..2df1f00 --- /dev/null +++ b/006-always-log-stdout.patch @@ -0,0 +1,11 @@ +--- pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py.always_log_stdout 2012-07-06 11:13:46.878979461 -0400 ++++ pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py 2012-07-06 11:25:26.281235732 -0400 +@@ -126,6 +126,8 @@ class Platform(object): + self._handle_error(returncode, stdout, stderr, outname) + + def _handle_error(self, returncode, stdout, stderr, outname): ++ for line in stdout.splitlines(): ++ log.message(line) + if returncode != 0: + errorfile = outname.new(ext='errors') + errorfile.write(stderr, 'wb') diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch new file mode 100644 index 0000000..e05586b --- /dev/null +++ b/007-remove-startup-message.patch @@ -0,0 +1,21 @@ +--- pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py.remove_startup_message 2012-07-06 12:10:46.504228264 -0400 ++++ pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py 2012-07-06 12:11:01.986034714 -0400 +@@ -13,18 +13,6 @@ def interactive_console(mainmodule=None) + sys.ps2 = '.... ' + # + try: +- from _pypy_irc_topic import some_topic +- text = "And now for something completely different: ``%s''" % ( +- some_topic(),) +- while len(text) >= 80: +- i = text[:80].rfind(' ') +- print text[:i] +- text = text[i+1:] +- print text +- except ImportError: +- pass +- # +- try: + if not os.isatty(sys.stdin.fileno()): + # Bail out if stdin is not tty-like, as pyrepl wouldn't be happy + # For example, with: diff --git a/008-fix-dynamic-symbols-script.patch b/008-fix-dynamic-symbols-script.patch new file mode 100644 index 0000000..5b1d551 --- /dev/null +++ b/008-fix-dynamic-symbols-script.patch @@ -0,0 +1,15 @@ +diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py +--- a/pypy/translator/platform/posix.py ++++ b/pypy/translator/platform/posix.py +@@ -48,8 +48,10 @@ + response_file = self._make_response_file("dynamic-symbols-") + f = response_file.open("w") + f.write("{\n") ++ f.write(" global:\n") + for sym in eci.export_symbols: +- f.write("%s;\n" % (sym,)) ++ f.write(" %s;\n" % (sym,)) ++ f.write(" local:*;\n") + f.write("};") + f.close() + diff --git a/009-add-PyInt_AsUnsignedLongLongMask.patch b/009-add-PyInt_AsUnsignedLongLongMask.patch new file mode 100644 index 0000000..dae7e16 --- /dev/null +++ b/009-add-PyInt_AsUnsignedLongLongMask.patch @@ -0,0 +1,48 @@ +diff --git a/pypy/module/cpyext/intobject.py b/pypy/module/cpyext/intobject.py +--- a/pypy/module/cpyext/intobject.py ++++ b/pypy/module/cpyext/intobject.py +@@ -6,7 +6,7 @@ + PyObject, PyObjectFields, CONST_STRING, CANNOT_FAIL, Py_ssize_t) + from pypy.module.cpyext.pyobject import ( + make_typedescr, track_reference, RefcountState, from_ref) +-from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST ++from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST, r_ulonglong + from pypy.objspace.std.intobject import W_IntObject + import sys + +@@ -83,6 +83,20 @@ + num = space.bigint_w(w_int) + return num.uintmask() + ++@cpython_api([PyObject], rffi.ULONGLONG, error=-1) ++def PyInt_AsUnsignedLongLongMask(space, w_obj): ++ """Will first attempt to cast the object to a PyIntObject or ++ PyLongObject, if it is not already one, and then return its value as ++ unsigned long long, without checking for overflow. ++ """ ++ w_int = space.int(w_obj) ++ if space.is_true(space.isinstance(w_int, space.w_int)): ++ num = space.int_w(w_int) ++ return r_ulonglong(num) ++ else: ++ num = space.bigint_w(w_int) ++ return num.ulonglongmask() ++ + @cpython_api([PyObject], lltype.Signed, error=CANNOT_FAIL) + def PyInt_AS_LONG(space, w_int): + """Return the value of the object w_int. No error checking is performed.""" +diff --git a/pypy/module/cpyext/test/test_intobject.py b/pypy/module/cpyext/test/test_intobject.py +--- a/pypy/module/cpyext/test/test_intobject.py ++++ b/pypy/module/cpyext/test/test_intobject.py +@@ -34,6 +34,11 @@ + assert (api.PyInt_AsUnsignedLongMask(space.wrap(10**30)) + == 10**30 % ((sys.maxint + 1) * 2)) + ++ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(sys.maxint)) ++ == sys.maxint) ++ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(10**30)) ++ == 10**30 % (2**64)) ++ + def test_coerce(self, space, api): + class Coerce(object): + def __int__(self): diff --git a/pypy.spec b/pypy.spec index e579720..2ed932b 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -164,6 +164,39 @@ Patch4: more-readable-c-code.patch # Not yet sent upstream Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +# Patch pypy.translator.platform so that stdout from "make" etc gets logged, +# rather than just stderr, so that the command-line invocations of the compiler +# and linker are captured: +Patch6: 006-always-log-stdout.patch + +# Disable the printing of a quote from IRC on startup (these are stored in +# ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could +# cause confusion for end-users (and many are in-jokes within the PyPy +# community that won't make sense outside of it). [Sorry to be a killjoy] +Patch7: 007-remove-startup-message.patch + +# With pypy-1.9-1.fc17.x86_64, the pypy binary exposes about 200k symbols to +# the dynamic linker: +# $ eu-readelf -s $(which pypy) | head +# Symbol table [ 5] '.dynsym' contains 194163 entries: +# which is far more than necessary. +# Fix the version script for the linker as invoked thus in the Makefile: +# "-Wl,--export-dynamic,--version-script=../dynamic-symbols-6" +# so that it contains a "local: *;" clause, thus hiding the bulk of the +# symbols from the dynamic linker. +# Ideally we'd add: +# __attribute__ ((visibility ("hidden"))) +# to most symbols, allowing the compiler to potentially generate better code. +# Not yet reported upstream +Patch8: 008-fix-dynamic-symbols-script.patch + + +# Cherrypick upstream patch to add PyInt_AsUnsignedLongLongMask (used by +# the rpm python bindings); see
https://bugs.pypy.org/issue1211
+# This is
https://bitbucket.org/pypy/pypy/changeset/542d481517d3
+Patch9: 009-add-PyInt_AsUnsignedLongLongMask.patch + + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -358,6 +391,11 @@ Build of PyPy with support for micro-threads for massive concurrency # [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 + # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -696,15 +734,31 @@ mkdir -p %{buildroot}%{pypy_debuginfo_dir} # copy over everything: cp -a pypy %{buildroot}%{pypy_debuginfo_dir} -# ...then delete files that aren't .py files: +# ...then delete files that aren't: +# - *.py files +# - the Makefile +# - typeids.txt +# - dynamic-symbols-* find \ - %{buildroot}%{pypy_debuginfo_dir} \ - \( -type f \ - -a \ - \! -name "*.py" \ - \) \ + %{buildroot}%{pypy_debuginfo_dir} \ + \( -type f \ + -a \ + \! \( -name "*.py" \ + -o \ + -name "Makefile" \ + -o \ + -name "typeids.txt" \ + -o \ + -name "dynamic-symbols-*" \ + \) \ + \) \ -delete +# Alternatively, we could simply keep everything. This leads to a ~350MB +# debuginfo package, but it makes it easy to hack on the Makefile and C build +# flags by rebuilding/linking the sources. +# To do so, remove the above "find" command. + # We don't need bytecode for these files; they are being included for reference # purposes. # There are some rpmlint warnings from these files: @@ -890,6 +944,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 +- log all output from "make" (patch 6) +- disable the MOTD at startup (patch 7) +- hide symbols from the dynamic linker (patch 8) +- add PyInt_AsUnsignedLongLongMask (patch 9) +- capture the Makefile, the typeids.txt, and the dynamic-symbols file within +the debuginfo package + * Mon Jun 18 2012 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.9-2 - Compile with PIC, fixes FTBFS on ARM commit 92ec0ebc5bf5746a03e45726d8e300ef51ff7940 Author: Peter Robinson <pbrobinson(a)gmail.com> Date: Mon Jun 18 09:50:36 2012 +0100 Compile with PIC, fixes FTBFS on ARM diff --git a/pypy.spec b/pypy.spec index 80b4039..e579720 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -471,7 +471,7 @@ BuildPyPy() { # The generated C code leads to many thousands of warnings of the form: # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] # Suppress them: - export CFLAGS=$(echo "$CFLAGS" -Wno-unused) + export CFLAGS=$(echo "$CFLAGS" -Wno-unused -fPIC) # If we're already built the JIT-enabled "pypy", then use it for subsequent # builds (of other configurations): @@ -890,6 +890,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 18 2012 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.9-2 +- Compile with PIC, fixes FTBFS on ARM + * Fri Jun 8 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-1 - 1.9 commit 615fd77fe04457d552feff9d10986589b35a6148 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Wed Jun 13 11:11:16 2012 -0400 upload 1.9 tarball diff --git a/.gitignore b/.gitignore index 86ec921..4c551cc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /release-1.6.tar.bz2 /release-1.7.tar.bz2 /release-1.8.tar.bz2 +/release-1.9.tar.bz2 diff --git a/sources b/sources index 30a988e..2a64332 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -661be06978fdc907d84f0ee1f1228c8b release-1.8.tar.bz2 +f92c0171a9578a3e4a0f74947ec596ab release-1.9.tar.bz2 commit b042622bfa38e9ad3794d4f845207042e589b20b Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jun 8 20:18:15 2012 -0400 1.9 diff --git a/pypy.spec b/pypy.spec index 8b80611..80b4039 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.8 -Release: 2%{?dist} +Version: 1.9 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -320,7 +320,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-2346207d9946 +%setup -q -n pypy-pypy-341e1e3821ff %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -861,7 +861,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix}/lib-python %{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib-python/modified-%{pylibver}/ %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ @@ -891,6 +890,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jun 8 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-1 +- 1.9 + * Fri Feb 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-2 - disable C readability patch for now (patch 4) commit 07098c88a6645a0333d4c0d927251a23d002376d Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Feb 10 11:12:43 2012 -0500 1.8-2: disable C readability patch for now (patch 4) diff --git a/pypy.spec b/pypy.spec index 9838bae..8b80611 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -324,7 +324,38 @@ Build of PyPy with support for micro-threads for massive concurrency %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build -%patch4 -p1 -b .more-readable-c-code +# Disabled for now, as it needs regenerating for 1.8 +#patch4 -p1 -b .more-readable-c-code +# Fails on 1.8 with this error: +# [translation:ERROR] Error: +# [translation:ERROR] Traceback (most recent call last): +# [translation:ERROR] File "translate.py", line 309, in main +# [translation:ERROR] drv.proceed(goals) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 811, in proceed +# [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/tool/taskengine.py", line 116, in _execute +# [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 287, in _do +# [translation:ERROR] res = func() +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 530, in task_source_c +# [translation:ERROR] exe_name=exe_name) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 252, in generate_source +# [translation:ERROR] split=self.split) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 989, in gen_source +# [translation:ERROR] sg.gen_readable_parts_of_source(f) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 843, in gen_readable_parts_of_source +# [translation:ERROR] for node, impl in nodeiter: +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 729, in subiter +# [translation:ERROR] impl = '\n'.join(list(node.implementation())).split('\n') +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 867, in implementation +# [translation:ERROR] for s in self.funcgen_implementation(funcgen): +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 901, in funcgen_implementation +# [translation:ERROR] for line in bodyiter: +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 272, in cfunction_body +# [translation:ERROR] blocks.sort(block_comparator) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 34, in block_comparator +# [translation:ERROR] if blk0.isstartblock: +# [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' %patch5 -p1 @@ -860,6 +891,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-2 +- disable C readability patch for now (patch 4) + * Thu Feb 9 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-1 - 1.8; regenerate config patch (patch 0); drop selinux patch (patch 2); regenerate patch 5 commit 52a91fcc4b0ffbdb511ad40e389fe6566d1b8623 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Feb 10 09:19:56 2012 -0500 1.8 rebase to 1.8: * regenerate config patch (patch 0) * drop selinux patch (patch 2) * regenerate patch 5 diff --git a/.gitignore b/.gitignore index 99af398..86ec921 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /pypy-1.5-src.tar.bz2 /release-1.6.tar.bz2 /release-1.7.tar.bz2 +/release-1.8.tar.bz2 diff --git a/config.patch b/config.patch index afd7a7d..a11f397 100644 --- a/config.patch +++ b/config.patch @@ -1,31 +1,7 @@ -diff -up pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-release-1.7/pypy/translator/platform/linux.py ---- pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/platform/linux.py 2011-11-21 13:07:03.454240019 -0500 -@@ -1,15 +1,21 @@ - """Support for Linux.""" - -+import os - import sys - from pypy.translator.platform.posix import BasePosix - -+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', -+ '-Wall', '-Wno-unused'] -+if os.environ.get('CFLAGS', None): -+ CFLAGS.extend(os.environ['CFLAGS'].split()) -+CFLAGS = tuple(CFLAGS) -+ - class BaseLinux(BasePosix): - name = "linux" - - link_flags = ('-pthread',) - extra_libs = ('-lrt',) -- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', -- '-Wall', '-Wno-unused') -+ cflags = CFLAGS - standalone_only = () - shared_only = ('-fPIC',) - so_ext = 'so' -@@ -26,13 +32,14 @@ class BaseLinux(BasePosix): +diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-2346207d9946/pypy/translator/platform/linux.py +--- pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora 2012-02-09 13:27:19.000000000 -0500 ++++ pypy-pypy-2346207d9946/pypy/translator/platform/linux.py 2012-02-10 09:06:20.393066016 -0500 +@@ -31,13 +31,14 @@ class BaseLinux(BasePosix): return self._pkg_config("libffi", "--libs-only-L", ['/usr/lib/libffi']) diff --git a/fix-test_commands-expected-ls-output-issue7108.patch b/fix-test_commands-expected-ls-output-issue7108.patch deleted file mode 100644 index becc3e0..0000000 --- a/fix-test_commands-expected-ls-output-issue7108.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- test/test_commands.py.orig 2010-12-22 13:25:11.357333216 -0500 -+++ test/test_commands.py 2010-12-22 13:25:57.927166219 -0500 -@@ -47,7 +47,7 @@ class CommandTests(unittest.TestCase): - # Note that the first case above has a space in the group name - # while the second one has a space in both names. - pat = r'''d......... # It is a directory. -- \+? # It may have ACLs. -+ [.+@]? # It may have alt access (SELinux, ACLs or metadata ('@' OS X). - \s+\d+ # It has some number of links. - [^/]* # Skip user, group, size, and date. - /\. # and end with the name of the file. diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch index eb6f324..9071be5 100644 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -1,6 +1,5 @@ -diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py ---- pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path 2011-08-20 11:46:31.410646024 -0400 -+++ pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py 2011-08-20 11:46:39.421645476 -0400 +--- pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py.orig 2012-02-09 13:27:19.000000000 -0500 ++++ pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py 2012-02-10 09:14:08.312216221 -0500 @@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): for i in range(1024): # Windows raises IOError. Others raise OSError. @@ -9,4 +8,4 @@ diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readab + subprocess.Popen(['/usr/bin/nonexisting_i_hope'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if c.exception.errno != errno.ENOENT: # ignore "no such file" + # ignore errors that indicate the command was not found diff --git a/pypy.spec b/pypy.spec index b5982bd..9838bae 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.7 -Release: 4%{?dist} +Version: 1.8 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -145,10 +145,6 @@ Patch0: config.patch # merely render dots: Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch -# test_commmands fails on SELinux systems due to a change in the output -# of "ls" (
http://bugs.python.org/issue7108
) -Patch2: fix-test_commands-expected-ls-output-issue7108.patch - # Try to improve the readability of the generated .c code, by adding in the # RPython source as comments where possible. # A version of this was sent upstream as: @@ -324,14 +320,10 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-release-%{version} +%setup -q -n pypy-pypy-2346207d9946 %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build -pushd lib-python/%{pylibver} -%patch2 -p0 -popd - %patch4 -p1 -b .more-readable-c-code %patch5 -p1 @@ -868,6 +860,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 9 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-1 +- 1.8; regenerate config patch (patch 0); drop selinux patch (patch 2); +regenerate patch 5 + * Tue Jan 31 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.7-4 - fix an incompatibility with virtualenv (rhbz#742641) diff --git a/sources b/sources index 197491c..30a988e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fc22184c931ead98bdae9ec3e79595c2 release-1.7.tar.bz2 +661be06978fdc907d84f0ee1f1228c8b release-1.8.tar.bz2 commit a8e52ca5f82917a1b2fb3a3684272c2c1e39f146 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Jan 31 04:53:38 2012 -0500 fix an incompatibility with virtualenv (rhbz#742641) Previously, we manually fixed up the library search path to be below %{pypyprefix}, by patching pypy/translator/goal/app_main.py (adding LIBRARY_INSTALLATION_PATH in patch 3, then using sed to change it to the correct value in %prep after applying the patch). This led to issues when using pypy with virtualenv, so now (as suggested in
https://codespeak.net/issue/pypy-dev/issue614
) we simply install the pypy binary into %{pypyprefix}, and make /usr/bin/pypy be a symlink to it. This allows pypy to find its libraries both when run outside a virtualenv, and within it. Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=742641
diff --git a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch deleted file mode 100644 index 93bcb69..0000000 --- a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -r cd083843b67a pypy/translator/goal/app_main.py ---- a/pypy/translator/goal/app_main.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/goal/app_main.py Wed Dec 22 17:43:21 2010 -0500 -@@ -191,6 +191,12 @@ - IS_WINDOWS = False - - def get_library_path(executable): -+ # FIXME: get this from translator configuration -+ dirname = LIBRARY_INSTALLATION_PATH -+ newpath = sys.pypy_initial_path(dirname) -+ if newpath: -+ return newpath -+ - search = executable - while 1: - dirname = resolvedirof(search) diff --git a/pypy.spec b/pypy.spec index 4bf93a4..b5982bd 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -149,18 +149,6 @@ Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch # of "ls" (
http://bugs.python.org/issue7108
) Patch2: fix-test_commands-expected-ls-output-issue7108.patch -# When locating the pypy standard libraries, look first within -# LIBRARY_INSTALLATION_PATH. -# We convert this from being a non-existant variable into a string literal -# with the value of "pypyprefix" in the "prep" phase below. -# -# We still use the scanning relative to the binary location when invoking a -# pypy binary during the build (e.g. during "check") -# -# Sent upstream (with caveats) as: -#
https://codespeak.net/issue/pypy-dev/issue614
-Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch - # Try to improve the readability of the generated .c code, by adding in the # RPython source as comments where possible. # A version of this was sent upstream as: @@ -344,14 +332,6 @@ pushd lib-python/%{pylibver} %patch2 -p0 popd -# Look for the pypy libraries within LIBRARY_INSTALLATION_PATH first: -%patch3 -p1 -# Fixup LIBRARY_INSTALLATION_PATH to be a string literal containing our value -# for "pypyprefix": -sed -i \ - -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ - pypy/translator/goal/app_main.py - %patch4 -p1 -b .more-readable-c-code %patch5 -p1 @@ -535,7 +515,19 @@ rm -rf $RPM_BUILD_ROOT InstallPyPy() { ExeName=$1 - install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{_bindir} + # To ensure compatibility with virtualenv, pypy finds its libraries + # relative to itself; this happens within + # pypy/translator/goal/app_main.py:get_library_path + # which calls sys.pypy_initial_path(dirname) on the dir containing + # the executable, with symlinks resolved. + # + # Hence we make /usr/bin/pypy be a symlink to the real binary, which we + # place within /usr/lib[64]/pypy-1.* as pypy + # + # This ought to enable our pypy build to work with virtualenv + # (rhbz#742641) + install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{pypyprefix}/$ExeName + ln -s %{pypyprefix}/$ExeName %{buildroot}/%{_bindir} # The generated machine code doesn't need an executable stack, but # one of the assembler files (gcmaptable.s) doesn't have the necessary @@ -546,10 +538,11 @@ InstallPyPy() { # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: - execstack --clear-execstack %{buildroot}/%{_bindir}/$ExeName + execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName } mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{pypyprefix} InstallPyPy pypy @@ -570,7 +563,6 @@ InstallPyPy pypy-stackless # PREFIX/lib-python/modified.2.5.2 # as given on the above page, i.e. it uses '-' not '.' -mkdir -p %{buildroot}/%{pypyprefix} cp -a lib-python %{buildroot}/%{pypyprefix} cp -a lib_pypy %{buildroot}/%{pypyprefix} @@ -859,6 +851,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/pypy +%{pypyprefix}/pypy %files devel %defattr(-,root,root,-) @@ -875,6 +868,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 31 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.7-4 +- fix an incompatibility with virtualenv (rhbz#742641) + * Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
commit e21faf468c1f7001f4680cff5f09fca068fb0397 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Fri Jan 13 19:29:18 2012 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index d99d341..4bf93a4 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -875,6 +875,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+ * Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 - use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, with -Wno-unused (rhbz#666966 and rhbz#707707) commit 416c353a67345f32fa7da698b18eef5ad1d1e77e Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Dec 16 17:15:41 2011 -0500 1.7-2: use --gcrootfinder=shadowstack, and use standard Fedora compilation flags * Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 - use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, with -Wno-unused (rhbz#666966 and rhbz#707707) diff --git a/pypy.spec b/pypy.spec index 1d6b6af..d99d341 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -110,6 +110,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to enable/disable verbose logging: %global verbose_logs 0 +# Forcibly use the shadow-stack option for detecting GC roots, rather than +# relying on hacking up generated assembler with regexps: +%global shadow_stack 1 + # Easy way to turn off the selftests: %global run_selftests 1 @@ -429,6 +433,22 @@ BuildPyPy() { # plus all substrings from CFLAGS in the environment. # This is used to generate a value for CFLAGS that's written into the Makefile + # How will we track garbage-collection roots in the generated code? + #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
+ +%if 0%{shadow_stack} + # This is the most portable option, and avoids a reliance on non-guaranteed + # behaviors within GCC's code generator: use an explicitly-maintained stack + # of root pointers: + %define gcrootfinder_options --gcrootfinder=shadowstack + + export CFLAGS=$(echo "$RPM_OPT_FLAGS") + +%else + # Go with the default, which is "asmgcc" + + %define gcrootfinder_options %{nil} + #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
# The generated Makefile compiles the .c files into assembler (.s), rather # than direct to .o It then post-processes this assembler to locate @@ -443,6 +463,13 @@ BuildPyPy() { # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') +%endif + + # The generated C code leads to many thousands of warnings of the form: + # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] + # Suppress them: + export CFLAGS=$(echo "$CFLAGS" -Wno-unused) + # If we're already built the JIT-enabled "pypy", then use it for subsequent # builds (of other configurations): if test -x './pypy' ; then @@ -466,6 +493,7 @@ BuildPyPy() { --cflags="$CFLAGS" \ --batch \ --output=$ExeName \ + %{gcrootfinder_options} \ $Options echo "--------------------------------------------------------------" @@ -847,6 +875,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 +- use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, +with -Wno-unused (rhbz#666966 and rhbz#707707) + * Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 - 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated code) commit 4ef3f10721000d632a9dcfcfca05c7cde0f91b95 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Nov 22 11:30:49 2011 -0500 1.7 * Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 - 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated code) diff --git a/.gitignore b/.gitignore index ecd135f..99af398 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /pypy-1.4.1-src.tar.bz2 /pypy-1.5-src.tar.bz2 /release-1.6.tar.bz2 +/release-1.7.tar.bz2 diff --git a/config.patch b/config.patch new file mode 100644 index 0000000..afd7a7d --- /dev/null +++ b/config.patch @@ -0,0 +1,49 @@ +diff -up pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-release-1.7/pypy/translator/platform/linux.py +--- pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/platform/linux.py 2011-11-21 13:07:03.454240019 -0500 +@@ -1,15 +1,21 @@ + """Support for Linux.""" + ++import os + import sys + from pypy.translator.platform.posix import BasePosix + ++CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', ++ '-Wall', '-Wno-unused'] ++if os.environ.get('CFLAGS', None): ++ CFLAGS.extend(os.environ['CFLAGS'].split()) ++CFLAGS = tuple(CFLAGS) ++ + class BaseLinux(BasePosix): + name = "linux" + + link_flags = ('-pthread',) + extra_libs = ('-lrt',) +- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', +- '-Wall', '-Wno-unused') ++ cflags = CFLAGS + standalone_only = () + shared_only = ('-fPIC',) + so_ext = 'so' +@@ -26,13 +32,14 @@ class BaseLinux(BasePosix): + return self._pkg_config("libffi", "--libs-only-L", + ['/usr/lib/libffi']) + +- def library_dirs_for_libffi_a(self): +- # places where we need to look for libffi.a +- # XXX obscuuure! only look for libffi.a if run with translate.py +- if 'translate' in sys.modules: +- return self.library_dirs_for_libffi() + ['/usr/lib'] +- else: +- return [] ++ # Fedora, at least, has the shared version but not the static: ++ #def library_dirs_for_libffi_a(self): ++ # # places where we need to look for libffi.a ++ # # XXX obscuuure! only look for libffi.a if run with translate.py ++ # if 'translate' in sys.modules: ++ # return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # else: ++ # return [] + + + class Linux(BaseLinux): diff --git a/pypy-1.5-more-readable-c-code.patch b/more-readable-c-code.patch similarity index 83% rename from pypy-1.5-more-readable-c-code.patch rename to more-readable-c-code.patch index b7103e2..92d340f 100644 --- a/pypy-1.5-more-readable-c-code.patch +++ b/more-readable-c-code.patch @@ -1,15 +1,15 @@ -diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-src/pypy/interpreter/pycode.py ---- pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/interpreter/pycode.py 2011-05-02 14:28:33.942161002 -0400 +diff -up pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code pypy-pypy-release-1.7/pypy/interpreter/pycode.py +--- pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/interpreter/pycode.py 2011-11-21 16:16:15.673463780 -0500 @@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non - from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, + from pypy.interpreter.astcompiler.consts import ( CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, CO_GENERATOR, CO_CONTAINSGLOBALS) +from pypy.interpreter.pytraceback import offset2lineno from pypy.rlib.rarithmetic import intmask from pypy.rlib.debug import make_sure_not_resized from pypy.rlib import jit -@@ -80,6 +81,7 @@ class PyCode(eval.Code): +@@ -81,6 +82,7 @@ class PyCode(eval.Code): self.hidden_applevel = hidden_applevel self.magic = magic self._signature = cpython_code_signature(self) @@ -17,7 +17,7 @@ diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-s self._initialize() def _initialize(self): -@@ -396,3 +398,23 @@ class PyCode(eval.Code): +@@ -397,3 +399,23 @@ class PyCode(eval.Code): def repr(self, space): return space.wrap(self.get_repr()) @@ -41,9 +41,9 @@ diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-s + # raise an IOError) + self._ensure_source() + return self._cached_source[linenum - 1] -diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/model.py ---- pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/model.py 2011-05-02 14:28:33.942161002 -0400 +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/model.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/model.py 2011-11-21 16:15:36.599466455 -0500 @@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden __metaclass__ = type @@ -268,10 +268,10 @@ diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5- result.append(copyop) return result newblock.operations = copyoplist(block.operations) -diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/objspace.py ---- pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/objspace.py 2011-05-02 14:28:33.943161001 -0400 -@@ -313,7 +313,9 @@ class FlowObjSpace(ObjSpace): +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py 2011-11-21 16:15:36.600466455 -0500 +@@ -315,7 +315,9 @@ class FlowObjSpace(ObjSpace): def do_operation(self, name, *args_w): spaceop = SpaceOperation(name, args_w, Variable()) if hasattr(self, 'executioncontext'): # not here during bootstrapping @@ -282,9 +282,9 @@ diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1 self.executioncontext.recorder.append(spaceop) return spaceop.result -diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/test/test_model.py ---- pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/test/test_model.py 2011-05-02 14:28:33.943161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py 2011-11-21 16:15:36.600466455 -0500 @@ -119,3 +119,25 @@ def test_variable(): assert v2.renamed assert v2.name.startswith("foobar_") and v2.name != v.name @@ -311,9 +311,9 @@ diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code + assert cmp(oplocA, oplocB) < 0 + assert cmp(oplocB, oplocA) > 0 + -diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/pypy/rpython/rtyper.py ---- pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/rpython/rtyper.py 2011-05-02 14:28:33.943161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/rpython/rtyper.py +--- pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/rpython/rtyper.py 2011-11-21 16:15:36.601466455 -0500 @@ -800,7 +800,7 @@ class HighLevelOp(object): return vars @@ -341,9 +341,9 @@ diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/p if resulttype is None: vresult.concretetype = Void return None -diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-1.5-src/pypy/translator/backendopt/inline.py ---- pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/backendopt/inline.py 2011-05-02 14:32:26.975161005 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py +--- pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py 2011-11-21 16:15:36.601466455 -0500 @@ -4,6 +4,7 @@ from pypy.translator.simplify import get from pypy.translator.unsimplify import copyvar from pypy.objspace.flow.model import Variable, Constant, Block, Link @@ -371,9 +371,9 @@ diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code return result def copy_block(self, block): -diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/funcgen.py ---- pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/c/funcgen.py 2011-05-02 14:28:33.944161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/funcgen.py +--- pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/c/funcgen.py 2011-11-21 16:15:36.602466455 -0500 @@ -1,4 +1,6 @@ import sys +import inspect @@ -420,7 +420,7 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 class FunctionCodeGenerator(object): """ Collects information about a function which we have to generate -@@ -210,14 +244,57 @@ class FunctionCodeGenerator(object): +@@ -207,14 +241,57 @@ class FunctionCodeGenerator(object): def cfunction_body(self): graph = self.graph @@ -481,7 +481,7 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 for line in self.gen_op(op): yield line if len(block.exits) == 0: -@@ -309,7 +386,7 @@ class FunctionCodeGenerator(object): +@@ -306,7 +383,7 @@ class FunctionCodeGenerator(object): assignments.append((a2typename, dest, src)) for line in gen_assignments(assignments): yield line @@ -490,16 +490,16 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 if link.target in self.innerloops: loop = self.innerloops[link.target] if link is loop.links[-1]: # link that ends a loop -diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/test/test_genc.py ---- pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/c/test/test_genc.py 2011-05-02 14:28:33.945161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py +--- pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py 2011-11-21 16:15:36.602466455 -0500 @@ -1,4 +1,5 @@ import autopath, sys, os, py +import re from pypy.rpython.lltypesystem.lltype import * from pypy.annotation import model as annmodel from pypy.translator.translator import TranslationContext -@@ -515,3 +516,130 @@ def test_inhibit_tail_call(): +@@ -532,3 +533,130 @@ def test_inhibit_tail_call(): else: assert 0, "the call was not found in the C source" assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] @@ -630,10 +630,10 @@ diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code p + assert 'Here is a ' in c_fn_src + assert 'style comment within an RPython docstring' in c_fn_src + -diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-src/pypy/translator/driver.py ---- pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/driver.py 2011-05-02 14:28:33.945161001 -0400 -@@ -536,6 +536,7 @@ class TranslationDriver(SimpleTaskEngine +diff -up pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/driver.py +--- pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/driver.py 2011-11-21 16:15:36.603466455 -0500 +@@ -535,6 +535,7 @@ class TranslationDriver(SimpleTaskEngine dstname = self.compute_exe_name() + '.staticdata.info' shutil.copy(str(fname), str(dstname)) self.log.info('Static data info written to %s' % dstname) @@ -641,9 +641,9 @@ diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-sr # task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-src/pypy/translator/gensupp.py ---- pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/gensupp.py 2011-05-02 14:33:31.026161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/gensupp.py +--- pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/gensupp.py 2011-11-21 16:15:36.603466455 -0500 @@ -14,8 +14,8 @@ def ordered_blocks(graph): allblocks = [] for block in graph.iterblocks(): @@ -655,9 +655,9 @@ diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-s else: ofs = sys.maxint # then we order by input variable name or value -diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1.5-src/pypy/translator/interactive.py ---- pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/interactive.py 2011-05-02 14:28:33.946161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/interactive.py +--- pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/interactive.py 2011-11-21 16:15:36.604466454 -0500 @@ -138,7 +138,7 @@ class Translation(object): def source_c(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) @@ -667,9 +667,9 @@ diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1 def source_cl(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) -diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-1.5-src/pypy/translator/llsupport/wrapper.py ---- pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/llsupport/wrapper.py 2011-05-02 14:28:33.946161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py +--- pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py 2011-11-21 16:15:36.604466454 -0500 @@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam # "return result" block = Block(wrapper_inputargs) @@ -679,10 +679,10 @@ diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code translator.update_call_graph(wgraph, graph, object()) translator.graphs.append(wgraph) block.operations[:] = newops -diff -up pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code pypy-1.5-src/pypy/translator/simplify.py ---- pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/simplify.py 2011-05-02 14:28:33.952161001 -0400 -@@ -298,7 +298,7 @@ def join_blocks(graph): +diff -up pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/simplify.py +--- pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/simplify.py 2011-11-21 16:15:36.605466454 -0500 +@@ -292,7 +292,7 @@ def join_blocks(graph): return renaming.get(v, v) def rename_op(op): args = [rename(a) for a in op.args] diff --git a/pypy-1.5-config.patch b/pypy-1.5-config.patch deleted file mode 100644 index 82d8fc9..0000000 --- a/pypy-1.5-config.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora pypy-1.5-src/pypy/translator/platform/linux.py ---- pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/platform/linux.py 2011-04-30 18:59:24.041160978 -0400 -@@ -1,13 +1,18 @@ - """Support for Linux.""" -- -+import os - from pypy.translator.platform.posix import BasePosix - -+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', -+ '-Wall', '-Wno-unused'] -+if os.environ.get('CFLAGS', None): -+ CFLAGS.extend(os.environ['CFLAGS'].split()) -+CFLAGS = tuple(CFLAGS) -+ - class BaseLinux(BasePosix): - name = "linux" - - link_flags = ('-pthread', '-lrt') -- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', -- '-Wall', '-Wno-unused') -+ cflags = CFLAGS - standalone_only = () - shared_only = ('-fPIC',) - so_ext = 'so' -@@ -29,9 +34,10 @@ class Linux(BaseLinux): - shared_only = () # it seems that on 32-bit linux, compiling with -fPIC - # gives assembler that asmgcc is not happy about. - -- def library_dirs_for_libffi_a(self): -- # places where we need to look for libffi.a -- return self.library_dirs_for_libffi() + ['/usr/lib'] -+ # Fedora Linux, at least, has the shared version but not the static -+ #def library_dirs_for_libffi_a(self): -+ # # places where we need to look for libffi.a -+ # return self.library_dirs_for_libffi() + ['/usr/lib'] - - - class Linux64(BaseLinux): diff --git a/pypy.spec b/pypy.spec index 2579860..1d6b6af 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.6 -Release: 7%{?dist} +Version: 1.7 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -126,14 +126,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch Source2: macros.pypy # Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: pypy-1.5-config.patch +Patch0: config.patch # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -163,7 +163,7 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch #
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
# TODO: get this into the upstream bug tracker, and finish inlining # support (rhbz#666963) -Patch4: pypy-1.5-more-readable-c-code.patch +Patch4: more-readable-c-code.patch # In my koji builds, /root/bin is in the PATH for some reason # This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" @@ -847,6 +847,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 +- 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated +code) + * Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 - skip test_multiprocessing diff --git a/sources b/sources index 5660f1e..197491c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1189352effc5df7df84e6916b3b3eae3 release-1.6.tar.bz2 +fc22184c931ead98bdae9ec3e79595c2 release-1.7.tar.bz2 commit 953cba8f403df754b658c3310b0505c1ba5dc5a5 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Oct 4 14:37:40 2011 -0400 1.6-7: skip test_multiprocessing * Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 - skip test_multiprocessing diff --git a/pypy.spec b/pypy.spec index 90b3f88..2579860 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -728,6 +728,12 @@ CheckPyPy() { # "strop" module doesn't exist for pypy yet: SkipTest test_strop + # I'm seeing Koji builds hanging e.g.: + #
http://koji.fedoraproject.org/koji/getfile?taskID=3386821&name=build.log
+ # The only test that seems to have timed out in that log is + # test_multiprocessing, so skip it for now: + SkipTest test_multiprocessing + echo "== Test names ==" cat testnames.txt echo "=================" @@ -841,13 +847,15 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 +- skip test_multiprocessing + * Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 - don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; missing _emacs_bytecompile macro on el5) * Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 - build using python26 on el5 (2.4 is too early) - * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 - fix SkipTest function to avoid corrupting the name of "test_gdbm" commit 2d36a5e81680be23c3e25e9f4bff4737a550687f Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Sep 13 05:00:09 2011 -0400 don't ship the emacs JIT-viewer on el5 and el6 * Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 - don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; missing _emacs_bytecompile macro on el5) diff --git a/pypy.spec b/pypy.spec index 9fc1462..90b3f88 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -100,6 +100,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Should we build a "pypy-stackless" binary? %global with_stackless 0 +# Should we build the emacs JIT-viewing mode? +%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%global with_emacs 0 +%else +%global with_emacs 1 +%endif # Easy way to enable/disable verbose logging: %global verbose_logs 0 @@ -257,7 +263,9 @@ BuildRequires: perl BuildRequires: /usr/bin/execstack # For byte-compiling the JIT-viewing mode: +%if %{with_emacs} BuildRequires: emacs +%endif # pypy is bundling these so we delete them in %%prep. I don't think they are # needed unless we build pypy targetted at running on the jvm. @@ -287,7 +295,9 @@ Summary: Run-time libraries used by PyPy implementations of Python # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) +%if %{with_emacs} Requires: emacs-filesystem >= %{_emacs_version} +%endif %description libs Libraries required by the various PyPy implementations of Python. @@ -484,7 +494,9 @@ BuildPyPy \ "--stackless" %endif +%if %{with_emacs} %{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el +%endif %install rm -rf $RPM_BUILD_ROOT @@ -662,8 +674,10 @@ find \ # are acceptable. # Install the JIT trace mode for Emacs: +%if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +%endif # Install macros for rpm: mkdir -p %{buildroot}/%{_sysconfdir}/rpm @@ -802,8 +816,10 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ +%if %{with_emacs} %{_emacs_sitelispdir}/pypytrace-mode.el %{_emacs_sitelispdir}/pypytrace-mode.elc +%endif %files %defattr(-,root,root,-) @@ -825,6 +841,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 +- don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; +missing _emacs_bytecompile macro on el5) + * Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 - build using python26 on el5 (2.4 is too early) commit 009aeb1c2d9928be62c11bf154af0644f08816eb Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon Sep 12 21:01:16 2011 -0400 build using python26 on el5 (2.4 is too early) diff --git a/pypy.spec b/pypy.spec index b303232..9fc1462 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -213,10 +213,18 @@ Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch BuildRequires: pypy %global bootstrap_python_interp pypy %else + +# Python 2.6 or later is needed, so on RHEL5 (2.4) we need to use the alternate +# python26 rpm: +%if 0%{?rhel} == 5 +BuildRequires: python26-devel +%global bootstrap_python_interp python26 +%else BuildRequires: python-devel %global bootstrap_python_interp python %endif +%endif # FIXME: I'm seeing errors like this in the logs: @@ -817,6 +825,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 +- build using python26 on el5 (2.4 is too early) + * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 - fix SkipTest function to avoid corrupting the name of "test_gdbm" commit 106cb91275756dab4a44a6e75cd090ea57c6d5a7 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Aug 25 14:50:53 2011 -0400 fix SkipTest function to avoid corrupting the name of "test_gdbm" diff --git a/pypy.spec b/pypy.spec index 2c3e47c..b303232 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -666,7 +666,7 @@ topdir=$(pwd) SkipTest() { TEST_NAME=$1 - sed -i -e"s|$TEST_NAME||" testnames.txt + sed -i -e"s|^$TEST_NAME$||g" testnames.txt } CheckPyPy() { @@ -817,6 +817,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 +- fix SkipTest function to avoid corrupting the name of "test_gdbm" + * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-3 - add rpm macros file to the devel subpackage (source 2) - skip some tests that can't pass yet commit afabd9d6bee5ad70b522d5d9c5745256ff46b827 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Aug 25 11:58:55 2011 -0400 1.6-3: add rpm macros file to the devel subpackage; skip some tests diff --git a/macros.pypy b/macros.pypy new file mode 100644 index 0000000..5f40b6f --- /dev/null +++ b/macros.pypy @@ -0,0 +1,5 @@ +%__pypy /usr/bin/pypy +%pypy_sitelib %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%pypy_sitearch %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") +%pypy_version %(%{__pypy} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypydir %{_builddir}/pypy-%{name}-%{version}-%{release} diff --git a/pypy.spec b/pypy.spec index 3280ff9..2c3e47c 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -122,6 +122,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Source and patches: Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
+# Supply various useful RPM macros for building python modules against pypy: +# __pypy, pypy_sitelib, pypy_sitearch +Source2: macros.pypy + # Edit a translator file for linux in order to configure our cflags and dynamic libffi Patch0: pypy-1.5-config.patch @@ -653,13 +657,16 @@ find \ mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +# Install macros for rpm: +mkdir -p %{buildroot}/%{_sysconfdir}/rpm +install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm + %check topdir=$(pwd) SkipTest() { - # Append the given test name to TESTS_TO_SKIP TEST_NAME=$1 - TESTS_TO_SKIP="$TESTS_TO_SKIP $TEST_NAME" + sed -i -e"s|$TEST_NAME||" testnames.txt } CheckPyPy() { @@ -686,6 +693,19 @@ CheckPyPy() { "from test.regrtest import findtests; print '\n'.join(findtests())" ) > testnames.txt + # Skip some tests: + # "audioop" doesn't exist for pypy yet: + SkipTest test_audioop + + # The gdb CPython hooks haven't been ported to cpyext: + SkipTest test_gdb + + # hotshot relies heavily on _hotshot, which doesn't exist: + SkipTest test_hotshot + + # "strop" module doesn't exist for pypy yet: + SkipTest test_strop + echo "== Test names ==" cat testnames.txt echo "=================" @@ -786,6 +806,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%config(noreplace) %{_sysconfdir}/rpm/macros.pypy %if 0%{with_stackless} %files stackless @@ -796,6 +817,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-3 +- add rpm macros file to the devel subpackage (source 2) +- skip some tests that can't pass yet + * Sat Aug 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-2 - work around test_subprocess failure seen in koji (patch 5) commit 1df5c3e618c5f2bcbdbe44f329039dfffc1cd79e Author: David Malcolm <dmalcolm(a)redhat.com> Date: Sat Aug 20 11:59:48 2011 -0400 work around test_subprocess failure seen in koji (patch 5) diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch new file mode 100644 index 0000000..eb6f324 --- /dev/null +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -0,0 +1,12 @@ +diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path 2011-08-20 11:46:31.410646024 -0400 ++++ pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py 2011-08-20 11:46:39.421645476 -0400 +@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): + for i in range(1024): + # Windows raises IOError. Others raise OSError. + with self.assertRaises(EnvironmentError) as c: +- subprocess.Popen(['nonexisting_i_hope'], ++ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if c.exception.errno != errno.ENOENT: # ignore "no such file" diff --git a/pypy.spec b/pypy.spec index c3faabb..3280ff9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -155,6 +155,16 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch # support (rhbz#666963) Patch4: pypy-1.5-more-readable-c-code.patch +# In my koji builds, /root/bin is in the PATH for some reason +# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" +# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising +# OSError: [Errno 13] Permission denied +# when it tries to read /root/bin, rather than raising "No such file" +# +# Work around this by specifying an absolute path for the non-existant +# executable +# Not yet sent upstream +Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch # Build-time requirements: @@ -318,6 +328,7 @@ sed -i \ %patch4 -p1 -b .more-readable-c-code +%patch5 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -785,6 +796,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Aug 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-2 +- work around test_subprocess failure seen in koji (patch 5) + * Thu Aug 18 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-1 - 1.6 - rewrite the %%check section, introducing per-test timeouts commit 3a2c2ec86de943a3dbdc8de5608e6a8f79c48a85 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Aug 19 19:04:38 2011 -0400 pypy-1.6-1 - 1.6 - rewrite the %check section, introducing per-test timeouts diff --git a/.gitignore b/.gitignore index 017cf34..ecd135f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pypy-1.4.1-src.tar.bz2 /pypy-1.5-src.tar.bz2 +/release-1.6.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 0c2c717..c3faabb 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.5 -Release: 2%{?dist} +Version: 1.6 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -104,6 +104,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to enable/disable verbose logging: %global verbose_logs 0 +# Easy way to turn off the selftests: +%global run_selftests 1 + %global pypyprefix %{_libdir}/pypy-%{version} %global pylibver 2.7 @@ -117,7 +120,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
# Edit a translator file for linux in order to configure our cflags and dynamic libffi Patch0: pypy-1.5-config.patch @@ -218,9 +221,17 @@ BuildRequires: openssl-devel BuildRequires: valgrind-devel %endif +%if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel +# For use in the selftests, for recording stats: +BuildRequires: time + +# For use in the selftests, for imposing a per-test timeout: +BuildRequires: perl +%endif + BuildRequires: /usr/bin/execstack # For byte-compiling the JIT-viewing mode: @@ -289,7 +300,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-%{version}-src +%setup -q -n pypy-pypy-release-%{version} %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -656,445 +667,47 @@ CheckPyPy() { pushd %{goal_dir} - # Gather a list of tests to skip, due to known failures - # TODO: report these failures to pypy upstream - # See also rhbz#666967 and rhbz#666969 - TESTS_TO_SKIP="" - - # Test failures relating to missing codecs - # Hopefully when pypy merges to 2.7 support we'll gain these via a - # refreshed stdlib: - # test_codecencodings_cn: - # all tests fail, with one of - # unknown encoding: gb18030 - # unknown encoding: gb2312 - # unknown encoding: gbk - SkipTest test_codecencodings_cn - - # test_codecencodings_hk: - # all tests fail, with: - # unknown encoding: big5hkscs - SkipTest test_codecencodings_hk - - # test_codecencodings_jp: - # all tests fail, with one of: - # unknown encoding: cp932 - # unknown encoding: euc_jisx0213 - # unknown encoding: euc_jp - # unknown encoding: shift_jis - # unknown encoding: shift_jisx0213 - SkipTest test_codecencodings_jp - - # test_codecencodings_kr: - # all tests fail, with one of: - # unknown encoding: cp949 - # unknown encoding: euc_kr - # unknown encoding: johab - SkipTest test_codecencodings_kr - - # test_codecencodings_tw: - # all tests fail, with: - # unknown encoding: big5 - SkipTest test_codecencodings_tw - - # test_multibytecodec: - # 14 failures out of 15, due to: - # unknown encoding: euc-kr - # unknown encoding: gb2312 - # unknown encoding: jisx0213 - # unknown encoding: cp949 - # unknown encoding: iso2022-jp - # unknown encoding: gb18030 - SkipTest test_multibytecodec - - # - # Other failures: - # - # test_asynchat: - # seems to hang on this test, within test_line_terminator - SkipTest test_asynchat - - # test_audioop: - # test test_audioop crashed -- <type 'exceptions.ImportError'>: No module named audioop - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/regrtest.py", line 874, in runtest_inner - # the_package = __import__(abstest, globals(), locals(), []) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_audioop.py", line 1, in <module> - # import audioop - # ImportError: No module named audioop - SkipTest test_audioop - - # test_capi: - # RPython traceback: - # RPython traceback: - # File "implement.c", line 243013, in _PyObject_New - # File "implement_1.c", line 31707, in _PyObject_NewVar - # File "implement.c", line 217060, in from_ref - # Fatal RPython error: AssertionError - SkipTest test_capi - - # test_compiler: - # 4 errors out of 13: - # testSourceCodeEncodingsError - # testWith - # testWithAss - # testYieldExpr - SkipTest test_compiler - - # test_ctypes: - # failures=17, errors=20, out of 132 tests - SkipTest test_ctypes - - # test_distutils: - # Warning -- os.environ was modified by test_distutils - # test test_distutils failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_distutils - - # test_frozen: - # TestFailed: import __hello__ failed:No module named __hello__ - SkipTest test_frozen - - # test_gc: - # test test_gc crashed -- <type 'exceptions.AttributeError'>: 'module' object has no attribute 'get_debug' - SkipTest test_gc - - # test_gdb: - # test test_gdb crashed -- <type 'exceptions.KeyError'>: 'PY_CFLAGS' - SkipTest test_gdb - - # test_generators: - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # exiting - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # exiting - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # finally - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # sys.stderr.getvalue().startswith( - # "Exception RuntimeError: 'generator ignored GeneratorExit' in " - # ) - # Expected: - # True - # Got: - # False - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.refleaks - # Failed example: - # try: - # sys.stderr = StringIO.StringIO() - # class Leaker: - # def __del__(self): - # raise RuntimeError - # l = Leaker() - # del l - # gc_collect() - # err = sys.stderr.getvalue().strip() - # err.startswith( - # "Exception RuntimeError: RuntimeError() in " - # ) - # err.endswith("> ignored") - # len(err.splitlines()) - # finally: - # sys.stderr = old - # Expected: - # True - # True - # 1 - # Got: - # False - # False - # 0 - # ********************************************************************** - # 2 items had failures: - # 4 of 107 in test.test_generators.__test__.coroutine - # 1 of 11 in test.test_generators.__test__.refleaks - # ***Test Failed*** 5 failures. - # test test_generators failed -- 5 of 294 doctests failed - SkipTest test_generators - - # test_getargs2: - # test test_getargs2 failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_getargs2 - - # test_hotshot: - # test test_hotshot crashed -- <type 'exceptions.ImportError'>: No module named _hotshot - SkipTest test_hotshot - - # test_io: - # test test_io failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_io - - # test_ioctl: - # Failing in Koji with dist-f15 with: - # ====================================================================== - # FAIL: test_ioctl (test.test_ioctl.IoctlTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 25, in test_ioctl - # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) - # AssertionError: 0 not in (8304, 17737) - # ====================================================================== - # FAIL: test_ioctl_mutate (test.test_ioctl.IoctlTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 35, in test_ioctl_mutate - # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) - # AssertionError: 0 not in (8304, 17737) - # ---------------------------------------------------------------------- - SkipTest test_ioctl - - # test_iterlen: - # 24 failures out of 25, apparently all due to TypeError - SkipTest test_iterlen - - # test_multiprocessing: - # test test_multiprocessing failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_multiprocessing - - # test_module: - # test test_module failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_module.py", line 81, in test_clear_dict_in_ref_cycle - # self.assertEqual(destroyed, [1]) - # AssertionError: Lists differ: [] != [1] - # Second list contains 1 additional elements. - # First extra element 0: - # 1 - # - [] - # + [1] - # ? + - SkipTest test_module - - # test_parser: - # 12 failures out of 15 - SkipTest test_parser - - # test_platform: - # Koji builds show: - # test test_platform failed -- errors occurred in test.test_platform.PlatformTest - SkipTest test_platform - - # test_posix: - # test test_posix failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 361, in test_getcwd_long_pathnames - # _create_and_do_getcwd(dirname) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # [...repeats...] - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 356, in _create_and_do_getcwd - # self.assertEqual(e.errno, expected_errno) - # AssertionError: 36 != 34 - SkipTest test_posix - - # test_readline: - # test test_readline failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_readline.py", line 16, in testHistoryUpdates - # readline.clear_history() - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 277, in clear_history - # del self.get_reader().history[:] - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 186, in get_reader - # console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING) - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 103, in __init__ - # self._clear = _my_getstr("clear") - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 45, in _my_getstr - # "terminal doesn't have the required '%s' capability"%cap - # InvalidTerminal: terminal doesn't have the required 'clear' capability - SkipTest test_readline - - # test_scope: - # test test_scope failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_scope.py", line 437, in testLeaks - # self.assertEqual(Foo.count, 0) - # AssertionError: 100 != 0 - SkipTest test_scope - - # test_socket: - # testSockName can fail in Koji with: - # my_ip_addr = socket.gethostbyname(socket.gethostname()) - # gaierror: (-3, 'Temporary failure in name resolution') - SkipTest test_socket - - # test_sort: - # some failures - SkipTest test_sort - - # test_sqlite: - # 3 of the sqlite3.test.dbapi.ExtensionTests raise: - # ProgrammingError: Incomplete statement '' - SkipTest test_sqlite - - # test_strop: - # test test_strop crashed -- <type 'exceptions.ImportError'>: No module named strop - SkipTest test_strop - - # test_structmembers: - # test test_structmembers failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_structmembers - - # test_subprocess: - # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset - # 'import site' failed - # . - # this bit of output is from a test of stdout in a different process ... - # /builddir/build/BUILD/pypy-1.5-src/lib_pypy/ctypes_support.py:26: RuntimeWarning: C function without declared arguments called - # return standard_c_lib.__errno_location() - # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset - # 'import site' failed - # . - # this bit of output is from a test of stdout in a different process ... - # test test_subprocess failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_subprocess - - # test_symtable: - # test test_symtable crashed -- <type 'exceptions.ImportError'>: No module named _symtable - SkipTest test_symtable - - # test_sys_settrace: - # test test_sys_settrace failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 334, in test_13_genexp - # self.run_test(generator_example) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 280, in run_test - # self.run_and_compare(func, func.events) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 277, in run_and_compare - # tracer.events, events) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 269, in compare_events - # [str(x) for x in events]))) - # AssertionError: events did not match expectation: - # (0, 'call') - # (2, 'line') - # (-6, 'call') - # (-5, 'line') - # (-4, 'line') - # (-4, 'return') - # - (-4, 'call') - # - (-4, 'exception') - # - (-1, 'line') - # - (-1, 'return') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (5, 'return') - SkipTest test_sys_settrace - - # test_tempfile: - # test test_tempfile failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_tempfile - - # test_thread - # Koji build appears to hang here - SkipTest test_thread - - # test_traceback: - # works when run standalone; failures seen when run as part of a suite - SkipTest test_traceback - - # test_uuid: - # ====================================================================== - # ERROR: test_ifconfig_getnode (test.test_uuid.TestUUID) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_uuid.py", line 306, in test_ifconfig_getnode - # node = uuid._ifconfig_getnode() - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/uuid.py", line 326, in _ifconfig_getnode - # ip_addr = socket.gethostbyname(socket.gethostname()) - # gaierror: [Errno -3] Temporary failure in name resolution - # ---------------------------------------------------------------------- - # Ran 14 tests in 0.369s - # FAILED (errors=1) - SkipTest test_uuid - - # test_zipimport_support: - # ====================================================================== - # ERROR: test_doctest_main_issue4197 (test.test_zipimport_support.ZipSupportTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 194, in test_doctest_main_issue4197 - # exit_code, data = run_python(script_name) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 80, in run_python - # p = spawn_python(*args, **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python - # **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ - # errread, errwrite) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child - # raise child_exception - # OSError: [Errno 13] Permission denied - # ====================================================================== - # ERROR: test_pdb_issue4201 (test.test_zipimport_support.ZipSupportTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 221, in test_pdb_issue4201 - # p = spawn_python(script_name) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python - # **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ - # errread, errwrite) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child - # raise child_exception - # OSError: [Errno 13] Permission denied - # ---------------------------------------------------------------------- - # Ran 4 tests in 0.726s - # FAILED (errors=2) - SkipTest test_zipimport_support - - # test_zlib: - # failure seen in Koji, not sure of reason why: - # test test_zlib failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.4.1-src/lib-python/2.5.2/test/test_zlib.py", line 72, in test_baddecompressobj - # self.assertRaises(ValueError, zlib.decompressobj, 0) - # AssertionError: ValueError not raised - SkipTest test_zlib - - %if 0%{use_self_when_building} - # Patch 3 prioritizes the installed copy of pypy's libraries over the - # build copy. - # This leads to test failures of test_pep263 and test_tarfile - # For now, suppress these when building using pypy itself: - SkipTest test_pep263 # on-disk encoding issues - SkipTest test_tarfile # permissions issues - %endif - - # Run the built binary through the selftests - # "-w" : re-run failed tests in verbose mode - time ./$ExeName -m test.regrtest -w -x $TESTS_TO_SKIP + # I'm seeing numerous cases where tests seem to hang, or fail unpredictably + # So we'll run each test in its own process, with a timeout + + # Use regrtest to explicitly list all tests: + ( ./$ExeName -c \ + "from test.regrtest import findtests; print '\n'.join(findtests())" + ) > testnames.txt + + echo "== Test names ==" + cat testnames.txt + echo "=================" + + echo "" > failed-tests.txt + + for TestName in $(cat testnames.txt) ; do + + echo "===================" $TestName "====================" + + # Use /usr/bin/time (rather than the shell "time" builtin) to gather + # info on the process (time/CPU/memory). This passes on the exit + # status of the underlying command + # + # Use perl's alarm command to impose a timeout + # 900 seconds is 15 minutes per test. + # If a test hangs, that test should get terminated, allowing the build + # to continue. + # + # Invoke pypy on test.regrtest to run the specific test suite + # verbosely + # + # For now, || true, so that any failures don't halt the build: + ( /usr/bin/time \ + perl -e 'alarm shift @ARGV; exec @ARGV' 900 \ + ./$ExeName -m test.regrtest -v $TestName ) \ + || (echo $TestName >> failed-tests.txt) \ + || true + done + + echo "== Failed tests ==" + cat failed-tests.txt + echo "=================" popd @@ -1124,12 +737,14 @@ CheckPyPy() { echo "--------------------------------------------------------------" } +%if %{run_selftests} CheckPyPy pypy %if 0%{with_stackless} CheckPyPy pypy-stackless %endif +%endif # run_selftests %clean @@ -1142,7 +757,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix} %dir %{pypyprefix}/lib-python -%{pypyprefix}/lib-python/TODO %{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib-python/modified-%{pylibver}/ @@ -1171,6 +785,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 18 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-1 +- 1.6 +- rewrite the %%check section, introducing per-test timeouts + * Tue Aug 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-2 - add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace logs in emacs diff --git a/sources b/sources index a047407..5660f1e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb9ada2c50666318c3a2863da1fbe487 pypy-1.5-src.tar.bz2 +1189352effc5df7df84e6916b3b3eae3 release-1.6.tar.bz2 commit 1feef4d56b6572b03fd805e50ad8f6e43900cfac Author: David Malcolm <dmalcolm(a)redhat.com> Date: Wed Aug 3 13:02:57 2011 -0400 add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace logs in emacs diff --git a/pypy.spec b/pypy.spec index b4705c1..0c2c717 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -223,6 +223,9 @@ BuildRequires: gc-devel BuildRequires: /usr/bin/execstack +# For byte-compiling the JIT-viewing mode: +BuildRequires: emacs + # pypy is bundling these so we delete them in %%prep. I don't think they are # needed unless we build pypy targetted at running on the jvm. #BuildRequires: jna @@ -248,6 +251,11 @@ CPU architecture. %package libs Group: Development/Languages Summary: Run-time libraries used by PyPy implementations of Python + +# We supply an emacs mode for the JIT viewer. +# (This doesn't bring in all of emacs, just the directory structure) +Requires: emacs-filesystem >= %{_emacs_version} + %description libs Libraries required by the various PyPy implementations of Python. @@ -442,6 +450,8 @@ BuildPyPy \ "--stackless" %endif +%{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el + %install rm -rf $RPM_BUILD_ROOT @@ -617,6 +627,10 @@ find \ # but given that the objective is to preserve a copy of the source code, those # are acceptable. +# Install the JIT trace mode for Emacs: +mkdir -p %{buildroot}/%{_emacs_sitelispdir} +cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} + %check topdir=$(pwd) @@ -1135,6 +1149,8 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ +%{_emacs_sitelispdir}/pypytrace-mode.el +%{_emacs_sitelispdir}/pypytrace-mode.elc %files %defattr(-,root,root,-) @@ -1155,6 +1171,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Aug 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-2 +- add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace +logs in emacs + * Mon May 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-1 - 1.5 commit 3d2cef177d26ff303a5be984f912e2b8d4266b0d Author: Dan Horák <dan(a)danny.cz> Date: Wed May 11 10:15:52 2011 +0200 fix build on non-jit arches Build on non-jit arch like s390 fails with [translation:info] Translating target as defined by targetpypystandalone [platform:msg] Setting platform to 'host' cc=None Traceback (most recent call last): File "translate.py", line 322, in <module> main() File "translate.py", line 208, in main targetspec_dic, translateconfig, config, args = parse_options_and_load_target() File "translate.py", line 176, in parse_options_and_load_target targetspec_dic['handle_config'](config, translateconfig) File "targetpypystandalone.py", line 109, in handle_config raise Exception("You have to specify the --opt level.\n" Exception: You have to specify the --opt level. Try --opt=2 or --opt=jit, or equivalently -O2 or -Ojit . diff --git a/pypy.spec b/pypy.spec index 1a651e0..b4705c1 100644 --- a/pypy.spec +++ b/pypy.spec @@ -431,6 +431,8 @@ BuildPyPy \ pypy \ %if 0%{with_jit} "-Ojit" \ +%else + "-O2" \ %endif %{nil} commit 169de85aca1a527ea42ef102aa32a40ba1740168 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon May 2 14:46:32 2011 -0400 Rebase to 1.5 (rhbz#701121) Update patches: patch 0: pypy-1.4-config.patch -> pypy-1.5-config.patch patch 4: pypy-1.4.1-more-readable-c-code.patch -> pypy-1.5-more-readable-c-code.patch Remove references to *.inl files, no longer present Add the following tests to the skip list: test_audioop, test_capi, test_distutils, test_gc, test_gdb, test_generators, test_getargs2, test_hotshot, test_io, test_multiprocessing, test_posix, test_readline, test_scope, test_strop, test_structmembers, test_subprocess, test_symtable, test_sys_settrace, test_tempfile, test_thread, test_uuid, test_zipimport_support Add a couple of text files to the payload (TODO, stdlib-version.txt) diff --git a/.gitignore b/.gitignore index 2878978..017cf34 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pypy-1.4.1-src.tar.bz2 +/pypy-1.5-src.tar.bz2 diff --git a/pypy-1.4-config.patch b/pypy-1.5-config.patch similarity index 69% rename from pypy-1.4-config.patch rename to pypy-1.5-config.patch index 0b82ac8..82d8fc9 100644 --- a/pypy-1.4-config.patch +++ b/pypy-1.5-config.patch @@ -1,9 +1,10 @@ -Index: pypy-1.4/pypy/translator/platform/linux.py -=================================================================== ---- pypy-1.4.orig/pypy/translator/platform/linux.py -+++ pypy-1.4/pypy/translator/platform/linux.py -@@ -3,17 +3,22 @@ import py, os - from pypy.translator.platform import _run_subprocess +diff -up pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora pypy-1.5-src/pypy/translator/platform/linux.py +--- pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/platform/linux.py 2011-04-30 18:59:24.041160978 -0400 +@@ -1,13 +1,18 @@ + """Support for Linux.""" +- ++import os from pypy.translator.platform.posix import BasePosix +CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', @@ -22,16 +23,10 @@ Index: pypy-1.4/pypy/translator/platform/linux.py standalone_only = () shared_only = ('-fPIC',) so_ext = 'so' - so_prefixes = ('lib', '') -- -+ - def _args_for_shared(self, args): - return ['-shared'] + args - -@@ -29,9 +34,10 @@ class BaseLinux(BasePosix): - class Linux(BaseLinux): +@@ -29,9 +34,10 @@ class Linux(BaseLinux): shared_only = () # it seems that on 32-bit linux, compiling with -fPIC # gives assembler that asmgcc is not happy about. + - def library_dirs_for_libffi_a(self): - # places where we need to look for libffi.a - return self.library_dirs_for_libffi() + ['/usr/lib'] diff --git a/pypy-1.4.1-more-readable-c-code.patch b/pypy-1.5-more-readable-c-code.patch similarity index 81% rename from pypy-1.4.1-more-readable-c-code.patch rename to pypy-1.5-more-readable-c-code.patch index 45fa534..b7103e2 100644 --- a/pypy-1.4.1-more-readable-c-code.patch +++ b/pypy-1.5-more-readable-c-code.patch @@ -1,7 +1,7 @@ -diff -r cd083843b67a pypy/interpreter/pycode.py ---- a/pypy/interpreter/pycode.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/interpreter/pycode.py Wed Jan 05 16:14:35 2011 -0500 -@@ -14,6 +14,7 @@ +diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-src/pypy/interpreter/pycode.py +--- pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/interpreter/pycode.py 2011-05-02 14:28:33.942161002 -0400 +@@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, CO_GENERATOR, CO_CONTAINSGLOBALS) @@ -9,7 +9,7 @@ diff -r cd083843b67a pypy/interpreter/pycode.py from pypy.rlib.rarithmetic import intmask from pypy.rlib.debug import make_sure_not_resized from pypy.rlib import jit -@@ -81,6 +82,7 @@ +@@ -80,6 +81,7 @@ class PyCode(eval.Code): self.hidden_applevel = hidden_applevel self.magic = magic self._signature = cpython_code_signature(self) @@ -17,10 +17,10 @@ diff -r cd083843b67a pypy/interpreter/pycode.py self._initialize() def _initialize(self): -@@ -403,3 +405,25 @@ +@@ -396,3 +398,23 @@ class PyCode(eval.Code): + def repr(self, space): return space.wrap(self.get_repr()) - repr.unwrap_spec = ['self', ObjSpace] + + def get_linenum_for_offset(self, offset): + # Given a bytecode offset, return a 1-based index into the lines of the @@ -41,12 +41,10 @@ diff -r cd083843b67a pypy/interpreter/pycode.py + # raise an IOError) + self._ensure_source() + return self._cached_source[linenum - 1] -+ -+ -diff -r cd083843b67a pypy/objspace/flow/model.py ---- a/pypy/objspace/flow/model.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/model.py Wed Jan 05 16:14:35 2011 -0500 -@@ -31,6 +31,120 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/model.py +--- pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/model.py 2011-05-02 14:28:33.942161002 -0400 +@@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden __metaclass__ = type @@ -167,7 +165,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class FunctionGraph(object): __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] -@@ -94,6 +208,21 @@ +@@ -94,6 +208,21 @@ class FunctionGraph(object): seen[block] = True stack += block.exits[::-1] @@ -189,7 +187,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py def iterlinks(self): block = self.startblock seen = {block: True} -@@ -183,14 +312,14 @@ +@@ -183,14 +312,14 @@ class Block(object): self.exits = [] # list of Link(s) def at(self): @@ -207,7 +205,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py else: if (not self.exits) and len(self.inputargs) == 1: txt = "return block" -@@ -245,6 +374,21 @@ +@@ -245,6 +374,21 @@ class Block(object): from pypy.translator.tool.graphpage import try_show try_show(self) @@ -229,7 +227,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class Variable(object): __slots__ = ["_name", "_nr", "concretetype"] -@@ -331,13 +475,15 @@ +@@ -331,13 +475,15 @@ class WrapException(Exception): class SpaceOperation(object): @@ -248,7 +246,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py def __eq__(self, other): return (self.__class__ is other.__class__ and -@@ -352,8 +498,9 @@ +@@ -352,8 +498,9 @@ class SpaceOperation(object): return hash((self.opname,tuple(self.args),self.result)) def __repr__(self): @@ -260,7 +258,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class Atom(object): def __init__(self, name): -@@ -448,8 +595,7 @@ +@@ -427,8 +574,7 @@ def copygraph(graph, shallow=False, varm for op in oplist: copyop = SpaceOperation(op.opname, [copyvar(v) for v in op.args], @@ -270,10 +268,10 @@ diff -r cd083843b67a pypy/objspace/flow/model.py result.append(copyop) return result newblock.operations = copyoplist(block.operations) -diff -r cd083843b67a pypy/objspace/flow/objspace.py ---- a/pypy/objspace/flow/objspace.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/objspace.py Wed Jan 05 16:14:35 2011 -0500 -@@ -310,7 +310,9 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/objspace.py +--- pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/objspace.py 2011-05-02 14:28:33.943161001 -0400 +@@ -313,7 +313,9 @@ class FlowObjSpace(ObjSpace): def do_operation(self, name, *args_w): spaceop = SpaceOperation(name, args_w, Variable()) if hasattr(self, 'executioncontext'): # not here during bootstrapping @@ -284,10 +282,10 @@ diff -r cd083843b67a pypy/objspace/flow/objspace.py self.executioncontext.recorder.append(spaceop) return spaceop.result -diff -r cd083843b67a pypy/objspace/flow/test/test_model.py ---- a/pypy/objspace/flow/test/test_model.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/test/test_model.py Wed Jan 05 16:14:35 2011 -0500 -@@ -132,3 +132,25 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/test/test_model.py +--- pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/test/test_model.py 2011-05-02 14:28:33.943161001 -0400 +@@ -119,3 +119,25 @@ def test_variable(): assert v2.renamed assert v2.name.startswith("foobar_") and v2.name != v.name assert v2.name.split('_', 1)[1].isdigit() @@ -313,10 +311,10 @@ diff -r cd083843b67a pypy/objspace/flow/test/test_model.py + assert cmp(oplocA, oplocB) < 0 + assert cmp(oplocB, oplocA) > 0 + -diff -r cd083843b67a pypy/rpython/rtyper.py ---- a/pypy/rpython/rtyper.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/rpython/rtyper.py Wed Jan 05 16:14:35 2011 -0500 -@@ -800,7 +800,7 @@ +diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/pypy/rpython/rtyper.py +--- pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/rpython/rtyper.py 2011-05-02 14:28:33.943161001 -0400 +@@ -800,7 +800,7 @@ class HighLevelOp(object): return vars def genop(self, opname, args_v, resulttype=None): @@ -325,7 +323,7 @@ diff -r cd083843b67a pypy/rpython/rtyper.py def gendirectcall(self, ll_function, *args_v): return self.llops.gendirectcall(ll_function, *args_v) -@@ -935,7 +935,7 @@ +@@ -935,7 +935,7 @@ class LowLevelOpList(list): v.concretetype)) return v @@ -334,7 +332,7 @@ diff -r cd083843b67a pypy/rpython/rtyper.py try: for v in args_v: v.concretetype -@@ -944,7 +944,7 @@ +@@ -944,7 +944,7 @@ class LowLevelOpList(list): " and pass its result to genop()," " never hop.args_v directly.") vresult = Variable() @@ -343,18 +341,18 @@ diff -r cd083843b67a pypy/rpython/rtyper.py if resulttype is None: vresult.concretetype = Void return None -diff -r cd083843b67a pypy/translator/backendopt/inline.py ---- a/pypy/translator/backendopt/inline.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/backendopt/inline.py Wed Jan 05 16:14:35 2011 -0500 -@@ -4,6 +4,7 @@ +diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-1.5-src/pypy/translator/backendopt/inline.py +--- pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/backendopt/inline.py 2011-05-02 14:32:26.975161005 -0400 +@@ -4,6 +4,7 @@ from pypy.translator.simplify import get from pypy.translator.unsimplify import copyvar from pypy.objspace.flow.model import Variable, Constant, Block, Link from pypy.objspace.flow.model import SpaceOperation, c_last_exception +from pypy.objspace.flow.model import OperationLoc from pypy.objspace.flow.model import FunctionGraph - from pypy.objspace.flow.model import traverse, mkentrymap, checkgraph + from pypy.objspace.flow.model import mkentrymap, checkgraph from pypy.annotation import model as annmodel -@@ -231,6 +232,7 @@ +@@ -231,6 +232,7 @@ class BaseInliner(object): self.varmap = {} self._copied_blocks = {} self.op = block.operations[index_operation] @@ -362,7 +360,7 @@ diff -r cd083843b67a pypy/translator/backendopt/inline.py self.graph_to_inline = self.get_graph_from_op(self.op) self.exception_guarded = False if (block.exitswitch == c_last_exception and -@@ -297,7 +299,9 @@ +@@ -290,7 +292,9 @@ class BaseInliner(object): def copy_operation(self, op): args = [self.get_new_name(arg) for arg in op.args] @@ -373,9 +371,9 @@ diff -r cd083843b67a pypy/translator/backendopt/inline.py return result def copy_block(self, block): -diff -r cd083843b67a pypy/translator/c/funcgen.py ---- a/pypy/translator/c/funcgen.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/c/funcgen.py Wed Jan 05 16:14:35 2011 -0500 +diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/funcgen.py +--- pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/c/funcgen.py 2011-05-02 14:28:33.944161001 -0400 @@ -1,4 +1,6 @@ import sys +import inspect @@ -383,7 +381,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring from pypy.translator.c.support import cdecl from pypy.translator.c.support import llvalue_from_constant, gen_assignments -@@ -22,6 +24,38 @@ +@@ -22,6 +24,38 @@ LOCALVAR = 'l_%s' KEEP_INLINED_GRAPHS = False @@ -422,7 +420,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py class FunctionCodeGenerator(object): """ Collects information about a function which we have to generate -@@ -210,14 +244,57 @@ +@@ -210,14 +244,57 @@ class FunctionCodeGenerator(object): def cfunction_body(self): graph = self.graph @@ -483,7 +481,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py for line in self.gen_op(op): yield line if len(block.exits) == 0: -@@ -310,7 +387,7 @@ +@@ -309,7 +386,7 @@ class FunctionCodeGenerator(object): assignments.append((a2typename, dest, src)) for line in gen_assignments(assignments): yield line @@ -492,16 +490,16 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py if link.target in self.innerloops: loop = self.innerloops[link.target] if link is loop.links[-1]: # link that ends a loop -diff -r cd083843b67a pypy/translator/c/test/test_genc.py ---- a/pypy/translator/c/test/test_genc.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/c/test/test_genc.py Wed Jan 05 16:14:35 2011 -0500 +diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/test/test_genc.py +--- pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/c/test/test_genc.py 2011-05-02 14:28:33.945161001 -0400 @@ -1,4 +1,5 @@ import autopath, sys, os, py +import re from pypy.rpython.lltypesystem.lltype import * from pypy.annotation import model as annmodel from pypy.translator.translator import TranslationContext -@@ -498,3 +499,130 @@ +@@ -515,3 +516,130 @@ def test_inhibit_tail_call(): else: assert 0, "the call was not found in the C source" assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] @@ -632,10 +630,10 @@ diff -r cd083843b67a pypy/translator/c/test/test_genc.py + assert 'Here is a ' in c_fn_src + assert 'style comment within an RPython docstring' in c_fn_src + -diff -r cd083843b67a pypy/translator/driver.py ---- a/pypy/translator/driver.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/driver.py Wed Jan 05 16:14:35 2011 -0500 -@@ -539,6 +539,7 @@ +diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-src/pypy/translator/driver.py +--- pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/driver.py 2011-05-02 14:28:33.945161001 -0400 +@@ -536,6 +536,7 @@ class TranslationDriver(SimpleTaskEngine dstname = self.compute_exe_name() + '.staticdata.info' shutil.copy(str(fname), str(dstname)) self.log.info('Static data info written to %s' % dstname) @@ -643,12 +641,12 @@ diff -r cd083843b67a pypy/translator/driver.py # task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -r cd083843b67a pypy/translator/gensupp.py ---- a/pypy/translator/gensupp.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/gensupp.py Wed Jan 05 16:14:35 2011 -0500 -@@ -16,8 +16,8 @@ - def visit(block): - if isinstance(block, Block): +diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-src/pypy/translator/gensupp.py +--- pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/gensupp.py 2011-05-02 14:33:31.026161001 -0400 +@@ -14,8 +14,8 @@ def ordered_blocks(graph): + allblocks = [] + for block in graph.iterblocks(): # first we order by offset in the code string - if block.operations: - ofs = block.operations[0].offset @@ -657,10 +655,10 @@ diff -r cd083843b67a pypy/translator/gensupp.py else: ofs = sys.maxint # then we order by input variable name or value -diff -r cd083843b67a pypy/translator/interactive.py ---- a/pypy/translator/interactive.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/interactive.py Wed Jan 05 16:14:35 2011 -0500 -@@ -138,7 +138,7 @@ +diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1.5-src/pypy/translator/interactive.py +--- pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/interactive.py 2011-05-02 14:28:33.946161001 -0400 +@@ -138,7 +138,7 @@ class Translation(object): def source_c(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) self.ensure_backend('c') @@ -669,10 +667,10 @@ diff -r cd083843b67a pypy/translator/interactive.py def source_cl(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) -diff -r cd083843b67a pypy/translator/llsupport/wrapper.py ---- a/pypy/translator/llsupport/wrapper.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/llsupport/wrapper.py Wed Jan 05 16:14:35 2011 -0500 -@@ -59,6 +59,8 @@ +diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-1.5-src/pypy/translator/llsupport/wrapper.py +--- pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/llsupport/wrapper.py 2011-05-02 14:28:33.946161001 -0400 +@@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam # "return result" block = Block(wrapper_inputargs) wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) @@ -681,10 +679,10 @@ diff -r cd083843b67a pypy/translator/llsupport/wrapper.py translator.update_call_graph(wgraph, graph, object()) translator.graphs.append(wgraph) block.operations[:] = newops -diff -r cd083843b67a pypy/translator/simplify.py ---- a/pypy/translator/simplify.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/simplify.py Wed Jan 05 16:14:35 2011 -0500 -@@ -294,7 +294,7 @@ +diff -up pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code pypy-1.5-src/pypy/translator/simplify.py +--- pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/simplify.py 2011-05-02 14:28:33.952161001 -0400 +@@ -298,7 +298,7 @@ def join_blocks(graph): return renaming.get(v, v) def rename_op(op): args = [rename(a) for a in op.args] diff --git a/pypy.spec b/pypy.spec index c69893a..1a651e0 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.4.1 -Release: 10%{?dist} +Version: 1.5 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -105,7 +105,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %global verbose_logs 0 %global pypyprefix %{_libdir}/pypy-%{version} -%global pylibver 2.5.2 +%global pylibver 2.7 # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/translator/goal @@ -120,7 +120,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
# Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: pypy-1.4-config.patch +Patch0: pypy-1.5-config.patch # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -150,7 +150,7 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch #
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
# TODO: get this into the upstream bug tracker, and finish inlining # support (rhbz#666963) -Patch4: pypy-1.4.1-more-readable-c-code.patch +Patch4: pypy-1.5-more-readable-c-code.patch # Build-time requirements: @@ -584,7 +584,7 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # interface going forward, so let's just mimic upstream for now. %global pypy_include_dir %{pypyprefix}/include mkdir -p %{buildroot}/%{pypy_include_dir} -cp include/*.h include/*.inl %{buildroot}/%{pypy_include_dir} +cp include/*.h %{buildroot}/%{pypy_include_dir} # Capture the RPython source code files from the build within the debuginfo @@ -698,6 +698,25 @@ CheckPyPy() { # seems to hang on this test, within test_line_terminator SkipTest test_asynchat + # test_audioop: + # test test_audioop crashed -- <type 'exceptions.ImportError'>: No module named audioop + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/regrtest.py", line 874, in runtest_inner + # the_package = __import__(abstest, globals(), locals(), []) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_audioop.py", line 1, in <module> + # import audioop + # ImportError: No module named audioop + SkipTest test_audioop + + # test_capi: + # RPython traceback: + # RPython traceback: + # File "implement.c", line 243013, in _PyObject_New + # File "implement_1.c", line 31707, in _PyObject_NewVar + # File "implement.c", line 217060, in from_ref + # Fatal RPython error: AssertionError + SkipTest test_capi + # test_compiler: # 4 errors out of 13: # testSourceCodeEncodingsError @@ -710,10 +729,102 @@ CheckPyPy() { # failures=17, errors=20, out of 132 tests SkipTest test_ctypes + # test_distutils: + # Warning -- os.environ was modified by test_distutils + # test test_distutils failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_distutils + # test_frozen: # TestFailed: import __hello__ failed:No module named __hello__ SkipTest test_frozen + # test_gc: + # test test_gc crashed -- <type 'exceptions.AttributeError'>: 'module' object has no attribute 'get_debug' + SkipTest test_gc + + # test_gdb: + # test test_gdb crashed -- <type 'exceptions.KeyError'>: 'PY_CFLAGS' + SkipTest test_gdb + + # test_generators: + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # exiting + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # exiting + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # finally + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # sys.stderr.getvalue().startswith( + # "Exception RuntimeError: 'generator ignored GeneratorExit' in " + # ) + # Expected: + # True + # Got: + # False + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.refleaks + # Failed example: + # try: + # sys.stderr = StringIO.StringIO() + # class Leaker: + # def __del__(self): + # raise RuntimeError + # l = Leaker() + # del l + # gc_collect() + # err = sys.stderr.getvalue().strip() + # err.startswith( + # "Exception RuntimeError: RuntimeError() in " + # ) + # err.endswith("> ignored") + # len(err.splitlines()) + # finally: + # sys.stderr = old + # Expected: + # True + # True + # 1 + # Got: + # False + # False + # 0 + # ********************************************************************** + # 2 items had failures: + # 4 of 107 in test.test_generators.__test__.coroutine + # 1 of 11 in test.test_generators.__test__.refleaks + # ***Test Failed*** 5 failures. + # test test_generators failed -- 5 of 294 doctests failed + SkipTest test_generators + + # test_getargs2: + # test test_getargs2 failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_getargs2 + + # test_hotshot: + # test test_hotshot crashed -- <type 'exceptions.ImportError'>: No module named _hotshot + SkipTest test_hotshot + + # test_io: + # test test_io failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_io + # test_ioctl: # Failing in Koji with dist-f15 with: # ====================================================================== @@ -737,6 +848,23 @@ CheckPyPy() { # 24 failures out of 25, apparently all due to TypeError SkipTest test_iterlen + # test_multiprocessing: + # test test_multiprocessing failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_multiprocessing + + # test_module: + # test test_module failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_module.py", line 81, in test_clear_dict_in_ref_cycle + # self.assertEqual(destroyed, [1]) + # AssertionError: Lists differ: [] != [1] + # Second list contains 1 additional elements. + # First extra element 0: + # 1 + # - [] + # + [1] + # ? + + SkipTest test_module + # test_parser: # 12 failures out of 15 SkipTest test_parser @@ -746,6 +874,44 @@ CheckPyPy() { # test test_platform failed -- errors occurred in test.test_platform.PlatformTest SkipTest test_platform + # test_posix: + # test test_posix failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 361, in test_getcwd_long_pathnames + # _create_and_do_getcwd(dirname) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # [...repeats...] + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 356, in _create_and_do_getcwd + # self.assertEqual(e.errno, expected_errno) + # AssertionError: 36 != 34 + SkipTest test_posix + + # test_readline: + # test test_readline failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_readline.py", line 16, in testHistoryUpdates + # readline.clear_history() + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 277, in clear_history + # del self.get_reader().history[:] + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 186, in get_reader + # console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING) + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 103, in __init__ + # self._clear = _my_getstr("clear") + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 45, in _my_getstr + # "terminal doesn't have the required '%s' capability"%cap + # InvalidTerminal: terminal doesn't have the required 'clear' capability + SkipTest test_readline + + # test_scope: + # test test_scope failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_scope.py", line 437, in testLeaks + # self.assertEqual(Foo.count, 0) + # AssertionError: 100 != 0 + SkipTest test_scope + # test_socket: # testSockName can fail in Koji with: # my_ip_addr = socket.gethostbyname(socket.gethostname()) @@ -761,10 +927,138 @@ CheckPyPy() { # ProgrammingError: Incomplete statement '' SkipTest test_sqlite + # test_strop: + # test test_strop crashed -- <type 'exceptions.ImportError'>: No module named strop + SkipTest test_strop + + # test_structmembers: + # test test_structmembers failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_structmembers + + # test_subprocess: + # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset + # 'import site' failed + # . + # this bit of output is from a test of stdout in a different process ... + # /builddir/build/BUILD/pypy-1.5-src/lib_pypy/ctypes_support.py:26: RuntimeWarning: C function without declared arguments called + # return standard_c_lib.__errno_location() + # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset + # 'import site' failed + # . + # this bit of output is from a test of stdout in a different process ... + # test test_subprocess failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_subprocess + + # test_symtable: + # test test_symtable crashed -- <type 'exceptions.ImportError'>: No module named _symtable + SkipTest test_symtable + + # test_sys_settrace: + # test test_sys_settrace failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 334, in test_13_genexp + # self.run_test(generator_example) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 280, in run_test + # self.run_and_compare(func, func.events) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 277, in run_and_compare + # tracer.events, events) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 269, in compare_events + # [str(x) for x in events]))) + # AssertionError: events did not match expectation: + # (0, 'call') + # (2, 'line') + # (-6, 'call') + # (-5, 'line') + # (-4, 'line') + # (-4, 'return') + # - (-4, 'call') + # - (-4, 'exception') + # - (-1, 'line') + # - (-1, 'return') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (5, 'return') + SkipTest test_sys_settrace + + # test_tempfile: + # test test_tempfile failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_tempfile + + # test_thread + # Koji build appears to hang here + SkipTest test_thread + # test_traceback: # works when run standalone; failures seen when run as part of a suite SkipTest test_traceback + # test_uuid: + # ====================================================================== + # ERROR: test_ifconfig_getnode (test.test_uuid.TestUUID) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_uuid.py", line 306, in test_ifconfig_getnode + # node = uuid._ifconfig_getnode() + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/uuid.py", line 326, in _ifconfig_getnode + # ip_addr = socket.gethostbyname(socket.gethostname()) + # gaierror: [Errno -3] Temporary failure in name resolution + # ---------------------------------------------------------------------- + # Ran 14 tests in 0.369s + # FAILED (errors=1) + SkipTest test_uuid + + # test_zipimport_support: + # ====================================================================== + # ERROR: test_doctest_main_issue4197 (test.test_zipimport_support.ZipSupportTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 194, in test_doctest_main_issue4197 + # exit_code, data = run_python(script_name) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 80, in run_python + # p = spawn_python(*args, **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python + # **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ + # errread, errwrite) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child + # raise child_exception + # OSError: [Errno 13] Permission denied + # ====================================================================== + # ERROR: test_pdb_issue4201 (test.test_zipimport_support.ZipSupportTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 221, in test_pdb_issue4201 + # p = spawn_python(script_name) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python + # **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ + # errread, errwrite) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child + # raise child_exception + # OSError: [Errno 13] Permission denied + # ---------------------------------------------------------------------- + # Ran 4 tests in 0.726s + # FAILED (errors=2) + SkipTest test_zipimport_support + # test_zlib: # failure seen in Koji, not sure of reason why: # test test_zlib failed -- Traceback (most recent call last): @@ -832,6 +1126,8 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix} %dir %{pypyprefix}/lib-python +%{pypyprefix}/lib-python/TODO +%{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib-python/modified-%{pylibver}/ %{pypyprefix}/lib-python/conftest.py* @@ -847,7 +1143,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{pypy_include_dir}/*.inl %if 0%{with_stackless} %files stackless @@ -858,6 +1153,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-1 +- 1.5 + * Wed Apr 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-10 - build a /usr/bin/pypy (but without the JIT compiler) on architectures that don't support the JIT, so that they do at least have something that runs diff --git a/sources b/sources index 90f34be..a047407 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ebbbb156b1eb842e9e65d909ed5f9f6d pypy-1.4.1-src.tar.bz2 +cb9ada2c50666318c3a2863da1fbe487 pypy-1.5-src.tar.bz2 commit 3ca83f1944c99711e69be7a733f36a976d1fcec2 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Sat Apr 30 18:24:07 2011 -0400 Fix the build on architectures that the JIT doesn't support - build a /usr/bin/pypy (but without the JIT compiler) on architectures that don't support the JIT, so that they do at least have something that runs diff --git a/pypy.spec b/pypy.spec index ca09b94..c69893a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -74,7 +74,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # [Timer] Total: --- 5215.3 s -# Should we build a "pypy" binary? (with jit) +# We will build a "pypy" binary. +# +# Unfortunately, the JIT support is only available on some architectures. +# # pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the # following options: # 'i386', 'x86' @@ -82,6 +85,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # 'x86_64' # 'cli' # 'llvm' +# +# We will only build with JIT support on those architectures, and build without +# it on the other archs. The resulting binary will typically be slower than +# CPython for the latter case. +# %ifarch %{ix86} x86_64 # FIXME: is there a better way of expressing "intel" here? %global with_jit 1 @@ -225,8 +233,16 @@ BuildRequires: /usr/bin/execstack Requires: pypy-libs = %{version}-%{release} %description -PyPy's implementation of Python, featuring a Just-In-Time compiler, and various -optimized implementations of the standard types (strings, dictionaries, etc) +PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU +architectures, and various optimized implementations of the standard types +(strings, dictionaries, etc) + +%if 0%{with_jit} +This build of PyPy has JIT-compilation enabled. +%else +This build of PyPy has JIT-compilation disabled, as it is not supported on this +CPU architecture. +%endif %package libs @@ -411,11 +427,12 @@ BuildPyPy() { popd } -%if 0%{with_jit} BuildPyPy \ pypy \ - "-Ojit" +%if 0%{with_jit} + "-Ojit" \ %endif + %{nil} %if 0%{with_stackless} BuildPyPy \ @@ -448,9 +465,7 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} -%if 0%{with_jit} InstallPyPy pypy -%endif %if 0%{with_stackless} InstallPyPy pypy-stackless @@ -799,9 +814,7 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -%if 0%{with_jit} CheckPyPy pypy -%endif %if 0%{with_stackless} CheckPyPy pypy-stackless @@ -825,12 +838,10 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ -%if 0%{with_jit} %files %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/pypy -%endif %files devel %defattr(-,root,root,-) @@ -847,6 +858,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-10 +- build a /usr/bin/pypy (but without the JIT compiler) on architectures that +don't support the JIT, so that they do at least have something that runs + * Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.4.1-9 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
commit d853ff6a5bdd4ce40976333f048aba1616374604 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Tue Feb 8 20:23:05 2011 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 6f44a9a..ca09b94 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -847,6 +847,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.4.1-9 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+ * Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-8 - disable self-hosting for now, due to fatal error seen JIT-compiling the translator commit c225b1c0921c528b804bdce231951a10f040cb6c Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jan 14 11:58:45 2011 -0500 Disable self-hosting for now, due to fatal error seen JIT-compiling the translator diff --git a/pypy.spec b/pypy.spec index 9c8134d..6f44a9a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -152,8 +152,38 @@ Patch4: pypy-1.4.1-more-readable-c-code.patch # # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: + +# I'm disabling the self-hosting for now, due to a fatal error seen inside the +# JIT, presumably whilst JIT-compiling something within the translator's +# inliner. +# +# Specifically, building pypy-1.4.1-7.fc15.src.rpm on x86_64 using pypy-1.4.1-5.fc15.x86_64 +#
http://koji.fedoraproject.org/koji/taskinfo?taskID=2721517
+# failed with this RPython traceback: +# ... snip ... +# [rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctransform.asmgcroot.ShapeDecompressor instance at 0x00000000f0b5bc80> has no attribute 'addr' +# [rtyper] specializing: 179300 / 180508 blocks (99%) +# [rtyper] specializing: 180500 / 180566 blocks (99%) +# [rtyper] -=- specialized 1363 more blocks -=- +# [rtyper] specializing: 180600 / 180777 blocks (99%) +# [rtyper] -=- specialized 211 more blocks -=- +# [backendopt:inlining] phase with threshold factor: 32.4 +# [backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic +# [x86/regalloc] Bogus arg in operation 76 at 0 +# RPython traceback: +# File "implement_62.c", line 39979, in send_bridge_to_backend +# File "implement_69.c", line 65301, in Assembler386_assemble_bridge +# File "implement_72.c", line 8078, in RegAlloc_prepare_bridge +# File "implement_40.c", line 53061, in RegAlloc__prepare +# File "implement_44.c", line 14305, in RegAlloc__compute_vars_longevity +# Fatal RPython error: NotImplementedError # -%global use_self_when_building 1 +# This appears to be deep within pypy/jit/backend/x86/regalloc.py which has +# called "not_implemented" to emit this message to stderr, before raising the +# exception: +# [x86/regalloc] Bogus arg in operation 76 at 0 + +%global use_self_when_building 0 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -817,6 +847,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-8 +- disable self-hosting for now, due to fatal error seen JIT-compiling the +translator + * Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-7 - skip test_ioctl for now commit 7632349386659a82412f3dfbd37e714bf56aa152 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jan 14 11:06:07 2011 -0500 skip test_ioctl for now diff --git a/pypy.spec b/pypy.spec index 71b2db6..9c8134d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -669,6 +669,25 @@ CheckPyPy() { # TestFailed: import __hello__ failed:No module named __hello__ SkipTest test_frozen + # test_ioctl: + # Failing in Koji with dist-f15 with: + # ====================================================================== + # FAIL: test_ioctl (test.test_ioctl.IoctlTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 25, in test_ioctl + # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + # AssertionError: 0 not in (8304, 17737) + # ====================================================================== + # FAIL: test_ioctl_mutate (test.test_ioctl.IoctlTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 35, in test_ioctl_mutate + # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + # AssertionError: 0 not in (8304, 17737) + # ---------------------------------------------------------------------- + SkipTest test_ioctl + # test_iterlen: # 24 failures out of 25, apparently all due to TypeError SkipTest test_iterlen @@ -798,6 +817,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-7 +- skip test_ioctl for now + * Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 - add a "pypy-devel" subpackage, and install the header files there - in %%check, re-run failed tests in verbose mode commit 0a81116e89104e6bd77075151eadf5bde029085d Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Jan 13 19:51:26 2011 -0500 Add a pypy-devel subpackage; rerun failed selftests in verbose mode * Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 - add a "pypy-devel" subpackage, and install the header files there - in %%check, re-run failed tests in verbose mode diff --git a/pypy.spec b/pypy.spec index 4d66f89..71b2db6 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -205,6 +205,16 @@ Summary: Run-time libraries used by PyPy implementations of Python %description libs Libraries required by the various PyPy implementations of Python. + +%package devel +Group: Development/Languages +Summary: Development tools for working with PyPy +%description devel +Header files for building C extension modules against PyPy + +Requires: pypy = %{version}-%{release} + + %if 0%{with_stackless} %package stackless Group: Development/Languages @@ -516,6 +526,22 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 + +# Header files for C extension modules. +# Upstream's packaging process (pypy/tool/release/package.py) +# creates an "include" subdir and copies all *.h/*.inl from "include" there +# (it also has an apparently out-of-date comment about copying them from +# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't +# seem to do this as of 2011-01-13) + +# FIXME: arguably these should be instead put into a subdir below /usr/include, +# it's not yet clear to me how upstream plan to deal with the C extension +# interface going forward, so let's just mimic upstream for now. +%global pypy_include_dir %{pypyprefix}/include +mkdir -p %{buildroot}/%{pypy_include_dir} +cp include/*.h include/*.inl %{buildroot}/%{pypy_include_dir} + + # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) %global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src @@ -692,8 +718,9 @@ CheckPyPy() { SkipTest test_tarfile # permissions issues %endif - # Run the built binary through the selftests: - time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP + # Run the built binary through the selftests + # "-w" : re-run failed tests in verbose mode + time ./$ExeName -m test.regrtest -w -x $TESTS_TO_SKIP popd @@ -756,6 +783,12 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/pypy %endif +%files devel +%defattr(-,root,root,-) +%dir %{pypy_include_dir} +%{pypy_include_dir}/*.h +%{pypy_include_dir}/*.inl + %if 0%{with_stackless} %files stackless %defattr(-,root,root,-) @@ -765,6 +798,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 +- add a "pypy-devel" subpackage, and install the header files there +- in %%check, re-run failed tests in verbose mode + * Fri Jan 7 2011 Dan Horák <dan[at]danny.cz> - 1.4.1-5 - valgrind available only on selected architectures commit d39359a3af6a0dee27f50e4a4fe52860f9c6b426 Author: Dan Horák <dan(a)danny.cz> Date: Fri Jan 7 17:56:06 2011 +0100 - valgrind available only on selected architectures diff --git a/pypy.spec b/pypy.spec index 162ed5f..4d66f89 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -176,7 +176,9 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel +%ifarch %{ix86} x86_64 ppc ppc64 s390x BuildRequires: valgrind-devel +%endif # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -763,6 +765,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 7 2011 Dan Horák <dan[at]danny.cz> - 1.4.1-5 +- valgrind available only on selected architectures + * Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 - rebuild pypy using itself, for speed, with a boolean to break this cycle in the build-requirement graph (falling back to using "python-devel" aka CPython) commit 00e57e74f81587a2c49341341a7a291a54e22dc8 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Jan 6 17:09:03 2011 -0500 * Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 - rebuild pypy using itself, for speed, with a boolean to break this cycle in the build-requirement graph (falling back to using "python-devel" aka CPython) - add work-in-progress patch to try to make generated c more readable (rhbz#666963) - capture the RPython source code files from the build within the debuginfo package (rhbz#666975) diff --git a/pypy-1.4.1-more-readable-c-code.patch b/pypy-1.4.1-more-readable-c-code.patch new file mode 100644 index 0000000..45fa534 --- /dev/null +++ b/pypy-1.4.1-more-readable-c-code.patch @@ -0,0 +1,695 @@ +diff -r cd083843b67a pypy/interpreter/pycode.py +--- a/pypy/interpreter/pycode.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/interpreter/pycode.py Wed Jan 05 16:14:35 2011 -0500 +@@ -14,6 +14,7 @@ + from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, + CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, + CO_GENERATOR, CO_CONTAINSGLOBALS) ++from pypy.interpreter.pytraceback import offset2lineno + from pypy.rlib.rarithmetic import intmask + from pypy.rlib.debug import make_sure_not_resized + from pypy.rlib import jit +@@ -81,6 +82,7 @@ + self.hidden_applevel = hidden_applevel + self.magic = magic + self._signature = cpython_code_signature(self) ++ self._cached_source = None + self._initialize() + + def _initialize(self): +@@ -403,3 +405,25 @@ + def repr(self, space): + return space.wrap(self.get_repr()) + repr.unwrap_spec = ['self', ObjSpace] ++ ++ def get_linenum_for_offset(self, offset): ++ # Given a bytecode offset, return a 1-based index into the lines of the ++ # source code ++ return offset2lineno(self, offset) ++ ++ def _ensure_source(self): ++ # Lazily grab the source lines into self._cached_source (or raise ++ # an IOError) ++ if not self._cached_source: ++ f = open(self.co_filename, 'r') ++ source = [line.rstrip() for line in f.readlines()] ++ f.close() ++ self._cached_source = source ++ ++ def get_source_text(self, linenum): ++ # Given a 1-based index, get the corresponding line of source code (or ++ # raise an IOError) ++ self._ensure_source() ++ return self._cached_source[linenum - 1] ++ ++ +diff -r cd083843b67a pypy/objspace/flow/model.py +--- a/pypy/objspace/flow/model.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/model.py Wed Jan 05 16:14:35 2011 -0500 +@@ -31,6 +31,120 @@ + + __metaclass__ = type + ++class SourceLoc(object): ++ # A srcloc is a specific location within the RPython source code, ++ # intended for human display ++ __slots__ = ('code', # code object ++ 'linenum' # 1-based index, as displayed to a user ++ ) ++ def __init__(self, code, linenum): ++ self.code = code ++ self.linenum = linenum ++ ++ def get_text(self): ++ # Get the actual source text of this line ++ return self.code.get_source_text(self.linenum) ++ ++ def __eq__(self, other): ++ return self.code == other.code and self.linenum == other.linenum ++ ++ def __ne__(self, other): ++ if other: ++ return self.code != other.code or self.linenum != other.linenum ++ else: ++ return True ++ ++class CodeLoc(object): ++ # A codeloc is a specific location within the RPython bytecode ++ __slots__ = ('code', # code object ++ 'offset' # int index into bytecode, or -1 ++ ) ++ ++ def __init__(self, code, offset): ++ self.code = code ++ self.offset = offset ++ ++ def __str__(self): ++ if self.offset >= 0: ++ return "%s@%d" % (self.code.co_name, self.offset) ++ else: ++ return "" ++ ++ def __ne__(self, other): ++ if other: ++ return self.code != other.code or self.offset != other.offset ++ else: ++ return True ++ ++ def __cmp__(self, other): ++ # Partial ordering, for those locations that have an offset: ++ if other: ++ if self.offset >= 0 and other.offset >= 0: ++ return self.offset - other.offset ++ return 0 ++ ++ def get_source_loc(self): ++ # Convert to a SourceLoc: ++ return SourceLoc(self.code, self.code.get_linenum_for_offset(self.offset)) ++ ++class OperationLoc(object): ++ # An oploc is the location within the RPython source code of a given ++ # operation ++ # ++ # This is a list consisting of CodeLoc instances, some of which may be None ++ # ++ # For the simple case, this is list of length 1 with a single CodeLoc ++ # ++ # For an operation inside an inlined callsite, we have a list of length 2: ++ # [codeloc of callsite, ++ # codeloc of operation within inlined body] ++ # ++ # For more interesting inlined cases, we have a chain of source locations: ++ # [codeloc of callsite, ++ # codeloc of inner callsite, ++ # ... , ++ # codeloc of innermost inlined callsite, ++ # codeloc of operation within inlined body] ++ # ++ ++ __slots__ = ('codelocs', ) ++ ++ def __init__(self, codelocs): ++ self.codelocs = codelocs ++ ++ def __str__(self): ++ return '[' + ' > '.join(str(codeloc) for codeloc in self.codelocs) + ']' ++ ++ def __cmp__(self, other): ++ return cmp(self.codelocs, other.codelocs) ++ ++def block_comparator(blk0, blk1): ++ ''' ++ Sort function for blocks, putting them in an ordering that attempts to ++ maximize readability of the generated C code ++ ''' ++ # print 'comparing %r and %r' % (blk0, blk1) ++ # Put the start/end block at the top/bottom: ++ if blk0.isstartblock: ++ return -1 ++ ++ if blk1.isstartblock: ++ return 1 ++ ++ # Order blocks by the offset, where present: ++ if blk0.operations: ++ if blk1.operations: ++ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) ++ else: ++ return -1 ++ else: ++ if blk1.operations: ++ return 1 ++ else: ++ return 0 ++ ++def edge_comparator(edge0, edge1): ++ return block_comparator(edge0.target, edge1.target) + + class FunctionGraph(object): + __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] +@@ -94,6 +208,21 @@ + seen[block] = True + stack += block.exits[::-1] + ++ def iterblocks_by_source(self): ++ # Try to preserve logical source ordering in the blocks ++ block = self.startblock ++ yield block ++ seen = {block: True} ++ stack = list(block.exits[::-1]) ++ stack.sort(edge_comparator) ++ while stack: ++ block = stack.pop().target ++ if block not in seen: ++ yield block ++ seen[block] = True ++ stack += block.exits[::-1] ++ stack.sort(edge_comparator) ++ + def iterlinks(self): + block = self.startblock + seen = {block: True} +@@ -183,14 +312,14 @@ + self.exits = [] # list of Link(s) + + def at(self): +- if self.operations and self.operations[0].offset >= 0: +- return "@%d" % self.operations[0].offset ++ if self.operations: ++ return str(self.operations[0].oploc) + else: + return "" + + def __str__(self): + if self.operations: +- txt = "block@%d" % self.operations[0].offset ++ txt = "block%s" % self.operations[0].oploc + else: + if (not self.exits) and len(self.inputargs) == 1: + txt = "return block" +@@ -245,6 +374,21 @@ + from pypy.translator.tool.graphpage import try_show + try_show(self) + ++ def isreturnblock(self): ++ return (not self.operations) and (not self.exits) and len(self.inputargs) == 1 ++ ++ def get_base_label(self, blocknum): ++ # Generate a more friendly C label for this block ++ if self.operations: ++ txt = "block" ++ elif (not self.exits) and len(self.inputargs) == 1: ++ txt = "return_block" ++ elif (not self.exits) and len(self.inputargs) == 2: ++ txt = "raise_block" ++ else: ++ txt = "codeless_block" ++ return '%s%d' % (txt, blocknum) ++ + + class Variable(object): + __slots__ = ["_name", "_nr", "concretetype"] +@@ -331,13 +475,15 @@ + + + class SpaceOperation(object): +- __slots__ = "opname args result offset".split() ++ __slots__ = "opname args result oploc".split() + +- def __init__(self, opname, args, result, offset=-1): ++ def __init__(self, opname, args, result, oploc=None): + self.opname = intern(opname) # operation name + self.args = list(args) # mixed list of var/const + self.result = result # either Variable or Constant instance +- self.offset = offset # offset in code string ++ if oploc is None: ++ oploc = OperationLoc([None]) ++ self.oploc = oploc + + def __eq__(self, other): + return (self.__class__ is other.__class__ and +@@ -352,8 +498,9 @@ + return hash((self.opname,tuple(self.args),self.result)) + + def __repr__(self): +- return "%r = %s(%s)" % (self.result, self.opname, +- ", ".join(map(repr, self.args))) ++ return "%r = %s(%s) (%s)" % (self.result, self.opname, ++ ", ".join(map(repr, self.args)), ++ self.oploc) + + class Atom(object): + def __init__(self, name): +@@ -448,8 +595,7 @@ + for op in oplist: + copyop = SpaceOperation(op.opname, + [copyvar(v) for v in op.args], +- copyvar(op.result), op.offset) +- #copyop.offset = op.offset ++ copyvar(op.result), op.oploc) + result.append(copyop) + return result + newblock.operations = copyoplist(block.operations) +diff -r cd083843b67a pypy/objspace/flow/objspace.py +--- a/pypy/objspace/flow/objspace.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/objspace.py Wed Jan 05 16:14:35 2011 -0500 +@@ -310,7 +310,9 @@ + def do_operation(self, name, *args_w): + spaceop = SpaceOperation(name, args_w, Variable()) + if hasattr(self, 'executioncontext'): # not here during bootstrapping +- spaceop.offset = self.executioncontext.crnt_offset ++ codeloc = CodeLoc(self.executioncontext.code, ++ self.executioncontext.crnt_offset) ++ spaceop.oploc = OperationLoc([codeloc]) + self.executioncontext.recorder.append(spaceop) + return spaceop.result + +diff -r cd083843b67a pypy/objspace/flow/test/test_model.py +--- a/pypy/objspace/flow/test/test_model.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/test/test_model.py Wed Jan 05 16:14:35 2011 -0500 +@@ -132,3 +132,25 @@ + assert v2.renamed + assert v2.name.startswith("foobar_") and v2.name != v.name + assert v2.name.split('_', 1)[1].isdigit() ++ ++def test_source_locations(): ++ # Invent some random offsets into the code: ++ co = sample_function.__code__ ++ codelocA = CodeLoc(co, 42) ++ codelocB = CodeLoc(co, 87) ++ ++ assert str(codelocA) == 'sample_function@42' ++ assert str(codelocB) == 'sample_function@87' ++ ++ assert cmp(codelocA, codelocB) < 0 ++ assert cmp(codelocB, codelocA) > 0 ++ ++ oplocA = OperationLoc([codelocA]) ++ oplocB = OperationLoc([codelocB]) ++ ++ assert str(oplocA) == '[sample_function@42]' ++ assert str(oplocB) == '[sample_function@87]' ++ ++ assert cmp(oplocA, oplocB) < 0 ++ assert cmp(oplocB, oplocA) > 0 ++ +diff -r cd083843b67a pypy/rpython/rtyper.py +--- a/pypy/rpython/rtyper.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/rpython/rtyper.py Wed Jan 05 16:14:35 2011 -0500 +@@ -800,7 +800,7 @@ + return vars + + def genop(self, opname, args_v, resulttype=None): +- return self.llops.genop(opname, args_v, resulttype) ++ return self.llops.genop(opname, args_v, resulttype, self.spaceop.oploc) + + def gendirectcall(self, ll_function, *args_v): + return self.llops.gendirectcall(ll_function, *args_v) +@@ -935,7 +935,7 @@ + v.concretetype)) + return v + +- def genop(self, opname, args_v, resulttype=None): ++ def genop(self, opname, args_v, resulttype=None, oploc=None): + try: + for v in args_v: + v.concretetype +@@ -944,7 +944,7 @@ + " and pass its result to genop()," + " never hop.args_v directly.") + vresult = Variable() +- self.append(SpaceOperation(opname, args_v, vresult)) ++ self.append(SpaceOperation(opname, args_v, vresult, oploc)) + if resulttype is None: + vresult.concretetype = Void + return None +diff -r cd083843b67a pypy/translator/backendopt/inline.py +--- a/pypy/translator/backendopt/inline.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/backendopt/inline.py Wed Jan 05 16:14:35 2011 -0500 +@@ -4,6 +4,7 @@ + from pypy.translator.unsimplify import copyvar + from pypy.objspace.flow.model import Variable, Constant, Block, Link + from pypy.objspace.flow.model import SpaceOperation, c_last_exception ++from pypy.objspace.flow.model import OperationLoc + from pypy.objspace.flow.model import FunctionGraph + from pypy.objspace.flow.model import traverse, mkentrymap, checkgraph + from pypy.annotation import model as annmodel +@@ -231,6 +232,7 @@ + self.varmap = {} + self._copied_blocks = {} + self.op = block.operations[index_operation] ++ self.callsite_oploc = self.op.oploc + self.graph_to_inline = self.get_graph_from_op(self.op) + self.exception_guarded = False + if (block.exitswitch == c_last_exception and +@@ -297,7 +299,9 @@ + + def copy_operation(self, op): + args = [self.get_new_name(arg) for arg in op.args] +- result = SpaceOperation(op.opname, args, self.get_new_name(op.result)) ++ new_oploc = OperationLoc(self.callsite_oploc.codelocs[:] + op.oploc.codelocs[:]) ++ result = SpaceOperation(op.opname, args, self.get_new_name(op.result), ++ new_oploc) + return result + + def copy_block(self, block): +diff -r cd083843b67a pypy/translator/c/funcgen.py +--- a/pypy/translator/c/funcgen.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/c/funcgen.py Wed Jan 05 16:14:35 2011 -0500 +@@ -1,4 +1,6 @@ + import sys ++import inspect ++import dis + from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring + from pypy.translator.c.support import cdecl + from pypy.translator.c.support import llvalue_from_constant, gen_assignments +@@ -22,6 +24,38 @@ + + KEEP_INLINED_GRAPHS = False + ++def block_comparator(blk0, blk1): ++ ''' ++ Sort function for blocks, putting them in an ordering that attempts to ++ maximize readability of the generated C code ++ ''' ++ # print 'comparing %r and %r' % (blk0, blk1) ++ # Put the start/end block at the top/bottom: ++ if blk0.isstartblock: ++ return -1 ++ ++ if blk1.isstartblock: ++ return 1 ++ ++ # Order blocks by the offset, where present: ++ if blk0.operations: ++ if blk1.operations: ++ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) ++ else: ++ return -1 ++ else: ++ if blk1.operations: ++ return 1 ++ else: ++ return 0 ++ ++def escape_c_comments(py_src): ++ # Escape C comments within RPython source, to avoid generating bogus ++ # comments in our generated C source: ++ py_src = py_src.replace('/*', '') ++ py_src = py_src.replace('*/', '') ++ return py_src ++ + class FunctionCodeGenerator(object): + """ + Collects information about a function which we have to generate +@@ -210,14 +244,57 @@ + + def cfunction_body(self): + graph = self.graph +- yield 'goto block0;' # to avoid a warning "this label is not used" ++ # Try to print python source code: ++ if hasattr(graph, 'func'): ++ filename = inspect.getfile(graph.func) ++ #yield '/* name: %r */' % filename ++ try: ++ src, startline = inspect.getsourcelines(graph.func) ++ except IOError: ++ pass # No source found ++ except IndexError: ++ pass # Bulletproofing ++ else: ++ yield '/* Python source %r' % filename ++ for i, line in enumerate(src): ++ line = line.rstrip() ++ line = escape_c_comments(line) ++ # FuncNode.funcgen_implementation treats lines ending in ':' ++ # as C blocks, which messes up the formatting. ++ # Work around this: ++ if line.endswith(':'): ++ line += ' ' ++ yield ' * %4d : %s' % (startline + i, line) ++ yield ' */' ++ ++ label = graph.startblock.get_base_label(self.blocknum[graph.startblock]) ++ yield 'goto %s;' % label # to avoid a warning "this label is not used" ++ ++ # Sort the blocks into a (hopefully) readable order: ++ blocks = list(graph.iterblocks_by_source()) ++ blocks.sort(block_comparator) + + # generate the body of each block +- for block in graph.iterblocks(): ++ for block in blocks: ++ cursrcloc = None + myblocknum = self.blocknum[block] + yield '' +- yield 'block%d:' % myblocknum ++ yield '%s:' % block.get_base_label(myblocknum) ++ #yield "/* repr(block): %r */" % (block, ) ++ #yield "/* type(block): %r */" % (type(block), ) + for i, op in enumerate(block.operations): ++ #yield "/* type(op): %r */" % (type(op), ) ++ #yield "/* op.oploc: %s */" % (op.oploc, ) ++ codeloc = op.oploc.codelocs[-1] ++ if codeloc: ++ srcloc = codeloc.get_source_loc() ++ if srcloc != cursrcloc: ++ try: ++ yield "/* %s:%d : %s */" % (codeloc.code.co_name, srcloc.linenum, escape_c_comments(srcloc.get_text())) ++ cursrcloc = srcloc ++ except IOError: ++ pass ++ + for line in self.gen_op(op): + yield line + if len(block.exits) == 0: +@@ -310,7 +387,7 @@ + assignments.append((a2typename, dest, src)) + for line in gen_assignments(assignments): + yield line +- label = 'block%d' % self.blocknum[link.target] ++ label = link.target.get_base_label(self.blocknum[link.target]) + if link.target in self.innerloops: + loop = self.innerloops[link.target] + if link is loop.links[-1]: # link that ends a loop +diff -r cd083843b67a pypy/translator/c/test/test_genc.py +--- a/pypy/translator/c/test/test_genc.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/c/test/test_genc.py Wed Jan 05 16:14:35 2011 -0500 +@@ -1,4 +1,5 @@ + import autopath, sys, os, py ++import re + from pypy.rpython.lltypesystem.lltype import * + from pypy.annotation import model as annmodel + from pypy.translator.translator import TranslationContext +@@ -498,3 +499,130 @@ + else: + assert 0, "the call was not found in the C source" + assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] ++ ++def get_generated_c_source(fn, types): ++ # Return a (optimized fn, c source code, c source filename) 3-tuple ++ t = Translation(fn) ++ t.annotate(types) ++ c_filename_path = t.source_c() ++ h = c_filename_path.open() ++ src = h.read() ++ h.close() ++ c_fn = t.compile_c() ++ return (c_fn, src, c_filename_path) ++ ++def extract_c_function(c_src, fname): ++ # Extract the source for a given C function out of a the given src string ++ # Makes assumptions about the layout of the source ++ pattern = '^(.+) \**%s\(.*\) {$' % fname ++ within_fn = False ++ result = '' ++ for line in c_src.splitlines(): ++ if within_fn: ++ result += line + '\n' ++ if line.startswith('}'): ++ return result ++ else: ++ m = re.match(pattern, line) ++ if m: ++ within_fn = True ++ result += line + '\n' ++ return result ++ ++ ++ ++def test_generated_c_source(): ++ # Verify that generate C source "looks good" ++ # We'll use is_perfect_number, as it contains a loop and a conditional ++ ++ # Generate C source code ++ from pypy.translator.test.snippet import is_perfect_number ++ c_fn, c_src, c_filename_path = get_generated_c_source(is_perfect_number, ++ [int]) ++ ++ # Locate the C source for the type-specialized function: ++ c_fn_src = extract_c_function(c_src, 'pypy_g_is_perfect_number') ++ ++ # Verify that the C source contains embedded comments containing the lines ++ # of the python source: ++ expected_comment_lines = [ ++ '/* is_perfect_number:31 : while div < n: */', ++ '/* is_perfect_number:32 : if n % div == 0: */', ++ '/* is_perfect_number:33 : sum += div */', ++ '/* is_perfect_number:34 : div += 1 */', ++ '/* is_perfect_number:35 : return n == sum */'] ++ for exp_line in expected_comment_lines: ++ assert exp_line in c_fn_src ++ ++ # Verify that the lines occur in the correct order ++ # ...we do this by filtering the function's generated C source to just ++ # those lines containing our comments (and dropping whitespace): ++ lines = c_fn_src.splitlines() ++ lines = [line.strip() ++ for line in lines ++ if '/* is_perfect_number:' in line] ++ ++ # ...we should now have exact equality: the ordering should be as expected, ++ # and each comment should appear exactly once: ++ assert lines == expected_comment_lines ++ ++ # Ensure that the generated C function does the right thing: ++ assert c_fn(5) == False ++ assert c_fn(6) == True ++ assert c_fn(7) == False ++ ++ assert c_fn(5.0) == False ++ assert c_fn(6.0) == True ++ assert c_fn(7.0) == False ++ ++ assert c_fn(5L) == False ++ assert c_fn(6L) == True ++ assert c_fn(7L) == False ++ ++ try: ++ c_fn('hello world') ++ except: ++ pass ++ else: ++ raise 'Was expected exception' ++ ++def test_escaping_c_comments(): ++ # Ensure that c comments within RPython code get escaped when we generate ++ # our .c code (to avoid generating bogus C) ++ # See e.g. pypy.module.cpyext.dictobject's PyDict_Next, which has a ++ # docstring embedding a C comment ++ def c_style_comment(a, b): ++ '''Here is a C-style comment within an RPython docstring: ++ /* hello world */ ++ ''' ++ # and here's one in a string literal: ++ return '/* hello world a:%s b:%s */' % (a, b) ++ ++ def cplusplus_style_comment(a, b): ++ '''Here is a C++-style comment within an RPython docstring: ++ // hello world ++ ''' ++ # and here are some in string literals, and one as the floor division ++ # operator: ++ return '// hello world: a // b = %s' % (a // b) ++ ++ for fn_name, exp_output in [('c_style_comment', ++ '/* hello world a:6 b:3 */'), ++ ('cplusplus_style_comment', ++ '// hello world: a // b = 2')]: ++ fn = locals()[fn_name] ++ ++ c_fn, c_src, c_filename_path = get_generated_c_source(fn, [int, int]) ++ # If the above survived, then the C compiler managed to handle ++ # the generated C code ++ ++ # Verify that the generated code works (i.e. that we didn't ++ # accidentally change the meaning): ++ assert c_fn(6, 3) == exp_output ++ ++ # Ensure that at least part of the docstrings made it into the C ++ # code: ++ c_fn_src = extract_c_function(c_src, 'pypy_g_' + fn_name) ++ assert 'Here is a ' in c_fn_src ++ assert 'style comment within an RPython docstring' in c_fn_src ++ +diff -r cd083843b67a pypy/translator/driver.py +--- a/pypy/translator/driver.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/driver.py Wed Jan 05 16:14:35 2011 -0500 +@@ -539,6 +539,7 @@ + dstname = self.compute_exe_name() + '.staticdata.info' + shutil.copy(str(fname), str(dstname)) + self.log.info('Static data info written to %s' % dstname) ++ return c_source_filename + + # + task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") +diff -r cd083843b67a pypy/translator/gensupp.py +--- a/pypy/translator/gensupp.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/gensupp.py Wed Jan 05 16:14:35 2011 -0500 +@@ -16,8 +16,8 @@ + def visit(block): + if isinstance(block, Block): + # first we order by offset in the code string +- if block.operations: +- ofs = block.operations[0].offset ++ if block.operations and block.operations[0].oploc.codelocs[0]: ++ ofs = block.operations[0].oploc.codelocs[0].offset + else: + ofs = sys.maxint + # then we order by input variable name or value +diff -r cd083843b67a pypy/translator/interactive.py +--- a/pypy/translator/interactive.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/interactive.py Wed Jan 05 16:14:35 2011 -0500 +@@ -138,7 +138,7 @@ + def source_c(self, argtypes=None, **kwds): + self.update_options(argtypes, kwds) + self.ensure_backend('c') +- self.driver.source_c() ++ return self.driver.source_c() + + def source_cl(self, argtypes=None, **kwds): + self.update_options(argtypes, kwds) +diff -r cd083843b67a pypy/translator/llsupport/wrapper.py +--- a/pypy/translator/llsupport/wrapper.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/llsupport/wrapper.py Wed Jan 05 16:14:35 2011 -0500 +@@ -59,6 +59,8 @@ + # "return result" + block = Block(wrapper_inputargs) + wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) ++ if hasattr(graph, 'func'): ++ wgraph.func = graph.func + translator.update_call_graph(wgraph, graph, object()) + translator.graphs.append(wgraph) + block.operations[:] = newops +diff -r cd083843b67a pypy/translator/simplify.py +--- a/pypy/translator/simplify.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/simplify.py Wed Jan 05 16:14:35 2011 -0500 +@@ -294,7 +294,7 @@ + return renaming.get(v, v) + def rename_op(op): + args = [rename(a) for a in op.args] +- op = SpaceOperation(op.opname, args, rename(op.result), op.offset) ++ op = SpaceOperation(op.opname, args, rename(op.result), op.oploc) + # special case... + if op.opname == 'indirect_call': + if isinstance(op.args[0], Constant): diff --git a/pypy.spec b/pypy.spec index 96354e2..162ed5f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -136,9 +136,33 @@ Patch2: fix-test_commands-expected-ls-output-issue7108.patch #
https://codespeak.net/issue/pypy-dev/issue614
Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch +# Try to improve the readability of the generated .c code, by adding in the +# RPython source as comments where possible. +# A version of this was sent upstream as: +#
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
+# TODO: get this into the upstream bug tracker, and finish inlining +# support (rhbz#666963) +Patch4: pypy-1.4.1-more-readable-c-code.patch + + # Build-time requirements: -BuildRequires: python-devel +# pypy's can be rebuilt using itself, rather than with CPython; doing so +# halves the build time. +# +# Turn it off with this boolean, to revert back to rebuilding using CPython +# and avoid a cycle in the build-time dependency graph: +# +%global use_self_when_building 1 +%if 0%{use_self_when_building} +BuildRequires: pypy +%global bootstrap_python_interp pypy +%else +BuildRequires: python-devel +%global bootstrap_python_interp python +%endif + + # FIXME: I'm seeing errors like this in the logs: # [translation:WARNING] The module '_rawffi' is disabled @@ -215,6 +239,8 @@ sed -i \ -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ pypy/translator/goal/app_main.py +%patch4 -p1 -b .more-readable-c-code + # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -304,6 +330,7 @@ BuildPyPy() { # doesn't interract well with the results of using our standard build flags. # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. + # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') # If we're already built the JIT-enabled "pypy", then use it for subsequent @@ -311,7 +338,10 @@ BuildPyPy() { if test -x './pypy' ; then INTERP='./pypy' else - INTERP='python' + # First pypy build within this rpm build? + # Fall back to using the bootstrap python interpreter, which might be a + # system copy of pypy from an earlier rpm, or be cpython's /usr/bin/python: + INTERP='%{bootstrap_python_interp}' fi # Here's where we actually invoke the build: @@ -484,6 +514,34 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 +# Capture the RPython source code files from the build within the debuginfo +# package (rhbz#666975) +%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src +mkdir -p %{buildroot}%{pypy_debuginfo_dir} + +# copy over everything: +cp -a pypy %{buildroot}%{pypy_debuginfo_dir} + +# ...then delete files that aren't .py files: +find \ + %{buildroot}%{pypy_debuginfo_dir} \ + \( -type f \ + -a \ + \! -name "*.py" \ + \) \ + -delete + +# We don't need bytecode for these files; they are being included for reference +# purposes. +# There are some rpmlint warnings from these files: +# non-executable-script +# wrong-script-interpreter +# zero-length +# script-without-shebang +# dangling-symlink +# but given that the objective is to preserve a copy of the source code, those +# are acceptable. + %check topdir=$(pwd) @@ -511,6 +569,7 @@ CheckPyPy() { # Gather a list of tests to skip, due to known failures # TODO: report these failures to pypy upstream + # See also rhbz#666967 and rhbz#666969 TESTS_TO_SKIP="" # Test failures relating to missing codecs @@ -622,6 +681,14 @@ CheckPyPy() { # AssertionError: ValueError not raised SkipTest test_zlib + %if 0%{use_self_when_building} + # Patch 3 prioritizes the installed copy of pypy's libraries over the + # build copy. + # This leads to test failures of test_pep263 and test_tarfile + # For now, suppress these when building using pypy itself: + SkipTest test_pep263 # on-disk encoding issues + SkipTest test_tarfile # permissions issues + %endif # Run the built binary through the selftests: time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP @@ -696,6 +763,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 +- rebuild pypy using itself, for speed, with a boolean to break this cycle in +the build-requirement graph (falling back to using "python-devel" aka CPython) +- add work-in-progress patch to try to make generated c more readable +(rhbz#666963) +- capture the RPython source code files from the build within the debuginfo +package (rhbz#666975) + * Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-3 - try to respect the FHS by installing libraries below libdir, rather than datadir; patch app_main.py to look in this installation location first when commit f756cfcb34f7e48db6afaf04f79ca5c576a4b696 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon Jan 3 15:06:28 2011 -0500 Initial import of pypy-1.4.1-3 from package review (rhbz#588941) diff --git a/.gitignore b/.gitignore index e69de29..2878978 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pypy-1.4.1-src.tar.bz2 diff --git a/fix-test_commands-expected-ls-output-issue7108.patch b/fix-test_commands-expected-ls-output-issue7108.patch new file mode 100644 index 0000000..becc3e0 --- /dev/null +++ b/fix-test_commands-expected-ls-output-issue7108.patch @@ -0,0 +1,11 @@ +--- test/test_commands.py.orig 2010-12-22 13:25:11.357333216 -0500 ++++ test/test_commands.py 2010-12-22 13:25:57.927166219 -0500 +@@ -47,7 +47,7 @@ class CommandTests(unittest.TestCase): + # Note that the first case above has a space in the group name + # while the second one has a space in both names. + pat = r'''d......... # It is a directory. +- \+? # It may have ACLs. ++ [.+@]? # It may have alt access (SELinux, ACLs or metadata ('@' OS X). + \s+\d+ # It has some number of links. + [^/]* # Skip user, group, size, and date. + /\. # and end with the name of the file. diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch new file mode 100644 index 0000000..257f60f --- /dev/null +++ b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch @@ -0,0 +1,13 @@ +diff --git a/pypy/tool/ansi_print.py b/pypy/tool/ansi_print.py +index 3eff27c..fac4ba2 100644 +--- a/pypy/tool/ansi_print.py ++++ b/pypy/tool/ansi_print.py +@@ -25,7 +25,7 @@ class AnsiLog: + self.kw_to_color = self.KW_TO_COLOR.copy() + self.kw_to_color.update(kw_to_color) + self.file = file +- self.fancy = True ++ self.fancy = False + self.isatty = getattr(sys.stderr, 'isatty', lambda: False) + if self.fancy and self.isatty(): + self.mandelbrot_driver = Driver() diff --git a/pypy-1.4-config.patch b/pypy-1.4-config.patch new file mode 100644 index 0000000..0b82ac8 --- /dev/null +++ b/pypy-1.4-config.patch @@ -0,0 +1,44 @@ +Index: pypy-1.4/pypy/translator/platform/linux.py +=================================================================== +--- pypy-1.4.orig/pypy/translator/platform/linux.py ++++ pypy-1.4/pypy/translator/platform/linux.py +@@ -3,17 +3,22 @@ import py, os + from pypy.translator.platform import _run_subprocess + from pypy.translator.platform.posix import BasePosix + ++CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', ++ '-Wall', '-Wno-unused'] ++if os.environ.get('CFLAGS', None): ++ CFLAGS.extend(os.environ['CFLAGS'].split()) ++CFLAGS = tuple(CFLAGS) ++ + class BaseLinux(BasePosix): + name = "linux" + + link_flags = ('-pthread', '-lrt') +- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', +- '-Wall', '-Wno-unused') ++ cflags = CFLAGS + standalone_only = () + shared_only = ('-fPIC',) + so_ext = 'so' + so_prefixes = ('lib', '') +- ++ + def _args_for_shared(self, args): + return ['-shared'] + args + +@@ -29,9 +34,10 @@ class BaseLinux(BasePosix): + class Linux(BaseLinux): + shared_only = () # it seems that on 32-bit linux, compiling with -fPIC + # gives assembler that asmgcc is not happy about. +- def library_dirs_for_libffi_a(self): +- # places where we need to look for libffi.a +- return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # Fedora Linux, at least, has the shared version but not the static ++ #def library_dirs_for_libffi_a(self): ++ # # places where we need to look for libffi.a ++ # return self.library_dirs_for_libffi() + ['/usr/lib'] + + + class Linux64(BaseLinux): diff --git a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch new file mode 100644 index 0000000..93bcb69 --- /dev/null +++ b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch @@ -0,0 +1,16 @@ +diff -r cd083843b67a pypy/translator/goal/app_main.py +--- a/pypy/translator/goal/app_main.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/goal/app_main.py Wed Dec 22 17:43:21 2010 -0500 +@@ -191,6 +191,12 @@ + IS_WINDOWS = False + + def get_library_path(executable): ++ # FIXME: get this from translator configuration ++ dirname = LIBRARY_INSTALLATION_PATH ++ newpath = sys.pypy_initial_path(dirname) ++ if newpath: ++ return newpath ++ + search = executable + while 1: + dirname = resolvedirof(search) diff --git a/pypy.spec b/pypy.spec new file mode 100644 index 0000000..96354e2 --- /dev/null +++ b/pypy.spec @@ -0,0 +1,762 @@ +Name: pypy +Version: 1.4.1 +Release: 3%{?dist} +Summary: Python implementation with a Just-In-Time compiler + +Group: Development/Languages +# LGPL and another free license we'd need to ask spot about are present in some +# java jars that we're not building with atm (in fact, we're deleting them +# before building). If we restore those we'll have to work out the new +# licensing terms +License: MIT and Python and UCD +URL:
http://pypy.org/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# High-level configuration of the build: + +# PyPy consists of an implementation of an interpreter (with JIT compilation) +# for the full Python language written in a high-level language, leaving many +# of the implementation details as "pluggable" policies. +# +# The implementation language is then compiled down to .c code, from which we +# obtain a binary. +# +# This allows us to build a near-arbitrary collection of different +# implementations of Python with differing tradeoffs +# +# (As it happens, the implementation language is itself Python, albeit a +# restricted subset "RPython", chosen to making it amenable to being compiled. +# The result implements the full Python language though) + +# We could build many different implementations of Python. +# For now, let's focus on the implementation that appears to be receiving the +# most attention upstream: the JIT-enabled build, with all standard +# optimizations + +# Building a configuration can take significant time: + +# A build of pypy (with jit) on i686 took 77 mins: +# [Timer] Timings: +# [Timer] annotate --- 583.3 s +# [Timer] rtype_lltype --- 760.9 s +# [Timer] pyjitpl_lltype --- 567.3 s +# [Timer] backendopt_lltype --- 375.6 s +# [Timer] stackcheckinsertion_lltype --- 54.1 s +# [Timer] database_c --- 852.2 s +# [Timer] source_c --- 1007.3 s +# [Timer] compile_c --- 419.9 s +# [Timer] =========================================== +# [Timer] Total: --- 4620.5 s +# +# A build of pypy (nojit) on x86_64 took about an hour: +# [Timer] Timings: +# [Timer] annotate --- 537.5 s +# [Timer] rtype_lltype --- 667.3 s +# [Timer] backendopt_lltype --- 385.4 s +# [Timer] stackcheckinsertion_lltype --- 42.5 s +# [Timer] database_c --- 625.3 s +# [Timer] source_c --- 1040.2 s +# [Timer] compile_c --- 273.9 s +# [Timer] =========================================== +# [Timer] Total: --- 3572.0 s +# +# +# A build of pypy-stackless on i686 took about 87 mins: +# [Timer] Timings: +# [Timer] annotate --- 584.2 s +# [Timer] rtype_lltype --- 777.3 s +# [Timer] backendopt_lltype --- 365.9 s +# [Timer] stackcheckinsertion_lltype --- 39.3 s +# [Timer] database_c --- 1089.6 s +# [Timer] source_c --- 1868.6 s +# [Timer] compile_c --- 490.4 s +# [Timer] =========================================== +# [Timer] Total: --- 5215.3 s + + +# Should we build a "pypy" binary? (with jit) +# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the +# following options: +# 'i386', 'x86' +# 'x86-without-sse2': +# 'x86_64' +# 'cli' +# 'llvm' +%ifarch %{ix86} x86_64 +# FIXME: is there a better way of expressing "intel" here? +%global with_jit 1 +%else +%global with_jit 0 +%endif + +# Should we build a "pypy-stackless" binary? +%global with_stackless 0 + + +# Easy way to enable/disable verbose logging: +%global verbose_logs 0 + +%global pypyprefix %{_libdir}/pypy-%{version} +%global pylibver 2.5.2 + +# We refer to this subdir of the source tree in a few places during the build: +%global goal_dir pypy/translator/goal + + +# Turn off the brp-python-bytecompile postprocessing script +# We manually invoke it later on, using the freshly built pypy binary +%global __os_install_post \ + %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') + +# Source and patches: +Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
+ +# Edit a translator file for linux in order to configure our cflags and dynamic libffi +Patch0: pypy-1.4-config.patch + +# By default, if built at a tty, the translation process renders a Mandelbrot +# set to indicate progress. +# This obscures useful messages, and may waste CPU cycles, so suppress it, and +# merely render dots: +Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch + +# test_commmands fails on SELinux systems due to a change in the output +# of "ls" (
http://bugs.python.org/issue7108
) +Patch2: fix-test_commands-expected-ls-output-issue7108.patch + +# When locating the pypy standard libraries, look first within +# LIBRARY_INSTALLATION_PATH. +# We convert this from being a non-existant variable into a string literal +# with the value of "pypyprefix" in the "prep" phase below. +# +# We still use the scanning relative to the binary location when invoking a +# pypy binary during the build (e.g. during "check") +# +# Sent upstream (with caveats) as: +#
https://codespeak.net/issue/pypy-dev/issue614
+Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch + +# Build-time requirements: + +BuildRequires: python-devel + +# FIXME: I'm seeing errors like this in the logs: +# [translation:WARNING] The module '_rawffi' is disabled +# [translation:WARNING] because importing pypy.rlib.libffi raised ImportError +# [translation:WARNING] 'libffi.a' not found in ['/usr/lib/libffi', '/usr/lib'] +# Presumably we need to fix things to support dynamically-linked libffi +BuildRequires: libffi-devel + +BuildRequires: zlib-devel +BuildRequires: bzip2-devel +BuildRequires: ncurses-devel +BuildRequires: expat-devel +BuildRequires: openssl-devel +BuildRequires: valgrind-devel + +# Used by the selftests, though not by the build: +BuildRequires: gc-devel + +BuildRequires: /usr/bin/execstack + +# pypy is bundling these so we delete them in %%prep. I don't think they are +# needed unless we build pypy targetted at running on the jvm. +#BuildRequires: jna +#BuildRequires: jasmin # Not yet in Fedora + + +# Metadata for the core package (the JIT build): +Requires: pypy-libs = %{version}-%{release} + +%description +PyPy's implementation of Python, featuring a Just-In-Time compiler, and various +optimized implementations of the standard types (strings, dictionaries, etc) + + +%package libs +Group: Development/Languages +Summary: Run-time libraries used by PyPy implementations of Python +%description libs +Libraries required by the various PyPy implementations of Python. + +%if 0%{with_stackless} +%package stackless +Group: Development/Languages +Summary: Stackless Python interpreter built using PyPy +Requires: pypy-libs = %{version}-%{release} +%description stackless +Build of PyPy with support for micro-threads for massive concurrency +%endif + +%if 0%{with_stackless} +%package stackless +Group: Development/Languages +Summary: Stackless Python interpreter built using PyPy +Requires: pypy-libs = %{version}-%{release} +%description stackless +Build of PyPy with support for micro-threads for massive concurrency +%endif + + +%prep +%setup -q -n pypy-%{version}-src +%patch0 -p1 -b .configure-fedora +%patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build + +pushd lib-python/%{pylibver} +%patch2 -p0 +popd + +# Look for the pypy libraries within LIBRARY_INSTALLATION_PATH first: +%patch3 -p1 +# Fixup LIBRARY_INSTALLATION_PATH to be a string literal containing our value +# for "pypyprefix": +sed -i \ + -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ + pypy/translator/goal/app_main.py + + +# Replace /usr/local/bin/python shebangs with /usr/bin/python: +find -name "*.py" -exec \ + sed \ + -i -e "s|/usr/local/bin/python|/usr/bin/python|" \ + "{}" \ + \; + +find . -name '*.jar' -exec rm \{\} \; + +# Remove stray ".svn" directories present within the 1.4.1 tarball +# (reported as
https://codespeak.net/issue/pypy-dev/issue612
) +find . -path '*/.svn*' -delete + +# Remove DOS batch files: +find -name "*.bat"|xargs rm -f + +# The "demo" directory gets auto-installed by virture of being listed in %doc +# Remove shebang lines from demo .py files, and remove executability from them: +for f in demo/bpnn.py ; do + # Detect shebang lines && remove them: + sed -e '/^#!/Q 0' -e 'Q 1' $f \ + && sed -i '1d' $f + chmod a-x $f +done + +%build + +BuildPyPy() { + ExeName=$1 + Options=$2 + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "STARTING BUILD OF: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + pushd %{goal_dir} + + # The build involves invoking a python script, passing in particular + # arguments, environment variables, etc. + # Some notes on those follow: + + # The generated binary embeds copies of the values of all environment + # variables. We need to unset "RPM_BUILD_ROOT" to avoid a fatal error from + # /usr/lib/rpm/check-buildroot + # during the postprocessing of the rpmbuild, complaining about this + # reference to the buildroot + + + # By default, pypy's autogenerated C code is placed in + # /tmp/usession-N + # + # and it appears that this stops rpm from extracting the source code to the + # debuginfo package + # + # The logic in pypy-1.4/pypy/tool/udir.py indicates that it is generated in: + # $PYPY_USESSION_DIR/usession-$PYPY_USESSION_BASENAME-N + # and so we set PYPY_USESSION_DIR so that this tempdir is within the build + # location, and set $PYPY_USESSION_BASENAME so that the tempdir is unique + # for each invocation of BuildPyPy + + # Compilation flags for C code: + # pypy-1.4/pypy/translator/c/genc.py:gen_makefile + # assembles a Makefile within + # THE_UDIR/testing_1/Makefile + # calling out to platform.gen_makefile + # For us, that's + # pypy-1.4/pypy/translator/platform/linux.py: class BaseLinux(BasePosix): + # which by default has: + # CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', + # '-Wall', '-Wno-unused'] + # plus all substrings from CFLAGS in the environment. + # This is used to generate a value for CFLAGS that's written into the Makefile + + #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
+ # The generated Makefile compiles the .c files into assembler (.s), rather + # than direct to .o It then post-processes this assembler to locate + # garbage-collection roots (building .lbl.s and .gcmap files, and a + # "gcmaptable.s"). (The modified .lbl.s files have extra code injected + # within them). + # Unfortunately, the code to do this: + # pypy-1.4/pypy/translator/c/gcc/trackgcroot.py + # doesn't interract well with the results of using our standard build flags. + # For now, filter our CFLAGS of everything that could be conflicting with + # pypy. Need to check these and reenable ones that are okay later. + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') + + # If we're already built the JIT-enabled "pypy", then use it for subsequent + # builds (of other configurations): + if test -x './pypy' ; then + INTERP='./pypy' + else + INTERP='python' + fi + + # Here's where we actually invoke the build: + time \ + RPM_BUILD_ROOT= \ + PYPY_USESSION_DIR=$(pwd) \ + PYPY_USESSION_BASENAME=$ExeName \ + $INTERP translate.py \ +%if 0%{verbose_logs} + --translation-verbose \ +%endif + --cflags="$CFLAGS" \ + --batch \ + --output=$ExeName \ + $Options + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "FINISHED BUILDING: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + popd +} + +%if 0%{with_jit} +BuildPyPy \ + pypy \ + "-Ojit" +%endif + +%if 0%{with_stackless} +BuildPyPy \ + pypy-stackless \ + "--stackless" +%endif + +%install +rm -rf $RPM_BUILD_ROOT + + +# Install the various executables: + +InstallPyPy() { + ExeName=$1 + + install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{_bindir} + + # The generated machine code doesn't need an executable stack, but + # one of the assembler files (gcmaptable.s) doesn't have the necessary + # metadata to inform gcc of that, and thus gcc pessimistically assumes + # that the built binary does need an executable stack. + # + # Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
+ # + # I tried various approaches involving fixing the build, but the simplest + # approach is to postprocess the ELF file: + execstack --clear-execstack %{buildroot}/%{_bindir}/$ExeName +} + +mkdir -p %{buildroot}/%{_bindir} + +%if 0%{with_jit} +InstallPyPy pypy +%endif + +%if 0%{with_stackless} +InstallPyPy pypy-stackless +%endif + + +# Install the various support libraries as described at: +#
http://codespeak.net/pypy/dist/pypy/doc/getting-started-python.html#install…
+# which refers to a "PREFIX" found relative to the location of the binary. +# Given that the pypy binaries will be in /usr/bin, PREFIX can be +# "../share/pypy-1.2" relative to that directory, i.e. /usr/share/pypy-1.2 +# +# Running "strace" on a built binary indicates that it searches within +# PREFIX/lib-python/modified-2.5.2 +# not +# PREFIX/lib-python/modified.2.5.2 +# as given on the above page, i.e. it uses '-' not '.' + +mkdir -p %{buildroot}/%{pypyprefix} +cp -a lib-python %{buildroot}/%{pypyprefix} + +cp -a lib_pypy %{buildroot}/%{pypyprefix} + +# Remove a text file that documents which selftests fail on Win32: +rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt + +# Remove shebang lines from .py files that aren't executable, and +# remove executability from .py files that don't have a shebang line: +find \ + %{buildroot} \ + -name "*.py" \ + \( \ + \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ + -print -exec sed -i '1d' {} \; \ + \) \ + -o \ + \( \ + -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ + -exec chmod a-x {} \; \ + \) \ + \) + +mkdir -p %{buildroot}/%{pypyprefix}/site-packages + + +# pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly +# different bytecode format to CPython. It doesn't use .pyo files: the -O flag +# is treated as a "dummy optimization flag for compatibility with C Python" +# +# pypy-1.4/pypy/module/imp/importing.py has this comment: + # XXX picking a magic number is a mess. So far it works because we + # have only two extra opcodes, which bump the magic number by +1 and + # +2 respectively, and CPython leaves a gap of 10 when it increases + # its own magic number. To avoid assigning exactly the same numbers + # as CPython we always add a +2. We'll have to think again when we + # get at the fourth new opcode :-( + # + # * CALL_LIKELY_BUILTIN +1 + # * CALL_METHOD +2 + # + # In other words: + # + # default_magic -- used by CPython without the -U option + # default_magic + 1 -- used by CPython with the -U option + # default_magic + 2 -- used by PyPy without any extra opcode + # ... + # default_magic + 5 -- used by PyPy with both extra opcodes +# + +# pypy-1.4/pypy/interpreter/pycode.py has: +# +# default_magic = (62141+2) | 0x0a0d0000 # this PyPy's magic +# # (62131=CPython 2.5.1) +# giving a value for "default_magic" for PyPy of 0xa0df2bf. +# Note that this corresponds to the "default_magic + 2" from the comment above + +# In my builds: +# $ ./pypy --info | grep objspace.opcodes +# objspace.opcodes.CALL_LIKELY_BUILTIN: False +# objspace.opcodes.CALL_METHOD: True +# so I'd expect the magic number to be: +# 0x0a0df2bf + 2 (the flag for CALL_METHOD) +# giving +# 0x0a0df2c1 +# +# I'm seeing +# c1 f2 0d 0a +# as the first four bytes of the .pyc files, which is consistent with this. + + +# Bytecompile all of the .py files we ship, using our pypy binary, giving us +# .pyc files for pypy. The script actually does the work twice (passing in -O +# the second time) but it's simplest to reuse that script. +# +# The script has special-casing for .py files below +# /usr/lib{64}/python[0-9].[0-9] +# but given that we're installing into a different path, the supplied "default" +# implementation gets used instead. +# +# Note that some of the test files deliberately contain syntax errors, so +# we pass 0 for the second argument ("errors_terminate"): +/usr/lib/rpm/brp-python-bytecompile \ + %{buildroot}/%{_bindir}/pypy \ + 0 + +%check +topdir=$(pwd) + +SkipTest() { + # Append the given test name to TESTS_TO_SKIP + TEST_NAME=$1 + TESTS_TO_SKIP="$TESTS_TO_SKIP $TEST_NAME" +} + +CheckPyPy() { + # We'll be exercising one of the freshly-built binaries using the + # test suite from the standard library (overridden in places by pypy's + # modified version) + ExeName=$1 + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "STARTING TEST OF: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + pushd %{goal_dir} + + # Gather a list of tests to skip, due to known failures + # TODO: report these failures to pypy upstream + TESTS_TO_SKIP="" + + # Test failures relating to missing codecs + # Hopefully when pypy merges to 2.7 support we'll gain these via a + # refreshed stdlib: + # test_codecencodings_cn: + # all tests fail, with one of + # unknown encoding: gb18030 + # unknown encoding: gb2312 + # unknown encoding: gbk + SkipTest test_codecencodings_cn + + # test_codecencodings_hk: + # all tests fail, with: + # unknown encoding: big5hkscs + SkipTest test_codecencodings_hk + + # test_codecencodings_jp: + # all tests fail, with one of: + # unknown encoding: cp932 + # unknown encoding: euc_jisx0213 + # unknown encoding: euc_jp + # unknown encoding: shift_jis + # unknown encoding: shift_jisx0213 + SkipTest test_codecencodings_jp + + # test_codecencodings_kr: + # all tests fail, with one of: + # unknown encoding: cp949 + # unknown encoding: euc_kr + # unknown encoding: johab + SkipTest test_codecencodings_kr + + # test_codecencodings_tw: + # all tests fail, with: + # unknown encoding: big5 + SkipTest test_codecencodings_tw + + # test_multibytecodec: + # 14 failures out of 15, due to: + # unknown encoding: euc-kr + # unknown encoding: gb2312 + # unknown encoding: jisx0213 + # unknown encoding: cp949 + # unknown encoding: iso2022-jp + # unknown encoding: gb18030 + SkipTest test_multibytecodec + + # + # Other failures: + # + # test_asynchat: + # seems to hang on this test, within test_line_terminator + SkipTest test_asynchat + + # test_compiler: + # 4 errors out of 13: + # testSourceCodeEncodingsError + # testWith + # testWithAss + # testYieldExpr + SkipTest test_compiler + + # test_ctypes: + # failures=17, errors=20, out of 132 tests + SkipTest test_ctypes + + # test_frozen: + # TestFailed: import __hello__ failed:No module named __hello__ + SkipTest test_frozen + + # test_iterlen: + # 24 failures out of 25, apparently all due to TypeError + SkipTest test_iterlen + + # test_parser: + # 12 failures out of 15 + SkipTest test_parser + + # test_platform: + # Koji builds show: + # test test_platform failed -- errors occurred in test.test_platform.PlatformTest + SkipTest test_platform + + # test_socket: + # testSockName can fail in Koji with: + # my_ip_addr = socket.gethostbyname(socket.gethostname()) + # gaierror: (-3, 'Temporary failure in name resolution') + SkipTest test_socket + + # test_sort: + # some failures + SkipTest test_sort + + # test_sqlite: + # 3 of the sqlite3.test.dbapi.ExtensionTests raise: + # ProgrammingError: Incomplete statement '' + SkipTest test_sqlite + + # test_traceback: + # works when run standalone; failures seen when run as part of a suite + SkipTest test_traceback + + # test_zlib: + # failure seen in Koji, not sure of reason why: + # test test_zlib failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.4.1-src/lib-python/2.5.2/test/test_zlib.py", line 72, in test_baddecompressobj + # self.assertRaises(ValueError, zlib.decompressobj, 0) + # AssertionError: ValueError not raised + SkipTest test_zlib + + + # Run the built binary through the selftests: + time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP + + popd + + # Doublecheck pypy's own test suite, using the built pypy binary: + + # Disabled for now: + # x86_64 shows various failures inside: + # jit/backend/x86/test + # followed by a segfault inside + # jit/backend/x86/test/test_runner.py + # + # i686 shows various failures inside: + # jit/backend/x86/test + # with the x86_64 failure leading to cancellation of the i686 build + + # Here's the disabled code: + # pushd pypy + # time translator/goal/$ExeName test_all.py + # popd + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "FINISHED TESTING: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" +} + +%if 0%{with_jit} +CheckPyPy pypy +%endif + +%if 0%{with_stackless} +CheckPyPy pypy-stackless +%endif + + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files libs +%defattr(-,root,root,-) +%doc LICENSE README demo + +%dir %{pypyprefix} +%dir %{pypyprefix}/lib-python +%{pypyprefix}/lib-python/%{pylibver}/ +%{pypyprefix}/lib-python/modified-%{pylibver}/ +%{pypyprefix}/lib-python/conftest.py* +%{pypyprefix}/lib_pypy/ +%{pypyprefix}/site-packages/ + +%if 0%{with_jit} +%files +%defattr(-,root,root,-) +%doc LICENSE README +%{_bindir}/pypy +%endif + +%if 0%{with_stackless} +%files stackless +%defattr(-,root,root,-) +%doc LICENSE README +%{_bindir}/pypy-stackless +%endif + + +%changelog +* Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-3 +- try to respect the FHS by installing libraries below libdir, rather than +datadir; patch app_main.py to look in this installation location first when +scanning for the pypy library directories. +- clarifications and corrections to the comments in the specfile + +* Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-2 +- remove .svn directories +- disable verbose logging +- add a %%check section +- introduce %%goal_dir variable, to avoid repetition +- remove shebang line from demo/bpnn.py, as we're treating this as a +documentation file +- regenerate patch 2 to apply without generating a .orig file + +* Tue Dec 21 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-1 +- 1.4.1; fixup %%setup to reflect change in toplevel directory in upstream +source tarball +- apply SELinux fix to the bundled test_commands.py (patch 2) + +* Wed Dec 15 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4-4 +- rename the jit build and subpackge to just "pypy", and remove the nojit and +sandbox builds, as upstream now seems to be focussing on the JIT build (with +only stackless called out in the getting-started-python docs); disable +stackless for now +- add a verbose_logs specfile boolean; leave it enabled for now (whilst fixing +build issues) +- add more comments, and update others to reflect 1.2 -> 1.4 changes +- re-enable debuginfo within CFLAGS ("-g") +- add the LICENSE and README to all subpackages +- ensure the built binaries don't have the "I need an executable stack" flag +- remove DOS batch files during %%prep (idlelib.bat) +- remove shebang lines from .py files that aren't executable, and remove +executability from .py files that don't have a shebang line (taken from +our python3.spec) +- bytecompile the .py files into .pyc files in pypy's bytecode format + +* Sun Nov 28 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-3 +- BuildRequire valgrind-devel +- Install pypy library from the new directory +- Disable building with our CFLAGS for now because they are causing a build failure. +- Include site-packages directory + +* Sat Nov 27 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-2 +- Add patch to configure the build to use our CFLAGS and link libffi + dynamically + +* Sat Nov 27 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-1 +- Update to 1.4 +- Drop patch for py2.6 that's in this build +- Switch to building pypy with itself once pypy is built once as recommended by + upstream +- Remove bundled, prebuilt java libraries +- Fix license tag +- Fix source url +- Version pypy-libs Req + +* Tue May 4 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.2-2 +- cherrypick r72073 from upstream SVN in order to fix the build against +python 2.6.5 (patch 2) + +* Wed Apr 28 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.2-1 +- initial packaging + diff --git a/sources b/sources index e69de29..90f34be 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ebbbb156b1eb842e9e65d909ed5f9f6d pypy-1.4.1-src.tar.bz2
1
0
0
0
Architecture specific change in rpms/pypy3.9.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/pypy3.9.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=49ad6567e89c…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=831c9929b304…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=efbf3a366175…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=5aa1d86125bb…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=faa7ffb04460…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=083ef4d302f9…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=f27d32f53000…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=9d0ffbc9d5d8…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=82dcbae2321e…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=720aa9bae8b7…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=a6780ec4355a…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=b929faae35b0…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=91071982692c…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=ad0d37c68389…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=6b002d36f3cb…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=693a83b0c291…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=817c77d554b6…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=347fb465b0fc…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=343676a8999d…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=4a3038ff5634…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=43ee7785260f…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=a0374180ff79…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=d39359a3af6a…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=f756cfcb34f7…
. Change: -%ifarch s390 s390x +%ifarch %{valgrind_arches} +%ifarch %{ix86} x86_64 %{arm} +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 -%ifarch %{power64} -ExcludeArch: %{power64} +ExcludeArch: %{power64} +ExcludeArch: aarch64 %{power64} +%ifarch %{power64} -%ifnarch aarch64 ppc64le +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x +%ifarch s390 s390x +%ifarch %{ix86} x86_64 %{arm} +ExcludeArch: aarch64 +ExcludeArch: aarch64 armv7hl s390 s390x +ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 s390 s390x ppc64le ppc64 +ExcludeArch: aarch64 s390 s390x -%ifarch x86_64 +%ifarch x86_64 +%ifnarch aarch64 ppc64le +%ifnarch s390 +%ifarch %{ix86} x86_64 ppc ppc64 s390x +%ifarch %{ix86} x86_64 Thanks. Full change: ============ commit a22e7e57d16affe5b643363e6d12a2f1401e98df Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 23 02:34:56 2022 +0100 Stop providing pypy3.9(abi) = 7.3, it makes no sense This was added long time ago to try to mimic python(abi) but in this form it converged to nonsense. diff --git a/pypy3.9.spec b/pypy3.9.spec index 62b1600..2fa86bf 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -172,7 +172,6 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} -Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} # This is when pypy3 package was replaced: commit c2195a845be83a63ee47f34a61e2cc6c51adabe7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:07:03 2022 +0100 Update to 7.3.8 final diff --git a/.gitignore b/.gitignore index 8ffefa5..2cc60f0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /pypy3.8-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc2-src.tar.bz2 +/pypy3.9-v7.3.8-src.tar.bz2 diff --git a/pypy3.9.spec b/pypy3.9.spec index bb4ea19..62b1600 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -1,6 +1,6 @@ %global basever 7.3 %global micro 8 -%global pre rc2 +#global pre ... %global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} @@ -806,6 +806,9 @@ CheckPyPy pypy%{pyversion}-c %changelog +* Tue Feb 22 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8-1 +- Update to 7.3.8 final + * Fri Feb 11 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc2-1 - Update to 7.3.8rc2 diff --git a/sources b/sources index 9d9ec1d..31f6e92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.9-v7.3.8rc2-src.tar.bz2) = 40fc0dd45bf24bc9a1bfa259bce11ee706ac73dd29f66a3e2a16bb9ca5c6683d4aedaf21394875ab3facb31eb65f4d497eaa3c10ef4394251ecb4b4a85511197 +SHA512 (pypy3.9-v7.3.8-src.tar.bz2) = aed018738af7a225f516ec37d059d539f486d9dd427fe000805147b197f496d5fcb0387e47008524753ad18224aebeb1e68f9e2093acbe37468e02bff92f7126 commit c45eac312a942d4fe6f5f8d0e6f28fd37343ee36 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:04:57 2022 +0100 Add comment above the %soname_version definition diff --git a/pypy3.9.spec b/pypy3.9.spec index f7e7b9b..bb4ea19 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -447,6 +447,8 @@ BuildPyPy \ %global installation_archive_name pypy%{pyversion}-%{version_} %global packaging_builddir builddir %global packaged_prefix %{packaging_builddir}/%{installation_archive_name} +# We will set an arbitrary downstream-only soname version, as it is required +# See
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
%global soname_version 0.1 %{bootstrap_python_interp} pypy/tool/release/package.py --archive-name '%{installation_archive_name}' --builddir '%{packaging_builddir}' --no-embedded-dependencies commit f97fb4af2949675ebe660503b3ebc307d4818fad Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:03:31 2022 +0100 Explain how the removed sources list was created diff --git a/pypy3.9.spec b/pypy3.9.spec index 1e56c79..f7e7b9b 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -472,6 +472,8 @@ rm %{packaged_prefix}/include/README # 7. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} # 8. remove sources, we don't install them +# this list was created by inspecting rpmlint output before it was added +# sources that look like they might be tests are kept and included in the test subpackage rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp commit 1b34489b242ea4fa5a0936725b07654eba9605a3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:02:10 2022 +0100 Add reversed "keep this synced" comments diff --git a/pypy3.9.spec b/pypy3.9.spec index cb53228..1e56c79 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -773,6 +773,7 @@ CheckPyPy pypy%{pyversion}-c %files test +# Keep this synced with %%excluded %%files in libs %{pypylibdir}/_ctypes_test.* %{pypylibdir}/_pypy_testcapi.* %{pypylibdir}/_test* @@ -794,6 +795,8 @@ CheckPyPy pypy%{pyversion}-c %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif + +# Keep this synced with %%excluded %%files in libs %{pypylibdir}/cffi/*.h %{pypylibdir}/hpy/devel/ commit a426a21cc460d036b4dedd1a9c2ebc82c9eda8db Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:00:38 2022 +0100 Rename pypy2_build to build_using_pypy2 to be less confusing diff --git a/pypy3.9.spec b/pypy3.9.spec index adb16eb..cb53228 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -108,8 +108,8 @@ Source189: 189-use-rpm-wheels.patch # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%bcond_without pypy2_build -%if %{with pypy2_build} +%bcond_without build_using_pypy2 +%if %{with build_using_pypy2} BuildRequires: pypy2 %global bootstrap_python_interp pypy2 %else @@ -321,7 +321,7 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif -%if %{without pypy2_build} +%if %{without build_using_pypy2} # use the pycparser from PyPy even on CPython ln -s lib_pypy/cffi/_pycparser pycparser %endif commit da61e64d93d761b8b56fd2568e9b8886a9f2e5b7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:58:22 2022 +0100 Make -test and -devel require both main package and -libs explicitly Requiring just the main package would do, but this way it's easier to see directly. CPython does the same. diff --git a/pypy3.9.spec b/pypy3.9.spec index 19737a7..adb16eb 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -186,6 +186,7 @@ Conflicts: pypy3 < 7.3.7-1 # It's intended for the libs package not to drag in the interpreter, see #
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
#
https://bugzilla.redhat.com/show_bug.cgi?id=1862082
+# All other packages require the main package explicitly. %global __requires_exclude ^/usr/bin/pypy %description @@ -251,6 +252,7 @@ Libraries required by the various PyPy implementations of Python %{pyversion}. %package test Summary: Tests for PyPy%{pyversion} +Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} @@ -266,6 +268,7 @@ Useful when you want to run the test suite of PyPy%{pyversion}. %package devel Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} +Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} Provides: pypy3-devel = %{version}-%{release} commit a0e5980f846af150de18317f8aefc49eba59ecde Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:56:44 2022 +0100 Nitpick: patch the ELF, not a link to it diff --git a/pypy3.9.spec b/pypy3.9.spec index 0499757..19737a7 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -462,7 +462,7 @@ rm %{packaged_prefix}/bin/*.debug #
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so -patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} # 6. remove stray README rm %{packaged_prefix}/include/README commit d3586d269a298076b1be480cfdfa1e33cd29dee3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:55:45 2022 +0100 Mimic CPython, %exclude ensurepip/_bundled when built with RPM wheels diff --git a/pypy3.9.spec b/pypy3.9.spec index 09265f8..0499757 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -737,6 +737,9 @@ CheckPyPy pypy%{pyversion}-c %license %{pypylibdir}/cffi/_pycparser/ply/LICENSE %license %{pypylibdir}/hpy.dist-info/LICENSE %{pypylibdir}/ +%if %{with rpmwheels} +%exclude %{pypylibdir}/ensurepip/_bundled +%endif %if "%{_lib}" == "lib64" %{_prefix}/lib/pypy%{pyversion}/ %endif commit 7926d81ad4f10b12f89059692316d4853ec5cad6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Feb 11 09:54:04 2022 +0100 Update to 7.3.8rc2 diff --git a/.gitignore b/.gitignore index 3f09cde..8ffefa5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /pypy3.8-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc1-src.tar.bz2 +/pypy3.9-v7.3.8rc2-src.tar.bz2 diff --git a/pypy3.9.spec b/pypy3.9.spec index 4c1a3de..09265f8 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -1,6 +1,6 @@ %global basever 7.3 %global micro 8 -%global pre rc1 +%global pre rc2 %global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} @@ -793,6 +793,9 @@ CheckPyPy pypy%{pyversion}-c %changelog +* Fri Feb 11 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc2-1 +- Update to 7.3.8rc2 + * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 - Move to a CPython-like installation layout diff --git a/sources b/sources index 2cd33d0..9d9ec1d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.9-v7.3.8rc1-src.tar.bz2) = d1b1942fbacc7f8d642c85ceb4c4c9796e73bd5836615e2db81f4ddabf9e4f94c230f2d946ea9c49b642d41304aeed3906df1931a52ec40c56d14f1028139978 +SHA512 (pypy3.9-v7.3.8rc2-src.tar.bz2) = 40fc0dd45bf24bc9a1bfa259bce11ee706ac73dd29f66a3e2a16bb9ca5c6683d4aedaf21394875ab3facb31eb65f4d497eaa3c10ef4394251ecb4b4a85511197 commit f83fb4944938ec7256d81cb1c6faffd9284bc07f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 21:00:18 2022 +0100 Cleanup parts of the installation diff --git a/pypy3.9.spec b/pypy3.9.spec index 96449a7..4c1a3de 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -454,19 +454,21 @@ BuildPyPy \ rm %{packaged_prefix}/bin/python* # 2. remove the "pypy" symbolic link, we still want pypy2 to be that for now rm %{packaged_prefix}/bin/pypy -# 3. remove the "pypy3"symbolic link, if this is not the main pypy3 +# 3. remove the "pypy3" symbolic link, if this is not the main pypy3 %{!?with_main_pypy3:rm %{packaged_prefix}/bin/pypy3} -# 4. move libpypy3.9-c.so to lib(64) and soname version it +# 4. remove the .debug executbale and library +rm %{packaged_prefix}/bin/*.debug +# 5. move libpypy3.9-c.so to lib(64) and soname version it #
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} -# 5. remove stray README +# 6. remove stray README rm %{packaged_prefix}/include/README -# 6. copy the main LICENSE file to pypy's libdir, as does CPython +# 7. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} -# 7. Remove sources, we don't install them +# 8. remove sources, we don't install them rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp @@ -590,13 +592,6 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} %endif -# wtf? This is probably masking some bigger problem, but let's do this for now -mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : - -# since 5.10.0, the debug binaries are built and shipped, making the -# pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{_bindir}/*.debug - %check commit 49ad6567e89c18c6a5caae92ac961fcfe4356aa9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 20:58:42 2022 +0100 Remove an useless s390(x) z10 sed, we are at z13+ in Fedora diff --git a/pypy3.9.spec b/pypy3.9.spec index e9cb58a..96449a7 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -327,11 +327,6 @@ rm lib-python/3/idlelib/idle.bat rm lib-python/3/distutils/command/*.exe %build -%ifarch s390 s390x -# pypy3 requires z10 at least -%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /') -%endif - # Top memory usage is about 4.5GB on arm7hf free commit 831c9929b304069e0b18ec88a5bcf0a21d374204 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 20:58:24 2022 +0100 Use %{valgrind_arches} diff --git a/pypy3.9.spec b/pypy3.9.spec index 097ec4a..e9cb58a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -137,7 +137,7 @@ BuildRequires: xz-devel BuildRequires: python-rpm-macros -%ifnarch s390 +%ifarch %{valgrind_arches} BuildRequires: valgrind-devel %endif commit 03bdb932315d1e7896accf2fdac60801a21929de Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 11:21:37 2022 +0100 Final touches to the rpmlintrc file diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc index 7c88006..8b50ec4 100644 --- a/pypy3.9.rpmlintrc +++ b/pypy3.9.rpmlintrc @@ -29,6 +29,9 @@ addFilter(r'no-manual-page-for-binary pypy(3(\.\d+)?)?') # missing documentation from subpackages addFilter(r'^pypy3(\.\d+)?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') +# Obviously deliberately empty file(s) +addFilter(r'hidden-file-or-dir /usr/lib(64)?/pypy3\.\d+/.*\.empty') + # we have extra tokens at the end of %endif/%else directives, we consider them useful addFilter(r'extra tokens at the end of %(endif|else) directive') commit a2df6900a7f0e566d45ee8e73a9016174a65d944 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 11:11:52 2022 +0100 Stop shipping C sources, move some headers to -devel, one to -test diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc index 2aa2ce3..7c88006 100644 --- a/pypy3.9.rpmlintrc +++ b/pypy3.9.rpmlintrc @@ -20,6 +20,7 @@ addFilter(r'only-non-binary-in-usr-lib') # some devel files that are deliberately needed addFilter(r'devel-file-in-non-devel-package /usr/include/pypy3\.\d+m?/pyconfig-(32|64)\.h') addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/distutils/tests/xxmodule\.c') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/_.*test.*\.[ch]') # SORRY, NOT SORRY: # manual pages diff --git a/pypy3.9.spec b/pypy3.9.spec index 76cf42f..097ec4a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -471,6 +471,12 @@ patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{so rm %{packaged_prefix}/include/README # 6. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} +# 7. Remove sources, we don't install them +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/_cffi_src/openssl/src +rm %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_pypy_*.c # Create the prefix and move stuff into it mkdir -p %{buildroot}%{_prefix} @@ -763,6 +769,11 @@ CheckPyPy pypy%{pyversion}-c %exclude %{pypylibdir}/*/test/ %exclude %{pypylibdir}/*/tests/ %exclude %{pypylibdir}/idlelib/idle_test/ +%exclude %{pypylibdir}/testcapi_long.h + +# Keep this synced with %%files devel below +%exclude %{pypylibdir}/cffi/*.h +%exclude %{pypylibdir}/hpy/devel/ %files test @@ -777,6 +788,7 @@ CheckPyPy pypy%{pyversion}-c %{pypylibdir}/*/test/ %{pypylibdir}/*/tests/ %{pypylibdir}/idlelib/idle_test/ +%{pypylibdir}/testcapi_long.h %files devel @@ -786,6 +798,8 @@ CheckPyPy pypy%{pyversion}-c %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif +%{pypylibdir}/cffi/*.h +%{pypylibdir}/hpy/devel/ %changelog commit 2c935f984efe043a0a873cc1b19cfd3e64ea132e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:18:37 2022 +0100 Introduce an rpminspect config file Copied from python3.10, "python" replaced with "pypy" badfuncs library path changed. diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..0b7b36d --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,28 @@ +# exclude test XML data (not always valid) from XML validity check: +xml: + ignore: + - /usr/lib*/pypy*/test/xmltestdata/* + - /usr/lib*/pypy*/test/xmltestdata/*/* + +# exclude _socket from ipv4 only functions check, it has both ipv4 and ipv6 only +badfuncs: + ignore: + - /usr/lib*/libpypy*.so* + +# don't report changed content of compiled files +# that is expected with every toolchain update and not reproducible yet +changedfiles: + # note that this is a posix regex, so no \d + exclude_path: (\.so(\.[0-9]+(\.[0-9]+)?)?$|^/usr/bin/pypy[0-9]+\.[0-9]+d?m?$) + +# files change size all the time, we don't need to VERIFY it +# however, the INFO is useful, so we don't disable the check entirely +filesize: + # artificially large number, TODO a better way + size_threshold: 100000 + + +# completely disabled inspections: +inspections: + # we know about our patches, no need to report anything + patches: off commit 5658a2e3cc6492f1ba6cd4b0faf3e6a17062b012 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:05:29 2022 +0100 Introduce an rpmlintrc config file Copied from python3.10, "python" replaced with "pypy" and various rules removed. Added the unexpanded macro in: Requires: emacs-filesystem filter. This is not a complete filter, but allows me to see the extra errors/warnings. diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc new file mode 100644 index 0000000..2aa2ce3 --- /dev/null +++ b/pypy3.9.rpmlintrc @@ -0,0 +1,70 @@ +# KNOWN BUGS: +#
https://bugzilla.redhat.com/show_bug.cgi?id=1489816
+addFilter(r'crypto-policy-non-compliance-openssl') + + +# TESTS: +addFilter(r'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/pypy3\.\d+/test') + + +# OTHER DELIBERATES: +# chroot function +addFilter(r'missing-call-to-chdir-with-chroot') + +# intentionally hardcoded +addFilter(r'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|pypy%{pyversion})') + +# we have non binary stuff, python files +addFilter(r'only-non-binary-in-usr-lib') + +# some devel files that are deliberately needed +addFilter(r'devel-file-in-non-devel-package /usr/include/pypy3\.\d+m?/pyconfig-(32|64)\.h') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/distutils/tests/xxmodule\.c') + +# SORRY, NOT SORRY: +# manual pages +addFilter(r'no-manual-page-for-binary pypy(3(\.\d+)?)?') + +# missing documentation from subpackages +addFilter(r'^pypy3(\.\d+)?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') + +# we have extra tokens at the end of %endif/%else directives, we consider them useful +addFilter(r'extra tokens at the end of %(endif|else) directive') + + +# RPMLINT IMPERFECTIONS +#
https://github.com/rpm-software-management/rpmlint/issues/123
+addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3393') +#
https://github.com/rpm-software-management/rpmlint/pull/133
+addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3394') + +#
https://bugzilla.redhat.com/show_bug.cgi?id=1550562
+#
https://github.com/rpm-software-management/rpmlint/issues/128
+addFilter(r'python-bytecode-inconsistent-mtime .* 1970') + +# debugsource +addFilter(r'^pypy3(\.\d+)?-debugsource\.[^:]+: (E|W): no-documentation') + +# debuginfo +addFilter(r'^pypy3(\.\d+)?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)') + +# we just don't have the macro installed when rpmlint runs, but the package is BuildRequired +addFilter(r'Possible unexpanded macro in:\s+Requires:\s+emacs-filesystem') + +# this is OK for F28+ +addFilter(r'library-without-ldconfig-post') + +# debug package contains devel and non-devel files +addFilter(r'pypy3(\.\d+)?-debug\.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package') + +# Python modules don't need to be linked against libc +# Since 3.8 they are no longer linked against libpypy-c +addFilter(r'(E|W): library-not-linked-against-libc /usr/lib(64)?/pypy3\.\d+/') +addFilter(r'(E|W): shared-lib-without-dependency-information /usr/lib(64)?/pypy3\.\d+/') + +# specfile-errors are listed twice, once with reason and once without +# we filter out the empty ones +addFilter(r'\bpypy3(\.\d+)?\.(src|spec): (E|W): specfile-error\s+$') + +# SPELLING ERRORS +addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ') commit b2b5021b67266f6162dda93b10401187441728aa Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:02:54 2022 +0100 Create a test subpackage, similar to python3-test diff --git a/pypy3.9.spec b/pypy3.9.spec index 61b9197..76cf42f 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -249,6 +249,20 @@ Provides: bundled(python3dist(hpy)) = 0.0.3 Libraries required by the various PyPy implementations of Python %{pyversion}. +%package test +Summary: Tests for PyPy%{pyversion} +Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} + +%if %{with main_pypy3} +Provides: pypy3-test = %{version}-%{release} +Provides: pypy3-test%{?_isa} = %{version}-%{release} +%endif + +%description test +Various testing modules of PyPy%{pyversion}. +Useful when you want to run the test suite of PyPy%{pyversion}. + + %package devel Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} @@ -737,6 +751,33 @@ CheckPyPy pypy%{pyversion}-c %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif +# Keep this synced with %%files test below +%exclude %{pypylibdir}/_ctypes_test.* +%exclude %{pypylibdir}/_pypy_testcapi.* +%exclude %{pypylibdir}/_test* +%exclude %{pypylibdir}/__pycache__/_ctypes_test.* +%exclude %{pypylibdir}/__pycache__/_pypy_testcapi.* +%exclude %{pypylibdir}/__pycache__/_test* +%exclude %{pypylibdir}/test/ +%exclude %{pypylibdir}/*/testing/ +%exclude %{pypylibdir}/*/test/ +%exclude %{pypylibdir}/*/tests/ +%exclude %{pypylibdir}/idlelib/idle_test/ + + +%files test +%{pypylibdir}/_ctypes_test.* +%{pypylibdir}/_pypy_testcapi.* +%{pypylibdir}/_test* +%{pypylibdir}/__pycache__/_ctypes_test.* +%{pypylibdir}/__pycache__/_pypy_testcapi.* +%{pypylibdir}/__pycache__/_test* +%{pypylibdir}/test/ +%{pypylibdir}/*/testing/ +%{pypylibdir}/*/test/ +%{pypylibdir}/*/tests/ +%{pypylibdir}/idlelib/idle_test/ + %files devel %dir %{_includedir}/pypy%{pyversion} @@ -752,6 +793,7 @@ CheckPyPy pypy%{pyversion}-c - Update to 7.3.8rc1 - Move to a CPython-like installation layout - Stop requiring pypy3.9 from pypy3.9-libs +- Split tests into pypy3.9-test * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit 9779ff55f44132f304aa85598f79c1090021e1ba Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 17:54:33 2022 +0100 Move main %files to the top diff --git a/pypy3.9.spec b/pypy3.9.spec index db83a56..61b9197 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -713,6 +713,12 @@ CheckPyPy pypy%{pyversion}-c # is just confusing for the user. %global _docdir_fmt %{name} +%files +%doc README.rst +%{?with_main_pypy3:%{_bindir}/pypy3} +%{_bindir}/pypy%{pyversion} + + %files libs %doc README.rst %license %{pypylibdir}/LICENSE @@ -732,12 +738,6 @@ CheckPyPy pypy%{pyversion}-c %endif -%files -%doc README.rst -%{?with_main_pypy3:%{_bindir}/pypy3} -%{_bindir}/pypy%{pyversion} - - %files devel %dir %{_includedir}/pypy%{pyversion} %{_includedir}/pypy%{pyversion}/*.h commit c6e52d457c672e6244aa8f0d5b9bf5f6ff4b7e72 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 17:52:43 2022 +0100 Define %{pypylibdir} for easier %files diff --git a/pypy3.9.spec b/pypy3.9.spec index 8b41f86..db83a56 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -429,6 +429,8 @@ BuildPyPy \ %install +%global pypylibdir %{_libdir}/pypy%{pyversion} + # First, run packaging script, it will prep the installation tree in builddir %global installation_archive_name pypy%{pyversion}-%{version_} %global packaging_builddir builddir @@ -463,7 +465,7 @@ mv %{packaged_prefix}/include %{buildroot}%{_includedir} mv %{packaged_prefix}/%{_lib} %{buildroot}%{_libdir} # Create directories we want to own -install -d -m 0755 %{buildroot}%{_libdir}/pypy%{pyversion}/site-packages/__pycache__ +install -d -m 0755 %{buildroot}%{pypylibdir}/site-packages/__pycache__ %if "%{_lib}" == "lib64" # The 64-bit version needs to create "site-packages" in /usr/lib/ (for # pure-Python modules) as well as in /usr/lib64/ (for packages with extension @@ -713,12 +715,12 @@ CheckPyPy pypy%{pyversion}-c %files libs %doc README.rst -%license %{_libdir}/pypy%{pyversion}/LICENSE -%license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{_libdir}/pypy%{pyversion}/cffi.dist-info/LICENSE -%license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE -%{_libdir}/pypy%{pyversion}/ +%license %{pypylibdir}/LICENSE +%license %{pypylibdir}/_cffi_ssl/LICENSE +%license %{pypylibdir}/cffi.dist-info/LICENSE +%license %{pypylibdir}/cffi/_pycparser/ply/LICENSE +%license %{pypylibdir}/hpy.dist-info/LICENSE +%{pypylibdir}/ %if "%{_lib}" == "lib64" %{_prefix}/lib/pypy%{pyversion}/ %endif commit 70c239aa7011b7fc5973bd54c8010321515efdaa Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:04:46 2022 +0100 Remove the non-shadow_stack option, it has not been used in years If desired, it can be salvaged from git history. diff --git a/pypy3.9.spec b/pypy3.9.spec index d2eb615..8b41f86 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -53,10 +53,6 @@ URL:
http://pypy.org/
# Should we build the emacs JIT-viewing mode? %bcond_without emacs -# Forcibly use the shadow-stack option for detecting GC roots, rather than -# relying on hacking up generated assembler with regexps: -%bcond_without shadow_stack - # Easy way to turn off the selftests: %bcond_without selftests @@ -378,35 +374,8 @@ BuildPyPy() { # How will we track garbage-collection roots in the generated code? #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
-%if %{with shadow_stack} - # This is the most portable option, and avoids a reliance on non-guaranteed - # behaviors within GCC's code generator: use an explicitly-maintained stack - # of root pointers: - %global gcrootfinder_options --gcrootfinder=shadowstack - export CFLAGS=$(echo "$RPM_OPT_FLAGS") -%else - # Go with the default, which is "asmgcc" - - %global gcrootfinder_options %{nil} - - #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
- # The generated Makefile compiles the .c files into assembler (.s), rather - # than direct to .o It then post-processes this assembler to locate - # garbage-collection roots (building .lbl.s and .gcmap files, and a - # "gcmaptable.s"). (The modified .lbl.s files have extra code injected - # within them). - # Unfortunately, the code to do this: - # pypy-1.4/pypy/translator/c/gcc/trackgcroot.py - # doesn't interract well with the results of using our standard build flags. - # For now, filter our CFLAGS of everything that could be conflicting with - # pypy. Need to check these and reenable ones that are okay later. - # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') - -%endif - # The generated C code leads to many thousands of warnings of the form: # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] # Suppress them: @@ -429,7 +398,7 @@ BuildPyPy() { PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ $INTERP ../../rpython/bin/rpython \ - %{gcrootfinder_options} \ + --gcrootfinder=shadowstack \ $Options \ targetpypystandalone \ --platlibdir=%{_lib} commit 8950772c1a115a687a27d3a7c79db5d6043d0f0a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:03:38 2022 +0100 Rename use_self_when_building to pypy2_build, make it a bcond diff --git a/pypy3.9.spec b/pypy3.9.spec index 7f78c2a..d2eb615 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -105,22 +105,20 @@ Source189: 189-use-rpm-wheels.patch # Build-time requirements: -# pypy's can be rebuilt using itself, rather than with CPython; doing so +# pypy's can be rebuilt using pypy2, rather than with CPython 2; doing so # halves the build time. # -# Turn it off with this boolean, to revert back to rebuilding using CPython +# Turn it off with this bcond, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 1 -%if 0%{use_self_when_building} -# pypy3 can only be build with pypy2 +%bcond_without pypy2_build +%if %{with pypy2_build} BuildRequires: pypy2 %global bootstrap_python_interp pypy2 %else -# pypy3 can only be build with python2 # exception to use Python 2:
https://pagure.io/fesco/issue/2130
-BuildRequires: python27 +BuildRequires: python2.7 %global bootstrap_python_interp python2 %endif @@ -310,7 +308,7 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif -%if ! 0%{use_self_when_building} +%if %{without pypy2_build} # use the pycparser from PyPy even on CPython ln -s lib_pypy/cffi/_pycparser pycparser %endif commit 7ab528fd756f1ff5b61148d872b7352b04a0d374 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:00:46 2022 +0100 Convert bool globals to bconds diff --git a/pypy3.9.spec b/pypy3.9.spec index 7b958cb..7f78c2a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -45,20 +45,20 @@ URL:
http://pypy.org/
# it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. %ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 -%global with_jit 1 +%bcond_without jit %else -%global with_jit 0 +%bcond_with jit %endif # Should we build the emacs JIT-viewing mode? -%global with_emacs 1 +%bcond_without emacs # Forcibly use the shadow-stack option for detecting GC roots, rather than # relying on hacking up generated assembler with regexps: -%global shadow_stack 1 +%bcond_without shadow_stack # Easy way to turn off the selftests: -%global run_selftests 1 +%bcond_without selftests # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -151,7 +151,7 @@ BuildRequires: valgrind-devel BuildRequires: time BuildRequires: /usr/bin/free -%if %{run_selftests} +%if %{with selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -163,7 +163,7 @@ BuildRequires: /usr/bin/execstack BuildRequires: /usr/bin/patchelf # For byte-compiling the JIT-viewing mode: -%if %{with_emacs} +%if %{with emacs} BuildRequires: emacs %endif @@ -199,7 +199,7 @@ PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations of the standard types (strings, dictionaries, etc.). -%if 0%{with_jit} +%if %{with jit} This build of PyPy has JIT-compilation enabled. %else This build of PyPy has JIT-compilation disabled, as it is not supported on this @@ -212,7 +212,7 @@ Summary: Run-time libraries used by PyPy implementations of Python %{pyversion} # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) -%if %{with_emacs} +%if %{with emacs} Requires: emacs-filesystem >= %{_emacs_version} %endif @@ -380,7 +380,7 @@ BuildPyPy() { # How will we track garbage-collection roots in the generated code? #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
-%if 0%{shadow_stack} +%if %{with shadow_stack} # This is the most portable option, and avoids a reliance on non-guaranteed # behaviors within GCC's code generator: use an explicitly-maintained stack # of root pointers: @@ -449,14 +449,14 @@ BuildPyPy() { BuildPyPy \ pypy3 \ -%if 0%{with_jit} +%if %{with jit} "-Ojit" \ %else "-O2" \ %endif %{nil} -%if %{with_emacs} +%if %{with emacs} %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif @@ -595,7 +595,7 @@ find \ # are acceptable. # Install the JIT trace mode for Emacs: -%if %{with_emacs} +%if %{with emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc @@ -735,9 +735,9 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -%if %{run_selftests} +%if %{with selftests} CheckPyPy pypy%{pyversion}-c -%endif # run_selftests +%endif # with selftests # Because there's a bunch of binary subpackages and creating # /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that @@ -757,7 +757,7 @@ CheckPyPy pypy%{pyversion}-c %endif %{_libdir}/libpypy%{pyversion}-c.so.%{soname_version} -%if %{with_emacs} +%if %{with emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif commit d9b44f86786bdc6cb3d8f6837c34bce06facebb2 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:57:36 2022 +0100 Remove some unneeded globals diff --git a/pypy3.9.spec b/pypy3.9.spec index 4c1c2d1..7b958cb 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -53,9 +53,6 @@ URL:
http://pypy.org/
# Should we build the emacs JIT-viewing mode? %global with_emacs 1 -# Easy way to enable/disable verbose logging: -%global verbose_logs 0 - # Forcibly use the shadow-stack option for detecting GC roots, rather than # relying on hacking up generated assembler with regexps: %global shadow_stack 1 @@ -63,8 +60,6 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pylibver 3 - # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -303,7 +298,7 @@ for f in rpython/translator/goal/bpnn.py ; do done # Replace all lib-python and lib_pypy python shebangs with pypy3 (those will be shipped with pypy3-libs) -find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ +find lib-python/3 lib_pypy -name "*.py" -exec \ sed -r -i '1s@^#!\s*/usr/bin.*(python|pypy).*@#!/usr/bin/%{name}@' \ "{}" \ \; commit 07d1426dd44178550c3e884d3cdf8ae8beb2ae49 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:54:42 2022 +0100 Stop requiring pypy3.9 from pypy3.9-libs diff --git a/pypy3.9.spec b/pypy3.9.spec index 938fe5a..4c1c2d1 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -192,6 +192,13 @@ Obsoletes: pypy3 < 7.3.4-4 Conflicts: pypy3 < 7.3.7-1 %endif +# This prevents ALL subpackages built from this spec to require +# /usr/bin/pypy*. Granularity per subpackage is impossible. +# It's intended for the libs package not to drag in the interpreter, see +#
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1862082
+%global __requires_exclude ^/usr/bin/pypy + %description PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations @@ -780,6 +787,7 @@ CheckPyPy pypy%{pyversion}-c * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 - Move to a CPython-like installation layout +- Stop requiring pypy3.9 from pypy3.9-libs * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit 5bfc7634fca83257ad20c151d9a0dfe8fdd207f7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:29:50 2022 +0100 Remove RHEL 6 conditional diff --git a/pypy3.9.spec b/pypy3.9.spec index 0fb47da..938fe5a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -51,11 +51,7 @@ URL:
http://pypy.org/
%endif # Should we build the emacs JIT-viewing mode? -%if 0%{?rhel} == 6 -%global with_emacs 0 -%else %global with_emacs 1 -%endif # Easy way to enable/disable verbose logging: %global verbose_logs 0 commit fea8a43609c92af70832bfa2e0d02509bf4f173a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:28:24 2022 +0100 Remove tl;dr comments and commented out code diff --git a/pypy3.9.spec b/pypy3.9.spec index 5c7a095..0fb47da 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -38,70 +38,12 @@ URL:
http://pypy.org/
# Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels -# PyPy consists of an implementation of an interpreter (with JIT compilation) -# for the full Python language written in a high-level language, leaving many -# of the implementation details as "pluggable" policies. -# -# The implementation language is then compiled down to .c code, from which we -# obtain a binary. -# -# This allows us to build a near-arbitrary collection of different -# implementations of Python with differing tradeoffs -# -# (As it happens, the implementation language is itself Python, albeit a -# restricted subset "RPython", chosen to making it amenable to being compiled. -# The result implements the full Python language though) - -# We could build many different implementations of Python. -# For now, let's focus on the implementation that appears to be receiving the -# most attention upstream: the JIT-enabled build, with all standard -# optimizations - -# Building a configuration can take significant time: - -# A build of pypy (with jit) on i686 took 77 mins: -# [Timer] Timings: -# [Timer] annotate --- 583.3 s -# [Timer] rtype_lltype --- 760.9 s -# [Timer] pyjitpl_lltype --- 567.3 s -# [Timer] backendopt_lltype --- 375.6 s -# [Timer] stackcheckinsertion_lltype --- 54.1 s -# [Timer] database_c --- 852.2 s -# [Timer] source_c --- 1007.3 s -# [Timer] compile_c --- 419.9 s -# [Timer] =========================================== -# [Timer] Total: --- 4620.5 s -# -# A build of pypy (nojit) on x86_64 took about an hour: -# [Timer] Timings: -# [Timer] annotate --- 537.5 s -# [Timer] rtype_lltype --- 667.3 s -# [Timer] backendopt_lltype --- 385.4 s -# [Timer] stackcheckinsertion_lltype --- 42.5 s -# [Timer] database_c --- 625.3 s -# [Timer] source_c --- 1040.2 s -# [Timer] compile_c --- 273.9 s -# [Timer] =========================================== -# [Timer] Total: --- 3572.0 s - - # We will build a "pypy" binary. # # Unfortunately, the JIT support is only available on some architectures. -# -# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the -# following options: -# 'i386', 'x86' -# 'x86-without-sse2': -# 'x86_64' -# 'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI) -# 'cli' -# 'llvm' -# # We will only build with JIT support on those architectures, and build without # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. - %ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 %global with_jit 1 %else @@ -592,51 +534,6 @@ find \ # approach is to postprocess the ELF file: execstack --clear-execstack %{buildroot}%{_bindir}/pypy%{pyversion} -# pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly -# different bytecode format to CPython. It doesn't use .pyo files: the -O flag -# is treated as a "dummy optimization flag for compatibility with C Python" -# -# pypy-1.4/pypy/module/imp/importing.py has this comment: - # XXX picking a magic number is a mess. So far it works because we - # have only two extra opcodes, which bump the magic number by +1 and - # +2 respectively, and CPython leaves a gap of 10 when it increases - # its own magic number. To avoid assigning exactly the same numbers - # as CPython we always add a +2. We'll have to think again when we - # get at the fourth new opcode :-( - # - # * CALL_LIKELY_BUILTIN +1 - # * CALL_METHOD +2 - # - # In other words: - # - # default_magic -- used by CPython without the -U option - # default_magic + 1 -- used by CPython with the -U option - # default_magic + 2 -- used by PyPy without any extra opcode - # ... - # default_magic + 5 -- used by PyPy with both extra opcodes -# - -# pypy-1.4/pypy/interpreter/pycode.py has: -# -# default_magic = (62141+2) | 0x0a0d0000 # this PyPy's magic -# # (62131=CPython 2.5.1) -# giving a value for "default_magic" for PyPy of 0xa0df2bf. -# Note that this corresponds to the "default_magic + 2" from the comment above - -# In my builds: -# $ ./pypy --info | grep objspace.opcodes -# objspace.opcodes.CALL_LIKELY_BUILTIN: False -# objspace.opcodes.CALL_METHOD: True -# so I'd expect the magic number to be: -# 0x0a0df2bf + 2 (the flag for CALL_METHOD) -# giving -# 0x0a0df2c1 -# -# I'm seeing -# c1 f2 0d 0a -# as the first four bytes of the .pyc files, which is consistent with this. - - # Bytecompile all of the .py files we ship, using our pypy binary, giving us # .pyc files for pypy. # @@ -840,11 +737,6 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600 -#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python -#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test -#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log - %if %{run_selftests} CheckPyPy pypy%{pyversion}-c %endif # run_selftests commit ddfaf6f8242ba77ceccf44428008f34e07a6019f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:21:52 2022 +0100 Declare bundled cffi diff --git a/pypy3.9.spec b/pypy3.9.spec index 5829c32..5c7a095 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -11,6 +11,7 @@ Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT # Python standard library is Python # pypy/module/unicodedata is UCD +# Bundled cffi is is MIT # Bundled pycparser is is BSD # Bundled pycparser.ply is BSD # Bundled bits from cryptography are ASL 2.0 or BSD @@ -295,6 +296,9 @@ Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} } +# Find the version in lib_pypy/cffi.dist-info/METADATA +Provides: bundled(python3dist(cffi)) = 1.15.0 + # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.21 @@ -854,6 +858,7 @@ CheckPyPy pypy%{pyversion}-c %doc README.rst %license %{_libdir}/pypy%{pyversion}/LICENSE %license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{_libdir}/pypy%{pyversion}/cffi.dist-info/LICENSE %license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE %license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE %{_libdir}/pypy%{pyversion}/ commit 446ee50e4ed1722fa87e3d7ce920f0bfe2e1552c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 8 21:02:33 2022 +0100 Move to a CPython-like installation layout diff --git a/pypy3.9.spec b/pypy3.9.spec index 6336e3d..5829c32 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -124,7 +124,6 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy%{pyversion} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -227,6 +226,7 @@ BuildRequires: perl-interpreter %endif BuildRequires: /usr/bin/execstack +BuildRequires: /usr/bin/patchelf # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -518,12 +518,47 @@ BuildPyPy \ %install -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{pypyprefix} - - -# Run installing script, archive-name pypy%{pyversion} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name pypy%{pyversion} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies +# First, run packaging script, it will prep the installation tree in builddir +%global installation_archive_name pypy%{pyversion}-%{version_} +%global packaging_builddir builddir +%global packaged_prefix %{packaging_builddir}/%{installation_archive_name} +%global soname_version 0.1 + +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name '%{installation_archive_name}' --builddir '%{packaging_builddir}' --no-embedded-dependencies + +# Mangle some paths to match CPython, +# see
https://mail.python.org/pipermail/pypy-dev/2022-January/016310.html
and the replies there +# 1. remove the "python" executables, we still want CPython as the python command +rm %{packaged_prefix}/bin/python* +# 2. remove the "pypy" symbolic link, we still want pypy2 to be that for now +rm %{packaged_prefix}/bin/pypy +# 3. remove the "pypy3"symbolic link, if this is not the main pypy3 +%{!?with_main_pypy3:rm %{packaged_prefix}/bin/pypy3} +# 4. move libpypy3.9-c.so to lib(64) and soname version it +#
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
+mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} +ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} +# 5. remove stray README +rm %{packaged_prefix}/include/README +# 6. copy the main LICENSE file to pypy's libdir, as does CPython +cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} + +# Create the prefix and move stuff into it +mkdir -p %{buildroot}%{_prefix} +mv %{packaged_prefix}/bin %{buildroot}%{_bindir} +mv %{packaged_prefix}/include %{buildroot}%{_includedir} +mv %{packaged_prefix}/%{_lib} %{buildroot}%{_libdir} + +# Create directories we want to own +install -d -m 0755 %{buildroot}%{_libdir}/pypy%{pyversion}/site-packages/__pycache__ +%if "%{_lib}" == "lib64" +# The 64-bit version needs to create "site-packages" in /usr/lib/ (for +# pure-Python modules) as well as in /usr/lib64/ (for packages with extension +# modules). +install -d -m 0755 %{buildroot}%{_prefix}/lib/pypy%{pyversion}/site-packages/__pycache__ +%endif # Remove shebang lines from .py files that aren't executable, and @@ -542,8 +577,6 @@ find \ \) \ \) -mkdir -p %{buildroot}/%{pypyprefix}/site-packages - # The generated machine code doesn't need an executable stack, but # one of the assembler files (gcmaptable.s) doesn't have the necessary # metadata to inform gcc of that, and thus gcc pessimistically assumes @@ -553,12 +586,7 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: -execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 - -ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} -%if %{with main_pypy3} -ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 -%endif +execstack --clear-execstack %{buildroot}%{_bindir}/pypy%{pyversion} # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -610,31 +638,18 @@ ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # # Note that some of the test files deliberately contain syntax errors, so # we are running it in subshell, to be able to ignore the failures and not to terminate the build. -(%{py_byte_compile %{buildroot}%{pypyprefix}/bin/pypy3 %{buildroot}%{pypyprefix}}) || : - +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +(%{py_byte_compile %{buildroot}%{_bindir}/pypy%{pyversion} %{buildroot}}) || : -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _sqlite3' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _curses' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import curses' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import syslog' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'from _sqlite3 import *' - -# Header files for C extension modules. -# Upstream's packaging process (pypy/tool/release/package.py) -# creates an "include" subdir and copies all *.h/*.inl from "include" there -# (it also has an apparently out-of-date comment about copying them from -# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't -# seem to do this as of 2011-01-13) - -# FIXME: arguably these should be instead put into a subdir below /usr/include, -# it's not yet clear to me how upstream plan to deal with the C extension -# interface going forward, so let's just mimic upstream for now. -%global pypy_include_dir %{pypyprefix}/include -mkdir -p %{buildroot}%{pypy_include_dir} -rm -f %{buildroot}%{pypy_include_dir}/README +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _tkinter' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import tkinter' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _sqlite3' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _curses' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import curses' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import syslog' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'from _sqlite3 import *' +unset LD_LIBRARY_PATH # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) @@ -692,17 +707,12 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} %endif -# Remove files we don't want: -rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ - %{buildroot}%{pypyprefix}/README.rst - # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : # since 5.10.0, the debug binaries are built and shipped, making the # pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{pypyprefix}/bin/pypy%{pyversion}.debug -rm -f %{buildroot}%{pypyprefix}/bin/libpypy%{pyversion}-c.so.debug +rm -f %{buildroot}%{_bindir}/*.debug %check @@ -842,31 +852,32 @@ CheckPyPy pypy%{pyversion}-c %files libs %doc README.rst +%license %{_libdir}/pypy%{pyversion}/LICENSE +%license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE +%{_libdir}/pypy%{pyversion}/ +%if "%{_lib}" == "lib64" +%{_prefix}/lib/pypy%{pyversion}/ +%endif +%{_libdir}/libpypy%{pyversion}-c.so.%{soname_version} -%dir %{pypyprefix} -%license %{pypyprefix}/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/hpy.dist-info/LICENSE -%{pypyprefix}/%{_lib}/pypy%{pyversion}/ -%{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif + %files %doc README.rst -%if %{with main_pypy3} -%{_bindir}/pypy3 -%endif +%{?with_main_pypy3:%{_bindir}/pypy3} %{_bindir}/pypy%{pyversion} -%{pypyprefix}/bin/ + %files devel -%dir %{pypy_include_dir} -%dir %{pypy_include_dir}/pypy%{pyversion} -%{pypy_include_dir}/pypy%{pyversion}/*.h +%dir %{_includedir}/pypy%{pyversion} +%{_includedir}/pypy%{pyversion}/*.h +%{_libdir}/libpypy%{pyversion}-c.so %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif @@ -875,6 +886,7 @@ CheckPyPy pypy%{pyversion}-c %changelog * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 +- Move to a CPython-like installation layout * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit bc25649d52fadaa744d301804d8cd1b488dafe48 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 16:09:54 2022 +0100 Set platlibdir diff --git a/pypy3.9.spec b/pypy3.9.spec index 29bad37..6336e3d 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -489,7 +489,8 @@ BuildPyPy() { $INTERP ../../rpython/bin/rpython \ %{gcrootfinder_options} \ $Options \ - targetpypystandalone + targetpypystandalone \ + --platlibdir=%{_lib} echo "--------------------------------------------------------------" echo "--------------------------------------------------------------" @@ -844,10 +845,10 @@ CheckPyPy pypy%{pyversion}-c %dir %{pypyprefix} %license %{pypyprefix}/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/hpy.dist-info/LICENSE -%{pypyprefix}/lib/pypy%{pyversion}/ +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/hpy.dist-info/LICENSE +%{pypyprefix}/%{_lib}/pypy%{pyversion}/ %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el commit 3588ca0647df14cc8830ce4cff4dcb76a72c9ebc Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 16:09:13 2022 +0100 Build with the default OpenSSL version (i.e. 3 on Fedora 36+) diff --git a/pypy3.9.spec b/pypy3.9.spec index 5341906..29bad37 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -204,7 +204,7 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl1.1-devel +BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel commit 9886df00eb114957891c7b2368eadd464e48e2e8 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 19:56:59 2022 +0100 Not main pypy yet diff --git a/pypy3.9.spec b/pypy3.9.spec index 7db20aa..5341906 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -130,11 +130,7 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal -%if 0%{?fedora} >= 36 -%bcond_without main_pypy3 -%else %bcond_with main_pypy3 -%endif %ifarch %{ix86} x86_64 %{arm} %global _package_note_linker gold commit 32ffa63874f3b1c0b00b7d6b8cf96065afba4df5 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 00:30:08 2022 +0100 PyPy 3.9 diff --git a/.gitignore b/.gitignore index 9a71710..3f09cde 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /pypy3.7-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.8rc1-src.tar.bz2 +/pypy3.9-v7.3.8rc1-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 5b61035..4ad6f24 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -2,23 +2,26 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init_ index 597a1ef9ee..3bfab52083 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,6 +1,7 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path --import pkgutil import sys - import runpy - import tempfile -@@ -9,9 +10,24 @@ import subprocess +@@ -6,13 +8,29 @@ import tempfile + import subprocess + from importlib import resources - __all__ = ["version", "bootstrap"] +-from . import _bundled +- --_SETUPTOOLS_VERSION = "56.0.0" -+_WHEEL_DIR = "/usr/share/python-wheels/" --_PIP_VERSION = "21.1.1" + __all__ = ["version", "bootstrap"] +-_SETUPTOOLS_VERSION = "58.1.0" +-_PIP_VERSION = "21.2.4" ++ ++_WHEEL_DIR = "/usr/share/python-wheels/" ++ +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,17 +38,18 @@ index 597a1ef9ee..3bfab52083 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - ++ _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), -@@ -101,13 +117,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + ("pip", _PIP_VERSION, "py3"), +@@ -101,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version, py_tag in _PROJECTS: - wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) -- whl = pkgutil.get_data( -- "ensurepip", -- "_bundled/{}".format(wheel_name), +- whl = resources.read_binary( +- _bundled, +- wheel_name, - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) diff --git a/pypy3.8.spec b/pypy3.9.spec similarity index 99% rename from pypy3.8.spec rename to pypy3.9.spec index ac339fc..7db20aa 100644 --- a/pypy3.8.spec +++ b/pypy3.9.spec @@ -1,7 +1,7 @@ %global basever 7.3 %global micro 8 %global pre rc1 -%global pyversion 3.8 +%global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} %global version_ %{basever}.%{micro}%{?pre} @@ -289,8 +289,8 @@ Obsoletes: pypy3-libs < 7.3.4-4 Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 21.1.1 -Provides: bundled(python3dist(setuptools)) = 56.0.0 +Provides: bundled(python3dist(pip)) = 21.2.4 +Provides: bundled(python3dist(setuptools)) = 58.1.0 %endif # Provides for the bundled libmpdec @@ -340,7 +340,6 @@ Header files for building C extension modules against PyPy%{pyversion}. %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl -rmdir lib-python/3/ensurepip/_bundled %endif @@ -705,8 +704,8 @@ mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : # since 5.10.0, the debug binaries are built and shipped, making the # pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{pypyprefix}/bin/pypy3.debug -rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug +rm -f %{buildroot}%{pypyprefix}/bin/pypy%{pyversion}.debug +rm -f %{buildroot}%{pypyprefix}/bin/libpypy%{pyversion}-c.so.debug %check @@ -714,7 +713,7 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %{?libmpdec_version: # Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual # provides for in the SPEC. -test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ +test "$(%{goal_dir}/pypy%{pyversion}-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ "%{libmpdec_version}" } @@ -836,7 +835,7 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy3-c +CheckPyPy pypy%{pyversion}-c %endif # run_selftests # Because there's a bunch of binary subpackages and creating @@ -869,7 +868,6 @@ CheckPyPy pypy3-c %files devel %dir %{pypy_include_dir} -%{pypy_include_dir}/*.h %dir %{pypy_include_dir}/pypy%{pyversion} %{pypy_include_dir}/pypy%{pyversion}/*.h %if %{with main_pypy3} diff --git a/sources b/sources index e9e0e29..2cd33d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.8-v7.3.8rc1-src.tar.bz2) = 69eca2ef7c44e15e4b09f36450a985770b3867e41fcd15101881b04fce817f9c8eba3cb783b42fe6509d38e8a4ecfa94573d97cfb902c7c1de9acc2a4d2d760c +SHA512 (pypy3.9-v7.3.8rc1-src.tar.bz2) = d1b1942fbacc7f8d642c85ceb4c4c9796e73bd5836615e2db81f4ddabf9e4f94c230f2d946ea9c49b642d41304aeed3906df1931a52ec40c56d14f1028139978 diff --git a/tests/tests.yml b/tests/tests.yml index a8dc641..6ac1743 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3.8 VERSION=3.8 ./venv.sh + run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh required_packages: - gcc - python3-tox - - pypy3.8-devel + - pypy3.9-devel commit f2558e7a2649b7eefe5091fafb137031c83ef7f6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 15:52:41 2022 +0100 Time and free is always needed diff --git a/pypy3.8.spec b/pypy3.8.spec index d065377..ac339fc 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -218,14 +218,14 @@ BuildRequires: python-rpm-macros BuildRequires: valgrind-devel %endif +# For recording stats: +BuildRequires: time +BuildRequires: /usr/bin/free + %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel -# For use in the selftests, for recording stats: -BuildRequires: time -BuildRequires: /usr/bin/free - # For use in the selftests, for imposing a per-test timeout: BuildRequires: perl-interpreter %endif commit 82b51bb82d8691fe2e9116ed84579e039759fb44 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 00:24:13 2022 +0100 Update to 7.3.8rc1 diff --git a/.gitignore b/.gitignore index 19134eb..9a71710 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /pypy3.7-v7.3.6-src.tar.bz2 /pypy3.7-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.7-src.tar.bz2 +/pypy3.8-v7.3.8rc1-src.tar.bz2 diff --git a/pypy3.8.spec b/pypy3.8.spec index c7496f2..d065377 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -1,8 +1,11 @@ %global basever 7.3 +%global micro 8 +%global pre rc1 %global pyversion 3.8 Name: pypy%{pyversion} -Version: %{basever}.7 -Release: 3%{?dist} +Version: %{basever}.%{micro}%{?pre:~%{pre}} +%global version_ %{basever}.%{micro}%{?pre} +Release: 1%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -138,7 +141,7 @@ URL:
http://pypy.org/
%endif # Source and patches: -Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
+Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version_}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -297,7 +300,7 @@ Provides: bundled(libmpdec) = %{libmpdec_version} } # Find the version in lib_pypy/cffi/_pycparser/__init__.py -Provides: bundled(python3dist(pycparser)) = 2.20 +Provides: bundled(python3dist(pycparser)) = 2.21 # Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py Provides: bundled(python3dist(ply)) = 3.9 @@ -329,7 +332,7 @@ Header files for building C extension modules against PyPy%{pyversion}. %prep -%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +%autosetup -n pypy%{pyversion}-v%{version_}-src -p1 -S git # Temporary workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1954999
%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}} @@ -639,7 +642,7 @@ rm -f %{buildroot}%{pypy_include_dir}/README # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) -%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src +%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version_}-src mkdir -p %{buildroot}%{pypy_debuginfo_dir} # copy over everything: @@ -875,6 +878,9 @@ CheckPyPy pypy3-c %changelog +* Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 +- Update to 7.3.8rc1 + * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/sources b/sources index d769b2c..e9e0e29 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.8-v7.3.7-src.tar.bz2) = 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2 +SHA512 (pypy3.8-v7.3.8rc1-src.tar.bz2) = 69eca2ef7c44e15e4b09f36450a985770b3867e41fcd15101881b04fce817f9c8eba3cb783b42fe6509d38e8a4ecfa94573d97cfb902c7c1de9acc2a4d2d760c commit efbf3a36617566de70d28c78eca89e6a16ce7399 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Jan 25 21:13:36 2022 +0000 Tell package notes that gold is used diff --git a/pypy3.8.spec b/pypy3.8.spec index b92f8bb..c7496f2 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -133,6 +133,9 @@ URL:
http://pypy.org/
%bcond_with main_pypy3 %endif +%ifarch %{ix86} x86_64 %{arm} +%global _package_note_linker gold +%endif # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
commit 6ce261182dce610b705de950809665a3a16245ed Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jan 21 09:52:45 2022 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.8.spec b/pypy3.8.spec index bbaba87..b92f8bb 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -2,7 +2,7 @@ %global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -872,6 +872,9 @@ CheckPyPy pypy3-c %changelog +* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+ * Sat Jan 08 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-2 - Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
commit 735b46af379d49ff93f3e12d0580bd3fa5c3664b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Jan 8 20:32:26 2022 +0100 Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
diff --git a/pypy3.8.spec b/pypy3.8.spec index 5a698ab..bbaba87 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -2,7 +2,7 @@ %global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -872,6 +872,9 @@ CheckPyPy pypy3-c %changelog +* Sat Jan 08 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-2 +- Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
+ * Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 - Initial pypy3.8 package - Supplement tox commit 8e9e05932790eec6430420c03b6e344e6a35f457 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 19:42:12 2022 +0100 There are no "old" wheels present now diff --git a/pypy3.8.spec b/pypy3.8.spec index a36ea94..5a698ab 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -335,10 +335,6 @@ Header files for building C extension modules against PyPy%{pyversion}. %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl rmdir lib-python/3/ensurepip/_bundled -%else -# we don't want to ship the old ones anyway -rm lib-python/3/ensurepip/_bundled/pip-20.0* -rm lib-python/3/ensurepip/_bundled/setuptools-44* %endif commit d696dc3174c48be80d800216f1918c41320c6763 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 17:21:30 2022 +0100 Also conflict with previous main pypy3 diff --git a/pypy3.8.spec b/pypy3.8.spec index 469aa6f..a36ea94 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -245,7 +245,10 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} +# This is when pypy3 package was replaced: Obsoletes: pypy3 < 7.3.4-4 +# This is when pypy3 was provided by pypy3.7: +Conflicts: pypy3 < 7.3.7-1 %endif %description commit d56524c195d563134c417f66c129ce734ef6ed16 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Nov 11 11:43:54 2021 +0100 Update to Python 3.8 - sync patch 189 with the python3.8 package - remove ppc64 only patch, since it did not apply and we don't have ppc64 since F29
https://fedoraproject.org/wiki/Changes/DiscontinuePPC64
- supplement tox
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproj…
diff --git a/.gitignore b/.gitignore index b95796f..19134eb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /pypy3.7-v7.3.5-src.tar.bz2 /pypy3.7-v7.3.6-src.tar.bz2 /pypy3.7-v7.3.7-src.tar.bz2 +/pypy3.8-v7.3.7-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch deleted file mode 100644 index c0dd76b..0000000 --- a/011-no-faulthandler.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit ea4d6a12548eea7ce0424feea13a499fb7085e96 -Author: rpm-build <rpm-build> -Date: Wed Mar 29 04:31:55 2017 +0200 - - 011-no-faulthandler.patch - -diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py -index faa1ba7..2edadc9 100644 ---- a/lib-python/3/test/support/__init__.py -+++ b/lib-python/3/test/support/__init__.py -@@ -7,7 +7,6 @@ import collections.abc - import contextlib - import datetime - import errno --import faulthandler - import fnmatch - import functools - import gc -@@ -70,6 +69,11 @@ try: - except ImportError: - resource = None - -+try: -+ import faulthandler -+except ImportError: -+ faulthandler = None -+ - __all__ = [ - # globals - "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", -@@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): - finally: - started = [t for t in started if t.is_alive()] - if started: -- faulthandler.dump_traceback(sys.stdout) -+ if faulthandler is not None: -+ faulthandler.dump_traceback(sys.stdout) - raise AssertionError('Unable to join %d threads' % len(started)) - - @contextlib.contextmanager diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 8fd8a55..5b61035 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,21 +1,24 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 94d40b0..9135b80 100644 +index 597a1ef9ee..3bfab52083 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,3 +1,5 @@ +@@ -1,6 +1,7 @@ +import distutils.version +import glob import os import os.path - import pkgutil -@@ -9,9 +11,24 @@ import tempfile - __all__ = ["version", "bootstrap"] +-import pkgutil + import sys + import runpy + import tempfile +@@ -9,9 +10,24 @@ import subprocess + __all__ = ["version", "bootstrap"] --_SETUPTOOLS_VERSION = "47.1.0" +-_SETUPTOOLS_VERSION = "56.0.0" +_WHEEL_DIR = "/usr/share/python-wheels/" --_PIP_VERSION = "20.1.1" +-_PIP_VERSION = "21.1.1" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,7 +38,7 @@ index 94d40b0..9135b80 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), -@@ -103,13 +120,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -101,13 +117,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version, py_tag in _PROJECTS: @@ -50,6 +53,6 @@ index 94d40b0..9135b80 100644 + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) - + additional_paths.append(os.path.join(tmpdir, wheel_name)) - + diff --git a/pypy3.7.spec b/pypy3.8.spec similarity index 98% rename from pypy3.7.spec rename to pypy3.8.spec index e7b257d..469aa6f 100644 --- a/pypy3.7.spec +++ b/pypy3.8.spec @@ -1,5 +1,5 @@ %global basever 7.3 -%global pyversion 3.7 +%global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 Release: 1%{?dist} @@ -127,7 +127,7 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal -%if 0%{?fedora} >= 35 +%if 0%{?fedora} >= 36 %bcond_without main_pypy3 %else %bcond_with main_pypy3 @@ -163,9 +163,6 @@ Patch7: 007-remove-startup-message.patch #
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
Patch9: 009-add-libxcrypt-support.patch -# It seems ppc64 has no faulthandler -Patch11: 011-no-faulthandler.patch - # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -283,8 +280,8 @@ Obsoletes: pypy3-libs < 7.3.4-4 Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 20.1.1 -Provides: bundled(python3dist(setuptools)) = 47.1.0 +Provides: bundled(python3dist(pip)) = 21.1.1 +Provides: bundled(python3dist(setuptools)) = 56.0.0 %endif # Provides for the bundled libmpdec @@ -319,6 +316,8 @@ Provides: pypy3-devel%{?_isa} = %{version}-%{release} Obsoletes: pypy3-devel < 7.3.4-4 %endif +Supplements: tox + %description devel Header files for building C extension modules against PyPy%{pyversion}. @@ -844,11 +843,11 @@ CheckPyPy pypy3-c %doc README.rst %dir %{pypyprefix} -%dir %{pypyprefix}/lib-python %license %{pypyprefix}/LICENSE -%{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib_pypy/ -%license %{pypyprefix}/lib_pypy/*/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/hpy.dist-info/LICENSE +%{pypyprefix}/lib/pypy%{pyversion}/ %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el @@ -866,6 +865,8 @@ CheckPyPy pypy3-c %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%dir %{pypy_include_dir}/pypy%{pyversion} +%{pypy_include_dir}/pypy%{pyversion}/*.h %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif @@ -873,8 +874,8 @@ CheckPyPy pypy3-c %changelog * Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 -- Update to 7.3.7 -- Fixes: rhbz#2003682 +- Initial pypy3.8 package +- Supplement tox * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 diff --git a/sources b/sources index ce1117b..d769b2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.7-src.tar.bz2) = 99099f17682b606864753b76a6a0cdf860bc2bf79588ee53e7d0586d3f8f6ab6820240666bd3646ade6523dd5adc6999116d4db4285c688984dc33d4fa7743c6 +SHA512 (pypy3.8-v7.3.7-src.tar.bz2) = 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2 diff --git a/tests/tests.yml b/tests/tests.yml index 5242663..a8dc641 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3.7 VERSION=3.7 ./venv.sh + run: PYTHON=pypy3.8 VERSION=3.8 ./venv.sh required_packages: - gcc - python3-tox - - pypy3.7-devel + - pypy3.8-devel commit cde65b8b859a1112ae3413ea5b006086b303c39f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 19:35:25 2022 +0100 Declare bundled hpy diff --git a/pypy3.7.spec b/pypy3.7.spec index 71f97b7..e7b257d 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -11,6 +11,7 @@ Summary: Python %{pyversion} implementation with a Just-In-Time compiler # Bundled pycparser is is BSD # Bundled pycparser.ply is BSD # Bundled bits from cryptography are ASL 2.0 or BSD +# Bundled hpy is MIT # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new @@ -301,6 +302,9 @@ Provides: bundled(python3dist(ply)) = 3.9 # Find the version in lib_pypy/_cffi_ssl/cryptography/__about__.py Provides: bundled(python3dist(cryptography)) = 2.7 +# Find the version in lib_pypy/hpy.dist-info/METADATA +Provides: bundled(python3dist(hpy)) = 0.0.3 + %description libs Libraries required by the various PyPy implementations of Python %{pyversion}. commit 19c06ca1e99eeca40b99a42867a43f3333512bd9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 10 12:14:57 2021 +0100 Include the Python version in the summary and description diff --git a/pypy3.7.spec b/pypy3.7.spec index 956b601..71f97b7 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -3,7 +3,7 @@ Name: pypy%{pyversion} Version: %{basever}.7 Release: 1%{?dist} -Summary: Python 3 implementation with a Just-In-Time compiler +Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT # Python standard library is Python @@ -251,9 +251,9 @@ Obsoletes: pypy3 < 7.3.4-4 %endif %description -PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU -architectures, and various optimized implementations of the standard types -(strings, dictionaries, etc) +PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler +on some CPU architectures, and various optimized implementations +of the standard types (strings, dictionaries, etc.). %if 0%{with_jit} This build of PyPy has JIT-compilation enabled. @@ -264,7 +264,7 @@ CPU architecture. %package libs -Summary: Run-time libraries used by PyPy implementations of Python 3 +Summary: Run-time libraries used by PyPy implementations of Python %{pyversion} # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) @@ -302,11 +302,11 @@ Provides: bundled(python3dist(ply)) = 3.9 Provides: bundled(python3dist(cryptography)) = 2.7 %description libs -Libraries required by the various PyPy implementations of Python 3. +Libraries required by the various PyPy implementations of Python %{pyversion}. %package devel -Summary: Development tools for working with PyPy3 +Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} %if %{with main_pypy3} @@ -316,7 +316,7 @@ Obsoletes: pypy3-devel < 7.3.4-4 %endif %description devel -Header files for building C extension modules against PyPy3 +Header files for building C extension modules against PyPy%{pyversion}. %prep commit 3af63e71e486829ccebd4062d5c740cb72445805 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Nov 11 11:28:41 2021 +0100 Update to 7.3.7 diff --git a/.gitignore b/.gitignore index 5f5c5c9..b95796f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /pypy3.7-v7.3.4-src.tar.bz2 /pypy3.7-v7.3.5-src.tar.bz2 /pypy3.7-v7.3.6-src.tar.bz2 +/pypy3.7-v7.3.7-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 7f6b535..956b601 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,7 +1,7 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.6 +Version: %{basever}.7 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler @@ -868,6 +868,10 @@ CheckPyPy pypy3-c %changelog +* Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 +- Update to 7.3.7 +- Fixes: rhbz#2003682 + * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 - Remove windows executable binaries diff --git a/sources b/sources index 240358d..ce1117b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.6-src.tar.bz2) = 3c484672c9ac278c6b07e5e9ca09b26afca1069241e89650c44325dde7b4484c117d8d78224b64760eb30b054f2c5349ce91685b69c7d86d293427059bb48814 +SHA512 (pypy3.7-v7.3.7-src.tar.bz2) = 99099f17682b606864753b76a6a0cdf860bc2bf79588ee53e7d0586d3f8f6ab6820240666bd3646ade6523dd5adc6999116d4db4285c688984dc33d4fa7743c6 commit 1ea6c65445b33803708d12de1a732a9b21252ce9 Author: Tomáš Hrnčiar <thrnciar(a)redhat.com> Date: Wed Oct 27 08:50:53 2021 +0200 Remove windows executable binaries diff --git a/pypy3.7.spec b/pypy3.7.spec index dc7f624..7f6b535 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -368,6 +368,9 @@ rm lib-python/3/idlelib/idle.bat ln -s lib_pypy/cffi/_pycparser pycparser %endif +# Remove windows executable binaries +rm lib-python/3/distutils/command/*.exe + %build %ifarch s390 s390x # pypy3 requires z10 at least @@ -867,6 +870,7 @@ CheckPyPy pypy3-c %changelog * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 +- Remove windows executable binaries - Fixes: rhbz#2003682 * Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 commit b6c45f14344f3fbfed87b37735317b1961ad0ee3 Author: Tomáš Hrnčiar <thrnciar(a)redhat.com> Date: Wed Oct 27 08:48:25 2021 +0200 Update to 7.3.6 diff --git a/.gitignore b/.gitignore index dc1ee9b..5f5c5c9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /pypy3.6-v7.3.1-src.tar.bz2 /pypy3.7-v7.3.4-src.tar.bz2 /pypy3.7-v7.3.5-src.tar.bz2 +/pypy3.7-v7.3.6-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 460bfcf..dc7f624 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.5 -Release: 2%{?dist} +Version: %{basever}.6 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,10 @@ CheckPyPy pypy3-c %changelog +* Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 +- Update to 7.3.6 +- Fixes: rhbz#2003682 + * Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 - Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 diff --git a/sources b/sources index 9b40959..240358d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.5-src.tar.bz2) = 253d2efc81d55fb392ab810741e3a633f664e1908b2c26db7a8830c971655cca6be1b8d34581d13aa2d738a4a4c8ba23c2c90333b6e03d4608372e8013ea723b +SHA512 (pypy3.7-v7.3.6-src.tar.bz2) = 3c484672c9ac278c6b07e5e9ca09b26afca1069241e89650c44325dde7b4484c117d8d78224b64760eb30b054f2c5349ce91685b69c7d86d293427059bb48814 commit 90c4be783ba4a948b5617a2cd6188cdd23cd1479 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Sep 20 14:42:23 2021 +0200 Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 diff --git a/pypy3.7.spec b/pypy3.7.spec index 38872c8..460bfcf 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -204,7 +204,7 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl-devel +BuildRequires: openssl1.1-devel BuildRequires: gdbm-devel BuildRequires: xz-devel @@ -865,8 +865,8 @@ CheckPyPy pypy3-c %changelog -* Tue Sep 14 2021 Sahana Prasad <sahana(a)redhat.com> - 7.3.5-2 -- Rebuilt with OpenSSL 3.0.0 +* Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 +- Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 * Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 - Update to 7.3.5 commit 49e2552d6fbebc8d09339fc439a8aa443e5aa690 Author: Sahana Prasad <sahana(a)redhat.com> Date: Tue Sep 14 19:12:24 2021 +0200 Rebuilt with OpenSSL 3.0.0 diff --git a/pypy3.7.spec b/pypy3.7.spec index af43aed..38872c8 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -2,7 +2,7 @@ %global pyversion 3.7 Name: pypy%{pyversion} Version: %{basever}.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,9 @@ CheckPyPy pypy3-c %changelog +* Tue Sep 14 2021 Sahana Prasad <sahana(a)redhat.com> - 7.3.5-2 +- Rebuilt with OpenSSL 3.0.0 + * Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 - Update to 7.3.5 - Fixes: rhbz#1992600 commit 83ef54a660af6c9e84e78ebc1f188784cda7ddc6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Aug 16 18:13:20 2021 +0200 Update to 7.3.5 diff --git a/.gitignore b/.gitignore index c4b4267..dc1ee9b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /pypy3.6-v7.3.0-src.tar.bz2 /pypy3.6-v7.3.1-src.tar.bz2 /pypy3.7-v7.3.4-src.tar.bz2 +/pypy3.7-v7.3.5-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 33e04c9..af43aed 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.4 -Release: 4%{?dist} +Version: %{basever}.5 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,10 @@ CheckPyPy pypy3-c %changelog +* Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 +- Update to 7.3.5 +- Fixes: rhbz#1992600 + * Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 - Rename pypy3 to pypy3.7 - pypy-stackless was removed diff --git a/sources b/sources index 60e1bdc..9b40959 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.4-src.tar.bz2) = c570d34f284f41dcd8dd909216c69831dd83b8501423c7635a4fe506fb16fd3705cf87975a664735e52d0b805a0432267d611a993437d17aac3defe4b9ea4401 +SHA512 (pypy3.7-v7.3.5-src.tar.bz2) = 253d2efc81d55fb392ab810741e3a633f664e1908b2c26db7a8830c971655cca6be1b8d34581d13aa2d738a4a4c8ba23c2c90333b6e03d4608372e8013ea723b commit 27985bbcb8631a6af65c76bde080577242960df5 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Tue Aug 10 13:38:40 2021 +0200 Add bcond main_pypy3 to differentiate whether package is main pypy package or not diff --git a/pypy3.7.spec b/pypy3.7.spec index a660404..33e04c9 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -126,6 +126,12 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal +%if 0%{?fedora} >= 35 +%bcond_without main_pypy3 +%else +%bcond_with main_pypy3 +%endif + # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
@@ -237,10 +243,12 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%if %{with main_pypy3} Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} Obsoletes: pypy3 < 7.3.4-4 +%endif %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -264,9 +272,11 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +%if %{with main_pypy3} Provides: pypy3-libs = %{version}-%{release} Provides: pypy3-libs%{?_isa} = %{version}-%{release} Obsoletes: pypy3-libs < 7.3.4-4 +%endif %if %{with rpmwheels} Requires: python-setuptools-wheel @@ -299,9 +309,11 @@ Libraries required by the various PyPy implementations of Python 3. Summary: Development tools for working with PyPy3 Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} +%if %{with main_pypy3} Provides: pypy3-devel = %{version}-%{release} Provides: pypy3-devel%{?_isa} = %{version}-%{release} Obsoletes: pypy3-devel < 7.3.4-4 +%endif %description devel Header files for building C extension modules against PyPy3 @@ -537,7 +549,9 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} +%if %{with main_pypy3} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 +%endif # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -662,12 +676,14 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif +%if %{with main_pypy3} # Install macros for rpm: install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} +%endif # Remove files we don't want: rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ @@ -828,8 +844,8 @@ CheckPyPy pypy3-c %license %{pypyprefix}/lib_pypy/*/LICENSE %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypy3trace-mode.el -%{_emacs_sitelispdir}/pypy3trace-mode.elc +%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el +%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif %files commit 86f73ef2399e7e79e12a312bc017a25e51d949df Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Aug 9 12:52:43 2021 +0200 Removes pypy-stackless as it is not needed anymore diff --git a/pypy3.7.spec b/pypy3.7.spec index 9133480..a660404 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -78,19 +78,6 @@ URL:
http://pypy.org/
# [Timer] compile_c --- 273.9 s # [Timer] =========================================== # [Timer] Total: --- 3572.0 s -# -# -# A build of pypy-stackless on i686 took about 87 mins: -# [Timer] Timings: -# [Timer] annotate --- 584.2 s -# [Timer] rtype_lltype --- 777.3 s -# [Timer] backendopt_lltype --- 365.9 s -# [Timer] stackcheckinsertion_lltype --- 39.3 s -# [Timer] database_c --- 1089.6 s -# [Timer] source_c --- 1868.6 s -# [Timer] compile_c --- 490.4 s -# [Timer] =========================================== -# [Timer] Total: --- 5215.3 s # We will build a "pypy" binary. @@ -116,9 +103,6 @@ URL:
http://pypy.org/
%global with_jit 0 %endif -# Should we build a "pypy-stackless" binary? -%global with_stackless 0 - # Should we build the emacs JIT-viewing mode? %if 0%{?rhel} == 6 %global with_emacs 0 @@ -323,19 +307,6 @@ Obsoletes: pypy3-devel < 7.3.4-4 Header files for building C extension modules against PyPy3 -%if 0%{with_stackless} -%package stackless -Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs%{?_isa} = %{version}-%{release} - -Provides: pypy3-stackless = %{version}-%{release} -Provides: pypy3-stackless%{?_isa} = %{version}-%{release} -Obsoletes: pypy3-stackless < 7.3.4-4 - -%description stackless -Build of PyPy3 with support for micro-threads for massive concurrency -%endif - %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git @@ -522,12 +493,6 @@ BuildPyPy \ %endif %{nil} -%if 0%{with_stackless} -BuildPyPy \ - pypy3-stackless \ - "--stackless" -%endif - %if %{with_emacs} %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif @@ -845,11 +810,6 @@ CheckPyPy() { %if %{run_selftests} CheckPyPy pypy3-c - -%if 0%{with_stackless} -CheckPyPy pypy3-stackless -%endif - %endif # run_selftests # Because there's a bunch of binary subpackages and creating @@ -887,12 +847,6 @@ CheckPyPy pypy3-stackless %{_rpmconfigdir}/macros.d/macros.pypy3 %endif -%if 0%{with_stackless} -%files stackless -%doc README.rst -%{_bindir}/pypy-stackless -%endif - %changelog * Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 commit b8466c1e8afa8093205b6100a27540f753b5c9d9 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Aug 9 12:45:19 2021 +0200 Rename pypy3 to pypy3.7 diff --git a/pypy3.spec b/pypy3.7.spec similarity index 97% rename from pypy3.spec rename to pypy3.7.spec index 2bd5917..9133480 100644 --- a/pypy3.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 -Name: pypy3 -Version: %{basever}.4 %global pyversion 3.7 -Release: 3%{?dist} +Name: pypy%{pyversion} +Version: %{basever}.4 +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -136,7 +136,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{basever} +%global pypyprefix %{_libdir}/pypy%{pyversion} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -254,8 +254,9 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} -Provides: pypy%{pyversion} = %{version}-%{release} -Provides: pypy%{pyversion}%{?_isa} = %{version}-%{release} +Provides: pypy3 = %{version}-%{release} +Provides: pypy3%{?_isa} = %{version}-%{release} +Obsoletes: pypy3 < 7.3.4-4 %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -279,8 +280,9 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif -Provides: pypy%{pyversion}-libs = %{version}-%{release} -Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} +Provides: pypy3-libs = %{version}-%{release} +Provides: pypy3-libs%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-libs < 7.3.4-4 %if %{with rpmwheels} Requires: python-setuptools-wheel @@ -311,10 +313,11 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Summary: Development tools for working with PyPy3 -Requires: pypy3%{?_isa} = %{version}-%{release} +Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} -Provides: pypy%{pyversion}-devel = %{version}-%{release} -Provides: pypy%{pyversion}-devel%{?_isa} = %{version}-%{release} +Provides: pypy3-devel = %{version}-%{release} +Provides: pypy3-devel%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-devel < 7.3.4-4 %description devel Header files for building C extension modules against PyPy3 @@ -325,8 +328,9 @@ Header files for building C extension modules against PyPy3 Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} -Provides: pypy%{pyversion}-stackless = %{version}-%{release} -Provides: pypy%{pyversion}-stackless%{?_isa} = %{version}-%{release} +Provides: pypy3-stackless = %{version}-%{release} +Provides: pypy3-stackless%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-stackless < 7.3.4-4 %description stackless Build of PyPy3 with support for micro-threads for massive concurrency @@ -534,8 +538,8 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -# Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies +# Run installing script, archive-name pypy%{pyversion} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name pypy%{pyversion} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies # Remove shebang lines from .py files that aren't executable, and @@ -701,7 +705,7 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ +rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now @@ -840,10 +844,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy %{name}-c +CheckPyPy pypy3-c %if 0%{with_stackless} -CheckPyPy %{name}-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -870,16 +874,18 @@ CheckPyPy %{name}-stackless %files %doc README.rst +%if %{with main_pypy3} %{_bindir}/pypy3 +%endif %{_bindir}/pypy%{pyversion} %{pypyprefix}/bin/ -%exclude %{_libdir}/%{name}-%{version}.tar.bz2 - %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 +%endif %if 0%{with_stackless} %files stackless @@ -889,6 +895,10 @@ CheckPyPy %{name}-stackless %changelog +* Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 +- Rename pypy3 to pypy3.7 +- pypy-stackless was removed + * Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.4-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
diff --git a/tests/tests.yml b/tests/tests.yml index 827cb90..5242663 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.7 ./venv.sh + run: PYTHON=pypy3.7 VERSION=3.7 ./venv.sh required_packages: - gcc - python3-tox - - pypy3-devel + - pypy3.7-devel commit 716f2f638d30f78656b784f42dd633aac492804e Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 23 04:30:08 2021 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 3b11f44..2bd5917 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.4 %global pyversion 3.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -889,6 +889,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.4-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+ * Wed Jul 21 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-2 - Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros - Fixes: rhbz#1976656 commit e90c1b5d85ebcaed6e89cf8bf6b2327210769370 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Wed Jul 21 16:19:29 2021 +0200 Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros diff --git a/pypy3.spec b/pypy3.spec index 025102c..3b11f44 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.4 %global pyversion 3.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -143,10 +143,6 @@ URL:
http://pypy.org/
%global goal_dir pypy/goal -# Turn off the brp-python-bytecompile postprocessing script -# We manually invoke it later on, using the freshly built pypy binary -%global __brp_python_bytecompile %{nil} - # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
@@ -221,6 +217,9 @@ BuildRequires: expat-devel BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel + +BuildRequires: python-rpm-macros + %ifnarch s390 BuildRequires: valgrind-devel %endif @@ -617,19 +616,12 @@ ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # Bytecompile all of the .py files we ship, using our pypy binary, giving us -# .pyc files for pypy. The script actually does the work twice (passing in -O -# the second time) but it's simplest to reuse that script. -# -# The script has special-casing for .py files below -# /usr/lib{64}/python[0-9].[0-9] -# but given that we're installing into a different path, the supplied "default" -# implementation gets used instead. +# .pyc files for pypy. # # Note that some of the test files deliberately contain syntax errors, so -# we pass 0 for the second argument ("errors_terminate"): -/usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}%{pypyprefix}/bin/pypy3 \ - 0 +# we are running it in subshell, to be able to ignore the failures and not to terminate the build. +(%{py_byte_compile %{buildroot}%{pypyprefix}/bin/pypy3 %{buildroot}%{pypyprefix}}) || : + %{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' %{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' @@ -897,6 +889,10 @@ CheckPyPy %{name}-stackless %changelog +* Wed Jul 21 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-2 +- Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros +- Fixes: rhbz#1976656 + * Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.4-1 - Update to 7.3.4 - pypy3 is now Python 3.7 commit f24f8ff0ada28610e3a6801d602c3effea640fe5 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 21 01:35:55 2021 +0200 Update to 7.3.4, PyPy3.7 diff --git a/.gitignore b/.gitignore index 849f483..c4b4267 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /pypy3.6-v7.2.0-src.tar.bz2 /pypy3.6-v7.3.0-src.tar.bz2 /pypy3.6-v7.3.1-src.tar.bz2 +/pypy3.7-v7.3.4-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index e093956..c0dd76b 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -30,7 +30,7 @@ index faa1ba7..2edadc9 100644 "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", @@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): finally: - started = [t for t in started if t.isAlive()] + started = [t for t in started if t.is_alive()] if started: - faulthandler.dump_traceback(sys.stdout) + if faulthandler is not None: diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 0032ba9..8fd8a55 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,25 +1,21 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 6b35b3d..97fc83b 100644 +index 94d40b0..9135b80 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,16 +1,34 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path import pkgutil - import sys -+import runpy - import tempfile - - +@@ -9,9 +11,24 @@ import tempfile __all__ = ["version", "bootstrap"] - - --_SETUPTOOLS_VERSION = "44.0.0" + + +-_SETUPTOOLS_VERSION = "47.1.0" +_WHEEL_DIR = "/usr/share/python-wheels/" - --_PIP_VERSION = "20.0.2" + +-_PIP_VERSION = "20.1.1" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -36,36 +32,14 @@ index 6b35b3d..97fc83b 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - + _PROJECTS = [ - ("setuptools", _SETUPTOOLS_VERSION), -@@ -23,10 +41,18 @@ def _run_pip(args, additional_paths=None): - if additional_paths is not None: - sys.path = additional_paths + sys.path - -- # Install the bundled software -- import pip._internal.cli.main -- return pip._internal.cli.main.main(args) -+ # Invoke pip as if it's the main module, and catch the exit. -+ backup_argv = sys.argv[:] -+ sys.argv[1:] = args -+ try: -+ # run_module() alters sys.modules and sys.argv, but restores them at exit -+ runpy.run_module("pip", run_name="__main__", alter_sys=True) -+ except SystemExit as exc: -+ return exc.code -+ finally: -+ sys.argv[:] = backup_argv - -+ raise SystemError("pip did not exit, this should never happen") - - def version(): - """ -@@ -93,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + ("setuptools", _SETUPTOOLS_VERSION, "py3"), +@@ -103,13 +120,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] - for project, version in _PROJECTS: -- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) + for project, version, py_tag in _PROJECTS: +- wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) - whl = pkgutil.get_data( - "ensurepip", - "_bundled/{}".format(wheel_name), diff --git a/pypy3.spec b/pypy3.spec index 7b4d004..025102c 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ %global basever 7.3 Name: pypy3 -Version: %{basever}.1 -%global pyversion 3.6 -Release: 6%{?dist} +Version: %{basever}.4 +%global pyversion 3.7 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -25,7 +25,9 @@ URL:
http://pypy.org/
# with the packaged version. # The version information can be found at lib_pypy/_libmpdec/mpdecimal.h # defined as MPD_VERSION. -%global libmpdec_version 2.4.1 +# See
https://foss.heptapod.net/pypy/pypy/-/issues/3024
+# With PyPy 7.3.4, the decimal module is not compiled +#%%global libmpdec_version 2.4.1 # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise @@ -146,7 +148,7 @@ URL:
http://pypy.org/
%global __brp_python_bytecompile %{nil} # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
+Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -285,13 +287,15 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 20.0.2 -Provides: bundled(python3dist(setuptools)) = 44.0.0 +Provides: bundled(python3dist(pip)) = 20.1.1 +Provides: bundled(python3dist(setuptools)) = 47.1.0 %endif # Provides for the bundled libmpdec +%{?libmpdec_version: Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} +} # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.20 @@ -341,8 +345,8 @@ rm lib-python/3/ensurepip/_bundled/*.whl rmdir lib-python/3/ensurepip/_bundled %else # we don't want to ship the old ones anyway -rm lib-python/3/ensurepip/_bundled/pip-8.1.2-* -rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-* +rm lib-python/3/ensurepip/_bundled/pip-20.0* +rm lib-python/3/ensurepip/_bundled/setuptools-44* %endif @@ -532,7 +536,7 @@ mkdir -p %{buildroot}/%{pypyprefix} # Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies # Remove shebang lines from .py files that aren't executable, and @@ -564,7 +568,6 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # approach is to postprocess the ELF file: execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 -ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 @@ -720,11 +723,12 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check +%{?libmpdec_version: # Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual # provides for in the SPEC. test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ "%{libmpdec_version}" - +} topdir=$(pwd) @@ -893,6 +897,11 @@ CheckPyPy %{name}-stackless %changelog +* Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.4-1 +- Update to 7.3.4 +- pypy3 is now Python 3.7 +- Fixes rhbz#1961933 + * Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.1-6 - Provide missing bundled library information diff --git a/sources b/sources index 0b7b357..60e1bdc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 +SHA512 (pypy3.7-v7.3.4-src.tar.bz2) = c570d34f284f41dcd8dd909216c69831dd83b8501423c7635a4fe506fb16fd3705cf87975a664735e52d0b805a0432267d611a993437d17aac3defe4b9ea4401 diff --git a/tests/tests.yml b/tests/tests.yml index c3a91f3..827cb90 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.6 ./venv.sh + run: PYTHON=pypy3 VERSION=3.7 ./venv.sh required_packages: - gcc - python3-tox commit f592f0db6a04e430152a0909b3471683c0c95849 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue May 25 22:05:10 2021 +0200 Provide missing bundled library information diff --git a/pypy3.spec b/pypy3.spec index 2184360..7b4d004 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,14 +2,20 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler +# PyPy is MIT +# Python standard library is Python +# pypy/module/unicodedata is UCD +# Bundled pycparser is is BSD +# Bundled pycparser.ply is BSD +# Bundled bits from cryptography are ASL 2.0 or BSD # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new # licensing terms -License: MIT and Python and UCD +License: MIT and Python and UCD and BSD and (ASL 2.0 or BSD) URL:
http://pypy.org/
# High-level configuration of the build: @@ -279,14 +285,23 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 20.0.2 -Provides: bundled(python3-setuptools) = 44.0.0 +Provides: bundled(python3dist(pip)) = 20.0.2 +Provides: bundled(python3dist(setuptools)) = 44.0.0 %endif # Provides for the bundled libmpdec Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} +# Find the version in lib_pypy/cffi/_pycparser/__init__.py +Provides: bundled(python3dist(pycparser)) = 2.20 + +# Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py +Provides: bundled(python3dist(ply)) = 3.9 + +# Find the version in lib_pypy/_cffi_ssl/cryptography/__about__.py +Provides: bundled(python3dist(cryptography)) = 2.7 + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -878,6 +893,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.1-6 +- Provide missing bundled library information + * Wed May 19 2021 Charalampos Stratakis <cstratak(a)redhat.com> - 7.3.1-5 - Add virtual provides for the bundled libmpdec (rhbz#1943359) commit a45f4e982edfb10e5ec9dae376ba282d6030e88e Author: Charalampos Stratakis <cstratak(a)redhat.com> Date: Thu May 20 00:10:33 2021 +0200 Add virtual provides for the bundled libmpdec (rhbz#1943359) diff --git a/pypy3.spec b/pypy3.spec index 57590db..2184360 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -14,6 +14,13 @@ URL:
http://pypy.org/
# High-level configuration of the build: +# libmpdec (mpdecimal package in Fedora) is tightly coupled with the +# decimal module. We keep it bundled as to avoid incompatibilities +# with the packaged version. +# The version information can be found at lib_pypy/_libmpdec/mpdecimal.h +# defined as MPD_VERSION. +%global libmpdec_version 2.4.1 + # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels @@ -276,6 +283,10 @@ Provides: bundled(python3-pip) = 20.0.2 Provides: bundled(python3-setuptools) = 44.0.0 %endif +# Provides for the bundled libmpdec +Provides: bundled(mpdecimal) = %{libmpdec_version} +Provides: bundled(libmpdec) = %{libmpdec_version} + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -693,6 +704,13 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check + +# Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual +# provides for in the SPEC. +test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ + "%{libmpdec_version}" + + topdir=$(pwd) SkipTest() { @@ -860,6 +878,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed May 19 2021 Charalampos Stratakis <cstratak(a)redhat.com> - 7.3.1-5 +- Add virtual provides for the bundled libmpdec (rhbz#1943359) + * Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
commit 10fe1a9ce92d4e78add6f3b961d0600a9e72fe51 Author: Charalampos Stratakis <cstratak(a)redhat.com> Date: Thu May 20 00:09:06 2021 +0200 Temporary workaround for missing %apply_patch in RPM 4.17 alpha diff --git a/pypy3.spec b/pypy3.spec index 79848ea..57590db 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -306,6 +306,8 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +# Temporary workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1954999
+%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}} %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} commit 7e40fae162577d96896fe74dc35072e5ee3e8ea3 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Wed Jan 27 08:56:57 2021 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index fd45393..79848ea 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+ * Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-3 - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
commit 2db1dabba5dce3ef2b86a0432eb42488e0be3bda Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Aug 1 07:17:17 2020 +0000 - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index ad7423f..fd45393 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,10 @@ CheckPyPy %{name}-stackless %changelog +* Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-3 +- Second attempt - Rebuilt for +
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ * Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
commit a68c6873ebaceff0dbddeec347b44f1ea70df1f7 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Tue Jul 28 23:22:44 2020 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index ebca79e..ad7423f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ * Wed Apr 15 2020 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.1-1 - Update to 7.3.1 commit 598f61d5f284c0a353b971350aedf5dd710ddf50 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Apr 20 13:08:30 2020 +0200 Update to 7.3.1 diff --git a/.gitignore b/.gitignore index 9058264..849f483 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /pypy3.6-v7.1.1-src.tar.bz2 /pypy3.6-v7.2.0-src.tar.bz2 /pypy3.6-v7.3.0-src.tar.bz2 +/pypy3.6-v7.3.1-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index c84b0cb..0032ba9 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,24 +1,25 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 7a0d3ee..2c9d676 100644 +index 6b35b3d..97fc83b 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,6 +1,7 @@ +@@ -1,16 +1,34 @@ +import distutils.version +import glob import os import os.path --import pkgutil + import pkgutil import sys ++import runpy import tempfile - -@@ -8,9 +9,24 @@ import tempfile + + __all__ = ["version", "bootstrap"] - - --_SETUPTOOLS_VERSION = "41.2.0" + + +-_SETUPTOOLS_VERSION = "44.0.0" +_WHEEL_DIR = "/usr/share/python-wheels/" - --_PIP_VERSION = "19.2.3" + +-_PIP_VERSION = "20.0.2" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,10 +36,32 @@ index 7a0d3ee..2c9d676 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - + _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -93,13 +109,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -23,10 +41,18 @@ def _run_pip(args, additional_paths=None): + if additional_paths is not None: + sys.path = additional_paths + sys.path + +- # Install the bundled software +- import pip._internal.cli.main +- return pip._internal.cli.main.main(args) ++ # Invoke pip as if it's the main module, and catch the exit. ++ backup_argv = sys.argv[:] ++ sys.argv[1:] = args ++ try: ++ # run_module() alters sys.modules and sys.argv, but restores them at exit ++ runpy.run_module("pip", run_name="__main__", alter_sys=True) ++ except SystemExit as exc: ++ return exc.code ++ finally: ++ sys.argv[:] = backup_argv + ++ raise SystemError("pip did not exit, this should never happen") + + def version(): + """ +@@ -93,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version in _PROJECTS: @@ -53,6 +76,6 @@ index 7a0d3ee..2c9d676 100644 + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) - + additional_paths.append(os.path.join(tmpdir, wheel_name)) - + diff --git a/pypy3.spec b/pypy3.spec index 63edae4..ebca79e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ %global basever 7.3 Name: pypy3 -Version: %{basever}.0 +Version: %{basever}.1 %global pyversion 3.6 -Release: 3%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -14,11 +14,6 @@ URL:
http://pypy.org/
# High-level configuration of the build: -# Build with -fcommon -#
https://bugzilla.redhat.com/show_bug.cgi?id=1796821
-#
https://bitbucket.org/pypy/pypy/issues/3163
-%define _legacy_common_support 1 - # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels @@ -277,8 +272,8 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 9.0.1 -Provides: bundled(python3-setuptools) = 28.8.0 +Provides: bundled(python3-pip) = 20.0.2 +Provides: bundled(python3-setuptools) = 44.0.0 %endif %description libs @@ -863,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 15 2020 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.1-1 +- Update to 7.3.1 + * Wed Feb 12 2020 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-3 - Update the ensurepip module to work with setuptools >= 45 diff --git a/sources b/sources index 2bd7601..0b7b357 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.3.0-src.tar.bz2) = 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 +SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 commit 2032d986801b3a542282dd6341b01ce5cfe7e347 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 12 13:30:25 2020 +0100 Update the ensurepip module to work with setuptools >= 45 setuptools 45.x is Python 3 only and changed the name of the wheel diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 9441309..c84b0cb 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,8 +1,8 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 9f5d151..8b81155 100644 +index 7a0d3ee..2c9d676 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,16 +1,27 @@ +@@ -1,6 +1,7 @@ +import distutils.version +import glob import os @@ -11,20 +11,25 @@ index 9f5d151..8b81155 100644 import sys import tempfile - +@@ -8,9 +9,24 @@ import tempfile __all__ = ["version", "bootstrap"] -+_WHEEL_DIR = "/usr/share/python-wheels/" -_SETUPTOOLS_VERSION = "41.2.0" ++_WHEEL_DIR = "/usr/share/python-wheels/" -_PIP_VERSION = "19.2.3" ++_wheels = {} ++ +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) -+ suffix = "-py2.py3-none-any.whl" -+ pattern = "{}*{}".format(prefix, suffix) -+ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern)) -+ return str(max(versions, key=distutils.version.LooseVersion)) ++ _wheels[pkg] = {} ++ for suffix in "-py2.py3-none-any.whl", "-py3-none-any.whl": ++ pattern = "{}*{}".format(prefix, suffix) ++ for path in glob.glob(pattern): ++ version_str = path[len(prefix):-len(suffix)] ++ _wheels[pkg][version_str] = os.path.basename(path) ++ return str(max(_wheels[pkg], key=distutils.version.LooseVersion)) + + +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") @@ -33,16 +38,18 @@ index 9f5d151..8b81155 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, +@@ -93,13 +109,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + # additional paths that need added to sys.path additional_paths = [] for project, version in _PROJECTS: - wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) +- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) - whl = pkgutil.get_data( - "ensurepip", - "_bundled/{}".format(wheel_name), - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) ++ wheel_name = _wheels[project][version] + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) diff --git a/pypy3.spec b/pypy3.spec index e17f3a4..63edae4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -863,6 +863,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Feb 12 2020 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-3 +- Update the ensurepip module to work with setuptools >= 45 + * Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
commit 64a5625b90ea9129c1a509ef184c67c97b5699ae Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 12 20:01:06 2020 +0100 Build with -fcommon diff --git a/pypy3.spec b/pypy3.spec index a30e912..e17f3a4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -14,6 +14,11 @@ URL:
http://pypy.org/
# High-level configuration of the build: +# Build with -fcommon +#
https://bugzilla.redhat.com/show_bug.cgi?id=1796821
+#
https://bitbucket.org/pypy/pypy/issues/3163
+%define _legacy_common_support 1 + # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels commit 1dceae177ceb5daa5cfc82db2a6afa9a3d3b37d2 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Jan 30 10:15:13 2020 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 7257616..a30e912 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+ * Sat Dec 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-1 - Update to 7.3.0 commit 41c6994849a04d82eb969a306751bf35afe90735 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Dec 28 11:22:21 2019 +0100 Update to 7.3.0 diff --git a/.gitignore b/.gitignore index 4b53676..9058264 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /pypy3.5-v7.0.0-src.tar.bz2 /pypy3.6-v7.1.1-src.tar.bz2 /pypy3.6-v7.2.0-src.tar.bz2 +/pypy3.6-v7.3.0-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 4a62d57..9441309 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -16,9 +16,9 @@ index 9f5d151..8b81155 100644 +_WHEEL_DIR = "/usr/share/python-wheels/" --_SETUPTOOLS_VERSION = "40.6.2" +-_SETUPTOOLS_VERSION = "41.2.0" --_PIP_VERSION = "18.1" +-_PIP_VERSION = "19.2.3" +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) + suffix = "-py2.py3-none-any.whl" diff --git a/d81c769a235307f6671a8fa916f48d6896cbb823.patch b/d81c769a235307f6671a8fa916f48d6896cbb823.patch deleted file mode 100644 index 8debd29..0000000 --- a/d81c769a235307f6671a8fa916f48d6896cbb823.patch +++ /dev/null @@ -1,49 +0,0 @@ -# HG changeset patch -# User Armin Rigo <arigo(a)tunes.org> -# Date 1571380165 -7200 -# Node ID d81c769a235307f6671a8fa916f48d6896cbb823 -# Parent f27546b858f97bfa286a891e1474579759028784 -Arguably, clarify the logic. The real motivation is a gcc bug, see issue #3086 - -diff --git a/rpython/jit/backend/aarch64/opassembler.py b/rpython/jit/backend/aarch64/opassembler.py ---- a/rpython/jit/backend/aarch64/opassembler.py -+++ b/rpython/jit/backend/aarch64/opassembler.py -@@ -808,9 +808,7 @@ - # Inline a series of STR operations, starting at 'dstaddr_loc'. - # - self.mc.gen_load_int(r.ip0.value, 0) -- i = 0 -- adjustment = 0 -- needs_adjustment = itemsize < 8 and (startbyte % 8) -+ i = dst_i = 0 - total_size = size_box.getint() - while i < total_size: - sz = itemsize -@@ -818,19 +816,19 @@ - next_group += 8 - if next_group <= total_size: - sz = 8 -+ if dst_i % 8: # unaligned? -+ self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, dst_i) -+ dst_i = 0 - if sz == 8: -- if needs_adjustment: -- self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, i) -- adjustment = -i -- needs_adjustment = False -- self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, dst_i) - elif sz == 4: -- self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, dst_i) - elif sz == 2: -- self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, dst_i) - else: -- self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, dst_i) - i += sz -+ dst_i += sz - - else: - if isinstance(size_box, ConstInt): diff --git a/pypy3.spec b/pypy3.spec index 785179e..7257616 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.2 +%global basever 7.3 Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -164,9 +164,6 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch -#
https://bitbucket.org/pypy/pypy/issues/3086
-Patch12: d81c769a235307f6671a8fa916f48d6896cbb823.patch - # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -861,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Dec 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-1 +- Update to 7.3.0 + * Wed Oct 23 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-2 - Enable JIT on aarch64 diff --git a/sources b/sources index 25bbbb3..2bd7601 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.2.0-src.tar.bz2) = bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc +SHA512 (pypy3.6-v7.3.0-src.tar.bz2) = 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 commit 5aa1d86125bbb751ef5edc25907f659c20d31797 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Oct 23 17:03:00 2019 +0200 Enable JIT on aarch64, add upstream workaround diff --git a/d81c769a235307f6671a8fa916f48d6896cbb823.patch b/d81c769a235307f6671a8fa916f48d6896cbb823.patch new file mode 100644 index 0000000..8debd29 --- /dev/null +++ b/d81c769a235307f6671a8fa916f48d6896cbb823.patch @@ -0,0 +1,49 @@ +# HG changeset patch +# User Armin Rigo <arigo(a)tunes.org> +# Date 1571380165 -7200 +# Node ID d81c769a235307f6671a8fa916f48d6896cbb823 +# Parent f27546b858f97bfa286a891e1474579759028784 +Arguably, clarify the logic. The real motivation is a gcc bug, see issue #3086 + +diff --git a/rpython/jit/backend/aarch64/opassembler.py b/rpython/jit/backend/aarch64/opassembler.py +--- a/rpython/jit/backend/aarch64/opassembler.py ++++ b/rpython/jit/backend/aarch64/opassembler.py +@@ -808,9 +808,7 @@ + # Inline a series of STR operations, starting at 'dstaddr_loc'. + # + self.mc.gen_load_int(r.ip0.value, 0) +- i = 0 +- adjustment = 0 +- needs_adjustment = itemsize < 8 and (startbyte % 8) ++ i = dst_i = 0 + total_size = size_box.getint() + while i < total_size: + sz = itemsize +@@ -818,19 +816,19 @@ + next_group += 8 + if next_group <= total_size: + sz = 8 ++ if dst_i % 8: # unaligned? ++ self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, dst_i) ++ dst_i = 0 + if sz == 8: +- if needs_adjustment: +- self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, i) +- adjustment = -i +- needs_adjustment = False +- self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, dst_i) + elif sz == 4: +- self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, dst_i) + elif sz == 2: +- self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, dst_i) + else: +- self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, dst_i) + i += sz ++ dst_i += sz + + else: + if isinstance(size_box, ConstInt): diff --git a/pypy3.spec b/pypy3.spec index 70caacc..785179e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -95,8 +95,7 @@ URL:
http://pypy.org/
# it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -# aarch64:
https://bitbucket.org/pypy/pypy/issues/3086
-%ifarch %{ix86} x86_64 %{arm} %{power64} s390x +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 %global with_jit 1 %else %global with_jit 0 @@ -165,6 +164,9 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +#
https://bitbucket.org/pypy/pypy/issues/3086
+Patch12: d81c769a235307f6671a8fa916f48d6896cbb823.patch + # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -859,6 +861,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Oct 23 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-2 +- Enable JIT on aarch64 + * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) - Enable aarch64 (without JIT) commit faa7ffb044605fcf1d807ada72eeb88ccf4181a1 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 19 00:41:56 2019 +0200 Build everything with pypy, but fix the cpython build w/out pycparser diff --git a/pypy3.spec b/pypy3.spec index 0ab7125..70caacc 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -179,25 +179,15 @@ Source189: 189-use-rpm-wheels.patch # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%ifarch %{power64} -# the build is unreliable with pypy+power, getting random failures -# so better have a bit slower build than having to build until it pass -%global use_self_when_building 0 -%else %global use_self_when_building 1 -%endif - %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 -# no pypy-pycparser available ATM %global bootstrap_python_interp pypy2 %else - - # pypy3 can only be build with python2 -BuildRequires: python2-devel -BuildRequires: python2-pycparser +# exception to use Python 2:
https://pagure.io/fesco/issue/2130
+BuildRequires: python27 %global bootstrap_python_interp python2 %endif @@ -356,6 +346,11 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif +%if ! 0%{use_self_when_building} + # use the pycparser from PyPy even on CPython + ln -s lib_pypy/cffi/_pycparser pycparser +%endif + %build %ifarch s390 s390x # pypy3 requires z10 at least commit 8d646e7dd1de54fcf25b0d37ccc3b087b8e7554e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Oct 18 19:02:40 2019 +0200 Fix %{pypy3_version} for PyPy 3.10 diff --git a/macros.pypy3 b/macros.pypy3 index f138a39..d11474b 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -1,5 +1,5 @@ %__pypy3 /usr/bin/pypy3 %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") -%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") %pypy3_pypy_version %(%{__pypy3} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))") commit 083ef4d302f9f87e71603a93650baea2929ab127 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Oct 17 20:29:42 2019 +0200 Enable power64 (with JIT) diff --git a/pypy3.spec b/pypy3.spec index e7f3045..0ab7125 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,9 +12,6 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
-ExcludeArch: %{power64} - # High-level configuration of the build: # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package @@ -870,6 +867,7 @@ CheckPyPy %{name}-stackless * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) - Enable aarch64 (without JIT) +- Enable power64 (with JIT) * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit f27d32f53000b43d7e821e764b9b8a073e0c8e58 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Oct 15 02:03:21 2019 +0200 Enable aarch64 without JIT See
https://bitbucket.org/pypy/pypy/issues/3086
diff --git a/pypy3.spec b/pypy3.spec index cf46f81..e7f3045 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,9 +12,8 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# aarch64: Not available yet # ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
-ExcludeArch: aarch64 %{power64} +ExcludeArch: %{power64} # High-level configuration of the build: @@ -99,6 +98,7 @@ ExcludeArch: aarch64 %{power64} # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. +# aarch64:
https://bitbucket.org/pypy/pypy/issues/3086
%ifarch %{ix86} x86_64 %{arm} %{power64} s390x %global with_jit 1 %else @@ -869,6 +869,7 @@ CheckPyPy %{name}-stackless %changelog * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) +- Enable aarch64 (without JIT) * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit 2f53e9f20a92cd7efc8798ba5d6766812eaea195 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Oct 14 20:40:57 2019 +0200 Update to 7.2.0 diff --git a/.gitignore b/.gitignore index 910808c..4b53676 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /pypy3-v6.0.0-src.tar.bz2 /pypy3.5-v7.0.0-src.tar.bz2 /pypy3.6-v7.1.1-src.tar.bz2 +/pypy3.6-v7.2.0-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index 9d7165d..e093956 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -5,18 +5,18 @@ Date: Wed Mar 29 04:31:55 2017 +0200 011-no-faulthandler.patch diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py -index 5d7f308..4424637 100644 +index faa1ba7..2edadc9 100644 --- a/lib-python/3/test/support/__init__.py +++ b/lib-python/3/test/support/__init__.py -@@ -6,7 +6,6 @@ if __name__ != 'test.support': - import collections.abc +@@ -7,7 +7,6 @@ import collections.abc import contextlib + import datetime import errno -import faulthandler import fnmatch import functools import gc -@@ -65,6 +64,11 @@ try: +@@ -70,6 +69,11 @@ try: except ImportError: resource = None @@ -28,7 +28,7 @@ index 5d7f308..4424637 100644 __all__ = [ # globals "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", -@@ -2060,7 +2064,8 @@ def start_threads(threads, unlock=None): +@@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): finally: started = [t for t in started if t.isAlive()] if started: diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index eb8b10e..4a62d57 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -16,9 +16,9 @@ index 9f5d151..8b81155 100644 +_WHEEL_DIR = "/usr/share/python-wheels/" --_SETUPTOOLS_VERSION = "28.8.0" +-_SETUPTOOLS_VERSION = "40.6.2" --_PIP_VERSION = "9.0.1" +-_PIP_VERSION = "18.1" +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) + suffix = "-py2.py3-none-any.whl" @@ -33,22 +33,6 @@ index 9f5d151..8b81155 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -24,8 +35,13 @@ def _run_pip(args, additional_paths=None): - sys.path = additional_paths + sys.path - - # Install the bundled software -- import pip -- pip.main(args) -+ try: -+ # pip 10 -+ from pip._internal import main -+ except ImportError: -+ # pip 9 -+ from pip import main -+ main(args) - - - def version(): @@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: diff --git a/pypy3.spec b/pypy3.spec index 225a1f3..cf46f81 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.1 +%global basever 7.2 Name: pypy3 -Version: %{basever}.1 +Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -867,6 +867,9 @@ CheckPyPy %{name}-stackless %changelog +* Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 +- Update to 7.2.0 (#1757707) + * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
diff --git a/sources b/sources index aa4e777..25bbbb3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.1.1-src.tar.bz2) = 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473 +SHA512 (pypy3.6-v7.2.0-src.tar.bz2) = bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc commit 707f9490c0c9ae2b3cac2b0c6e9503888c5efad0 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 26 11:47:24 2019 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index b781dfb..225a1f3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -867,6 +867,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+ * Fri May 24 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.1.1-1 - Update to 7.1.1 (#1689198) - pypy3 is now Python 3.6 commit 7fc9514b60f515a33dc339d19b94a21dd9943232 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 12 14:48:12 2019 +0200 Keep the LICENSE file in lib/pythonX.Y dir Virtualenv tries to copy it. See
https://github.com/pypa/virtualenv/issues/1352
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. diff --git a/pypy3.spec b/pypy3.spec index 1f45c89..b781dfb 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -688,7 +688,6 @@ install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ - %{buildroot}%{pypyprefix}/LICENSE \ %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now @@ -828,18 +827,19 @@ CheckPyPy %{name}-stackless %endif # run_selftests # Because there's a bunch of binary subpackages and creating -# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that +# /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that # is just confusing for the user. %global _docdir_fmt %{name} %files libs -%license LICENSE %doc README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python +%license %{pypyprefix}/LICENSE %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib_pypy/ +%license %{pypyprefix}/lib_pypy/*/LICENSE %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy3trace-mode.el @@ -847,7 +847,6 @@ CheckPyPy %{name}-stackless %endif %files -%license LICENSE %doc README.rst %{_bindir}/pypy3 %{_bindir}/pypy%{pyversion} @@ -862,7 +861,6 @@ CheckPyPy %{name}-stackless %if 0%{with_stackless} %files stackless -%license LICENSE %doc README.rst %{_bindir}/pypy-stackless %endif commit cac755a96a589f8c15a50ed6ac9d121e336de51c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 24 10:29:13 2019 +0200 Update to 7.1.1, pypy3 is now Python 3.6
https://bugzilla.redhat.com/show_bug.cgi?id=1689198
diff --git a/.gitignore b/.gitignore index 1361620..910808c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /pypy3-v5.10.1-src.tar.bz2 /pypy3-v6.0.0-src.tar.bz2 /pypy3.5-v7.0.0-src.tar.bz2 +/pypy3.6-v7.1.1-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index f96d232..9d7165d 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -4,60 +4,6 @@ Date: Wed Mar 29 04:31:55 2017 +0200 011-no-faulthandler.patch -diff --git a/lib-python/3/test/regrtest.py b/lib-python/3/test/regrtest.py -index c1d85f6..3d3072c 100755 ---- a/lib-python/3/test/regrtest.py -+++ b/lib-python/3/test/regrtest.py -@@ -124,7 +124,6 @@ import importlib - - import argparse - import builtins --import faulthandler - import io - import json - import locale -@@ -152,7 +151,10 @@ try: - import _multiprocessing, multiprocessing.process - except ImportError: - multiprocessing = None -- -+try: -+ import faulthandler -+except ImportError: -+ faulthandler = None - - # Some times __path__ and __file__ are not absolute (e.g. while running from - # Lib/) and, if we change the CWD to run the tests in a temporary dir, some -@@ -486,17 +488,18 @@ def main(tests=None, **kwargs): - directly to set the values that would normally be set by flags - on the command line. - """ -- # Display the Python traceback on fatal errors (e.g. segfault) -- faulthandler.enable(all_threads=True) -- -- # Display the Python traceback on SIGALRM or SIGUSR1 signal -- signals = [] -- if hasattr(signal, 'SIGALRM'): -- signals.append(signal.SIGALRM) -- if hasattr(signal, 'SIGUSR1'): -- signals.append(signal.SIGUSR1) -- for signum in signals: -- faulthandler.register(signum, chain=True) -+ if faulthandler: -+ # Display the Python traceback on fatal errors (e.g. segfault) -+ faulthandler.enable(all_threads=True) -+ -+ # Display the Python traceback on SIGALRM or SIGUSR1 signal -+ signals = [] -+ if hasattr(signal, 'SIGALRM'): -+ signals.append(signal.SIGALRM) -+ if hasattr(signal, 'SIGUSR1'): -+ signals.append(signal.SIGUSR1) -+ for signum in signals: -+ faulthandler.register(signum, chain=True) - - replace_stdout() - diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py index 5d7f308..4424637 100644 --- a/lib-python/3/test/support/__init__.py diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 2caefe2..eb8b10e 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,5 +1,5 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 25c5567..6d8d09c 100644 +index 9f5d151..8b81155 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py @@ -1,16 +1,27 @@ @@ -31,9 +31,9 @@ index 25c5567..6d8d09c 100644 + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - # pip currently requires ssl support, so we try to provide a nicer - # error message when that is missing (
http://bugs.python.org/issue19744
) -@@ -37,8 +48,13 @@ def _run_pip(args, additional_paths=None): + _PROJECTS = [ + ("setuptools", _SETUPTOOLS_VERSION), +@@ -24,8 +35,13 @@ def _run_pip(args, additional_paths=None): sys.path = additional_paths + sys.path # Install the bundled software @@ -49,7 +49,7 @@ index 25c5567..6d8d09c 100644 def version(): -@@ -93,12 +109,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, +@@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) diff --git a/pypy3.spec b/pypy3.spec index 201a8ac..1f45c89 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.0 +%global basever 7.1 Name: pypy3 -Version: %{basever}.0 -%global pyversion 3.5 -Release: 2%{?dist} +Version: %{basever}.1 +%global pyversion 3.6 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -134,8 +134,7 @@ ExcludeArch: aarch64 %{power64} # Turn off the brp-python-bytecompile postprocessing script # We manually invoke it later on, using the freshly built pypy binary -%global __os_install_post \ - %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%global __brp_python_bytecompile %{nil} # Source and patches: Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
@@ -321,13 +320,6 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git -# While this is 7.0.0, it has 7.1.0-alpha0 listed inside -# We sed it out to avoid user confusion -sed -i 's/7\.1\.0/7.0.0/' pypy/doc/conf.py -sed -i 's/7\.1\.0-alpha0/7.0.0/g' pypy/module/cpyext/include/patchlevel.h pypy/doc/how-to-release.rst -sed -i 's/0x07010000/0x07000000/' pypy/module/cpyext/include/patchlevel.h -sed -i 's/7, 1, 0, "alpha"/7, 0, 0, "final"/' pypy/module/sys/version.py - %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} @@ -737,7 +729,7 @@ CheckPyPy() { # Use regrtest to explicitly list all tests: ( ./$ExeName -c \ - "from test.regrtest import findtests; print('\n'.join(findtests()))" + "from test.libregrtest.runtest import findtests; print('\n'.join(findtests()))" ) > testnames.txt # Skip some tests: @@ -877,6 +869,10 @@ CheckPyPy %{name}-stackless %changelog +* Fri May 24 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.1.1-1 +- Update to 7.1.1 (#1689198) +- pypy3 is now Python 3.6 + * Thu May 16 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-2 - Show the version as 7.0.0 diff --git a/sources b/sources index 294934f..aa4e777 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.5-v7.0.0-src.tar.bz2) = 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2 +SHA512 (pypy3.6-v7.1.1-src.tar.bz2) = 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473 diff --git a/tests/tests.yml b/tests/tests.yml index ce6f13f..c3a91f3 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.5 ./venv.sh + run: PYTHON=pypy3 VERSION=3.6 ./venv.sh required_packages: - gcc - python3-tox commit 3e4b7200d351e351effedb134c8a2adaab71201e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 17 00:56:47 2019 +0200 Show the version as 7.0.0 While this is 7.0.0, it has 7.1.0-alpha0 listed inside, we sed it out to avoid user confusion. diff --git a/pypy3.spec b/pypy3.spec index 6c452df..201a8ac 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -321,6 +321,14 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +# While this is 7.0.0, it has 7.1.0-alpha0 listed inside +# We sed it out to avoid user confusion +sed -i 's/7\.1\.0/7.0.0/' pypy/doc/conf.py +sed -i 's/7\.1\.0-alpha0/7.0.0/g' pypy/module/cpyext/include/patchlevel.h pypy/doc/how-to-release.rst +sed -i 's/0x07010000/0x07000000/' pypy/module/cpyext/include/patchlevel.h +sed -i 's/7, 1, 0, "alpha"/7, 0, 0, "final"/' pypy/module/sys/version.py + + %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl @@ -869,6 +877,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu May 16 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-2 +- Show the version as 7.0.0 + * Thu Feb 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-1 - Update to 7.0.0 (#1673127) commit 124d766f70858e217aac1b9c297c4c313ccf95df Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Mar 1 00:06:59 2019 +0100 Update to 7.0.0 (#1673127) diff --git a/.gitignore b/.gitignore index 2025c8c..1361620 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /pypy3-v5.10.0-src.tar.bz2 /pypy3-v5.10.1-src.tar.bz2 /pypy3-v6.0.0-src.tar.bz2 +/pypy3.5-v7.0.0-src.tar.bz2 diff --git a/009-add-libxcrypt-support.patch b/009-add-libxcrypt-support.patch index ec17216..f3c9a7d 100644 --- a/009-add-libxcrypt-support.patch +++ b/009-add-libxcrypt-support.patch @@ -1,13 +1,13 @@ diff --git a/pypy/module/crypt/interp_crypt.py b/pypy/module/crypt/interp_crypt.py -index d227b6a..da969e6 100644 +index bd13f6f..1022c9e 100644 --- a/pypy/module/crypt/interp_crypt.py +++ b/pypy/module/crypt/interp_crypt.py -@@ -6,7 +6,7 @@ import sys - if sys.platform.startswith('darwin'): - eci = ExternalCompilationInfo() +@@ -9,7 +9,7 @@ elif sys.platform.startswith('linux'): + # crypt() is defined only in crypt.h on some Linux variants (eg. Fedora 28) + eci = ExternalCompilationInfo(libraries=['crypt'], includes=["crypt.h"]) else: - eci = ExternalCompilationInfo(libraries=['crypt']) + eci = ExternalCompilationInfo(libraries=['crypt'], includes=['crypt.h']) c_crypt = rffi.llexternal('crypt', [rffi.CCHARP, rffi.CCHARP], rffi.CCHARP, compilation_info=eci, releasegil=False) - + diff --git a/302-fix-multiprocessing-regression-on-newer-glibcs.patch b/302-fix-multiprocessing-regression-on-newer-glibcs.patch deleted file mode 100644 index db723a8..0000000 --- a/302-fix-multiprocessing-regression-on-newer-glibcs.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User Miro Hrončok <miro(a)hroncok.cz> -# Date 1524655710 -7200 -# Wed Apr 25 13:28:30 2018 +0200 -# Branch issue33329 -# Node ID 6501fdc3a80fa2bc3b8c70bfaf94a31c3b3432c0 -# Parent a07f07034d281bec8c776f9e1ee7c5b9aea74007 -Fix multiprocessing regression on newer glibcs - -Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some -reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom -is commonly used to select all signals for blocking with `pthread_sigmask`. -So we ignore the sigaddset() return value until we expose sigfillset() -to provide a better idiom. - -Co-authored-by: Antoine Pitrou <antoine(a)python.org> - -diff -r a07f07034d28 -r 6501fdc3a80f pypy/module/signal/interp_signal.py ---- a/pypy/module/signal/interp_signal.py Tue Apr 24 10:00:00 2018 +0200 -+++ b/pypy/module/signal/interp_signal.py Wed Apr 25 13:28:30 2018 +0200 -@@ -379,10 +379,10 @@ - for w_signum in space.unpackiterable(self.w_signals): - signum = space.int_w(w_signum) - check_signum_in_range(space, signum) -- err = c_sigaddset(self.mask, signum) -- if err: -- raise oefmt(space.w_ValueError, -- "signal number %d out of range", signum) -+ # bpo-33329: ignore c_sigaddset() return value as it can fail -+ # for some reserved signals, but we want the `range(1, NSIG)` -+ # idiom to allow selecting all valid signals. -+ c_sigaddset(self.mask, signum) - return self.mask - - def __exit__(self, *args): diff --git a/pypy3.spec b/pypy3.spec index 00494e3..6c452df 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 6.0 +%global basever 7.0 Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 5%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -138,7 +138,7 @@ ExcludeArch: aarch64 %{power64} %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-v%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -174,12 +174,6 @@ Patch11: 011-no-faulthandler.patch # We conditionally apply this, but we use autosetup, so we use Source here Source189: 189-use-rpm-wheels.patch -# Fix multiprocessing regression on newer glibcs -# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
-# and:
https://bugs.python.org/issue33329
-# and:
https://bitbucket.org/pypy/pypy/pull-requests/607
-Patch302: 302-fix-multiprocessing-regression-on-newer-glibcs.patch - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -224,18 +218,13 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel +BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif -%if 0%{?fedora} >= 26 -BuildRequires: compat-openssl10-devel -%else -BuildRequires: openssl-devel -%endif - %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -266,6 +255,8 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} +Provides: pypy%{pyversion} = %{version}-%{release} +Provides: pypy%{pyversion}%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -289,6 +280,9 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +Provides: pypy%{pyversion}-libs = %{version}-%{release} +Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} + %if %{with rpmwheels} Requires: python-setuptools-wheel Requires: python-pip-wheel @@ -305,6 +299,9 @@ Libraries required by the various PyPy implementations of Python 3. Summary: Development tools for working with PyPy3 Requires: pypy3%{?_isa} = %{version}-%{release} +Provides: pypy%{pyversion}-devel = %{version}-%{release} +Provides: pypy%{pyversion}-devel%{?_isa} = %{version}-%{release} + %description devel Header files for building C extension modules against PyPy3 @@ -313,12 +310,16 @@ Header files for building C extension modules against PyPy3 %package stackless Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} + +Provides: pypy%{pyversion}-stackless = %{version}-%{release} +Provides: pypy%{pyversion}-stackless%{?_isa} = %{version}-%{release} + %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-v%{version}-src -p1 -S git +%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} @@ -868,6 +869,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Feb 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-1 +- Update to 7.0.0 (#1673127) + * Sat Feb 02 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
diff --git a/sources b/sources index 2a76651..294934f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v6.0.0-src.tar.bz2) = ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e +SHA512 (pypy3.5-v7.0.0-src.tar.bz2) = 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2 commit 9d9b0859329520bcb7159023c03f12d2807d39da Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Feb 2 05:16:48 2019 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 5f5203b..00494e3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -868,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Feb 02 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+ * Mon Jan 14 2019 Björn Esser <besser82(a)fedoraproject.org> - 6.0.0-4 - Rebuilt for libcrypt.so.2 (#1666033) commit f8cbccf6e2a244ea2a453c8913e7e1afa23819e8 Author: Björn Esser <besser82(a)fedoraproject.org> Date: Mon Jan 14 19:14:13 2019 +0100 Rebuilt for libcrypt.so.2 (#1666033) diff --git a/pypy3.spec b/pypy3.spec index 7fc7257..5f5203b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -868,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Mon Jan 14 2019 Björn Esser <besser82(a)fedoraproject.org> - 6.0.0-4 +- Rebuilt for libcrypt.so.2 (#1666033) + * Tue Aug 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-3 - Use RPM packaged wheels commit e0becb7cbf6a7549fab9d9a40299888ceae794fe Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 20 12:37:22 2018 +0200 Enable basic venv smoke test in the CI diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ce6f13f --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,17 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "
https://src.fedoraproject.org/tests/python.git
" + dest: "python" + tests: + - smoke: + dir: python/smoke + run: PYTHON=pypy3 VERSION=3.5 ./venv.sh + required_packages: + - gcc + - python3-tox + - pypy3-devel commit 6f8b7baed90a92dcbd3bed71bf98fa1c073bec3a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Aug 21 12:10:46 2018 +0200 Use RPM packaged wheels diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch new file mode 100644 index 0000000..2caefe2 --- /dev/null +++ b/189-use-rpm-wheels.patch @@ -0,0 +1,67 @@ +diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py +index 25c5567..6d8d09c 100644 +--- a/lib-python/3/ensurepip/__init__.py ++++ b/lib-python/3/ensurepip/__init__.py +@@ -1,16 +1,27 @@ ++import distutils.version ++import glob + import os + import os.path +-import pkgutil + import sys + import tempfile + + + __all__ = ["version", "bootstrap"] + ++_WHEEL_DIR = "/usr/share/python-wheels/" + +-_SETUPTOOLS_VERSION = "28.8.0" + +-_PIP_VERSION = "9.0.1" ++def _get_most_recent_wheel_version(pkg): ++ prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) ++ suffix = "-py2.py3-none-any.whl" ++ pattern = "{}*{}".format(prefix, suffix) ++ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern)) ++ return str(max(versions, key=distutils.version.LooseVersion)) ++ ++ ++_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") ++ ++_PIP_VERSION = _get_most_recent_wheel_version("pip") + + # pip currently requires ssl support, so we try to provide a nicer + # error message when that is missing (
http://bugs.python.org/issue19744
) +@@ -37,8 +48,13 @@ def _run_pip(args, additional_paths=None): + sys.path = additional_paths + sys.path + + # Install the bundled software +- import pip +- pip.main(args) ++ try: ++ # pip 10 ++ from pip._internal import main ++ except ImportError: ++ # pip 9 ++ from pip import main ++ main(args) + + + def version(): +@@ -93,12 +109,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, + additional_paths = [] + for project, version in _PROJECTS: + wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) +- whl = pkgutil.get_data( +- "ensurepip", +- "_bundled/{}".format(wheel_name), +- ) +- with open(os.path.join(tmpdir, wheel_name), "wb") as fp: +- fp.write(whl) ++ with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: ++ with open(os.path.join(tmpdir, wheel_name), "wb") as fp: ++ fp.write(sfp.read()) + + additional_paths.append(os.path.join(tmpdir, wheel_name)) + diff --git a/pypy3.spec b/pypy3.spec index 7193654..7fc7257 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -18,6 +18,10 @@ ExcludeArch: aarch64 %{power64} # High-level configuration of the build: +# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package +# Uses upstream bundled prebuilt wheels otherwise +%bcond_without rpmwheels + # PyPy consists of an implementation of an interpreter (with JIT compilation) # for the full Python language written in a high-level language, leaving many # of the implementation details as "pluggable" policies. @@ -165,6 +169,11 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +# Instead of bundled wheels, use our RPM packaged wheels from +# /usr/share/python-wheels +# We conditionally apply this, but we use autosetup, so we use Source here +Source189: 189-use-rpm-wheels.patch + # Fix multiprocessing regression on newer glibcs # See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
# and:
https://bugs.python.org/issue33329
@@ -249,6 +258,11 @@ BuildRequires: emacs # For %%autosetup -S git BuildRequires: %{_bindir}/git +%if %{with rpmwheels} +BuildRequires: python-setuptools-wheel +BuildRequires: python-pip-wheel +%endif + # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} @@ -275,6 +289,14 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +%if %{with rpmwheels} +Requires: python-setuptools-wheel +Requires: python-pip-wheel +%else +Provides: bundled(python3-pip) = 9.0.1 +Provides: bundled(python3-setuptools) = 28.8.0 +%endif + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -298,6 +320,17 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy3-v%{version}-src -p1 -S git +%if %{with rpmwheels} +%apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} +rm lib-python/3/ensurepip/_bundled/*.whl +rmdir lib-python/3/ensurepip/_bundled +%else +# we don't want to ship the old ones anyway +rm lib-python/3/ensurepip/_bundled/pip-8.1.2-* +rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-* +%endif + + # Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2: find -name "*.py" -exec \ sed \ @@ -835,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Aug 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-3 +- Use RPM packaged wheels + * Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
commit 9d0ffbc9d5d861af1635230e55a86c7bc77438b7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Aug 21 11:48:21 2018 +0200 Poor ppc64(le), it just doesn't build :( diff --git a/pypy3.spec b/pypy3.spec index ccbd579..7193654 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,8 +12,9 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# Not available yet -ExcludeArch: aarch64 +# aarch64: Not available yet +# ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
+ExcludeArch: aarch64 %{power64} # High-level configuration of the build: commit e47185bc51db6ff0d04546479b77bdfe84b586c2 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Jul 15 16:25:45 2018 +0200 Drop RHEL5 conditional diff --git a/pypy3.spec b/pypy3.spec index 2e1edb6..ccbd579 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -104,7 +104,7 @@ ExcludeArch: aarch64 %global with_stackless 0 # Should we build the emacs JIT-viewing mode? -%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%if 0%{?rhel} == 6 %global with_emacs 0 %else %global with_emacs 1 commit 3f667ce3366f6971e86aa07783bbc2a370043c5a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Jul 15 16:23:25 2018 +0200 BR gcc diff --git a/pypy3.spec b/pypy3.spec index fb1ac73..2e1edb6 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -202,6 +202,8 @@ BuildRequires: python2-pycparser %endif +BuildRequires: gcc + BuildRequires: libffi-devel BuildRequires: tcl-devel BuildRequires: tk-devel commit f7ac519b1ef348af1d5b57d089f2d7b2109388f6 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 13 23:12:32 2018 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index b1add4a..fb1ac73 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -832,6 +832,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+ * Wed Apr 25 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-1 - Fix failing taskotron check - New release 6.0.0 (#1571489) commit 18c888e5f5972bd6391a59f77794b317c359cec1 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 25 14:20:20 2018 +0200 New release 6.0.0 (#1571489) Fix multiprocessing regression on newer glibcs (#1569933) diff --git a/.gitignore b/.gitignore index 67b6ee0..2025c8c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /pypy3-v5.9.0-src.tar.bz2 /pypy3-v5.10.0-src.tar.bz2 /pypy3-v5.10.1-src.tar.bz2 +/pypy3-v6.0.0-src.tar.bz2 diff --git a/302-fix-multiprocessing-regression-on-newer-glibcs.patch b/302-fix-multiprocessing-regression-on-newer-glibcs.patch new file mode 100644 index 0000000..db723a8 --- /dev/null +++ b/302-fix-multiprocessing-regression-on-newer-glibcs.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Miro Hrončok <miro(a)hroncok.cz> +# Date 1524655710 -7200 +# Wed Apr 25 13:28:30 2018 +0200 +# Branch issue33329 +# Node ID 6501fdc3a80fa2bc3b8c70bfaf94a31c3b3432c0 +# Parent a07f07034d281bec8c776f9e1ee7c5b9aea74007 +Fix multiprocessing regression on newer glibcs + +Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some +reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom +is commonly used to select all signals for blocking with `pthread_sigmask`. +So we ignore the sigaddset() return value until we expose sigfillset() +to provide a better idiom. + +Co-authored-by: Antoine Pitrou <antoine(a)python.org> + +diff -r a07f07034d28 -r 6501fdc3a80f pypy/module/signal/interp_signal.py +--- a/pypy/module/signal/interp_signal.py Tue Apr 24 10:00:00 2018 +0200 ++++ b/pypy/module/signal/interp_signal.py Wed Apr 25 13:28:30 2018 +0200 +@@ -379,10 +379,10 @@ + for w_signum in space.unpackiterable(self.w_signals): + signum = space.int_w(w_signum) + check_signum_in_range(space, signum) +- err = c_sigaddset(self.mask, signum) +- if err: +- raise oefmt(space.w_ValueError, +- "signal number %d out of range", signum) ++ # bpo-33329: ignore c_sigaddset() return value as it can fail ++ # for some reserved signals, but we want the `range(1, NSIG)` ++ # idiom to allow selecting all valid signals. ++ c_sigaddset(self.mask, signum) + return self.mask + + def __exit__(self, *args): diff --git a/pypy3.spec b/pypy3.spec index a14b96d..b1add4a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 5.10 +%global basever 6.0 Name: pypy3 -Version: %{basever}.1 +Version: %{basever}.0 %global pyversion 3.5 -Release: 8%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -164,6 +164,12 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +# Fix multiprocessing regression on newer glibcs +# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
+# and:
https://bugs.python.org/issue33329
+# and:
https://bitbucket.org/pypy/pypy/pull-requests/607
+Patch302: 302-fix-multiprocessing-regression-on-newer-glibcs.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -826,8 +832,10 @@ CheckPyPy %{name}-stackless %changelog -* Sat Apr 14 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-8 +* Wed Apr 25 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-1 - Fix failing taskotron check +- New release 6.0.0 (#1571489) +- Fix multiprocessing regression on newer glibcs (#1569933) * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 - Provide pypy3(abi) = 5.10 diff --git a/sources b/sources index afb3c83..2a76651 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.10.1-src.tar.bz2) = 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5 +SHA512 (pypy3-v6.0.0-src.tar.bz2) = ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e commit b70eb98951063c00fb114a91f935d8991ca0e927 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Apr 15 00:25:48 2018 +0200 Remove Windows bat file diff --git a/pypy3.spec b/pypy3.spec index 0aa26f8..a14b96d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -309,6 +309,9 @@ find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ "{}" \ \; +# Not needed on Linux +rm lib-python/3/idlelib/idle.bat + %ifarch %{ix86} x86_64 %{arm} sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif commit 1b41795b2f455df4a5773c050253c26279595ba7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Apr 14 10:55:05 2018 +0200 Fix shebangs (reported mangled by taskotron) diff --git a/pypy3.spec b/pypy3.spec index bf093ac..0aa26f8 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -185,14 +185,14 @@ Patch11: 011-no-faulthandler.patch # pypy3 can only be build with pypy2 BuildRequires: pypy2 # no pypy-pycparser available ATM -%global bootstrap_python_interp pypy +%global bootstrap_python_interp pypy2 %else # pypy3 can only be build with python2 BuildRequires: python2-devel BuildRequires: python2-pycparser -%global bootstrap_python_interp python +%global bootstrap_python_interp python2 %endif @@ -289,10 +289,10 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy3-v%{version}-src -p1 -S git -# Replace /usr/local/bin/python shebangs with /usr/bin/python: +# Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2: find -name "*.py" -exec \ sed \ - -i -e "s|/usr/local/bin/python|/usr/bin/python|" \ + -i -r -e "s@/usr/(local/)?bin/(env )?python(2|3)?@/usr/bin/%{bootstrap_python_interp}@" \ "{}" \ \; @@ -303,9 +303,9 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done -# Replace all lib-python python shebangs with pypy -find lib-python/%{pylibver} -name "*.py" -exec \ - sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \ +# Replace all lib-python and lib_pypy python shebangs with pypy3 (those will be shipped with pypy3-libs) +find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ + sed -r -i '1s@^#!\s*/usr/bin.*(python|pypy).*@#!/usr/bin/%{name}@' \ "{}" \ \; @@ -823,6 +823,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Apr 14 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-8 +- Fix failing taskotron check + * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 - Provide pypy3(abi) = 5.10 commit cac18deee0e00c9ee8b4fce8d4507796a1561298 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Apr 12 00:23:12 2018 +0200 Provide pypy3(abi) = 5.10 diff --git a/pypy3.spec b/pypy3.spec index 196243f..bf093ac 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -241,7 +241,8 @@ BuildRequires: emacs BuildRequires: %{_bindir}/git # Metadata for the core package (the JIT build): -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Provides: %{name}(abi) = %{basever} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -822,6 +823,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 +- Provide pypy3(abi) = 5.10 + * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-6 - RPM macros improvements commit fe844b70bdc354e3d454bb43ed578f3b4898bac7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 11 12:09:36 2018 +0200 Add macro with pypy version (aka 5.10, not 3.5) diff --git a/macros.pypy3 b/macros.pypy3 index 796b872..f138a39 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -2,3 +2,4 @@ %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3_pypy_version %(%{__pypy3} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))") diff --git a/pypy3.spec b/pypy3.spec index 958f998..196243f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -822,6 +822,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-6 +- RPM macros improvements + * Tue Apr 10 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-5 - Remove the rightmost version number from the path - rhbz#1516885:
https://bugzilla.redhat.com/show_bug.cgi?id=1516885
commit df12619f2b234a4f954e7e043fdac5d0f4701d7b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 11 12:06:37 2018 +0200 Remove %pypy3dir definition, it is useless diff --git a/macros.pypy3 b/macros.pypy3 index ef1f600..796b872 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -2,4 +2,3 @@ %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") -%pypy3dir %{_builddir}/pypy3-%{name}-%{version}-%{release} commit cf5da9288bd0e56d5b0e203cee650cc39f2e3e85 Author: Michal Cyprian <m.cyprian(a)gmail.com> Date: Wed Apr 11 01:31:31 2018 +0200 Remove the rightmost version number from the path diff --git a/pypy3.spec b/pypy3.spec index 22092d4..958f998 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,8 @@ +%global basever 5.10 Name: pypy3 -Version: 5.10.1 +Version: %{basever}.1 %global pyversion 3.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -119,7 +120,7 @@ ExcludeArch: aarch64 # Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{version} +%global pypyprefix %{_libdir}/pypy3-%{basever} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -464,8 +465,8 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -# Run installing script, archive-name %{name}-%{version} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{version} --builddir %{buildroot}/%{_libdir} +# Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} # Remove shebang lines from .py files that aren't executable, and @@ -639,7 +640,7 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ +rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ %{buildroot}%{pypyprefix}/LICENSE \ %{buildroot}%{pypyprefix}/README.rst @@ -821,6 +822,10 @@ CheckPyPy %{name}-stackless %changelog +* Tue Apr 10 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-5 +- Remove the rightmost version number from the path +- rhbz#1516885:
https://bugzilla.redhat.com/show_bug.cgi?id=1516885
+ * Thu Mar 29 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-4 - Add patch for libxcrypt commit c54059a679944400a51e891b164e564befa14cbb Author: Michal Cyprian <m.cyprian(a)gmail.com> Date: Thu Mar 29 21:24:14 2018 +0200 Add patch for libxcrypt diff --git a/009-add-libxcrypt-support.patch b/009-add-libxcrypt-support.patch new file mode 100644 index 0000000..ec17216 --- /dev/null +++ b/009-add-libxcrypt-support.patch @@ -0,0 +1,13 @@ +diff --git a/pypy/module/crypt/interp_crypt.py b/pypy/module/crypt/interp_crypt.py +index d227b6a..da969e6 100644 +--- a/pypy/module/crypt/interp_crypt.py ++++ b/pypy/module/crypt/interp_crypt.py +@@ -6,7 +6,7 @@ import sys + if sys.platform.startswith('darwin'): + eci = ExternalCompilationInfo() + else: +- eci = ExternalCompilationInfo(libraries=['crypt']) ++ eci = ExternalCompilationInfo(libraries=['crypt'], includes=['crypt.h']) + c_crypt = rffi.llexternal('crypt', [rffi.CCHARP, rffi.CCHARP], rffi.CCHARP, + compilation_info=eci, releasegil=False) + diff --git a/pypy3.spec b/pypy3.spec index 2ed9d59..22092d4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -155,6 +155,11 @@ Patch6: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch7: 007-remove-startup-message.patch +# Glibc's libcrypt was replaced with libxcrypt in f28, crypt.h header has +# to be added to privent compilation error. +#
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
+Patch9: 009-add-libxcrypt-support.patch + # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch @@ -816,6 +821,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Mar 29 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-4 +- Add patch for libxcrypt + * Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.10.1-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
commit 664896a6c60437d635c7b940c30ec541d0e94f87 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Feb 9 06:17:45 2018 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 5a9fcba..2ed9d59 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -816,6 +816,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.10.1-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+ * Sat Jan 20 2018 Björn Esser <besser82(a)fedoraproject.org> - 5.10.1-2 - Rebuilt for switch to libxcrypt commit 43f3327530097638befd17ecc0d7054493cc45b9 Author: Björn Esser <besser82(a)fedoraproject.org> Date: Sat Jan 20 23:07:39 2018 +0100 Rebuilt for switch to libxcrypt diff --git a/pypy3.spec b/pypy3.spec index 76aed7c..5a9fcba 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -816,6 +816,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Jan 20 2018 Björn Esser <besser82(a)fedoraproject.org> - 5.10.1-2 +- Rebuilt for switch to libxcrypt + * Fri Jan 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-1 - Update to 5.10.1 (#1533689) - Removed two upstreamed patches commit 8b06f1af625208abd6fd0fa5817f8df53e824916 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jan 19 16:19:55 2018 +0100 Only BR /usr/bin/git, it should be enough for autosetup diff --git a/pypy3.spec b/pypy3.spec index db72cad..76aed7c 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -232,7 +232,7 @@ BuildRequires: emacs %endif # For %%autosetup -S git -BuildRequires: git +BuildRequires: %{_bindir}/git # Metadata for the core package (the JIT build): Requires: pypy3-libs%{?_isa} = %{version}-%{release} commit 93cd7d04ccff833ff161ec02c1fbfb2d940fca9e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jan 12 10:01:38 2018 +0100 Update to 5.10.1 (#1533689) diff --git a/.gitignore b/.gitignore index 40caefb..67b6ee0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /pypy3-v5.7.0-src.tar.bz2 /pypy3-v5.9.0-src.tar.bz2 /pypy3-v5.10.0-src.tar.bz2 +/pypy3-v5.10.1-src.tar.bz2 diff --git a/012-time-sleep-i686-overflow.patch b/012-time-sleep-i686-overflow.patch deleted file mode 100644 index 7dc6cf3..0000000 --- a/012-time-sleep-i686-overflow.patch +++ /dev/null @@ -1,55 +0,0 @@ -# HG changeset patch -# User Ronan Lamy <ronan.lamy(a)gmail.com> -# Date 1514473067 -3600 -# Branch py3.5 -# Node ID f145d85043878194d7eee33b2049063843e032d8 -# Parent d7d2710e65359e1e8d69e82612cb96f2f3921de7 -Fix issue #2717 - -diff --git a/pypy/interpreter/test/test_timeutils.py b/pypy/interpreter/test/test_timeutils.py -new file mode 100644 -index 0000000..873b2b4 ---- /dev/null -+++ b/pypy/interpreter/test/test_timeutils.py -@@ -0,0 +1,13 @@ -+import pytest -+from rpython.rlib.rarithmetic import r_longlong -+from pypy.interpreter.error import OperationError -+from pypy.interpreter.timeutils import timestamp_w -+ -+def test_timestamp_w(space): -+ w_1_year = space.newint(365 * 24 * 3600) -+ result = timestamp_w(space, w_1_year) -+ assert isinstance(result, r_longlong) -+ assert result // 10 ** 9 == space.int_w(w_1_year) -+ w_millenium = space.mul(w_1_year, space.newint(1000)) -+ with pytest.raises(OperationError): # timestamps overflow after ~300 years -+ timestamp_w(space, w_millenium) -diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py -index 336426b..7918dc8 100644 ---- a/pypy/interpreter/timeutils.py -+++ b/pypy/interpreter/timeutils.py -@@ -3,7 +3,7 @@ Access to the time module's high-resolution monotonic clock - """ - import math - from rpython.rlib.rarithmetic import ( -- r_longlong, ovfcheck, ovfcheck_float_to_longlong) -+ r_longlong, ovfcheck_float_to_longlong) - from pypy.interpreter.error import oefmt - - SECS_TO_NS = 10 ** 9 -@@ -28,10 +28,10 @@ def timestamp_w(space, w_secs): - raise oefmt(space.w_OverflowError, - "timestamp %R too large to convert to C _PyTime_t", w_secs) - else: -- sec = space.int_w(w_secs) - try: -- result = ovfcheck(sec * SECS_TO_NS) -+ sec = space.bigint_w(w_secs).tolonglong() -+ result = sec * r_longlong(SECS_TO_NS) - except OverflowError: - raise oefmt(space.w_OverflowError, -- "timestamp too large to convert to C _PyTime_t") -- return r_longlong(result) -+ "timestamp %R too large to convert to C _PyTime_t", w_secs) -+ return result diff --git a/013-fix-typeerror.patch b/013-fix-typeerror.patch deleted file mode 100644 index 86b0650..0000000 --- a/013-fix-typeerror.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Miro Hrončok <miro(a)hroncok.cz> -# Date 1514415016 0 -# Branch hroncok/fix-typeerror-str-does-not-support-the-b-1514414905375 -# Node ID 0551d04959425ea4a8ff7e87a5d357d03936cde0 -# Parent a4194a67868fa916074416e96456d07d52b1a1a1 -Fix: TypeError: 'str' does not support the buffer interface - -Fixes
https://bitbucket.org/pypy/pypy/issues/2718
- -diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py ---- a/lib_pypy/pyrepl/unix_console.py -+++ b/lib_pypy/pyrepl/unix_console.py -@@ -500,7 +500,7 @@ - os.write(self.output_fd, fmt[:x]) - fmt = fmt[y:] - delay = int(m.group(1)) -- if '*' in m.group(2): -+ if b'*' in m.group(2): - delay *= self.height - if self._pad: - nchars = (bps*delay)/1000 diff --git a/pypy3.spec b/pypy3.spec index dc1aa8e..db72cad 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 -Version: 5.10.0 +Version: 5.10.1 %global pyversion 3.5 -Release: 3%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -158,12 +158,6 @@ Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch -#
https://bitbucket.org/pypy/pypy/issues/2717
-Patch12: 012-time-sleep-i686-overflow.patch - -#
https://bitbucket.org/pypy/pypy/issues/2718
-Patch13: 013-fix-typeerror.patch - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -822,6 +816,10 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jan 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-1 +- Update to 5.10.1 (#1533689) +- Removed two upstreamed patches + * Fri Dec 29 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-3 - Remove never used InstallPyPy function - Actually call execstack as originally intended diff --git a/sources b/sources index d9f03a4..afb3c83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.10.0-src.tar.bz2) = 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b +SHA512 (pypy3-v5.10.1-src.tar.bz2) = 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5 commit 82dcbae2321eac8b49b7e987dfe170bdd2e19c56 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 29 19:50:56 2017 +0100 On power, use cpython2 to build pypy3 diff --git a/pypy3.spec b/pypy3.spec index 50ecfc0..dc1aa8e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -171,10 +171,16 @@ Patch13: 013-fix-typeerror.patch # # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: - # Note, pypy3 is built with pypy2, so no dependency cycle +%ifarch %{power64} +# the build is unreliable with pypy+power, getting random failures +# so better have a bit slower build than having to build until it pass +%global use_self_when_building 0 +%else %global use_self_when_building 1 +%endif + %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 @@ -821,6 +827,7 @@ CheckPyPy %{name}-stackless - Actually call execstack as originally intended - Use execstack on all arches (it's available now) - Don't ship the debug binaries +- On power, use cpython2 to build pypy3 * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) commit 720aa9bae8b7478b99bcb277238fcae6cca364d9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 29 14:12:06 2017 +0100 Remove the debug builds (the package was ~350 MB) Also: - Remove never used InstallPyPy function - Actually call execstack as originally intended - Use execstack on all arches (it's available now) diff --git a/pypy3.spec b/pypy3.spec index 218ec39..50ecfc0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.0 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -224,10 +224,7 @@ BuildRequires: /usr/bin/free BuildRequires: perl-interpreter %endif -# No prelink on these arches -%ifnarch aarch64 ppc64le BuildRequires: /usr/bin/execstack -%endif # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -458,39 +455,6 @@ BuildPyPy \ %install -# Install the various executables: - -InstallPyPy() { - ExeName=$1 - - # To ensure compatibility with virtualenv, pypy finds its libraries - # relative to itself; this happens within - # pypy/translator/goal/app_main.py:get_library_path - # which calls sys.pypy_initial_path(dirname) on the dir containing - # the executable, with symlinks resolved. - # - # Hence we make /usr/bin/pypy be a symlink to the real binary, which we - # place within /usr/lib[64]/pypy-1.* as pypy - # - # This ought to enable our pypy build to work with virtualenv - # (rhbz#742641) - install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{pypyprefix}/$ExeName - ln -s %{pypyprefix}/$ExeName %{buildroot}/%{_bindir} - - # The generated machine code doesn't need an executable stack, but - # one of the assembler files (gcmaptable.s) doesn't have the necessary - # metadata to inform gcc of that, and thus gcc pessimistically assumes - # that the built binary does need an executable stack. - # - # Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
- # - # I tried various approaches involving fixing the build, but the simplest - # approach is to postprocess the ELF file: -%ifnarch aarch64 ppc64le - execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName -%endif -} - mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} @@ -517,6 +481,17 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages +# The generated machine code doesn't need an executable stack, but +# one of the assembler files (gcmaptable.s) doesn't have the necessary +# metadata to inform gcc of that, and thus gcc pessimistically assumes +# that the built binary does need an executable stack. +# +# Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
+# +# I tried various approaches involving fixing the build, but the simplest +# approach is to postprocess the ELF file: +execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 + ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 @@ -666,6 +641,12 @@ rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : +# since 5.10.0, the debug binaries are built and shipped, making the +# pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why +rm -f %{buildroot}%{pypyprefix}/bin/pypy3.debug +rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug + + %check topdir=$(pwd) @@ -835,6 +816,12 @@ CheckPyPy %{name}-stackless %changelog +* Fri Dec 29 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-3 +- Remove never used InstallPyPy function +- Actually call execstack as originally intended +- Use execstack on all arches (it's available now) +- Don't ship the debug binaries + * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) - Use pypy2 when building (it's faster and works this time) commit 9c955b3defcb09be770be0be46c3761fc0185d0b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Dec 28 17:47:00 2017 +0100 Use pypy2 when building (it's faster and works this time) diff --git a/pypy3.spec b/pypy3.spec index dc8c53d..218ec39 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -174,7 +174,7 @@ Patch13: 013-fix-typeerror.patch # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 0 +%global use_self_when_building 1 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 @@ -837,6 +837,7 @@ CheckPyPy %{name}-stackless %changelog * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) +- Use pypy2 when building (it's faster and works this time) * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) commit e858e84bf97e61dd4d1a72466862ac6cb8e57296 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Dec 28 17:45:36 2017 +0100 Fixed upstream issues #2717 and #2718 (re-enable test_socket) diff --git a/012-time-sleep-i686-overflow.patch b/012-time-sleep-i686-overflow.patch new file mode 100644 index 0000000..7dc6cf3 --- /dev/null +++ b/012-time-sleep-i686-overflow.patch @@ -0,0 +1,55 @@ +# HG changeset patch +# User Ronan Lamy <ronan.lamy(a)gmail.com> +# Date 1514473067 -3600 +# Branch py3.5 +# Node ID f145d85043878194d7eee33b2049063843e032d8 +# Parent d7d2710e65359e1e8d69e82612cb96f2f3921de7 +Fix issue #2717 + +diff --git a/pypy/interpreter/test/test_timeutils.py b/pypy/interpreter/test/test_timeutils.py +new file mode 100644 +index 0000000..873b2b4 +--- /dev/null ++++ b/pypy/interpreter/test/test_timeutils.py +@@ -0,0 +1,13 @@ ++import pytest ++from rpython.rlib.rarithmetic import r_longlong ++from pypy.interpreter.error import OperationError ++from pypy.interpreter.timeutils import timestamp_w ++ ++def test_timestamp_w(space): ++ w_1_year = space.newint(365 * 24 * 3600) ++ result = timestamp_w(space, w_1_year) ++ assert isinstance(result, r_longlong) ++ assert result // 10 ** 9 == space.int_w(w_1_year) ++ w_millenium = space.mul(w_1_year, space.newint(1000)) ++ with pytest.raises(OperationError): # timestamps overflow after ~300 years ++ timestamp_w(space, w_millenium) +diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py +index 336426b..7918dc8 100644 +--- a/pypy/interpreter/timeutils.py ++++ b/pypy/interpreter/timeutils.py +@@ -3,7 +3,7 @@ Access to the time module's high-resolution monotonic clock + """ + import math + from rpython.rlib.rarithmetic import ( +- r_longlong, ovfcheck, ovfcheck_float_to_longlong) ++ r_longlong, ovfcheck_float_to_longlong) + from pypy.interpreter.error import oefmt + + SECS_TO_NS = 10 ** 9 +@@ -28,10 +28,10 @@ def timestamp_w(space, w_secs): + raise oefmt(space.w_OverflowError, + "timestamp %R too large to convert to C _PyTime_t", w_secs) + else: +- sec = space.int_w(w_secs) + try: +- result = ovfcheck(sec * SECS_TO_NS) ++ sec = space.bigint_w(w_secs).tolonglong() ++ result = sec * r_longlong(SECS_TO_NS) + except OverflowError: + raise oefmt(space.w_OverflowError, +- "timestamp too large to convert to C _PyTime_t") +- return r_longlong(result) ++ "timestamp %R too large to convert to C _PyTime_t", w_secs) ++ return result diff --git a/013-fix-typeerror.patch b/013-fix-typeerror.patch new file mode 100644 index 0000000..86b0650 --- /dev/null +++ b/013-fix-typeerror.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Miro Hrončok <miro(a)hroncok.cz> +# Date 1514415016 0 +# Branch hroncok/fix-typeerror-str-does-not-support-the-b-1514414905375 +# Node ID 0551d04959425ea4a8ff7e87a5d357d03936cde0 +# Parent a4194a67868fa916074416e96456d07d52b1a1a1 +Fix: TypeError: 'str' does not support the buffer interface + +Fixes
https://bitbucket.org/pypy/pypy/issues/2718
+ +diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py +--- a/lib_pypy/pyrepl/unix_console.py ++++ b/lib_pypy/pyrepl/unix_console.py +@@ -500,7 +500,7 @@ + os.write(self.output_fd, fmt[:x]) + fmt = fmt[y:] + delay = int(m.group(1)) +- if '*' in m.group(2): ++ if b'*' in m.group(2): + delay *= self.height + if self._pad: + nchars = (bps*delay)/1000 diff --git a/pypy3.spec b/pypy3.spec index 6843000..dc8c53d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -158,6 +158,12 @@ Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +#
https://bitbucket.org/pypy/pypy/issues/2717
+Patch12: 012-time-sleep-i686-overflow.patch + +#
https://bitbucket.org/pypy/pypy/issues/2718
+Patch13: 013-fix-typeerror.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -711,12 +717,6 @@ CheckPyPy() { # test_multiprocessing, so skip it for now: SkipTest test_multiprocessing - # the timeout tests are hanging on i686 - # see
https://bitbucket.org/pypy/pypy/issues/2717
- %ifarch %{ix86} - SkipTest test_socket - %endif - echo "== Test names ==" cat testnames.txt echo "=================" @@ -835,6 +835,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 +- Fixed upstream issues #2717 and #2718 (re-enable test_socket) + * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) commit 27657069ff6fedfdeedc1770738261f4662213bd Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Dec 27 15:58:25 2017 +0100 Temporarily skip test_socket on ix86 diff --git a/pypy3.spec b/pypy3.spec index 24d9504..6843000 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -711,6 +711,12 @@ CheckPyPy() { # test_multiprocessing, so skip it for now: SkipTest test_multiprocessing + # the timeout tests are hanging on i686 + # see
https://bitbucket.org/pypy/pypy/issues/2717
+ %ifarch %{ix86} + SkipTest test_socket + %endif + echo "== Test names ==" cat testnames.txt echo "=================" @@ -833,6 +839,7 @@ CheckPyPy %{name}-stackless - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) - Enable JIT on power and s390x +- Temporarily skip test_socket on ix86 * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) commit a6780ec4355a7d2691bf8441b76b77186fb1b22d Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Dec 27 15:57:17 2017 +0100 Enable JIT on power and s390x diff --git a/pypy3.spec b/pypy3.spec index cb0d323..24d9504 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -93,7 +93,7 @@ ExcludeArch: aarch64 # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -%ifarch %{ix86} x86_64 %{arm} +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x %global with_jit 1 %else %global with_jit 0 @@ -832,6 +832,7 @@ CheckPyPy %{name}-stackless * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) +- Enable JIT on power and s390x * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) commit 2b72df539cd5d8839277452408071a8200689b29 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Dec 26 11:56:15 2017 +0100 Update to 5.10 (#1528841) diff --git a/.gitignore b/.gitignore index 602e7b0..40caefb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /pypy3.3-v5.5.0-alpha-src.tar.bz2 /pypy3-v5.7.0-src.tar.bz2 /pypy3-v5.9.0-src.tar.bz2 +/pypy3-v5.10.0-src.tar.bz2 diff --git a/pypy3.spec b/pypy3.spec index 9e9d37a..cb0d323 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,5 +1,5 @@ Name: pypy3 -Version: 5.9.0 +Version: 5.10.0 %global pyversion 3.5 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler @@ -171,7 +171,7 @@ Patch11: 011-no-faulthandler.patch %global use_self_when_building 0 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 -BuildRequires: pypy +BuildRequires: pypy2 # no pypy-pycparser available ATM %global bootstrap_python_interp pypy %else @@ -179,7 +179,7 @@ BuildRequires: pypy # pypy3 can only be build with python2 BuildRequires: python2-devel -BuildRequires: python-pycparser +BuildRequires: python2-pycparser %global bootstrap_python_interp python %endif @@ -829,6 +829,10 @@ CheckPyPy %{name}-stackless %changelog +* Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 +- Update to 5.10 (#1528841) +- Use pypy2 and python2-pycparser (note the twos) + * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) - Remove merged patches diff --git a/sources b/sources index 728ee37..d9f03a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.9.0-src.tar.bz2) = 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd +SHA512 (pypy3-v5.10.0-src.tar.bz2) = 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b commit 6eb88b178404d837b4ff02920550faaacb5cd92e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Oct 20 20:31:31 2017 +0200 Update to 5.9 (#1504427) diff --git a/.gitignore b/.gitignore index 3fcf7b6..602e7b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /pypy3-2.4.0-src.tar.bz2 /pypy3.3-v5.2.0-alpha1-src.tar.bz2 /pypy3.3-v5.5.0-alpha-src.tar.bz2 +/pypy3-v5.7.0-src.tar.bz2 +/pypy3-v5.9.0-src.tar.bz2 diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch deleted file mode 100644 index 58ceb01..0000000 --- a/009-raise-an-error-when-STARTTLS-fails.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4c0f6a6fe6c71009ab4a6b3716e70af021e04904 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Sat, 2 Jul 2016 20:18:12 +0200 -Subject: [PATCH] Raise an error when STARTTLS fails - -CVE-2016-0772 python: smtplib StartTLS stripping attack -rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
-rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
- -Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> -- in changeset 101887:d590114c2394 3.4 --
https://hg.python.org/cpython/rev/d590114c2394
---- - lib-python/3/smtplib.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py -index 57f181b..5656cc6 100755 ---- a/lib-python/3/smtplib.py -+++ b/lib-python/3/smtplib.py -@@ -680,6 +680,11 @@ class SMTP: - self.ehlo_resp = None - self.esmtp_features = {} - self.does_esmtp = 0 -+ else: -+ # RFC 3207: -+ # 501 Syntax error (no parameters allowed) -+ # 454 TLS not available due to temporary reason -+ raise SMTPResponseException(resp, reply) - return (resp, reply) - - def sendmail(self, from_addr, to_addrs, msg, mail_options=[], --- -2.9.0 - diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch deleted file mode 100644 index bed386c..0000000 --- a/010-disabled-HTTP-header-injections-in-http.client.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 9a8db191cf8a3557a24e91081bf434d581b98c5a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Sat, 2 Jul 2016 20:20:58 +0200 -Subject: [PATCH] Disabled HTTP header injections in http.client. - -CVE-2016-5699 python: http protocol steam injection attack -rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
-rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- -Based on an upstream change by Demian Brecht and Serhiy Storchaka -- in changeset 94952:bf3e1c9b80e9 3.4 --
https://hg.python.org/cpython/rev/bf3e1c9b80e9
---- - lib-python/3/http/client.py | 37 +++++++++++++++++++++++++ - lib-python/3/test/test_httplib.py | 57 +++++++++++++++++++++++++++++++++++++++ - 2 files changed, 94 insertions(+) - -diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py -index e05c84d..476d6c8 100644 ---- a/lib-python/3/http/client.py -+++ b/lib-python/3/http/client.py -@@ -70,6 +70,7 @@ import email.parser - import email.message - import io - import os -+import re - import socket - import collections - from urllib.parse import urlsplit -@@ -217,6 +218,34 @@ _MAXLINE = 65536 - _MAXHEADERS = 100 - - -+# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) -+# -+# VCHAR = %x21-7E -+# obs-text = %x80-FF -+# header-field = field-name ":" OWS field-value OWS -+# field-name = token -+# field-value = *( field-content / obs-fold ) -+# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] -+# field-vchar = VCHAR / obs-text -+# -+# obs-fold = CRLF 1*( SP / HTAB ) -+# ; obsolete line folding -+# ; see Section 3.2.4 -+ -+# token = 1*tchar -+# -+# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" -+# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" -+# / DIGIT / ALPHA -+# ; any VCHAR, except delimiters -+# -+# VCHAR defined in
http://tools.ietf.org/html/rfc5234#appendix-B.1
-+ -+# the patterns for both name and value are more leniant than RFC -+# definitions to allow for backwards compatibility -+_is_legal_header_name = re.compile(b'^[^:\s][^:\r\n]*$').match -+_is_illegal_header_value = re.compile(b'\n(?![ \t])|\r(?![ \t\n])').search -+ - class HTTPMessage(email.message.Message): - # XXX The only usage of this method is in - # http.server.CGIHTTPRequestHandler. Maybe move the code there so -@@ -1035,12 +1064,20 @@ class HTTPConnection: - - if hasattr(header, 'encode'): - header = header.encode('ascii') -+ -+ if not _is_legal_header_name(header): -+ raise ValueError('Invalid header name %r' % (header,)) -+ - values = list(values) - for i, one_value in enumerate(values): - if hasattr(one_value, 'encode'): - values[i] = one_value.encode('latin-1') - elif isinstance(one_value, int): - values[i] = str(one_value).encode('ascii') -+ -+ if _is_illegal_header_value(values[i]): -+ raise ValueError('Invalid header value %r' % (values[i],)) -+ - value = b'\r\n\t'.join(values) - header = header + b': ' + value - self._output(header) -diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py -index c8ded92..fd71bea 100644 ---- a/lib-python/3/test/test_httplib.py -+++ b/lib-python/3/test/test_httplib.py -@@ -134,6 +134,33 @@ class HeaderTests(TestCase): - conn.putheader('Content-length', 42) - self.assertIn(b'Content-length: 42', conn._buffer) - -+ conn.putheader('Foo', ' bar ') -+ self.assertIn(b'Foo: bar ', conn._buffer) -+ conn.putheader('Bar', '\tbaz\t') -+ self.assertIn(b'Bar: \tbaz\t', conn._buffer) -+ conn.putheader('Authorization', 'Bearer mytoken') -+ self.assertIn(b'Authorization: Bearer mytoken', conn._buffer) -+ conn.putheader('IterHeader', 'IterA', 'IterB') -+ self.assertIn(b'IterHeader: IterA\r\n\tIterB', conn._buffer) -+ conn.putheader('LatinHeader', b'\xFF') -+ self.assertIn(b'LatinHeader: \xFF', conn._buffer) -+ conn.putheader('Utf8Header', b'\xc3\x80') -+ self.assertIn(b'Utf8Header: \xc3\x80', conn._buffer) -+ conn.putheader('C1-Control', b'next\x85line') -+ self.assertIn(b'C1-Control: next\x85line', conn._buffer) -+ conn.putheader('Embedded-Fold-Space', 'is\r\n allowed') -+ self.assertIn(b'Embedded-Fold-Space: is\r\n allowed', conn._buffer) -+ conn.putheader('Embedded-Fold-Tab', 'is\r\n\tallowed') -+ self.assertIn(b'Embedded-Fold-Tab: is\r\n\tallowed', conn._buffer) -+ conn.putheader('Key Space', 'value') -+ self.assertIn(b'Key Space: value', conn._buffer) -+ conn.putheader('KeySpace ', 'value') -+ self.assertIn(b'KeySpace : value', conn._buffer) -+ conn.putheader(b'Nonbreak\xa0Space', 'value') -+ self.assertIn(b'Nonbreak\xa0Space: value', conn._buffer) -+ conn.putheader(b'\xa0NonbreakSpace', 'value') -+ self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer) -+ - def test_ipv6host_header(self): - # Default host header on IPv6 transaction should wrapped by [] if - # its actual IPv6 address -@@ -153,6 +180,36 @@ class HeaderTests(TestCase): - conn.request('GET', '/foo') - self.assertTrue(sock.data.startswith(expected)) - -+ def test_invalid_headers(self): -+ conn = client.HTTPConnection('
example.com
') -+ conn.sock = FakeSocket('') -+ conn.putrequest('GET', '/') -+ -+ #
http://tools.ietf.org/html/rfc7230#section-3.2.4
, whitespace is no -+ # longer allowed in header names -+ cases = ( -+ (b'Invalid\r\nName', b'ValidValue'), -+ (b'Invalid\rName', b'ValidValue'), -+ (b'Invalid\nName', b'ValidValue'), -+ (b'\r\nInvalidName', b'ValidValue'), -+ (b'\rInvalidName', b'ValidValue'), -+ (b'\nInvalidName', b'ValidValue'), -+ (b' InvalidName', b'ValidValue'), -+ (b'\tInvalidName', b'ValidValue'), -+ (b'Invalid:Name', b'ValidValue'), -+ (b':InvalidName', b'ValidValue'), -+ (b'ValidName', b'Invalid\r\nValue'), -+ (b'ValidName', b'Invalid\rValue'), -+ (b'ValidName', b'Invalid\nValue'), -+ (b'ValidName', b'InvalidValue\r\n'), -+ (b'ValidName', b'InvalidValue\r'), -+ (b'ValidName', b'InvalidValue\n'), -+ ) -+ for name, value in cases: -+ with self.subTest((name, value)): -+ with self.assertRaisesRegex(ValueError, 'Invalid header'): -+ conn.putheader(name, value) -+ - - class BasicTest(TestCase): - def test_status_lines(self): --- -2.9.0 - diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index f0154eb..f96d232 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -1,30 +1,37 @@ -diff --git pypy3-v5.5.0-src/lib-python/3/test/regrtest.py pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new -index 8d18a9297a..e99322ebe1 100755 ---- pypy3-v5.5.0-src/lib-python/3/test/regrtest.py -+++ pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new -@@ -169,7 +169,6 @@ option '-uall,-gui'. - import importlib +commit ea4d6a12548eea7ce0424feea13a499fb7085e96 +Author: rpm-build <rpm-build> +Date: Wed Mar 29 04:31:55 2017 +0200 + + 011-no-faulthandler.patch + +diff --git a/lib-python/3/test/regrtest.py b/lib-python/3/test/regrtest.py +index c1d85f6..3d3072c 100755 +--- a/lib-python/3/test/regrtest.py ++++ b/lib-python/3/test/regrtest.py +@@ -124,7 +124,6 @@ import importlib + import argparse import builtins -import faulthandler - import getopt import io import json -@@ -197,6 +196,10 @@ try: - import multiprocessing.process + import locale +@@ -152,7 +151,10 @@ try: + import _multiprocessing, multiprocessing.process except ImportError: multiprocessing = None +- +try: + import faulthandler +except ImportError: + faulthandler = None - # Some times __path__ and __file__ are not absolute (e.g. while running from -@@ -283,17 +286,18 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, + # Lib/) and, if we change the CWD to run the tests in a temporary dir, some +@@ -486,17 +488,18 @@ def main(tests=None, **kwargs): + directly to set the values that would normally be set by flags on the command line. """ - - # Display the Python traceback on fatal errors (e.g. segfault) - faulthandler.enable(all_threads=True) - @@ -51,3 +58,37 @@ index 8d18a9297a..e99322ebe1 100755 replace_stdout() +diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py +index 5d7f308..4424637 100644 +--- a/lib-python/3/test/support/__init__.py ++++ b/lib-python/3/test/support/__init__.py +@@ -6,7 +6,6 @@ if __name__ != 'test.support': + import collections.abc + import contextlib + import errno +-import faulthandler + import fnmatch + import functools + import gc +@@ -65,6 +64,11 @@ try: + except ImportError: + resource = None + ++try: ++ import faulthandler ++except ImportError: ++ faulthandler = None ++ + __all__ = [ + # globals + "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", +@@ -2060,7 +2064,8 @@ def start_threads(threads, unlock=None): + finally: + started = [t for t in started if t.isAlive()] + if started: +- faulthandler.dump_traceback(sys.stdout) ++ if faulthandler is not None: ++ faulthandler.dump_traceback(sys.stdout) + raise AssertionError('Unable to join %d threads' % len(started)) + + @contextlib.contextmanager diff --git a/pypy3.spec b/pypy3.spec index f878bb2..9e9d37a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,7 @@ Name: pypy3 -Version: 5.5.0 -Release: 6%{?dist} +Version: 5.9.0 +%global pyversion 3.5 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -131,7 +132,7 @@ ExcludeArch: aarch64 %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v%{version}-alpha-src.tar…
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-v%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -141,36 +142,21 @@ Source2: macros.pypy3 # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch0: 001-nevertty.patch +Patch1: 001-nevertty.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler # and linker are captured: -Patch1: 006-always-log-stdout.patch +Patch6: 006-always-log-stdout.patch # Disable the printing of a quote from IRC on startup (these are stored in # ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could # cause confusion for end-users (and many are in-jokes within the PyPy # community that won't make sense outside of it). [Sorry to be a killjoy] -Patch2: 007-remove-startup-message.patch - - -# CVE-2016-0772 python: smtplib StartTLS stripping attack -# rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
-# rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
-# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/d590114c2394
-# Raise an error when STARTTLS fails -Patch4: 009-raise-an-error-when-STARTTLS-fails.patch - -# CVE-2016-5699 python: http protocol steam injection attack -# rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
-# rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
-# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
-# Disabled HTTP header injections in http.client -Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch +Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler -Patch6: 011-no-faulthandler.patch +Patch11: 011-no-faulthandler.patch # Build-time requirements: @@ -186,12 +172,14 @@ Patch6: 011-no-faulthandler.patch %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy +# no pypy-pycparser available ATM %global bootstrap_python_interp pypy %else # pypy3 can only be build with python2 BuildRequires: python2-devel +BuildRequires: python-pycparser %global bootstrap_python_interp python %endif @@ -523,8 +511,9 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages -ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 -ln -s pypy3.3 %{buildroot}/%{_bindir}/pypy3 +ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} +ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} +ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -790,10 +779,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy-c +CheckPyPy %{name}-c %if 0%{with_stackless} -CheckPyPy pypy3-stackless +CheckPyPy %{name}-stackless %endif %endif # run_selftests @@ -821,7 +810,7 @@ CheckPyPy pypy3-stackless %license LICENSE %doc README.rst %{_bindir}/pypy3 -%{_bindir}/pypy3.3 +%{_bindir}/pypy%{pyversion} %{pypyprefix}/bin/ %exclude %{_libdir}/%{name}-%{version}.tar.bz2 @@ -840,6 +829,13 @@ CheckPyPy pypy3-stackless %changelog +* Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 +- Update to 5.9 (#1504427) +- Remove merged patches +- Reindex the patches to match the filenames +- Rebase the faulthandler Patch11 +- BR python-pycparser + * Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-6 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/sources b/sources index 5155d51..728ee37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -536008fd7b17af8878915393fc1ecfc3 pypy3.3-v5.5.0-alpha-src.tar.bz2 +SHA512 (pypy3-v5.9.0-src.tar.bz2) = 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd commit 79816c5293727d3eb45debfb1ba42e5bc8b3db29 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Aug 3 06:35:52 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 6997965..f878bb2 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-6 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+ * Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
commit aebba1447fc82a76bc6e7102083198e340d076bd Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Jul 27 09:23:17 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 73f75d3..6997965 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+ * Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
commit 717803cfa0815090a04163482c395a46dced8f02 Author: Petr Písař <ppisar(a)redhat.com> Date: Wed Jul 12 14:43:49 2017 +0200 perl dependency renamed to perl-interpreter <
https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules
> diff --git a/pypy3.spec b/pypy3.spec index c74d495..73f75d3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -227,7 +227,7 @@ BuildRequires: time BuildRequires: /usr/bin/free # For use in the selftests, for imposing a per-test timeout: -BuildRequires: perl +BuildRequires: perl-interpreter %endif # No prelink on these arches commit 51ae82f0cce74a6fb047e40d45173c75bffc41f9 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Feb 11 08:09:09 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 5598133..c74d495 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+ * Sun Nov 13 2016 Dan Horák <dan[at]danny.cz> - 5.5.0-3 - set z10 as the base CPU for s390(x) build commit b929faae35b08942da1a1d1d994b26e3400f48c3 Author: Dan Horák <dan(a)danny.cz> Date: Sun Nov 13 09:22:11 2016 +0100 - set z10 as the base CPU for s390(x) build diff --git a/pypy3.spec b/pypy3.spec index 903acb9..5598133 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -316,6 +316,11 @@ find lib-python/%{pylibver} -name "*.py" -exec \ %endif %build +%ifarch s390 s390x +# pypy3 requires z10 at least +%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /') +%endif + # Top memory usage is about 4.5GB on arm7hf free @@ -835,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Sun Nov 13 2016 Dan Horák <dan[at]danny.cz> - 5.5.0-3 +- set z10 as the base CPU for s390(x) build + * Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 5.5.0-2 - Also build on arm and s390* commit 404c37f2ddb3343127726d561cd86b1a6488cd7f Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 09:29:11 2016 -0500 Restore renaming of pypytrace-mode to pypy3trace-mode diff --git a/pypy3.spec b/pypy3.spec index 837273b..903acb9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -650,8 +650,9 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} -install -m0644 -p -D -t %{buildroot}/%{_emacs_sitelispdir} \ - rpython/jit/tool/pypytrace-mode.{el,elc} +mkdir -p %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: commit 91071982692c6dd8da9894e3180cd7bb5b4d290e Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 08:10:01 2016 -0500 It turns out ppc has no gold So use gold on arm/i686/amd64 only. diff --git a/pypy3.spec b/pypy3.spec index 16d5f46..837273b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -311,7 +311,9 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; -sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py +%ifarch %{ix86} x86_64 %{arm} + sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py +%endif %build # Top memory usage is about 4.5GB on arm7hf commit ad0d37c683891eaf084a84e4a9f2205ce3c5585b Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 06:51:54 2016 -0500 Also build on arm and s390* diff --git a/pypy3.spec b/pypy3.spec index b6e6d0b..16d5f46 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -11,7 +11,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 armv7hl s390 s390x +ExcludeArch: aarch64 # High-level configuration of the build: @@ -311,7 +311,10 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; +sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py + %build +# Top memory usage is about 4.5GB on arm7hf free BuildPyPy() { @@ -829,6 +832,9 @@ CheckPyPy pypy3-stackless %changelog +* Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 5.5.0-2 +- Also build on arm and s390* + * Sat Oct 15 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.5.0-1 - PyPy 3.3 5.5.0 - On Fedora 26+, BR compat-openssl10-devel commit 37fe95796cc55f2af8290bf78c32226b2ac09fc3 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 06:51:35 2016 -0500 Make the spec file a tiny bit shorter diff --git a/pypy3.spec b/pypy3.spec index 0245be9..b6e6d0b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -260,7 +260,6 @@ CPU architecture. %package libs -Group: Development/Languages Summary: Run-time libraries used by PyPy implementations of Python 3 # We supply an emacs mode for the JIT viewer. @@ -274,7 +273,6 @@ Libraries required by the various PyPy implementations of Python 3. %package devel -Group: Development/Languages Summary: Development tools for working with PyPy3 Requires: pypy3%{?_isa} = %{version}-%{release} @@ -284,7 +282,6 @@ Header files for building C extension modules against PyPy3 %if 0%{with_stackless} %package stackless -Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless @@ -516,8 +513,8 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages -ln -s %{pypyprefix}/bin/pypy3 %{buildroot}/%{_bindir}/pypy3 ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 +ln -s pypy3.3 %{buildroot}/%{_bindir}/pypy3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -648,19 +645,17 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} -mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +install -m0644 -p -D -t %{buildroot}/%{_emacs_sitelispdir} \ + rpython/jit/tool/pypytrace-mode.{el,elc} %endif # Install macros for rpm: -mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d -install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d +install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 -rm -f %{buildroot}%{pypyprefix}/LICENSE -rm -f %{buildroot}%{pypyprefix}/README.rst +rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ + %{buildroot}%{pypyprefix}/LICENSE \ + %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : commit 6b002d36f3cb6a967ccf98fb1e66330fdd7dda09 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 15:32:20 2016 -0500 Also exclude armv7hl Build generates a lot of warnings and errors, and fails despite having 4GB RAM + 4GB swap available. The error is /usr/bin/ld: failed to set dynamic section sizes: Memory exhausted collect2: error: ld returned 1 exit status but this might be caused by the earlier errors. diff --git a/pypy3.spec b/pypy3.spec index d6bb1dd..0245be9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -3,7 +3,6 @@ Version: 5.5.0 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler -Group: Development/Languages # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new @@ -12,7 +11,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 armv7hl s390 s390x # High-level configuration of the build: commit 0b4deeff51596dd2f8ec1b9ced18caa60f6ddaa0 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 07:57:41 2016 -0500 Add BR for free diff --git a/pypy3.spec b/pypy3.spec index 3c5f5c5..d6bb1dd 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -225,6 +225,7 @@ BuildRequires: gc-devel # For use in the selftests, for recording stats: BuildRequires: time +BuildRequires: /usr/bin/free # For use in the selftests, for imposing a per-test timeout: BuildRequires: perl commit 56984a45242e2ed09394b206e3cda14aef15fafa Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 07:50:10 2016 -0500 Print the amount of available memory diff --git a/pypy3.spec b/pypy3.spec index 934a434..3c5f5c5 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -315,6 +315,7 @@ find lib-python/%{pylibver} -name "*.py" -exec \ \; %build +free BuildPyPy() { ExeName=$1 commit 693a83b0c291b9c876f08bdc5e81c6718bf71929 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Mon Nov 7 23:43:54 2016 -0500 Add a hack to fix tests, and restore building on ppc* I didn't test ppc64le yet, but at least ppc64 builds fine with the kludge. diff --git a/pypy3.spec b/pypy3.spec index 0c266d0..934a434 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,7 +12,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x ppc64le ppc64 +ExcludeArch: aarch64 s390 s390x # High-level configuration of the build: @@ -661,6 +661,9 @@ rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 rm -f %{buildroot}%{pypyprefix}/LICENSE rm -f %{buildroot}%{pypyprefix}/README.rst +# wtf? This is probably masking some bigger problem, but let's do this for now +mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : + %check topdir=$(pwd) commit 817c77d554b6dd380fd335a29c43dce88ba052a5 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Thu Nov 3 18:42:18 2016 -0400 Also exclude ppc64* The tests are failing (looks like pypy wasn't tested on ppc64 at all), and I cannot solve this without access to the hardware. diff --git a/pypy3.spec b/pypy3.spec index d826142..0c266d0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,7 +12,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 s390 s390x ppc64le ppc64 # High-level configuration of the build: commit aa6a9d04d6a20b99222a9e8db25a1e669ccc7eb4 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Thu Nov 3 14:49:28 2016 -0400 PPC64 has no faulthandler diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch new file mode 100644 index 0000000..f0154eb --- /dev/null +++ b/011-no-faulthandler.patch @@ -0,0 +1,53 @@ +diff --git pypy3-v5.5.0-src/lib-python/3/test/regrtest.py pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +index 8d18a9297a..e99322ebe1 100755 +--- pypy3-v5.5.0-src/lib-python/3/test/regrtest.py ++++ pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +@@ -169,7 +169,6 @@ option '-uall,-gui'. + import importlib + + import builtins +-import faulthandler + import getopt + import io + import json +@@ -197,6 +196,10 @@ try: + import multiprocessing.process + except ImportError: + multiprocessing = None ++try: ++ import faulthandler ++except ImportError: ++ faulthandler = None + + + # Some times __path__ and __file__ are not absolute (e.g. while running from +@@ -283,17 +286,18 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, + on the command line. + """ + +- # Display the Python traceback on fatal errors (e.g. segfault) +- faulthandler.enable(all_threads=True) +- +- # Display the Python traceback on SIGALRM or SIGUSR1 signal +- signals = [] +- if hasattr(signal, 'SIGALRM'): +- signals.append(signal.SIGALRM) +- if hasattr(signal, 'SIGUSR1'): +- signals.append(signal.SIGUSR1) +- for signum in signals: +- faulthandler.register(signum, chain=True) ++ if faulthandler: ++ # Display the Python traceback on fatal errors (e.g. segfault) ++ faulthandler.enable(all_threads=True) ++ ++ # Display the Python traceback on SIGALRM or SIGUSR1 signal ++ signals = [] ++ if hasattr(signal, 'SIGALRM'): ++ signals.append(signal.SIGALRM) ++ if hasattr(signal, 'SIGUSR1'): ++ signals.append(signal.SIGUSR1) ++ for signum in signals: ++ faulthandler.register(signum, chain=True) + + replace_stdout() + diff --git a/pypy3.spec b/pypy3.spec index ea45edf..d826142 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -170,6 +170,9 @@ Patch4: 009-raise-an-error-when-STARTTLS-fails.patch # Disabled HTTP header injections in http.client Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch +# It seems ppc64 has no faulthandler +Patch6: 011-no-faulthandler.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so commit 347fb465b0fc7717f6e6b171b895c0c01f6d77a3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:52:20 2016 +0200 Exclude not available arches diff --git a/pypy3.spec b/pypy3.spec index 8652182..ea45edf 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -11,6 +11,9 @@ Group: Development/Languages License: MIT and Python and UCD URL:
http://pypy.org/
+# Not available yet +ExcludeArch: aarch64 s390 s390x + # High-level configuration of the build: # PyPy consists of an implementation of an interpreter (with JIT compilation) commit c12d8bfa0bbfd60c56c641dbe8d522681f3d35cf Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:17:55 2016 +0200 Sources for 347975d diff --git a/.gitignore b/.gitignore index 60f26ec..3fcf7b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pypy3-2.4.0-src.tar.bz2 /pypy3.3-v5.2.0-alpha1-src.tar.bz2 +/pypy3.3-v5.5.0-alpha-src.tar.bz2 diff --git a/sources b/sources index 0e4fa7b..5155d51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e4bbd6fe42481a17f705611d76914eda pypy3.3-v5.2.0-alpha1-src.tar.bz2 +536008fd7b17af8878915393fc1ecfc3 pypy3.3-v5.5.0-alpha-src.tar.bz2 commit 347975dbf4523b2a8636ff70c59a5b537b9b4375 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:11:41 2016 +0200 PyPy 3.3 5.5.0 diff --git a/pypy3.spec b/pypy3.spec index 67819c7..8652182 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 -Version: 5.2.0 -Release: 0.1.alpha1%{?dist} +Version: 5.5.0 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -129,7 +129,7 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v%{version}-alpha-src.tar…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -201,13 +201,18 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif +%if 0%{?fedora} >= 26 +BuildRequires: compat-openssl10-devel +%else +BuildRequires: openssl-devel +%endif + %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -281,7 +286,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3.3-v5.2.0-alpha1-src -p1 -S git +%autosetup -n pypy3-v%{version}-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -803,6 +808,8 @@ CheckPyPy pypy3-stackless %{_bindir}/pypy3.3 %{pypyprefix}/bin/ +%exclude %{_libdir}/%{name}-%{version}.tar.bz2 + %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h @@ -817,6 +824,10 @@ CheckPyPy pypy3-stackless %changelog +* Sat Oct 15 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.5.0-1 +- PyPy 3.3 5.5.0 +- On Fedora 26+, BR compat-openssl10-devel + * Sat Jul 02 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.2.0-0.1.alpha1 - First alpha build of PyPy 3.3 commit 343676a8999d3e5b141b58ec6c9d8e167304ed9f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 8 14:38:18 2016 +0200 First alpha build of PyPy 3.3 diff --git a/.gitignore b/.gitignore index c9f3d9d..60f26ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pypy3-2.4.0-src.tar.bz2 +/pypy3.3-v5.2.0-alpha1-src.tar.bz2 diff --git a/001-nevertty.patch b/001-nevertty.patch new file mode 100644 index 0000000..b1db988 --- /dev/null +++ b/001-nevertty.patch @@ -0,0 +1,13 @@ +diff --git a/rpython/tool/ansi_print.py b/rpython/tool/ansi_print.py +index bfa40be..29dd332 100644 +--- a/rpython/tool/ansi_print.py ++++ b/rpython/tool/ansi_print.py +@@ -7,7 +7,7 @@ from py.io import ansi_print + from rpython.tool.ansi_mandelbrot import Driver + + +-isatty = getattr(sys.stderr, 'isatty', lambda: False) ++isatty = lambda: False + mandelbrot_driver = Driver() + wrote_dot = False # global shared state + diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch index 5d49335..0635200 100644 --- a/006-always-log-stdout.patch +++ b/006-always-log-stdout.patch @@ -1,7 +1,8 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py ---- pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:35:37.680237338 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:41:04.113098738 +0200 -@@ -138,6 +138,8 @@ class Platform(object): +diff --git a/rpython/translator/platform/__init__.py b/rpython/translator/platform/__init__.py +index 051668b..6e59acc 100644 +--- a/rpython/translator/platform/__init__.py ++++ b/rpython/translator/platform/__init__.py +@@ -140,6 +140,8 @@ class Platform(object): self._handle_error(returncode, stdout, stderr, outname) def _handle_error(self, returncode, stdout, stderr, outname): diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index 2ff9068..9654d1c 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -1,12 +1,24 @@ -diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py ---- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 -+++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 -@@ -4,7 +4,7 @@ import sys - irc_header = "And now for something completely different" - - --def interactive_console(mainmodule=None, quiet=False): -+def interactive_console(mainmodule=None, quiet=True): - # set sys.{ps1,ps2} just before invoking the interactive interpreter. This - # mimics what CPython does in pythonrun.c - if not hasattr(sys, 'ps1'): +diff --git a/lib_pypy/_pypy_interact.py b/lib_pypy/_pypy_interact.py +index 9542f54..5e44fb4 100644 +--- a/lib_pypy/_pypy_interact.py ++++ b/lib_pypy/_pypy_interact.py +@@ -13,19 +13,6 @@ def interactive_console(mainmodule=None, quiet=False): + sys.ps1 = '>>>> ' + if not hasattr(sys, 'ps2'): + sys.ps2 = '.... ' +- # +- if not quiet: +- try: +- from _pypy_irc_topic import some_topic +- text = "%s: ``%s''" % ( irc_header, some_topic()) +- while len(text) >= 80: +- i = text[:80].rfind(' ') +- print(text[:i]) +- text = text[i+1:] +- print(text) +- except ImportError: +- pass +- # + run_interactive = run_simple_interactive_console + try: + if not os.isatty(sys.stdin.fileno()): diff --git a/008-maximum-recursion-depth.patch b/008-maximum-recursion-depth.patch deleted file mode 100644 index 6d3d157..0000000 --- a/008-maximum-recursion-depth.patch +++ /dev/null @@ -1,179 +0,0 @@ -diff --git a/rpython/jit/metainterp/blackhole.py b/rpython/jit/metainterp/blackhole.py -index 9b14943..b9d1c4c 100644 ---- a/rpython/jit/metainterp/blackhole.py -+++ b/rpython/jit/metainterp/blackhole.py -@@ -1052,35 +1052,45 @@ class BlackholeInterpreter(object): - - @arguments("cpu", "i", "R", "d", returns="i") - def bhimpl_residual_call_r_i(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, None, args_r, None, calldescr) - @arguments("cpu", "i", "R", "d", returns="r") - def bhimpl_residual_call_r_r(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, None, args_r, None, calldescr) - @arguments("cpu", "i", "R", "d") - def bhimpl_residual_call_r_v(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, None, args_r, None, calldescr) - - @arguments("cpu", "i", "I", "R", "d", returns="i") - def bhimpl_residual_call_ir_i(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, args_i, args_r, None, calldescr) - @arguments("cpu", "i", "I", "R", "d", returns="r") - def bhimpl_residual_call_ir_r(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, args_i, args_r, None, calldescr) - @arguments("cpu", "i", "I", "R", "d") - def bhimpl_residual_call_ir_v(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, args_i, args_r, None, calldescr) - - @arguments("cpu", "i", "I", "R", "F", "d", returns="i") - def bhimpl_residual_call_irf_i(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d", returns="r") - def bhimpl_residual_call_irf_r(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d", returns="f") - def bhimpl_residual_call_irf_f(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_f(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d") - def bhimpl_residual_call_irf_v(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, args_i, args_r, args_f, calldescr) - - # conditional calls - note that they cannot return stuff -@@ -1108,44 +1118,54 @@ class BlackholeInterpreter(object): - - @arguments("cpu", "j", "R", returns="i") - def bhimpl_inline_call_r_i(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "R", returns="r") - def bhimpl_inline_call_r_r(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "R") - def bhimpl_inline_call_r_v(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - - @arguments("cpu", "j", "I", "R", returns="i") - def bhimpl_inline_call_ir_i(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", returns="r") - def bhimpl_inline_call_ir_r(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "I", "R") - def bhimpl_inline_call_ir_v(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - - @arguments("cpu", "j", "I", "R", "F", returns="i") - def bhimpl_inline_call_irf_i(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F", returns="r") - def bhimpl_inline_call_irf_r(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F", returns="f") - def bhimpl_inline_call_irf_f(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_f(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F") - def bhimpl_inline_call_irf_v(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - -@@ -1438,6 +1458,8 @@ class BlackholeInterpreter(object): - if not self.nextblackholeinterp: - self._exit_frame_with_exception(current_exc) - return current_exc -+ finally: -+ workaround2200.active = False - # - # pass the frame's return value to the caller - caller = self.nextblackholeinterp -@@ -1656,3 +1678,10 @@ def convert_and_run_from_pyjitpl(metainterp, raising_exception=False): - current_exc = lltype.nullptr(rclass.OBJECTPTR.TO) - # - _run_forever(firstbh, current_exc) -+ -+# ____________________________________________________________ -+ -+class WorkaroundIssue2200(object): -+ pass -+workaround2200 = WorkaroundIssue2200() -+workaround2200.active = False -diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py -index ad81456..c820185 100644 ---- a/rpython/jit/metainterp/test/test_ajit.py -+++ b/rpython/jit/metainterp/test/test_ajit.py -@@ -4044,3 +4044,30 @@ class TestLLtype(BaseLLtypeTests, LLJitMixin): - res = self.interp_operations(f, [17]) - assert res == 42 - self.check_operations_history(guard_true=1, guard_false=0) -+ -+ def test_issue2200_recursion(self): -+ # Reproduces issue #2200. This test contains no recursion, -+ # but due to an unlikely combination of factors it ends up -+ # creating an RPython-level recursion, one per loop iteration. -+ # The recursion is: blackhole interp from the failing guard -> -+ # does the call to enter() as a normal call -> enter() runs -+ # can_enter_jit() as if we're interpreted -> we enter the JIT -+ # again from the start of the loop -> the guard fails again -+ # during the next iteration -> blackhole interp. All arrows -+ # in the previous sentence are one or more levels of RPython -+ # function calls. -+ driver = JitDriver(greens=[], reds=["i"]) -+ def enter(i): -+ driver.can_enter_jit(i=i) -+ def f(): -+ set_param(None, 'trace_eagerness', 999999) -+ i = 0 -+ while True: -+ driver.jit_merge_point(i=i) -+ i += 1 -+ if i >= 300: -+ return i -+ promote(i + 1) # a failing guard -+ enter(i) -+ -+ self.meta_interp(f, []) -diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py -index 805933e..ca47f03 100644 ---- a/rpython/jit/metainterp/warmstate.py -+++ b/rpython/jit/metainterp/warmstate.py -@@ -405,6 +405,14 @@ class WarmEnterState(object): - bound_reached(hash, None, *args) - return - -+ # Workaround for issue #2200, maybe temporary. This is not -+ # a proper fix, but only a hack that should work well enough -+ # for PyPy's main jitdriver... See test_issue2200_recursion -+ from rpython.jit.metainterp.blackhole import workaround2200 -+ if workaround2200.active: -+ workaround2200.active = False -+ return -+ - # Here, we have found 'cell'. - # - if cell.flags & (JC_TRACING | JC_TEMPORARY): diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch index ba1cc53..58ceb01 100644 --- a/009-raise-an-error-when-STARTTLS-fails.patch +++ b/009-raise-an-error-when-STARTTLS-fails.patch @@ -1,6 +1,6 @@ -From 9092f6266c3054befff053aa943632856cedbdba Mon Sep 17 00:00:00 2001 +From 4c0f6a6fe6c71009ab4a6b3716e70af021e04904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Fri, 1 Jul 2016 11:42:53 +0200 +Date: Sat, 2 Jul 2016 20:18:12 +0200 Subject: [PATCH] Raise an error when STARTTLS fails CVE-2016-0772 python: smtplib StartTLS stripping attack @@ -15,10 +15,10 @@ Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> 1 file changed, 5 insertions(+) diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py -index 679e478..1aacfaf 100644 +index 57f181b..5656cc6 100755 --- a/lib-python/3/smtplib.py +++ b/lib-python/3/smtplib.py -@@ -666,6 +666,11 @@ class SMTP: +@@ -680,6 +680,11 @@ class SMTP: self.ehlo_resp = None self.esmtp_features = {} self.does_esmtp = 0 diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch index 10591d5..bed386c 100644 --- a/010-disabled-HTTP-header-injections-in-http.client.patch +++ b/010-disabled-HTTP-header-injections-in-http.client.patch @@ -1,6 +1,6 @@ -From 82dc922c7c4771ef789f5b395f54a603c693b05e Mon Sep 17 00:00:00 2001 +From 9a8db191cf8a3557a24e91081bf434d581b98c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Fri, 1 Jul 2016 13:08:55 +0200 +Date: Sat, 2 Jul 2016 20:20:58 +0200 Subject: [PATCH] Disabled HTTP header injections in http.client. CVE-2016-5699 python: http protocol steam injection attack @@ -16,7 +16,7 @@ Based on an upstream change by Demian Brecht and Serhiy Storchaka 2 files changed, 94 insertions(+) diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py -index 5466d06..1d215d8 100644 +index e05c84d..476d6c8 100644 --- a/lib-python/3/http/client.py +++ b/lib-python/3/http/client.py @@ -70,6 +70,7 @@ import email.parser @@ -27,9 +27,9 @@ index 5466d06..1d215d8 100644 import socket import collections from urllib.parse import urlsplit -@@ -207,6 +208,34 @@ MAXAMOUNT = 1048576 - # maximal line length when calling readline(). - _MAXLINE = 65536 +@@ -217,6 +218,34 @@ _MAXLINE = 65536 + _MAXHEADERS = 100 + +# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) +# @@ -62,7 +62,7 @@ index 5466d06..1d215d8 100644 class HTTPMessage(email.message.Message): # XXX The only usage of this method is in # http.server.CGIHTTPRequestHandler. Maybe move the code there so -@@ -953,12 +982,20 @@ class HTTPConnection: +@@ -1035,12 +1064,20 @@ class HTTPConnection: if hasattr(header, 'encode'): header = header.encode('ascii') @@ -73,7 +73,7 @@ index 5466d06..1d215d8 100644 values = list(values) for i, one_value in enumerate(values): if hasattr(one_value, 'encode'): - values[i] = one_value.encode('latin1') + values[i] = one_value.encode('latin-1') elif isinstance(one_value, int): values[i] = str(one_value).encode('ascii') + @@ -84,12 +84,12 @@ index 5466d06..1d215d8 100644 header = header + b': ' + value self._output(header) diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py -index 420302c..31d3bd0 100644 +index c8ded92..fd71bea 100644 --- a/lib-python/3/test/test_httplib.py +++ b/lib-python/3/test/test_httplib.py @@ -134,6 +134,33 @@ class HeaderTests(TestCase): conn.putheader('Content-length', 42) - self.assertTrue(b'Content-length: 42' in conn._buffer) + self.assertIn(b'Content-length: 42', conn._buffer) + conn.putheader('Foo', ' bar ') + self.assertIn(b'Foo: bar ', conn._buffer) diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch deleted file mode 100644 index c97eaf3..0000000 --- a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py ---- pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-27 10:35:37.648237156 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-28 10:15:58.200426205 +0200 -@@ -25,7 +25,7 @@ class AnsiLog: - self.kw_to_color = self.KW_TO_COLOR.copy() - self.kw_to_color.update(kw_to_color) - self.file = file -- self.fancy = True -+ self.fancy = False - self.isatty = getattr(sys.stderr, 'isatty', lambda: False) - if self.fancy and self.isatty(): - self.mandelbrot_driver = Driver() diff --git a/pypy3.spec b/pypy3.spec index 5666e56..67819c7 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 -Version: 2.4.0 -Release: 6%{?dist} +Version: 5.2.0 +Release: 0.1.alpha1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -116,7 +116,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/%{name}-%{version} +%global pypyprefix %{_libdir}/pypy3-%{version} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -129,17 +129,17 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/%{name}-%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.%{name} +Source2: macros.pypy3 # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch0: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +Patch0: 001-nevertty.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler @@ -152,9 +152,6 @@ Patch1: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch2: 007-remove-startup-message.patch -#
https://bugzilla.redhat.com/show_bug.cgi?id=1307889
-#
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
-Patch3: 008-maximum-recursion-depth.patch # CVE-2016-0772 python: smtplib StartTLS stripping attack # rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
@@ -180,7 +177,7 @@ Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 1 +%global use_self_when_building 0 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy @@ -205,6 +202,8 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel +BuildRequires: gdbm-devel +BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif @@ -234,7 +233,7 @@ BuildRequires: emacs BuildRequires: git # Metadata for the core package (the JIT build): -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -266,7 +265,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pypy3%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -276,13 +275,13 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n %{name}-%{version}-src -p1 -S git +%autosetup -n pypy3.3-v5.2.0-alpha1-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -304,20 +303,6 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; -# Hacky fix to allow the curses module to build on x86_64; otherwise we get: -# cffi.ffiplatform.VerificationError: anonymous MEVENT: wrong total size -# (we have 24, but C compiler says 20) -#
https://github.com/archlinuxcn/repo/commit/560a75090333b6de8a1de960acac5e62…
-%ifarch x86_64 - _type=unsigned -%else - _type=uint32_t -%endif - -sed -i -e "s/typedef unsigned long mmask_t/typedef $_type mmask_t/" \ - -e "s/typedef unsigned long chtype/typedef $_type chtype/" \ - lib_pypy/_curses.py - %build BuildPyPy() { @@ -379,8 +364,7 @@ BuildPyPy() { # of root pointers: %global gcrootfinder_options --gcrootfinder=shadowstack - # Prevent memory exhaustion - export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-g//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS") %else # Go with the default, which is "asmgcc" @@ -399,7 +383,7 @@ BuildPyPy() { # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//' -e 's/-g//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') %endif @@ -425,7 +409,6 @@ BuildPyPy() { PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ $INTERP ../../rpython/bin/rpython \ - --output=$ExeName \ %{gcrootfinder_options} \ $Options \ targetpypystandalone @@ -442,7 +425,7 @@ BuildPyPy() { } BuildPyPy \ - %{name} \ + pypy3 \ %if 0%{with_jit} "-Ojit" \ %else @@ -452,7 +435,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - %{name}-stackless \ + pypy3-stackless \ "--stackless" %endif @@ -498,35 +481,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy %{name} - -%if 0%{with_stackless} -InstallPyPy %{name}-stackless -%endif - -# Install the various support libraries as described at: -#
http://codespeak.net/pypy/dist/pypy/doc/getting-started-python.html#install…
-# which refers to a "PREFIX" found relative to the location of the binary. -# Given that the pypy binaries will be in /usr/bin, PREFIX can be -# "../share/pypy-1.2" relative to that directory, i.e. /usr/share/pypy-1.2 -# -# Running "strace" on a built binary indicates that it searches within -# PREFIX/lib-python/modified-2.5.2 -# not -# PREFIX/lib-python/modified.2.5.2 -# as given on the above page, i.e. it uses '-' not '.' +# Run installing script, archive-name %{name}-%{version} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{version} --builddir %{buildroot}/%{_libdir} -cp -a lib-python %{buildroot}/%{pypyprefix} - -cp -a lib_pypy %{buildroot}/%{pypyprefix} - -# Remove a text file that documents which selftests fail on Win32: -rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt - -# Remove a text file containing upstream's recipe for syncing stdlib in -# their hg repository with cpython's: -rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: @@ -546,6 +504,8 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages +ln -s %{pypyprefix}/bin/pypy3 %{buildroot}/%{_bindir}/pypy3 +ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -604,16 +564,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/%{name} \ + %{buildroot}%{pypyprefix}/bin/pypy3 \ 0 -%{buildroot}/%{pypyprefix}/%{name} -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/%{name} -c 'import tkinter' -%{buildroot}/%{pypyprefix}/%{name} -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/%{name} -c 'import _curses' -%{buildroot}/%{pypyprefix}/%{name} -c 'import curses' -%{buildroot}/%{pypyprefix}/%{name} -c 'import syslog' -%{buildroot}/%{pypyprefix}/%{name} -c 'from _sqlite3 import *' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _sqlite3' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _curses' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import curses' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import syslog' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -626,8 +586,8 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # it's not yet clear to me how upstream plan to deal with the C extension # interface going forward, so let's just mimic upstream for now. %global pypy_include_dir %{pypyprefix}/include -mkdir -p %{buildroot}/%{pypy_include_dir} -cp include/*.h %{buildroot}/%{pypy_include_dir} +mkdir -p %{buildroot}%{pypy_include_dir} +rm -f %{buildroot}%{pypy_include_dir}/README # Capture the RPython source code files from the build within the debuginfo @@ -677,16 +637,18 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d -# Remove build script from the package -rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py +# Remove files we don't want: +rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 +rm -f %{buildroot}%{pypyprefix}/LICENSE +rm -f %{buildroot}%{pypyprefix}/README.rst %check topdir=$(pwd) @@ -807,10 +769,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy %{name} +CheckPyPy pypy-c %if 0%{with_stackless} -CheckPyPy %{name}-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -826,37 +788,39 @@ CheckPyPy %{name}-stackless %dir %{pypyprefix} %dir %{pypyprefix}/lib-python -%{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/%{name}trace-mode.el -%{_emacs_sitelispdir}/%{name}trace-mode.elc +%{_emacs_sitelispdir}/pypy3trace-mode.el +%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif %files %license LICENSE %doc README.rst -%{_bindir}/%{name} -%{pypyprefix}/%{name} +%{_bindir}/pypy3 +%{_bindir}/pypy3.3 +%{pypyprefix}/bin/ %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{_rpmconfigdir}/macros.d/macros.%{name} +%{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless %license LICENSE %doc README.rst -%{_bindir}/%{name}-stackless +%{_bindir}/pypy-stackless %endif %changelog -* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-6 +* Sat Jul 02 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.2.0-0.1.alpha1 +- First alpha build of PyPy 3.3 + +* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-3 - Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack - Raise an error when STARTTLS fails - rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
@@ -867,18 +831,6 @@ CheckPyPy %{name}-stackless - rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
-* Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 -- Fix FTBFS (#1307889) -- Add patch to fix maximum recursion depth error during build -- Don't use -g flag to prevent memory exhaustion -- Add fix form Arch Linux to prevent VerificationError during the build - -* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
- -* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 -- Bump release to rebuild with new execstack - * Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/sources b/sources index e4d98b7..0e4fa7b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -96ba72916114d16904e12562b5d84e51 pypy3-2.4.0-src.tar.bz2 +e4bbd6fe42481a17f705611d76914eda pypy3.3-v5.2.0-alpha1-src.tar.bz2 commit 092bdc18b3bd62174ce8db6323a5a1f59d080fd9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 1 15:59:13 2016 +0200 Fix for CVE-2016-0772 and CVE-2016-5699 Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack - Raise an error when STARTTLS fails - rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
- rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
- Fixed upstream:
https://hg.python.org/cpython/rev/d590114c2394
Fix for: CVE-2016-5699 python: http protocol steam injection attack - rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
- rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch new file mode 100644 index 0000000..ba1cc53 --- /dev/null +++ b/009-raise-an-error-when-STARTTLS-fails.patch @@ -0,0 +1,35 @@ +From 9092f6266c3054befff053aa943632856cedbdba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> +Date: Fri, 1 Jul 2016 11:42:53 +0200 +Subject: [PATCH] Raise an error when STARTTLS fails + +CVE-2016-0772 python: smtplib StartTLS stripping attack +rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+ +Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> +- in changeset 101887:d590114c2394 3.4 +-
https://hg.python.org/cpython/rev/d590114c2394
+--- + lib-python/3/smtplib.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py +index 679e478..1aacfaf 100644 +--- a/lib-python/3/smtplib.py ++++ b/lib-python/3/smtplib.py +@@ -666,6 +666,11 @@ class SMTP: + self.ehlo_resp = None + self.esmtp_features = {} + self.does_esmtp = 0 ++ else: ++ # RFC 3207: ++ # 501 Syntax error (no parameters allowed) ++ # 454 TLS not available due to temporary reason ++ raise SMTPResponseException(resp, reply) + return (resp, reply) + + def sendmail(self, from_addr, to_addrs, msg, mail_options=[], +-- +2.9.0 + diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch new file mode 100644 index 0000000..10591d5 --- /dev/null +++ b/010-disabled-HTTP-header-injections-in-http.client.patch @@ -0,0 +1,163 @@ +From 82dc922c7c4771ef789f5b395f54a603c693b05e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> +Date: Fri, 1 Jul 2016 13:08:55 +0200 +Subject: [PATCH] Disabled HTTP header injections in http.client. + +CVE-2016-5699 python: http protocol steam injection attack +rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+ +Based on an upstream change by Demian Brecht and Serhiy Storchaka +- in changeset 94952:bf3e1c9b80e9 3.4 +-
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+--- + lib-python/3/http/client.py | 37 +++++++++++++++++++++++++ + lib-python/3/test/test_httplib.py | 57 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 94 insertions(+) + +diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py +index 5466d06..1d215d8 100644 +--- a/lib-python/3/http/client.py ++++ b/lib-python/3/http/client.py +@@ -70,6 +70,7 @@ import email.parser + import email.message + import io + import os ++import re + import socket + import collections + from urllib.parse import urlsplit +@@ -207,6 +208,34 @@ MAXAMOUNT = 1048576 + # maximal line length when calling readline(). + _MAXLINE = 65536 + ++# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) ++# ++# VCHAR = %x21-7E ++# obs-text = %x80-FF ++# header-field = field-name ":" OWS field-value OWS ++# field-name = token ++# field-value = *( field-content / obs-fold ) ++# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] ++# field-vchar = VCHAR / obs-text ++# ++# obs-fold = CRLF 1*( SP / HTAB ) ++# ; obsolete line folding ++# ; see Section 3.2.4 ++ ++# token = 1*tchar ++# ++# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" ++# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" ++# / DIGIT / ALPHA ++# ; any VCHAR, except delimiters ++# ++# VCHAR defined in
http://tools.ietf.org/html/rfc5234#appendix-B.1
++ ++# the patterns for both name and value are more leniant than RFC ++# definitions to allow for backwards compatibility ++_is_legal_header_name = re.compile(b'^[^:\s][^:\r\n]*$').match ++_is_illegal_header_value = re.compile(b'\n(?![ \t])|\r(?![ \t\n])').search ++ + class HTTPMessage(email.message.Message): + # XXX The only usage of this method is in + # http.server.CGIHTTPRequestHandler. Maybe move the code there so +@@ -953,12 +982,20 @@ class HTTPConnection: + + if hasattr(header, 'encode'): + header = header.encode('ascii') ++ ++ if not _is_legal_header_name(header): ++ raise ValueError('Invalid header name %r' % (header,)) ++ + values = list(values) + for i, one_value in enumerate(values): + if hasattr(one_value, 'encode'): + values[i] = one_value.encode('latin1') + elif isinstance(one_value, int): + values[i] = str(one_value).encode('ascii') ++ ++ if _is_illegal_header_value(values[i]): ++ raise ValueError('Invalid header value %r' % (values[i],)) ++ + value = b'\r\n\t'.join(values) + header = header + b': ' + value + self._output(header) +diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py +index 420302c..31d3bd0 100644 +--- a/lib-python/3/test/test_httplib.py ++++ b/lib-python/3/test/test_httplib.py +@@ -134,6 +134,33 @@ class HeaderTests(TestCase): + conn.putheader('Content-length', 42) + self.assertTrue(b'Content-length: 42' in conn._buffer) + ++ conn.putheader('Foo', ' bar ') ++ self.assertIn(b'Foo: bar ', conn._buffer) ++ conn.putheader('Bar', '\tbaz\t') ++ self.assertIn(b'Bar: \tbaz\t', conn._buffer) ++ conn.putheader('Authorization', 'Bearer mytoken') ++ self.assertIn(b'Authorization: Bearer mytoken', conn._buffer) ++ conn.putheader('IterHeader', 'IterA', 'IterB') ++ self.assertIn(b'IterHeader: IterA\r\n\tIterB', conn._buffer) ++ conn.putheader('LatinHeader', b'\xFF') ++ self.assertIn(b'LatinHeader: \xFF', conn._buffer) ++ conn.putheader('Utf8Header', b'\xc3\x80') ++ self.assertIn(b'Utf8Header: \xc3\x80', conn._buffer) ++ conn.putheader('C1-Control', b'next\x85line') ++ self.assertIn(b'C1-Control: next\x85line', conn._buffer) ++ conn.putheader('Embedded-Fold-Space', 'is\r\n allowed') ++ self.assertIn(b'Embedded-Fold-Space: is\r\n allowed', conn._buffer) ++ conn.putheader('Embedded-Fold-Tab', 'is\r\n\tallowed') ++ self.assertIn(b'Embedded-Fold-Tab: is\r\n\tallowed', conn._buffer) ++ conn.putheader('Key Space', 'value') ++ self.assertIn(b'Key Space: value', conn._buffer) ++ conn.putheader('KeySpace ', 'value') ++ self.assertIn(b'KeySpace : value', conn._buffer) ++ conn.putheader(b'Nonbreak\xa0Space', 'value') ++ self.assertIn(b'Nonbreak\xa0Space: value', conn._buffer) ++ conn.putheader(b'\xa0NonbreakSpace', 'value') ++ self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer) ++ + def test_ipv6host_header(self): + # Default host header on IPv6 transaction should wrapped by [] if + # its actual IPv6 address +@@ -153,6 +180,36 @@ class HeaderTests(TestCase): + conn.request('GET', '/foo') + self.assertTrue(sock.data.startswith(expected)) + ++ def test_invalid_headers(self): ++ conn = client.HTTPConnection('
example.com
') ++ conn.sock = FakeSocket('') ++ conn.putrequest('GET', '/') ++ ++ #
http://tools.ietf.org/html/rfc7230#section-3.2.4
, whitespace is no ++ # longer allowed in header names ++ cases = ( ++ (b'Invalid\r\nName', b'ValidValue'), ++ (b'Invalid\rName', b'ValidValue'), ++ (b'Invalid\nName', b'ValidValue'), ++ (b'\r\nInvalidName', b'ValidValue'), ++ (b'\rInvalidName', b'ValidValue'), ++ (b'\nInvalidName', b'ValidValue'), ++ (b' InvalidName', b'ValidValue'), ++ (b'\tInvalidName', b'ValidValue'), ++ (b'Invalid:Name', b'ValidValue'), ++ (b':InvalidName', b'ValidValue'), ++ (b'ValidName', b'Invalid\r\nValue'), ++ (b'ValidName', b'Invalid\rValue'), ++ (b'ValidName', b'Invalid\nValue'), ++ (b'ValidName', b'InvalidValue\r\n'), ++ (b'ValidName', b'InvalidValue\r'), ++ (b'ValidName', b'InvalidValue\n'), ++ ) ++ for name, value in cases: ++ with self.subTest((name, value)): ++ with self.assertRaisesRegex(ValueError, 'Invalid header'): ++ conn.putheader(name, value) ++ + + class BasicTest(TestCase): + def test_status_lines(self): +-- +2.9.0 + diff --git a/pypy3.spec b/pypy3.spec index e31b4d4..5666e56 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -156,6 +156,20 @@ Patch2: 007-remove-startup-message.patch #
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
Patch3: 008-maximum-recursion-depth.patch +# CVE-2016-0772 python: smtplib StartTLS stripping attack +# rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+# rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/d590114c2394
+# Raise an error when STARTTLS fails +Patch4: 009-raise-an-error-when-STARTTLS-fails.patch + +# CVE-2016-5699 python: http protocol steam injection attack +# rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+# rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+# Disabled HTTP header injections in http.client +Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -842,6 +856,17 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-6 +- Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack +- Raise an error when STARTTLS fails +- rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+- rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+- Fixed upstream:
https://hg.python.org/cpython/rev/d590114c2394
+- Fix for: CVE-2016-5699 python: http protocol steam injection attack +- rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+- rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+ * Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 - Fix FTBFS (#1307889) - Add patch to fix maximum recursion depth error during build commit 4a3038ff5634b498b5afbf2552eeec9ae5d6e03b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 13 02:07:16 2016 +0200 Fix FTBFS (#1307889) - Add patch to fix maximum recursion depth error during build - Don't use -g flag to prevent memory exhaustion - Add fix form Arch Linux to prevent VerificationError during the build diff --git a/008-maximum-recursion-depth.patch b/008-maximum-recursion-depth.patch new file mode 100644 index 0000000..6d3d157 --- /dev/null +++ b/008-maximum-recursion-depth.patch @@ -0,0 +1,179 @@ +diff --git a/rpython/jit/metainterp/blackhole.py b/rpython/jit/metainterp/blackhole.py +index 9b14943..b9d1c4c 100644 +--- a/rpython/jit/metainterp/blackhole.py ++++ b/rpython/jit/metainterp/blackhole.py +@@ -1052,35 +1052,45 @@ class BlackholeInterpreter(object): + + @arguments("cpu", "i", "R", "d", returns="i") + def bhimpl_residual_call_r_i(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, None, args_r, None, calldescr) + @arguments("cpu", "i", "R", "d", returns="r") + def bhimpl_residual_call_r_r(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, None, args_r, None, calldescr) + @arguments("cpu", "i", "R", "d") + def bhimpl_residual_call_r_v(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, None, args_r, None, calldescr) + + @arguments("cpu", "i", "I", "R", "d", returns="i") + def bhimpl_residual_call_ir_i(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, args_i, args_r, None, calldescr) + @arguments("cpu", "i", "I", "R", "d", returns="r") + def bhimpl_residual_call_ir_r(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, args_i, args_r, None, calldescr) + @arguments("cpu", "i", "I", "R", "d") + def bhimpl_residual_call_ir_v(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, args_i, args_r, None, calldescr) + + @arguments("cpu", "i", "I", "R", "F", "d", returns="i") + def bhimpl_residual_call_irf_i(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d", returns="r") + def bhimpl_residual_call_irf_r(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d", returns="f") + def bhimpl_residual_call_irf_f(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_f(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d") + def bhimpl_residual_call_irf_v(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, args_i, args_r, args_f, calldescr) + + # conditional calls - note that they cannot return stuff +@@ -1108,44 +1118,54 @@ class BlackholeInterpreter(object): + + @arguments("cpu", "j", "R", returns="i") + def bhimpl_inline_call_r_i(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "R", returns="r") + def bhimpl_inline_call_r_r(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "R") + def bhimpl_inline_call_r_v(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + + @arguments("cpu", "j", "I", "R", returns="i") + def bhimpl_inline_call_ir_i(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", returns="r") + def bhimpl_inline_call_ir_r(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "I", "R") + def bhimpl_inline_call_ir_v(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + + @arguments("cpu", "j", "I", "R", "F", returns="i") + def bhimpl_inline_call_irf_i(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F", returns="r") + def bhimpl_inline_call_irf_r(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F", returns="f") + def bhimpl_inline_call_irf_f(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_f(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F") + def bhimpl_inline_call_irf_v(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + +@@ -1438,6 +1458,8 @@ class BlackholeInterpreter(object): + if not self.nextblackholeinterp: + self._exit_frame_with_exception(current_exc) + return current_exc ++ finally: ++ workaround2200.active = False + # + # pass the frame's return value to the caller + caller = self.nextblackholeinterp +@@ -1656,3 +1678,10 @@ def convert_and_run_from_pyjitpl(metainterp, raising_exception=False): + current_exc = lltype.nullptr(rclass.OBJECTPTR.TO) + # + _run_forever(firstbh, current_exc) ++ ++# ____________________________________________________________ ++ ++class WorkaroundIssue2200(object): ++ pass ++workaround2200 = WorkaroundIssue2200() ++workaround2200.active = False +diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py +index ad81456..c820185 100644 +--- a/rpython/jit/metainterp/test/test_ajit.py ++++ b/rpython/jit/metainterp/test/test_ajit.py +@@ -4044,3 +4044,30 @@ class TestLLtype(BaseLLtypeTests, LLJitMixin): + res = self.interp_operations(f, [17]) + assert res == 42 + self.check_operations_history(guard_true=1, guard_false=0) ++ ++ def test_issue2200_recursion(self): ++ # Reproduces issue #2200. This test contains no recursion, ++ # but due to an unlikely combination of factors it ends up ++ # creating an RPython-level recursion, one per loop iteration. ++ # The recursion is: blackhole interp from the failing guard -> ++ # does the call to enter() as a normal call -> enter() runs ++ # can_enter_jit() as if we're interpreted -> we enter the JIT ++ # again from the start of the loop -> the guard fails again ++ # during the next iteration -> blackhole interp. All arrows ++ # in the previous sentence are one or more levels of RPython ++ # function calls. ++ driver = JitDriver(greens=[], reds=["i"]) ++ def enter(i): ++ driver.can_enter_jit(i=i) ++ def f(): ++ set_param(None, 'trace_eagerness', 999999) ++ i = 0 ++ while True: ++ driver.jit_merge_point(i=i) ++ i += 1 ++ if i >= 300: ++ return i ++ promote(i + 1) # a failing guard ++ enter(i) ++ ++ self.meta_interp(f, []) +diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py +index 805933e..ca47f03 100644 +--- a/rpython/jit/metainterp/warmstate.py ++++ b/rpython/jit/metainterp/warmstate.py +@@ -405,6 +405,14 @@ class WarmEnterState(object): + bound_reached(hash, None, *args) + return + ++ # Workaround for issue #2200, maybe temporary. This is not ++ # a proper fix, but only a hack that should work well enough ++ # for PyPy's main jitdriver... See test_issue2200_recursion ++ from rpython.jit.metainterp.blackhole import workaround2200 ++ if workaround2200.active: ++ workaround2200.active = False ++ return ++ + # Here, we have found 'cell'. + # + if cell.flags & (JC_TRACING | JC_TEMPORARY): diff --git a/pypy3.spec b/pypy3.spec index 53c2241..e31b4d4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -152,6 +152,9 @@ Patch1: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch2: 007-remove-startup-message.patch +#
https://bugzilla.redhat.com/show_bug.cgi?id=1307889
+#
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
+Patch3: 008-maximum-recursion-depth.patch # Build-time requirements: @@ -287,6 +290,20 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; +# Hacky fix to allow the curses module to build on x86_64; otherwise we get: +# cffi.ffiplatform.VerificationError: anonymous MEVENT: wrong total size +# (we have 24, but C compiler says 20) +#
https://github.com/archlinuxcn/repo/commit/560a75090333b6de8a1de960acac5e62…
+%ifarch x86_64 + _type=unsigned +%else + _type=uint32_t +%endif + +sed -i -e "s/typedef unsigned long mmask_t/typedef $_type mmask_t/" \ + -e "s/typedef unsigned long chtype/typedef $_type chtype/" \ + lib_pypy/_curses.py + %build BuildPyPy() { @@ -348,7 +365,8 @@ BuildPyPy() { # of root pointers: %global gcrootfinder_options --gcrootfinder=shadowstack - export CFLAGS=$(echo "$RPM_OPT_FLAGS") + # Prevent memory exhaustion + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-g//') %else # Go with the default, which is "asmgcc" @@ -367,7 +385,7 @@ BuildPyPy() { # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//' -e 's/-g//') %endif @@ -824,6 +842,12 @@ CheckPyPy %{name}-stackless %changelog +* Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 +- Fix FTBFS (#1307889) +- Add patch to fix maximum recursion depth error during build +- Don't use -g flag to prevent memory exhaustion +- Add fix form Arch Linux to prevent VerificationError during the build + * Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
commit 37de776457faff9eeedd146ed613f098a688d9cf Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Feb 4 18:47:53 2016 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 04952a9..53c2241 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+ * Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 - Bump release to rebuild with new execstack commit ffbf97517e896aea68cb51cb99a36e5bf95422e8 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Aug 4 11:50:06 2015 -0400 Bump release to rebuild with new execstack diff --git a/pypy3.spec b/pypy3.spec index afc59f7..04952a9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 +- Bump release to rebuild with new execstack + * Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
commit a039768e93ec1249319bb9b49149c6981717b0ab Author: Dennis Gilmore <dennis(a)ausil.us> Date: Thu Jun 18 18:15:59 2015 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index fbacd83..afc59f7 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+ * Wed Sep 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.4.0-1 - Update to 2.4.0 commit a7f7d048aa94963f46c11bea18071aef0fb8c954 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jun 11 11:40:02 2015 +0200 Sync with pypy diff --git a/pypy3.spec b/pypy3.spec index 6e6bd46..fbacd83 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -116,7 +116,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{version} +%global pypyprefix %{_libdir}/%{name}-%{version} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -129,11 +129,11 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/%{name}-%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy3 +Source2: macros.%{name} # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -217,7 +217,7 @@ BuildRequires: emacs BuildRequires: git # Metadata for the core package (the JIT build): -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -249,7 +249,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: pypy3%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -259,13 +259,13 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-2.4.0-src -p1 -S git +%autosetup -n %{name}-%{version}-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -410,7 +410,7 @@ BuildPyPy() { } BuildPyPy \ - pypy3 \ + %{name} \ %if 0%{with_jit} "-Ojit" \ %else @@ -420,7 +420,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - pypy3-stackless \ + %{name}-stackless \ "--stackless" %endif @@ -466,10 +466,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy pypy3 +InstallPyPy %{name} %if 0%{with_stackless} -InstallPyPy pypy3-stackless +InstallPyPy %{name}-stackless %endif @@ -572,16 +572,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/pypy3 \ + %{buildroot}/%{_bindir}/%{name} \ 0 -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import tkinter' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _curses' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import curses' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import syslog' -%{buildroot}/%{pypyprefix}/pypy3 -c 'from _sqlite3 import *' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/%{name} -c 'import tkinter' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _curses' +%{buildroot}/%{pypyprefix}/%{name} -c 'import curses' +%{buildroot}/%{pypyprefix}/%{name} -c 'import syslog' +%{buildroot}/%{pypyprefix}/%{name} -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -645,8 +645,8 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc %endif # Install macros for rpm: @@ -775,10 +775,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy3 +CheckPyPy %{name} %if 0%{with_stackless} -CheckPyPy pypy3-stackless +CheckPyPy %{name}-stackless %endif %endif # run_selftests @@ -800,26 +800,26 @@ CheckPyPy pypy3-stackless %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypy3trace-mode.el -%{_emacs_sitelispdir}/pypy3trace-mode.elc +%{_emacs_sitelispdir}/%{name}trace-mode.el +%{_emacs_sitelispdir}/%{name}trace-mode.elc %endif %files %license LICENSE %doc README.rst -%{_bindir}/pypy3 -%{pypyprefix}/pypy3 +%{_bindir}/%{name} +%{pypyprefix}/%{name} %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{_rpmconfigdir}/macros.d/macros.pypy3 +%{_rpmconfigdir}/macros.d/macros.%{name} %if 0%{with_stackless} %files stackless %license LICENSE %doc README.rst -%{_bindir}/pypy-stackless +%{_bindir}/%{name}-stackless %endif commit 908d523efb68df54d872af8a8c6324e0f8f7f106 Merge: ff9537b 5f5775a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun May 10 16:16:10 2015 +0200 Merge with pypy + package review (#1215732) history commit 5f5775aa52401c7c7261d2e610fa796420e51b9d Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun May 10 16:04:51 2015 +0200 Remove unused patches diff --git a/008-fix-dynamic-symbols-script.patch b/008-fix-dynamic-symbols-script.patch deleted file mode 100644 index 5b1d551..0000000 --- a/008-fix-dynamic-symbols-script.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py ---- a/pypy/translator/platform/posix.py -+++ b/pypy/translator/platform/posix.py -@@ -48,8 +48,10 @@ - response_file = self._make_response_file("dynamic-symbols-") - f = response_file.open("w") - f.write("{\n") -+ f.write(" global:\n") - for sym in eci.export_symbols: -- f.write("%s;\n" % (sym,)) -+ f.write(" %s;\n" % (sym,)) -+ f.write(" local:*;\n") - f.write("};") - f.close() - diff --git a/config.patch b/config.patch deleted file mode 100644 index bf81d7d..0000000 --- a/config.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py ---- pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:35:37.679237332 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:47:41.506354482 +0200 -@@ -32,19 +32,20 @@ class BaseLinux(BasePosix): - return self._pkg_config("libffi", "--libs-only-L", - ['/usr/lib/libffi']) - -- def library_dirs_for_libffi_a(self): -- # places where we need to look for libffi.a -- # XXX obscuuure! only look for libffi.a if run with translate.py -- if 'translate' in sys.modules: -- if sys.maxint > 2**32: -- host = 'x86_64' -- else: -- host = 'x86' -- return self.library_dirs_for_libffi() + [ -- '/usr/lib', -- '/usr/lib/%s-linux-gnu/' % host] -- else: -- return [] -+ #Fedora, at least, has the shared version but not the static: -+ #def library_dirs_for_libffi_a(self): -+ # # places where we need to look for libffi.a -+ # # XXX obscuuure! only look for libffi.a if run with translate.py -+ # if 'translate' in sys.modules: -+ # if sys.maxint > 2**32: -+ # host = 'x86_64' -+ # else: -+ # host = 'x86' -+ # return self.library_dirs_for_libffi() + [ -+ # '/usr/lib', -+ # '/usr/lib/%s-linux-gnu/' % host] -+ # else: -+ # return [] - - - class Linux(BaseLinux): diff --git a/more-readable-c-code.patch b/more-readable-c-code.patch deleted file mode 100644 index 92d340f..0000000 --- a/more-readable-c-code.patch +++ /dev/null @@ -1,693 +0,0 @@ -diff -up pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code pypy-pypy-release-1.7/pypy/interpreter/pycode.py ---- pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/interpreter/pycode.py 2011-11-21 16:16:15.673463780 -0500 -@@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non - from pypy.interpreter.astcompiler.consts import ( - CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, - CO_GENERATOR, CO_CONTAINSGLOBALS) -+from pypy.interpreter.pytraceback import offset2lineno - from pypy.rlib.rarithmetic import intmask - from pypy.rlib.debug import make_sure_not_resized - from pypy.rlib import jit -@@ -81,6 +82,7 @@ class PyCode(eval.Code): - self.hidden_applevel = hidden_applevel - self.magic = magic - self._signature = cpython_code_signature(self) -+ self._cached_source = None - self._initialize() - - def _initialize(self): -@@ -397,3 +399,23 @@ class PyCode(eval.Code): - - def repr(self, space): - return space.wrap(self.get_repr()) -+ -+ def get_linenum_for_offset(self, offset): -+ # Given a bytecode offset, return a 1-based index into the lines of the -+ # source code -+ return offset2lineno(self, offset) -+ -+ def _ensure_source(self): -+ # Lazily grab the source lines into self._cached_source (or raise -+ # an IOError) -+ if not self._cached_source: -+ f = open(self.co_filename, 'r') -+ source = [line.rstrip() for line in f.readlines()] -+ f.close() -+ self._cached_source = source -+ -+ def get_source_text(self, linenum): -+ # Given a 1-based index, get the corresponding line of source code (or -+ # raise an IOError) -+ self._ensure_source() -+ return self._cached_source[linenum - 1] -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/model.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/model.py 2011-11-21 16:15:36.599466455 -0500 -@@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden - - __metaclass__ = type - -+class SourceLoc(object): -+ # A srcloc is a specific location within the RPython source code, -+ # intended for human display -+ __slots__ = ('code', # code object -+ 'linenum' # 1-based index, as displayed to a user -+ ) -+ def __init__(self, code, linenum): -+ self.code = code -+ self.linenum = linenum -+ -+ def get_text(self): -+ # Get the actual source text of this line -+ return self.code.get_source_text(self.linenum) -+ -+ def __eq__(self, other): -+ return self.code == other.code and self.linenum == other.linenum -+ -+ def __ne__(self, other): -+ if other: -+ return self.code != other.code or self.linenum != other.linenum -+ else: -+ return True -+ -+class CodeLoc(object): -+ # A codeloc is a specific location within the RPython bytecode -+ __slots__ = ('code', # code object -+ 'offset' # int index into bytecode, or -1 -+ ) -+ -+ def __init__(self, code, offset): -+ self.code = code -+ self.offset = offset -+ -+ def __str__(self): -+ if self.offset >= 0: -+ return "%s@%d" % (self.code.co_name, self.offset) -+ else: -+ return "" -+ -+ def __ne__(self, other): -+ if other: -+ return self.code != other.code or self.offset != other.offset -+ else: -+ return True -+ -+ def __cmp__(self, other): -+ # Partial ordering, for those locations that have an offset: -+ if other: -+ if self.offset >= 0 and other.offset >= 0: -+ return self.offset - other.offset -+ return 0 -+ -+ def get_source_loc(self): -+ # Convert to a SourceLoc: -+ return SourceLoc(self.code, self.code.get_linenum_for_offset(self.offset)) -+ -+class OperationLoc(object): -+ # An oploc is the location within the RPython source code of a given -+ # operation -+ # -+ # This is a list consisting of CodeLoc instances, some of which may be None -+ # -+ # For the simple case, this is list of length 1 with a single CodeLoc -+ # -+ # For an operation inside an inlined callsite, we have a list of length 2: -+ # [codeloc of callsite, -+ # codeloc of operation within inlined body] -+ # -+ # For more interesting inlined cases, we have a chain of source locations: -+ # [codeloc of callsite, -+ # codeloc of inner callsite, -+ # ... , -+ # codeloc of innermost inlined callsite, -+ # codeloc of operation within inlined body] -+ # -+ -+ __slots__ = ('codelocs', ) -+ -+ def __init__(self, codelocs): -+ self.codelocs = codelocs -+ -+ def __str__(self): -+ return '[' + ' > '.join(str(codeloc) for codeloc in self.codelocs) + ']' -+ -+ def __cmp__(self, other): -+ return cmp(self.codelocs, other.codelocs) -+ -+def block_comparator(blk0, blk1): -+ ''' -+ Sort function for blocks, putting them in an ordering that attempts to -+ maximize readability of the generated C code -+ ''' -+ # print 'comparing %r and %r' % (blk0, blk1) -+ # Put the start/end block at the top/bottom: -+ if blk0.isstartblock: -+ return -1 -+ -+ if blk1.isstartblock: -+ return 1 -+ -+ # Order blocks by the offset, where present: -+ if blk0.operations: -+ if blk1.operations: -+ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) -+ else: -+ return -1 -+ else: -+ if blk1.operations: -+ return 1 -+ else: -+ return 0 -+ -+def edge_comparator(edge0, edge1): -+ return block_comparator(edge0.target, edge1.target) - - class FunctionGraph(object): - __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] -@@ -94,6 +208,21 @@ class FunctionGraph(object): - seen[block] = True - stack += block.exits[::-1] - -+ def iterblocks_by_source(self): -+ # Try to preserve logical source ordering in the blocks -+ block = self.startblock -+ yield block -+ seen = {block: True} -+ stack = list(block.exits[::-1]) -+ stack.sort(edge_comparator) -+ while stack: -+ block = stack.pop().target -+ if block not in seen: -+ yield block -+ seen[block] = True -+ stack += block.exits[::-1] -+ stack.sort(edge_comparator) -+ - def iterlinks(self): - block = self.startblock - seen = {block: True} -@@ -183,14 +312,14 @@ class Block(object): - self.exits = [] # list of Link(s) - - def at(self): -- if self.operations and self.operations[0].offset >= 0: -- return "@%d" % self.operations[0].offset -+ if self.operations: -+ return str(self.operations[0].oploc) - else: - return "" - - def __str__(self): - if self.operations: -- txt = "block@%d" % self.operations[0].offset -+ txt = "block%s" % self.operations[0].oploc - else: - if (not self.exits) and len(self.inputargs) == 1: - txt = "return block" -@@ -245,6 +374,21 @@ class Block(object): - from pypy.translator.tool.graphpage import try_show - try_show(self) - -+ def isreturnblock(self): -+ return (not self.operations) and (not self.exits) and len(self.inputargs) == 1 -+ -+ def get_base_label(self, blocknum): -+ # Generate a more friendly C label for this block -+ if self.operations: -+ txt = "block" -+ elif (not self.exits) and len(self.inputargs) == 1: -+ txt = "return_block" -+ elif (not self.exits) and len(self.inputargs) == 2: -+ txt = "raise_block" -+ else: -+ txt = "codeless_block" -+ return '%s%d' % (txt, blocknum) -+ - - class Variable(object): - __slots__ = ["_name", "_nr", "concretetype"] -@@ -331,13 +475,15 @@ class WrapException(Exception): - - - class SpaceOperation(object): -- __slots__ = "opname args result offset".split() -+ __slots__ = "opname args result oploc".split() - -- def __init__(self, opname, args, result, offset=-1): -+ def __init__(self, opname, args, result, oploc=None): - self.opname = intern(opname) # operation name - self.args = list(args) # mixed list of var/const - self.result = result # either Variable or Constant instance -- self.offset = offset # offset in code string -+ if oploc is None: -+ oploc = OperationLoc([None]) -+ self.oploc = oploc - - def __eq__(self, other): - return (self.__class__ is other.__class__ and -@@ -352,8 +498,9 @@ class SpaceOperation(object): - return hash((self.opname,tuple(self.args),self.result)) - - def __repr__(self): -- return "%r = %s(%s)" % (self.result, self.opname, -- ", ".join(map(repr, self.args))) -+ return "%r = %s(%s) (%s)" % (self.result, self.opname, -+ ", ".join(map(repr, self.args)), -+ self.oploc) - - class Atom(object): - def __init__(self, name): -@@ -427,8 +574,7 @@ def copygraph(graph, shallow=False, varm - for op in oplist: - copyop = SpaceOperation(op.opname, - [copyvar(v) for v in op.args], -- copyvar(op.result), op.offset) -- #copyop.offset = op.offset -+ copyvar(op.result), op.oploc) - result.append(copyop) - return result - newblock.operations = copyoplist(block.operations) -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py 2011-11-21 16:15:36.600466455 -0500 -@@ -315,7 +315,9 @@ class FlowObjSpace(ObjSpace): - def do_operation(self, name, *args_w): - spaceop = SpaceOperation(name, args_w, Variable()) - if hasattr(self, 'executioncontext'): # not here during bootstrapping -- spaceop.offset = self.executioncontext.crnt_offset -+ codeloc = CodeLoc(self.executioncontext.code, -+ self.executioncontext.crnt_offset) -+ spaceop.oploc = OperationLoc([codeloc]) - self.executioncontext.recorder.append(spaceop) - return spaceop.result - -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py 2011-11-21 16:15:36.600466455 -0500 -@@ -119,3 +119,25 @@ def test_variable(): - assert v2.renamed - assert v2.name.startswith("foobar_") and v2.name != v.name - assert v2.name.split('_', 1)[1].isdigit() -+ -+def test_source_locations(): -+ # Invent some random offsets into the code: -+ co = sample_function.__code__ -+ codelocA = CodeLoc(co, 42) -+ codelocB = CodeLoc(co, 87) -+ -+ assert str(codelocA) == 'sample_function@42' -+ assert str(codelocB) == 'sample_function@87' -+ -+ assert cmp(codelocA, codelocB) < 0 -+ assert cmp(codelocB, codelocA) > 0 -+ -+ oplocA = OperationLoc([codelocA]) -+ oplocB = OperationLoc([codelocB]) -+ -+ assert str(oplocA) == '[sample_function@42]' -+ assert str(oplocB) == '[sample_function@87]' -+ -+ assert cmp(oplocA, oplocB) < 0 -+ assert cmp(oplocB, oplocA) > 0 -+ -diff -up pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/rpython/rtyper.py ---- pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/rpython/rtyper.py 2011-11-21 16:15:36.601466455 -0500 -@@ -800,7 +800,7 @@ class HighLevelOp(object): - return vars - - def genop(self, opname, args_v, resulttype=None): -- return self.llops.genop(opname, args_v, resulttype) -+ return self.llops.genop(opname, args_v, resulttype, self.spaceop.oploc) - - def gendirectcall(self, ll_function, *args_v): - return self.llops.gendirectcall(ll_function, *args_v) -@@ -935,7 +935,7 @@ class LowLevelOpList(list): - v.concretetype)) - return v - -- def genop(self, opname, args_v, resulttype=None): -+ def genop(self, opname, args_v, resulttype=None, oploc=None): - try: - for v in args_v: - v.concretetype -@@ -944,7 +944,7 @@ class LowLevelOpList(list): - " and pass its result to genop()," - " never hop.args_v directly.") - vresult = Variable() -- self.append(SpaceOperation(opname, args_v, vresult)) -+ self.append(SpaceOperation(opname, args_v, vresult, oploc)) - if resulttype is None: - vresult.concretetype = Void - return None -diff -up pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py ---- pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py 2011-11-21 16:15:36.601466455 -0500 -@@ -4,6 +4,7 @@ from pypy.translator.simplify import get - from pypy.translator.unsimplify import copyvar - from pypy.objspace.flow.model import Variable, Constant, Block, Link - from pypy.objspace.flow.model import SpaceOperation, c_last_exception -+from pypy.objspace.flow.model import OperationLoc - from pypy.objspace.flow.model import FunctionGraph - from pypy.objspace.flow.model import mkentrymap, checkgraph - from pypy.annotation import model as annmodel -@@ -231,6 +232,7 @@ class BaseInliner(object): - self.varmap = {} - self._copied_blocks = {} - self.op = block.operations[index_operation] -+ self.callsite_oploc = self.op.oploc - self.graph_to_inline = self.get_graph_from_op(self.op) - self.exception_guarded = False - if (block.exitswitch == c_last_exception and -@@ -290,7 +292,9 @@ class BaseInliner(object): - - def copy_operation(self, op): - args = [self.get_new_name(arg) for arg in op.args] -- result = SpaceOperation(op.opname, args, self.get_new_name(op.result)) -+ new_oploc = OperationLoc(self.callsite_oploc.codelocs[:] + op.oploc.codelocs[:]) -+ result = SpaceOperation(op.opname, args, self.get_new_name(op.result), -+ new_oploc) - return result - - def copy_block(self, block): -diff -up pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/funcgen.py ---- pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/c/funcgen.py 2011-11-21 16:15:36.602466455 -0500 -@@ -1,4 +1,6 @@ - import sys -+import inspect -+import dis - from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring - from pypy.translator.c.support import cdecl - from pypy.translator.c.support import llvalue_from_constant, gen_assignments -@@ -22,6 +24,38 @@ LOCALVAR = 'l_%s' - - KEEP_INLINED_GRAPHS = False - -+def block_comparator(blk0, blk1): -+ ''' -+ Sort function for blocks, putting them in an ordering that attempts to -+ maximize readability of the generated C code -+ ''' -+ # print 'comparing %r and %r' % (blk0, blk1) -+ # Put the start/end block at the top/bottom: -+ if blk0.isstartblock: -+ return -1 -+ -+ if blk1.isstartblock: -+ return 1 -+ -+ # Order blocks by the offset, where present: -+ if blk0.operations: -+ if blk1.operations: -+ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) -+ else: -+ return -1 -+ else: -+ if blk1.operations: -+ return 1 -+ else: -+ return 0 -+ -+def escape_c_comments(py_src): -+ # Escape C comments within RPython source, to avoid generating bogus -+ # comments in our generated C source: -+ py_src = py_src.replace('/*', '') -+ py_src = py_src.replace('*/', '') -+ return py_src -+ - class FunctionCodeGenerator(object): - """ - Collects information about a function which we have to generate -@@ -207,14 +241,57 @@ class FunctionCodeGenerator(object): - - def cfunction_body(self): - graph = self.graph -- yield 'goto block0;' # to avoid a warning "this label is not used" -+ # Try to print python source code: -+ if hasattr(graph, 'func'): -+ filename = inspect.getfile(graph.func) -+ #yield '/* name: %r */' % filename -+ try: -+ src, startline = inspect.getsourcelines(graph.func) -+ except IOError: -+ pass # No source found -+ except IndexError: -+ pass # Bulletproofing -+ else: -+ yield '/* Python source %r' % filename -+ for i, line in enumerate(src): -+ line = line.rstrip() -+ line = escape_c_comments(line) -+ # FuncNode.funcgen_implementation treats lines ending in ':' -+ # as C blocks, which messes up the formatting. -+ # Work around this: -+ if line.endswith(':'): -+ line += ' ' -+ yield ' * %4d : %s' % (startline + i, line) -+ yield ' */' -+ -+ label = graph.startblock.get_base_label(self.blocknum[graph.startblock]) -+ yield 'goto %s;' % label # to avoid a warning "this label is not used" -+ -+ # Sort the blocks into a (hopefully) readable order: -+ blocks = list(graph.iterblocks_by_source()) -+ blocks.sort(block_comparator) - - # generate the body of each block -- for block in graph.iterblocks(): -+ for block in blocks: -+ cursrcloc = None - myblocknum = self.blocknum[block] - yield '' -- yield 'block%d:' % myblocknum -+ yield '%s:' % block.get_base_label(myblocknum) -+ #yield "/* repr(block): %r */" % (block, ) -+ #yield "/* type(block): %r */" % (type(block), ) - for i, op in enumerate(block.operations): -+ #yield "/* type(op): %r */" % (type(op), ) -+ #yield "/* op.oploc: %s */" % (op.oploc, ) -+ codeloc = op.oploc.codelocs[-1] -+ if codeloc: -+ srcloc = codeloc.get_source_loc() -+ if srcloc != cursrcloc: -+ try: -+ yield "/* %s:%d : %s */" % (codeloc.code.co_name, srcloc.linenum, escape_c_comments(srcloc.get_text())) -+ cursrcloc = srcloc -+ except IOError: -+ pass -+ - for line in self.gen_op(op): - yield line - if len(block.exits) == 0: -@@ -306,7 +383,7 @@ class FunctionCodeGenerator(object): - assignments.append((a2typename, dest, src)) - for line in gen_assignments(assignments): - yield line -- label = 'block%d' % self.blocknum[link.target] -+ label = link.target.get_base_label(self.blocknum[link.target]) - if link.target in self.innerloops: - loop = self.innerloops[link.target] - if link is loop.links[-1]: # link that ends a loop -diff -up pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py ---- pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py 2011-11-21 16:15:36.602466455 -0500 -@@ -1,4 +1,5 @@ - import autopath, sys, os, py -+import re - from pypy.rpython.lltypesystem.lltype import * - from pypy.annotation import model as annmodel - from pypy.translator.translator import TranslationContext -@@ -532,3 +533,130 @@ def test_inhibit_tail_call(): - else: - assert 0, "the call was not found in the C source" - assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] -+ -+def get_generated_c_source(fn, types): -+ # Return a (optimized fn, c source code, c source filename) 3-tuple -+ t = Translation(fn) -+ t.annotate(types) -+ c_filename_path = t.source_c() -+ h = c_filename_path.open() -+ src = h.read() -+ h.close() -+ c_fn = t.compile_c() -+ return (c_fn, src, c_filename_path) -+ -+def extract_c_function(c_src, fname): -+ # Extract the source for a given C function out of a the given src string -+ # Makes assumptions about the layout of the source -+ pattern = '^(.+) \**%s\(.*\) {$' % fname -+ within_fn = False -+ result = '' -+ for line in c_src.splitlines(): -+ if within_fn: -+ result += line + '\n' -+ if line.startswith('}'): -+ return result -+ else: -+ m = re.match(pattern, line) -+ if m: -+ within_fn = True -+ result += line + '\n' -+ return result -+ -+ -+ -+def test_generated_c_source(): -+ # Verify that generate C source "looks good" -+ # We'll use is_perfect_number, as it contains a loop and a conditional -+ -+ # Generate C source code -+ from pypy.translator.test.snippet import is_perfect_number -+ c_fn, c_src, c_filename_path = get_generated_c_source(is_perfect_number, -+ [int]) -+ -+ # Locate the C source for the type-specialized function: -+ c_fn_src = extract_c_function(c_src, 'pypy_g_is_perfect_number') -+ -+ # Verify that the C source contains embedded comments containing the lines -+ # of the python source: -+ expected_comment_lines = [ -+ '/* is_perfect_number:31 : while div < n: */', -+ '/* is_perfect_number:32 : if n % div == 0: */', -+ '/* is_perfect_number:33 : sum += div */', -+ '/* is_perfect_number:34 : div += 1 */', -+ '/* is_perfect_number:35 : return n == sum */'] -+ for exp_line in expected_comment_lines: -+ assert exp_line in c_fn_src -+ -+ # Verify that the lines occur in the correct order -+ # ...we do this by filtering the function's generated C source to just -+ # those lines containing our comments (and dropping whitespace): -+ lines = c_fn_src.splitlines() -+ lines = [line.strip() -+ for line in lines -+ if '/* is_perfect_number:' in line] -+ -+ # ...we should now have exact equality: the ordering should be as expected, -+ # and each comment should appear exactly once: -+ assert lines == expected_comment_lines -+ -+ # Ensure that the generated C function does the right thing: -+ assert c_fn(5) == False -+ assert c_fn(6) == True -+ assert c_fn(7) == False -+ -+ assert c_fn(5.0) == False -+ assert c_fn(6.0) == True -+ assert c_fn(7.0) == False -+ -+ assert c_fn(5L) == False -+ assert c_fn(6L) == True -+ assert c_fn(7L) == False -+ -+ try: -+ c_fn('hello world') -+ except: -+ pass -+ else: -+ raise 'Was expected exception' -+ -+def test_escaping_c_comments(): -+ # Ensure that c comments within RPython code get escaped when we generate -+ # our .c code (to avoid generating bogus C) -+ # See e.g. pypy.module.cpyext.dictobject's PyDict_Next, which has a -+ # docstring embedding a C comment -+ def c_style_comment(a, b): -+ '''Here is a C-style comment within an RPython docstring: -+ /* hello world */ -+ ''' -+ # and here's one in a string literal: -+ return '/* hello world a:%s b:%s */' % (a, b) -+ -+ def cplusplus_style_comment(a, b): -+ '''Here is a C++-style comment within an RPython docstring: -+ // hello world -+ ''' -+ # and here are some in string literals, and one as the floor division -+ # operator: -+ return '// hello world: a // b = %s' % (a // b) -+ -+ for fn_name, exp_output in [('c_style_comment', -+ '/* hello world a:6 b:3 */'), -+ ('cplusplus_style_comment', -+ '// hello world: a // b = 2')]: -+ fn = locals()[fn_name] -+ -+ c_fn, c_src, c_filename_path = get_generated_c_source(fn, [int, int]) -+ # If the above survived, then the C compiler managed to handle -+ # the generated C code -+ -+ # Verify that the generated code works (i.e. that we didn't -+ # accidentally change the meaning): -+ assert c_fn(6, 3) == exp_output -+ -+ # Ensure that at least part of the docstrings made it into the C -+ # code: -+ c_fn_src = extract_c_function(c_src, 'pypy_g_' + fn_name) -+ assert 'Here is a ' in c_fn_src -+ assert 'style comment within an RPython docstring' in c_fn_src -+ -diff -up pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/driver.py ---- pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/driver.py 2011-11-21 16:15:36.603466455 -0500 -@@ -535,6 +535,7 @@ class TranslationDriver(SimpleTaskEngine - dstname = self.compute_exe_name() + '.staticdata.info' - shutil.copy(str(fname), str(dstname)) - self.log.info('Static data info written to %s' % dstname) -+ return c_source_filename - - # - task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -up pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/gensupp.py ---- pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/gensupp.py 2011-11-21 16:15:36.603466455 -0500 -@@ -14,8 +14,8 @@ def ordered_blocks(graph): - allblocks = [] - for block in graph.iterblocks(): - # first we order by offset in the code string -- if block.operations: -- ofs = block.operations[0].offset -+ if block.operations and block.operations[0].oploc.codelocs[0]: -+ ofs = block.operations[0].oploc.codelocs[0].offset - else: - ofs = sys.maxint - # then we order by input variable name or value -diff -up pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/interactive.py ---- pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/interactive.py 2011-11-21 16:15:36.604466454 -0500 -@@ -138,7 +138,7 @@ class Translation(object): - def source_c(self, argtypes=None, **kwds): - self.update_options(argtypes, kwds) - self.ensure_backend('c') -- self.driver.source_c() -+ return self.driver.source_c() - - def source_cl(self, argtypes=None, **kwds): - self.update_options(argtypes, kwds) -diff -up pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py ---- pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py 2011-11-21 16:15:36.604466454 -0500 -@@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam - # "return result" - block = Block(wrapper_inputargs) - wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) -+ if hasattr(graph, 'func'): -+ wgraph.func = graph.func - translator.update_call_graph(wgraph, graph, object()) - translator.graphs.append(wgraph) - block.operations[:] = newops -diff -up pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/simplify.py ---- pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/simplify.py 2011-11-21 16:15:36.605466454 -0500 -@@ -292,7 +292,7 @@ def join_blocks(graph): - return renaming.get(v, v) - def rename_op(op): - args = [rename(a) for a in op.args] -- op = SpaceOperation(op.opname, args, rename(op.result), op.offset) -+ op = SpaceOperation(op.opname, args, rename(op.result), op.oploc) - # special case... - if op.opname == 'indirect_call': - if isinstance(op.args[0], Constant): diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch deleted file mode 100644 index 2391f32..0000000 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py ---- pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-27 10:35:37.762237806 +0200 -+++ pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-28 10:13:03.182536196 +0200 -@@ -587,7 +587,7 @@ class ProcessTestCase(BaseTestCase): - for i in range(1024): - # Windows raises IOError. Others raise OSError. - with self.assertRaises(EnvironmentError) as c: -- subprocess.Popen(['nonexisting_i_hope'], -+ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - # ignore errors that indicate the command was not found commit ff9537b3ed920fc031a5b18ab8b27efd0a194202 Author: Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> Date: Fri May 8 17:05:34 2015 +0000 Initial setup of the repo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 commit 36afc7f79102c83960c3d6bf8f4a8620554c0137 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue May 5 18:32:38 2015 +0200 Replace all lib-python python shebangs with pypy diff --git a/pypy3.spec b/pypy3.spec index edbfd2f..6e6bd46 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -281,6 +281,11 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done +# Replace all lib-python python shebangs with pypy +find lib-python/%{pylibver} -name "*.py" -exec \ + sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \ + "{}" \ + \; %build commit 976314ef808d7b7dbe2bc8961a5de2deae1cdc9f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:49:51 2015 +0200 Build with pypy diff --git a/pypy3.spec b/pypy3.spec index 218ce3e..edbfd2f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -161,7 +161,9 @@ Patch2: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -%global use_self_when_building 0 +# Note, pypy3 is built with pypy2, so no dependency cycle + +%global use_self_when_building 1 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy commit 980f988cc4d495d359155cf3c1d12b2dfc81a08f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:48:44 2015 +0200 BR git for %autosetup -S git diff --git a/pypy3.spec b/pypy3.spec index 77ffa2d..218ce3e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -211,6 +211,8 @@ BuildRequires: /usr/bin/execstack BuildRequires: emacs %endif +# For %%autosetup -S git +BuildRequires: git # Metadata for the core package (the JIT build): Requires: pypy3-libs%{?_isa} = %{version}-%{release} commit 819b9f5595c2ac93d1a8a693a647a006f2c9bbc0 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:47:32 2015 +0200 Use %global instead of %define diff --git a/pypy3.spec b/pypy3.spec index e992b00..77ffa2d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -337,14 +337,14 @@ BuildPyPy() { # This is the most portable option, and avoids a reliance on non-guaranteed # behaviors within GCC's code generator: use an explicitly-maintained stack # of root pointers: - %define gcrootfinder_options --gcrootfinder=shadowstack + %global gcrootfinder_options --gcrootfinder=shadowstack export CFLAGS=$(echo "$RPM_OPT_FLAGS") %else # Go with the default, which is "asmgcc" - %define gcrootfinder_options %{nil} + %global gcrootfinder_options %{nil} #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
# The generated Makefile compiles the .c files into assembler (.s), rather commit 524d40e5a2091088f5a28f16c996b757acbeb06b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 20:05:42 2015 +0200 Remove build script from the package diff --git a/pypy3.spec b/pypy3.spec index 3b40c9a..e992b00 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -644,6 +644,9 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d +# Remove build script from the package +rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py + %check topdir=$(pwd) commit cfca1560fdf042a07e2f7108eafc072b93f2617c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 20:01:21 2015 +0200 Use git in %autosetup to avoid .orig files diff --git a/pypy3.spec b/pypy3.spec index 2f9ed15..3b40c9a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -261,7 +261,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-2.4.0-src -p1 +%autosetup -n pypy3-2.4.0-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ commit 1120251a081f3a611d8d3f742b184985833e9998 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 19:58:39 2015 +0200 Change python-devel to python2-devel diff --git a/pypy3.spec b/pypy3.spec index 0c5b340..2f9ed15 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -170,7 +170,7 @@ BuildRequires: pypy # pypy3 can only be build with python2 -BuildRequires: python-devel +BuildRequires: python2-devel %global bootstrap_python_interp python %endif commit a7610e26e5c7a0bbaa8a7810daa04a625ae357af Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 19:51:45 2015 +0200 Don't mark RPM macros in /etc as %config diff --git a/pypy3.spec b/pypy3.spec index d9e54fd..0c5b340 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -801,7 +801,7 @@ CheckPyPy pypy3-stackless %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 +%{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless commit 7e82938b0f41850371be195e7be814fedd889d08 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:35:23 2015 +0200 Share the docdir across subpackages diff --git a/pypy3.spec b/pypy3.spec index 85a2dfc..d9e54fd 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -771,6 +771,10 @@ CheckPyPy pypy3-stackless %endif # run_selftests +# Because there's a bunch of binary subpackages and creating +# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that +# is just confusing for the user. +%global _docdir_fmt %{name} %files libs %license LICENSE commit 1842b1b13e95edfcea412981ed8f4cbe3e7a8383 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:26:21 2015 +0200 Require pypy3-libs with %{?_isa} diff --git a/pypy3.spec b/pypy3.spec index 93e53f0..85a2dfc 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -213,7 +213,7 @@ BuildRequires: emacs # Metadata for the core package (the JIT build): -Requires: pypy3-libs = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -245,7 +245,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: pypy3 = %{version}-%{release} +Requires: pypy3%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -255,7 +255,7 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif commit 7e5676a0456e5e3c711d481fe1e949c0448975ec Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:24:57 2015 +0200 Use %autosetup diff --git a/pypy3.spec b/pypy3.spec index 99c2a31..93e53f0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -261,10 +261,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%setup -q -n pypy3-2.4.0-src -%patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build -%patch1 -p1 -%patch2 -p1 +%autosetup -n pypy3-2.4.0-src -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ commit e7218e672da6a8e5c553080c36c8e72087e55817 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:16:19 2015 +0200 Use %license diff --git a/pypy3.spec b/pypy3.spec index 5bee793..99c2a31 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -776,7 +776,8 @@ CheckPyPy pypy3-stackless %files libs -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python @@ -791,7 +792,8 @@ CheckPyPy pypy3-stackless %endif %files -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{_bindir}/pypy3 %{pypyprefix}/pypy3 @@ -802,7 +804,8 @@ CheckPyPy pypy3-stackless %if 0%{with_stackless} %files stackless -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{_bindir}/pypy-stackless %endif commit 146960e8a0ae6b7d82f10d6a2c24e60cf3eadd59 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:15:27 2015 +0200 Removed deprecated statements diff --git a/pypy3.spec b/pypy3.spec index 95ee959..5bee793 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -10,7 +10,6 @@ Group: Development/Languages # licensing terms License: MIT and Python and UCD URL:
http://pypy.org/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # High-level configuration of the build: @@ -425,8 +424,6 @@ BuildPyPy \ %install -rm -rf $RPM_BUILD_ROOT - # Install the various executables: InstallPyPy() { @@ -778,12 +775,7 @@ CheckPyPy pypy3-stackless %endif # run_selftests -%clean -rm -rf $RPM_BUILD_ROOT - - %files libs -%defattr(-,root,root,-) %doc LICENSE README.rst %dir %{pypyprefix} @@ -799,20 +791,17 @@ rm -rf $RPM_BUILD_ROOT %endif %files -%defattr(-,root,root,-) %doc LICENSE README.rst %{_bindir}/pypy3 %{pypyprefix}/pypy3 %files devel -%defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h %config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless -%defattr(-,root,root,-) %doc LICENSE README.rst %{_bindir}/pypy-stackless %endif commit 26c3863db65451cb67c67cd4e72a826698ef7bdf Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Apr 25 00:48:59 2015 +0200 Change pypy2 spec to pypy3 diff --git a/.gitignore b/.gitignore index a61aa79..c9f3d9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1 @@ -/pypy-1.4.1-src.tar.bz2 -/pypy-1.5-src.tar.bz2 -/release-1.6.tar.bz2 -/release-1.7.tar.bz2 -/release-1.8.tar.bz2 -/release-1.9.tar.bz2 -/release-2.0-beta-1.tar.bz2 -/release-2.0.2.tar.bz2 -/release-2.1.0.tar.bz2 -/pypy-2.2-src.tar.bz2 -/pypy-2.2.1-src.tar.bz2 -/pypy-2.3-src.tar.bz2 -/release-2.3.1.tar.bz2 -/pypy-2.4.0-src.tar.bz2 +/pypy3-2.4.0-src.tar.bz2 diff --git a/macros.pypy b/macros.pypy deleted file mode 100644 index 5f40b6f..0000000 --- a/macros.pypy +++ /dev/null @@ -1,5 +0,0 @@ -%__pypy /usr/bin/pypy -%pypy_sitelib %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -%pypy_sitearch %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") -%pypy_version %(%{__pypy} -c "import sys; sys.stdout.write(sys.version[:3])") -%pypydir %{_builddir}/pypy-%{name}-%{version}-%{release} diff --git a/macros.pypy3 b/macros.pypy3 new file mode 100644 index 0000000..ef1f600 --- /dev/null +++ b/macros.pypy3 @@ -0,0 +1,5 @@ +%__pypy3 /usr/bin/pypy3 +%pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") +%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3dir %{_builddir}/pypy3-%{name}-%{version}-%{release} diff --git a/pypy.spec b/pypy3.spec similarity index 94% rename from pypy.spec rename to pypy3.spec index 4a3e56c..95ee959 100644 --- a/pypy.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ -Name: pypy +Name: pypy3 Version: 2.4.0 Release: 1%{?dist} -Summary: Python implementation with a Just-In-Time compiler +Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages # LGPL and another free license we'd need to ask spot about are present in some @@ -117,8 +117,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy-%{version} -%global pylibver 2.7 +%global pypyprefix %{_libdir}/pypy3-%{version} +%global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -130,11 +130,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy +Source2: macros.pypy3 # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -164,19 +164,15 @@ Patch2: 007-remove-startup-message.patch %global use_self_when_building 0 %if 0%{use_self_when_building} +# pypy3 can only be build with pypy2 BuildRequires: pypy %global bootstrap_python_interp pypy %else -# Python 2.6 or later is needed, so on RHEL5 (2.4) we need to use the alternate -# python26 rpm: -%if 0%{?rhel} == 5 -BuildRequires: python26-devel -%global bootstrap_python_interp python26 -%else + +# pypy3 can only be build with python2 BuildRequires: python-devel %global bootstrap_python_interp python -%endif %endif @@ -218,10 +214,10 @@ BuildRequires: emacs # Metadata for the core package (the JIT build): -Requires: pypy-libs = %{version}-%{release} +Requires: pypy3-libs = %{version}-%{release} %description -PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU +PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations of the standard types (strings, dictionaries, etc) @@ -235,7 +231,7 @@ CPU architecture. %package libs Group: Development/Languages -Summary: Run-time libraries used by PyPy implementations of Python +Summary: Run-time libraries used by PyPy implementations of Python 3 # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) @@ -244,39 +240,29 @@ Requires: emacs-filesystem >= %{_emacs_version} %endif %description libs -Libraries required by the various PyPy implementations of Python. +Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages -Summary: Development tools for working with PyPy -Requires: pypy = %{version}-%{release} +Summary: Development tools for working with PyPy3 +Requires: pypy3 = %{version}-%{release} %description devel -Header files for building C extension modules against PyPy +Header files for building C extension modules against PyPy3 %if 0%{with_stackless} %package stackless Group: Development/Languages -Summary: Stackless Python interpreter built using PyPy -Requires: pypy-libs = %{version}-%{release} +Summary: Stackless Python interpreter built using PyPy3 +Requires: pypy3-libs = %{version}-%{release} %description stackless -Build of PyPy with support for micro-threads for massive concurrency +Build of PyPy3 with support for micro-threads for massive concurrency %endif -%if 0%{with_stackless} -%package stackless -Group: Development/Languages -Summary: Stackless Python interpreter built using PyPy -Requires: pypy-libs = %{version}-%{release} -%description stackless -Build of PyPy with support for micro-threads for massive concurrency -%endif - - %prep -%setup -q -n pypy-2.4.0-src +%setup -q -n pypy3-2.4.0-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -295,8 +281,6 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done -rm -rf lib-python/3 - %build @@ -421,7 +405,7 @@ BuildPyPy() { } BuildPyPy \ - pypy \ + pypy3 \ %if 0%{with_jit} "-Ojit" \ %else @@ -431,7 +415,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - pypy-stackless \ + pypy3-stackless \ "--stackless" %endif @@ -479,10 +463,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy pypy +InstallPyPy pypy3 %if 0%{with_stackless} -InstallPyPy pypy-stackless +InstallPyPy pypy3-stackless %endif @@ -585,16 +569,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/pypy \ + %{buildroot}/%{_bindir}/pypy3 \ 0 -%{buildroot}/%{pypyprefix}/pypy -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/pypy -c 'import Tkinter' -%{buildroot}/%{pypyprefix}/pypy -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/pypy -c 'import _curses' -%{buildroot}/%{pypyprefix}/pypy -c 'import curses' -%{buildroot}/%{pypyprefix}/pypy -c 'import syslog' -%{buildroot}/%{pypyprefix}/pypy -c 'from _sqlite3 import *' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import tkinter' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _curses' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import curses' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy3 -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -658,7 +642,8 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: @@ -694,7 +679,7 @@ CheckPyPy() { # Use regrtest to explicitly list all tests: ( ./$ExeName -c \ - "from test.regrtest import findtests; print '\n'.join(findtests())" + "from test.regrtest import findtests; print('\n'.join(findtests()))" ) > testnames.txt # Skip some tests: @@ -784,10 +769,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy +CheckPyPy pypy3 %if 0%{with_stackless} -CheckPyPy pypy-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -809,21 +794,21 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypytrace-mode.el -%{_emacs_sitelispdir}/pypytrace-mode.elc +%{_emacs_sitelispdir}/pypy3trace-mode.el +%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif %files %defattr(-,root,root,-) %doc LICENSE README.rst -%{_bindir}/pypy -%{pypyprefix}/pypy +%{_bindir}/pypy3 +%{pypyprefix}/pypy3 %files devel %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy +%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless diff --git a/sources b/sources index ab6b8f5..e4d98b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6a25a212e7c5121f1f3988c118d05695 pypy-2.4.0-src.tar.bz2 +96ba72916114d16904e12562b5d84e51 pypy3-2.4.0-src.tar.bz2 commit e76c4a29685bfaf725af1ae1991d5b1fb7b7701c Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 23 12:20:25 2014 +0200 Update to 2.4.0 diff --git a/.gitignore b/.gitignore index 1babd6b..a61aa79 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /pypy-2.2.1-src.tar.bz2 /pypy-2.3-src.tar.bz2 /release-2.3.1.tar.bz2 +/pypy-2.4.0-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index daf5015..4a3e56c 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.3.1 -Release: 4%{?dist} +Version: 2.4.0 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.3.1.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -276,7 +276,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-32f35069a16d +%setup -q -n pypy-2.4.0-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -295,6 +295,8 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done +rm -rf lib-python/3 + %build @@ -832,6 +834,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Sep 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.4.0-1 +- Update to 2.4.0 + * Tue Sep 02 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-4 - Move devel subpackage requires so that it gets picked up by rpm diff --git a/sources b/sources index b80a17c..ab6b8f5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e9d26e6ed2ca809a791d88137e90629b release-2.3.1.tar.bz2 +6a25a212e7c5121f1f3988c118d05695 pypy-2.4.0-src.tar.bz2 commit f7434bab3f45aaf75e2d6b05664c9fd78197c10a Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 2 10:01:18 2014 +0200 Bump spec diff --git a/pypy.spec b/pypy.spec index 6f90d89..daf5015 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -832,6 +832,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 02 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-4 +- Move devel subpackage requires so that it gets picked up by rpm + * Sun Aug 17 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.1-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
commit 5efcdc8fe2e02fffb9ffce1004f3d25a8e86d593 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 2 09:57:46 2014 +0200 Move devel subpackage requires so that it gets picked up by rpm Up to this point it belonged to the description, so pypy-devel did not require pypy. diff --git a/pypy.spec b/pypy.spec index f811755..6f90d89 100644 --- a/pypy.spec +++ b/pypy.spec @@ -250,11 +250,11 @@ Libraries required by the various PyPy implementations of Python. %package devel Group: Development/Languages Summary: Development tools for working with PyPy +Requires: pypy = %{version}-%{release} + %description devel Header files for building C extension modules against PyPy -Requires: pypy = %{version}-%{release} - %if 0%{with_stackless} %package stackless commit 7498717b84a98b28987846d94baf9177cf5b36ee Author: Peter Robinson <pbrobinson(a)fedoraproject.org> Date: Sun Aug 17 20:41:57 2014 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 8ab5959..f811755 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -832,6 +832,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Aug 17 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.1-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+ * Mon Jul 7 2014 Peter Robinson <pbrobinson(a)fedoraproject.org> 2.3.1-2 - ARMv7 is supported for JIT - no prelink on aarch64/ppc64le commit 43ee7785260fd8f42b86e62be70de5bc361a34d7 Author: Peter Robinson <pbrobinson(a)gmail.com> Date: Mon Jul 7 23:07:38 2014 +0100 ARMv7 is supported for JIT, no prelink on aarch64/ppc64le diff --git a/pypy.spec b/pypy.spec index 7c4106a..8ab5959 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -78,20 +78,20 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # # Unfortunately, the JIT support is only available on some architectures. # -# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the +# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the # following options: # 'i386', 'x86' # 'x86-without-sse2': # 'x86_64' +# 'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI) # 'cli' # 'llvm' # # We will only build with JIT support on those architectures, and build without # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -# -%ifarch %{ix86} x86_64 -# FIXME: is there a better way of expressing "intel" here? + +%ifarch %{ix86} x86_64 %{arm} %global with_jit 1 %else %global with_jit 0 @@ -206,7 +206,10 @@ BuildRequires: time BuildRequires: perl %endif +# No prelink on these arches +%ifnarch aarch64 ppc64le BuildRequires: /usr/bin/execstack +%endif # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -466,7 +469,9 @@ InstallPyPy() { # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: +%ifnarch aarch64 ppc64le execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName +%endif } mkdir -p %{buildroot}/%{_bindir} @@ -827,6 +832,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jul 7 2014 Peter Robinson <pbrobinson(a)fedoraproject.org> 2.3.1-2 +- ARMv7 is supported for JIT +- no prelink on aarch64/ppc64le + * Sun Jun 08 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-1 - Update to 2.3.1 commit edc736c1c58fc920291a8e672c906b76d6e87a31 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Sun Jun 8 20:55:40 2014 +0200 Update to 2.3.1 diff --git a/.gitignore b/.gitignore index f59302b..1babd6b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /pypy-2.2-src.tar.bz2 /pypy-2.2.1-src.tar.bz2 /pypy-2.3-src.tar.bz2 +/release-2.3.1.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 96e21d5..7c4106a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.3 -Release: 5%{?dist} +Version: 2.3.1 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.3.1.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-394146e9bb67 +%setup -q -n pypy-pypy-32f35069a16d %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jun 08 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-1 +- Update to 2.3.1 + * Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources index 8f25b0c..b80a17c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c93a8e47f3b3109af2f66d2bd766eb97 pypy-2.3-src.tar.bz2 +e9d26e6ed2ca809a791d88137e90629b release-2.3.1.tar.bz2 commit 1972c9c31b94769515b1972a39a9d4efe493e6d6 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Sat Jun 7 13:12:20 2014 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 6bdb671..96e21d5 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+ * Tue May 27 2014 Dennis Gilmore <dennis(a)ausil.us> - 2.3-4 - valgrind is available everywhere except 31 bit s390 commit a0374180ff792eb0a2b41434d1a3a47efe340d3e Author: Dennis Gilmore <dennis(a)ausil.us> Date: Tue May 27 16:16:43 2014 -0500 valgrind is available everywhere except 31 bit s390 diff --git a/pypy.spec b/pypy.spec index 096bd7d..6bdb671 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -191,7 +191,7 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel -%ifarch %{ix86} x86_64 ppc ppc64 s390x +%ifnarch s390 BuildRequires: valgrind-devel %endif @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 27 2014 Dennis Gilmore <dennis(a)ausil.us> - 2.3-4 +- valgrind is available everywhere except 31 bit s390 + * Wed May 21 2014 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.3-3 - Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
commit ce731cfa651140b831eeeabd176c041b6f9f4943 Author: Jaroslav Škarvada <jskarvad(a)redhat.com> Date: Wed May 21 12:32:28 2014 +0200 - Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
diff --git a/pypy.spec b/pypy.spec index 39b18d8..096bd7d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed May 21 2014 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.3-3 +- Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
+ * Thu May 15 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-2 - Rebuilt (f21-python) commit a3993a30d37ff85750008622cc987a4650786896 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu May 15 12:20:24 2014 +0200 Rebuilt (f21-python) diff --git a/pypy.spec b/pypy.spec index 6e050f3..39b18d8 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu May 15 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-2 +- Rebuilt (f21-python) + * Tue May 13 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-1 - Updated to 2.3 commit db10290f0939d5c2dfd4d437bc2f98888752a48b Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Wed May 14 12:40:14 2014 +0200 Update to 2.3 diff --git a/.gitignore b/.gitignore index da7257b..f59302b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /release-2.1.0.tar.bz2 /pypy-2.2-src.tar.bz2 /pypy-2.2.1-src.tar.bz2 +/pypy-2.3-src.tar.bz2 diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index 1dddb69..2ff9068 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -2,7 +2,7 @@ diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46c --- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 +++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 @@ -4,7 +4,7 @@ import sys - import os + irc_header = "And now for something completely different" -def interactive_console(mainmodule=None, quiet=False): diff --git a/pypy.spec b/pypy.spec index c46997a..6e050f3 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.2.1 -Release: 3%{?dist} +Version: 2.3 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-2.2.1-src +%setup -q -n pypy-pypy-394146e9bb67 %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 13 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-1 +- Updated to 2.3 + * Mon Mar 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-3 - Put RPM macros in proper location diff --git a/sources b/sources index f8f0564..8f25b0c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ec9f48702323f9e93654ba73dd46720 pypy-2.2.1-src.tar.bz2 +c93a8e47f3b3109af2f66d2bd766eb97 pypy-2.3-src.tar.bz2 commit bca3bcda512353328ab9a768e28d0ac7b6904aa6 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Mar 11 09:05:43 2014 +0100 Also chenge files section diff --git a/pypy.spec b/pypy.spec index 85003c1..c46997a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -816,7 +816,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_sysconfdir}/rpm/macros.pypy +%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy %if 0%{with_stackless} %files stackless commit 4dbc78c1aab1cf75870cf055ad54a46262e3fafb Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Mar 10 09:17:48 2014 +0100 Also add changelog entry diff --git a/pypy.spec b/pypy.spec index 6e73099..85003c1 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Mar 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-3 +- Put RPM macros in proper location + * Thu Jan 16 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-2 - Fixed errors due to missing __pycache__ commit 355feb2755aa6396e4fa0b512652ce25c2502ca7 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Feb 3 13:24:01 2014 +0100 Put rpm macros in proper location diff --git a/pypy.spec b/pypy.spec index 8604207..6e73099 100644 --- a/pypy.spec +++ b/pypy.spec @@ -655,8 +655,8 @@ cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} %endif # Install macros for rpm: -mkdir -p %{buildroot}/%{_sysconfdir}/rpm -install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm +mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d +install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d %check topdir=$(pwd) commit f8a7311107aa7a76736e8e763a17148340131c32 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Fri Jan 17 10:46:17 2014 +0100 Fix errors due to missing __pycache__ diff --git a/pypy.spec b/pypy.spec index 21987ac..8604207 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -581,10 +581,13 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 -%{goal_dir}/pypy -c 'import _tkinter' -%{goal_dir}/pypy -c 'import _sqlite3' -%{goal_dir}/pypy -c 'import _curses' -%{goal_dir}/pypy -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/pypy -c 'import Tkinter' +%{buildroot}/%{pypyprefix}/pypy -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/pypy -c 'import _curses' +%{buildroot}/%{pypyprefix}/pypy -c 'import curses' +%{buildroot}/%{pypyprefix}/pypy -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -824,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 16 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-2 +- Fixed errors due to missing __pycache__ + * Thu Dec 05 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-1 - Updated to 2.2.1 - Several bundled modules (tkinter, sqlite3, curses, syslog) were commit 2cbecfd01cab504997f12fd8b434035e083dcec6 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu Jan 2 10:47:41 2014 +0100 Update to 2.2.1 diff --git a/.gitignore b/.gitignore index fa54eea..da7257b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /release-2.0.2.tar.bz2 /release-2.1.0.tar.bz2 /pypy-2.2-src.tar.bz2 +/pypy-2.2.1-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index cfb219f..21987ac 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,5 +1,5 @@ Name: pypy -Version: 2.2.0 +Version: 2.2.1 Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-2.2-src +%setup -q -n pypy-2.2.1-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -768,6 +768,11 @@ CheckPyPy() { echo "--------------------------------------------------------------" } +#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600 +#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python +#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test +#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log + %if %{run_selftests} CheckPyPy pypy @@ -819,6 +824,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Dec 05 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-1 +- Updated to 2.2.1 +- Several bundled modules (tkinter, sqlite3, curses, syslog) were + not bytecompiled properly during build, that is now fixed +- prepared new tests, not enabled yet + * Thu Nov 14 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.0-1 - Updated to 2.2.0 diff --git a/sources b/sources index d5b9932..f8f0564 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5a5a3822605d7d811066b1b279da3c6e pypy-2.2-src.tar.bz2 +7ec9f48702323f9e93654ba73dd46720 pypy-2.2.1-src.tar.bz2 commit a79a105a7453f9b3f55d296774b2b28a256d8318 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu Jan 2 10:45:26 2014 +0100 Bytecompiled bunch of modules diff --git a/pypy.spec b/pypy.spec index cd225b9..cfb219f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -181,6 +181,10 @@ BuildRequires: python-devel %endif BuildRequires: libffi-devel +BuildRequires: tcl-devel +BuildRequires: tk-devel + +BuildRequires: sqlite-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel @@ -577,6 +581,10 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 +%{goal_dir}/pypy -c 'import _tkinter' +%{goal_dir}/pypy -c 'import _sqlite3' +%{goal_dir}/pypy -c 'import _curses' +%{goal_dir}/pypy -c 'import syslog' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) commit 66ffb916e263ca7b45e75d7a209248c04f918264 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Nov 12 10:19:28 2013 +0100 Updated to 2.2.0 diff --git a/.gitignore b/.gitignore index cad553e..fa54eea 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /release-2.0-beta-1.tar.bz2 /release-2.0.2.tar.bz2 /release-2.1.0.tar.bz2 +/pypy-2.2-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index e7ef81f..cd225b9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,5 +1,5 @@ Name: pypy -Version: 2.1.0 +Version: 2.2.0 Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.1.0.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -162,7 +162,7 @@ Patch2: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -%global use_self_when_building 1 +%global use_self_when_building 0 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -269,7 +269,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-352c78d2e80f +%setup -q -n pypy-2.2-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -811,6 +811,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Nov 14 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.0-1 +- Updated to 2.2.0 + * Thu Aug 15 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.1-1 - Updated to 2.1.0 diff --git a/sources b/sources index fff5a1a..d5b9932 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59af571317843a1759cb1ff392c26260 release-2.1.0.tar.bz2 +5a5a3822605d7d811066b1b279da3c6e pypy-2.2-src.tar.bz2 commit febbbdb0e4b360dffdd77a04e5101afc16e463a8 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Fri Aug 16 10:12:29 2013 +0200 Updated to 2.1.0 diff --git a/.gitignore b/.gitignore index 63a65d6..cad553e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /release-1.9.tar.bz2 /release-2.0-beta-1.tar.bz2 /release-2.0.2.tar.bz2 +/release-2.1.0.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 1c72138..e7ef81f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,8 +1,6 @@ -%global alphatag b1 - Name: pypy -Version: 2.0.2 -Release: 5%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,50 +130,28 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.1.0.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy - -# Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: config.patch +Source2: macros.pypy # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch - -# Try to improve the readability of the generated .c code, by adding in the -# RPython source as comments where possible. -# A version of this was sent upstream as: -#
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
-# TODO: get this into the upstream bug tracker, and finish inlining -# support (rhbz#666963) -Patch4: more-readable-c-code.patch - -# In my koji builds, /root/bin is in the PATH for some reason -# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" -# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising -# OSError: [Errno 13] Permission denied -# when it tries to read /root/bin, rather than raising "No such file" -# -# Work around this by specifying an absolute path for the non-existant -# executable -# Not yet sent upstream -Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +Patch0: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler # and linker are captured: -Patch6: 006-always-log-stdout.patch +Patch1: 006-always-log-stdout.patch # Disable the printing of a quote from IRC on startup (these are stored in # ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could # cause confusion for end-users (and many are in-jokes within the PyPy # community that won't make sense outside of it). [Sorry to be a killjoy] -Patch7: 007-remove-startup-message.patch +Patch2: 007-remove-startup-message.patch # Build-time requirements: @@ -186,37 +162,7 @@ Patch7: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -# I'm disabling the self-hosting for now, due to a fatal error seen inside the -# JIT, presumably whilst JIT-compiling something within the translator's -# inliner. -# -# Specifically, building pypy-1.4.1-7.fc15.src.rpm on x86_64 using pypy-1.4.1-5.fc15.x86_64 -#
http://koji.fedoraproject.org/koji/taskinfo?taskID=2721517
-# failed with this RPython traceback: -# ... snip ... -# [rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctransform.asmgcroot.ShapeDecompressor instance at 0x00000000f0b5bc80> has no attribute 'addr' -# [rtyper] specializing: 179300 / 180508 blocks (99%) -# [rtyper] specializing: 180500 / 180566 blocks (99%) -# [rtyper] -=- specialized 1363 more blocks -=- -# [rtyper] specializing: 180600 / 180777 blocks (99%) -# [rtyper] -=- specialized 211 more blocks -=- -# [backendopt:inlining] phase with threshold factor: 32.4 -# [backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic -# [x86/regalloc] Bogus arg in operation 76 at 0 -# RPython traceback: -# File "implement_62.c", line 39979, in send_bridge_to_backend -# File "implement_69.c", line 65301, in Assembler386_assemble_bridge -# File "implement_72.c", line 8078, in RegAlloc_prepare_bridge -# File "implement_40.c", line 53061, in RegAlloc__prepare -# File "implement_44.c", line 14305, in RegAlloc__compute_vars_longevity -# Fatal RPython error: NotImplementedError -# -# This appears to be deep within pypy/jit/backend/x86/regalloc.py which has -# called "not_implemented" to emit this message to stderr, before raising the -# exception: -# [x86/regalloc] Bogus arg in operation 76 at 0 - -%global use_self_when_building 0 +%global use_self_when_building 1 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -234,12 +180,6 @@ BuildRequires: python-devel %endif - -# FIXME: I'm seeing errors like this in the logs: -# [translation:WARNING] The module '_rawffi' is disabled -# [translation:WARNING] because importing pypy.rlib.libffi raised ImportError -# [translation:WARNING] 'libffi.a' not found in ['/usr/lib/libffi', '/usr/lib'] -# Presumably we need to fix things to support dynamically-linked libffi BuildRequires: libffi-devel BuildRequires: zlib-devel @@ -269,11 +209,6 @@ BuildRequires: /usr/bin/execstack BuildRequires: emacs %endif -# pypy is bundling these so we delete them in %%prep. I don't think they are -# needed unless we build pypy targetted at running on the jvm. -#BuildRequires: jna -#BuildRequires: jasmin # Not yet in Fedora - # Metadata for the core package (the JIT build): Requires: pypy-libs = %{version}-%{release} @@ -334,47 +269,10 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-f66246c46ca3 -%patch0 -p1 -b .configure-fedora -%patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build - -# Disabled for now, as it needs regenerating for 1.8 -#patch4 -p1 -b .more-readable-c-code -# Fails on 1.8 with this error: -# [translation:ERROR] Error: -# [translation:ERROR] Traceback (most recent call last): -# [translation:ERROR] File "translate.py", line 309, in main -# [translation:ERROR] drv.proceed(goals) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 811, in proceed -# [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/tool/taskengine.py", line 116, in _execute -# [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 287, in _do -# [translation:ERROR] res = func() -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 530, in task_source_c -# [translation:ERROR] exe_name=exe_name) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 252, in generate_source -# [translation:ERROR] split=self.split) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 989, in gen_source -# [translation:ERROR] sg.gen_readable_parts_of_source(f) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 843, in gen_readable_parts_of_source -# [translation:ERROR] for node, impl in nodeiter: -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 729, in subiter -# [translation:ERROR] impl = '\n'.join(list(node.implementation())).split('\n') -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 867, in implementation -# [translation:ERROR] for s in self.funcgen_implementation(funcgen): -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 901, in funcgen_implementation -# [translation:ERROR] for line in bodyiter: -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 272, in cfunction_body -# [translation:ERROR] blocks.sort(block_comparator) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 34, in block_comparator -# [translation:ERROR] if blk0.isstartblock: -# [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' - -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 - +%setup -q -n pypy-pypy-352c78d2e80f +%patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build +%patch1 -p1 +%patch2 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -383,15 +281,6 @@ find -name "*.py" -exec \ "{}" \ \; -find . -name '*.jar' -exec rm \{\} \; - -# Remove stray ".svn" directories present within the 1.4.1 tarball -# (reported as
https://codespeak.net/issue/pypy-dev/issue612
) -find . -path '*/.svn*' -delete - -# Remove DOS batch files: -find -name "*.bat"|xargs rm -f - for f in rpython/translator/goal/bpnn.py ; do # Detect shebang lines && remove them: sed -e '/^#!/Q 0' -e 'Q 1' $f \ @@ -399,6 +288,7 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done + %build BuildPyPy() { @@ -540,10 +430,10 @@ BuildPyPy \ %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif + %install rm -rf $RPM_BUILD_ROOT - # Install the various executables: InstallPyPy() { @@ -921,6 +811,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 15 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.1-1 +- Updated to 2.1.0 + * Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0.2-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources index a37f747..fff5a1a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -328a509c092b5477f99be8dd452d81c2 release-2.0.2.tar.bz2 +59af571317843a1759cb1ff392c26260 release-2.1.0.tar.bz2 commit 309e1cf6aab2cc2ecf9ae9897a22f271a9d4fb9c Author: Dennis Gilmore <dennis(a)ausil.us> Date: Sun Aug 4 01:04:23 2013 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 8f28baf..1c72138 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0.2-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+ * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-4 - Patch1 fix commit b4e1c2185a5384e5ba4d898fe7fbca0ad3db45c2 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 10:44:06 2013 +0200 Patch1 fix diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch index 257f60f..c97eaf3 100644 --- a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +++ b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch @@ -1,7 +1,6 @@ -diff --git a/pypy/tool/ansi_print.py b/pypy/tool/ansi_print.py -index 3eff27c..fac4ba2 100644 ---- a/pypy/tool/ansi_print.py -+++ b/pypy/tool/ansi_print.py +diff -rup pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py +--- pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-27 10:35:37.648237156 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-28 10:15:58.200426205 +0200 @@ -25,7 +25,7 @@ class AnsiLog: self.kw_to_color = self.KW_TO_COLOR.copy() self.kw_to_color.update(kw_to_color) diff --git a/pypy.spec b/pypy.spec index 2470609..8f28baf 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-4 +- Patch1 fix + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-3 - Yet another Sources fix commit 8c737bc2aa985ae04d4540daefef663e827f8ba2 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 10:29:01 2013 +0200 Yet another Sources fix diff --git a/.gitignore b/.gitignore index 2793282..63a65d6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /release-1.8.tar.bz2 /release-1.9.tar.bz2 /release-2.0-beta-1.tar.bz2 +/release-2.0.2.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 66a66a9..2470609 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2#/pypy-pypy-f66246…
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-3 +- Yet another Sources fix + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-2 - Fixed Source URL diff --git a/sources b/sources index e7d211b..a37f747 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4a346df59983e4a5c50e8ee211f80619 release-2.0-beta-1.tar.bz2 +328a509c092b5477f99be8dd452d81c2 release-2.0.2.tar.bz2 commit 5694529edb24cba3edd56720cee077b791e8378c Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 09:24:07 2013 +0200 Fixed Source URL diff --git a/pypy.spec b/pypy.spec index 1ce9198..66a66a9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2#/pypy-pypy-f66246…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-2 +- Fixed Source URL + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-1 - 2.0.2, patch 8 does not seem necessary anymore commit c3a10ade23f8dac35b5ef0edc6f2c23856705044 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 08:57:35 2013 +0200 Updated to 2.0.2 diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch index 2df1f00..5d49335 100644 --- a/006-always-log-stdout.patch +++ b/006-always-log-stdout.patch @@ -1,6 +1,7 @@ ---- pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py.always_log_stdout 2012-07-06 11:13:46.878979461 -0400 -+++ pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py 2012-07-06 11:25:26.281235732 -0400 -@@ -126,6 +126,8 @@ class Platform(object): +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:35:37.680237338 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:41:04.113098738 +0200 +@@ -138,6 +138,8 @@ class Platform(object): self._handle_error(returncode, stdout, stderr, outname) def _handle_error(self, returncode, stdout, stderr, outname): diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index e05586b..1dddb69 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -1,21 +1,12 @@ ---- pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py.remove_startup_message 2012-07-06 12:10:46.504228264 -0400 -+++ pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py 2012-07-06 12:11:01.986034714 -0400 -@@ -13,18 +13,6 @@ def interactive_console(mainmodule=None) - sys.ps2 = '.... ' - # - try: -- from _pypy_irc_topic import some_topic -- text = "And now for something completely different: ``%s''" % ( -- some_topic(),) -- while len(text) >= 80: -- i = text[:80].rfind(' ') -- print text[:i] -- text = text[i+1:] -- print text -- except ImportError: -- pass -- # -- try: - if not os.isatty(sys.stdin.fileno()): - # Bail out if stdin is not tty-like, as pyrepl wouldn't be happy - # For example, with: +diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py +--- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 ++++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 +@@ -4,7 +4,7 @@ import sys + import os + + +-def interactive_console(mainmodule=None, quiet=False): ++def interactive_console(mainmodule=None, quiet=True): + # set sys.{ps1,ps2} just before invoking the interactive interpreter. This + # mimics what CPython does in pythonrun.c + if not hasattr(sys, 'ps1'): diff --git a/config.patch b/config.patch index a11f397..bf81d7d 100644 --- a/config.patch +++ b/config.patch @@ -1,7 +1,7 @@ -diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-2346207d9946/pypy/translator/platform/linux.py ---- pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/pypy/translator/platform/linux.py 2012-02-10 09:06:20.393066016 -0500 -@@ -31,13 +31,14 @@ class BaseLinux(BasePosix): +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:35:37.679237332 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:47:41.506354482 +0200 +@@ -32,19 +32,20 @@ class BaseLinux(BasePosix): return self._pkg_config("libffi", "--libs-only-L", ['/usr/lib/libffi']) @@ -9,15 +9,27 @@ diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedo - # places where we need to look for libffi.a - # XXX obscuuure! only look for libffi.a if run with translate.py - if 'translate' in sys.modules: -- return self.library_dirs_for_libffi() + ['/usr/lib'] +- if sys.maxint > 2**32: +- host = 'x86_64' +- else: +- host = 'x86' +- return self.library_dirs_for_libffi() + [ +- '/usr/lib', +- '/usr/lib/%s-linux-gnu/' % host] - else: - return [] -+ # Fedora, at least, has the shared version but not the static: ++ #Fedora, at least, has the shared version but not the static: + #def library_dirs_for_libffi_a(self): + # # places where we need to look for libffi.a + # # XXX obscuuure! only look for libffi.a if run with translate.py + # if 'translate' in sys.modules: -+ # return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # if sys.maxint > 2**32: ++ # host = 'x86_64' ++ # else: ++ # host = 'x86' ++ # return self.library_dirs_for_libffi() + [ ++ # '/usr/lib', ++ # '/usr/lib/%s-linux-gnu/' % host] + # else: + # return [] diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch index 9071be5..2391f32 100644 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -1,6 +1,7 @@ ---- pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py.orig 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py 2012-02-10 09:14:08.312216221 -0500 -@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): +diff -rup pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-27 10:35:37.762237806 +0200 ++++ pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-28 10:13:03.182536196 +0200 +@@ -587,7 +587,7 @@ class ProcessTestCase(BaseTestCase): for i in range(1024): # Windows raises IOError. Others raise OSError. with self.assertRaises(EnvironmentError) as c: diff --git a/pypy.spec b/pypy.spec index dbcbc8d..1ce9198 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,8 +1,8 @@ %global alphatag b1 Name: pypy -Version: 2.0 -Release: 0.2.%{alphatag}%{?dist} +Version: 2.0.2 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -123,7 +123,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %global pylibver 2.7 # We refer to this subdir of the source tree in a few places during the build: -%global goal_dir pypy/translator/goal +%global goal_dir pypy/goal # Turn off the brp-python-bytecompile postprocessing script @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -177,21 +177,6 @@ Patch6: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch7: 007-remove-startup-message.patch -# With pypy-1.9-1.fc17.x86_64, the pypy binary exposes about 200k symbols to -# the dynamic linker: -# $ eu-readelf -s $(which pypy) | head -# Symbol table [ 5] '.dynsym' contains 194163 entries: -# which is far more than necessary. -# Fix the version script for the linker as invoked thus in the Makefile: -# "-Wl,--export-dynamic,--version-script=../dynamic-symbols-6" -# so that it contains a "local: *;" clause, thus hiding the bulk of the -# symbols from the dynamic linker. -# Ideally we'd add: -# __attribute__ ((visibility ("hidden"))) -# to most symbols, allowing the compiler to potentially generate better code. -# Not yet reported upstream -Patch8: 008-fix-dynamic-symbols-script.patch - # Build-time requirements: @@ -349,7 +334,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-07e08e9c885c +%setup -q -n pypy-pypy-f66246c46ca3 %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -389,7 +374,6 @@ Build of PyPy with support for micro-threads for massive concurrency %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: @@ -408,9 +392,7 @@ find . -path '*/.svn*' -delete # Remove DOS batch files: find -name "*.bat"|xargs rm -f -# The "demo" directory gets auto-installed by virture of being listed in %doc -# Remove shebang lines from demo .py files, and remove executability from them: -for f in demo/bpnn.py ; do +for f in rpython/translator/goal/bpnn.py ; do # Detect shebang lines && remove them: sed -e '/^#!/Q 0' -e 'Q 1' $f \ && sed -i '1d' $f @@ -522,15 +504,11 @@ BuildPyPy() { RPM_BUILD_ROOT= \ PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ - $INTERP translate.py \ -%if 0%{verbose_logs} - --translation-verbose \ -%endif - --cflags="$CFLAGS" \ - --batch \ + $INTERP ../../rpython/bin/rpython \ --output=$ExeName \ %{gcrootfinder_options} \ - $Options + $Options \ + targetpypystandalone echo "--------------------------------------------------------------" echo "--------------------------------------------------------------" @@ -559,7 +537,7 @@ BuildPyPy \ %endif %if %{with_emacs} -%{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el +%{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif %install @@ -772,7 +750,7 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} %endif # Install macros for rpm: @@ -908,7 +886,7 @@ rm -rf $RPM_BUILD_ROOT %files libs %defattr(-,root,root,-) -%doc LICENSE README demo +%doc LICENSE README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python @@ -924,7 +902,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy %{pypyprefix}/pypy @@ -937,12 +915,15 @@ rm -rf $RPM_BUILD_ROOT %if 0%{with_stackless} %files stackless %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy-stackless %endif %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-1 +- 2.0.2, patch 8 does not seem necessary anymore + * Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0-0.2.b1 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
commit fd80b8a933ad44429dfb88ee58aecaf24faf9135 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Thu Feb 14 12:48:36 2013 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index b29583d..dbcbc8d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0 -Release: 0.1.%{alphatag}%{?dist} +Release: 0.2.%{alphatag}%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -943,6 +943,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0-0.2.b1 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+ * Tue Dec 11 2012 David Malcolm <dmalcolm(a)redhat.com> - 2.0-0.1.b1 - 2.0b1 (drop upstreamed patch 9) commit 8e0c0345a5ec642705520ed20aad13dfb15ec7c2 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Dec 13 06:16:11 2012 -0500 2.0-0.1.b1 diff --git a/.gitignore b/.gitignore index 4c551cc..2793282 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /release-1.7.tar.bz2 /release-1.8.tar.bz2 /release-1.9.tar.bz2 +/release-2.0-beta-1.tar.bz2 diff --git a/009-add-PyInt_AsUnsignedLongLongMask.patch b/009-add-PyInt_AsUnsignedLongLongMask.patch deleted file mode 100644 index dae7e16..0000000 --- a/009-add-PyInt_AsUnsignedLongLongMask.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/pypy/module/cpyext/intobject.py b/pypy/module/cpyext/intobject.py ---- a/pypy/module/cpyext/intobject.py -+++ b/pypy/module/cpyext/intobject.py -@@ -6,7 +6,7 @@ - PyObject, PyObjectFields, CONST_STRING, CANNOT_FAIL, Py_ssize_t) - from pypy.module.cpyext.pyobject import ( - make_typedescr, track_reference, RefcountState, from_ref) --from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST -+from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST, r_ulonglong - from pypy.objspace.std.intobject import W_IntObject - import sys - -@@ -83,6 +83,20 @@ - num = space.bigint_w(w_int) - return num.uintmask() - -+@cpython_api([PyObject], rffi.ULONGLONG, error=-1) -+def PyInt_AsUnsignedLongLongMask(space, w_obj): -+ """Will first attempt to cast the object to a PyIntObject or -+ PyLongObject, if it is not already one, and then return its value as -+ unsigned long long, without checking for overflow. -+ """ -+ w_int = space.int(w_obj) -+ if space.is_true(space.isinstance(w_int, space.w_int)): -+ num = space.int_w(w_int) -+ return r_ulonglong(num) -+ else: -+ num = space.bigint_w(w_int) -+ return num.ulonglongmask() -+ - @cpython_api([PyObject], lltype.Signed, error=CANNOT_FAIL) - def PyInt_AS_LONG(space, w_int): - """Return the value of the object w_int. No error checking is performed.""" -diff --git a/pypy/module/cpyext/test/test_intobject.py b/pypy/module/cpyext/test/test_intobject.py ---- a/pypy/module/cpyext/test/test_intobject.py -+++ b/pypy/module/cpyext/test/test_intobject.py -@@ -34,6 +34,11 @@ - assert (api.PyInt_AsUnsignedLongMask(space.wrap(10**30)) - == 10**30 % ((sys.maxint + 1) * 2)) - -+ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(sys.maxint)) -+ == sys.maxint) -+ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(10**30)) -+ == 10**30 % (2**64)) -+ - def test_coerce(self, space, api): - class Coerce(object): - def __int__(self): diff --git a/pypy.spec b/pypy.spec index 057fbdd..b29583d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,8 @@ +%global alphatag b1 + Name: pypy -Version: 1.9 -Release: 4%{?dist} +Version: 2.0 +Release: 0.1.%{alphatag}%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -191,12 +193,6 @@ Patch7: 007-remove-startup-message.patch Patch8: 008-fix-dynamic-symbols-script.patch -# Cherrypick upstream patch to add PyInt_AsUnsignedLongLongMask (used by -# the rpm python bindings); see
https://bugs.pypy.org/issue1211
-# This is
https://bitbucket.org/pypy/pypy/changeset/542d481517d3
-Patch9: 009-add-PyInt_AsUnsignedLongLongMask.patch - - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -353,7 +349,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-341e1e3821ff +%setup -q -n pypy-pypy-07e08e9c885c %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -394,7 +390,6 @@ Build of PyPy with support for micro-threads for massive concurrency %patch6 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: @@ -631,6 +626,10 @@ cp -a lib_pypy %{buildroot}/%{pypyprefix} # Remove a text file that documents which selftests fail on Win32: rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt +# Remove a text file containing upstream's recipe for syncing stdlib in +# their hg repository with cpython's: +rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt + # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: find \ @@ -944,6 +943,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 11 2012 David Malcolm <dmalcolm(a)redhat.com> - 2.0-0.1.b1 +- 2.0b1 (drop upstreamed patch 9) + * Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.9-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/sources b/sources index 2a64332..e7d211b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f92c0171a9578a3e4a0f74947ec596ab release-1.9.tar.bz2 +4a346df59983e4a5c50e8ee211f80619 release-2.0-beta-1.tar.bz2 commit cd9f89c255519e6d52d820882b9cc72cc74932b7 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Fri Jul 20 23:22:27 2012 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 2ed932b..057fbdd 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -944,6 +944,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.9-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+ * Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 - log all output from "make" (patch 6) - disable the MOTD at startup (patch 7) commit 26f62305fe07f9429bb6f4dc47d8749d7bd8ca7f Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Jul 10 16:45:52 2012 -0400 1.9-3 * Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 - log all output from "make" (patch 6) - disable the MOTD at startup (patch 7) - hide symbols from the dynamic linker (patch 8) - add PyInt_AsUnsignedLongLongMask (patch 9) - capture the Makefile, the typeids.txt, and the dynamic-symbols file within the debuginfo package diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch new file mode 100644 index 0000000..2df1f00 --- /dev/null +++ b/006-always-log-stdout.patch @@ -0,0 +1,11 @@ +--- pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py.always_log_stdout 2012-07-06 11:13:46.878979461 -0400 ++++ pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py 2012-07-06 11:25:26.281235732 -0400 +@@ -126,6 +126,8 @@ class Platform(object): + self._handle_error(returncode, stdout, stderr, outname) + + def _handle_error(self, returncode, stdout, stderr, outname): ++ for line in stdout.splitlines(): ++ log.message(line) + if returncode != 0: + errorfile = outname.new(ext='errors') + errorfile.write(stderr, 'wb') diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch new file mode 100644 index 0000000..e05586b --- /dev/null +++ b/007-remove-startup-message.patch @@ -0,0 +1,21 @@ +--- pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py.remove_startup_message 2012-07-06 12:10:46.504228264 -0400 ++++ pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py 2012-07-06 12:11:01.986034714 -0400 +@@ -13,18 +13,6 @@ def interactive_console(mainmodule=None) + sys.ps2 = '.... ' + # + try: +- from _pypy_irc_topic import some_topic +- text = "And now for something completely different: ``%s''" % ( +- some_topic(),) +- while len(text) >= 80: +- i = text[:80].rfind(' ') +- print text[:i] +- text = text[i+1:] +- print text +- except ImportError: +- pass +- # +- try: + if not os.isatty(sys.stdin.fileno()): + # Bail out if stdin is not tty-like, as pyrepl wouldn't be happy + # For example, with: diff --git a/008-fix-dynamic-symbols-script.patch b/008-fix-dynamic-symbols-script.patch new file mode 100644 index 0000000..5b1d551 --- /dev/null +++ b/008-fix-dynamic-symbols-script.patch @@ -0,0 +1,15 @@ +diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py +--- a/pypy/translator/platform/posix.py ++++ b/pypy/translator/platform/posix.py +@@ -48,8 +48,10 @@ + response_file = self._make_response_file("dynamic-symbols-") + f = response_file.open("w") + f.write("{\n") ++ f.write(" global:\n") + for sym in eci.export_symbols: +- f.write("%s;\n" % (sym,)) ++ f.write(" %s;\n" % (sym,)) ++ f.write(" local:*;\n") + f.write("};") + f.close() + diff --git a/009-add-PyInt_AsUnsignedLongLongMask.patch b/009-add-PyInt_AsUnsignedLongLongMask.patch new file mode 100644 index 0000000..dae7e16 --- /dev/null +++ b/009-add-PyInt_AsUnsignedLongLongMask.patch @@ -0,0 +1,48 @@ +diff --git a/pypy/module/cpyext/intobject.py b/pypy/module/cpyext/intobject.py +--- a/pypy/module/cpyext/intobject.py ++++ b/pypy/module/cpyext/intobject.py +@@ -6,7 +6,7 @@ + PyObject, PyObjectFields, CONST_STRING, CANNOT_FAIL, Py_ssize_t) + from pypy.module.cpyext.pyobject import ( + make_typedescr, track_reference, RefcountState, from_ref) +-from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST ++from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST, r_ulonglong + from pypy.objspace.std.intobject import W_IntObject + import sys + +@@ -83,6 +83,20 @@ + num = space.bigint_w(w_int) + return num.uintmask() + ++@cpython_api([PyObject], rffi.ULONGLONG, error=-1) ++def PyInt_AsUnsignedLongLongMask(space, w_obj): ++ """Will first attempt to cast the object to a PyIntObject or ++ PyLongObject, if it is not already one, and then return its value as ++ unsigned long long, without checking for overflow. ++ """ ++ w_int = space.int(w_obj) ++ if space.is_true(space.isinstance(w_int, space.w_int)): ++ num = space.int_w(w_int) ++ return r_ulonglong(num) ++ else: ++ num = space.bigint_w(w_int) ++ return num.ulonglongmask() ++ + @cpython_api([PyObject], lltype.Signed, error=CANNOT_FAIL) + def PyInt_AS_LONG(space, w_int): + """Return the value of the object w_int. No error checking is performed.""" +diff --git a/pypy/module/cpyext/test/test_intobject.py b/pypy/module/cpyext/test/test_intobject.py +--- a/pypy/module/cpyext/test/test_intobject.py ++++ b/pypy/module/cpyext/test/test_intobject.py +@@ -34,6 +34,11 @@ + assert (api.PyInt_AsUnsignedLongMask(space.wrap(10**30)) + == 10**30 % ((sys.maxint + 1) * 2)) + ++ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(sys.maxint)) ++ == sys.maxint) ++ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(10**30)) ++ == 10**30 % (2**64)) ++ + def test_coerce(self, space, api): + class Coerce(object): + def __int__(self): diff --git a/pypy.spec b/pypy.spec index e579720..2ed932b 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -164,6 +164,39 @@ Patch4: more-readable-c-code.patch # Not yet sent upstream Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +# Patch pypy.translator.platform so that stdout from "make" etc gets logged, +# rather than just stderr, so that the command-line invocations of the compiler +# and linker are captured: +Patch6: 006-always-log-stdout.patch + +# Disable the printing of a quote from IRC on startup (these are stored in +# ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could +# cause confusion for end-users (and many are in-jokes within the PyPy +# community that won't make sense outside of it). [Sorry to be a killjoy] +Patch7: 007-remove-startup-message.patch + +# With pypy-1.9-1.fc17.x86_64, the pypy binary exposes about 200k symbols to +# the dynamic linker: +# $ eu-readelf -s $(which pypy) | head +# Symbol table [ 5] '.dynsym' contains 194163 entries: +# which is far more than necessary. +# Fix the version script for the linker as invoked thus in the Makefile: +# "-Wl,--export-dynamic,--version-script=../dynamic-symbols-6" +# so that it contains a "local: *;" clause, thus hiding the bulk of the +# symbols from the dynamic linker. +# Ideally we'd add: +# __attribute__ ((visibility ("hidden"))) +# to most symbols, allowing the compiler to potentially generate better code. +# Not yet reported upstream +Patch8: 008-fix-dynamic-symbols-script.patch + + +# Cherrypick upstream patch to add PyInt_AsUnsignedLongLongMask (used by +# the rpm python bindings); see
https://bugs.pypy.org/issue1211
+# This is
https://bitbucket.org/pypy/pypy/changeset/542d481517d3
+Patch9: 009-add-PyInt_AsUnsignedLongLongMask.patch + + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -358,6 +391,11 @@ Build of PyPy with support for micro-threads for massive concurrency # [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 + # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -696,15 +734,31 @@ mkdir -p %{buildroot}%{pypy_debuginfo_dir} # copy over everything: cp -a pypy %{buildroot}%{pypy_debuginfo_dir} -# ...then delete files that aren't .py files: +# ...then delete files that aren't: +# - *.py files +# - the Makefile +# - typeids.txt +# - dynamic-symbols-* find \ - %{buildroot}%{pypy_debuginfo_dir} \ - \( -type f \ - -a \ - \! -name "*.py" \ - \) \ + %{buildroot}%{pypy_debuginfo_dir} \ + \( -type f \ + -a \ + \! \( -name "*.py" \ + -o \ + -name "Makefile" \ + -o \ + -name "typeids.txt" \ + -o \ + -name "dynamic-symbols-*" \ + \) \ + \) \ -delete +# Alternatively, we could simply keep everything. This leads to a ~350MB +# debuginfo package, but it makes it easy to hack on the Makefile and C build +# flags by rebuilding/linking the sources. +# To do so, remove the above "find" command. + # We don't need bytecode for these files; they are being included for reference # purposes. # There are some rpmlint warnings from these files: @@ -890,6 +944,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 +- log all output from "make" (patch 6) +- disable the MOTD at startup (patch 7) +- hide symbols from the dynamic linker (patch 8) +- add PyInt_AsUnsignedLongLongMask (patch 9) +- capture the Makefile, the typeids.txt, and the dynamic-symbols file within +the debuginfo package + * Mon Jun 18 2012 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.9-2 - Compile with PIC, fixes FTBFS on ARM commit 92ec0ebc5bf5746a03e45726d8e300ef51ff7940 Author: Peter Robinson <pbrobinson(a)gmail.com> Date: Mon Jun 18 09:50:36 2012 +0100 Compile with PIC, fixes FTBFS on ARM diff --git a/pypy.spec b/pypy.spec index 80b4039..e579720 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -471,7 +471,7 @@ BuildPyPy() { # The generated C code leads to many thousands of warnings of the form: # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] # Suppress them: - export CFLAGS=$(echo "$CFLAGS" -Wno-unused) + export CFLAGS=$(echo "$CFLAGS" -Wno-unused -fPIC) # If we're already built the JIT-enabled "pypy", then use it for subsequent # builds (of other configurations): @@ -890,6 +890,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 18 2012 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.9-2 +- Compile with PIC, fixes FTBFS on ARM + * Fri Jun 8 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-1 - 1.9 commit 615fd77fe04457d552feff9d10986589b35a6148 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Wed Jun 13 11:11:16 2012 -0400 upload 1.9 tarball diff --git a/.gitignore b/.gitignore index 86ec921..4c551cc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /release-1.6.tar.bz2 /release-1.7.tar.bz2 /release-1.8.tar.bz2 +/release-1.9.tar.bz2 diff --git a/sources b/sources index 30a988e..2a64332 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -661be06978fdc907d84f0ee1f1228c8b release-1.8.tar.bz2 +f92c0171a9578a3e4a0f74947ec596ab release-1.9.tar.bz2 commit b042622bfa38e9ad3794d4f845207042e589b20b Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jun 8 20:18:15 2012 -0400 1.9 diff --git a/pypy.spec b/pypy.spec index 8b80611..80b4039 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.8 -Release: 2%{?dist} +Version: 1.9 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -320,7 +320,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-2346207d9946 +%setup -q -n pypy-pypy-341e1e3821ff %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -861,7 +861,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix}/lib-python %{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib-python/modified-%{pylibver}/ %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ @@ -891,6 +890,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jun 8 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-1 +- 1.9 + * Fri Feb 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-2 - disable C readability patch for now (patch 4) commit 07098c88a6645a0333d4c0d927251a23d002376d Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Feb 10 11:12:43 2012 -0500 1.8-2: disable C readability patch for now (patch 4) diff --git a/pypy.spec b/pypy.spec index 9838bae..8b80611 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -324,7 +324,38 @@ Build of PyPy with support for micro-threads for massive concurrency %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build -%patch4 -p1 -b .more-readable-c-code +# Disabled for now, as it needs regenerating for 1.8 +#patch4 -p1 -b .more-readable-c-code +# Fails on 1.8 with this error: +# [translation:ERROR] Error: +# [translation:ERROR] Traceback (most recent call last): +# [translation:ERROR] File "translate.py", line 309, in main +# [translation:ERROR] drv.proceed(goals) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 811, in proceed +# [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/tool/taskengine.py", line 116, in _execute +# [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 287, in _do +# [translation:ERROR] res = func() +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 530, in task_source_c +# [translation:ERROR] exe_name=exe_name) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 252, in generate_source +# [translation:ERROR] split=self.split) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 989, in gen_source +# [translation:ERROR] sg.gen_readable_parts_of_source(f) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 843, in gen_readable_parts_of_source +# [translation:ERROR] for node, impl in nodeiter: +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 729, in subiter +# [translation:ERROR] impl = '\n'.join(list(node.implementation())).split('\n') +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 867, in implementation +# [translation:ERROR] for s in self.funcgen_implementation(funcgen): +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 901, in funcgen_implementation +# [translation:ERROR] for line in bodyiter: +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 272, in cfunction_body +# [translation:ERROR] blocks.sort(block_comparator) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 34, in block_comparator +# [translation:ERROR] if blk0.isstartblock: +# [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' %patch5 -p1 @@ -860,6 +891,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-2 +- disable C readability patch for now (patch 4) + * Thu Feb 9 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-1 - 1.8; regenerate config patch (patch 0); drop selinux patch (patch 2); regenerate patch 5 commit 52a91fcc4b0ffbdb511ad40e389fe6566d1b8623 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Feb 10 09:19:56 2012 -0500 1.8 rebase to 1.8: * regenerate config patch (patch 0) * drop selinux patch (patch 2) * regenerate patch 5 diff --git a/.gitignore b/.gitignore index 99af398..86ec921 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /pypy-1.5-src.tar.bz2 /release-1.6.tar.bz2 /release-1.7.tar.bz2 +/release-1.8.tar.bz2 diff --git a/config.patch b/config.patch index afd7a7d..a11f397 100644 --- a/config.patch +++ b/config.patch @@ -1,31 +1,7 @@ -diff -up pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-release-1.7/pypy/translator/platform/linux.py ---- pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/platform/linux.py 2011-11-21 13:07:03.454240019 -0500 -@@ -1,15 +1,21 @@ - """Support for Linux.""" - -+import os - import sys - from pypy.translator.platform.posix import BasePosix - -+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', -+ '-Wall', '-Wno-unused'] -+if os.environ.get('CFLAGS', None): -+ CFLAGS.extend(os.environ['CFLAGS'].split()) -+CFLAGS = tuple(CFLAGS) -+ - class BaseLinux(BasePosix): - name = "linux" - - link_flags = ('-pthread',) - extra_libs = ('-lrt',) -- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', -- '-Wall', '-Wno-unused') -+ cflags = CFLAGS - standalone_only = () - shared_only = ('-fPIC',) - so_ext = 'so' -@@ -26,13 +32,14 @@ class BaseLinux(BasePosix): +diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-2346207d9946/pypy/translator/platform/linux.py +--- pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora 2012-02-09 13:27:19.000000000 -0500 ++++ pypy-pypy-2346207d9946/pypy/translator/platform/linux.py 2012-02-10 09:06:20.393066016 -0500 +@@ -31,13 +31,14 @@ class BaseLinux(BasePosix): return self._pkg_config("libffi", "--libs-only-L", ['/usr/lib/libffi']) diff --git a/fix-test_commands-expected-ls-output-issue7108.patch b/fix-test_commands-expected-ls-output-issue7108.patch deleted file mode 100644 index becc3e0..0000000 --- a/fix-test_commands-expected-ls-output-issue7108.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- test/test_commands.py.orig 2010-12-22 13:25:11.357333216 -0500 -+++ test/test_commands.py 2010-12-22 13:25:57.927166219 -0500 -@@ -47,7 +47,7 @@ class CommandTests(unittest.TestCase): - # Note that the first case above has a space in the group name - # while the second one has a space in both names. - pat = r'''d......... # It is a directory. -- \+? # It may have ACLs. -+ [.+@]? # It may have alt access (SELinux, ACLs or metadata ('@' OS X). - \s+\d+ # It has some number of links. - [^/]* # Skip user, group, size, and date. - /\. # and end with the name of the file. diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch index eb6f324..9071be5 100644 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -1,6 +1,5 @@ -diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py ---- pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path 2011-08-20 11:46:31.410646024 -0400 -+++ pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py 2011-08-20 11:46:39.421645476 -0400 +--- pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py.orig 2012-02-09 13:27:19.000000000 -0500 ++++ pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py 2012-02-10 09:14:08.312216221 -0500 @@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): for i in range(1024): # Windows raises IOError. Others raise OSError. @@ -9,4 +8,4 @@ diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readab + subprocess.Popen(['/usr/bin/nonexisting_i_hope'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if c.exception.errno != errno.ENOENT: # ignore "no such file" + # ignore errors that indicate the command was not found diff --git a/pypy.spec b/pypy.spec index b5982bd..9838bae 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.7 -Release: 4%{?dist} +Version: 1.8 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -145,10 +145,6 @@ Patch0: config.patch # merely render dots: Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch -# test_commmands fails on SELinux systems due to a change in the output -# of "ls" (
http://bugs.python.org/issue7108
) -Patch2: fix-test_commands-expected-ls-output-issue7108.patch - # Try to improve the readability of the generated .c code, by adding in the # RPython source as comments where possible. # A version of this was sent upstream as: @@ -324,14 +320,10 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-release-%{version} +%setup -q -n pypy-pypy-2346207d9946 %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build -pushd lib-python/%{pylibver} -%patch2 -p0 -popd - %patch4 -p1 -b .more-readable-c-code %patch5 -p1 @@ -868,6 +860,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 9 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-1 +- 1.8; regenerate config patch (patch 0); drop selinux patch (patch 2); +regenerate patch 5 + * Tue Jan 31 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.7-4 - fix an incompatibility with virtualenv (rhbz#742641) diff --git a/sources b/sources index 197491c..30a988e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fc22184c931ead98bdae9ec3e79595c2 release-1.7.tar.bz2 +661be06978fdc907d84f0ee1f1228c8b release-1.8.tar.bz2 commit a8e52ca5f82917a1b2fb3a3684272c2c1e39f146 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Jan 31 04:53:38 2012 -0500 fix an incompatibility with virtualenv (rhbz#742641) Previously, we manually fixed up the library search path to be below %{pypyprefix}, by patching pypy/translator/goal/app_main.py (adding LIBRARY_INSTALLATION_PATH in patch 3, then using sed to change it to the correct value in %prep after applying the patch). This led to issues when using pypy with virtualenv, so now (as suggested in
https://codespeak.net/issue/pypy-dev/issue614
) we simply install the pypy binary into %{pypyprefix}, and make /usr/bin/pypy be a symlink to it. This allows pypy to find its libraries both when run outside a virtualenv, and within it. Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=742641
diff --git a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch deleted file mode 100644 index 93bcb69..0000000 --- a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -r cd083843b67a pypy/translator/goal/app_main.py ---- a/pypy/translator/goal/app_main.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/goal/app_main.py Wed Dec 22 17:43:21 2010 -0500 -@@ -191,6 +191,12 @@ - IS_WINDOWS = False - - def get_library_path(executable): -+ # FIXME: get this from translator configuration -+ dirname = LIBRARY_INSTALLATION_PATH -+ newpath = sys.pypy_initial_path(dirname) -+ if newpath: -+ return newpath -+ - search = executable - while 1: - dirname = resolvedirof(search) diff --git a/pypy.spec b/pypy.spec index 4bf93a4..b5982bd 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -149,18 +149,6 @@ Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch # of "ls" (
http://bugs.python.org/issue7108
) Patch2: fix-test_commands-expected-ls-output-issue7108.patch -# When locating the pypy standard libraries, look first within -# LIBRARY_INSTALLATION_PATH. -# We convert this from being a non-existant variable into a string literal -# with the value of "pypyprefix" in the "prep" phase below. -# -# We still use the scanning relative to the binary location when invoking a -# pypy binary during the build (e.g. during "check") -# -# Sent upstream (with caveats) as: -#
https://codespeak.net/issue/pypy-dev/issue614
-Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch - # Try to improve the readability of the generated .c code, by adding in the # RPython source as comments where possible. # A version of this was sent upstream as: @@ -344,14 +332,6 @@ pushd lib-python/%{pylibver} %patch2 -p0 popd -# Look for the pypy libraries within LIBRARY_INSTALLATION_PATH first: -%patch3 -p1 -# Fixup LIBRARY_INSTALLATION_PATH to be a string literal containing our value -# for "pypyprefix": -sed -i \ - -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ - pypy/translator/goal/app_main.py - %patch4 -p1 -b .more-readable-c-code %patch5 -p1 @@ -535,7 +515,19 @@ rm -rf $RPM_BUILD_ROOT InstallPyPy() { ExeName=$1 - install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{_bindir} + # To ensure compatibility with virtualenv, pypy finds its libraries + # relative to itself; this happens within + # pypy/translator/goal/app_main.py:get_library_path + # which calls sys.pypy_initial_path(dirname) on the dir containing + # the executable, with symlinks resolved. + # + # Hence we make /usr/bin/pypy be a symlink to the real binary, which we + # place within /usr/lib[64]/pypy-1.* as pypy + # + # This ought to enable our pypy build to work with virtualenv + # (rhbz#742641) + install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{pypyprefix}/$ExeName + ln -s %{pypyprefix}/$ExeName %{buildroot}/%{_bindir} # The generated machine code doesn't need an executable stack, but # one of the assembler files (gcmaptable.s) doesn't have the necessary @@ -546,10 +538,11 @@ InstallPyPy() { # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: - execstack --clear-execstack %{buildroot}/%{_bindir}/$ExeName + execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName } mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{pypyprefix} InstallPyPy pypy @@ -570,7 +563,6 @@ InstallPyPy pypy-stackless # PREFIX/lib-python/modified.2.5.2 # as given on the above page, i.e. it uses '-' not '.' -mkdir -p %{buildroot}/%{pypyprefix} cp -a lib-python %{buildroot}/%{pypyprefix} cp -a lib_pypy %{buildroot}/%{pypyprefix} @@ -859,6 +851,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/pypy +%{pypyprefix}/pypy %files devel %defattr(-,root,root,-) @@ -875,6 +868,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 31 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.7-4 +- fix an incompatibility with virtualenv (rhbz#742641) + * Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
commit e21faf468c1f7001f4680cff5f09fca068fb0397 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Fri Jan 13 19:29:18 2012 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index d99d341..4bf93a4 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -875,6 +875,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+ * Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 - use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, with -Wno-unused (rhbz#666966 and rhbz#707707) commit 416c353a67345f32fa7da698b18eef5ad1d1e77e Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Dec 16 17:15:41 2011 -0500 1.7-2: use --gcrootfinder=shadowstack, and use standard Fedora compilation flags * Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 - use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, with -Wno-unused (rhbz#666966 and rhbz#707707) diff --git a/pypy.spec b/pypy.spec index 1d6b6af..d99d341 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -110,6 +110,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to enable/disable verbose logging: %global verbose_logs 0 +# Forcibly use the shadow-stack option for detecting GC roots, rather than +# relying on hacking up generated assembler with regexps: +%global shadow_stack 1 + # Easy way to turn off the selftests: %global run_selftests 1 @@ -429,6 +433,22 @@ BuildPyPy() { # plus all substrings from CFLAGS in the environment. # This is used to generate a value for CFLAGS that's written into the Makefile + # How will we track garbage-collection roots in the generated code? + #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
+ +%if 0%{shadow_stack} + # This is the most portable option, and avoids a reliance on non-guaranteed + # behaviors within GCC's code generator: use an explicitly-maintained stack + # of root pointers: + %define gcrootfinder_options --gcrootfinder=shadowstack + + export CFLAGS=$(echo "$RPM_OPT_FLAGS") + +%else + # Go with the default, which is "asmgcc" + + %define gcrootfinder_options %{nil} + #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
# The generated Makefile compiles the .c files into assembler (.s), rather # than direct to .o It then post-processes this assembler to locate @@ -443,6 +463,13 @@ BuildPyPy() { # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') +%endif + + # The generated C code leads to many thousands of warnings of the form: + # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] + # Suppress them: + export CFLAGS=$(echo "$CFLAGS" -Wno-unused) + # If we're already built the JIT-enabled "pypy", then use it for subsequent # builds (of other configurations): if test -x './pypy' ; then @@ -466,6 +493,7 @@ BuildPyPy() { --cflags="$CFLAGS" \ --batch \ --output=$ExeName \ + %{gcrootfinder_options} \ $Options echo "--------------------------------------------------------------" @@ -847,6 +875,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 +- use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, +with -Wno-unused (rhbz#666966 and rhbz#707707) + * Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 - 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated code) commit 4ef3f10721000d632a9dcfcfca05c7cde0f91b95 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Nov 22 11:30:49 2011 -0500 1.7 * Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 - 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated code) diff --git a/.gitignore b/.gitignore index ecd135f..99af398 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /pypy-1.4.1-src.tar.bz2 /pypy-1.5-src.tar.bz2 /release-1.6.tar.bz2 +/release-1.7.tar.bz2 diff --git a/config.patch b/config.patch new file mode 100644 index 0000000..afd7a7d --- /dev/null +++ b/config.patch @@ -0,0 +1,49 @@ +diff -up pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-release-1.7/pypy/translator/platform/linux.py +--- pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/platform/linux.py 2011-11-21 13:07:03.454240019 -0500 +@@ -1,15 +1,21 @@ + """Support for Linux.""" + ++import os + import sys + from pypy.translator.platform.posix import BasePosix + ++CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', ++ '-Wall', '-Wno-unused'] ++if os.environ.get('CFLAGS', None): ++ CFLAGS.extend(os.environ['CFLAGS'].split()) ++CFLAGS = tuple(CFLAGS) ++ + class BaseLinux(BasePosix): + name = "linux" + + link_flags = ('-pthread',) + extra_libs = ('-lrt',) +- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', +- '-Wall', '-Wno-unused') ++ cflags = CFLAGS + standalone_only = () + shared_only = ('-fPIC',) + so_ext = 'so' +@@ -26,13 +32,14 @@ class BaseLinux(BasePosix): + return self._pkg_config("libffi", "--libs-only-L", + ['/usr/lib/libffi']) + +- def library_dirs_for_libffi_a(self): +- # places where we need to look for libffi.a +- # XXX obscuuure! only look for libffi.a if run with translate.py +- if 'translate' in sys.modules: +- return self.library_dirs_for_libffi() + ['/usr/lib'] +- else: +- return [] ++ # Fedora, at least, has the shared version but not the static: ++ #def library_dirs_for_libffi_a(self): ++ # # places where we need to look for libffi.a ++ # # XXX obscuuure! only look for libffi.a if run with translate.py ++ # if 'translate' in sys.modules: ++ # return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # else: ++ # return [] + + + class Linux(BaseLinux): diff --git a/pypy-1.5-more-readable-c-code.patch b/more-readable-c-code.patch similarity index 83% rename from pypy-1.5-more-readable-c-code.patch rename to more-readable-c-code.patch index b7103e2..92d340f 100644 --- a/pypy-1.5-more-readable-c-code.patch +++ b/more-readable-c-code.patch @@ -1,15 +1,15 @@ -diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-src/pypy/interpreter/pycode.py ---- pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/interpreter/pycode.py 2011-05-02 14:28:33.942161002 -0400 +diff -up pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code pypy-pypy-release-1.7/pypy/interpreter/pycode.py +--- pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/interpreter/pycode.py 2011-11-21 16:16:15.673463780 -0500 @@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non - from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, + from pypy.interpreter.astcompiler.consts import ( CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, CO_GENERATOR, CO_CONTAINSGLOBALS) +from pypy.interpreter.pytraceback import offset2lineno from pypy.rlib.rarithmetic import intmask from pypy.rlib.debug import make_sure_not_resized from pypy.rlib import jit -@@ -80,6 +81,7 @@ class PyCode(eval.Code): +@@ -81,6 +82,7 @@ class PyCode(eval.Code): self.hidden_applevel = hidden_applevel self.magic = magic self._signature = cpython_code_signature(self) @@ -17,7 +17,7 @@ diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-s self._initialize() def _initialize(self): -@@ -396,3 +398,23 @@ class PyCode(eval.Code): +@@ -397,3 +399,23 @@ class PyCode(eval.Code): def repr(self, space): return space.wrap(self.get_repr()) @@ -41,9 +41,9 @@ diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-s + # raise an IOError) + self._ensure_source() + return self._cached_source[linenum - 1] -diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/model.py ---- pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/model.py 2011-05-02 14:28:33.942161002 -0400 +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/model.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/model.py 2011-11-21 16:15:36.599466455 -0500 @@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden __metaclass__ = type @@ -268,10 +268,10 @@ diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5- result.append(copyop) return result newblock.operations = copyoplist(block.operations) -diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/objspace.py ---- pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/objspace.py 2011-05-02 14:28:33.943161001 -0400 -@@ -313,7 +313,9 @@ class FlowObjSpace(ObjSpace): +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py 2011-11-21 16:15:36.600466455 -0500 +@@ -315,7 +315,9 @@ class FlowObjSpace(ObjSpace): def do_operation(self, name, *args_w): spaceop = SpaceOperation(name, args_w, Variable()) if hasattr(self, 'executioncontext'): # not here during bootstrapping @@ -282,9 +282,9 @@ diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1 self.executioncontext.recorder.append(spaceop) return spaceop.result -diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/test/test_model.py ---- pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/test/test_model.py 2011-05-02 14:28:33.943161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py 2011-11-21 16:15:36.600466455 -0500 @@ -119,3 +119,25 @@ def test_variable(): assert v2.renamed assert v2.name.startswith("foobar_") and v2.name != v.name @@ -311,9 +311,9 @@ diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code + assert cmp(oplocA, oplocB) < 0 + assert cmp(oplocB, oplocA) > 0 + -diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/pypy/rpython/rtyper.py ---- pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/rpython/rtyper.py 2011-05-02 14:28:33.943161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/rpython/rtyper.py +--- pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/rpython/rtyper.py 2011-11-21 16:15:36.601466455 -0500 @@ -800,7 +800,7 @@ class HighLevelOp(object): return vars @@ -341,9 +341,9 @@ diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/p if resulttype is None: vresult.concretetype = Void return None -diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-1.5-src/pypy/translator/backendopt/inline.py ---- pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/backendopt/inline.py 2011-05-02 14:32:26.975161005 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py +--- pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py 2011-11-21 16:15:36.601466455 -0500 @@ -4,6 +4,7 @@ from pypy.translator.simplify import get from pypy.translator.unsimplify import copyvar from pypy.objspace.flow.model import Variable, Constant, Block, Link @@ -371,9 +371,9 @@ diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code return result def copy_block(self, block): -diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/funcgen.py ---- pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/c/funcgen.py 2011-05-02 14:28:33.944161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/funcgen.py +--- pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/c/funcgen.py 2011-11-21 16:15:36.602466455 -0500 @@ -1,4 +1,6 @@ import sys +import inspect @@ -420,7 +420,7 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 class FunctionCodeGenerator(object): """ Collects information about a function which we have to generate -@@ -210,14 +244,57 @@ class FunctionCodeGenerator(object): +@@ -207,14 +241,57 @@ class FunctionCodeGenerator(object): def cfunction_body(self): graph = self.graph @@ -481,7 +481,7 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 for line in self.gen_op(op): yield line if len(block.exits) == 0: -@@ -309,7 +386,7 @@ class FunctionCodeGenerator(object): +@@ -306,7 +383,7 @@ class FunctionCodeGenerator(object): assignments.append((a2typename, dest, src)) for line in gen_assignments(assignments): yield line @@ -490,16 +490,16 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 if link.target in self.innerloops: loop = self.innerloops[link.target] if link is loop.links[-1]: # link that ends a loop -diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/test/test_genc.py ---- pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/c/test/test_genc.py 2011-05-02 14:28:33.945161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py +--- pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py 2011-11-21 16:15:36.602466455 -0500 @@ -1,4 +1,5 @@ import autopath, sys, os, py +import re from pypy.rpython.lltypesystem.lltype import * from pypy.annotation import model as annmodel from pypy.translator.translator import TranslationContext -@@ -515,3 +516,130 @@ def test_inhibit_tail_call(): +@@ -532,3 +533,130 @@ def test_inhibit_tail_call(): else: assert 0, "the call was not found in the C source" assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] @@ -630,10 +630,10 @@ diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code p + assert 'Here is a ' in c_fn_src + assert 'style comment within an RPython docstring' in c_fn_src + -diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-src/pypy/translator/driver.py ---- pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/driver.py 2011-05-02 14:28:33.945161001 -0400 -@@ -536,6 +536,7 @@ class TranslationDriver(SimpleTaskEngine +diff -up pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/driver.py +--- pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/driver.py 2011-11-21 16:15:36.603466455 -0500 +@@ -535,6 +535,7 @@ class TranslationDriver(SimpleTaskEngine dstname = self.compute_exe_name() + '.staticdata.info' shutil.copy(str(fname), str(dstname)) self.log.info('Static data info written to %s' % dstname) @@ -641,9 +641,9 @@ diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-sr # task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-src/pypy/translator/gensupp.py ---- pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/gensupp.py 2011-05-02 14:33:31.026161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/gensupp.py +--- pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/gensupp.py 2011-11-21 16:15:36.603466455 -0500 @@ -14,8 +14,8 @@ def ordered_blocks(graph): allblocks = [] for block in graph.iterblocks(): @@ -655,9 +655,9 @@ diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-s else: ofs = sys.maxint # then we order by input variable name or value -diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1.5-src/pypy/translator/interactive.py ---- pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/interactive.py 2011-05-02 14:28:33.946161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/interactive.py +--- pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/interactive.py 2011-11-21 16:15:36.604466454 -0500 @@ -138,7 +138,7 @@ class Translation(object): def source_c(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) @@ -667,9 +667,9 @@ diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1 def source_cl(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) -diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-1.5-src/pypy/translator/llsupport/wrapper.py ---- pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/llsupport/wrapper.py 2011-05-02 14:28:33.946161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py +--- pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py 2011-11-21 16:15:36.604466454 -0500 @@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam # "return result" block = Block(wrapper_inputargs) @@ -679,10 +679,10 @@ diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code translator.update_call_graph(wgraph, graph, object()) translator.graphs.append(wgraph) block.operations[:] = newops -diff -up pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code pypy-1.5-src/pypy/translator/simplify.py ---- pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/simplify.py 2011-05-02 14:28:33.952161001 -0400 -@@ -298,7 +298,7 @@ def join_blocks(graph): +diff -up pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/simplify.py +--- pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/simplify.py 2011-11-21 16:15:36.605466454 -0500 +@@ -292,7 +292,7 @@ def join_blocks(graph): return renaming.get(v, v) def rename_op(op): args = [rename(a) for a in op.args] diff --git a/pypy-1.5-config.patch b/pypy-1.5-config.patch deleted file mode 100644 index 82d8fc9..0000000 --- a/pypy-1.5-config.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora pypy-1.5-src/pypy/translator/platform/linux.py ---- pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/platform/linux.py 2011-04-30 18:59:24.041160978 -0400 -@@ -1,13 +1,18 @@ - """Support for Linux.""" -- -+import os - from pypy.translator.platform.posix import BasePosix - -+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', -+ '-Wall', '-Wno-unused'] -+if os.environ.get('CFLAGS', None): -+ CFLAGS.extend(os.environ['CFLAGS'].split()) -+CFLAGS = tuple(CFLAGS) -+ - class BaseLinux(BasePosix): - name = "linux" - - link_flags = ('-pthread', '-lrt') -- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', -- '-Wall', '-Wno-unused') -+ cflags = CFLAGS - standalone_only = () - shared_only = ('-fPIC',) - so_ext = 'so' -@@ -29,9 +34,10 @@ class Linux(BaseLinux): - shared_only = () # it seems that on 32-bit linux, compiling with -fPIC - # gives assembler that asmgcc is not happy about. - -- def library_dirs_for_libffi_a(self): -- # places where we need to look for libffi.a -- return self.library_dirs_for_libffi() + ['/usr/lib'] -+ # Fedora Linux, at least, has the shared version but not the static -+ #def library_dirs_for_libffi_a(self): -+ # # places where we need to look for libffi.a -+ # return self.library_dirs_for_libffi() + ['/usr/lib'] - - - class Linux64(BaseLinux): diff --git a/pypy.spec b/pypy.spec index 2579860..1d6b6af 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.6 -Release: 7%{?dist} +Version: 1.7 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -126,14 +126,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch Source2: macros.pypy # Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: pypy-1.5-config.patch +Patch0: config.patch # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -163,7 +163,7 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch #
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
# TODO: get this into the upstream bug tracker, and finish inlining # support (rhbz#666963) -Patch4: pypy-1.5-more-readable-c-code.patch +Patch4: more-readable-c-code.patch # In my koji builds, /root/bin is in the PATH for some reason # This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" @@ -847,6 +847,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 +- 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated +code) + * Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 - skip test_multiprocessing diff --git a/sources b/sources index 5660f1e..197491c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1189352effc5df7df84e6916b3b3eae3 release-1.6.tar.bz2 +fc22184c931ead98bdae9ec3e79595c2 release-1.7.tar.bz2 commit 953cba8f403df754b658c3310b0505c1ba5dc5a5 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Oct 4 14:37:40 2011 -0400 1.6-7: skip test_multiprocessing * Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 - skip test_multiprocessing diff --git a/pypy.spec b/pypy.spec index 90b3f88..2579860 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -728,6 +728,12 @@ CheckPyPy() { # "strop" module doesn't exist for pypy yet: SkipTest test_strop + # I'm seeing Koji builds hanging e.g.: + #
http://koji.fedoraproject.org/koji/getfile?taskID=3386821&name=build.log
+ # The only test that seems to have timed out in that log is + # test_multiprocessing, so skip it for now: + SkipTest test_multiprocessing + echo "== Test names ==" cat testnames.txt echo "=================" @@ -841,13 +847,15 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 +- skip test_multiprocessing + * Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 - don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; missing _emacs_bytecompile macro on el5) * Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 - build using python26 on el5 (2.4 is too early) - * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 - fix SkipTest function to avoid corrupting the name of "test_gdbm" commit 2d36a5e81680be23c3e25e9f4bff4737a550687f Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Sep 13 05:00:09 2011 -0400 don't ship the emacs JIT-viewer on el5 and el6 * Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 - don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; missing _emacs_bytecompile macro on el5) diff --git a/pypy.spec b/pypy.spec index 9fc1462..90b3f88 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -100,6 +100,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Should we build a "pypy-stackless" binary? %global with_stackless 0 +# Should we build the emacs JIT-viewing mode? +%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%global with_emacs 0 +%else +%global with_emacs 1 +%endif # Easy way to enable/disable verbose logging: %global verbose_logs 0 @@ -257,7 +263,9 @@ BuildRequires: perl BuildRequires: /usr/bin/execstack # For byte-compiling the JIT-viewing mode: +%if %{with_emacs} BuildRequires: emacs +%endif # pypy is bundling these so we delete them in %%prep. I don't think they are # needed unless we build pypy targetted at running on the jvm. @@ -287,7 +295,9 @@ Summary: Run-time libraries used by PyPy implementations of Python # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) +%if %{with_emacs} Requires: emacs-filesystem >= %{_emacs_version} +%endif %description libs Libraries required by the various PyPy implementations of Python. @@ -484,7 +494,9 @@ BuildPyPy \ "--stackless" %endif +%if %{with_emacs} %{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el +%endif %install rm -rf $RPM_BUILD_ROOT @@ -662,8 +674,10 @@ find \ # are acceptable. # Install the JIT trace mode for Emacs: +%if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +%endif # Install macros for rpm: mkdir -p %{buildroot}/%{_sysconfdir}/rpm @@ -802,8 +816,10 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ +%if %{with_emacs} %{_emacs_sitelispdir}/pypytrace-mode.el %{_emacs_sitelispdir}/pypytrace-mode.elc +%endif %files %defattr(-,root,root,-) @@ -825,6 +841,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 +- don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; +missing _emacs_bytecompile macro on el5) + * Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 - build using python26 on el5 (2.4 is too early) commit 009aeb1c2d9928be62c11bf154af0644f08816eb Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon Sep 12 21:01:16 2011 -0400 build using python26 on el5 (2.4 is too early) diff --git a/pypy.spec b/pypy.spec index b303232..9fc1462 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -213,10 +213,18 @@ Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch BuildRequires: pypy %global bootstrap_python_interp pypy %else + +# Python 2.6 or later is needed, so on RHEL5 (2.4) we need to use the alternate +# python26 rpm: +%if 0%{?rhel} == 5 +BuildRequires: python26-devel +%global bootstrap_python_interp python26 +%else BuildRequires: python-devel %global bootstrap_python_interp python %endif +%endif # FIXME: I'm seeing errors like this in the logs: @@ -817,6 +825,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 +- build using python26 on el5 (2.4 is too early) + * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 - fix SkipTest function to avoid corrupting the name of "test_gdbm" commit 106cb91275756dab4a44a6e75cd090ea57c6d5a7 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Aug 25 14:50:53 2011 -0400 fix SkipTest function to avoid corrupting the name of "test_gdbm" diff --git a/pypy.spec b/pypy.spec index 2c3e47c..b303232 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -666,7 +666,7 @@ topdir=$(pwd) SkipTest() { TEST_NAME=$1 - sed -i -e"s|$TEST_NAME||" testnames.txt + sed -i -e"s|^$TEST_NAME$||g" testnames.txt } CheckPyPy() { @@ -817,6 +817,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 +- fix SkipTest function to avoid corrupting the name of "test_gdbm" + * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-3 - add rpm macros file to the devel subpackage (source 2) - skip some tests that can't pass yet commit afabd9d6bee5ad70b522d5d9c5745256ff46b827 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Aug 25 11:58:55 2011 -0400 1.6-3: add rpm macros file to the devel subpackage; skip some tests diff --git a/macros.pypy b/macros.pypy new file mode 100644 index 0000000..5f40b6f --- /dev/null +++ b/macros.pypy @@ -0,0 +1,5 @@ +%__pypy /usr/bin/pypy +%pypy_sitelib %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%pypy_sitearch %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") +%pypy_version %(%{__pypy} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypydir %{_builddir}/pypy-%{name}-%{version}-%{release} diff --git a/pypy.spec b/pypy.spec index 3280ff9..2c3e47c 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -122,6 +122,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Source and patches: Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
+# Supply various useful RPM macros for building python modules against pypy: +# __pypy, pypy_sitelib, pypy_sitearch +Source2: macros.pypy + # Edit a translator file for linux in order to configure our cflags and dynamic libffi Patch0: pypy-1.5-config.patch @@ -653,13 +657,16 @@ find \ mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +# Install macros for rpm: +mkdir -p %{buildroot}/%{_sysconfdir}/rpm +install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm + %check topdir=$(pwd) SkipTest() { - # Append the given test name to TESTS_TO_SKIP TEST_NAME=$1 - TESTS_TO_SKIP="$TESTS_TO_SKIP $TEST_NAME" + sed -i -e"s|$TEST_NAME||" testnames.txt } CheckPyPy() { @@ -686,6 +693,19 @@ CheckPyPy() { "from test.regrtest import findtests; print '\n'.join(findtests())" ) > testnames.txt + # Skip some tests: + # "audioop" doesn't exist for pypy yet: + SkipTest test_audioop + + # The gdb CPython hooks haven't been ported to cpyext: + SkipTest test_gdb + + # hotshot relies heavily on _hotshot, which doesn't exist: + SkipTest test_hotshot + + # "strop" module doesn't exist for pypy yet: + SkipTest test_strop + echo "== Test names ==" cat testnames.txt echo "=================" @@ -786,6 +806,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%config(noreplace) %{_sysconfdir}/rpm/macros.pypy %if 0%{with_stackless} %files stackless @@ -796,6 +817,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-3 +- add rpm macros file to the devel subpackage (source 2) +- skip some tests that can't pass yet + * Sat Aug 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-2 - work around test_subprocess failure seen in koji (patch 5) commit 1df5c3e618c5f2bcbdbe44f329039dfffc1cd79e Author: David Malcolm <dmalcolm(a)redhat.com> Date: Sat Aug 20 11:59:48 2011 -0400 work around test_subprocess failure seen in koji (patch 5) diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch new file mode 100644 index 0000000..eb6f324 --- /dev/null +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -0,0 +1,12 @@ +diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path 2011-08-20 11:46:31.410646024 -0400 ++++ pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py 2011-08-20 11:46:39.421645476 -0400 +@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): + for i in range(1024): + # Windows raises IOError. Others raise OSError. + with self.assertRaises(EnvironmentError) as c: +- subprocess.Popen(['nonexisting_i_hope'], ++ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if c.exception.errno != errno.ENOENT: # ignore "no such file" diff --git a/pypy.spec b/pypy.spec index c3faabb..3280ff9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -155,6 +155,16 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch # support (rhbz#666963) Patch4: pypy-1.5-more-readable-c-code.patch +# In my koji builds, /root/bin is in the PATH for some reason +# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" +# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising +# OSError: [Errno 13] Permission denied +# when it tries to read /root/bin, rather than raising "No such file" +# +# Work around this by specifying an absolute path for the non-existant +# executable +# Not yet sent upstream +Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch # Build-time requirements: @@ -318,6 +328,7 @@ sed -i \ %patch4 -p1 -b .more-readable-c-code +%patch5 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -785,6 +796,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Aug 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-2 +- work around test_subprocess failure seen in koji (patch 5) + * Thu Aug 18 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-1 - 1.6 - rewrite the %%check section, introducing per-test timeouts commit 3a2c2ec86de943a3dbdc8de5608e6a8f79c48a85 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Aug 19 19:04:38 2011 -0400 pypy-1.6-1 - 1.6 - rewrite the %check section, introducing per-test timeouts diff --git a/.gitignore b/.gitignore index 017cf34..ecd135f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pypy-1.4.1-src.tar.bz2 /pypy-1.5-src.tar.bz2 +/release-1.6.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 0c2c717..c3faabb 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.5 -Release: 2%{?dist} +Version: 1.6 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -104,6 +104,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to enable/disable verbose logging: %global verbose_logs 0 +# Easy way to turn off the selftests: +%global run_selftests 1 + %global pypyprefix %{_libdir}/pypy-%{version} %global pylibver 2.7 @@ -117,7 +120,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
# Edit a translator file for linux in order to configure our cflags and dynamic libffi Patch0: pypy-1.5-config.patch @@ -218,9 +221,17 @@ BuildRequires: openssl-devel BuildRequires: valgrind-devel %endif +%if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel +# For use in the selftests, for recording stats: +BuildRequires: time + +# For use in the selftests, for imposing a per-test timeout: +BuildRequires: perl +%endif + BuildRequires: /usr/bin/execstack # For byte-compiling the JIT-viewing mode: @@ -289,7 +300,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-%{version}-src +%setup -q -n pypy-pypy-release-%{version} %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -656,445 +667,47 @@ CheckPyPy() { pushd %{goal_dir} - # Gather a list of tests to skip, due to known failures - # TODO: report these failures to pypy upstream - # See also rhbz#666967 and rhbz#666969 - TESTS_TO_SKIP="" - - # Test failures relating to missing codecs - # Hopefully when pypy merges to 2.7 support we'll gain these via a - # refreshed stdlib: - # test_codecencodings_cn: - # all tests fail, with one of - # unknown encoding: gb18030 - # unknown encoding: gb2312 - # unknown encoding: gbk - SkipTest test_codecencodings_cn - - # test_codecencodings_hk: - # all tests fail, with: - # unknown encoding: big5hkscs - SkipTest test_codecencodings_hk - - # test_codecencodings_jp: - # all tests fail, with one of: - # unknown encoding: cp932 - # unknown encoding: euc_jisx0213 - # unknown encoding: euc_jp - # unknown encoding: shift_jis - # unknown encoding: shift_jisx0213 - SkipTest test_codecencodings_jp - - # test_codecencodings_kr: - # all tests fail, with one of: - # unknown encoding: cp949 - # unknown encoding: euc_kr - # unknown encoding: johab - SkipTest test_codecencodings_kr - - # test_codecencodings_tw: - # all tests fail, with: - # unknown encoding: big5 - SkipTest test_codecencodings_tw - - # test_multibytecodec: - # 14 failures out of 15, due to: - # unknown encoding: euc-kr - # unknown encoding: gb2312 - # unknown encoding: jisx0213 - # unknown encoding: cp949 - # unknown encoding: iso2022-jp - # unknown encoding: gb18030 - SkipTest test_multibytecodec - - # - # Other failures: - # - # test_asynchat: - # seems to hang on this test, within test_line_terminator - SkipTest test_asynchat - - # test_audioop: - # test test_audioop crashed -- <type 'exceptions.ImportError'>: No module named audioop - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/regrtest.py", line 874, in runtest_inner - # the_package = __import__(abstest, globals(), locals(), []) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_audioop.py", line 1, in <module> - # import audioop - # ImportError: No module named audioop - SkipTest test_audioop - - # test_capi: - # RPython traceback: - # RPython traceback: - # File "implement.c", line 243013, in _PyObject_New - # File "implement_1.c", line 31707, in _PyObject_NewVar - # File "implement.c", line 217060, in from_ref - # Fatal RPython error: AssertionError - SkipTest test_capi - - # test_compiler: - # 4 errors out of 13: - # testSourceCodeEncodingsError - # testWith - # testWithAss - # testYieldExpr - SkipTest test_compiler - - # test_ctypes: - # failures=17, errors=20, out of 132 tests - SkipTest test_ctypes - - # test_distutils: - # Warning -- os.environ was modified by test_distutils - # test test_distutils failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_distutils - - # test_frozen: - # TestFailed: import __hello__ failed:No module named __hello__ - SkipTest test_frozen - - # test_gc: - # test test_gc crashed -- <type 'exceptions.AttributeError'>: 'module' object has no attribute 'get_debug' - SkipTest test_gc - - # test_gdb: - # test test_gdb crashed -- <type 'exceptions.KeyError'>: 'PY_CFLAGS' - SkipTest test_gdb - - # test_generators: - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # exiting - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # exiting - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # finally - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # sys.stderr.getvalue().startswith( - # "Exception RuntimeError: 'generator ignored GeneratorExit' in " - # ) - # Expected: - # True - # Got: - # False - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.refleaks - # Failed example: - # try: - # sys.stderr = StringIO.StringIO() - # class Leaker: - # def __del__(self): - # raise RuntimeError - # l = Leaker() - # del l - # gc_collect() - # err = sys.stderr.getvalue().strip() - # err.startswith( - # "Exception RuntimeError: RuntimeError() in " - # ) - # err.endswith("> ignored") - # len(err.splitlines()) - # finally: - # sys.stderr = old - # Expected: - # True - # True - # 1 - # Got: - # False - # False - # 0 - # ********************************************************************** - # 2 items had failures: - # 4 of 107 in test.test_generators.__test__.coroutine - # 1 of 11 in test.test_generators.__test__.refleaks - # ***Test Failed*** 5 failures. - # test test_generators failed -- 5 of 294 doctests failed - SkipTest test_generators - - # test_getargs2: - # test test_getargs2 failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_getargs2 - - # test_hotshot: - # test test_hotshot crashed -- <type 'exceptions.ImportError'>: No module named _hotshot - SkipTest test_hotshot - - # test_io: - # test test_io failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_io - - # test_ioctl: - # Failing in Koji with dist-f15 with: - # ====================================================================== - # FAIL: test_ioctl (test.test_ioctl.IoctlTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 25, in test_ioctl - # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) - # AssertionError: 0 not in (8304, 17737) - # ====================================================================== - # FAIL: test_ioctl_mutate (test.test_ioctl.IoctlTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 35, in test_ioctl_mutate - # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) - # AssertionError: 0 not in (8304, 17737) - # ---------------------------------------------------------------------- - SkipTest test_ioctl - - # test_iterlen: - # 24 failures out of 25, apparently all due to TypeError - SkipTest test_iterlen - - # test_multiprocessing: - # test test_multiprocessing failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_multiprocessing - - # test_module: - # test test_module failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_module.py", line 81, in test_clear_dict_in_ref_cycle - # self.assertEqual(destroyed, [1]) - # AssertionError: Lists differ: [] != [1] - # Second list contains 1 additional elements. - # First extra element 0: - # 1 - # - [] - # + [1] - # ? + - SkipTest test_module - - # test_parser: - # 12 failures out of 15 - SkipTest test_parser - - # test_platform: - # Koji builds show: - # test test_platform failed -- errors occurred in test.test_platform.PlatformTest - SkipTest test_platform - - # test_posix: - # test test_posix failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 361, in test_getcwd_long_pathnames - # _create_and_do_getcwd(dirname) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # [...repeats...] - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 356, in _create_and_do_getcwd - # self.assertEqual(e.errno, expected_errno) - # AssertionError: 36 != 34 - SkipTest test_posix - - # test_readline: - # test test_readline failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_readline.py", line 16, in testHistoryUpdates - # readline.clear_history() - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 277, in clear_history - # del self.get_reader().history[:] - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 186, in get_reader - # console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING) - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 103, in __init__ - # self._clear = _my_getstr("clear") - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 45, in _my_getstr - # "terminal doesn't have the required '%s' capability"%cap - # InvalidTerminal: terminal doesn't have the required 'clear' capability - SkipTest test_readline - - # test_scope: - # test test_scope failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_scope.py", line 437, in testLeaks - # self.assertEqual(Foo.count, 0) - # AssertionError: 100 != 0 - SkipTest test_scope - - # test_socket: - # testSockName can fail in Koji with: - # my_ip_addr = socket.gethostbyname(socket.gethostname()) - # gaierror: (-3, 'Temporary failure in name resolution') - SkipTest test_socket - - # test_sort: - # some failures - SkipTest test_sort - - # test_sqlite: - # 3 of the sqlite3.test.dbapi.ExtensionTests raise: - # ProgrammingError: Incomplete statement '' - SkipTest test_sqlite - - # test_strop: - # test test_strop crashed -- <type 'exceptions.ImportError'>: No module named strop - SkipTest test_strop - - # test_structmembers: - # test test_structmembers failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_structmembers - - # test_subprocess: - # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset - # 'import site' failed - # . - # this bit of output is from a test of stdout in a different process ... - # /builddir/build/BUILD/pypy-1.5-src/lib_pypy/ctypes_support.py:26: RuntimeWarning: C function without declared arguments called - # return standard_c_lib.__errno_location() - # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset - # 'import site' failed - # . - # this bit of output is from a test of stdout in a different process ... - # test test_subprocess failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_subprocess - - # test_symtable: - # test test_symtable crashed -- <type 'exceptions.ImportError'>: No module named _symtable - SkipTest test_symtable - - # test_sys_settrace: - # test test_sys_settrace failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 334, in test_13_genexp - # self.run_test(generator_example) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 280, in run_test - # self.run_and_compare(func, func.events) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 277, in run_and_compare - # tracer.events, events) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 269, in compare_events - # [str(x) for x in events]))) - # AssertionError: events did not match expectation: - # (0, 'call') - # (2, 'line') - # (-6, 'call') - # (-5, 'line') - # (-4, 'line') - # (-4, 'return') - # - (-4, 'call') - # - (-4, 'exception') - # - (-1, 'line') - # - (-1, 'return') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (5, 'return') - SkipTest test_sys_settrace - - # test_tempfile: - # test test_tempfile failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_tempfile - - # test_thread - # Koji build appears to hang here - SkipTest test_thread - - # test_traceback: - # works when run standalone; failures seen when run as part of a suite - SkipTest test_traceback - - # test_uuid: - # ====================================================================== - # ERROR: test_ifconfig_getnode (test.test_uuid.TestUUID) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_uuid.py", line 306, in test_ifconfig_getnode - # node = uuid._ifconfig_getnode() - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/uuid.py", line 326, in _ifconfig_getnode - # ip_addr = socket.gethostbyname(socket.gethostname()) - # gaierror: [Errno -3] Temporary failure in name resolution - # ---------------------------------------------------------------------- - # Ran 14 tests in 0.369s - # FAILED (errors=1) - SkipTest test_uuid - - # test_zipimport_support: - # ====================================================================== - # ERROR: test_doctest_main_issue4197 (test.test_zipimport_support.ZipSupportTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 194, in test_doctest_main_issue4197 - # exit_code, data = run_python(script_name) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 80, in run_python - # p = spawn_python(*args, **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python - # **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ - # errread, errwrite) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child - # raise child_exception - # OSError: [Errno 13] Permission denied - # ====================================================================== - # ERROR: test_pdb_issue4201 (test.test_zipimport_support.ZipSupportTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 221, in test_pdb_issue4201 - # p = spawn_python(script_name) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python - # **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ - # errread, errwrite) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child - # raise child_exception - # OSError: [Errno 13] Permission denied - # ---------------------------------------------------------------------- - # Ran 4 tests in 0.726s - # FAILED (errors=2) - SkipTest test_zipimport_support - - # test_zlib: - # failure seen in Koji, not sure of reason why: - # test test_zlib failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.4.1-src/lib-python/2.5.2/test/test_zlib.py", line 72, in test_baddecompressobj - # self.assertRaises(ValueError, zlib.decompressobj, 0) - # AssertionError: ValueError not raised - SkipTest test_zlib - - %if 0%{use_self_when_building} - # Patch 3 prioritizes the installed copy of pypy's libraries over the - # build copy. - # This leads to test failures of test_pep263 and test_tarfile - # For now, suppress these when building using pypy itself: - SkipTest test_pep263 # on-disk encoding issues - SkipTest test_tarfile # permissions issues - %endif - - # Run the built binary through the selftests - # "-w" : re-run failed tests in verbose mode - time ./$ExeName -m test.regrtest -w -x $TESTS_TO_SKIP + # I'm seeing numerous cases where tests seem to hang, or fail unpredictably + # So we'll run each test in its own process, with a timeout + + # Use regrtest to explicitly list all tests: + ( ./$ExeName -c \ + "from test.regrtest import findtests; print '\n'.join(findtests())" + ) > testnames.txt + + echo "== Test names ==" + cat testnames.txt + echo "=================" + + echo "" > failed-tests.txt + + for TestName in $(cat testnames.txt) ; do + + echo "===================" $TestName "====================" + + # Use /usr/bin/time (rather than the shell "time" builtin) to gather + # info on the process (time/CPU/memory). This passes on the exit + # status of the underlying command + # + # Use perl's alarm command to impose a timeout + # 900 seconds is 15 minutes per test. + # If a test hangs, that test should get terminated, allowing the build + # to continue. + # + # Invoke pypy on test.regrtest to run the specific test suite + # verbosely + # + # For now, || true, so that any failures don't halt the build: + ( /usr/bin/time \ + perl -e 'alarm shift @ARGV; exec @ARGV' 900 \ + ./$ExeName -m test.regrtest -v $TestName ) \ + || (echo $TestName >> failed-tests.txt) \ + || true + done + + echo "== Failed tests ==" + cat failed-tests.txt + echo "=================" popd @@ -1124,12 +737,14 @@ CheckPyPy() { echo "--------------------------------------------------------------" } +%if %{run_selftests} CheckPyPy pypy %if 0%{with_stackless} CheckPyPy pypy-stackless %endif +%endif # run_selftests %clean @@ -1142,7 +757,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix} %dir %{pypyprefix}/lib-python -%{pypyprefix}/lib-python/TODO %{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib-python/modified-%{pylibver}/ @@ -1171,6 +785,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 18 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-1 +- 1.6 +- rewrite the %%check section, introducing per-test timeouts + * Tue Aug 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-2 - add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace logs in emacs diff --git a/sources b/sources index a047407..5660f1e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb9ada2c50666318c3a2863da1fbe487 pypy-1.5-src.tar.bz2 +1189352effc5df7df84e6916b3b3eae3 release-1.6.tar.bz2 commit 1feef4d56b6572b03fd805e50ad8f6e43900cfac Author: David Malcolm <dmalcolm(a)redhat.com> Date: Wed Aug 3 13:02:57 2011 -0400 add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace logs in emacs diff --git a/pypy.spec b/pypy.spec index b4705c1..0c2c717 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -223,6 +223,9 @@ BuildRequires: gc-devel BuildRequires: /usr/bin/execstack +# For byte-compiling the JIT-viewing mode: +BuildRequires: emacs + # pypy is bundling these so we delete them in %%prep. I don't think they are # needed unless we build pypy targetted at running on the jvm. #BuildRequires: jna @@ -248,6 +251,11 @@ CPU architecture. %package libs Group: Development/Languages Summary: Run-time libraries used by PyPy implementations of Python + +# We supply an emacs mode for the JIT viewer. +# (This doesn't bring in all of emacs, just the directory structure) +Requires: emacs-filesystem >= %{_emacs_version} + %description libs Libraries required by the various PyPy implementations of Python. @@ -442,6 +450,8 @@ BuildPyPy \ "--stackless" %endif +%{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el + %install rm -rf $RPM_BUILD_ROOT @@ -617,6 +627,10 @@ find \ # but given that the objective is to preserve a copy of the source code, those # are acceptable. +# Install the JIT trace mode for Emacs: +mkdir -p %{buildroot}/%{_emacs_sitelispdir} +cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} + %check topdir=$(pwd) @@ -1135,6 +1149,8 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ +%{_emacs_sitelispdir}/pypytrace-mode.el +%{_emacs_sitelispdir}/pypytrace-mode.elc %files %defattr(-,root,root,-) @@ -1155,6 +1171,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Aug 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-2 +- add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace +logs in emacs + * Mon May 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-1 - 1.5 commit 3d2cef177d26ff303a5be984f912e2b8d4266b0d Author: Dan Horák <dan(a)danny.cz> Date: Wed May 11 10:15:52 2011 +0200 fix build on non-jit arches Build on non-jit arch like s390 fails with [translation:info] Translating target as defined by targetpypystandalone [platform:msg] Setting platform to 'host' cc=None Traceback (most recent call last): File "translate.py", line 322, in <module> main() File "translate.py", line 208, in main targetspec_dic, translateconfig, config, args = parse_options_and_load_target() File "translate.py", line 176, in parse_options_and_load_target targetspec_dic['handle_config'](config, translateconfig) File "targetpypystandalone.py", line 109, in handle_config raise Exception("You have to specify the --opt level.\n" Exception: You have to specify the --opt level. Try --opt=2 or --opt=jit, or equivalently -O2 or -Ojit . diff --git a/pypy.spec b/pypy.spec index 1a651e0..b4705c1 100644 --- a/pypy.spec +++ b/pypy.spec @@ -431,6 +431,8 @@ BuildPyPy \ pypy \ %if 0%{with_jit} "-Ojit" \ +%else + "-O2" \ %endif %{nil} commit 169de85aca1a527ea42ef102aa32a40ba1740168 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon May 2 14:46:32 2011 -0400 Rebase to 1.5 (rhbz#701121) Update patches: patch 0: pypy-1.4-config.patch -> pypy-1.5-config.patch patch 4: pypy-1.4.1-more-readable-c-code.patch -> pypy-1.5-more-readable-c-code.patch Remove references to *.inl files, no longer present Add the following tests to the skip list: test_audioop, test_capi, test_distutils, test_gc, test_gdb, test_generators, test_getargs2, test_hotshot, test_io, test_multiprocessing, test_posix, test_readline, test_scope, test_strop, test_structmembers, test_subprocess, test_symtable, test_sys_settrace, test_tempfile, test_thread, test_uuid, test_zipimport_support Add a couple of text files to the payload (TODO, stdlib-version.txt) diff --git a/.gitignore b/.gitignore index 2878978..017cf34 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pypy-1.4.1-src.tar.bz2 +/pypy-1.5-src.tar.bz2 diff --git a/pypy-1.4-config.patch b/pypy-1.5-config.patch similarity index 69% rename from pypy-1.4-config.patch rename to pypy-1.5-config.patch index 0b82ac8..82d8fc9 100644 --- a/pypy-1.4-config.patch +++ b/pypy-1.5-config.patch @@ -1,9 +1,10 @@ -Index: pypy-1.4/pypy/translator/platform/linux.py -=================================================================== ---- pypy-1.4.orig/pypy/translator/platform/linux.py -+++ pypy-1.4/pypy/translator/platform/linux.py -@@ -3,17 +3,22 @@ import py, os - from pypy.translator.platform import _run_subprocess +diff -up pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora pypy-1.5-src/pypy/translator/platform/linux.py +--- pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/platform/linux.py 2011-04-30 18:59:24.041160978 -0400 +@@ -1,13 +1,18 @@ + """Support for Linux.""" +- ++import os from pypy.translator.platform.posix import BasePosix +CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', @@ -22,16 +23,10 @@ Index: pypy-1.4/pypy/translator/platform/linux.py standalone_only = () shared_only = ('-fPIC',) so_ext = 'so' - so_prefixes = ('lib', '') -- -+ - def _args_for_shared(self, args): - return ['-shared'] + args - -@@ -29,9 +34,10 @@ class BaseLinux(BasePosix): - class Linux(BaseLinux): +@@ -29,9 +34,10 @@ class Linux(BaseLinux): shared_only = () # it seems that on 32-bit linux, compiling with -fPIC # gives assembler that asmgcc is not happy about. + - def library_dirs_for_libffi_a(self): - # places where we need to look for libffi.a - return self.library_dirs_for_libffi() + ['/usr/lib'] diff --git a/pypy-1.4.1-more-readable-c-code.patch b/pypy-1.5-more-readable-c-code.patch similarity index 81% rename from pypy-1.4.1-more-readable-c-code.patch rename to pypy-1.5-more-readable-c-code.patch index 45fa534..b7103e2 100644 --- a/pypy-1.4.1-more-readable-c-code.patch +++ b/pypy-1.5-more-readable-c-code.patch @@ -1,7 +1,7 @@ -diff -r cd083843b67a pypy/interpreter/pycode.py ---- a/pypy/interpreter/pycode.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/interpreter/pycode.py Wed Jan 05 16:14:35 2011 -0500 -@@ -14,6 +14,7 @@ +diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-src/pypy/interpreter/pycode.py +--- pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/interpreter/pycode.py 2011-05-02 14:28:33.942161002 -0400 +@@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, CO_GENERATOR, CO_CONTAINSGLOBALS) @@ -9,7 +9,7 @@ diff -r cd083843b67a pypy/interpreter/pycode.py from pypy.rlib.rarithmetic import intmask from pypy.rlib.debug import make_sure_not_resized from pypy.rlib import jit -@@ -81,6 +82,7 @@ +@@ -80,6 +81,7 @@ class PyCode(eval.Code): self.hidden_applevel = hidden_applevel self.magic = magic self._signature = cpython_code_signature(self) @@ -17,10 +17,10 @@ diff -r cd083843b67a pypy/interpreter/pycode.py self._initialize() def _initialize(self): -@@ -403,3 +405,25 @@ +@@ -396,3 +398,23 @@ class PyCode(eval.Code): + def repr(self, space): return space.wrap(self.get_repr()) - repr.unwrap_spec = ['self', ObjSpace] + + def get_linenum_for_offset(self, offset): + # Given a bytecode offset, return a 1-based index into the lines of the @@ -41,12 +41,10 @@ diff -r cd083843b67a pypy/interpreter/pycode.py + # raise an IOError) + self._ensure_source() + return self._cached_source[linenum - 1] -+ -+ -diff -r cd083843b67a pypy/objspace/flow/model.py ---- a/pypy/objspace/flow/model.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/model.py Wed Jan 05 16:14:35 2011 -0500 -@@ -31,6 +31,120 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/model.py +--- pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/model.py 2011-05-02 14:28:33.942161002 -0400 +@@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden __metaclass__ = type @@ -167,7 +165,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class FunctionGraph(object): __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] -@@ -94,6 +208,21 @@ +@@ -94,6 +208,21 @@ class FunctionGraph(object): seen[block] = True stack += block.exits[::-1] @@ -189,7 +187,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py def iterlinks(self): block = self.startblock seen = {block: True} -@@ -183,14 +312,14 @@ +@@ -183,14 +312,14 @@ class Block(object): self.exits = [] # list of Link(s) def at(self): @@ -207,7 +205,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py else: if (not self.exits) and len(self.inputargs) == 1: txt = "return block" -@@ -245,6 +374,21 @@ +@@ -245,6 +374,21 @@ class Block(object): from pypy.translator.tool.graphpage import try_show try_show(self) @@ -229,7 +227,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class Variable(object): __slots__ = ["_name", "_nr", "concretetype"] -@@ -331,13 +475,15 @@ +@@ -331,13 +475,15 @@ class WrapException(Exception): class SpaceOperation(object): @@ -248,7 +246,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py def __eq__(self, other): return (self.__class__ is other.__class__ and -@@ -352,8 +498,9 @@ +@@ -352,8 +498,9 @@ class SpaceOperation(object): return hash((self.opname,tuple(self.args),self.result)) def __repr__(self): @@ -260,7 +258,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class Atom(object): def __init__(self, name): -@@ -448,8 +595,7 @@ +@@ -427,8 +574,7 @@ def copygraph(graph, shallow=False, varm for op in oplist: copyop = SpaceOperation(op.opname, [copyvar(v) for v in op.args], @@ -270,10 +268,10 @@ diff -r cd083843b67a pypy/objspace/flow/model.py result.append(copyop) return result newblock.operations = copyoplist(block.operations) -diff -r cd083843b67a pypy/objspace/flow/objspace.py ---- a/pypy/objspace/flow/objspace.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/objspace.py Wed Jan 05 16:14:35 2011 -0500 -@@ -310,7 +310,9 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/objspace.py +--- pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/objspace.py 2011-05-02 14:28:33.943161001 -0400 +@@ -313,7 +313,9 @@ class FlowObjSpace(ObjSpace): def do_operation(self, name, *args_w): spaceop = SpaceOperation(name, args_w, Variable()) if hasattr(self, 'executioncontext'): # not here during bootstrapping @@ -284,10 +282,10 @@ diff -r cd083843b67a pypy/objspace/flow/objspace.py self.executioncontext.recorder.append(spaceop) return spaceop.result -diff -r cd083843b67a pypy/objspace/flow/test/test_model.py ---- a/pypy/objspace/flow/test/test_model.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/test/test_model.py Wed Jan 05 16:14:35 2011 -0500 -@@ -132,3 +132,25 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/test/test_model.py +--- pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/test/test_model.py 2011-05-02 14:28:33.943161001 -0400 +@@ -119,3 +119,25 @@ def test_variable(): assert v2.renamed assert v2.name.startswith("foobar_") and v2.name != v.name assert v2.name.split('_', 1)[1].isdigit() @@ -313,10 +311,10 @@ diff -r cd083843b67a pypy/objspace/flow/test/test_model.py + assert cmp(oplocA, oplocB) < 0 + assert cmp(oplocB, oplocA) > 0 + -diff -r cd083843b67a pypy/rpython/rtyper.py ---- a/pypy/rpython/rtyper.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/rpython/rtyper.py Wed Jan 05 16:14:35 2011 -0500 -@@ -800,7 +800,7 @@ +diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/pypy/rpython/rtyper.py +--- pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/rpython/rtyper.py 2011-05-02 14:28:33.943161001 -0400 +@@ -800,7 +800,7 @@ class HighLevelOp(object): return vars def genop(self, opname, args_v, resulttype=None): @@ -325,7 +323,7 @@ diff -r cd083843b67a pypy/rpython/rtyper.py def gendirectcall(self, ll_function, *args_v): return self.llops.gendirectcall(ll_function, *args_v) -@@ -935,7 +935,7 @@ +@@ -935,7 +935,7 @@ class LowLevelOpList(list): v.concretetype)) return v @@ -334,7 +332,7 @@ diff -r cd083843b67a pypy/rpython/rtyper.py try: for v in args_v: v.concretetype -@@ -944,7 +944,7 @@ +@@ -944,7 +944,7 @@ class LowLevelOpList(list): " and pass its result to genop()," " never hop.args_v directly.") vresult = Variable() @@ -343,18 +341,18 @@ diff -r cd083843b67a pypy/rpython/rtyper.py if resulttype is None: vresult.concretetype = Void return None -diff -r cd083843b67a pypy/translator/backendopt/inline.py ---- a/pypy/translator/backendopt/inline.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/backendopt/inline.py Wed Jan 05 16:14:35 2011 -0500 -@@ -4,6 +4,7 @@ +diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-1.5-src/pypy/translator/backendopt/inline.py +--- pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/backendopt/inline.py 2011-05-02 14:32:26.975161005 -0400 +@@ -4,6 +4,7 @@ from pypy.translator.simplify import get from pypy.translator.unsimplify import copyvar from pypy.objspace.flow.model import Variable, Constant, Block, Link from pypy.objspace.flow.model import SpaceOperation, c_last_exception +from pypy.objspace.flow.model import OperationLoc from pypy.objspace.flow.model import FunctionGraph - from pypy.objspace.flow.model import traverse, mkentrymap, checkgraph + from pypy.objspace.flow.model import mkentrymap, checkgraph from pypy.annotation import model as annmodel -@@ -231,6 +232,7 @@ +@@ -231,6 +232,7 @@ class BaseInliner(object): self.varmap = {} self._copied_blocks = {} self.op = block.operations[index_operation] @@ -362,7 +360,7 @@ diff -r cd083843b67a pypy/translator/backendopt/inline.py self.graph_to_inline = self.get_graph_from_op(self.op) self.exception_guarded = False if (block.exitswitch == c_last_exception and -@@ -297,7 +299,9 @@ +@@ -290,7 +292,9 @@ class BaseInliner(object): def copy_operation(self, op): args = [self.get_new_name(arg) for arg in op.args] @@ -373,9 +371,9 @@ diff -r cd083843b67a pypy/translator/backendopt/inline.py return result def copy_block(self, block): -diff -r cd083843b67a pypy/translator/c/funcgen.py ---- a/pypy/translator/c/funcgen.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/c/funcgen.py Wed Jan 05 16:14:35 2011 -0500 +diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/funcgen.py +--- pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/c/funcgen.py 2011-05-02 14:28:33.944161001 -0400 @@ -1,4 +1,6 @@ import sys +import inspect @@ -383,7 +381,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring from pypy.translator.c.support import cdecl from pypy.translator.c.support import llvalue_from_constant, gen_assignments -@@ -22,6 +24,38 @@ +@@ -22,6 +24,38 @@ LOCALVAR = 'l_%s' KEEP_INLINED_GRAPHS = False @@ -422,7 +420,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py class FunctionCodeGenerator(object): """ Collects information about a function which we have to generate -@@ -210,14 +244,57 @@ +@@ -210,14 +244,57 @@ class FunctionCodeGenerator(object): def cfunction_body(self): graph = self.graph @@ -483,7 +481,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py for line in self.gen_op(op): yield line if len(block.exits) == 0: -@@ -310,7 +387,7 @@ +@@ -309,7 +386,7 @@ class FunctionCodeGenerator(object): assignments.append((a2typename, dest, src)) for line in gen_assignments(assignments): yield line @@ -492,16 +490,16 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py if link.target in self.innerloops: loop = self.innerloops[link.target] if link is loop.links[-1]: # link that ends a loop -diff -r cd083843b67a pypy/translator/c/test/test_genc.py ---- a/pypy/translator/c/test/test_genc.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/c/test/test_genc.py Wed Jan 05 16:14:35 2011 -0500 +diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/test/test_genc.py +--- pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/c/test/test_genc.py 2011-05-02 14:28:33.945161001 -0400 @@ -1,4 +1,5 @@ import autopath, sys, os, py +import re from pypy.rpython.lltypesystem.lltype import * from pypy.annotation import model as annmodel from pypy.translator.translator import TranslationContext -@@ -498,3 +499,130 @@ +@@ -515,3 +516,130 @@ def test_inhibit_tail_call(): else: assert 0, "the call was not found in the C source" assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] @@ -632,10 +630,10 @@ diff -r cd083843b67a pypy/translator/c/test/test_genc.py + assert 'Here is a ' in c_fn_src + assert 'style comment within an RPython docstring' in c_fn_src + -diff -r cd083843b67a pypy/translator/driver.py ---- a/pypy/translator/driver.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/driver.py Wed Jan 05 16:14:35 2011 -0500 -@@ -539,6 +539,7 @@ +diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-src/pypy/translator/driver.py +--- pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/driver.py 2011-05-02 14:28:33.945161001 -0400 +@@ -536,6 +536,7 @@ class TranslationDriver(SimpleTaskEngine dstname = self.compute_exe_name() + '.staticdata.info' shutil.copy(str(fname), str(dstname)) self.log.info('Static data info written to %s' % dstname) @@ -643,12 +641,12 @@ diff -r cd083843b67a pypy/translator/driver.py # task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -r cd083843b67a pypy/translator/gensupp.py ---- a/pypy/translator/gensupp.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/gensupp.py Wed Jan 05 16:14:35 2011 -0500 -@@ -16,8 +16,8 @@ - def visit(block): - if isinstance(block, Block): +diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-src/pypy/translator/gensupp.py +--- pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/gensupp.py 2011-05-02 14:33:31.026161001 -0400 +@@ -14,8 +14,8 @@ def ordered_blocks(graph): + allblocks = [] + for block in graph.iterblocks(): # first we order by offset in the code string - if block.operations: - ofs = block.operations[0].offset @@ -657,10 +655,10 @@ diff -r cd083843b67a pypy/translator/gensupp.py else: ofs = sys.maxint # then we order by input variable name or value -diff -r cd083843b67a pypy/translator/interactive.py ---- a/pypy/translator/interactive.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/interactive.py Wed Jan 05 16:14:35 2011 -0500 -@@ -138,7 +138,7 @@ +diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1.5-src/pypy/translator/interactive.py +--- pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/interactive.py 2011-05-02 14:28:33.946161001 -0400 +@@ -138,7 +138,7 @@ class Translation(object): def source_c(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) self.ensure_backend('c') @@ -669,10 +667,10 @@ diff -r cd083843b67a pypy/translator/interactive.py def source_cl(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) -diff -r cd083843b67a pypy/translator/llsupport/wrapper.py ---- a/pypy/translator/llsupport/wrapper.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/llsupport/wrapper.py Wed Jan 05 16:14:35 2011 -0500 -@@ -59,6 +59,8 @@ +diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-1.5-src/pypy/translator/llsupport/wrapper.py +--- pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/llsupport/wrapper.py 2011-05-02 14:28:33.946161001 -0400 +@@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam # "return result" block = Block(wrapper_inputargs) wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) @@ -681,10 +679,10 @@ diff -r cd083843b67a pypy/translator/llsupport/wrapper.py translator.update_call_graph(wgraph, graph, object()) translator.graphs.append(wgraph) block.operations[:] = newops -diff -r cd083843b67a pypy/translator/simplify.py ---- a/pypy/translator/simplify.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/simplify.py Wed Jan 05 16:14:35 2011 -0500 -@@ -294,7 +294,7 @@ +diff -up pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code pypy-1.5-src/pypy/translator/simplify.py +--- pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/simplify.py 2011-05-02 14:28:33.952161001 -0400 +@@ -298,7 +298,7 @@ def join_blocks(graph): return renaming.get(v, v) def rename_op(op): args = [rename(a) for a in op.args] diff --git a/pypy.spec b/pypy.spec index c69893a..1a651e0 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.4.1 -Release: 10%{?dist} +Version: 1.5 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -105,7 +105,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %global verbose_logs 0 %global pypyprefix %{_libdir}/pypy-%{version} -%global pylibver 2.5.2 +%global pylibver 2.7 # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/translator/goal @@ -120,7 +120,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
# Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: pypy-1.4-config.patch +Patch0: pypy-1.5-config.patch # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -150,7 +150,7 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch #
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
# TODO: get this into the upstream bug tracker, and finish inlining # support (rhbz#666963) -Patch4: pypy-1.4.1-more-readable-c-code.patch +Patch4: pypy-1.5-more-readable-c-code.patch # Build-time requirements: @@ -584,7 +584,7 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # interface going forward, so let's just mimic upstream for now. %global pypy_include_dir %{pypyprefix}/include mkdir -p %{buildroot}/%{pypy_include_dir} -cp include/*.h include/*.inl %{buildroot}/%{pypy_include_dir} +cp include/*.h %{buildroot}/%{pypy_include_dir} # Capture the RPython source code files from the build within the debuginfo @@ -698,6 +698,25 @@ CheckPyPy() { # seems to hang on this test, within test_line_terminator SkipTest test_asynchat + # test_audioop: + # test test_audioop crashed -- <type 'exceptions.ImportError'>: No module named audioop + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/regrtest.py", line 874, in runtest_inner + # the_package = __import__(abstest, globals(), locals(), []) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_audioop.py", line 1, in <module> + # import audioop + # ImportError: No module named audioop + SkipTest test_audioop + + # test_capi: + # RPython traceback: + # RPython traceback: + # File "implement.c", line 243013, in _PyObject_New + # File "implement_1.c", line 31707, in _PyObject_NewVar + # File "implement.c", line 217060, in from_ref + # Fatal RPython error: AssertionError + SkipTest test_capi + # test_compiler: # 4 errors out of 13: # testSourceCodeEncodingsError @@ -710,10 +729,102 @@ CheckPyPy() { # failures=17, errors=20, out of 132 tests SkipTest test_ctypes + # test_distutils: + # Warning -- os.environ was modified by test_distutils + # test test_distutils failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_distutils + # test_frozen: # TestFailed: import __hello__ failed:No module named __hello__ SkipTest test_frozen + # test_gc: + # test test_gc crashed -- <type 'exceptions.AttributeError'>: 'module' object has no attribute 'get_debug' + SkipTest test_gc + + # test_gdb: + # test test_gdb crashed -- <type 'exceptions.KeyError'>: 'PY_CFLAGS' + SkipTest test_gdb + + # test_generators: + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # exiting + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # exiting + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # finally + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # sys.stderr.getvalue().startswith( + # "Exception RuntimeError: 'generator ignored GeneratorExit' in " + # ) + # Expected: + # True + # Got: + # False + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.refleaks + # Failed example: + # try: + # sys.stderr = StringIO.StringIO() + # class Leaker: + # def __del__(self): + # raise RuntimeError + # l = Leaker() + # del l + # gc_collect() + # err = sys.stderr.getvalue().strip() + # err.startswith( + # "Exception RuntimeError: RuntimeError() in " + # ) + # err.endswith("> ignored") + # len(err.splitlines()) + # finally: + # sys.stderr = old + # Expected: + # True + # True + # 1 + # Got: + # False + # False + # 0 + # ********************************************************************** + # 2 items had failures: + # 4 of 107 in test.test_generators.__test__.coroutine + # 1 of 11 in test.test_generators.__test__.refleaks + # ***Test Failed*** 5 failures. + # test test_generators failed -- 5 of 294 doctests failed + SkipTest test_generators + + # test_getargs2: + # test test_getargs2 failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_getargs2 + + # test_hotshot: + # test test_hotshot crashed -- <type 'exceptions.ImportError'>: No module named _hotshot + SkipTest test_hotshot + + # test_io: + # test test_io failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_io + # test_ioctl: # Failing in Koji with dist-f15 with: # ====================================================================== @@ -737,6 +848,23 @@ CheckPyPy() { # 24 failures out of 25, apparently all due to TypeError SkipTest test_iterlen + # test_multiprocessing: + # test test_multiprocessing failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_multiprocessing + + # test_module: + # test test_module failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_module.py", line 81, in test_clear_dict_in_ref_cycle + # self.assertEqual(destroyed, [1]) + # AssertionError: Lists differ: [] != [1] + # Second list contains 1 additional elements. + # First extra element 0: + # 1 + # - [] + # + [1] + # ? + + SkipTest test_module + # test_parser: # 12 failures out of 15 SkipTest test_parser @@ -746,6 +874,44 @@ CheckPyPy() { # test test_platform failed -- errors occurred in test.test_platform.PlatformTest SkipTest test_platform + # test_posix: + # test test_posix failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 361, in test_getcwd_long_pathnames + # _create_and_do_getcwd(dirname) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # [...repeats...] + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 356, in _create_and_do_getcwd + # self.assertEqual(e.errno, expected_errno) + # AssertionError: 36 != 34 + SkipTest test_posix + + # test_readline: + # test test_readline failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_readline.py", line 16, in testHistoryUpdates + # readline.clear_history() + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 277, in clear_history + # del self.get_reader().history[:] + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 186, in get_reader + # console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING) + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 103, in __init__ + # self._clear = _my_getstr("clear") + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 45, in _my_getstr + # "terminal doesn't have the required '%s' capability"%cap + # InvalidTerminal: terminal doesn't have the required 'clear' capability + SkipTest test_readline + + # test_scope: + # test test_scope failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_scope.py", line 437, in testLeaks + # self.assertEqual(Foo.count, 0) + # AssertionError: 100 != 0 + SkipTest test_scope + # test_socket: # testSockName can fail in Koji with: # my_ip_addr = socket.gethostbyname(socket.gethostname()) @@ -761,10 +927,138 @@ CheckPyPy() { # ProgrammingError: Incomplete statement '' SkipTest test_sqlite + # test_strop: + # test test_strop crashed -- <type 'exceptions.ImportError'>: No module named strop + SkipTest test_strop + + # test_structmembers: + # test test_structmembers failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_structmembers + + # test_subprocess: + # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset + # 'import site' failed + # . + # this bit of output is from a test of stdout in a different process ... + # /builddir/build/BUILD/pypy-1.5-src/lib_pypy/ctypes_support.py:26: RuntimeWarning: C function without declared arguments called + # return standard_c_lib.__errno_location() + # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset + # 'import site' failed + # . + # this bit of output is from a test of stdout in a different process ... + # test test_subprocess failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_subprocess + + # test_symtable: + # test test_symtable crashed -- <type 'exceptions.ImportError'>: No module named _symtable + SkipTest test_symtable + + # test_sys_settrace: + # test test_sys_settrace failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 334, in test_13_genexp + # self.run_test(generator_example) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 280, in run_test + # self.run_and_compare(func, func.events) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 277, in run_and_compare + # tracer.events, events) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 269, in compare_events + # [str(x) for x in events]))) + # AssertionError: events did not match expectation: + # (0, 'call') + # (2, 'line') + # (-6, 'call') + # (-5, 'line') + # (-4, 'line') + # (-4, 'return') + # - (-4, 'call') + # - (-4, 'exception') + # - (-1, 'line') + # - (-1, 'return') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (5, 'return') + SkipTest test_sys_settrace + + # test_tempfile: + # test test_tempfile failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_tempfile + + # test_thread + # Koji build appears to hang here + SkipTest test_thread + # test_traceback: # works when run standalone; failures seen when run as part of a suite SkipTest test_traceback + # test_uuid: + # ====================================================================== + # ERROR: test_ifconfig_getnode (test.test_uuid.TestUUID) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_uuid.py", line 306, in test_ifconfig_getnode + # node = uuid._ifconfig_getnode() + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/uuid.py", line 326, in _ifconfig_getnode + # ip_addr = socket.gethostbyname(socket.gethostname()) + # gaierror: [Errno -3] Temporary failure in name resolution + # ---------------------------------------------------------------------- + # Ran 14 tests in 0.369s + # FAILED (errors=1) + SkipTest test_uuid + + # test_zipimport_support: + # ====================================================================== + # ERROR: test_doctest_main_issue4197 (test.test_zipimport_support.ZipSupportTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 194, in test_doctest_main_issue4197 + # exit_code, data = run_python(script_name) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 80, in run_python + # p = spawn_python(*args, **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python + # **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ + # errread, errwrite) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child + # raise child_exception + # OSError: [Errno 13] Permission denied + # ====================================================================== + # ERROR: test_pdb_issue4201 (test.test_zipimport_support.ZipSupportTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 221, in test_pdb_issue4201 + # p = spawn_python(script_name) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python + # **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ + # errread, errwrite) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child + # raise child_exception + # OSError: [Errno 13] Permission denied + # ---------------------------------------------------------------------- + # Ran 4 tests in 0.726s + # FAILED (errors=2) + SkipTest test_zipimport_support + # test_zlib: # failure seen in Koji, not sure of reason why: # test test_zlib failed -- Traceback (most recent call last): @@ -832,6 +1126,8 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix} %dir %{pypyprefix}/lib-python +%{pypyprefix}/lib-python/TODO +%{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib-python/modified-%{pylibver}/ %{pypyprefix}/lib-python/conftest.py* @@ -847,7 +1143,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{pypy_include_dir}/*.inl %if 0%{with_stackless} %files stackless @@ -858,6 +1153,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-1 +- 1.5 + * Wed Apr 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-10 - build a /usr/bin/pypy (but without the JIT compiler) on architectures that don't support the JIT, so that they do at least have something that runs diff --git a/sources b/sources index 90f34be..a047407 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ebbbb156b1eb842e9e65d909ed5f9f6d pypy-1.4.1-src.tar.bz2 +cb9ada2c50666318c3a2863da1fbe487 pypy-1.5-src.tar.bz2 commit 3ca83f1944c99711e69be7a733f36a976d1fcec2 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Sat Apr 30 18:24:07 2011 -0400 Fix the build on architectures that the JIT doesn't support - build a /usr/bin/pypy (but without the JIT compiler) on architectures that don't support the JIT, so that they do at least have something that runs diff --git a/pypy.spec b/pypy.spec index ca09b94..c69893a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -74,7 +74,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # [Timer] Total: --- 5215.3 s -# Should we build a "pypy" binary? (with jit) +# We will build a "pypy" binary. +# +# Unfortunately, the JIT support is only available on some architectures. +# # pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the # following options: # 'i386', 'x86' @@ -82,6 +85,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # 'x86_64' # 'cli' # 'llvm' +# +# We will only build with JIT support on those architectures, and build without +# it on the other archs. The resulting binary will typically be slower than +# CPython for the latter case. +# %ifarch %{ix86} x86_64 # FIXME: is there a better way of expressing "intel" here? %global with_jit 1 @@ -225,8 +233,16 @@ BuildRequires: /usr/bin/execstack Requires: pypy-libs = %{version}-%{release} %description -PyPy's implementation of Python, featuring a Just-In-Time compiler, and various -optimized implementations of the standard types (strings, dictionaries, etc) +PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU +architectures, and various optimized implementations of the standard types +(strings, dictionaries, etc) + +%if 0%{with_jit} +This build of PyPy has JIT-compilation enabled. +%else +This build of PyPy has JIT-compilation disabled, as it is not supported on this +CPU architecture. +%endif %package libs @@ -411,11 +427,12 @@ BuildPyPy() { popd } -%if 0%{with_jit} BuildPyPy \ pypy \ - "-Ojit" +%if 0%{with_jit} + "-Ojit" \ %endif + %{nil} %if 0%{with_stackless} BuildPyPy \ @@ -448,9 +465,7 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} -%if 0%{with_jit} InstallPyPy pypy -%endif %if 0%{with_stackless} InstallPyPy pypy-stackless @@ -799,9 +814,7 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -%if 0%{with_jit} CheckPyPy pypy -%endif %if 0%{with_stackless} CheckPyPy pypy-stackless @@ -825,12 +838,10 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ -%if 0%{with_jit} %files %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/pypy -%endif %files devel %defattr(-,root,root,-) @@ -847,6 +858,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-10 +- build a /usr/bin/pypy (but without the JIT compiler) on architectures that +don't support the JIT, so that they do at least have something that runs + * Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.4.1-9 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
commit d853ff6a5bdd4ce40976333f048aba1616374604 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Tue Feb 8 20:23:05 2011 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 6f44a9a..ca09b94 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -847,6 +847,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.4.1-9 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+ * Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-8 - disable self-hosting for now, due to fatal error seen JIT-compiling the translator commit c225b1c0921c528b804bdce231951a10f040cb6c Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jan 14 11:58:45 2011 -0500 Disable self-hosting for now, due to fatal error seen JIT-compiling the translator diff --git a/pypy.spec b/pypy.spec index 9c8134d..6f44a9a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -152,8 +152,38 @@ Patch4: pypy-1.4.1-more-readable-c-code.patch # # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: + +# I'm disabling the self-hosting for now, due to a fatal error seen inside the +# JIT, presumably whilst JIT-compiling something within the translator's +# inliner. +# +# Specifically, building pypy-1.4.1-7.fc15.src.rpm on x86_64 using pypy-1.4.1-5.fc15.x86_64 +#
http://koji.fedoraproject.org/koji/taskinfo?taskID=2721517
+# failed with this RPython traceback: +# ... snip ... +# [rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctransform.asmgcroot.ShapeDecompressor instance at 0x00000000f0b5bc80> has no attribute 'addr' +# [rtyper] specializing: 179300 / 180508 blocks (99%) +# [rtyper] specializing: 180500 / 180566 blocks (99%) +# [rtyper] -=- specialized 1363 more blocks -=- +# [rtyper] specializing: 180600 / 180777 blocks (99%) +# [rtyper] -=- specialized 211 more blocks -=- +# [backendopt:inlining] phase with threshold factor: 32.4 +# [backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic +# [x86/regalloc] Bogus arg in operation 76 at 0 +# RPython traceback: +# File "implement_62.c", line 39979, in send_bridge_to_backend +# File "implement_69.c", line 65301, in Assembler386_assemble_bridge +# File "implement_72.c", line 8078, in RegAlloc_prepare_bridge +# File "implement_40.c", line 53061, in RegAlloc__prepare +# File "implement_44.c", line 14305, in RegAlloc__compute_vars_longevity +# Fatal RPython error: NotImplementedError # -%global use_self_when_building 1 +# This appears to be deep within pypy/jit/backend/x86/regalloc.py which has +# called "not_implemented" to emit this message to stderr, before raising the +# exception: +# [x86/regalloc] Bogus arg in operation 76 at 0 + +%global use_self_when_building 0 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -817,6 +847,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-8 +- disable self-hosting for now, due to fatal error seen JIT-compiling the +translator + * Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-7 - skip test_ioctl for now commit 7632349386659a82412f3dfbd37e714bf56aa152 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jan 14 11:06:07 2011 -0500 skip test_ioctl for now diff --git a/pypy.spec b/pypy.spec index 71b2db6..9c8134d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -669,6 +669,25 @@ CheckPyPy() { # TestFailed: import __hello__ failed:No module named __hello__ SkipTest test_frozen + # test_ioctl: + # Failing in Koji with dist-f15 with: + # ====================================================================== + # FAIL: test_ioctl (test.test_ioctl.IoctlTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 25, in test_ioctl + # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + # AssertionError: 0 not in (8304, 17737) + # ====================================================================== + # FAIL: test_ioctl_mutate (test.test_ioctl.IoctlTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 35, in test_ioctl_mutate + # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + # AssertionError: 0 not in (8304, 17737) + # ---------------------------------------------------------------------- + SkipTest test_ioctl + # test_iterlen: # 24 failures out of 25, apparently all due to TypeError SkipTest test_iterlen @@ -798,6 +817,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-7 +- skip test_ioctl for now + * Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 - add a "pypy-devel" subpackage, and install the header files there - in %%check, re-run failed tests in verbose mode commit 0a81116e89104e6bd77075151eadf5bde029085d Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Jan 13 19:51:26 2011 -0500 Add a pypy-devel subpackage; rerun failed selftests in verbose mode * Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 - add a "pypy-devel" subpackage, and install the header files there - in %%check, re-run failed tests in verbose mode diff --git a/pypy.spec b/pypy.spec index 4d66f89..71b2db6 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -205,6 +205,16 @@ Summary: Run-time libraries used by PyPy implementations of Python %description libs Libraries required by the various PyPy implementations of Python. + +%package devel +Group: Development/Languages +Summary: Development tools for working with PyPy +%description devel +Header files for building C extension modules against PyPy + +Requires: pypy = %{version}-%{release} + + %if 0%{with_stackless} %package stackless Group: Development/Languages @@ -516,6 +526,22 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 + +# Header files for C extension modules. +# Upstream's packaging process (pypy/tool/release/package.py) +# creates an "include" subdir and copies all *.h/*.inl from "include" there +# (it also has an apparently out-of-date comment about copying them from +# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't +# seem to do this as of 2011-01-13) + +# FIXME: arguably these should be instead put into a subdir below /usr/include, +# it's not yet clear to me how upstream plan to deal with the C extension +# interface going forward, so let's just mimic upstream for now. +%global pypy_include_dir %{pypyprefix}/include +mkdir -p %{buildroot}/%{pypy_include_dir} +cp include/*.h include/*.inl %{buildroot}/%{pypy_include_dir} + + # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) %global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src @@ -692,8 +718,9 @@ CheckPyPy() { SkipTest test_tarfile # permissions issues %endif - # Run the built binary through the selftests: - time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP + # Run the built binary through the selftests + # "-w" : re-run failed tests in verbose mode + time ./$ExeName -m test.regrtest -w -x $TESTS_TO_SKIP popd @@ -756,6 +783,12 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/pypy %endif +%files devel +%defattr(-,root,root,-) +%dir %{pypy_include_dir} +%{pypy_include_dir}/*.h +%{pypy_include_dir}/*.inl + %if 0%{with_stackless} %files stackless %defattr(-,root,root,-) @@ -765,6 +798,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 +- add a "pypy-devel" subpackage, and install the header files there +- in %%check, re-run failed tests in verbose mode + * Fri Jan 7 2011 Dan Horák <dan[at]danny.cz> - 1.4.1-5 - valgrind available only on selected architectures commit d39359a3af6a0dee27f50e4a4fe52860f9c6b426 Author: Dan Horák <dan(a)danny.cz> Date: Fri Jan 7 17:56:06 2011 +0100 - valgrind available only on selected architectures diff --git a/pypy.spec b/pypy.spec index 162ed5f..4d66f89 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -176,7 +176,9 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel +%ifarch %{ix86} x86_64 ppc ppc64 s390x BuildRequires: valgrind-devel +%endif # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -763,6 +765,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 7 2011 Dan Horák <dan[at]danny.cz> - 1.4.1-5 +- valgrind available only on selected architectures + * Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 - rebuild pypy using itself, for speed, with a boolean to break this cycle in the build-requirement graph (falling back to using "python-devel" aka CPython) commit 00e57e74f81587a2c49341341a7a291a54e22dc8 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Jan 6 17:09:03 2011 -0500 * Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 - rebuild pypy using itself, for speed, with a boolean to break this cycle in the build-requirement graph (falling back to using "python-devel" aka CPython) - add work-in-progress patch to try to make generated c more readable (rhbz#666963) - capture the RPython source code files from the build within the debuginfo package (rhbz#666975) diff --git a/pypy-1.4.1-more-readable-c-code.patch b/pypy-1.4.1-more-readable-c-code.patch new file mode 100644 index 0000000..45fa534 --- /dev/null +++ b/pypy-1.4.1-more-readable-c-code.patch @@ -0,0 +1,695 @@ +diff -r cd083843b67a pypy/interpreter/pycode.py +--- a/pypy/interpreter/pycode.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/interpreter/pycode.py Wed Jan 05 16:14:35 2011 -0500 +@@ -14,6 +14,7 @@ + from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, + CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, + CO_GENERATOR, CO_CONTAINSGLOBALS) ++from pypy.interpreter.pytraceback import offset2lineno + from pypy.rlib.rarithmetic import intmask + from pypy.rlib.debug import make_sure_not_resized + from pypy.rlib import jit +@@ -81,6 +82,7 @@ + self.hidden_applevel = hidden_applevel + self.magic = magic + self._signature = cpython_code_signature(self) ++ self._cached_source = None + self._initialize() + + def _initialize(self): +@@ -403,3 +405,25 @@ + def repr(self, space): + return space.wrap(self.get_repr()) + repr.unwrap_spec = ['self', ObjSpace] ++ ++ def get_linenum_for_offset(self, offset): ++ # Given a bytecode offset, return a 1-based index into the lines of the ++ # source code ++ return offset2lineno(self, offset) ++ ++ def _ensure_source(self): ++ # Lazily grab the source lines into self._cached_source (or raise ++ # an IOError) ++ if not self._cached_source: ++ f = open(self.co_filename, 'r') ++ source = [line.rstrip() for line in f.readlines()] ++ f.close() ++ self._cached_source = source ++ ++ def get_source_text(self, linenum): ++ # Given a 1-based index, get the corresponding line of source code (or ++ # raise an IOError) ++ self._ensure_source() ++ return self._cached_source[linenum - 1] ++ ++ +diff -r cd083843b67a pypy/objspace/flow/model.py +--- a/pypy/objspace/flow/model.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/model.py Wed Jan 05 16:14:35 2011 -0500 +@@ -31,6 +31,120 @@ + + __metaclass__ = type + ++class SourceLoc(object): ++ # A srcloc is a specific location within the RPython source code, ++ # intended for human display ++ __slots__ = ('code', # code object ++ 'linenum' # 1-based index, as displayed to a user ++ ) ++ def __init__(self, code, linenum): ++ self.code = code ++ self.linenum = linenum ++ ++ def get_text(self): ++ # Get the actual source text of this line ++ return self.code.get_source_text(self.linenum) ++ ++ def __eq__(self, other): ++ return self.code == other.code and self.linenum == other.linenum ++ ++ def __ne__(self, other): ++ if other: ++ return self.code != other.code or self.linenum != other.linenum ++ else: ++ return True ++ ++class CodeLoc(object): ++ # A codeloc is a specific location within the RPython bytecode ++ __slots__ = ('code', # code object ++ 'offset' # int index into bytecode, or -1 ++ ) ++ ++ def __init__(self, code, offset): ++ self.code = code ++ self.offset = offset ++ ++ def __str__(self): ++ if self.offset >= 0: ++ return "%s@%d" % (self.code.co_name, self.offset) ++ else: ++ return "" ++ ++ def __ne__(self, other): ++ if other: ++ return self.code != other.code or self.offset != other.offset ++ else: ++ return True ++ ++ def __cmp__(self, other): ++ # Partial ordering, for those locations that have an offset: ++ if other: ++ if self.offset >= 0 and other.offset >= 0: ++ return self.offset - other.offset ++ return 0 ++ ++ def get_source_loc(self): ++ # Convert to a SourceLoc: ++ return SourceLoc(self.code, self.code.get_linenum_for_offset(self.offset)) ++ ++class OperationLoc(object): ++ # An oploc is the location within the RPython source code of a given ++ # operation ++ # ++ # This is a list consisting of CodeLoc instances, some of which may be None ++ # ++ # For the simple case, this is list of length 1 with a single CodeLoc ++ # ++ # For an operation inside an inlined callsite, we have a list of length 2: ++ # [codeloc of callsite, ++ # codeloc of operation within inlined body] ++ # ++ # For more interesting inlined cases, we have a chain of source locations: ++ # [codeloc of callsite, ++ # codeloc of inner callsite, ++ # ... , ++ # codeloc of innermost inlined callsite, ++ # codeloc of operation within inlined body] ++ # ++ ++ __slots__ = ('codelocs', ) ++ ++ def __init__(self, codelocs): ++ self.codelocs = codelocs ++ ++ def __str__(self): ++ return '[' + ' > '.join(str(codeloc) for codeloc in self.codelocs) + ']' ++ ++ def __cmp__(self, other): ++ return cmp(self.codelocs, other.codelocs) ++ ++def block_comparator(blk0, blk1): ++ ''' ++ Sort function for blocks, putting them in an ordering that attempts to ++ maximize readability of the generated C code ++ ''' ++ # print 'comparing %r and %r' % (blk0, blk1) ++ # Put the start/end block at the top/bottom: ++ if blk0.isstartblock: ++ return -1 ++ ++ if blk1.isstartblock: ++ return 1 ++ ++ # Order blocks by the offset, where present: ++ if blk0.operations: ++ if blk1.operations: ++ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) ++ else: ++ return -1 ++ else: ++ if blk1.operations: ++ return 1 ++ else: ++ return 0 ++ ++def edge_comparator(edge0, edge1): ++ return block_comparator(edge0.target, edge1.target) + + class FunctionGraph(object): + __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] +@@ -94,6 +208,21 @@ + seen[block] = True + stack += block.exits[::-1] + ++ def iterblocks_by_source(self): ++ # Try to preserve logical source ordering in the blocks ++ block = self.startblock ++ yield block ++ seen = {block: True} ++ stack = list(block.exits[::-1]) ++ stack.sort(edge_comparator) ++ while stack: ++ block = stack.pop().target ++ if block not in seen: ++ yield block ++ seen[block] = True ++ stack += block.exits[::-1] ++ stack.sort(edge_comparator) ++ + def iterlinks(self): + block = self.startblock + seen = {block: True} +@@ -183,14 +312,14 @@ + self.exits = [] # list of Link(s) + + def at(self): +- if self.operations and self.operations[0].offset >= 0: +- return "@%d" % self.operations[0].offset ++ if self.operations: ++ return str(self.operations[0].oploc) + else: + return "" + + def __str__(self): + if self.operations: +- txt = "block@%d" % self.operations[0].offset ++ txt = "block%s" % self.operations[0].oploc + else: + if (not self.exits) and len(self.inputargs) == 1: + txt = "return block" +@@ -245,6 +374,21 @@ + from pypy.translator.tool.graphpage import try_show + try_show(self) + ++ def isreturnblock(self): ++ return (not self.operations) and (not self.exits) and len(self.inputargs) == 1 ++ ++ def get_base_label(self, blocknum): ++ # Generate a more friendly C label for this block ++ if self.operations: ++ txt = "block" ++ elif (not self.exits) and len(self.inputargs) == 1: ++ txt = "return_block" ++ elif (not self.exits) and len(self.inputargs) == 2: ++ txt = "raise_block" ++ else: ++ txt = "codeless_block" ++ return '%s%d' % (txt, blocknum) ++ + + class Variable(object): + __slots__ = ["_name", "_nr", "concretetype"] +@@ -331,13 +475,15 @@ + + + class SpaceOperation(object): +- __slots__ = "opname args result offset".split() ++ __slots__ = "opname args result oploc".split() + +- def __init__(self, opname, args, result, offset=-1): ++ def __init__(self, opname, args, result, oploc=None): + self.opname = intern(opname) # operation name + self.args = list(args) # mixed list of var/const + self.result = result # either Variable or Constant instance +- self.offset = offset # offset in code string ++ if oploc is None: ++ oploc = OperationLoc([None]) ++ self.oploc = oploc + + def __eq__(self, other): + return (self.__class__ is other.__class__ and +@@ -352,8 +498,9 @@ + return hash((self.opname,tuple(self.args),self.result)) + + def __repr__(self): +- return "%r = %s(%s)" % (self.result, self.opname, +- ", ".join(map(repr, self.args))) ++ return "%r = %s(%s) (%s)" % (self.result, self.opname, ++ ", ".join(map(repr, self.args)), ++ self.oploc) + + class Atom(object): + def __init__(self, name): +@@ -448,8 +595,7 @@ + for op in oplist: + copyop = SpaceOperation(op.opname, + [copyvar(v) for v in op.args], +- copyvar(op.result), op.offset) +- #copyop.offset = op.offset ++ copyvar(op.result), op.oploc) + result.append(copyop) + return result + newblock.operations = copyoplist(block.operations) +diff -r cd083843b67a pypy/objspace/flow/objspace.py +--- a/pypy/objspace/flow/objspace.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/objspace.py Wed Jan 05 16:14:35 2011 -0500 +@@ -310,7 +310,9 @@ + def do_operation(self, name, *args_w): + spaceop = SpaceOperation(name, args_w, Variable()) + if hasattr(self, 'executioncontext'): # not here during bootstrapping +- spaceop.offset = self.executioncontext.crnt_offset ++ codeloc = CodeLoc(self.executioncontext.code, ++ self.executioncontext.crnt_offset) ++ spaceop.oploc = OperationLoc([codeloc]) + self.executioncontext.recorder.append(spaceop) + return spaceop.result + +diff -r cd083843b67a pypy/objspace/flow/test/test_model.py +--- a/pypy/objspace/flow/test/test_model.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/test/test_model.py Wed Jan 05 16:14:35 2011 -0500 +@@ -132,3 +132,25 @@ + assert v2.renamed + assert v2.name.startswith("foobar_") and v2.name != v.name + assert v2.name.split('_', 1)[1].isdigit() ++ ++def test_source_locations(): ++ # Invent some random offsets into the code: ++ co = sample_function.__code__ ++ codelocA = CodeLoc(co, 42) ++ codelocB = CodeLoc(co, 87) ++ ++ assert str(codelocA) == 'sample_function@42' ++ assert str(codelocB) == 'sample_function@87' ++ ++ assert cmp(codelocA, codelocB) < 0 ++ assert cmp(codelocB, codelocA) > 0 ++ ++ oplocA = OperationLoc([codelocA]) ++ oplocB = OperationLoc([codelocB]) ++ ++ assert str(oplocA) == '[sample_function@42]' ++ assert str(oplocB) == '[sample_function@87]' ++ ++ assert cmp(oplocA, oplocB) < 0 ++ assert cmp(oplocB, oplocA) > 0 ++ +diff -r cd083843b67a pypy/rpython/rtyper.py +--- a/pypy/rpython/rtyper.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/rpython/rtyper.py Wed Jan 05 16:14:35 2011 -0500 +@@ -800,7 +800,7 @@ + return vars + + def genop(self, opname, args_v, resulttype=None): +- return self.llops.genop(opname, args_v, resulttype) ++ return self.llops.genop(opname, args_v, resulttype, self.spaceop.oploc) + + def gendirectcall(self, ll_function, *args_v): + return self.llops.gendirectcall(ll_function, *args_v) +@@ -935,7 +935,7 @@ + v.concretetype)) + return v + +- def genop(self, opname, args_v, resulttype=None): ++ def genop(self, opname, args_v, resulttype=None, oploc=None): + try: + for v in args_v: + v.concretetype +@@ -944,7 +944,7 @@ + " and pass its result to genop()," + " never hop.args_v directly.") + vresult = Variable() +- self.append(SpaceOperation(opname, args_v, vresult)) ++ self.append(SpaceOperation(opname, args_v, vresult, oploc)) + if resulttype is None: + vresult.concretetype = Void + return None +diff -r cd083843b67a pypy/translator/backendopt/inline.py +--- a/pypy/translator/backendopt/inline.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/backendopt/inline.py Wed Jan 05 16:14:35 2011 -0500 +@@ -4,6 +4,7 @@ + from pypy.translator.unsimplify import copyvar + from pypy.objspace.flow.model import Variable, Constant, Block, Link + from pypy.objspace.flow.model import SpaceOperation, c_last_exception ++from pypy.objspace.flow.model import OperationLoc + from pypy.objspace.flow.model import FunctionGraph + from pypy.objspace.flow.model import traverse, mkentrymap, checkgraph + from pypy.annotation import model as annmodel +@@ -231,6 +232,7 @@ + self.varmap = {} + self._copied_blocks = {} + self.op = block.operations[index_operation] ++ self.callsite_oploc = self.op.oploc + self.graph_to_inline = self.get_graph_from_op(self.op) + self.exception_guarded = False + if (block.exitswitch == c_last_exception and +@@ -297,7 +299,9 @@ + + def copy_operation(self, op): + args = [self.get_new_name(arg) for arg in op.args] +- result = SpaceOperation(op.opname, args, self.get_new_name(op.result)) ++ new_oploc = OperationLoc(self.callsite_oploc.codelocs[:] + op.oploc.codelocs[:]) ++ result = SpaceOperation(op.opname, args, self.get_new_name(op.result), ++ new_oploc) + return result + + def copy_block(self, block): +diff -r cd083843b67a pypy/translator/c/funcgen.py +--- a/pypy/translator/c/funcgen.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/c/funcgen.py Wed Jan 05 16:14:35 2011 -0500 +@@ -1,4 +1,6 @@ + import sys ++import inspect ++import dis + from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring + from pypy.translator.c.support import cdecl + from pypy.translator.c.support import llvalue_from_constant, gen_assignments +@@ -22,6 +24,38 @@ + + KEEP_INLINED_GRAPHS = False + ++def block_comparator(blk0, blk1): ++ ''' ++ Sort function for blocks, putting them in an ordering that attempts to ++ maximize readability of the generated C code ++ ''' ++ # print 'comparing %r and %r' % (blk0, blk1) ++ # Put the start/end block at the top/bottom: ++ if blk0.isstartblock: ++ return -1 ++ ++ if blk1.isstartblock: ++ return 1 ++ ++ # Order blocks by the offset, where present: ++ if blk0.operations: ++ if blk1.operations: ++ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) ++ else: ++ return -1 ++ else: ++ if blk1.operations: ++ return 1 ++ else: ++ return 0 ++ ++def escape_c_comments(py_src): ++ # Escape C comments within RPython source, to avoid generating bogus ++ # comments in our generated C source: ++ py_src = py_src.replace('/*', '') ++ py_src = py_src.replace('*/', '') ++ return py_src ++ + class FunctionCodeGenerator(object): + """ + Collects information about a function which we have to generate +@@ -210,14 +244,57 @@ + + def cfunction_body(self): + graph = self.graph +- yield 'goto block0;' # to avoid a warning "this label is not used" ++ # Try to print python source code: ++ if hasattr(graph, 'func'): ++ filename = inspect.getfile(graph.func) ++ #yield '/* name: %r */' % filename ++ try: ++ src, startline = inspect.getsourcelines(graph.func) ++ except IOError: ++ pass # No source found ++ except IndexError: ++ pass # Bulletproofing ++ else: ++ yield '/* Python source %r' % filename ++ for i, line in enumerate(src): ++ line = line.rstrip() ++ line = escape_c_comments(line) ++ # FuncNode.funcgen_implementation treats lines ending in ':' ++ # as C blocks, which messes up the formatting. ++ # Work around this: ++ if line.endswith(':'): ++ line += ' ' ++ yield ' * %4d : %s' % (startline + i, line) ++ yield ' */' ++ ++ label = graph.startblock.get_base_label(self.blocknum[graph.startblock]) ++ yield 'goto %s;' % label # to avoid a warning "this label is not used" ++ ++ # Sort the blocks into a (hopefully) readable order: ++ blocks = list(graph.iterblocks_by_source()) ++ blocks.sort(block_comparator) + + # generate the body of each block +- for block in graph.iterblocks(): ++ for block in blocks: ++ cursrcloc = None + myblocknum = self.blocknum[block] + yield '' +- yield 'block%d:' % myblocknum ++ yield '%s:' % block.get_base_label(myblocknum) ++ #yield "/* repr(block): %r */" % (block, ) ++ #yield "/* type(block): %r */" % (type(block), ) + for i, op in enumerate(block.operations): ++ #yield "/* type(op): %r */" % (type(op), ) ++ #yield "/* op.oploc: %s */" % (op.oploc, ) ++ codeloc = op.oploc.codelocs[-1] ++ if codeloc: ++ srcloc = codeloc.get_source_loc() ++ if srcloc != cursrcloc: ++ try: ++ yield "/* %s:%d : %s */" % (codeloc.code.co_name, srcloc.linenum, escape_c_comments(srcloc.get_text())) ++ cursrcloc = srcloc ++ except IOError: ++ pass ++ + for line in self.gen_op(op): + yield line + if len(block.exits) == 0: +@@ -310,7 +387,7 @@ + assignments.append((a2typename, dest, src)) + for line in gen_assignments(assignments): + yield line +- label = 'block%d' % self.blocknum[link.target] ++ label = link.target.get_base_label(self.blocknum[link.target]) + if link.target in self.innerloops: + loop = self.innerloops[link.target] + if link is loop.links[-1]: # link that ends a loop +diff -r cd083843b67a pypy/translator/c/test/test_genc.py +--- a/pypy/translator/c/test/test_genc.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/c/test/test_genc.py Wed Jan 05 16:14:35 2011 -0500 +@@ -1,4 +1,5 @@ + import autopath, sys, os, py ++import re + from pypy.rpython.lltypesystem.lltype import * + from pypy.annotation import model as annmodel + from pypy.translator.translator import TranslationContext +@@ -498,3 +499,130 @@ + else: + assert 0, "the call was not found in the C source" + assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] ++ ++def get_generated_c_source(fn, types): ++ # Return a (optimized fn, c source code, c source filename) 3-tuple ++ t = Translation(fn) ++ t.annotate(types) ++ c_filename_path = t.source_c() ++ h = c_filename_path.open() ++ src = h.read() ++ h.close() ++ c_fn = t.compile_c() ++ return (c_fn, src, c_filename_path) ++ ++def extract_c_function(c_src, fname): ++ # Extract the source for a given C function out of a the given src string ++ # Makes assumptions about the layout of the source ++ pattern = '^(.+) \**%s\(.*\) {$' % fname ++ within_fn = False ++ result = '' ++ for line in c_src.splitlines(): ++ if within_fn: ++ result += line + '\n' ++ if line.startswith('}'): ++ return result ++ else: ++ m = re.match(pattern, line) ++ if m: ++ within_fn = True ++ result += line + '\n' ++ return result ++ ++ ++ ++def test_generated_c_source(): ++ # Verify that generate C source "looks good" ++ # We'll use is_perfect_number, as it contains a loop and a conditional ++ ++ # Generate C source code ++ from pypy.translator.test.snippet import is_perfect_number ++ c_fn, c_src, c_filename_path = get_generated_c_source(is_perfect_number, ++ [int]) ++ ++ # Locate the C source for the type-specialized function: ++ c_fn_src = extract_c_function(c_src, 'pypy_g_is_perfect_number') ++ ++ # Verify that the C source contains embedded comments containing the lines ++ # of the python source: ++ expected_comment_lines = [ ++ '/* is_perfect_number:31 : while div < n: */', ++ '/* is_perfect_number:32 : if n % div == 0: */', ++ '/* is_perfect_number:33 : sum += div */', ++ '/* is_perfect_number:34 : div += 1 */', ++ '/* is_perfect_number:35 : return n == sum */'] ++ for exp_line in expected_comment_lines: ++ assert exp_line in c_fn_src ++ ++ # Verify that the lines occur in the correct order ++ # ...we do this by filtering the function's generated C source to just ++ # those lines containing our comments (and dropping whitespace): ++ lines = c_fn_src.splitlines() ++ lines = [line.strip() ++ for line in lines ++ if '/* is_perfect_number:' in line] ++ ++ # ...we should now have exact equality: the ordering should be as expected, ++ # and each comment should appear exactly once: ++ assert lines == expected_comment_lines ++ ++ # Ensure that the generated C function does the right thing: ++ assert c_fn(5) == False ++ assert c_fn(6) == True ++ assert c_fn(7) == False ++ ++ assert c_fn(5.0) == False ++ assert c_fn(6.0) == True ++ assert c_fn(7.0) == False ++ ++ assert c_fn(5L) == False ++ assert c_fn(6L) == True ++ assert c_fn(7L) == False ++ ++ try: ++ c_fn('hello world') ++ except: ++ pass ++ else: ++ raise 'Was expected exception' ++ ++def test_escaping_c_comments(): ++ # Ensure that c comments within RPython code get escaped when we generate ++ # our .c code (to avoid generating bogus C) ++ # See e.g. pypy.module.cpyext.dictobject's PyDict_Next, which has a ++ # docstring embedding a C comment ++ def c_style_comment(a, b): ++ '''Here is a C-style comment within an RPython docstring: ++ /* hello world */ ++ ''' ++ # and here's one in a string literal: ++ return '/* hello world a:%s b:%s */' % (a, b) ++ ++ def cplusplus_style_comment(a, b): ++ '''Here is a C++-style comment within an RPython docstring: ++ // hello world ++ ''' ++ # and here are some in string literals, and one as the floor division ++ # operator: ++ return '// hello world: a // b = %s' % (a // b) ++ ++ for fn_name, exp_output in [('c_style_comment', ++ '/* hello world a:6 b:3 */'), ++ ('cplusplus_style_comment', ++ '// hello world: a // b = 2')]: ++ fn = locals()[fn_name] ++ ++ c_fn, c_src, c_filename_path = get_generated_c_source(fn, [int, int]) ++ # If the above survived, then the C compiler managed to handle ++ # the generated C code ++ ++ # Verify that the generated code works (i.e. that we didn't ++ # accidentally change the meaning): ++ assert c_fn(6, 3) == exp_output ++ ++ # Ensure that at least part of the docstrings made it into the C ++ # code: ++ c_fn_src = extract_c_function(c_src, 'pypy_g_' + fn_name) ++ assert 'Here is a ' in c_fn_src ++ assert 'style comment within an RPython docstring' in c_fn_src ++ +diff -r cd083843b67a pypy/translator/driver.py +--- a/pypy/translator/driver.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/driver.py Wed Jan 05 16:14:35 2011 -0500 +@@ -539,6 +539,7 @@ + dstname = self.compute_exe_name() + '.staticdata.info' + shutil.copy(str(fname), str(dstname)) + self.log.info('Static data info written to %s' % dstname) ++ return c_source_filename + + # + task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") +diff -r cd083843b67a pypy/translator/gensupp.py +--- a/pypy/translator/gensupp.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/gensupp.py Wed Jan 05 16:14:35 2011 -0500 +@@ -16,8 +16,8 @@ + def visit(block): + if isinstance(block, Block): + # first we order by offset in the code string +- if block.operations: +- ofs = block.operations[0].offset ++ if block.operations and block.operations[0].oploc.codelocs[0]: ++ ofs = block.operations[0].oploc.codelocs[0].offset + else: + ofs = sys.maxint + # then we order by input variable name or value +diff -r cd083843b67a pypy/translator/interactive.py +--- a/pypy/translator/interactive.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/interactive.py Wed Jan 05 16:14:35 2011 -0500 +@@ -138,7 +138,7 @@ + def source_c(self, argtypes=None, **kwds): + self.update_options(argtypes, kwds) + self.ensure_backend('c') +- self.driver.source_c() ++ return self.driver.source_c() + + def source_cl(self, argtypes=None, **kwds): + self.update_options(argtypes, kwds) +diff -r cd083843b67a pypy/translator/llsupport/wrapper.py +--- a/pypy/translator/llsupport/wrapper.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/llsupport/wrapper.py Wed Jan 05 16:14:35 2011 -0500 +@@ -59,6 +59,8 @@ + # "return result" + block = Block(wrapper_inputargs) + wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) ++ if hasattr(graph, 'func'): ++ wgraph.func = graph.func + translator.update_call_graph(wgraph, graph, object()) + translator.graphs.append(wgraph) + block.operations[:] = newops +diff -r cd083843b67a pypy/translator/simplify.py +--- a/pypy/translator/simplify.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/simplify.py Wed Jan 05 16:14:35 2011 -0500 +@@ -294,7 +294,7 @@ + return renaming.get(v, v) + def rename_op(op): + args = [rename(a) for a in op.args] +- op = SpaceOperation(op.opname, args, rename(op.result), op.offset) ++ op = SpaceOperation(op.opname, args, rename(op.result), op.oploc) + # special case... + if op.opname == 'indirect_call': + if isinstance(op.args[0], Constant): diff --git a/pypy.spec b/pypy.spec index 96354e2..162ed5f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -136,9 +136,33 @@ Patch2: fix-test_commands-expected-ls-output-issue7108.patch #
https://codespeak.net/issue/pypy-dev/issue614
Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch +# Try to improve the readability of the generated .c code, by adding in the +# RPython source as comments where possible. +# A version of this was sent upstream as: +#
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
+# TODO: get this into the upstream bug tracker, and finish inlining +# support (rhbz#666963) +Patch4: pypy-1.4.1-more-readable-c-code.patch + + # Build-time requirements: -BuildRequires: python-devel +# pypy's can be rebuilt using itself, rather than with CPython; doing so +# halves the build time. +# +# Turn it off with this boolean, to revert back to rebuilding using CPython +# and avoid a cycle in the build-time dependency graph: +# +%global use_self_when_building 1 +%if 0%{use_self_when_building} +BuildRequires: pypy +%global bootstrap_python_interp pypy +%else +BuildRequires: python-devel +%global bootstrap_python_interp python +%endif + + # FIXME: I'm seeing errors like this in the logs: # [translation:WARNING] The module '_rawffi' is disabled @@ -215,6 +239,8 @@ sed -i \ -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ pypy/translator/goal/app_main.py +%patch4 -p1 -b .more-readable-c-code + # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -304,6 +330,7 @@ BuildPyPy() { # doesn't interract well with the results of using our standard build flags. # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. + # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') # If we're already built the JIT-enabled "pypy", then use it for subsequent @@ -311,7 +338,10 @@ BuildPyPy() { if test -x './pypy' ; then INTERP='./pypy' else - INTERP='python' + # First pypy build within this rpm build? + # Fall back to using the bootstrap python interpreter, which might be a + # system copy of pypy from an earlier rpm, or be cpython's /usr/bin/python: + INTERP='%{bootstrap_python_interp}' fi # Here's where we actually invoke the build: @@ -484,6 +514,34 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 +# Capture the RPython source code files from the build within the debuginfo +# package (rhbz#666975) +%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src +mkdir -p %{buildroot}%{pypy_debuginfo_dir} + +# copy over everything: +cp -a pypy %{buildroot}%{pypy_debuginfo_dir} + +# ...then delete files that aren't .py files: +find \ + %{buildroot}%{pypy_debuginfo_dir} \ + \( -type f \ + -a \ + \! -name "*.py" \ + \) \ + -delete + +# We don't need bytecode for these files; they are being included for reference +# purposes. +# There are some rpmlint warnings from these files: +# non-executable-script +# wrong-script-interpreter +# zero-length +# script-without-shebang +# dangling-symlink +# but given that the objective is to preserve a copy of the source code, those +# are acceptable. + %check topdir=$(pwd) @@ -511,6 +569,7 @@ CheckPyPy() { # Gather a list of tests to skip, due to known failures # TODO: report these failures to pypy upstream + # See also rhbz#666967 and rhbz#666969 TESTS_TO_SKIP="" # Test failures relating to missing codecs @@ -622,6 +681,14 @@ CheckPyPy() { # AssertionError: ValueError not raised SkipTest test_zlib + %if 0%{use_self_when_building} + # Patch 3 prioritizes the installed copy of pypy's libraries over the + # build copy. + # This leads to test failures of test_pep263 and test_tarfile + # For now, suppress these when building using pypy itself: + SkipTest test_pep263 # on-disk encoding issues + SkipTest test_tarfile # permissions issues + %endif # Run the built binary through the selftests: time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP @@ -696,6 +763,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 +- rebuild pypy using itself, for speed, with a boolean to break this cycle in +the build-requirement graph (falling back to using "python-devel" aka CPython) +- add work-in-progress patch to try to make generated c more readable +(rhbz#666963) +- capture the RPython source code files from the build within the debuginfo +package (rhbz#666975) + * Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-3 - try to respect the FHS by installing libraries below libdir, rather than datadir; patch app_main.py to look in this installation location first when commit f756cfcb34f7e48db6afaf04f79ca5c576a4b696 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon Jan 3 15:06:28 2011 -0500 Initial import of pypy-1.4.1-3 from package review (rhbz#588941) diff --git a/.gitignore b/.gitignore index e69de29..2878978 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pypy-1.4.1-src.tar.bz2 diff --git a/fix-test_commands-expected-ls-output-issue7108.patch b/fix-test_commands-expected-ls-output-issue7108.patch new file mode 100644 index 0000000..becc3e0 --- /dev/null +++ b/fix-test_commands-expected-ls-output-issue7108.patch @@ -0,0 +1,11 @@ +--- test/test_commands.py.orig 2010-12-22 13:25:11.357333216 -0500 ++++ test/test_commands.py 2010-12-22 13:25:57.927166219 -0500 +@@ -47,7 +47,7 @@ class CommandTests(unittest.TestCase): + # Note that the first case above has a space in the group name + # while the second one has a space in both names. + pat = r'''d......... # It is a directory. +- \+? # It may have ACLs. ++ [.+@]? # It may have alt access (SELinux, ACLs or metadata ('@' OS X). + \s+\d+ # It has some number of links. + [^/]* # Skip user, group, size, and date. + /\. # and end with the name of the file. diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch new file mode 100644 index 0000000..257f60f --- /dev/null +++ b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch @@ -0,0 +1,13 @@ +diff --git a/pypy/tool/ansi_print.py b/pypy/tool/ansi_print.py +index 3eff27c..fac4ba2 100644 +--- a/pypy/tool/ansi_print.py ++++ b/pypy/tool/ansi_print.py +@@ -25,7 +25,7 @@ class AnsiLog: + self.kw_to_color = self.KW_TO_COLOR.copy() + self.kw_to_color.update(kw_to_color) + self.file = file +- self.fancy = True ++ self.fancy = False + self.isatty = getattr(sys.stderr, 'isatty', lambda: False) + if self.fancy and self.isatty(): + self.mandelbrot_driver = Driver() diff --git a/pypy-1.4-config.patch b/pypy-1.4-config.patch new file mode 100644 index 0000000..0b82ac8 --- /dev/null +++ b/pypy-1.4-config.patch @@ -0,0 +1,44 @@ +Index: pypy-1.4/pypy/translator/platform/linux.py +=================================================================== +--- pypy-1.4.orig/pypy/translator/platform/linux.py ++++ pypy-1.4/pypy/translator/platform/linux.py +@@ -3,17 +3,22 @@ import py, os + from pypy.translator.platform import _run_subprocess + from pypy.translator.platform.posix import BasePosix + ++CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', ++ '-Wall', '-Wno-unused'] ++if os.environ.get('CFLAGS', None): ++ CFLAGS.extend(os.environ['CFLAGS'].split()) ++CFLAGS = tuple(CFLAGS) ++ + class BaseLinux(BasePosix): + name = "linux" + + link_flags = ('-pthread', '-lrt') +- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', +- '-Wall', '-Wno-unused') ++ cflags = CFLAGS + standalone_only = () + shared_only = ('-fPIC',) + so_ext = 'so' + so_prefixes = ('lib', '') +- ++ + def _args_for_shared(self, args): + return ['-shared'] + args + +@@ -29,9 +34,10 @@ class BaseLinux(BasePosix): + class Linux(BaseLinux): + shared_only = () # it seems that on 32-bit linux, compiling with -fPIC + # gives assembler that asmgcc is not happy about. +- def library_dirs_for_libffi_a(self): +- # places where we need to look for libffi.a +- return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # Fedora Linux, at least, has the shared version but not the static ++ #def library_dirs_for_libffi_a(self): ++ # # places where we need to look for libffi.a ++ # return self.library_dirs_for_libffi() + ['/usr/lib'] + + + class Linux64(BaseLinux): diff --git a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch new file mode 100644 index 0000000..93bcb69 --- /dev/null +++ b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch @@ -0,0 +1,16 @@ +diff -r cd083843b67a pypy/translator/goal/app_main.py +--- a/pypy/translator/goal/app_main.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/goal/app_main.py Wed Dec 22 17:43:21 2010 -0500 +@@ -191,6 +191,12 @@ + IS_WINDOWS = False + + def get_library_path(executable): ++ # FIXME: get this from translator configuration ++ dirname = LIBRARY_INSTALLATION_PATH ++ newpath = sys.pypy_initial_path(dirname) ++ if newpath: ++ return newpath ++ + search = executable + while 1: + dirname = resolvedirof(search) diff --git a/pypy.spec b/pypy.spec new file mode 100644 index 0000000..96354e2 --- /dev/null +++ b/pypy.spec @@ -0,0 +1,762 @@ +Name: pypy +Version: 1.4.1 +Release: 3%{?dist} +Summary: Python implementation with a Just-In-Time compiler + +Group: Development/Languages +# LGPL and another free license we'd need to ask spot about are present in some +# java jars that we're not building with atm (in fact, we're deleting them +# before building). If we restore those we'll have to work out the new +# licensing terms +License: MIT and Python and UCD +URL:
http://pypy.org/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# High-level configuration of the build: + +# PyPy consists of an implementation of an interpreter (with JIT compilation) +# for the full Python language written in a high-level language, leaving many +# of the implementation details as "pluggable" policies. +# +# The implementation language is then compiled down to .c code, from which we +# obtain a binary. +# +# This allows us to build a near-arbitrary collection of different +# implementations of Python with differing tradeoffs +# +# (As it happens, the implementation language is itself Python, albeit a +# restricted subset "RPython", chosen to making it amenable to being compiled. +# The result implements the full Python language though) + +# We could build many different implementations of Python. +# For now, let's focus on the implementation that appears to be receiving the +# most attention upstream: the JIT-enabled build, with all standard +# optimizations + +# Building a configuration can take significant time: + +# A build of pypy (with jit) on i686 took 77 mins: +# [Timer] Timings: +# [Timer] annotate --- 583.3 s +# [Timer] rtype_lltype --- 760.9 s +# [Timer] pyjitpl_lltype --- 567.3 s +# [Timer] backendopt_lltype --- 375.6 s +# [Timer] stackcheckinsertion_lltype --- 54.1 s +# [Timer] database_c --- 852.2 s +# [Timer] source_c --- 1007.3 s +# [Timer] compile_c --- 419.9 s +# [Timer] =========================================== +# [Timer] Total: --- 4620.5 s +# +# A build of pypy (nojit) on x86_64 took about an hour: +# [Timer] Timings: +# [Timer] annotate --- 537.5 s +# [Timer] rtype_lltype --- 667.3 s +# [Timer] backendopt_lltype --- 385.4 s +# [Timer] stackcheckinsertion_lltype --- 42.5 s +# [Timer] database_c --- 625.3 s +# [Timer] source_c --- 1040.2 s +# [Timer] compile_c --- 273.9 s +# [Timer] =========================================== +# [Timer] Total: --- 3572.0 s +# +# +# A build of pypy-stackless on i686 took about 87 mins: +# [Timer] Timings: +# [Timer] annotate --- 584.2 s +# [Timer] rtype_lltype --- 777.3 s +# [Timer] backendopt_lltype --- 365.9 s +# [Timer] stackcheckinsertion_lltype --- 39.3 s +# [Timer] database_c --- 1089.6 s +# [Timer] source_c --- 1868.6 s +# [Timer] compile_c --- 490.4 s +# [Timer] =========================================== +# [Timer] Total: --- 5215.3 s + + +# Should we build a "pypy" binary? (with jit) +# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the +# following options: +# 'i386', 'x86' +# 'x86-without-sse2': +# 'x86_64' +# 'cli' +# 'llvm' +%ifarch %{ix86} x86_64 +# FIXME: is there a better way of expressing "intel" here? +%global with_jit 1 +%else +%global with_jit 0 +%endif + +# Should we build a "pypy-stackless" binary? +%global with_stackless 0 + + +# Easy way to enable/disable verbose logging: +%global verbose_logs 0 + +%global pypyprefix %{_libdir}/pypy-%{version} +%global pylibver 2.5.2 + +# We refer to this subdir of the source tree in a few places during the build: +%global goal_dir pypy/translator/goal + + +# Turn off the brp-python-bytecompile postprocessing script +# We manually invoke it later on, using the freshly built pypy binary +%global __os_install_post \ + %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') + +# Source and patches: +Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
+ +# Edit a translator file for linux in order to configure our cflags and dynamic libffi +Patch0: pypy-1.4-config.patch + +# By default, if built at a tty, the translation process renders a Mandelbrot +# set to indicate progress. +# This obscures useful messages, and may waste CPU cycles, so suppress it, and +# merely render dots: +Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch + +# test_commmands fails on SELinux systems due to a change in the output +# of "ls" (
http://bugs.python.org/issue7108
) +Patch2: fix-test_commands-expected-ls-output-issue7108.patch + +# When locating the pypy standard libraries, look first within +# LIBRARY_INSTALLATION_PATH. +# We convert this from being a non-existant variable into a string literal +# with the value of "pypyprefix" in the "prep" phase below. +# +# We still use the scanning relative to the binary location when invoking a +# pypy binary during the build (e.g. during "check") +# +# Sent upstream (with caveats) as: +#
https://codespeak.net/issue/pypy-dev/issue614
+Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch + +# Build-time requirements: + +BuildRequires: python-devel + +# FIXME: I'm seeing errors like this in the logs: +# [translation:WARNING] The module '_rawffi' is disabled +# [translation:WARNING] because importing pypy.rlib.libffi raised ImportError +# [translation:WARNING] 'libffi.a' not found in ['/usr/lib/libffi', '/usr/lib'] +# Presumably we need to fix things to support dynamically-linked libffi +BuildRequires: libffi-devel + +BuildRequires: zlib-devel +BuildRequires: bzip2-devel +BuildRequires: ncurses-devel +BuildRequires: expat-devel +BuildRequires: openssl-devel +BuildRequires: valgrind-devel + +# Used by the selftests, though not by the build: +BuildRequires: gc-devel + +BuildRequires: /usr/bin/execstack + +# pypy is bundling these so we delete them in %%prep. I don't think they are +# needed unless we build pypy targetted at running on the jvm. +#BuildRequires: jna +#BuildRequires: jasmin # Not yet in Fedora + + +# Metadata for the core package (the JIT build): +Requires: pypy-libs = %{version}-%{release} + +%description +PyPy's implementation of Python, featuring a Just-In-Time compiler, and various +optimized implementations of the standard types (strings, dictionaries, etc) + + +%package libs +Group: Development/Languages +Summary: Run-time libraries used by PyPy implementations of Python +%description libs +Libraries required by the various PyPy implementations of Python. + +%if 0%{with_stackless} +%package stackless +Group: Development/Languages +Summary: Stackless Python interpreter built using PyPy +Requires: pypy-libs = %{version}-%{release} +%description stackless +Build of PyPy with support for micro-threads for massive concurrency +%endif + +%if 0%{with_stackless} +%package stackless +Group: Development/Languages +Summary: Stackless Python interpreter built using PyPy +Requires: pypy-libs = %{version}-%{release} +%description stackless +Build of PyPy with support for micro-threads for massive concurrency +%endif + + +%prep +%setup -q -n pypy-%{version}-src +%patch0 -p1 -b .configure-fedora +%patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build + +pushd lib-python/%{pylibver} +%patch2 -p0 +popd + +# Look for the pypy libraries within LIBRARY_INSTALLATION_PATH first: +%patch3 -p1 +# Fixup LIBRARY_INSTALLATION_PATH to be a string literal containing our value +# for "pypyprefix": +sed -i \ + -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ + pypy/translator/goal/app_main.py + + +# Replace /usr/local/bin/python shebangs with /usr/bin/python: +find -name "*.py" -exec \ + sed \ + -i -e "s|/usr/local/bin/python|/usr/bin/python|" \ + "{}" \ + \; + +find . -name '*.jar' -exec rm \{\} \; + +# Remove stray ".svn" directories present within the 1.4.1 tarball +# (reported as
https://codespeak.net/issue/pypy-dev/issue612
) +find . -path '*/.svn*' -delete + +# Remove DOS batch files: +find -name "*.bat"|xargs rm -f + +# The "demo" directory gets auto-installed by virture of being listed in %doc +# Remove shebang lines from demo .py files, and remove executability from them: +for f in demo/bpnn.py ; do + # Detect shebang lines && remove them: + sed -e '/^#!/Q 0' -e 'Q 1' $f \ + && sed -i '1d' $f + chmod a-x $f +done + +%build + +BuildPyPy() { + ExeName=$1 + Options=$2 + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "STARTING BUILD OF: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + pushd %{goal_dir} + + # The build involves invoking a python script, passing in particular + # arguments, environment variables, etc. + # Some notes on those follow: + + # The generated binary embeds copies of the values of all environment + # variables. We need to unset "RPM_BUILD_ROOT" to avoid a fatal error from + # /usr/lib/rpm/check-buildroot + # during the postprocessing of the rpmbuild, complaining about this + # reference to the buildroot + + + # By default, pypy's autogenerated C code is placed in + # /tmp/usession-N + # + # and it appears that this stops rpm from extracting the source code to the + # debuginfo package + # + # The logic in pypy-1.4/pypy/tool/udir.py indicates that it is generated in: + # $PYPY_USESSION_DIR/usession-$PYPY_USESSION_BASENAME-N + # and so we set PYPY_USESSION_DIR so that this tempdir is within the build + # location, and set $PYPY_USESSION_BASENAME so that the tempdir is unique + # for each invocation of BuildPyPy + + # Compilation flags for C code: + # pypy-1.4/pypy/translator/c/genc.py:gen_makefile + # assembles a Makefile within + # THE_UDIR/testing_1/Makefile + # calling out to platform.gen_makefile + # For us, that's + # pypy-1.4/pypy/translator/platform/linux.py: class BaseLinux(BasePosix): + # which by default has: + # CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', + # '-Wall', '-Wno-unused'] + # plus all substrings from CFLAGS in the environment. + # This is used to generate a value for CFLAGS that's written into the Makefile + + #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
+ # The generated Makefile compiles the .c files into assembler (.s), rather + # than direct to .o It then post-processes this assembler to locate + # garbage-collection roots (building .lbl.s and .gcmap files, and a + # "gcmaptable.s"). (The modified .lbl.s files have extra code injected + # within them). + # Unfortunately, the code to do this: + # pypy-1.4/pypy/translator/c/gcc/trackgcroot.py + # doesn't interract well with the results of using our standard build flags. + # For now, filter our CFLAGS of everything that could be conflicting with + # pypy. Need to check these and reenable ones that are okay later. + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') + + # If we're already built the JIT-enabled "pypy", then use it for subsequent + # builds (of other configurations): + if test -x './pypy' ; then + INTERP='./pypy' + else + INTERP='python' + fi + + # Here's where we actually invoke the build: + time \ + RPM_BUILD_ROOT= \ + PYPY_USESSION_DIR=$(pwd) \ + PYPY_USESSION_BASENAME=$ExeName \ + $INTERP translate.py \ +%if 0%{verbose_logs} + --translation-verbose \ +%endif + --cflags="$CFLAGS" \ + --batch \ + --output=$ExeName \ + $Options + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "FINISHED BUILDING: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + popd +} + +%if 0%{with_jit} +BuildPyPy \ + pypy \ + "-Ojit" +%endif + +%if 0%{with_stackless} +BuildPyPy \ + pypy-stackless \ + "--stackless" +%endif + +%install +rm -rf $RPM_BUILD_ROOT + + +# Install the various executables: + +InstallPyPy() { + ExeName=$1 + + install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{_bindir} + + # The generated machine code doesn't need an executable stack, but + # one of the assembler files (gcmaptable.s) doesn't have the necessary + # metadata to inform gcc of that, and thus gcc pessimistically assumes + # that the built binary does need an executable stack. + # + # Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
+ # + # I tried various approaches involving fixing the build, but the simplest + # approach is to postprocess the ELF file: + execstack --clear-execstack %{buildroot}/%{_bindir}/$ExeName +} + +mkdir -p %{buildroot}/%{_bindir} + +%if 0%{with_jit} +InstallPyPy pypy +%endif + +%if 0%{with_stackless} +InstallPyPy pypy-stackless +%endif + + +# Install the various support libraries as described at: +#
http://codespeak.net/pypy/dist/pypy/doc/getting-started-python.html#install…
+# which refers to a "PREFIX" found relative to the location of the binary. +# Given that the pypy binaries will be in /usr/bin, PREFIX can be +# "../share/pypy-1.2" relative to that directory, i.e. /usr/share/pypy-1.2 +# +# Running "strace" on a built binary indicates that it searches within +# PREFIX/lib-python/modified-2.5.2 +# not +# PREFIX/lib-python/modified.2.5.2 +# as given on the above page, i.e. it uses '-' not '.' + +mkdir -p %{buildroot}/%{pypyprefix} +cp -a lib-python %{buildroot}/%{pypyprefix} + +cp -a lib_pypy %{buildroot}/%{pypyprefix} + +# Remove a text file that documents which selftests fail on Win32: +rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt + +# Remove shebang lines from .py files that aren't executable, and +# remove executability from .py files that don't have a shebang line: +find \ + %{buildroot} \ + -name "*.py" \ + \( \ + \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ + -print -exec sed -i '1d' {} \; \ + \) \ + -o \ + \( \ + -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ + -exec chmod a-x {} \; \ + \) \ + \) + +mkdir -p %{buildroot}/%{pypyprefix}/site-packages + + +# pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly +# different bytecode format to CPython. It doesn't use .pyo files: the -O flag +# is treated as a "dummy optimization flag for compatibility with C Python" +# +# pypy-1.4/pypy/module/imp/importing.py has this comment: + # XXX picking a magic number is a mess. So far it works because we + # have only two extra opcodes, which bump the magic number by +1 and + # +2 respectively, and CPython leaves a gap of 10 when it increases + # its own magic number. To avoid assigning exactly the same numbers + # as CPython we always add a +2. We'll have to think again when we + # get at the fourth new opcode :-( + # + # * CALL_LIKELY_BUILTIN +1 + # * CALL_METHOD +2 + # + # In other words: + # + # default_magic -- used by CPython without the -U option + # default_magic + 1 -- used by CPython with the -U option + # default_magic + 2 -- used by PyPy without any extra opcode + # ... + # default_magic + 5 -- used by PyPy with both extra opcodes +# + +# pypy-1.4/pypy/interpreter/pycode.py has: +# +# default_magic = (62141+2) | 0x0a0d0000 # this PyPy's magic +# # (62131=CPython 2.5.1) +# giving a value for "default_magic" for PyPy of 0xa0df2bf. +# Note that this corresponds to the "default_magic + 2" from the comment above + +# In my builds: +# $ ./pypy --info | grep objspace.opcodes +# objspace.opcodes.CALL_LIKELY_BUILTIN: False +# objspace.opcodes.CALL_METHOD: True +# so I'd expect the magic number to be: +# 0x0a0df2bf + 2 (the flag for CALL_METHOD) +# giving +# 0x0a0df2c1 +# +# I'm seeing +# c1 f2 0d 0a +# as the first four bytes of the .pyc files, which is consistent with this. + + +# Bytecompile all of the .py files we ship, using our pypy binary, giving us +# .pyc files for pypy. The script actually does the work twice (passing in -O +# the second time) but it's simplest to reuse that script. +# +# The script has special-casing for .py files below +# /usr/lib{64}/python[0-9].[0-9] +# but given that we're installing into a different path, the supplied "default" +# implementation gets used instead. +# +# Note that some of the test files deliberately contain syntax errors, so +# we pass 0 for the second argument ("errors_terminate"): +/usr/lib/rpm/brp-python-bytecompile \ + %{buildroot}/%{_bindir}/pypy \ + 0 + +%check +topdir=$(pwd) + +SkipTest() { + # Append the given test name to TESTS_TO_SKIP + TEST_NAME=$1 + TESTS_TO_SKIP="$TESTS_TO_SKIP $TEST_NAME" +} + +CheckPyPy() { + # We'll be exercising one of the freshly-built binaries using the + # test suite from the standard library (overridden in places by pypy's + # modified version) + ExeName=$1 + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "STARTING TEST OF: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + pushd %{goal_dir} + + # Gather a list of tests to skip, due to known failures + # TODO: report these failures to pypy upstream + TESTS_TO_SKIP="" + + # Test failures relating to missing codecs + # Hopefully when pypy merges to 2.7 support we'll gain these via a + # refreshed stdlib: + # test_codecencodings_cn: + # all tests fail, with one of + # unknown encoding: gb18030 + # unknown encoding: gb2312 + # unknown encoding: gbk + SkipTest test_codecencodings_cn + + # test_codecencodings_hk: + # all tests fail, with: + # unknown encoding: big5hkscs + SkipTest test_codecencodings_hk + + # test_codecencodings_jp: + # all tests fail, with one of: + # unknown encoding: cp932 + # unknown encoding: euc_jisx0213 + # unknown encoding: euc_jp + # unknown encoding: shift_jis + # unknown encoding: shift_jisx0213 + SkipTest test_codecencodings_jp + + # test_codecencodings_kr: + # all tests fail, with one of: + # unknown encoding: cp949 + # unknown encoding: euc_kr + # unknown encoding: johab + SkipTest test_codecencodings_kr + + # test_codecencodings_tw: + # all tests fail, with: + # unknown encoding: big5 + SkipTest test_codecencodings_tw + + # test_multibytecodec: + # 14 failures out of 15, due to: + # unknown encoding: euc-kr + # unknown encoding: gb2312 + # unknown encoding: jisx0213 + # unknown encoding: cp949 + # unknown encoding: iso2022-jp + # unknown encoding: gb18030 + SkipTest test_multibytecodec + + # + # Other failures: + # + # test_asynchat: + # seems to hang on this test, within test_line_terminator + SkipTest test_asynchat + + # test_compiler: + # 4 errors out of 13: + # testSourceCodeEncodingsError + # testWith + # testWithAss + # testYieldExpr + SkipTest test_compiler + + # test_ctypes: + # failures=17, errors=20, out of 132 tests + SkipTest test_ctypes + + # test_frozen: + # TestFailed: import __hello__ failed:No module named __hello__ + SkipTest test_frozen + + # test_iterlen: + # 24 failures out of 25, apparently all due to TypeError + SkipTest test_iterlen + + # test_parser: + # 12 failures out of 15 + SkipTest test_parser + + # test_platform: + # Koji builds show: + # test test_platform failed -- errors occurred in test.test_platform.PlatformTest + SkipTest test_platform + + # test_socket: + # testSockName can fail in Koji with: + # my_ip_addr = socket.gethostbyname(socket.gethostname()) + # gaierror: (-3, 'Temporary failure in name resolution') + SkipTest test_socket + + # test_sort: + # some failures + SkipTest test_sort + + # test_sqlite: + # 3 of the sqlite3.test.dbapi.ExtensionTests raise: + # ProgrammingError: Incomplete statement '' + SkipTest test_sqlite + + # test_traceback: + # works when run standalone; failures seen when run as part of a suite + SkipTest test_traceback + + # test_zlib: + # failure seen in Koji, not sure of reason why: + # test test_zlib failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.4.1-src/lib-python/2.5.2/test/test_zlib.py", line 72, in test_baddecompressobj + # self.assertRaises(ValueError, zlib.decompressobj, 0) + # AssertionError: ValueError not raised + SkipTest test_zlib + + + # Run the built binary through the selftests: + time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP + + popd + + # Doublecheck pypy's own test suite, using the built pypy binary: + + # Disabled for now: + # x86_64 shows various failures inside: + # jit/backend/x86/test + # followed by a segfault inside + # jit/backend/x86/test/test_runner.py + # + # i686 shows various failures inside: + # jit/backend/x86/test + # with the x86_64 failure leading to cancellation of the i686 build + + # Here's the disabled code: + # pushd pypy + # time translator/goal/$ExeName test_all.py + # popd + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "FINISHED TESTING: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" +} + +%if 0%{with_jit} +CheckPyPy pypy +%endif + +%if 0%{with_stackless} +CheckPyPy pypy-stackless +%endif + + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files libs +%defattr(-,root,root,-) +%doc LICENSE README demo + +%dir %{pypyprefix} +%dir %{pypyprefix}/lib-python +%{pypyprefix}/lib-python/%{pylibver}/ +%{pypyprefix}/lib-python/modified-%{pylibver}/ +%{pypyprefix}/lib-python/conftest.py* +%{pypyprefix}/lib_pypy/ +%{pypyprefix}/site-packages/ + +%if 0%{with_jit} +%files +%defattr(-,root,root,-) +%doc LICENSE README +%{_bindir}/pypy +%endif + +%if 0%{with_stackless} +%files stackless +%defattr(-,root,root,-) +%doc LICENSE README +%{_bindir}/pypy-stackless +%endif + + +%changelog +* Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-3 +- try to respect the FHS by installing libraries below libdir, rather than +datadir; patch app_main.py to look in this installation location first when +scanning for the pypy library directories. +- clarifications and corrections to the comments in the specfile + +* Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-2 +- remove .svn directories +- disable verbose logging +- add a %%check section +- introduce %%goal_dir variable, to avoid repetition +- remove shebang line from demo/bpnn.py, as we're treating this as a +documentation file +- regenerate patch 2 to apply without generating a .orig file + +* Tue Dec 21 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-1 +- 1.4.1; fixup %%setup to reflect change in toplevel directory in upstream +source tarball +- apply SELinux fix to the bundled test_commands.py (patch 2) + +* Wed Dec 15 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4-4 +- rename the jit build and subpackge to just "pypy", and remove the nojit and +sandbox builds, as upstream now seems to be focussing on the JIT build (with +only stackless called out in the getting-started-python docs); disable +stackless for now +- add a verbose_logs specfile boolean; leave it enabled for now (whilst fixing +build issues) +- add more comments, and update others to reflect 1.2 -> 1.4 changes +- re-enable debuginfo within CFLAGS ("-g") +- add the LICENSE and README to all subpackages +- ensure the built binaries don't have the "I need an executable stack" flag +- remove DOS batch files during %%prep (idlelib.bat) +- remove shebang lines from .py files that aren't executable, and remove +executability from .py files that don't have a shebang line (taken from +our python3.spec) +- bytecompile the .py files into .pyc files in pypy's bytecode format + +* Sun Nov 28 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-3 +- BuildRequire valgrind-devel +- Install pypy library from the new directory +- Disable building with our CFLAGS for now because they are causing a build failure. +- Include site-packages directory + +* Sat Nov 27 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-2 +- Add patch to configure the build to use our CFLAGS and link libffi + dynamically + +* Sat Nov 27 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-1 +- Update to 1.4 +- Drop patch for py2.6 that's in this build +- Switch to building pypy with itself once pypy is built once as recommended by + upstream +- Remove bundled, prebuilt java libraries +- Fix license tag +- Fix source url +- Version pypy-libs Req + +* Tue May 4 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.2-2 +- cherrypick r72073 from upstream SVN in order to fix the build against +python 2.6.5 (patch 2) + +* Wed Apr 28 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.2-1 +- initial packaging + diff --git a/sources b/sources index e69de29..90f34be 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ebbbb156b1eb842e9e65d909ed5f9f6d pypy-1.4.1-src.tar.bz2
1
0
0
0
Architecture specific change in rpms/pypy3.9.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/pypy3.9.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=49ad6567e89c…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=831c9929b304…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=efbf3a366175…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=5aa1d86125bb…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=faa7ffb04460…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=083ef4d302f9…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=f27d32f53000…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=9d0ffbc9d5d8…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=82dcbae2321e…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=720aa9bae8b7…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=a6780ec4355a…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=b929faae35b0…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=91071982692c…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=ad0d37c68389…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=6b002d36f3cb…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=693a83b0c291…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=817c77d554b6…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=347fb465b0fc…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=343676a8999d…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=4a3038ff5634…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=43ee7785260f…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=a0374180ff79…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=d39359a3af6a…
https://src.fedoraproject.org/cgit/rpms/pypy3.9.git/commit/?id=f756cfcb34f7…
. Change: -%ifarch s390 s390x +%ifarch %{valgrind_arches} +%ifarch %{ix86} x86_64 %{arm} +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 -%ifarch %{power64} -ExcludeArch: %{power64} +ExcludeArch: %{power64} +ExcludeArch: aarch64 %{power64} +%ifarch %{power64} -%ifnarch aarch64 ppc64le +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x +%ifarch s390 s390x +%ifarch %{ix86} x86_64 %{arm} +ExcludeArch: aarch64 +ExcludeArch: aarch64 armv7hl s390 s390x +ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 s390 s390x ppc64le ppc64 +ExcludeArch: aarch64 s390 s390x -%ifarch x86_64 +%ifarch x86_64 +%ifnarch aarch64 ppc64le +%ifnarch s390 +%ifarch %{ix86} x86_64 ppc ppc64 s390x +%ifarch %{ix86} x86_64 Thanks. Full change: ============ commit a22e7e57d16affe5b643363e6d12a2f1401e98df Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 23 02:34:56 2022 +0100 Stop providing pypy3.9(abi) = 7.3, it makes no sense This was added long time ago to try to mimic python(abi) but in this form it converged to nonsense. diff --git a/pypy3.9.spec b/pypy3.9.spec index 62b1600..2fa86bf 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -172,7 +172,6 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} -Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} # This is when pypy3 package was replaced: commit c2195a845be83a63ee47f34a61e2cc6c51adabe7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:07:03 2022 +0100 Update to 7.3.8 final diff --git a/.gitignore b/.gitignore index 8ffefa5..2cc60f0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /pypy3.8-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc2-src.tar.bz2 +/pypy3.9-v7.3.8-src.tar.bz2 diff --git a/pypy3.9.spec b/pypy3.9.spec index bb4ea19..62b1600 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -1,6 +1,6 @@ %global basever 7.3 %global micro 8 -%global pre rc2 +#global pre ... %global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} @@ -806,6 +806,9 @@ CheckPyPy pypy%{pyversion}-c %changelog +* Tue Feb 22 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8-1 +- Update to 7.3.8 final + * Fri Feb 11 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc2-1 - Update to 7.3.8rc2 diff --git a/sources b/sources index 9d9ec1d..31f6e92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.9-v7.3.8rc2-src.tar.bz2) = 40fc0dd45bf24bc9a1bfa259bce11ee706ac73dd29f66a3e2a16bb9ca5c6683d4aedaf21394875ab3facb31eb65f4d497eaa3c10ef4394251ecb4b4a85511197 +SHA512 (pypy3.9-v7.3.8-src.tar.bz2) = aed018738af7a225f516ec37d059d539f486d9dd427fe000805147b197f496d5fcb0387e47008524753ad18224aebeb1e68f9e2093acbe37468e02bff92f7126 commit c45eac312a942d4fe6f5f8d0e6f28fd37343ee36 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:04:57 2022 +0100 Add comment above the %soname_version definition diff --git a/pypy3.9.spec b/pypy3.9.spec index f7e7b9b..bb4ea19 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -447,6 +447,8 @@ BuildPyPy \ %global installation_archive_name pypy%{pyversion}-%{version_} %global packaging_builddir builddir %global packaged_prefix %{packaging_builddir}/%{installation_archive_name} +# We will set an arbitrary downstream-only soname version, as it is required +# See
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
%global soname_version 0.1 %{bootstrap_python_interp} pypy/tool/release/package.py --archive-name '%{installation_archive_name}' --builddir '%{packaging_builddir}' --no-embedded-dependencies commit f97fb4af2949675ebe660503b3ebc307d4818fad Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:03:31 2022 +0100 Explain how the removed sources list was created diff --git a/pypy3.9.spec b/pypy3.9.spec index 1e56c79..f7e7b9b 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -472,6 +472,8 @@ rm %{packaged_prefix}/include/README # 7. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} # 8. remove sources, we don't install them +# this list was created by inspecting rpmlint output before it was added +# sources that look like they might be tests are kept and included in the test subpackage rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp commit 1b34489b242ea4fa5a0936725b07654eba9605a3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:02:10 2022 +0100 Add reversed "keep this synced" comments diff --git a/pypy3.9.spec b/pypy3.9.spec index cb53228..1e56c79 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -773,6 +773,7 @@ CheckPyPy pypy%{pyversion}-c %files test +# Keep this synced with %%excluded %%files in libs %{pypylibdir}/_ctypes_test.* %{pypylibdir}/_pypy_testcapi.* %{pypylibdir}/_test* @@ -794,6 +795,8 @@ CheckPyPy pypy%{pyversion}-c %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif + +# Keep this synced with %%excluded %%files in libs %{pypylibdir}/cffi/*.h %{pypylibdir}/hpy/devel/ commit a426a21cc460d036b4dedd1a9c2ebc82c9eda8db Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 12:00:38 2022 +0100 Rename pypy2_build to build_using_pypy2 to be less confusing diff --git a/pypy3.9.spec b/pypy3.9.spec index adb16eb..cb53228 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -108,8 +108,8 @@ Source189: 189-use-rpm-wheels.patch # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%bcond_without pypy2_build -%if %{with pypy2_build} +%bcond_without build_using_pypy2 +%if %{with build_using_pypy2} BuildRequires: pypy2 %global bootstrap_python_interp pypy2 %else @@ -321,7 +321,7 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif -%if %{without pypy2_build} +%if %{without build_using_pypy2} # use the pycparser from PyPy even on CPython ln -s lib_pypy/cffi/_pycparser pycparser %endif commit da61e64d93d761b8b56fd2568e9b8886a9f2e5b7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:58:22 2022 +0100 Make -test and -devel require both main package and -libs explicitly Requiring just the main package would do, but this way it's easier to see directly. CPython does the same. diff --git a/pypy3.9.spec b/pypy3.9.spec index 19737a7..adb16eb 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -186,6 +186,7 @@ Conflicts: pypy3 < 7.3.7-1 # It's intended for the libs package not to drag in the interpreter, see #
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
#
https://bugzilla.redhat.com/show_bug.cgi?id=1862082
+# All other packages require the main package explicitly. %global __requires_exclude ^/usr/bin/pypy %description @@ -251,6 +252,7 @@ Libraries required by the various PyPy implementations of Python %{pyversion}. %package test Summary: Tests for PyPy%{pyversion} +Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} @@ -266,6 +268,7 @@ Useful when you want to run the test suite of PyPy%{pyversion}. %package devel Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} +Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} %if %{with main_pypy3} Provides: pypy3-devel = %{version}-%{release} commit a0e5980f846af150de18317f8aefc49eba59ecde Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:56:44 2022 +0100 Nitpick: patch the ELF, not a link to it diff --git a/pypy3.9.spec b/pypy3.9.spec index 0499757..19737a7 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -462,7 +462,7 @@ rm %{packaged_prefix}/bin/*.debug #
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so -patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} # 6. remove stray README rm %{packaged_prefix}/include/README commit d3586d269a298076b1be480cfdfa1e33cd29dee3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 22 11:55:45 2022 +0100 Mimic CPython, %exclude ensurepip/_bundled when built with RPM wheels diff --git a/pypy3.9.spec b/pypy3.9.spec index 09265f8..0499757 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -737,6 +737,9 @@ CheckPyPy pypy%{pyversion}-c %license %{pypylibdir}/cffi/_pycparser/ply/LICENSE %license %{pypylibdir}/hpy.dist-info/LICENSE %{pypylibdir}/ +%if %{with rpmwheels} +%exclude %{pypylibdir}/ensurepip/_bundled +%endif %if "%{_lib}" == "lib64" %{_prefix}/lib/pypy%{pyversion}/ %endif commit 7926d81ad4f10b12f89059692316d4853ec5cad6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Feb 11 09:54:04 2022 +0100 Update to 7.3.8rc2 diff --git a/.gitignore b/.gitignore index 3f09cde..8ffefa5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /pypy3.8-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.8rc1-src.tar.bz2 /pypy3.9-v7.3.8rc1-src.tar.bz2 +/pypy3.9-v7.3.8rc2-src.tar.bz2 diff --git a/pypy3.9.spec b/pypy3.9.spec index 4c1a3de..09265f8 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -1,6 +1,6 @@ %global basever 7.3 %global micro 8 -%global pre rc1 +%global pre rc2 %global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} @@ -793,6 +793,9 @@ CheckPyPy pypy%{pyversion}-c %changelog +* Fri Feb 11 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc2-1 +- Update to 7.3.8rc2 + * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 - Move to a CPython-like installation layout diff --git a/sources b/sources index 2cd33d0..9d9ec1d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.9-v7.3.8rc1-src.tar.bz2) = d1b1942fbacc7f8d642c85ceb4c4c9796e73bd5836615e2db81f4ddabf9e4f94c230f2d946ea9c49b642d41304aeed3906df1931a52ec40c56d14f1028139978 +SHA512 (pypy3.9-v7.3.8rc2-src.tar.bz2) = 40fc0dd45bf24bc9a1bfa259bce11ee706ac73dd29f66a3e2a16bb9ca5c6683d4aedaf21394875ab3facb31eb65f4d497eaa3c10ef4394251ecb4b4a85511197 commit f83fb4944938ec7256d81cb1c6faffd9284bc07f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 21:00:18 2022 +0100 Cleanup parts of the installation diff --git a/pypy3.9.spec b/pypy3.9.spec index 96449a7..4c1a3de 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -454,19 +454,21 @@ BuildPyPy \ rm %{packaged_prefix}/bin/python* # 2. remove the "pypy" symbolic link, we still want pypy2 to be that for now rm %{packaged_prefix}/bin/pypy -# 3. remove the "pypy3"symbolic link, if this is not the main pypy3 +# 3. remove the "pypy3" symbolic link, if this is not the main pypy3 %{!?with_main_pypy3:rm %{packaged_prefix}/bin/pypy3} -# 4. move libpypy3.9-c.so to lib(64) and soname version it +# 4. remove the .debug executbale and library +rm %{packaged_prefix}/bin/*.debug +# 5. move libpypy3.9-c.so to lib(64) and soname version it #
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} -# 5. remove stray README +# 6. remove stray README rm %{packaged_prefix}/include/README -# 6. copy the main LICENSE file to pypy's libdir, as does CPython +# 7. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} -# 7. Remove sources, we don't install them +# 8. remove sources, we don't install them rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp @@ -590,13 +592,6 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} %endif -# wtf? This is probably masking some bigger problem, but let's do this for now -mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : - -# since 5.10.0, the debug binaries are built and shipped, making the -# pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{_bindir}/*.debug - %check commit 49ad6567e89c18c6a5caae92ac961fcfe4356aa9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 20:58:42 2022 +0100 Remove an useless s390(x) z10 sed, we are at z13+ in Fedora diff --git a/pypy3.9.spec b/pypy3.9.spec index e9cb58a..96449a7 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -327,11 +327,6 @@ rm lib-python/3/idlelib/idle.bat rm lib-python/3/distutils/command/*.exe %build -%ifarch s390 s390x -# pypy3 requires z10 at least -%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /') -%endif - # Top memory usage is about 4.5GB on arm7hf free commit 831c9929b304069e0b18ec88a5bcf0a21d374204 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 20:58:24 2022 +0100 Use %{valgrind_arches} diff --git a/pypy3.9.spec b/pypy3.9.spec index 097ec4a..e9cb58a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -137,7 +137,7 @@ BuildRequires: xz-devel BuildRequires: python-rpm-macros -%ifnarch s390 +%ifarch %{valgrind_arches} BuildRequires: valgrind-devel %endif commit 03bdb932315d1e7896accf2fdac60801a21929de Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 11:21:37 2022 +0100 Final touches to the rpmlintrc file diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc index 7c88006..8b50ec4 100644 --- a/pypy3.9.rpmlintrc +++ b/pypy3.9.rpmlintrc @@ -29,6 +29,9 @@ addFilter(r'no-manual-page-for-binary pypy(3(\.\d+)?)?') # missing documentation from subpackages addFilter(r'^pypy3(\.\d+)?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') +# Obviously deliberately empty file(s) +addFilter(r'hidden-file-or-dir /usr/lib(64)?/pypy3\.\d+/.*\.empty') + # we have extra tokens at the end of %endif/%else directives, we consider them useful addFilter(r'extra tokens at the end of %(endif|else) directive') commit a2df6900a7f0e566d45ee8e73a9016174a65d944 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Feb 10 11:11:52 2022 +0100 Stop shipping C sources, move some headers to -devel, one to -test diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc index 2aa2ce3..7c88006 100644 --- a/pypy3.9.rpmlintrc +++ b/pypy3.9.rpmlintrc @@ -20,6 +20,7 @@ addFilter(r'only-non-binary-in-usr-lib') # some devel files that are deliberately needed addFilter(r'devel-file-in-non-devel-package /usr/include/pypy3\.\d+m?/pyconfig-(32|64)\.h') addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/distutils/tests/xxmodule\.c') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/_.*test.*\.[ch]') # SORRY, NOT SORRY: # manual pages diff --git a/pypy3.9.spec b/pypy3.9.spec index 76cf42f..097ec4a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -471,6 +471,12 @@ patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{so rm %{packaged_prefix}/include/README # 6. copy the main LICENSE file to pypy's libdir, as does CPython cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} +# 7. Remove sources, we don't install them +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_blake2/impl +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_libmpdec +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_sha3/kcp +rm -r %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/_cffi_src/openssl/src +rm %{packaged_prefix}/%{_lib}/pypy%{pyversion}/_pypy_*.c # Create the prefix and move stuff into it mkdir -p %{buildroot}%{_prefix} @@ -763,6 +769,11 @@ CheckPyPy pypy%{pyversion}-c %exclude %{pypylibdir}/*/test/ %exclude %{pypylibdir}/*/tests/ %exclude %{pypylibdir}/idlelib/idle_test/ +%exclude %{pypylibdir}/testcapi_long.h + +# Keep this synced with %%files devel below +%exclude %{pypylibdir}/cffi/*.h +%exclude %{pypylibdir}/hpy/devel/ %files test @@ -777,6 +788,7 @@ CheckPyPy pypy%{pyversion}-c %{pypylibdir}/*/test/ %{pypylibdir}/*/tests/ %{pypylibdir}/idlelib/idle_test/ +%{pypylibdir}/testcapi_long.h %files devel @@ -786,6 +798,8 @@ CheckPyPy pypy%{pyversion}-c %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif +%{pypylibdir}/cffi/*.h +%{pypylibdir}/hpy/devel/ %changelog commit 2c935f984efe043a0a873cc1b19cfd3e64ea132e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:18:37 2022 +0100 Introduce an rpminspect config file Copied from python3.10, "python" replaced with "pypy" badfuncs library path changed. diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..0b7b36d --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,28 @@ +# exclude test XML data (not always valid) from XML validity check: +xml: + ignore: + - /usr/lib*/pypy*/test/xmltestdata/* + - /usr/lib*/pypy*/test/xmltestdata/*/* + +# exclude _socket from ipv4 only functions check, it has both ipv4 and ipv6 only +badfuncs: + ignore: + - /usr/lib*/libpypy*.so* + +# don't report changed content of compiled files +# that is expected with every toolchain update and not reproducible yet +changedfiles: + # note that this is a posix regex, so no \d + exclude_path: (\.so(\.[0-9]+(\.[0-9]+)?)?$|^/usr/bin/pypy[0-9]+\.[0-9]+d?m?$) + +# files change size all the time, we don't need to VERIFY it +# however, the INFO is useful, so we don't disable the check entirely +filesize: + # artificially large number, TODO a better way + size_threshold: 100000 + + +# completely disabled inspections: +inspections: + # we know about our patches, no need to report anything + patches: off commit 5658a2e3cc6492f1ba6cd4b0faf3e6a17062b012 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:05:29 2022 +0100 Introduce an rpmlintrc config file Copied from python3.10, "python" replaced with "pypy" and various rules removed. Added the unexpanded macro in: Requires: emacs-filesystem filter. This is not a complete filter, but allows me to see the extra errors/warnings. diff --git a/pypy3.9.rpmlintrc b/pypy3.9.rpmlintrc new file mode 100644 index 0000000..2aa2ce3 --- /dev/null +++ b/pypy3.9.rpmlintrc @@ -0,0 +1,70 @@ +# KNOWN BUGS: +#
https://bugzilla.redhat.com/show_bug.cgi?id=1489816
+addFilter(r'crypto-policy-non-compliance-openssl') + + +# TESTS: +addFilter(r'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/pypy3\.\d+/test') + + +# OTHER DELIBERATES: +# chroot function +addFilter(r'missing-call-to-chdir-with-chroot') + +# intentionally hardcoded +addFilter(r'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|pypy%{pyversion})') + +# we have non binary stuff, python files +addFilter(r'only-non-binary-in-usr-lib') + +# some devel files that are deliberately needed +addFilter(r'devel-file-in-non-devel-package /usr/include/pypy3\.\d+m?/pyconfig-(32|64)\.h') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/distutils/tests/xxmodule\.c') + +# SORRY, NOT SORRY: +# manual pages +addFilter(r'no-manual-page-for-binary pypy(3(\.\d+)?)?') + +# missing documentation from subpackages +addFilter(r'^pypy3(\.\d+)?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') + +# we have extra tokens at the end of %endif/%else directives, we consider them useful +addFilter(r'extra tokens at the end of %(endif|else) directive') + + +# RPMLINT IMPERFECTIONS +#
https://github.com/rpm-software-management/rpmlint/issues/123
+addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3393') +#
https://github.com/rpm-software-management/rpmlint/pull/133
+addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3394') + +#
https://bugzilla.redhat.com/show_bug.cgi?id=1550562
+#
https://github.com/rpm-software-management/rpmlint/issues/128
+addFilter(r'python-bytecode-inconsistent-mtime .* 1970') + +# debugsource +addFilter(r'^pypy3(\.\d+)?-debugsource\.[^:]+: (E|W): no-documentation') + +# debuginfo +addFilter(r'^pypy3(\.\d+)?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)') + +# we just don't have the macro installed when rpmlint runs, but the package is BuildRequired +addFilter(r'Possible unexpanded macro in:\s+Requires:\s+emacs-filesystem') + +# this is OK for F28+ +addFilter(r'library-without-ldconfig-post') + +# debug package contains devel and non-devel files +addFilter(r'pypy3(\.\d+)?-debug\.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package') + +# Python modules don't need to be linked against libc +# Since 3.8 they are no longer linked against libpypy-c +addFilter(r'(E|W): library-not-linked-against-libc /usr/lib(64)?/pypy3\.\d+/') +addFilter(r'(E|W): shared-lib-without-dependency-information /usr/lib(64)?/pypy3\.\d+/') + +# specfile-errors are listed twice, once with reason and once without +# we filter out the empty ones +addFilter(r'\bpypy3(\.\d+)?\.(src|spec): (E|W): specfile-error\s+$') + +# SPELLING ERRORS +addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ') commit b2b5021b67266f6162dda93b10401187441728aa Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 18:02:54 2022 +0100 Create a test subpackage, similar to python3-test diff --git a/pypy3.9.spec b/pypy3.9.spec index 61b9197..76cf42f 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -249,6 +249,20 @@ Provides: bundled(python3dist(hpy)) = 0.0.3 Libraries required by the various PyPy implementations of Python %{pyversion}. +%package test +Summary: Tests for PyPy%{pyversion} +Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} + +%if %{with main_pypy3} +Provides: pypy3-test = %{version}-%{release} +Provides: pypy3-test%{?_isa} = %{version}-%{release} +%endif + +%description test +Various testing modules of PyPy%{pyversion}. +Useful when you want to run the test suite of PyPy%{pyversion}. + + %package devel Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} @@ -737,6 +751,33 @@ CheckPyPy pypy%{pyversion}-c %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif +# Keep this synced with %%files test below +%exclude %{pypylibdir}/_ctypes_test.* +%exclude %{pypylibdir}/_pypy_testcapi.* +%exclude %{pypylibdir}/_test* +%exclude %{pypylibdir}/__pycache__/_ctypes_test.* +%exclude %{pypylibdir}/__pycache__/_pypy_testcapi.* +%exclude %{pypylibdir}/__pycache__/_test* +%exclude %{pypylibdir}/test/ +%exclude %{pypylibdir}/*/testing/ +%exclude %{pypylibdir}/*/test/ +%exclude %{pypylibdir}/*/tests/ +%exclude %{pypylibdir}/idlelib/idle_test/ + + +%files test +%{pypylibdir}/_ctypes_test.* +%{pypylibdir}/_pypy_testcapi.* +%{pypylibdir}/_test* +%{pypylibdir}/__pycache__/_ctypes_test.* +%{pypylibdir}/__pycache__/_pypy_testcapi.* +%{pypylibdir}/__pycache__/_test* +%{pypylibdir}/test/ +%{pypylibdir}/*/testing/ +%{pypylibdir}/*/test/ +%{pypylibdir}/*/tests/ +%{pypylibdir}/idlelib/idle_test/ + %files devel %dir %{_includedir}/pypy%{pyversion} @@ -752,6 +793,7 @@ CheckPyPy pypy%{pyversion}-c - Update to 7.3.8rc1 - Move to a CPython-like installation layout - Stop requiring pypy3.9 from pypy3.9-libs +- Split tests into pypy3.9-test * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit 9779ff55f44132f304aa85598f79c1090021e1ba Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 17:54:33 2022 +0100 Move main %files to the top diff --git a/pypy3.9.spec b/pypy3.9.spec index db83a56..61b9197 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -713,6 +713,12 @@ CheckPyPy pypy%{pyversion}-c # is just confusing for the user. %global _docdir_fmt %{name} +%files +%doc README.rst +%{?with_main_pypy3:%{_bindir}/pypy3} +%{_bindir}/pypy%{pyversion} + + %files libs %doc README.rst %license %{pypylibdir}/LICENSE @@ -732,12 +738,6 @@ CheckPyPy pypy%{pyversion}-c %endif -%files -%doc README.rst -%{?with_main_pypy3:%{_bindir}/pypy3} -%{_bindir}/pypy%{pyversion} - - %files devel %dir %{_includedir}/pypy%{pyversion} %{_includedir}/pypy%{pyversion}/*.h commit c6e52d457c672e6244aa8f0d5b9bf5f6ff4b7e72 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 17:52:43 2022 +0100 Define %{pypylibdir} for easier %files diff --git a/pypy3.9.spec b/pypy3.9.spec index 8b41f86..db83a56 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -429,6 +429,8 @@ BuildPyPy \ %install +%global pypylibdir %{_libdir}/pypy%{pyversion} + # First, run packaging script, it will prep the installation tree in builddir %global installation_archive_name pypy%{pyversion}-%{version_} %global packaging_builddir builddir @@ -463,7 +465,7 @@ mv %{packaged_prefix}/include %{buildroot}%{_includedir} mv %{packaged_prefix}/%{_lib} %{buildroot}%{_libdir} # Create directories we want to own -install -d -m 0755 %{buildroot}%{_libdir}/pypy%{pyversion}/site-packages/__pycache__ +install -d -m 0755 %{buildroot}%{pypylibdir}/site-packages/__pycache__ %if "%{_lib}" == "lib64" # The 64-bit version needs to create "site-packages" in /usr/lib/ (for # pure-Python modules) as well as in /usr/lib64/ (for packages with extension @@ -713,12 +715,12 @@ CheckPyPy pypy%{pyversion}-c %files libs %doc README.rst -%license %{_libdir}/pypy%{pyversion}/LICENSE -%license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{_libdir}/pypy%{pyversion}/cffi.dist-info/LICENSE -%license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE -%{_libdir}/pypy%{pyversion}/ +%license %{pypylibdir}/LICENSE +%license %{pypylibdir}/_cffi_ssl/LICENSE +%license %{pypylibdir}/cffi.dist-info/LICENSE +%license %{pypylibdir}/cffi/_pycparser/ply/LICENSE +%license %{pypylibdir}/hpy.dist-info/LICENSE +%{pypylibdir}/ %if "%{_lib}" == "lib64" %{_prefix}/lib/pypy%{pyversion}/ %endif commit 70c239aa7011b7fc5973bd54c8010321515efdaa Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:04:46 2022 +0100 Remove the non-shadow_stack option, it has not been used in years If desired, it can be salvaged from git history. diff --git a/pypy3.9.spec b/pypy3.9.spec index d2eb615..8b41f86 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -53,10 +53,6 @@ URL:
http://pypy.org/
# Should we build the emacs JIT-viewing mode? %bcond_without emacs -# Forcibly use the shadow-stack option for detecting GC roots, rather than -# relying on hacking up generated assembler with regexps: -%bcond_without shadow_stack - # Easy way to turn off the selftests: %bcond_without selftests @@ -378,35 +374,8 @@ BuildPyPy() { # How will we track garbage-collection roots in the generated code? #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
-%if %{with shadow_stack} - # This is the most portable option, and avoids a reliance on non-guaranteed - # behaviors within GCC's code generator: use an explicitly-maintained stack - # of root pointers: - %global gcrootfinder_options --gcrootfinder=shadowstack - export CFLAGS=$(echo "$RPM_OPT_FLAGS") -%else - # Go with the default, which is "asmgcc" - - %global gcrootfinder_options %{nil} - - #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
- # The generated Makefile compiles the .c files into assembler (.s), rather - # than direct to .o It then post-processes this assembler to locate - # garbage-collection roots (building .lbl.s and .gcmap files, and a - # "gcmaptable.s"). (The modified .lbl.s files have extra code injected - # within them). - # Unfortunately, the code to do this: - # pypy-1.4/pypy/translator/c/gcc/trackgcroot.py - # doesn't interract well with the results of using our standard build flags. - # For now, filter our CFLAGS of everything that could be conflicting with - # pypy. Need to check these and reenable ones that are okay later. - # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') - -%endif - # The generated C code leads to many thousands of warnings of the form: # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] # Suppress them: @@ -429,7 +398,7 @@ BuildPyPy() { PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ $INTERP ../../rpython/bin/rpython \ - %{gcrootfinder_options} \ + --gcrootfinder=shadowstack \ $Options \ targetpypystandalone \ --platlibdir=%{_lib} commit 8950772c1a115a687a27d3a7c79db5d6043d0f0a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:03:38 2022 +0100 Rename use_self_when_building to pypy2_build, make it a bcond diff --git a/pypy3.9.spec b/pypy3.9.spec index 7f78c2a..d2eb615 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -105,22 +105,20 @@ Source189: 189-use-rpm-wheels.patch # Build-time requirements: -# pypy's can be rebuilt using itself, rather than with CPython; doing so +# pypy's can be rebuilt using pypy2, rather than with CPython 2; doing so # halves the build time. # -# Turn it off with this boolean, to revert back to rebuilding using CPython +# Turn it off with this bcond, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 1 -%if 0%{use_self_when_building} -# pypy3 can only be build with pypy2 +%bcond_without pypy2_build +%if %{with pypy2_build} BuildRequires: pypy2 %global bootstrap_python_interp pypy2 %else -# pypy3 can only be build with python2 # exception to use Python 2:
https://pagure.io/fesco/issue/2130
-BuildRequires: python27 +BuildRequires: python2.7 %global bootstrap_python_interp python2 %endif @@ -310,7 +308,7 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif -%if ! 0%{use_self_when_building} +%if %{without pypy2_build} # use the pycparser from PyPy even on CPython ln -s lib_pypy/cffi/_pycparser pycparser %endif commit 7ab528fd756f1ff5b61148d872b7352b04a0d374 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 13:00:46 2022 +0100 Convert bool globals to bconds diff --git a/pypy3.9.spec b/pypy3.9.spec index 7b958cb..7f78c2a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -45,20 +45,20 @@ URL:
http://pypy.org/
# it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. %ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 -%global with_jit 1 +%bcond_without jit %else -%global with_jit 0 +%bcond_with jit %endif # Should we build the emacs JIT-viewing mode? -%global with_emacs 1 +%bcond_without emacs # Forcibly use the shadow-stack option for detecting GC roots, rather than # relying on hacking up generated assembler with regexps: -%global shadow_stack 1 +%bcond_without shadow_stack # Easy way to turn off the selftests: -%global run_selftests 1 +%bcond_without selftests # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -151,7 +151,7 @@ BuildRequires: valgrind-devel BuildRequires: time BuildRequires: /usr/bin/free -%if %{run_selftests} +%if %{with selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -163,7 +163,7 @@ BuildRequires: /usr/bin/execstack BuildRequires: /usr/bin/patchelf # For byte-compiling the JIT-viewing mode: -%if %{with_emacs} +%if %{with emacs} BuildRequires: emacs %endif @@ -199,7 +199,7 @@ PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations of the standard types (strings, dictionaries, etc.). -%if 0%{with_jit} +%if %{with jit} This build of PyPy has JIT-compilation enabled. %else This build of PyPy has JIT-compilation disabled, as it is not supported on this @@ -212,7 +212,7 @@ Summary: Run-time libraries used by PyPy implementations of Python %{pyversion} # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) -%if %{with_emacs} +%if %{with emacs} Requires: emacs-filesystem >= %{_emacs_version} %endif @@ -380,7 +380,7 @@ BuildPyPy() { # How will we track garbage-collection roots in the generated code? #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
-%if 0%{shadow_stack} +%if %{with shadow_stack} # This is the most portable option, and avoids a reliance on non-guaranteed # behaviors within GCC's code generator: use an explicitly-maintained stack # of root pointers: @@ -449,14 +449,14 @@ BuildPyPy() { BuildPyPy \ pypy3 \ -%if 0%{with_jit} +%if %{with jit} "-Ojit" \ %else "-O2" \ %endif %{nil} -%if %{with_emacs} +%if %{with emacs} %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif @@ -595,7 +595,7 @@ find \ # are acceptable. # Install the JIT trace mode for Emacs: -%if %{with_emacs} +%if %{with emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc @@ -735,9 +735,9 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -%if %{run_selftests} +%if %{with selftests} CheckPyPy pypy%{pyversion}-c -%endif # run_selftests +%endif # with selftests # Because there's a bunch of binary subpackages and creating # /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that @@ -757,7 +757,7 @@ CheckPyPy pypy%{pyversion}-c %endif %{_libdir}/libpypy%{pyversion}-c.so.%{soname_version} -%if %{with_emacs} +%if %{with emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif commit d9b44f86786bdc6cb3d8f6837c34bce06facebb2 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:57:36 2022 +0100 Remove some unneeded globals diff --git a/pypy3.9.spec b/pypy3.9.spec index 4c1c2d1..7b958cb 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -53,9 +53,6 @@ URL:
http://pypy.org/
# Should we build the emacs JIT-viewing mode? %global with_emacs 1 -# Easy way to enable/disable verbose logging: -%global verbose_logs 0 - # Forcibly use the shadow-stack option for detecting GC roots, rather than # relying on hacking up generated assembler with regexps: %global shadow_stack 1 @@ -63,8 +60,6 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pylibver 3 - # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -303,7 +298,7 @@ for f in rpython/translator/goal/bpnn.py ; do done # Replace all lib-python and lib_pypy python shebangs with pypy3 (those will be shipped with pypy3-libs) -find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ +find lib-python/3 lib_pypy -name "*.py" -exec \ sed -r -i '1s@^#!\s*/usr/bin.*(python|pypy).*@#!/usr/bin/%{name}@' \ "{}" \ \; commit 07d1426dd44178550c3e884d3cdf8ae8beb2ae49 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:54:42 2022 +0100 Stop requiring pypy3.9 from pypy3.9-libs diff --git a/pypy3.9.spec b/pypy3.9.spec index 938fe5a..4c1c2d1 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -192,6 +192,13 @@ Obsoletes: pypy3 < 7.3.4-4 Conflicts: pypy3 < 7.3.7-1 %endif +# This prevents ALL subpackages built from this spec to require +# /usr/bin/pypy*. Granularity per subpackage is impossible. +# It's intended for the libs package not to drag in the interpreter, see +#
https://bugzilla.redhat.com/show_bug.cgi?id=1547131
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1862082
+%global __requires_exclude ^/usr/bin/pypy + %description PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations @@ -780,6 +787,7 @@ CheckPyPy pypy%{pyversion}-c * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 - Move to a CPython-like installation layout +- Stop requiring pypy3.9 from pypy3.9-libs * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit 5bfc7634fca83257ad20c151d9a0dfe8fdd207f7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:29:50 2022 +0100 Remove RHEL 6 conditional diff --git a/pypy3.9.spec b/pypy3.9.spec index 0fb47da..938fe5a 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -51,11 +51,7 @@ URL:
http://pypy.org/
%endif # Should we build the emacs JIT-viewing mode? -%if 0%{?rhel} == 6 -%global with_emacs 0 -%else %global with_emacs 1 -%endif # Easy way to enable/disable verbose logging: %global verbose_logs 0 commit fea8a43609c92af70832bfa2e0d02509bf4f173a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:28:24 2022 +0100 Remove tl;dr comments and commented out code diff --git a/pypy3.9.spec b/pypy3.9.spec index 5c7a095..0fb47da 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -38,70 +38,12 @@ URL:
http://pypy.org/
# Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels -# PyPy consists of an implementation of an interpreter (with JIT compilation) -# for the full Python language written in a high-level language, leaving many -# of the implementation details as "pluggable" policies. -# -# The implementation language is then compiled down to .c code, from which we -# obtain a binary. -# -# This allows us to build a near-arbitrary collection of different -# implementations of Python with differing tradeoffs -# -# (As it happens, the implementation language is itself Python, albeit a -# restricted subset "RPython", chosen to making it amenable to being compiled. -# The result implements the full Python language though) - -# We could build many different implementations of Python. -# For now, let's focus on the implementation that appears to be receiving the -# most attention upstream: the JIT-enabled build, with all standard -# optimizations - -# Building a configuration can take significant time: - -# A build of pypy (with jit) on i686 took 77 mins: -# [Timer] Timings: -# [Timer] annotate --- 583.3 s -# [Timer] rtype_lltype --- 760.9 s -# [Timer] pyjitpl_lltype --- 567.3 s -# [Timer] backendopt_lltype --- 375.6 s -# [Timer] stackcheckinsertion_lltype --- 54.1 s -# [Timer] database_c --- 852.2 s -# [Timer] source_c --- 1007.3 s -# [Timer] compile_c --- 419.9 s -# [Timer] =========================================== -# [Timer] Total: --- 4620.5 s -# -# A build of pypy (nojit) on x86_64 took about an hour: -# [Timer] Timings: -# [Timer] annotate --- 537.5 s -# [Timer] rtype_lltype --- 667.3 s -# [Timer] backendopt_lltype --- 385.4 s -# [Timer] stackcheckinsertion_lltype --- 42.5 s -# [Timer] database_c --- 625.3 s -# [Timer] source_c --- 1040.2 s -# [Timer] compile_c --- 273.9 s -# [Timer] =========================================== -# [Timer] Total: --- 3572.0 s - - # We will build a "pypy" binary. # # Unfortunately, the JIT support is only available on some architectures. -# -# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the -# following options: -# 'i386', 'x86' -# 'x86-without-sse2': -# 'x86_64' -# 'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI) -# 'cli' -# 'llvm' -# # We will only build with JIT support on those architectures, and build without # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. - %ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 %global with_jit 1 %else @@ -592,51 +534,6 @@ find \ # approach is to postprocess the ELF file: execstack --clear-execstack %{buildroot}%{_bindir}/pypy%{pyversion} -# pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly -# different bytecode format to CPython. It doesn't use .pyo files: the -O flag -# is treated as a "dummy optimization flag for compatibility with C Python" -# -# pypy-1.4/pypy/module/imp/importing.py has this comment: - # XXX picking a magic number is a mess. So far it works because we - # have only two extra opcodes, which bump the magic number by +1 and - # +2 respectively, and CPython leaves a gap of 10 when it increases - # its own magic number. To avoid assigning exactly the same numbers - # as CPython we always add a +2. We'll have to think again when we - # get at the fourth new opcode :-( - # - # * CALL_LIKELY_BUILTIN +1 - # * CALL_METHOD +2 - # - # In other words: - # - # default_magic -- used by CPython without the -U option - # default_magic + 1 -- used by CPython with the -U option - # default_magic + 2 -- used by PyPy without any extra opcode - # ... - # default_magic + 5 -- used by PyPy with both extra opcodes -# - -# pypy-1.4/pypy/interpreter/pycode.py has: -# -# default_magic = (62141+2) | 0x0a0d0000 # this PyPy's magic -# # (62131=CPython 2.5.1) -# giving a value for "default_magic" for PyPy of 0xa0df2bf. -# Note that this corresponds to the "default_magic + 2" from the comment above - -# In my builds: -# $ ./pypy --info | grep objspace.opcodes -# objspace.opcodes.CALL_LIKELY_BUILTIN: False -# objspace.opcodes.CALL_METHOD: True -# so I'd expect the magic number to be: -# 0x0a0df2bf + 2 (the flag for CALL_METHOD) -# giving -# 0x0a0df2c1 -# -# I'm seeing -# c1 f2 0d 0a -# as the first four bytes of the .pyc files, which is consistent with this. - - # Bytecompile all of the .py files we ship, using our pypy binary, giving us # .pyc files for pypy. # @@ -840,11 +737,6 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600 -#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python -#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test -#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log - %if %{run_selftests} CheckPyPy pypy%{pyversion}-c %endif # run_selftests commit ddfaf6f8242ba77ceccf44428008f34e07a6019f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 9 12:21:52 2022 +0100 Declare bundled cffi diff --git a/pypy3.9.spec b/pypy3.9.spec index 5829c32..5c7a095 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -11,6 +11,7 @@ Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT # Python standard library is Python # pypy/module/unicodedata is UCD +# Bundled cffi is is MIT # Bundled pycparser is is BSD # Bundled pycparser.ply is BSD # Bundled bits from cryptography are ASL 2.0 or BSD @@ -295,6 +296,9 @@ Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} } +# Find the version in lib_pypy/cffi.dist-info/METADATA +Provides: bundled(python3dist(cffi)) = 1.15.0 + # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.21 @@ -854,6 +858,7 @@ CheckPyPy pypy%{pyversion}-c %doc README.rst %license %{_libdir}/pypy%{pyversion}/LICENSE %license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{_libdir}/pypy%{pyversion}/cffi.dist-info/LICENSE %license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE %license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE %{_libdir}/pypy%{pyversion}/ commit 446ee50e4ed1722fa87e3d7ce920f0bfe2e1552c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Feb 8 21:02:33 2022 +0100 Move to a CPython-like installation layout diff --git a/pypy3.9.spec b/pypy3.9.spec index 6336e3d..5829c32 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -124,7 +124,6 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy%{pyversion} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -227,6 +226,7 @@ BuildRequires: perl-interpreter %endif BuildRequires: /usr/bin/execstack +BuildRequires: /usr/bin/patchelf # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -518,12 +518,47 @@ BuildPyPy \ %install -mkdir -p %{buildroot}/%{_bindir} -mkdir -p %{buildroot}/%{pypyprefix} - - -# Run installing script, archive-name pypy%{pyversion} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name pypy%{pyversion} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies +# First, run packaging script, it will prep the installation tree in builddir +%global installation_archive_name pypy%{pyversion}-%{version_} +%global packaging_builddir builddir +%global packaged_prefix %{packaging_builddir}/%{installation_archive_name} +%global soname_version 0.1 + +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name '%{installation_archive_name}' --builddir '%{packaging_builddir}' --no-embedded-dependencies + +# Mangle some paths to match CPython, +# see
https://mail.python.org/pipermail/pypy-dev/2022-January/016310.html
and the replies there +# 1. remove the "python" executables, we still want CPython as the python command +rm %{packaged_prefix}/bin/python* +# 2. remove the "pypy" symbolic link, we still want pypy2 to be that for now +rm %{packaged_prefix}/bin/pypy +# 3. remove the "pypy3"symbolic link, if this is not the main pypy3 +%{!?with_main_pypy3:rm %{packaged_prefix}/bin/pypy3} +# 4. move libpypy3.9-c.so to lib(64) and soname version it +#
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_n…
+mv %{packaged_prefix}/bin/libpypy%{pyversion}-c.so %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so.%{soname_version} +ln -s libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so +patchelf --replace-needed libpypy%{pyversion}-c.so libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/bin/pypy%{pyversion} +# 5. remove stray README +rm %{packaged_prefix}/include/README +# 6. copy the main LICENSE file to pypy's libdir, as does CPython +cp -a LICENSE %{packaged_prefix}/%{_lib}/pypy%{pyversion} + +# Create the prefix and move stuff into it +mkdir -p %{buildroot}%{_prefix} +mv %{packaged_prefix}/bin %{buildroot}%{_bindir} +mv %{packaged_prefix}/include %{buildroot}%{_includedir} +mv %{packaged_prefix}/%{_lib} %{buildroot}%{_libdir} + +# Create directories we want to own +install -d -m 0755 %{buildroot}%{_libdir}/pypy%{pyversion}/site-packages/__pycache__ +%if "%{_lib}" == "lib64" +# The 64-bit version needs to create "site-packages" in /usr/lib/ (for +# pure-Python modules) as well as in /usr/lib64/ (for packages with extension +# modules). +install -d -m 0755 %{buildroot}%{_prefix}/lib/pypy%{pyversion}/site-packages/__pycache__ +%endif # Remove shebang lines from .py files that aren't executable, and @@ -542,8 +577,6 @@ find \ \) \ \) -mkdir -p %{buildroot}/%{pypyprefix}/site-packages - # The generated machine code doesn't need an executable stack, but # one of the assembler files (gcmaptable.s) doesn't have the necessary # metadata to inform gcc of that, and thus gcc pessimistically assumes @@ -553,12 +586,7 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: -execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 - -ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} -%if %{with main_pypy3} -ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 -%endif +execstack --clear-execstack %{buildroot}%{_bindir}/pypy%{pyversion} # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -610,31 +638,18 @@ ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # # Note that some of the test files deliberately contain syntax errors, so # we are running it in subshell, to be able to ignore the failures and not to terminate the build. -(%{py_byte_compile %{buildroot}%{pypyprefix}/bin/pypy3 %{buildroot}%{pypyprefix}}) || : - +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +(%{py_byte_compile %{buildroot}%{_bindir}/pypy%{pyversion} %{buildroot}}) || : -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _sqlite3' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _curses' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import curses' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import syslog' -%{buildroot}%{pypyprefix}/bin/pypy3 -c 'from _sqlite3 import *' - -# Header files for C extension modules. -# Upstream's packaging process (pypy/tool/release/package.py) -# creates an "include" subdir and copies all *.h/*.inl from "include" there -# (it also has an apparently out-of-date comment about copying them from -# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't -# seem to do this as of 2011-01-13) - -# FIXME: arguably these should be instead put into a subdir below /usr/include, -# it's not yet clear to me how upstream plan to deal with the C extension -# interface going forward, so let's just mimic upstream for now. -%global pypy_include_dir %{pypyprefix}/include -mkdir -p %{buildroot}%{pypy_include_dir} -rm -f %{buildroot}%{pypy_include_dir}/README +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _tkinter' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import tkinter' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _sqlite3' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import _curses' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import curses' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'import syslog' +%{buildroot}%{_bindir}/pypy%{pyversion} -c 'from _sqlite3 import *' +unset LD_LIBRARY_PATH # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) @@ -692,17 +707,12 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} %endif -# Remove files we don't want: -rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ - %{buildroot}%{pypyprefix}/README.rst - # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : # since 5.10.0, the debug binaries are built and shipped, making the # pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{pypyprefix}/bin/pypy%{pyversion}.debug -rm -f %{buildroot}%{pypyprefix}/bin/libpypy%{pyversion}-c.so.debug +rm -f %{buildroot}%{_bindir}/*.debug %check @@ -842,31 +852,32 @@ CheckPyPy pypy%{pyversion}-c %files libs %doc README.rst +%license %{_libdir}/pypy%{pyversion}/LICENSE +%license %{_libdir}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{_libdir}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{_libdir}/pypy%{pyversion}/hpy.dist-info/LICENSE +%{_libdir}/pypy%{pyversion}/ +%if "%{_lib}" == "lib64" +%{_prefix}/lib/pypy%{pyversion}/ +%endif +%{_libdir}/libpypy%{pyversion}-c.so.%{soname_version} -%dir %{pypyprefix} -%license %{pypyprefix}/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/hpy.dist-info/LICENSE -%{pypyprefix}/%{_lib}/pypy%{pyversion}/ -%{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif + %files %doc README.rst -%if %{with main_pypy3} -%{_bindir}/pypy3 -%endif +%{?with_main_pypy3:%{_bindir}/pypy3} %{_bindir}/pypy%{pyversion} -%{pypyprefix}/bin/ + %files devel -%dir %{pypy_include_dir} -%dir %{pypy_include_dir}/pypy%{pyversion} -%{pypy_include_dir}/pypy%{pyversion}/*.h +%dir %{_includedir}/pypy%{pyversion} +%{_includedir}/pypy%{pyversion}/*.h +%{_libdir}/libpypy%{pyversion}-c.so %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif @@ -875,6 +886,7 @@ CheckPyPy pypy%{pyversion}-c %changelog * Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 - Update to 7.3.8rc1 +- Move to a CPython-like installation layout * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
commit bc25649d52fadaa744d301804d8cd1b488dafe48 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 16:09:54 2022 +0100 Set platlibdir diff --git a/pypy3.9.spec b/pypy3.9.spec index 29bad37..6336e3d 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -489,7 +489,8 @@ BuildPyPy() { $INTERP ../../rpython/bin/rpython \ %{gcrootfinder_options} \ $Options \ - targetpypystandalone + targetpypystandalone \ + --platlibdir=%{_lib} echo "--------------------------------------------------------------" echo "--------------------------------------------------------------" @@ -844,10 +845,10 @@ CheckPyPy pypy%{pyversion}-c %dir %{pypyprefix} %license %{pypyprefix}/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/_cffi_ssl/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE -%license %{pypyprefix}/lib/pypy%{pyversion}/hpy.dist-info/LICENSE -%{pypyprefix}/lib/pypy%{pyversion}/ +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{pypyprefix}/%{_lib}/pypy%{pyversion}/hpy.dist-info/LICENSE +%{pypyprefix}/%{_lib}/pypy%{pyversion}/ %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el commit 3588ca0647df14cc8830ce4cff4dcb76a72c9ebc Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 16:09:13 2022 +0100 Build with the default OpenSSL version (i.e. 3 on Fedora 36+) diff --git a/pypy3.9.spec b/pypy3.9.spec index 5341906..29bad37 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -204,7 +204,7 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl1.1-devel +BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel commit 9886df00eb114957891c7b2368eadd464e48e2e8 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 19:56:59 2022 +0100 Not main pypy yet diff --git a/pypy3.9.spec b/pypy3.9.spec index 7db20aa..5341906 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -130,11 +130,7 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal -%if 0%{?fedora} >= 36 -%bcond_without main_pypy3 -%else %bcond_with main_pypy3 -%endif %ifarch %{ix86} x86_64 %{arm} %global _package_note_linker gold commit 32ffa63874f3b1c0b00b7d6b8cf96065afba4df5 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 00:30:08 2022 +0100 PyPy 3.9 diff --git a/.gitignore b/.gitignore index 9a71710..3f09cde 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /pypy3.7-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.8rc1-src.tar.bz2 +/pypy3.9-v7.3.8rc1-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 5b61035..4ad6f24 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -2,23 +2,26 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init_ index 597a1ef9ee..3bfab52083 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,6 +1,7 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path --import pkgutil import sys - import runpy - import tempfile -@@ -9,9 +10,24 @@ import subprocess +@@ -6,13 +8,29 @@ import tempfile + import subprocess + from importlib import resources - __all__ = ["version", "bootstrap"] +-from . import _bundled +- --_SETUPTOOLS_VERSION = "56.0.0" -+_WHEEL_DIR = "/usr/share/python-wheels/" --_PIP_VERSION = "21.1.1" + __all__ = ["version", "bootstrap"] +-_SETUPTOOLS_VERSION = "58.1.0" +-_PIP_VERSION = "21.2.4" ++ ++_WHEEL_DIR = "/usr/share/python-wheels/" ++ +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,17 +38,18 @@ index 597a1ef9ee..3bfab52083 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - ++ _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), -@@ -101,13 +117,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + ("pip", _PIP_VERSION, "py3"), +@@ -101,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version, py_tag in _PROJECTS: - wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) -- whl = pkgutil.get_data( -- "ensurepip", -- "_bundled/{}".format(wheel_name), +- whl = resources.read_binary( +- _bundled, +- wheel_name, - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) diff --git a/pypy3.8.spec b/pypy3.9.spec similarity index 99% rename from pypy3.8.spec rename to pypy3.9.spec index ac339fc..7db20aa 100644 --- a/pypy3.8.spec +++ b/pypy3.9.spec @@ -1,7 +1,7 @@ %global basever 7.3 %global micro 8 %global pre rc1 -%global pyversion 3.8 +%global pyversion 3.9 Name: pypy%{pyversion} Version: %{basever}.%{micro}%{?pre:~%{pre}} %global version_ %{basever}.%{micro}%{?pre} @@ -289,8 +289,8 @@ Obsoletes: pypy3-libs < 7.3.4-4 Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 21.1.1 -Provides: bundled(python3dist(setuptools)) = 56.0.0 +Provides: bundled(python3dist(pip)) = 21.2.4 +Provides: bundled(python3dist(setuptools)) = 58.1.0 %endif # Provides for the bundled libmpdec @@ -340,7 +340,6 @@ Header files for building C extension modules against PyPy%{pyversion}. %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl -rmdir lib-python/3/ensurepip/_bundled %endif @@ -705,8 +704,8 @@ mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : # since 5.10.0, the debug binaries are built and shipped, making the # pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why -rm -f %{buildroot}%{pypyprefix}/bin/pypy3.debug -rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug +rm -f %{buildroot}%{pypyprefix}/bin/pypy%{pyversion}.debug +rm -f %{buildroot}%{pypyprefix}/bin/libpypy%{pyversion}-c.so.debug %check @@ -714,7 +713,7 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %{?libmpdec_version: # Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual # provides for in the SPEC. -test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ +test "$(%{goal_dir}/pypy%{pyversion}-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ "%{libmpdec_version}" } @@ -836,7 +835,7 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy3-c +CheckPyPy pypy%{pyversion}-c %endif # run_selftests # Because there's a bunch of binary subpackages and creating @@ -869,7 +868,6 @@ CheckPyPy pypy3-c %files devel %dir %{pypy_include_dir} -%{pypy_include_dir}/*.h %dir %{pypy_include_dir}/pypy%{pyversion} %{pypy_include_dir}/pypy%{pyversion}/*.h %if %{with main_pypy3} diff --git a/sources b/sources index e9e0e29..2cd33d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.8-v7.3.8rc1-src.tar.bz2) = 69eca2ef7c44e15e4b09f36450a985770b3867e41fcd15101881b04fce817f9c8eba3cb783b42fe6509d38e8a4ecfa94573d97cfb902c7c1de9acc2a4d2d760c +SHA512 (pypy3.9-v7.3.8rc1-src.tar.bz2) = d1b1942fbacc7f8d642c85ceb4c4c9796e73bd5836615e2db81f4ddabf9e4f94c230f2d946ea9c49b642d41304aeed3906df1931a52ec40c56d14f1028139978 diff --git a/tests/tests.yml b/tests/tests.yml index a8dc641..6ac1743 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3.8 VERSION=3.8 ./venv.sh + run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh required_packages: - gcc - python3-tox - - pypy3.8-devel + - pypy3.9-devel commit f2558e7a2649b7eefe5091fafb137031c83ef7f6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 15:52:41 2022 +0100 Time and free is always needed diff --git a/pypy3.8.spec b/pypy3.8.spec index d065377..ac339fc 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -218,14 +218,14 @@ BuildRequires: python-rpm-macros BuildRequires: valgrind-devel %endif +# For recording stats: +BuildRequires: time +BuildRequires: /usr/bin/free + %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel -# For use in the selftests, for recording stats: -BuildRequires: time -BuildRequires: /usr/bin/free - # For use in the selftests, for imposing a per-test timeout: BuildRequires: perl-interpreter %endif commit 82b51bb82d8691fe2e9116ed84579e039759fb44 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jan 27 00:24:13 2022 +0100 Update to 7.3.8rc1 diff --git a/.gitignore b/.gitignore index 19134eb..9a71710 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /pypy3.7-v7.3.6-src.tar.bz2 /pypy3.7-v7.3.7-src.tar.bz2 /pypy3.8-v7.3.7-src.tar.bz2 +/pypy3.8-v7.3.8rc1-src.tar.bz2 diff --git a/pypy3.8.spec b/pypy3.8.spec index c7496f2..d065377 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -1,8 +1,11 @@ %global basever 7.3 +%global micro 8 +%global pre rc1 %global pyversion 3.8 Name: pypy%{pyversion} -Version: %{basever}.7 -Release: 3%{?dist} +Version: %{basever}.%{micro}%{?pre:~%{pre}} +%global version_ %{basever}.%{micro}%{?pre} +Release: 1%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -138,7 +141,7 @@ URL:
http://pypy.org/
%endif # Source and patches: -Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
+Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version_}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -297,7 +300,7 @@ Provides: bundled(libmpdec) = %{libmpdec_version} } # Find the version in lib_pypy/cffi/_pycparser/__init__.py -Provides: bundled(python3dist(pycparser)) = 2.20 +Provides: bundled(python3dist(pycparser)) = 2.21 # Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py Provides: bundled(python3dist(ply)) = 3.9 @@ -329,7 +332,7 @@ Header files for building C extension modules against PyPy%{pyversion}. %prep -%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +%autosetup -n pypy%{pyversion}-v%{version_}-src -p1 -S git # Temporary workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1954999
%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}} @@ -639,7 +642,7 @@ rm -f %{buildroot}%{pypy_include_dir}/README # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) -%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src +%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version_}-src mkdir -p %{buildroot}%{pypy_debuginfo_dir} # copy over everything: @@ -875,6 +878,9 @@ CheckPyPy pypy3-c %changelog +* Wed Jan 26 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.8~rc1-1 +- Update to 7.3.8rc1 + * Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/sources b/sources index d769b2c..e9e0e29 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.8-v7.3.7-src.tar.bz2) = 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2 +SHA512 (pypy3.8-v7.3.8rc1-src.tar.bz2) = 69eca2ef7c44e15e4b09f36450a985770b3867e41fcd15101881b04fce817f9c8eba3cb783b42fe6509d38e8a4ecfa94573d97cfb902c7c1de9acc2a4d2d760c commit efbf3a36617566de70d28c78eca89e6a16ce7399 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Jan 25 21:13:36 2022 +0000 Tell package notes that gold is used diff --git a/pypy3.8.spec b/pypy3.8.spec index b92f8bb..c7496f2 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -133,6 +133,9 @@ URL:
http://pypy.org/
%bcond_with main_pypy3 %endif +%ifarch %{ix86} x86_64 %{arm} +%global _package_note_linker gold +%endif # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
commit 6ce261182dce610b705de950809665a3a16245ed Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jan 21 09:52:45 2022 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.8.spec b/pypy3.8.spec index bbaba87..b92f8bb 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -2,7 +2,7 @@ %global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -872,6 +872,9 @@ CheckPyPy pypy3-c %changelog +* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.7-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+ * Sat Jan 08 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-2 - Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
commit 735b46af379d49ff93f3e12d0580bd3fa5c3664b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Jan 8 20:32:26 2022 +0100 Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
diff --git a/pypy3.8.spec b/pypy3.8.spec index 5a698ab..bbaba87 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -2,7 +2,7 @@ %global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT @@ -872,6 +872,9 @@ CheckPyPy pypy3-c %changelog +* Sat Jan 08 2022 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-2 +- Rebuilt for
https://fedoraproject.org/wiki/Changes/LIBFFI34
+ * Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 - Initial pypy3.8 package - Supplement tox commit 8e9e05932790eec6430420c03b6e344e6a35f457 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 19:42:12 2022 +0100 There are no "old" wheels present now diff --git a/pypy3.8.spec b/pypy3.8.spec index a36ea94..5a698ab 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -335,10 +335,6 @@ Header files for building C extension modules against PyPy%{pyversion}. %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl rmdir lib-python/3/ensurepip/_bundled -%else -# we don't want to ship the old ones anyway -rm lib-python/3/ensurepip/_bundled/pip-20.0* -rm lib-python/3/ensurepip/_bundled/setuptools-44* %endif commit d696dc3174c48be80d800216f1918c41320c6763 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 17:21:30 2022 +0100 Also conflict with previous main pypy3 diff --git a/pypy3.8.spec b/pypy3.8.spec index 469aa6f..a36ea94 100644 --- a/pypy3.8.spec +++ b/pypy3.8.spec @@ -245,7 +245,10 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} +# This is when pypy3 package was replaced: Obsoletes: pypy3 < 7.3.4-4 +# This is when pypy3 was provided by pypy3.7: +Conflicts: pypy3 < 7.3.7-1 %endif %description commit d56524c195d563134c417f66c129ce734ef6ed16 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Nov 11 11:43:54 2021 +0100 Update to Python 3.8 - sync patch 189 with the python3.8 package - remove ppc64 only patch, since it did not apply and we don't have ppc64 since F29
https://fedoraproject.org/wiki/Changes/DiscontinuePPC64
- supplement tox
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproj…
diff --git a/.gitignore b/.gitignore index b95796f..19134eb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /pypy3.7-v7.3.5-src.tar.bz2 /pypy3.7-v7.3.6-src.tar.bz2 /pypy3.7-v7.3.7-src.tar.bz2 +/pypy3.8-v7.3.7-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch deleted file mode 100644 index c0dd76b..0000000 --- a/011-no-faulthandler.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit ea4d6a12548eea7ce0424feea13a499fb7085e96 -Author: rpm-build <rpm-build> -Date: Wed Mar 29 04:31:55 2017 +0200 - - 011-no-faulthandler.patch - -diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py -index faa1ba7..2edadc9 100644 ---- a/lib-python/3/test/support/__init__.py -+++ b/lib-python/3/test/support/__init__.py -@@ -7,7 +7,6 @@ import collections.abc - import contextlib - import datetime - import errno --import faulthandler - import fnmatch - import functools - import gc -@@ -70,6 +69,11 @@ try: - except ImportError: - resource = None - -+try: -+ import faulthandler -+except ImportError: -+ faulthandler = None -+ - __all__ = [ - # globals - "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", -@@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): - finally: - started = [t for t in started if t.is_alive()] - if started: -- faulthandler.dump_traceback(sys.stdout) -+ if faulthandler is not None: -+ faulthandler.dump_traceback(sys.stdout) - raise AssertionError('Unable to join %d threads' % len(started)) - - @contextlib.contextmanager diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 8fd8a55..5b61035 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,21 +1,24 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 94d40b0..9135b80 100644 +index 597a1ef9ee..3bfab52083 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,3 +1,5 @@ +@@ -1,6 +1,7 @@ +import distutils.version +import glob import os import os.path - import pkgutil -@@ -9,9 +11,24 @@ import tempfile - __all__ = ["version", "bootstrap"] +-import pkgutil + import sys + import runpy + import tempfile +@@ -9,9 +10,24 @@ import subprocess + __all__ = ["version", "bootstrap"] --_SETUPTOOLS_VERSION = "47.1.0" +-_SETUPTOOLS_VERSION = "56.0.0" +_WHEEL_DIR = "/usr/share/python-wheels/" --_PIP_VERSION = "20.1.1" +-_PIP_VERSION = "21.1.1" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,7 +38,7 @@ index 94d40b0..9135b80 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION, "py3"), -@@ -103,13 +120,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -101,13 +117,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version, py_tag in _PROJECTS: @@ -50,6 +53,6 @@ index 94d40b0..9135b80 100644 + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) - + additional_paths.append(os.path.join(tmpdir, wheel_name)) - + diff --git a/pypy3.7.spec b/pypy3.8.spec similarity index 98% rename from pypy3.7.spec rename to pypy3.8.spec index e7b257d..469aa6f 100644 --- a/pypy3.7.spec +++ b/pypy3.8.spec @@ -1,5 +1,5 @@ %global basever 7.3 -%global pyversion 3.7 +%global pyversion 3.8 Name: pypy%{pyversion} Version: %{basever}.7 Release: 1%{?dist} @@ -127,7 +127,7 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal -%if 0%{?fedora} >= 35 +%if 0%{?fedora} >= 36 %bcond_without main_pypy3 %else %bcond_with main_pypy3 @@ -163,9 +163,6 @@ Patch7: 007-remove-startup-message.patch #
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
Patch9: 009-add-libxcrypt-support.patch -# It seems ppc64 has no faulthandler -Patch11: 011-no-faulthandler.patch - # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -283,8 +280,8 @@ Obsoletes: pypy3-libs < 7.3.4-4 Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 20.1.1 -Provides: bundled(python3dist(setuptools)) = 47.1.0 +Provides: bundled(python3dist(pip)) = 21.1.1 +Provides: bundled(python3dist(setuptools)) = 56.0.0 %endif # Provides for the bundled libmpdec @@ -319,6 +316,8 @@ Provides: pypy3-devel%{?_isa} = %{version}-%{release} Obsoletes: pypy3-devel < 7.3.4-4 %endif +Supplements: tox + %description devel Header files for building C extension modules against PyPy%{pyversion}. @@ -844,11 +843,11 @@ CheckPyPy pypy3-c %doc README.rst %dir %{pypyprefix} -%dir %{pypyprefix}/lib-python %license %{pypyprefix}/LICENSE -%{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib_pypy/ -%license %{pypyprefix}/lib_pypy/*/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/_cffi_ssl/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/cffi/_pycparser/ply/LICENSE +%license %{pypyprefix}/lib/pypy%{pyversion}/hpy.dist-info/LICENSE +%{pypyprefix}/lib/pypy%{pyversion}/ %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el @@ -866,6 +865,8 @@ CheckPyPy pypy3-c %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%dir %{pypy_include_dir}/pypy%{pyversion} +%{pypy_include_dir}/pypy%{pyversion}/*.h %if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 %endif @@ -873,8 +874,8 @@ CheckPyPy pypy3-c %changelog * Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 -- Update to 7.3.7 -- Fixes: rhbz#2003682 +- Initial pypy3.8 package +- Supplement tox * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 diff --git a/sources b/sources index ce1117b..d769b2c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.7-src.tar.bz2) = 99099f17682b606864753b76a6a0cdf860bc2bf79588ee53e7d0586d3f8f6ab6820240666bd3646ade6523dd5adc6999116d4db4285c688984dc33d4fa7743c6 +SHA512 (pypy3.8-v7.3.7-src.tar.bz2) = 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2 diff --git a/tests/tests.yml b/tests/tests.yml index 5242663..a8dc641 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3.7 VERSION=3.7 ./venv.sh + run: PYTHON=pypy3.8 VERSION=3.8 ./venv.sh required_packages: - gcc - python3-tox - - pypy3.7-devel + - pypy3.8-devel commit cde65b8b859a1112ae3413ea5b006086b303c39f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Jan 4 19:35:25 2022 +0100 Declare bundled hpy diff --git a/pypy3.7.spec b/pypy3.7.spec index 71f97b7..e7b257d 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -11,6 +11,7 @@ Summary: Python %{pyversion} implementation with a Just-In-Time compiler # Bundled pycparser is is BSD # Bundled pycparser.ply is BSD # Bundled bits from cryptography are ASL 2.0 or BSD +# Bundled hpy is MIT # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new @@ -301,6 +302,9 @@ Provides: bundled(python3dist(ply)) = 3.9 # Find the version in lib_pypy/_cffi_ssl/cryptography/__about__.py Provides: bundled(python3dist(cryptography)) = 2.7 +# Find the version in lib_pypy/hpy.dist-info/METADATA +Provides: bundled(python3dist(hpy)) = 0.0.3 + %description libs Libraries required by the various PyPy implementations of Python %{pyversion}. commit 19c06ca1e99eeca40b99a42867a43f3333512bd9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 10 12:14:57 2021 +0100 Include the Python version in the summary and description diff --git a/pypy3.7.spec b/pypy3.7.spec index 956b601..71f97b7 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -3,7 +3,7 @@ Name: pypy%{pyversion} Version: %{basever}.7 Release: 1%{?dist} -Summary: Python 3 implementation with a Just-In-Time compiler +Summary: Python %{pyversion} implementation with a Just-In-Time compiler # PyPy is MIT # Python standard library is Python @@ -251,9 +251,9 @@ Obsoletes: pypy3 < 7.3.4-4 %endif %description -PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU -architectures, and various optimized implementations of the standard types -(strings, dictionaries, etc) +PyPy's implementation of Python %{pyversion}, featuring a Just-In-Time compiler +on some CPU architectures, and various optimized implementations +of the standard types (strings, dictionaries, etc.). %if 0%{with_jit} This build of PyPy has JIT-compilation enabled. @@ -264,7 +264,7 @@ CPU architecture. %package libs -Summary: Run-time libraries used by PyPy implementations of Python 3 +Summary: Run-time libraries used by PyPy implementations of Python %{pyversion} # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) @@ -302,11 +302,11 @@ Provides: bundled(python3dist(ply)) = 3.9 Provides: bundled(python3dist(cryptography)) = 2.7 %description libs -Libraries required by the various PyPy implementations of Python 3. +Libraries required by the various PyPy implementations of Python %{pyversion}. %package devel -Summary: Development tools for working with PyPy3 +Summary: Development tools for working with PyPy%{pyversion} Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} %if %{with main_pypy3} @@ -316,7 +316,7 @@ Obsoletes: pypy3-devel < 7.3.4-4 %endif %description devel -Header files for building C extension modules against PyPy3 +Header files for building C extension modules against PyPy%{pyversion}. %prep commit 3af63e71e486829ccebd4062d5c740cb72445805 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Nov 11 11:28:41 2021 +0100 Update to 7.3.7 diff --git a/.gitignore b/.gitignore index 5f5c5c9..b95796f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /pypy3.7-v7.3.4-src.tar.bz2 /pypy3.7-v7.3.5-src.tar.bz2 /pypy3.7-v7.3.6-src.tar.bz2 +/pypy3.7-v7.3.7-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 7f6b535..956b601 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,7 +1,7 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.6 +Version: %{basever}.7 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler @@ -868,6 +868,10 @@ CheckPyPy pypy3-c %changelog +* Thu Nov 11 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.7-1 +- Update to 7.3.7 +- Fixes: rhbz#2003682 + * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 - Remove windows executable binaries diff --git a/sources b/sources index 240358d..ce1117b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.6-src.tar.bz2) = 3c484672c9ac278c6b07e5e9ca09b26afca1069241e89650c44325dde7b4484c117d8d78224b64760eb30b054f2c5349ce91685b69c7d86d293427059bb48814 +SHA512 (pypy3.7-v7.3.7-src.tar.bz2) = 99099f17682b606864753b76a6a0cdf860bc2bf79588ee53e7d0586d3f8f6ab6820240666bd3646ade6523dd5adc6999116d4db4285c688984dc33d4fa7743c6 commit 1ea6c65445b33803708d12de1a732a9b21252ce9 Author: Tomáš Hrnčiar <thrnciar(a)redhat.com> Date: Wed Oct 27 08:50:53 2021 +0200 Remove windows executable binaries diff --git a/pypy3.7.spec b/pypy3.7.spec index dc7f624..7f6b535 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -368,6 +368,9 @@ rm lib-python/3/idlelib/idle.bat ln -s lib_pypy/cffi/_pycparser pycparser %endif +# Remove windows executable binaries +rm lib-python/3/distutils/command/*.exe + %build %ifarch s390 s390x # pypy3 requires z10 at least @@ -867,6 +870,7 @@ CheckPyPy pypy3-c %changelog * Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 - Update to 7.3.6 +- Remove windows executable binaries - Fixes: rhbz#2003682 * Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 commit b6c45f14344f3fbfed87b37735317b1961ad0ee3 Author: Tomáš Hrnčiar <thrnciar(a)redhat.com> Date: Wed Oct 27 08:48:25 2021 +0200 Update to 7.3.6 diff --git a/.gitignore b/.gitignore index dc1ee9b..5f5c5c9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /pypy3.6-v7.3.1-src.tar.bz2 /pypy3.7-v7.3.4-src.tar.bz2 /pypy3.7-v7.3.5-src.tar.bz2 +/pypy3.7-v7.3.6-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 460bfcf..dc7f624 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.5 -Release: 2%{?dist} +Version: %{basever}.6 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,10 @@ CheckPyPy pypy3-c %changelog +* Tue Oct 26 2021 Tomáš Hrnčiar <thrnciar(a)redhat.com> - 7.3.6-1 +- Update to 7.3.6 +- Fixes: rhbz#2003682 + * Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 - Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 diff --git a/sources b/sources index 9b40959..240358d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.5-src.tar.bz2) = 253d2efc81d55fb392ab810741e3a633f664e1908b2c26db7a8830c971655cca6be1b8d34581d13aa2d738a4a4c8ba23c2c90333b6e03d4608372e8013ea723b +SHA512 (pypy3.7-v7.3.6-src.tar.bz2) = 3c484672c9ac278c6b07e5e9ca09b26afca1069241e89650c44325dde7b4484c117d8d78224b64760eb30b054f2c5349ce91685b69c7d86d293427059bb48814 commit 90c4be783ba4a948b5617a2cd6188cdd23cd1479 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Sep 20 14:42:23 2021 +0200 Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 diff --git a/pypy3.7.spec b/pypy3.7.spec index 38872c8..460bfcf 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -204,7 +204,7 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl-devel +BuildRequires: openssl1.1-devel BuildRequires: gdbm-devel BuildRequires: xz-devel @@ -865,8 +865,8 @@ CheckPyPy pypy3-c %changelog -* Tue Sep 14 2021 Sahana Prasad <sahana(a)redhat.com> - 7.3.5-2 -- Rebuilt with OpenSSL 3.0.0 +* Mon Sep 20 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-2 +- Explicitly buildrequire OpenSSL 1.1, as Python 3.7 is not compatible with OpenSSL 3.0 * Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 - Update to 7.3.5 commit 49e2552d6fbebc8d09339fc439a8aa443e5aa690 Author: Sahana Prasad <sahana(a)redhat.com> Date: Tue Sep 14 19:12:24 2021 +0200 Rebuilt with OpenSSL 3.0.0 diff --git a/pypy3.7.spec b/pypy3.7.spec index af43aed..38872c8 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -2,7 +2,7 @@ %global pyversion 3.7 Name: pypy%{pyversion} Version: %{basever}.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,9 @@ CheckPyPy pypy3-c %changelog +* Tue Sep 14 2021 Sahana Prasad <sahana(a)redhat.com> - 7.3.5-2 +- Rebuilt with OpenSSL 3.0.0 + * Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 - Update to 7.3.5 - Fixes: rhbz#1992600 commit 83ef54a660af6c9e84e78ebc1f188784cda7ddc6 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Aug 16 18:13:20 2021 +0200 Update to 7.3.5 diff --git a/.gitignore b/.gitignore index c4b4267..dc1ee9b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /pypy3.6-v7.3.0-src.tar.bz2 /pypy3.6-v7.3.1-src.tar.bz2 /pypy3.7-v7.3.4-src.tar.bz2 +/pypy3.7-v7.3.5-src.tar.bz2 diff --git a/pypy3.7.spec b/pypy3.7.spec index 33e04c9..af43aed 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 %global pyversion 3.7 Name: pypy%{pyversion} -Version: %{basever}.4 -Release: 4%{?dist} +Version: %{basever}.5 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -865,6 +865,10 @@ CheckPyPy pypy3-c %changelog +* Mon Aug 16 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.5-1 +- Update to 7.3.5 +- Fixes: rhbz#1992600 + * Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 - Rename pypy3 to pypy3.7 - pypy-stackless was removed diff --git a/sources b/sources index 60e1bdc..9b40959 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.7-v7.3.4-src.tar.bz2) = c570d34f284f41dcd8dd909216c69831dd83b8501423c7635a4fe506fb16fd3705cf87975a664735e52d0b805a0432267d611a993437d17aac3defe4b9ea4401 +SHA512 (pypy3.7-v7.3.5-src.tar.bz2) = 253d2efc81d55fb392ab810741e3a633f664e1908b2c26db7a8830c971655cca6be1b8d34581d13aa2d738a4a4c8ba23c2c90333b6e03d4608372e8013ea723b commit 27985bbcb8631a6af65c76bde080577242960df5 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Tue Aug 10 13:38:40 2021 +0200 Add bcond main_pypy3 to differentiate whether package is main pypy package or not diff --git a/pypy3.7.spec b/pypy3.7.spec index a660404..33e04c9 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -126,6 +126,12 @@ URL:
http://pypy.org/
# We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal +%if 0%{?fedora} >= 35 +%bcond_without main_pypy3 +%else +%bcond_with main_pypy3 +%endif + # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
@@ -237,10 +243,12 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%if %{with main_pypy3} Provides: %{name}(abi) = %{basever} Provides: pypy3 = %{version}-%{release} Provides: pypy3%{?_isa} = %{version}-%{release} Obsoletes: pypy3 < 7.3.4-4 +%endif %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -264,9 +272,11 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +%if %{with main_pypy3} Provides: pypy3-libs = %{version}-%{release} Provides: pypy3-libs%{?_isa} = %{version}-%{release} Obsoletes: pypy3-libs < 7.3.4-4 +%endif %if %{with rpmwheels} Requires: python-setuptools-wheel @@ -299,9 +309,11 @@ Libraries required by the various PyPy implementations of Python 3. Summary: Development tools for working with PyPy3 Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} +%if %{with main_pypy3} Provides: pypy3-devel = %{version}-%{release} Provides: pypy3-devel%{?_isa} = %{version}-%{release} Obsoletes: pypy3-devel < 7.3.4-4 +%endif %description devel Header files for building C extension modules against PyPy3 @@ -537,7 +549,9 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} +%if %{with main_pypy3} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 +%endif # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -662,12 +676,14 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif +%if %{with main_pypy3} # Install macros for rpm: install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} +%endif # Remove files we don't want: rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ @@ -828,8 +844,8 @@ CheckPyPy pypy3-c %license %{pypyprefix}/lib_pypy/*/LICENSE %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypy3trace-mode.el -%{_emacs_sitelispdir}/pypy3trace-mode.elc +%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.el +%{_emacs_sitelispdir}/pypy%{pyversion}trace-mode.elc %endif %files commit 86f73ef2399e7e79e12a312bc017a25e51d949df Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Aug 9 12:52:43 2021 +0200 Removes pypy-stackless as it is not needed anymore diff --git a/pypy3.7.spec b/pypy3.7.spec index 9133480..a660404 100644 --- a/pypy3.7.spec +++ b/pypy3.7.spec @@ -78,19 +78,6 @@ URL:
http://pypy.org/
# [Timer] compile_c --- 273.9 s # [Timer] =========================================== # [Timer] Total: --- 3572.0 s -# -# -# A build of pypy-stackless on i686 took about 87 mins: -# [Timer] Timings: -# [Timer] annotate --- 584.2 s -# [Timer] rtype_lltype --- 777.3 s -# [Timer] backendopt_lltype --- 365.9 s -# [Timer] stackcheckinsertion_lltype --- 39.3 s -# [Timer] database_c --- 1089.6 s -# [Timer] source_c --- 1868.6 s -# [Timer] compile_c --- 490.4 s -# [Timer] =========================================== -# [Timer] Total: --- 5215.3 s # We will build a "pypy" binary. @@ -116,9 +103,6 @@ URL:
http://pypy.org/
%global with_jit 0 %endif -# Should we build a "pypy-stackless" binary? -%global with_stackless 0 - # Should we build the emacs JIT-viewing mode? %if 0%{?rhel} == 6 %global with_emacs 0 @@ -323,19 +307,6 @@ Obsoletes: pypy3-devel < 7.3.4-4 Header files for building C extension modules against PyPy3 -%if 0%{with_stackless} -%package stackless -Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs%{?_isa} = %{version}-%{release} - -Provides: pypy3-stackless = %{version}-%{release} -Provides: pypy3-stackless%{?_isa} = %{version}-%{release} -Obsoletes: pypy3-stackless < 7.3.4-4 - -%description stackless -Build of PyPy3 with support for micro-threads for massive concurrency -%endif - %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git @@ -522,12 +493,6 @@ BuildPyPy \ %endif %{nil} -%if 0%{with_stackless} -BuildPyPy \ - pypy3-stackless \ - "--stackless" -%endif - %if %{with_emacs} %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif @@ -845,11 +810,6 @@ CheckPyPy() { %if %{run_selftests} CheckPyPy pypy3-c - -%if 0%{with_stackless} -CheckPyPy pypy3-stackless -%endif - %endif # run_selftests # Because there's a bunch of binary subpackages and creating @@ -887,12 +847,6 @@ CheckPyPy pypy3-stackless %{_rpmconfigdir}/macros.d/macros.pypy3 %endif -%if 0%{with_stackless} -%files stackless -%doc README.rst -%{_bindir}/pypy-stackless -%endif - %changelog * Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 commit b8466c1e8afa8093205b6100a27540f753b5c9d9 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Aug 9 12:45:19 2021 +0200 Rename pypy3 to pypy3.7 diff --git a/pypy3.spec b/pypy3.7.spec similarity index 97% rename from pypy3.spec rename to pypy3.7.spec index 2bd5917..9133480 100644 --- a/pypy3.spec +++ b/pypy3.7.spec @@ -1,8 +1,8 @@ %global basever 7.3 -Name: pypy3 -Version: %{basever}.4 %global pyversion 3.7 -Release: 3%{?dist} +Name: pypy%{pyversion} +Version: %{basever}.4 +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -136,7 +136,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{basever} +%global pypyprefix %{_libdir}/pypy%{pyversion} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -254,8 +254,9 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} -Provides: pypy%{pyversion} = %{version}-%{release} -Provides: pypy%{pyversion}%{?_isa} = %{version}-%{release} +Provides: pypy3 = %{version}-%{release} +Provides: pypy3%{?_isa} = %{version}-%{release} +Obsoletes: pypy3 < 7.3.4-4 %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -279,8 +280,9 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif -Provides: pypy%{pyversion}-libs = %{version}-%{release} -Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} +Provides: pypy3-libs = %{version}-%{release} +Provides: pypy3-libs%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-libs < 7.3.4-4 %if %{with rpmwheels} Requires: python-setuptools-wheel @@ -311,10 +313,11 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Summary: Development tools for working with PyPy3 -Requires: pypy3%{?_isa} = %{version}-%{release} +Requires: pypy%{pyversion}%{?_isa} = %{version}-%{release} -Provides: pypy%{pyversion}-devel = %{version}-%{release} -Provides: pypy%{pyversion}-devel%{?_isa} = %{version}-%{release} +Provides: pypy3-devel = %{version}-%{release} +Provides: pypy3-devel%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-devel < 7.3.4-4 %description devel Header files for building C extension modules against PyPy3 @@ -325,8 +328,9 @@ Header files for building C extension modules against PyPy3 Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} -Provides: pypy%{pyversion}-stackless = %{version}-%{release} -Provides: pypy%{pyversion}-stackless%{?_isa} = %{version}-%{release} +Provides: pypy3-stackless = %{version}-%{release} +Provides: pypy3-stackless%{?_isa} = %{version}-%{release} +Obsoletes: pypy3-stackless < 7.3.4-4 %description stackless Build of PyPy3 with support for micro-threads for massive concurrency @@ -534,8 +538,8 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -# Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies +# Run installing script, archive-name pypy%{pyversion} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name pypy%{pyversion} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies # Remove shebang lines from .py files that aren't executable, and @@ -701,7 +705,7 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ +rm -f %{buildroot}%{_libdir}/%{name}.tar.bz2 \ %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now @@ -840,10 +844,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy %{name}-c +CheckPyPy pypy3-c %if 0%{with_stackless} -CheckPyPy %{name}-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -870,16 +874,18 @@ CheckPyPy %{name}-stackless %files %doc README.rst +%if %{with main_pypy3} %{_bindir}/pypy3 +%endif %{_bindir}/pypy%{pyversion} %{pypyprefix}/bin/ -%exclude %{_libdir}/%{name}-%{version}.tar.bz2 - %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%if %{with main_pypy3} %{_rpmconfigdir}/macros.d/macros.pypy3 +%endif %if 0%{with_stackless} %files stackless @@ -889,6 +895,10 @@ CheckPyPy %{name}-stackless %changelog +* Mon Aug 09 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-4 +- Rename pypy3 to pypy3.7 +- pypy-stackless was removed + * Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.4-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
diff --git a/tests/tests.yml b/tests/tests.yml index 827cb90..5242663 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,8 +10,8 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.7 ./venv.sh + run: PYTHON=pypy3.7 VERSION=3.7 ./venv.sh required_packages: - gcc - python3-tox - - pypy3-devel + - pypy3.7-devel commit 716f2f638d30f78656b784f42dd633aac492804e Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 23 04:30:08 2021 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 3b11f44..2bd5917 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.4 %global pyversion 3.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -889,6 +889,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.4-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+ * Wed Jul 21 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-2 - Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros - Fixes: rhbz#1976656 commit e90c1b5d85ebcaed6e89cf8bf6b2327210769370 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Wed Jul 21 16:19:29 2021 +0200 Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros diff --git a/pypy3.spec b/pypy3.spec index 025102c..3b11f44 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.4 %global pyversion 3.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -143,10 +143,6 @@ URL:
http://pypy.org/
%global goal_dir pypy/goal -# Turn off the brp-python-bytecompile postprocessing script -# We manually invoke it later on, using the freshly built pypy binary -%global __brp_python_bytecompile %{nil} - # Source and patches: Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
@@ -221,6 +217,9 @@ BuildRequires: expat-devel BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel + +BuildRequires: python-rpm-macros + %ifnarch s390 BuildRequires: valgrind-devel %endif @@ -617,19 +616,12 @@ ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # Bytecompile all of the .py files we ship, using our pypy binary, giving us -# .pyc files for pypy. The script actually does the work twice (passing in -O -# the second time) but it's simplest to reuse that script. -# -# The script has special-casing for .py files below -# /usr/lib{64}/python[0-9].[0-9] -# but given that we're installing into a different path, the supplied "default" -# implementation gets used instead. +# .pyc files for pypy. # # Note that some of the test files deliberately contain syntax errors, so -# we pass 0 for the second argument ("errors_terminate"): -/usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}%{pypyprefix}/bin/pypy3 \ - 0 +# we are running it in subshell, to be able to ignore the failures and not to terminate the build. +(%{py_byte_compile %{buildroot}%{pypyprefix}/bin/pypy3 %{buildroot}%{pypyprefix}}) || : + %{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' %{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' @@ -897,6 +889,10 @@ CheckPyPy %{name}-stackless %changelog +* Wed Jul 21 2021 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.4-2 +- Replace removed /usr/lib/rpm/brp-python-bytecompile with %%py_byte_compile macros +- Fixes: rhbz#1976656 + * Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.4-1 - Update to 7.3.4 - pypy3 is now Python 3.7 commit f24f8ff0ada28610e3a6801d602c3effea640fe5 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 21 01:35:55 2021 +0200 Update to 7.3.4, PyPy3.7 diff --git a/.gitignore b/.gitignore index 849f483..c4b4267 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /pypy3.6-v7.2.0-src.tar.bz2 /pypy3.6-v7.3.0-src.tar.bz2 /pypy3.6-v7.3.1-src.tar.bz2 +/pypy3.7-v7.3.4-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index e093956..c0dd76b 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -30,7 +30,7 @@ index faa1ba7..2edadc9 100644 "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", @@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): finally: - started = [t for t in started if t.isAlive()] + started = [t for t in started if t.is_alive()] if started: - faulthandler.dump_traceback(sys.stdout) + if faulthandler is not None: diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 0032ba9..8fd8a55 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,25 +1,21 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 6b35b3d..97fc83b 100644 +index 94d40b0..9135b80 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,16 +1,34 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path import pkgutil - import sys -+import runpy - import tempfile - - +@@ -9,9 +11,24 @@ import tempfile __all__ = ["version", "bootstrap"] - - --_SETUPTOOLS_VERSION = "44.0.0" + + +-_SETUPTOOLS_VERSION = "47.1.0" +_WHEEL_DIR = "/usr/share/python-wheels/" - --_PIP_VERSION = "20.0.2" + +-_PIP_VERSION = "20.1.1" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -36,36 +32,14 @@ index 6b35b3d..97fc83b 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - + _PROJECTS = [ - ("setuptools", _SETUPTOOLS_VERSION), -@@ -23,10 +41,18 @@ def _run_pip(args, additional_paths=None): - if additional_paths is not None: - sys.path = additional_paths + sys.path - -- # Install the bundled software -- import pip._internal.cli.main -- return pip._internal.cli.main.main(args) -+ # Invoke pip as if it's the main module, and catch the exit. -+ backup_argv = sys.argv[:] -+ sys.argv[1:] = args -+ try: -+ # run_module() alters sys.modules and sys.argv, but restores them at exit -+ runpy.run_module("pip", run_name="__main__", alter_sys=True) -+ except SystemExit as exc: -+ return exc.code -+ finally: -+ sys.argv[:] = backup_argv - -+ raise SystemError("pip did not exit, this should never happen") - - def version(): - """ -@@ -93,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + ("setuptools", _SETUPTOOLS_VERSION, "py3"), +@@ -103,13 +120,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] - for project, version in _PROJECTS: -- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) + for project, version, py_tag in _PROJECTS: +- wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) - whl = pkgutil.get_data( - "ensurepip", - "_bundled/{}".format(wheel_name), diff --git a/pypy3.spec b/pypy3.spec index 7b4d004..025102c 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ %global basever 7.3 Name: pypy3 -Version: %{basever}.1 -%global pyversion 3.6 -Release: 6%{?dist} +Version: %{basever}.4 +%global pyversion 3.7 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -25,7 +25,9 @@ URL:
http://pypy.org/
# with the packaged version. # The version information can be found at lib_pypy/_libmpdec/mpdecimal.h # defined as MPD_VERSION. -%global libmpdec_version 2.4.1 +# See
https://foss.heptapod.net/pypy/pypy/-/issues/3024
+# With PyPy 7.3.4, the decimal module is not compiled +#%%global libmpdec_version 2.4.1 # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise @@ -146,7 +148,7 @@ URL:
http://pypy.org/
%global __brp_python_bytecompile %{nil} # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
+Source0:
https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -285,13 +287,15 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 20.0.2 -Provides: bundled(python3dist(setuptools)) = 44.0.0 +Provides: bundled(python3dist(pip)) = 20.1.1 +Provides: bundled(python3dist(setuptools)) = 47.1.0 %endif # Provides for the bundled libmpdec +%{?libmpdec_version: Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} +} # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.20 @@ -341,8 +345,8 @@ rm lib-python/3/ensurepip/_bundled/*.whl rmdir lib-python/3/ensurepip/_bundled %else # we don't want to ship the old ones anyway -rm lib-python/3/ensurepip/_bundled/pip-8.1.2-* -rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-* +rm lib-python/3/ensurepip/_bundled/pip-20.0* +rm lib-python/3/ensurepip/_bundled/setuptools-44* %endif @@ -532,7 +536,7 @@ mkdir -p %{buildroot}/%{pypyprefix} # Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies # Remove shebang lines from .py files that aren't executable, and @@ -564,7 +568,6 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # approach is to postprocess the ELF file: execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 -ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 @@ -720,11 +723,12 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check +%{?libmpdec_version: # Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual # provides for in the SPEC. test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ "%{libmpdec_version}" - +} topdir=$(pwd) @@ -893,6 +897,11 @@ CheckPyPy %{name}-stackless %changelog +* Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.4-1 +- Update to 7.3.4 +- pypy3 is now Python 3.7 +- Fixes rhbz#1961933 + * Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.1-6 - Provide missing bundled library information diff --git a/sources b/sources index 0b7b357..60e1bdc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 +SHA512 (pypy3.7-v7.3.4-src.tar.bz2) = c570d34f284f41dcd8dd909216c69831dd83b8501423c7635a4fe506fb16fd3705cf87975a664735e52d0b805a0432267d611a993437d17aac3defe4b9ea4401 diff --git a/tests/tests.yml b/tests/tests.yml index c3a91f3..827cb90 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.6 ./venv.sh + run: PYTHON=pypy3 VERSION=3.7 ./venv.sh required_packages: - gcc - python3-tox commit f592f0db6a04e430152a0909b3471683c0c95849 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue May 25 22:05:10 2021 +0200 Provide missing bundled library information diff --git a/pypy3.spec b/pypy3.spec index 2184360..7b4d004 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,14 +2,20 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler +# PyPy is MIT +# Python standard library is Python +# pypy/module/unicodedata is UCD +# Bundled pycparser is is BSD +# Bundled pycparser.ply is BSD +# Bundled bits from cryptography are ASL 2.0 or BSD # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new # licensing terms -License: MIT and Python and UCD +License: MIT and Python and UCD and BSD and (ASL 2.0 or BSD) URL:
http://pypy.org/
# High-level configuration of the build: @@ -279,14 +285,23 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 20.0.2 -Provides: bundled(python3-setuptools) = 44.0.0 +Provides: bundled(python3dist(pip)) = 20.0.2 +Provides: bundled(python3dist(setuptools)) = 44.0.0 %endif # Provides for the bundled libmpdec Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} +# Find the version in lib_pypy/cffi/_pycparser/__init__.py +Provides: bundled(python3dist(pycparser)) = 2.20 + +# Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py +Provides: bundled(python3dist(ply)) = 3.9 + +# Find the version in lib_pypy/_cffi_ssl/cryptography/__about__.py +Provides: bundled(python3dist(cryptography)) = 2.7 + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -878,6 +893,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue May 25 2021 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.1-6 +- Provide missing bundled library information + * Wed May 19 2021 Charalampos Stratakis <cstratak(a)redhat.com> - 7.3.1-5 - Add virtual provides for the bundled libmpdec (rhbz#1943359) commit a45f4e982edfb10e5ec9dae376ba282d6030e88e Author: Charalampos Stratakis <cstratak(a)redhat.com> Date: Thu May 20 00:10:33 2021 +0200 Add virtual provides for the bundled libmpdec (rhbz#1943359) diff --git a/pypy3.spec b/pypy3.spec index 57590db..2184360 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -14,6 +14,13 @@ URL:
http://pypy.org/
# High-level configuration of the build: +# libmpdec (mpdecimal package in Fedora) is tightly coupled with the +# decimal module. We keep it bundled as to avoid incompatibilities +# with the packaged version. +# The version information can be found at lib_pypy/_libmpdec/mpdecimal.h +# defined as MPD_VERSION. +%global libmpdec_version 2.4.1 + # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels @@ -276,6 +283,10 @@ Provides: bundled(python3-pip) = 20.0.2 Provides: bundled(python3-setuptools) = 44.0.0 %endif +# Provides for the bundled libmpdec +Provides: bundled(mpdecimal) = %{libmpdec_version} +Provides: bundled(libmpdec) = %{libmpdec_version} + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -693,6 +704,13 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check + +# Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual +# provides for in the SPEC. +test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ + "%{libmpdec_version}" + + topdir=$(pwd) SkipTest() { @@ -860,6 +878,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed May 19 2021 Charalampos Stratakis <cstratak(a)redhat.com> - 7.3.1-5 +- Add virtual provides for the bundled libmpdec (rhbz#1943359) + * Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
commit 10fe1a9ce92d4e78add6f3b961d0600a9e72fe51 Author: Charalampos Stratakis <cstratak(a)redhat.com> Date: Thu May 20 00:09:06 2021 +0200 Temporary workaround for missing %apply_patch in RPM 4.17 alpha diff --git a/pypy3.spec b/pypy3.spec index 79848ea..57590db 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -306,6 +306,8 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +# Temporary workaround for
https://bugzilla.redhat.com/show_bug.cgi?id=1954999
+%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}} %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} commit 7e40fae162577d96896fe74dc35072e5ee3e8ea3 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Wed Jan 27 08:56:57 2021 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index fd45393..79848ea 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+ * Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-3 - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
commit 2db1dabba5dce3ef2b86a0432eb42488e0be3bda Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Aug 1 07:17:17 2020 +0000 - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index ad7423f..fd45393 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,10 @@ CheckPyPy %{name}-stackless %changelog +* Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-3 +- Second attempt - Rebuilt for +
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ * Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
commit a68c6873ebaceff0dbddeec347b44f1ea70df1f7 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Tue Jul 28 23:22:44 2020 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index ebca79e..ad7423f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.1-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ * Wed Apr 15 2020 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.1-1 - Update to 7.3.1 commit 598f61d5f284c0a353b971350aedf5dd710ddf50 Author: Tomas Hrnciar <thrnciar(a)redhat.com> Date: Mon Apr 20 13:08:30 2020 +0200 Update to 7.3.1 diff --git a/.gitignore b/.gitignore index 9058264..849f483 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /pypy3.6-v7.1.1-src.tar.bz2 /pypy3.6-v7.2.0-src.tar.bz2 /pypy3.6-v7.3.0-src.tar.bz2 +/pypy3.6-v7.3.1-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index c84b0cb..0032ba9 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,24 +1,25 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 7a0d3ee..2c9d676 100644 +index 6b35b3d..97fc83b 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,6 +1,7 @@ +@@ -1,16 +1,34 @@ +import distutils.version +import glob import os import os.path --import pkgutil + import pkgutil import sys ++import runpy import tempfile - -@@ -8,9 +9,24 @@ import tempfile + + __all__ = ["version", "bootstrap"] - - --_SETUPTOOLS_VERSION = "41.2.0" + + +-_SETUPTOOLS_VERSION = "44.0.0" +_WHEEL_DIR = "/usr/share/python-wheels/" - --_PIP_VERSION = "19.2.3" + +-_PIP_VERSION = "20.0.2" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -35,10 +36,32 @@ index 7a0d3ee..2c9d676 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - + _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -93,13 +109,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -23,10 +41,18 @@ def _run_pip(args, additional_paths=None): + if additional_paths is not None: + sys.path = additional_paths + sys.path + +- # Install the bundled software +- import pip._internal.cli.main +- return pip._internal.cli.main.main(args) ++ # Invoke pip as if it's the main module, and catch the exit. ++ backup_argv = sys.argv[:] ++ sys.argv[1:] = args ++ try: ++ # run_module() alters sys.modules and sys.argv, but restores them at exit ++ runpy.run_module("pip", run_name="__main__", alter_sys=True) ++ except SystemExit as exc: ++ return exc.code ++ finally: ++ sys.argv[:] = backup_argv + ++ raise SystemError("pip did not exit, this should never happen") + + def version(): + """ +@@ -93,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] for project, version in _PROJECTS: @@ -53,6 +76,6 @@ index 7a0d3ee..2c9d676 100644 + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) - + additional_paths.append(os.path.join(tmpdir, wheel_name)) - + diff --git a/pypy3.spec b/pypy3.spec index 63edae4..ebca79e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ %global basever 7.3 Name: pypy3 -Version: %{basever}.0 +Version: %{basever}.1 %global pyversion 3.6 -Release: 3%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -14,11 +14,6 @@ URL:
http://pypy.org/
# High-level configuration of the build: -# Build with -fcommon -#
https://bugzilla.redhat.com/show_bug.cgi?id=1796821
-#
https://bitbucket.org/pypy/pypy/issues/3163
-%define _legacy_common_support 1 - # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels @@ -277,8 +272,8 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3-pip) = 9.0.1 -Provides: bundled(python3-setuptools) = 28.8.0 +Provides: bundled(python3-pip) = 20.0.2 +Provides: bundled(python3-setuptools) = 44.0.0 %endif %description libs @@ -863,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 15 2020 Tomas Hrnciar <thrnciar(a)redhat.com> - 7.3.1-1 +- Update to 7.3.1 + * Wed Feb 12 2020 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-3 - Update the ensurepip module to work with setuptools >= 45 diff --git a/sources b/sources index 2bd7601..0b7b357 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.3.0-src.tar.bz2) = 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 +SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 commit 2032d986801b3a542282dd6341b01ce5cfe7e347 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 12 13:30:25 2020 +0100 Update the ensurepip module to work with setuptools >= 45 setuptools 45.x is Python 3 only and changed the name of the wheel diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 9441309..c84b0cb 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,8 +1,8 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 9f5d151..8b81155 100644 +index 7a0d3ee..2c9d676 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,16 +1,27 @@ +@@ -1,6 +1,7 @@ +import distutils.version +import glob import os @@ -11,20 +11,25 @@ index 9f5d151..8b81155 100644 import sys import tempfile - +@@ -8,9 +9,24 @@ import tempfile __all__ = ["version", "bootstrap"] -+_WHEEL_DIR = "/usr/share/python-wheels/" -_SETUPTOOLS_VERSION = "41.2.0" ++_WHEEL_DIR = "/usr/share/python-wheels/" -_PIP_VERSION = "19.2.3" ++_wheels = {} ++ +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) -+ suffix = "-py2.py3-none-any.whl" -+ pattern = "{}*{}".format(prefix, suffix) -+ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern)) -+ return str(max(versions, key=distutils.version.LooseVersion)) ++ _wheels[pkg] = {} ++ for suffix in "-py2.py3-none-any.whl", "-py3-none-any.whl": ++ pattern = "{}*{}".format(prefix, suffix) ++ for path in glob.glob(pattern): ++ version_str = path[len(prefix):-len(suffix)] ++ _wheels[pkg][version_str] = os.path.basename(path) ++ return str(max(_wheels[pkg], key=distutils.version.LooseVersion)) + + +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") @@ -33,16 +38,18 @@ index 9f5d151..8b81155 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, +@@ -93,13 +109,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, + # additional paths that need added to sys.path additional_paths = [] for project, version in _PROJECTS: - wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) +- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) - whl = pkgutil.get_data( - "ensurepip", - "_bundled/{}".format(wheel_name), - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) ++ wheel_name = _wheels[project][version] + with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: + with open(os.path.join(tmpdir, wheel_name), "wb") as fp: + fp.write(sfp.read()) diff --git a/pypy3.spec b/pypy3.spec index e17f3a4..63edae4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -863,6 +863,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Feb 12 2020 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-3 +- Update the ensurepip module to work with setuptools >= 45 + * Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
commit 64a5625b90ea9129c1a509ef184c67c97b5699ae Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Feb 12 20:01:06 2020 +0100 Build with -fcommon diff --git a/pypy3.spec b/pypy3.spec index a30e912..e17f3a4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -14,6 +14,11 @@ URL:
http://pypy.org/
# High-level configuration of the build: +# Build with -fcommon +#
https://bugzilla.redhat.com/show_bug.cgi?id=1796821
+#
https://bitbucket.org/pypy/pypy/issues/3163
+%define _legacy_common_support 1 + # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels commit 1dceae177ceb5daa5cfc82db2a6afa9a3d3b37d2 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Jan 30 10:15:13 2020 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 7257616..a30e912 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -858,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.3.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+ * Sat Dec 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-1 - Update to 7.3.0 commit 41c6994849a04d82eb969a306751bf35afe90735 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Dec 28 11:22:21 2019 +0100 Update to 7.3.0 diff --git a/.gitignore b/.gitignore index 4b53676..9058264 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /pypy3.5-v7.0.0-src.tar.bz2 /pypy3.6-v7.1.1-src.tar.bz2 /pypy3.6-v7.2.0-src.tar.bz2 +/pypy3.6-v7.3.0-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 4a62d57..9441309 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -16,9 +16,9 @@ index 9f5d151..8b81155 100644 +_WHEEL_DIR = "/usr/share/python-wheels/" --_SETUPTOOLS_VERSION = "40.6.2" +-_SETUPTOOLS_VERSION = "41.2.0" --_PIP_VERSION = "18.1" +-_PIP_VERSION = "19.2.3" +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) + suffix = "-py2.py3-none-any.whl" diff --git a/d81c769a235307f6671a8fa916f48d6896cbb823.patch b/d81c769a235307f6671a8fa916f48d6896cbb823.patch deleted file mode 100644 index 8debd29..0000000 --- a/d81c769a235307f6671a8fa916f48d6896cbb823.patch +++ /dev/null @@ -1,49 +0,0 @@ -# HG changeset patch -# User Armin Rigo <arigo(a)tunes.org> -# Date 1571380165 -7200 -# Node ID d81c769a235307f6671a8fa916f48d6896cbb823 -# Parent f27546b858f97bfa286a891e1474579759028784 -Arguably, clarify the logic. The real motivation is a gcc bug, see issue #3086 - -diff --git a/rpython/jit/backend/aarch64/opassembler.py b/rpython/jit/backend/aarch64/opassembler.py ---- a/rpython/jit/backend/aarch64/opassembler.py -+++ b/rpython/jit/backend/aarch64/opassembler.py -@@ -808,9 +808,7 @@ - # Inline a series of STR operations, starting at 'dstaddr_loc'. - # - self.mc.gen_load_int(r.ip0.value, 0) -- i = 0 -- adjustment = 0 -- needs_adjustment = itemsize < 8 and (startbyte % 8) -+ i = dst_i = 0 - total_size = size_box.getint() - while i < total_size: - sz = itemsize -@@ -818,19 +816,19 @@ - next_group += 8 - if next_group <= total_size: - sz = 8 -+ if dst_i % 8: # unaligned? -+ self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, dst_i) -+ dst_i = 0 - if sz == 8: -- if needs_adjustment: -- self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, i) -- adjustment = -i -- needs_adjustment = False -- self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, dst_i) - elif sz == 4: -- self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, dst_i) - elif sz == 2: -- self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, dst_i) - else: -- self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) -+ self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, dst_i) - i += sz -+ dst_i += sz - - else: - if isinstance(size_box, ConstInt): diff --git a/pypy3.spec b/pypy3.spec index 785179e..7257616 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.2 +%global basever 7.3 Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -164,9 +164,6 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch -#
https://bitbucket.org/pypy/pypy/issues/3086
-Patch12: d81c769a235307f6671a8fa916f48d6896cbb823.patch - # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -861,6 +858,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Dec 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.3.0-1 +- Update to 7.3.0 + * Wed Oct 23 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-2 - Enable JIT on aarch64 diff --git a/sources b/sources index 25bbbb3..2bd7601 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.2.0-src.tar.bz2) = bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc +SHA512 (pypy3.6-v7.3.0-src.tar.bz2) = 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435 commit 5aa1d86125bbb751ef5edc25907f659c20d31797 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Oct 23 17:03:00 2019 +0200 Enable JIT on aarch64, add upstream workaround diff --git a/d81c769a235307f6671a8fa916f48d6896cbb823.patch b/d81c769a235307f6671a8fa916f48d6896cbb823.patch new file mode 100644 index 0000000..8debd29 --- /dev/null +++ b/d81c769a235307f6671a8fa916f48d6896cbb823.patch @@ -0,0 +1,49 @@ +# HG changeset patch +# User Armin Rigo <arigo(a)tunes.org> +# Date 1571380165 -7200 +# Node ID d81c769a235307f6671a8fa916f48d6896cbb823 +# Parent f27546b858f97bfa286a891e1474579759028784 +Arguably, clarify the logic. The real motivation is a gcc bug, see issue #3086 + +diff --git a/rpython/jit/backend/aarch64/opassembler.py b/rpython/jit/backend/aarch64/opassembler.py +--- a/rpython/jit/backend/aarch64/opassembler.py ++++ b/rpython/jit/backend/aarch64/opassembler.py +@@ -808,9 +808,7 @@ + # Inline a series of STR operations, starting at 'dstaddr_loc'. + # + self.mc.gen_load_int(r.ip0.value, 0) +- i = 0 +- adjustment = 0 +- needs_adjustment = itemsize < 8 and (startbyte % 8) ++ i = dst_i = 0 + total_size = size_box.getint() + while i < total_size: + sz = itemsize +@@ -818,19 +816,19 @@ + next_group += 8 + if next_group <= total_size: + sz = 8 ++ if dst_i % 8: # unaligned? ++ self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, dst_i) ++ dst_i = 0 + if sz == 8: +- if needs_adjustment: +- self.mc.ADD_ri(dstaddr_loc.value, dstaddr_loc.value, i) +- adjustment = -i +- needs_adjustment = False +- self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STR_ri(r.ip0.value, dstaddr_loc.value, dst_i) + elif sz == 4: +- self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRW_ri(r.ip0.value, dstaddr_loc.value, dst_i) + elif sz == 2: +- self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRH_ri(r.ip0.value, dstaddr_loc.value, dst_i) + else: +- self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, i + adjustment) ++ self.mc.STRB_ri(r.ip0.value, dstaddr_loc.value, dst_i) + i += sz ++ dst_i += sz + + else: + if isinstance(size_box, ConstInt): diff --git a/pypy3.spec b/pypy3.spec index 70caacc..785179e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -95,8 +95,7 @@ URL:
http://pypy.org/
# it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -# aarch64:
https://bitbucket.org/pypy/pypy/issues/3086
-%ifarch %{ix86} x86_64 %{arm} %{power64} s390x +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x aarch64 %global with_jit 1 %else %global with_jit 0 @@ -165,6 +164,9 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +#
https://bitbucket.org/pypy/pypy/issues/3086
+Patch12: d81c769a235307f6671a8fa916f48d6896cbb823.patch + # Instead of bundled wheels, use our RPM packaged wheels from # /usr/share/python-wheels # We conditionally apply this, but we use autosetup, so we use Source here @@ -859,6 +861,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Oct 23 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-2 +- Enable JIT on aarch64 + * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) - Enable aarch64 (without JIT) commit faa7ffb044605fcf1d807ada72eeb88ccf4181a1 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 19 00:41:56 2019 +0200 Build everything with pypy, but fix the cpython build w/out pycparser diff --git a/pypy3.spec b/pypy3.spec index 0ab7125..70caacc 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -179,25 +179,15 @@ Source189: 189-use-rpm-wheels.patch # and avoid a cycle in the build-time dependency graph: # Note, pypy3 is built with pypy2, so no dependency cycle -%ifarch %{power64} -# the build is unreliable with pypy+power, getting random failures -# so better have a bit slower build than having to build until it pass -%global use_self_when_building 0 -%else %global use_self_when_building 1 -%endif - %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 -# no pypy-pycparser available ATM %global bootstrap_python_interp pypy2 %else - - # pypy3 can only be build with python2 -BuildRequires: python2-devel -BuildRequires: python2-pycparser +# exception to use Python 2:
https://pagure.io/fesco/issue/2130
+BuildRequires: python27 %global bootstrap_python_interp python2 %endif @@ -356,6 +346,11 @@ rm lib-python/3/idlelib/idle.bat sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif +%if ! 0%{use_self_when_building} + # use the pycparser from PyPy even on CPython + ln -s lib_pypy/cffi/_pycparser pycparser +%endif + %build %ifarch s390 s390x # pypy3 requires z10 at least commit 8d646e7dd1de54fcf25b0d37ccc3b087b8e7554e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Oct 18 19:02:40 2019 +0200 Fix %{pypy3_version} for PyPy 3.10 diff --git a/macros.pypy3 b/macros.pypy3 index f138a39..d11474b 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -1,5 +1,5 @@ %__pypy3 /usr/bin/pypy3 %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") -%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") %pypy3_pypy_version %(%{__pypy3} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))") commit 083ef4d302f9f87e71603a93650baea2929ab127 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Oct 17 20:29:42 2019 +0200 Enable power64 (with JIT) diff --git a/pypy3.spec b/pypy3.spec index e7f3045..0ab7125 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,9 +12,6 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
-ExcludeArch: %{power64} - # High-level configuration of the build: # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package @@ -870,6 +867,7 @@ CheckPyPy %{name}-stackless * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) - Enable aarch64 (without JIT) +- Enable power64 (with JIT) * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit f27d32f53000b43d7e821e764b9b8a073e0c8e58 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Oct 15 02:03:21 2019 +0200 Enable aarch64 without JIT See
https://bitbucket.org/pypy/pypy/issues/3086
diff --git a/pypy3.spec b/pypy3.spec index cf46f81..e7f3045 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,9 +12,8 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# aarch64: Not available yet # ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
-ExcludeArch: aarch64 %{power64} +ExcludeArch: %{power64} # High-level configuration of the build: @@ -99,6 +98,7 @@ ExcludeArch: aarch64 %{power64} # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. +# aarch64:
https://bitbucket.org/pypy/pypy/issues/3086
%ifarch %{ix86} x86_64 %{arm} %{power64} s390x %global with_jit 1 %else @@ -869,6 +869,7 @@ CheckPyPy %{name}-stackless %changelog * Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 - Update to 7.2.0 (#1757707) +- Enable aarch64 (without JIT) * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit 2f53e9f20a92cd7efc8798ba5d6766812eaea195 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Oct 14 20:40:57 2019 +0200 Update to 7.2.0 diff --git a/.gitignore b/.gitignore index 910808c..4b53676 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /pypy3-v6.0.0-src.tar.bz2 /pypy3.5-v7.0.0-src.tar.bz2 /pypy3.6-v7.1.1-src.tar.bz2 +/pypy3.6-v7.2.0-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index 9d7165d..e093956 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -5,18 +5,18 @@ Date: Wed Mar 29 04:31:55 2017 +0200 011-no-faulthandler.patch diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py -index 5d7f308..4424637 100644 +index faa1ba7..2edadc9 100644 --- a/lib-python/3/test/support/__init__.py +++ b/lib-python/3/test/support/__init__.py -@@ -6,7 +6,6 @@ if __name__ != 'test.support': - import collections.abc +@@ -7,7 +7,6 @@ import collections.abc import contextlib + import datetime import errno -import faulthandler import fnmatch import functools import gc -@@ -65,6 +64,11 @@ try: +@@ -70,6 +69,11 @@ try: except ImportError: resource = None @@ -28,7 +28,7 @@ index 5d7f308..4424637 100644 __all__ = [ # globals "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", -@@ -2060,7 +2064,8 @@ def start_threads(threads, unlock=None): +@@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): finally: started = [t for t in started if t.isAlive()] if started: diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index eb8b10e..4a62d57 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -16,9 +16,9 @@ index 9f5d151..8b81155 100644 +_WHEEL_DIR = "/usr/share/python-wheels/" --_SETUPTOOLS_VERSION = "28.8.0" +-_SETUPTOOLS_VERSION = "40.6.2" --_PIP_VERSION = "9.0.1" +-_PIP_VERSION = "18.1" +def _get_most_recent_wheel_version(pkg): + prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) + suffix = "-py2.py3-none-any.whl" @@ -33,22 +33,6 @@ index 9f5d151..8b81155 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -24,8 +35,13 @@ def _run_pip(args, additional_paths=None): - sys.path = additional_paths + sys.path - - # Install the bundled software -- import pip -- pip.main(args) -+ try: -+ # pip 10 -+ from pip._internal import main -+ except ImportError: -+ # pip 9 -+ from pip import main -+ main(args) - - - def version(): @@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: diff --git a/pypy3.spec b/pypy3.spec index 225a1f3..cf46f81 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.1 +%global basever 7.2 Name: pypy3 -Version: %{basever}.1 +Version: %{basever}.0 %global pyversion 3.6 -Release: 2%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -867,6 +867,9 @@ CheckPyPy %{name}-stackless %changelog +* Mon Oct 14 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.2.0-1 +- Update to 7.2.0 (#1757707) + * Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
diff --git a/sources b/sources index aa4e777..25bbbb3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.1.1-src.tar.bz2) = 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473 +SHA512 (pypy3.6-v7.2.0-src.tar.bz2) = bcbb53062a473d504bcc082cf6286f6169c83d1f38d22c4d7c4e46ddc32bca9d91e71194637e6650db5bec02b29fe262b22fe236d627b6bc3e6e0c59c66c07cc commit 707f9490c0c9ae2b3cac2b0c6e9503888c5efad0 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 26 11:47:24 2019 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index b781dfb..225a1f3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -867,6 +867,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 7.1.1-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+ * Fri May 24 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.1.1-1 - Update to 7.1.1 (#1689198) - pypy3 is now Python 3.6 commit 7fc9514b60f515a33dc339d19b94a21dd9943232 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 12 14:48:12 2019 +0200 Keep the LICENSE file in lib/pythonX.Y dir Virtualenv tries to copy it. See
https://github.com/pypa/virtualenv/issues/1352
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. diff --git a/pypy3.spec b/pypy3.spec index 1f45c89..b781dfb 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -688,7 +688,6 @@ install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ - %{buildroot}%{pypyprefix}/LICENSE \ %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now @@ -828,18 +827,19 @@ CheckPyPy %{name}-stackless %endif # run_selftests # Because there's a bunch of binary subpackages and creating -# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that +# /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that # is just confusing for the user. %global _docdir_fmt %{name} %files libs -%license LICENSE %doc README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python +%license %{pypyprefix}/LICENSE %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib_pypy/ +%license %{pypyprefix}/lib_pypy/*/LICENSE %{pypyprefix}/site-packages/ %if %{with_emacs} %{_emacs_sitelispdir}/pypy3trace-mode.el @@ -847,7 +847,6 @@ CheckPyPy %{name}-stackless %endif %files -%license LICENSE %doc README.rst %{_bindir}/pypy3 %{_bindir}/pypy%{pyversion} @@ -862,7 +861,6 @@ CheckPyPy %{name}-stackless %if 0%{with_stackless} %files stackless -%license LICENSE %doc README.rst %{_bindir}/pypy-stackless %endif commit cac755a96a589f8c15a50ed6ac9d121e336de51c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 24 10:29:13 2019 +0200 Update to 7.1.1, pypy3 is now Python 3.6
https://bugzilla.redhat.com/show_bug.cgi?id=1689198
diff --git a/.gitignore b/.gitignore index 1361620..910808c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /pypy3-v5.10.1-src.tar.bz2 /pypy3-v6.0.0-src.tar.bz2 /pypy3.5-v7.0.0-src.tar.bz2 +/pypy3.6-v7.1.1-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index f96d232..9d7165d 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -4,60 +4,6 @@ Date: Wed Mar 29 04:31:55 2017 +0200 011-no-faulthandler.patch -diff --git a/lib-python/3/test/regrtest.py b/lib-python/3/test/regrtest.py -index c1d85f6..3d3072c 100755 ---- a/lib-python/3/test/regrtest.py -+++ b/lib-python/3/test/regrtest.py -@@ -124,7 +124,6 @@ import importlib - - import argparse - import builtins --import faulthandler - import io - import json - import locale -@@ -152,7 +151,10 @@ try: - import _multiprocessing, multiprocessing.process - except ImportError: - multiprocessing = None -- -+try: -+ import faulthandler -+except ImportError: -+ faulthandler = None - - # Some times __path__ and __file__ are not absolute (e.g. while running from - # Lib/) and, if we change the CWD to run the tests in a temporary dir, some -@@ -486,17 +488,18 @@ def main(tests=None, **kwargs): - directly to set the values that would normally be set by flags - on the command line. - """ -- # Display the Python traceback on fatal errors (e.g. segfault) -- faulthandler.enable(all_threads=True) -- -- # Display the Python traceback on SIGALRM or SIGUSR1 signal -- signals = [] -- if hasattr(signal, 'SIGALRM'): -- signals.append(signal.SIGALRM) -- if hasattr(signal, 'SIGUSR1'): -- signals.append(signal.SIGUSR1) -- for signum in signals: -- faulthandler.register(signum, chain=True) -+ if faulthandler: -+ # Display the Python traceback on fatal errors (e.g. segfault) -+ faulthandler.enable(all_threads=True) -+ -+ # Display the Python traceback on SIGALRM or SIGUSR1 signal -+ signals = [] -+ if hasattr(signal, 'SIGALRM'): -+ signals.append(signal.SIGALRM) -+ if hasattr(signal, 'SIGUSR1'): -+ signals.append(signal.SIGUSR1) -+ for signum in signals: -+ faulthandler.register(signum, chain=True) - - replace_stdout() - diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py index 5d7f308..4424637 100644 --- a/lib-python/3/test/support/__init__.py diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 2caefe2..eb8b10e 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,5 +1,5 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 25c5567..6d8d09c 100644 +index 9f5d151..8b81155 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py @@ -1,16 +1,27 @@ @@ -31,9 +31,9 @@ index 25c5567..6d8d09c 100644 + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - # pip currently requires ssl support, so we try to provide a nicer - # error message when that is missing (
http://bugs.python.org/issue19744
) -@@ -37,8 +48,13 @@ def _run_pip(args, additional_paths=None): + _PROJECTS = [ + ("setuptools", _SETUPTOOLS_VERSION), +@@ -24,8 +35,13 @@ def _run_pip(args, additional_paths=None): sys.path = additional_paths + sys.path # Install the bundled software @@ -49,7 +49,7 @@ index 25c5567..6d8d09c 100644 def version(): -@@ -93,12 +109,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, +@@ -79,12 +95,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) diff --git a/pypy3.spec b/pypy3.spec index 201a8ac..1f45c89 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 7.0 +%global basever 7.1 Name: pypy3 -Version: %{basever}.0 -%global pyversion 3.5 -Release: 2%{?dist} +Version: %{basever}.1 +%global pyversion 3.6 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -134,8 +134,7 @@ ExcludeArch: aarch64 %{power64} # Turn off the brp-python-bytecompile postprocessing script # We manually invoke it later on, using the freshly built pypy binary -%global __os_install_post \ - %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%global __brp_python_bytecompile %{nil} # Source and patches: Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
@@ -321,13 +320,6 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git -# While this is 7.0.0, it has 7.1.0-alpha0 listed inside -# We sed it out to avoid user confusion -sed -i 's/7\.1\.0/7.0.0/' pypy/doc/conf.py -sed -i 's/7\.1\.0-alpha0/7.0.0/g' pypy/module/cpyext/include/patchlevel.h pypy/doc/how-to-release.rst -sed -i 's/0x07010000/0x07000000/' pypy/module/cpyext/include/patchlevel.h -sed -i 's/7, 1, 0, "alpha"/7, 0, 0, "final"/' pypy/module/sys/version.py - %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} @@ -737,7 +729,7 @@ CheckPyPy() { # Use regrtest to explicitly list all tests: ( ./$ExeName -c \ - "from test.regrtest import findtests; print('\n'.join(findtests()))" + "from test.libregrtest.runtest import findtests; print('\n'.join(findtests()))" ) > testnames.txt # Skip some tests: @@ -877,6 +869,10 @@ CheckPyPy %{name}-stackless %changelog +* Fri May 24 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.1.1-1 +- Update to 7.1.1 (#1689198) +- pypy3 is now Python 3.6 + * Thu May 16 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-2 - Show the version as 7.0.0 diff --git a/sources b/sources index 294934f..aa4e777 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.5-v7.0.0-src.tar.bz2) = 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2 +SHA512 (pypy3.6-v7.1.1-src.tar.bz2) = 17e78f9c7080d597a6283d8e8247d1ca78f09a14ff221db8c3d90d255b5befc73102b317ca34a80979e544d5ee72f3e5e649f89d185a085f4cc15012da4d0473 diff --git a/tests/tests.yml b/tests/tests.yml index ce6f13f..c3a91f3 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.5 ./venv.sh + run: PYTHON=pypy3 VERSION=3.6 ./venv.sh required_packages: - gcc - python3-tox commit 3e4b7200d351e351effedb134c8a2adaab71201e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 17 00:56:47 2019 +0200 Show the version as 7.0.0 While this is 7.0.0, it has 7.1.0-alpha0 listed inside, we sed it out to avoid user confusion. diff --git a/pypy3.spec b/pypy3.spec index 6c452df..201a8ac 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -321,6 +321,14 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git +# While this is 7.0.0, it has 7.1.0-alpha0 listed inside +# We sed it out to avoid user confusion +sed -i 's/7\.1\.0/7.0.0/' pypy/doc/conf.py +sed -i 's/7\.1\.0-alpha0/7.0.0/g' pypy/module/cpyext/include/patchlevel.h pypy/doc/how-to-release.rst +sed -i 's/0x07010000/0x07000000/' pypy/module/cpyext/include/patchlevel.h +sed -i 's/7, 1, 0, "alpha"/7, 0, 0, "final"/' pypy/module/sys/version.py + + %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} rm lib-python/3/ensurepip/_bundled/*.whl @@ -869,6 +877,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu May 16 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-2 +- Show the version as 7.0.0 + * Thu Feb 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-1 - Update to 7.0.0 (#1673127) commit 124d766f70858e217aac1b9c297c4c313ccf95df Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Mar 1 00:06:59 2019 +0100 Update to 7.0.0 (#1673127) diff --git a/.gitignore b/.gitignore index 2025c8c..1361620 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /pypy3-v5.10.0-src.tar.bz2 /pypy3-v5.10.1-src.tar.bz2 /pypy3-v6.0.0-src.tar.bz2 +/pypy3.5-v7.0.0-src.tar.bz2 diff --git a/009-add-libxcrypt-support.patch b/009-add-libxcrypt-support.patch index ec17216..f3c9a7d 100644 --- a/009-add-libxcrypt-support.patch +++ b/009-add-libxcrypt-support.patch @@ -1,13 +1,13 @@ diff --git a/pypy/module/crypt/interp_crypt.py b/pypy/module/crypt/interp_crypt.py -index d227b6a..da969e6 100644 +index bd13f6f..1022c9e 100644 --- a/pypy/module/crypt/interp_crypt.py +++ b/pypy/module/crypt/interp_crypt.py -@@ -6,7 +6,7 @@ import sys - if sys.platform.startswith('darwin'): - eci = ExternalCompilationInfo() +@@ -9,7 +9,7 @@ elif sys.platform.startswith('linux'): + # crypt() is defined only in crypt.h on some Linux variants (eg. Fedora 28) + eci = ExternalCompilationInfo(libraries=['crypt'], includes=["crypt.h"]) else: - eci = ExternalCompilationInfo(libraries=['crypt']) + eci = ExternalCompilationInfo(libraries=['crypt'], includes=['crypt.h']) c_crypt = rffi.llexternal('crypt', [rffi.CCHARP, rffi.CCHARP], rffi.CCHARP, compilation_info=eci, releasegil=False) - + diff --git a/302-fix-multiprocessing-regression-on-newer-glibcs.patch b/302-fix-multiprocessing-regression-on-newer-glibcs.patch deleted file mode 100644 index db723a8..0000000 --- a/302-fix-multiprocessing-regression-on-newer-glibcs.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User Miro Hrončok <miro(a)hroncok.cz> -# Date 1524655710 -7200 -# Wed Apr 25 13:28:30 2018 +0200 -# Branch issue33329 -# Node ID 6501fdc3a80fa2bc3b8c70bfaf94a31c3b3432c0 -# Parent a07f07034d281bec8c776f9e1ee7c5b9aea74007 -Fix multiprocessing regression on newer glibcs - -Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some -reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom -is commonly used to select all signals for blocking with `pthread_sigmask`. -So we ignore the sigaddset() return value until we expose sigfillset() -to provide a better idiom. - -Co-authored-by: Antoine Pitrou <antoine(a)python.org> - -diff -r a07f07034d28 -r 6501fdc3a80f pypy/module/signal/interp_signal.py ---- a/pypy/module/signal/interp_signal.py Tue Apr 24 10:00:00 2018 +0200 -+++ b/pypy/module/signal/interp_signal.py Wed Apr 25 13:28:30 2018 +0200 -@@ -379,10 +379,10 @@ - for w_signum in space.unpackiterable(self.w_signals): - signum = space.int_w(w_signum) - check_signum_in_range(space, signum) -- err = c_sigaddset(self.mask, signum) -- if err: -- raise oefmt(space.w_ValueError, -- "signal number %d out of range", signum) -+ # bpo-33329: ignore c_sigaddset() return value as it can fail -+ # for some reserved signals, but we want the `range(1, NSIG)` -+ # idiom to allow selecting all valid signals. -+ c_sigaddset(self.mask, signum) - return self.mask - - def __exit__(self, *args): diff --git a/pypy3.spec b/pypy3.spec index 00494e3..6c452df 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 6.0 +%global basever 7.0 Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 5%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -138,7 +138,7 @@ ExcludeArch: aarch64 %{power64} %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-v%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -174,12 +174,6 @@ Patch11: 011-no-faulthandler.patch # We conditionally apply this, but we use autosetup, so we use Source here Source189: 189-use-rpm-wheels.patch -# Fix multiprocessing regression on newer glibcs -# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
-# and:
https://bugs.python.org/issue33329
-# and:
https://bitbucket.org/pypy/pypy/pull-requests/607
-Patch302: 302-fix-multiprocessing-regression-on-newer-glibcs.patch - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -224,18 +218,13 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel +BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif -%if 0%{?fedora} >= 26 -BuildRequires: compat-openssl10-devel -%else -BuildRequires: openssl-devel -%endif - %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -266,6 +255,8 @@ BuildRequires: python-pip-wheel # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} +Provides: pypy%{pyversion} = %{version}-%{release} +Provides: pypy%{pyversion}%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -289,6 +280,9 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +Provides: pypy%{pyversion}-libs = %{version}-%{release} +Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} + %if %{with rpmwheels} Requires: python-setuptools-wheel Requires: python-pip-wheel @@ -305,6 +299,9 @@ Libraries required by the various PyPy implementations of Python 3. Summary: Development tools for working with PyPy3 Requires: pypy3%{?_isa} = %{version}-%{release} +Provides: pypy%{pyversion}-devel = %{version}-%{release} +Provides: pypy%{pyversion}-devel%{?_isa} = %{version}-%{release} + %description devel Header files for building C extension modules against PyPy3 @@ -313,12 +310,16 @@ Header files for building C extension modules against PyPy3 %package stackless Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} + +Provides: pypy%{pyversion}-stackless = %{version}-%{release} +Provides: pypy%{pyversion}-stackless%{?_isa} = %{version}-%{release} + %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-v%{version}-src -p1 -S git +%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git %if %{with rpmwheels} %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} @@ -868,6 +869,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Feb 28 2019 Miro Hrončok <mhroncok(a)redhat.com> - 7.0.0-1 +- Update to 7.0.0 (#1673127) + * Sat Feb 02 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
diff --git a/sources b/sources index 2a76651..294934f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v6.0.0-src.tar.bz2) = ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e +SHA512 (pypy3.5-v7.0.0-src.tar.bz2) = 3facac26e06e254cbf244841824b35ec211859123f6ba9f095dc980292c10d9cf1d11de62cc6372cf77e92ee1cd2358bbd794b3ff25cb7172e1b21c02c8ce6c2 commit 9d9b0859329520bcb7159023c03f12d2807d39da Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Feb 2 05:16:48 2019 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 5f5203b..00494e3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -868,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Feb 02 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+ * Mon Jan 14 2019 Björn Esser <besser82(a)fedoraproject.org> - 6.0.0-4 - Rebuilt for libcrypt.so.2 (#1666033) commit f8cbccf6e2a244ea2a453c8913e7e1afa23819e8 Author: Björn Esser <besser82(a)fedoraproject.org> Date: Mon Jan 14 19:14:13 2019 +0100 Rebuilt for libcrypt.so.2 (#1666033) diff --git a/pypy3.spec b/pypy3.spec index 7fc7257..5f5203b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -868,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Mon Jan 14 2019 Björn Esser <besser82(a)fedoraproject.org> - 6.0.0-4 +- Rebuilt for libcrypt.so.2 (#1666033) + * Tue Aug 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-3 - Use RPM packaged wheels commit e0becb7cbf6a7549fab9d9a40299888ceae794fe Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 20 12:37:22 2018 +0200 Enable basic venv smoke test in the CI diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..ce6f13f --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,17 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "
https://src.fedoraproject.org/tests/python.git
" + dest: "python" + tests: + - smoke: + dir: python/smoke + run: PYTHON=pypy3 VERSION=3.5 ./venv.sh + required_packages: + - gcc + - python3-tox + - pypy3-devel commit 6f8b7baed90a92dcbd3bed71bf98fa1c073bec3a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Aug 21 12:10:46 2018 +0200 Use RPM packaged wheels diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch new file mode 100644 index 0000000..2caefe2 --- /dev/null +++ b/189-use-rpm-wheels.patch @@ -0,0 +1,67 @@ +diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py +index 25c5567..6d8d09c 100644 +--- a/lib-python/3/ensurepip/__init__.py ++++ b/lib-python/3/ensurepip/__init__.py +@@ -1,16 +1,27 @@ ++import distutils.version ++import glob + import os + import os.path +-import pkgutil + import sys + import tempfile + + + __all__ = ["version", "bootstrap"] + ++_WHEEL_DIR = "/usr/share/python-wheels/" + +-_SETUPTOOLS_VERSION = "28.8.0" + +-_PIP_VERSION = "9.0.1" ++def _get_most_recent_wheel_version(pkg): ++ prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg)) ++ suffix = "-py2.py3-none-any.whl" ++ pattern = "{}*{}".format(prefix, suffix) ++ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern)) ++ return str(max(versions, key=distutils.version.LooseVersion)) ++ ++ ++_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") ++ ++_PIP_VERSION = _get_most_recent_wheel_version("pip") + + # pip currently requires ssl support, so we try to provide a nicer + # error message when that is missing (
http://bugs.python.org/issue19744
) +@@ -37,8 +48,13 @@ def _run_pip(args, additional_paths=None): + sys.path = additional_paths + sys.path + + # Install the bundled software +- import pip +- pip.main(args) ++ try: ++ # pip 10 ++ from pip._internal import main ++ except ImportError: ++ # pip 9 ++ from pip import main ++ main(args) + + + def version(): +@@ -93,12 +109,9 @@ def bootstrap(*, root=None, upgrade=False, user=False, + additional_paths = [] + for project, version in _PROJECTS: + wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) +- whl = pkgutil.get_data( +- "ensurepip", +- "_bundled/{}".format(wheel_name), +- ) +- with open(os.path.join(tmpdir, wheel_name), "wb") as fp: +- fp.write(whl) ++ with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp: ++ with open(os.path.join(tmpdir, wheel_name), "wb") as fp: ++ fp.write(sfp.read()) + + additional_paths.append(os.path.join(tmpdir, wheel_name)) + diff --git a/pypy3.spec b/pypy3.spec index 7193654..7fc7257 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -18,6 +18,10 @@ ExcludeArch: aarch64 %{power64} # High-level configuration of the build: +# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package +# Uses upstream bundled prebuilt wheels otherwise +%bcond_without rpmwheels + # PyPy consists of an implementation of an interpreter (with JIT compilation) # for the full Python language written in a high-level language, leaving many # of the implementation details as "pluggable" policies. @@ -165,6 +169,11 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +# Instead of bundled wheels, use our RPM packaged wheels from +# /usr/share/python-wheels +# We conditionally apply this, but we use autosetup, so we use Source here +Source189: 189-use-rpm-wheels.patch + # Fix multiprocessing regression on newer glibcs # See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
# and:
https://bugs.python.org/issue33329
@@ -249,6 +258,11 @@ BuildRequires: emacs # For %%autosetup -S git BuildRequires: %{_bindir}/git +%if %{with rpmwheels} +BuildRequires: python-setuptools-wheel +BuildRequires: python-pip-wheel +%endif + # Metadata for the core package (the JIT build): Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: %{name}(abi) = %{basever} @@ -275,6 +289,14 @@ Summary: Run-time libraries used by PyPy implementations of Python 3 Requires: emacs-filesystem >= %{_emacs_version} %endif +%if %{with rpmwheels} +Requires: python-setuptools-wheel +Requires: python-pip-wheel +%else +Provides: bundled(python3-pip) = 9.0.1 +Provides: bundled(python3-setuptools) = 28.8.0 +%endif + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -298,6 +320,17 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy3-v%{version}-src -p1 -S git +%if %{with rpmwheels} +%apply_patch -m %(basename %{SOURCE189}) %{SOURCE189} +rm lib-python/3/ensurepip/_bundled/*.whl +rmdir lib-python/3/ensurepip/_bundled +%else +# we don't want to ship the old ones anyway +rm lib-python/3/ensurepip/_bundled/pip-8.1.2-* +rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-* +%endif + + # Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2: find -name "*.py" -exec \ sed \ @@ -835,6 +868,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Aug 21 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-3 +- Use RPM packaged wheels + * Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
commit 9d0ffbc9d5d861af1635230e55a86c7bc77438b7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Aug 21 11:48:21 2018 +0200 Poor ppc64(le), it just doesn't build :( diff --git a/pypy3.spec b/pypy3.spec index ccbd579..7193654 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,8 +12,9 @@ Summary: Python 3 implementation with a Just-In-Time compiler License: MIT and Python and UCD URL:
http://pypy.org/
-# Not available yet -ExcludeArch: aarch64 +# aarch64: Not available yet +# ppc64: Broken on F29+
https://bugzilla.redhat.com/show_bug.cgi?id=1619601
+ExcludeArch: aarch64 %{power64} # High-level configuration of the build: commit e47185bc51db6ff0d04546479b77bdfe84b586c2 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Jul 15 16:25:45 2018 +0200 Drop RHEL5 conditional diff --git a/pypy3.spec b/pypy3.spec index 2e1edb6..ccbd579 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -104,7 +104,7 @@ ExcludeArch: aarch64 %global with_stackless 0 # Should we build the emacs JIT-viewing mode? -%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%if 0%{?rhel} == 6 %global with_emacs 0 %else %global with_emacs 1 commit 3f667ce3366f6971e86aa07783bbc2a370043c5a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Jul 15 16:23:25 2018 +0200 BR gcc diff --git a/pypy3.spec b/pypy3.spec index fb1ac73..2e1edb6 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -202,6 +202,8 @@ BuildRequires: python2-pycparser %endif +BuildRequires: gcc + BuildRequires: libffi-devel BuildRequires: tcl-devel BuildRequires: tk-devel commit f7ac519b1ef348af1d5b57d089f2d7b2109388f6 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Jul 13 23:12:32 2018 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index b1add4a..fb1ac73 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -832,6 +832,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+ * Wed Apr 25 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-1 - Fix failing taskotron check - New release 6.0.0 (#1571489) commit 18c888e5f5972bd6391a59f77794b317c359cec1 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 25 14:20:20 2018 +0200 New release 6.0.0 (#1571489) Fix multiprocessing regression on newer glibcs (#1569933) diff --git a/.gitignore b/.gitignore index 67b6ee0..2025c8c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /pypy3-v5.9.0-src.tar.bz2 /pypy3-v5.10.0-src.tar.bz2 /pypy3-v5.10.1-src.tar.bz2 +/pypy3-v6.0.0-src.tar.bz2 diff --git a/302-fix-multiprocessing-regression-on-newer-glibcs.patch b/302-fix-multiprocessing-regression-on-newer-glibcs.patch new file mode 100644 index 0000000..db723a8 --- /dev/null +++ b/302-fix-multiprocessing-regression-on-newer-glibcs.patch @@ -0,0 +1,35 @@ +# HG changeset patch +# User Miro Hrončok <miro(a)hroncok.cz> +# Date 1524655710 -7200 +# Wed Apr 25 13:28:30 2018 +0200 +# Branch issue33329 +# Node ID 6501fdc3a80fa2bc3b8c70bfaf94a31c3b3432c0 +# Parent a07f07034d281bec8c776f9e1ee7c5b9aea74007 +Fix multiprocessing regression on newer glibcs + +Starting with glibc 2.27.9000-xxx, sigaddset() can return EINVAL for some +reserved signal numbers between 1 and NSIG. The `range(1, NSIG)` idiom +is commonly used to select all signals for blocking with `pthread_sigmask`. +So we ignore the sigaddset() return value until we expose sigfillset() +to provide a better idiom. + +Co-authored-by: Antoine Pitrou <antoine(a)python.org> + +diff -r a07f07034d28 -r 6501fdc3a80f pypy/module/signal/interp_signal.py +--- a/pypy/module/signal/interp_signal.py Tue Apr 24 10:00:00 2018 +0200 ++++ b/pypy/module/signal/interp_signal.py Wed Apr 25 13:28:30 2018 +0200 +@@ -379,10 +379,10 @@ + for w_signum in space.unpackiterable(self.w_signals): + signum = space.int_w(w_signum) + check_signum_in_range(space, signum) +- err = c_sigaddset(self.mask, signum) +- if err: +- raise oefmt(space.w_ValueError, +- "signal number %d out of range", signum) ++ # bpo-33329: ignore c_sigaddset() return value as it can fail ++ # for some reserved signals, but we want the `range(1, NSIG)` ++ # idiom to allow selecting all valid signals. ++ c_sigaddset(self.mask, signum) + return self.mask + + def __exit__(self, *args): diff --git a/pypy3.spec b/pypy3.spec index a14b96d..b1add4a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ -%global basever 5.10 +%global basever 6.0 Name: pypy3 -Version: %{basever}.1 +Version: %{basever}.0 %global pyversion 3.5 -Release: 8%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -164,6 +164,12 @@ Patch9: 009-add-libxcrypt-support.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +# Fix multiprocessing regression on newer glibcs +# See:
https://bugzilla.redhat.com/show_bug.cgi?id=1569933
+# and:
https://bugs.python.org/issue33329
+# and:
https://bitbucket.org/pypy/pypy/pull-requests/607
+Patch302: 302-fix-multiprocessing-regression-on-newer-glibcs.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -826,8 +832,10 @@ CheckPyPy %{name}-stackless %changelog -* Sat Apr 14 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-8 +* Wed Apr 25 2018 Miro Hrončok <mhroncok(a)redhat.com> - 6.0.0-1 - Fix failing taskotron check +- New release 6.0.0 (#1571489) +- Fix multiprocessing regression on newer glibcs (#1569933) * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 - Provide pypy3(abi) = 5.10 diff --git a/sources b/sources index afb3c83..2a76651 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.10.1-src.tar.bz2) = 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5 +SHA512 (pypy3-v6.0.0-src.tar.bz2) = ea406c4dd1837a6ab13026de01330790f3c18f6e2bfb83e8553e52acf78b43dfb559ce75c2d91395055c771db359356c8183ed950da6f01a21bf09128935af5e commit b70eb98951063c00fb114a91f935d8991ca0e927 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun Apr 15 00:25:48 2018 +0200 Remove Windows bat file diff --git a/pypy3.spec b/pypy3.spec index 0aa26f8..a14b96d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -309,6 +309,9 @@ find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ "{}" \ \; +# Not needed on Linux +rm lib-python/3/idlelib/idle.bat + %ifarch %{ix86} x86_64 %{arm} sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py %endif commit 1b41795b2f455df4a5773c050253c26279595ba7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Apr 14 10:55:05 2018 +0200 Fix shebangs (reported mangled by taskotron) diff --git a/pypy3.spec b/pypy3.spec index bf093ac..0aa26f8 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -185,14 +185,14 @@ Patch11: 011-no-faulthandler.patch # pypy3 can only be build with pypy2 BuildRequires: pypy2 # no pypy-pycparser available ATM -%global bootstrap_python_interp pypy +%global bootstrap_python_interp pypy2 %else # pypy3 can only be build with python2 BuildRequires: python2-devel BuildRequires: python2-pycparser -%global bootstrap_python_interp python +%global bootstrap_python_interp python2 %endif @@ -289,10 +289,10 @@ Build of PyPy3 with support for micro-threads for massive concurrency %prep %autosetup -n pypy3-v%{version}-src -p1 -S git -# Replace /usr/local/bin/python shebangs with /usr/bin/python: +# Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2: find -name "*.py" -exec \ sed \ - -i -e "s|/usr/local/bin/python|/usr/bin/python|" \ + -i -r -e "s@/usr/(local/)?bin/(env )?python(2|3)?@/usr/bin/%{bootstrap_python_interp}@" \ "{}" \ \; @@ -303,9 +303,9 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done -# Replace all lib-python python shebangs with pypy -find lib-python/%{pylibver} -name "*.py" -exec \ - sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \ +# Replace all lib-python and lib_pypy python shebangs with pypy3 (those will be shipped with pypy3-libs) +find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \ + sed -r -i '1s@^#!\s*/usr/bin.*(python|pypy).*@#!/usr/bin/%{name}@' \ "{}" \ \; @@ -823,6 +823,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Apr 14 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-8 +- Fix failing taskotron check + * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 - Provide pypy3(abi) = 5.10 commit cac18deee0e00c9ee8b4fce8d4507796a1561298 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Apr 12 00:23:12 2018 +0200 Provide pypy3(abi) = 5.10 diff --git a/pypy3.spec b/pypy3.spec index 196243f..bf093ac 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -241,7 +241,8 @@ BuildRequires: emacs BuildRequires: %{_bindir}/git # Metadata for the core package (the JIT build): -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Provides: %{name}(abi) = %{basever} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -822,6 +823,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-7 +- Provide pypy3(abi) = 5.10 + * Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-6 - RPM macros improvements commit fe844b70bdc354e3d454bb43ed578f3b4898bac7 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 11 12:09:36 2018 +0200 Add macro with pypy version (aka 5.10, not 3.5) diff --git a/macros.pypy3 b/macros.pypy3 index 796b872..f138a39 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -2,3 +2,4 @@ %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3_pypy_version %(%{__pypy3} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))") diff --git a/pypy3.spec b/pypy3.spec index 958f998..196243f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -822,6 +822,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed Apr 11 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-6 +- RPM macros improvements + * Tue Apr 10 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-5 - Remove the rightmost version number from the path - rhbz#1516885:
https://bugzilla.redhat.com/show_bug.cgi?id=1516885
commit df12619f2b234a4f954e7e043fdac5d0f4701d7b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Apr 11 12:06:37 2018 +0200 Remove %pypy3dir definition, it is useless diff --git a/macros.pypy3 b/macros.pypy3 index ef1f600..796b872 100644 --- a/macros.pypy3 +++ b/macros.pypy3 @@ -2,4 +2,3 @@ %pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") -%pypy3dir %{_builddir}/pypy3-%{name}-%{version}-%{release} commit cf5da9288bd0e56d5b0e203cee650cc39f2e3e85 Author: Michal Cyprian <m.cyprian(a)gmail.com> Date: Wed Apr 11 01:31:31 2018 +0200 Remove the rightmost version number from the path diff --git a/pypy3.spec b/pypy3.spec index 22092d4..958f998 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,8 @@ +%global basever 5.10 Name: pypy3 -Version: 5.10.1 +Version: %{basever}.1 %global pyversion 3.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -119,7 +120,7 @@ ExcludeArch: aarch64 # Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{version} +%global pypyprefix %{_libdir}/pypy3-%{basever} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -464,8 +465,8 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -# Run installing script, archive-name %{name}-%{version} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{version} --builddir %{buildroot}/%{_libdir} +# Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} # Remove shebang lines from .py files that aren't executable, and @@ -639,7 +640,7 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ +rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \ %{buildroot}%{pypyprefix}/LICENSE \ %{buildroot}%{pypyprefix}/README.rst @@ -821,6 +822,10 @@ CheckPyPy %{name}-stackless %changelog +* Tue Apr 10 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-5 +- Remove the rightmost version number from the path +- rhbz#1516885:
https://bugzilla.redhat.com/show_bug.cgi?id=1516885
+ * Thu Mar 29 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-4 - Add patch for libxcrypt commit c54059a679944400a51e891b164e564befa14cbb Author: Michal Cyprian <m.cyprian(a)gmail.com> Date: Thu Mar 29 21:24:14 2018 +0200 Add patch for libxcrypt diff --git a/009-add-libxcrypt-support.patch b/009-add-libxcrypt-support.patch new file mode 100644 index 0000000..ec17216 --- /dev/null +++ b/009-add-libxcrypt-support.patch @@ -0,0 +1,13 @@ +diff --git a/pypy/module/crypt/interp_crypt.py b/pypy/module/crypt/interp_crypt.py +index d227b6a..da969e6 100644 +--- a/pypy/module/crypt/interp_crypt.py ++++ b/pypy/module/crypt/interp_crypt.py +@@ -6,7 +6,7 @@ import sys + if sys.platform.startswith('darwin'): + eci = ExternalCompilationInfo() + else: +- eci = ExternalCompilationInfo(libraries=['crypt']) ++ eci = ExternalCompilationInfo(libraries=['crypt'], includes=['crypt.h']) + c_crypt = rffi.llexternal('crypt', [rffi.CCHARP, rffi.CCHARP], rffi.CCHARP, + compilation_info=eci, releasegil=False) + diff --git a/pypy3.spec b/pypy3.spec index 2ed9d59..22092d4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -155,6 +155,11 @@ Patch6: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch7: 007-remove-startup-message.patch +# Glibc's libcrypt was replaced with libxcrypt in f28, crypt.h header has +# to be added to privent compilation error. +#
https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
+Patch9: 009-add-libxcrypt-support.patch + # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch @@ -816,6 +821,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Mar 29 2018 Michal Cyprian <mcyprian(a)redhat.com> - 5.10.1-4 +- Add patch for libxcrypt + * Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.10.1-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
commit 664896a6c60437d635c7b940c30ec541d0e94f87 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Fri Feb 9 06:17:45 2018 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org> diff --git a/pypy3.spec b/pypy3.spec index 5a9fcba..2ed9d59 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -816,6 +816,9 @@ CheckPyPy %{name}-stackless %changelog +* Fri Feb 09 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.10.1-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+ * Sat Jan 20 2018 Björn Esser <besser82(a)fedoraproject.org> - 5.10.1-2 - Rebuilt for switch to libxcrypt commit 43f3327530097638befd17ecc0d7054493cc45b9 Author: Björn Esser <besser82(a)fedoraproject.org> Date: Sat Jan 20 23:07:39 2018 +0100 Rebuilt for switch to libxcrypt diff --git a/pypy3.spec b/pypy3.spec index 76aed7c..5a9fcba 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.1 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -816,6 +816,9 @@ CheckPyPy %{name}-stackless %changelog +* Sat Jan 20 2018 Björn Esser <besser82(a)fedoraproject.org> - 5.10.1-2 +- Rebuilt for switch to libxcrypt + * Fri Jan 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-1 - Update to 5.10.1 (#1533689) - Removed two upstreamed patches commit 8b06f1af625208abd6fd0fa5817f8df53e824916 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jan 19 16:19:55 2018 +0100 Only BR /usr/bin/git, it should be enough for autosetup diff --git a/pypy3.spec b/pypy3.spec index db72cad..76aed7c 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -232,7 +232,7 @@ BuildRequires: emacs %endif # For %%autosetup -S git -BuildRequires: git +BuildRequires: %{_bindir}/git # Metadata for the core package (the JIT build): Requires: pypy3-libs%{?_isa} = %{version}-%{release} commit 93cd7d04ccff833ff161ec02c1fbfb2d940fca9e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jan 12 10:01:38 2018 +0100 Update to 5.10.1 (#1533689) diff --git a/.gitignore b/.gitignore index 40caefb..67b6ee0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /pypy3-v5.7.0-src.tar.bz2 /pypy3-v5.9.0-src.tar.bz2 /pypy3-v5.10.0-src.tar.bz2 +/pypy3-v5.10.1-src.tar.bz2 diff --git a/012-time-sleep-i686-overflow.patch b/012-time-sleep-i686-overflow.patch deleted file mode 100644 index 7dc6cf3..0000000 --- a/012-time-sleep-i686-overflow.patch +++ /dev/null @@ -1,55 +0,0 @@ -# HG changeset patch -# User Ronan Lamy <ronan.lamy(a)gmail.com> -# Date 1514473067 -3600 -# Branch py3.5 -# Node ID f145d85043878194d7eee33b2049063843e032d8 -# Parent d7d2710e65359e1e8d69e82612cb96f2f3921de7 -Fix issue #2717 - -diff --git a/pypy/interpreter/test/test_timeutils.py b/pypy/interpreter/test/test_timeutils.py -new file mode 100644 -index 0000000..873b2b4 ---- /dev/null -+++ b/pypy/interpreter/test/test_timeutils.py -@@ -0,0 +1,13 @@ -+import pytest -+from rpython.rlib.rarithmetic import r_longlong -+from pypy.interpreter.error import OperationError -+from pypy.interpreter.timeutils import timestamp_w -+ -+def test_timestamp_w(space): -+ w_1_year = space.newint(365 * 24 * 3600) -+ result = timestamp_w(space, w_1_year) -+ assert isinstance(result, r_longlong) -+ assert result // 10 ** 9 == space.int_w(w_1_year) -+ w_millenium = space.mul(w_1_year, space.newint(1000)) -+ with pytest.raises(OperationError): # timestamps overflow after ~300 years -+ timestamp_w(space, w_millenium) -diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py -index 336426b..7918dc8 100644 ---- a/pypy/interpreter/timeutils.py -+++ b/pypy/interpreter/timeutils.py -@@ -3,7 +3,7 @@ Access to the time module's high-resolution monotonic clock - """ - import math - from rpython.rlib.rarithmetic import ( -- r_longlong, ovfcheck, ovfcheck_float_to_longlong) -+ r_longlong, ovfcheck_float_to_longlong) - from pypy.interpreter.error import oefmt - - SECS_TO_NS = 10 ** 9 -@@ -28,10 +28,10 @@ def timestamp_w(space, w_secs): - raise oefmt(space.w_OverflowError, - "timestamp %R too large to convert to C _PyTime_t", w_secs) - else: -- sec = space.int_w(w_secs) - try: -- result = ovfcheck(sec * SECS_TO_NS) -+ sec = space.bigint_w(w_secs).tolonglong() -+ result = sec * r_longlong(SECS_TO_NS) - except OverflowError: - raise oefmt(space.w_OverflowError, -- "timestamp too large to convert to C _PyTime_t") -- return r_longlong(result) -+ "timestamp %R too large to convert to C _PyTime_t", w_secs) -+ return result diff --git a/013-fix-typeerror.patch b/013-fix-typeerror.patch deleted file mode 100644 index 86b0650..0000000 --- a/013-fix-typeerror.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Miro Hrončok <miro(a)hroncok.cz> -# Date 1514415016 0 -# Branch hroncok/fix-typeerror-str-does-not-support-the-b-1514414905375 -# Node ID 0551d04959425ea4a8ff7e87a5d357d03936cde0 -# Parent a4194a67868fa916074416e96456d07d52b1a1a1 -Fix: TypeError: 'str' does not support the buffer interface - -Fixes
https://bitbucket.org/pypy/pypy/issues/2718
- -diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py ---- a/lib_pypy/pyrepl/unix_console.py -+++ b/lib_pypy/pyrepl/unix_console.py -@@ -500,7 +500,7 @@ - os.write(self.output_fd, fmt[:x]) - fmt = fmt[y:] - delay = int(m.group(1)) -- if '*' in m.group(2): -+ if b'*' in m.group(2): - delay *= self.height - if self._pad: - nchars = (bps*delay)/1000 diff --git a/pypy3.spec b/pypy3.spec index dc1aa8e..db72cad 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 -Version: 5.10.0 +Version: 5.10.1 %global pyversion 3.5 -Release: 3%{?dist} +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -158,12 +158,6 @@ Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch -#
https://bitbucket.org/pypy/pypy/issues/2717
-Patch12: 012-time-sleep-i686-overflow.patch - -#
https://bitbucket.org/pypy/pypy/issues/2718
-Patch13: 013-fix-typeerror.patch - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -822,6 +816,10 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jan 12 2018 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.1-1 +- Update to 5.10.1 (#1533689) +- Removed two upstreamed patches + * Fri Dec 29 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-3 - Remove never used InstallPyPy function - Actually call execstack as originally intended diff --git a/sources b/sources index d9f03a4..afb3c83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.10.0-src.tar.bz2) = 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b +SHA512 (pypy3-v5.10.1-src.tar.bz2) = 91b0ed25130bdbb46d5e577136b5fe63d5162917dcc2d0b69f5cac2a283ece9d0bfd3c7c8dc61ff391e0550fa1603326f6edeb2df3159d71617fefe6c07439f5 commit 82dcbae2321eac8b49b7e987dfe170bdd2e19c56 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 29 19:50:56 2017 +0100 On power, use cpython2 to build pypy3 diff --git a/pypy3.spec b/pypy3.spec index 50ecfc0..dc1aa8e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -171,10 +171,16 @@ Patch13: 013-fix-typeerror.patch # # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: - # Note, pypy3 is built with pypy2, so no dependency cycle +%ifarch %{power64} +# the build is unreliable with pypy+power, getting random failures +# so better have a bit slower build than having to build until it pass +%global use_self_when_building 0 +%else %global use_self_when_building 1 +%endif + %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 @@ -821,6 +827,7 @@ CheckPyPy %{name}-stackless - Actually call execstack as originally intended - Use execstack on all arches (it's available now) - Don't ship the debug binaries +- On power, use cpython2 to build pypy3 * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) commit 720aa9bae8b7478b99bcb277238fcae6cca364d9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Dec 29 14:12:06 2017 +0100 Remove the debug builds (the package was ~350 MB) Also: - Remove never used InstallPyPy function - Actually call execstack as originally intended - Use execstack on all arches (it's available now) diff --git a/pypy3.spec b/pypy3.spec index 218ec39..50ecfc0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.0 %global pyversion 3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -224,10 +224,7 @@ BuildRequires: /usr/bin/free BuildRequires: perl-interpreter %endif -# No prelink on these arches -%ifnarch aarch64 ppc64le BuildRequires: /usr/bin/execstack -%endif # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -458,39 +455,6 @@ BuildPyPy \ %install -# Install the various executables: - -InstallPyPy() { - ExeName=$1 - - # To ensure compatibility with virtualenv, pypy finds its libraries - # relative to itself; this happens within - # pypy/translator/goal/app_main.py:get_library_path - # which calls sys.pypy_initial_path(dirname) on the dir containing - # the executable, with symlinks resolved. - # - # Hence we make /usr/bin/pypy be a symlink to the real binary, which we - # place within /usr/lib[64]/pypy-1.* as pypy - # - # This ought to enable our pypy build to work with virtualenv - # (rhbz#742641) - install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{pypyprefix}/$ExeName - ln -s %{pypyprefix}/$ExeName %{buildroot}/%{_bindir} - - # The generated machine code doesn't need an executable stack, but - # one of the assembler files (gcmaptable.s) doesn't have the necessary - # metadata to inform gcc of that, and thus gcc pessimistically assumes - # that the built binary does need an executable stack. - # - # Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
- # - # I tried various approaches involving fixing the build, but the simplest - # approach is to postprocess the ELF file: -%ifnarch aarch64 ppc64le - execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName -%endif -} - mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} @@ -517,6 +481,17 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages +# The generated machine code doesn't need an executable stack, but +# one of the assembler files (gcmaptable.s) doesn't have the necessary +# metadata to inform gcc of that, and thus gcc pessimistically assumes +# that the built binary does need an executable stack. +# +# Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
+# +# I tried various approaches involving fixing the build, but the simplest +# approach is to postprocess the ELF file: +execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 + ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 @@ -666,6 +641,12 @@ rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : +# since 5.10.0, the debug binaries are built and shipped, making the +# pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why +rm -f %{buildroot}%{pypyprefix}/bin/pypy3.debug +rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug + + %check topdir=$(pwd) @@ -835,6 +816,12 @@ CheckPyPy %{name}-stackless %changelog +* Fri Dec 29 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-3 +- Remove never used InstallPyPy function +- Actually call execstack as originally intended +- Use execstack on all arches (it's available now) +- Don't ship the debug binaries + * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) - Use pypy2 when building (it's faster and works this time) commit 9c955b3defcb09be770be0be46c3761fc0185d0b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Dec 28 17:47:00 2017 +0100 Use pypy2 when building (it's faster and works this time) diff --git a/pypy3.spec b/pypy3.spec index dc8c53d..218ec39 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -174,7 +174,7 @@ Patch13: 013-fix-typeerror.patch # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 0 +%global use_self_when_building 1 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy2 @@ -837,6 +837,7 @@ CheckPyPy %{name}-stackless %changelog * Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 - Fixed upstream issues #2717 and #2718 (re-enable test_socket) +- Use pypy2 when building (it's faster and works this time) * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) commit e858e84bf97e61dd4d1a72466862ac6cb8e57296 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Dec 28 17:45:36 2017 +0100 Fixed upstream issues #2717 and #2718 (re-enable test_socket) diff --git a/012-time-sleep-i686-overflow.patch b/012-time-sleep-i686-overflow.patch new file mode 100644 index 0000000..7dc6cf3 --- /dev/null +++ b/012-time-sleep-i686-overflow.patch @@ -0,0 +1,55 @@ +# HG changeset patch +# User Ronan Lamy <ronan.lamy(a)gmail.com> +# Date 1514473067 -3600 +# Branch py3.5 +# Node ID f145d85043878194d7eee33b2049063843e032d8 +# Parent d7d2710e65359e1e8d69e82612cb96f2f3921de7 +Fix issue #2717 + +diff --git a/pypy/interpreter/test/test_timeutils.py b/pypy/interpreter/test/test_timeutils.py +new file mode 100644 +index 0000000..873b2b4 +--- /dev/null ++++ b/pypy/interpreter/test/test_timeutils.py +@@ -0,0 +1,13 @@ ++import pytest ++from rpython.rlib.rarithmetic import r_longlong ++from pypy.interpreter.error import OperationError ++from pypy.interpreter.timeutils import timestamp_w ++ ++def test_timestamp_w(space): ++ w_1_year = space.newint(365 * 24 * 3600) ++ result = timestamp_w(space, w_1_year) ++ assert isinstance(result, r_longlong) ++ assert result // 10 ** 9 == space.int_w(w_1_year) ++ w_millenium = space.mul(w_1_year, space.newint(1000)) ++ with pytest.raises(OperationError): # timestamps overflow after ~300 years ++ timestamp_w(space, w_millenium) +diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py +index 336426b..7918dc8 100644 +--- a/pypy/interpreter/timeutils.py ++++ b/pypy/interpreter/timeutils.py +@@ -3,7 +3,7 @@ Access to the time module's high-resolution monotonic clock + """ + import math + from rpython.rlib.rarithmetic import ( +- r_longlong, ovfcheck, ovfcheck_float_to_longlong) ++ r_longlong, ovfcheck_float_to_longlong) + from pypy.interpreter.error import oefmt + + SECS_TO_NS = 10 ** 9 +@@ -28,10 +28,10 @@ def timestamp_w(space, w_secs): + raise oefmt(space.w_OverflowError, + "timestamp %R too large to convert to C _PyTime_t", w_secs) + else: +- sec = space.int_w(w_secs) + try: +- result = ovfcheck(sec * SECS_TO_NS) ++ sec = space.bigint_w(w_secs).tolonglong() ++ result = sec * r_longlong(SECS_TO_NS) + except OverflowError: + raise oefmt(space.w_OverflowError, +- "timestamp too large to convert to C _PyTime_t") +- return r_longlong(result) ++ "timestamp %R too large to convert to C _PyTime_t", w_secs) ++ return result diff --git a/013-fix-typeerror.patch b/013-fix-typeerror.patch new file mode 100644 index 0000000..86b0650 --- /dev/null +++ b/013-fix-typeerror.patch @@ -0,0 +1,22 @@ +# HG changeset patch +# User Miro Hrončok <miro(a)hroncok.cz> +# Date 1514415016 0 +# Branch hroncok/fix-typeerror-str-does-not-support-the-b-1514414905375 +# Node ID 0551d04959425ea4a8ff7e87a5d357d03936cde0 +# Parent a4194a67868fa916074416e96456d07d52b1a1a1 +Fix: TypeError: 'str' does not support the buffer interface + +Fixes
https://bitbucket.org/pypy/pypy/issues/2718
+ +diff --git a/lib_pypy/pyrepl/unix_console.py b/lib_pypy/pyrepl/unix_console.py +--- a/lib_pypy/pyrepl/unix_console.py ++++ b/lib_pypy/pyrepl/unix_console.py +@@ -500,7 +500,7 @@ + os.write(self.output_fd, fmt[:x]) + fmt = fmt[y:] + delay = int(m.group(1)) +- if '*' in m.group(2): ++ if b'*' in m.group(2): + delay *= self.height + if self._pad: + nchars = (bps*delay)/1000 diff --git a/pypy3.spec b/pypy3.spec index 6843000..dc8c53d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ Name: pypy3 Version: 5.10.0 %global pyversion 3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -158,6 +158,12 @@ Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler Patch11: 011-no-faulthandler.patch +#
https://bitbucket.org/pypy/pypy/issues/2717
+Patch12: 012-time-sleep-i686-overflow.patch + +#
https://bitbucket.org/pypy/pypy/issues/2718
+Patch13: 013-fix-typeerror.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -711,12 +717,6 @@ CheckPyPy() { # test_multiprocessing, so skip it for now: SkipTest test_multiprocessing - # the timeout tests are hanging on i686 - # see
https://bitbucket.org/pypy/pypy/issues/2717
- %ifarch %{ix86} - SkipTest test_socket - %endif - echo "== Test names ==" cat testnames.txt echo "=================" @@ -835,6 +835,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Dec 28 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-2 +- Fixed upstream issues #2717 and #2718 (re-enable test_socket) + * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) commit 27657069ff6fedfdeedc1770738261f4662213bd Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Dec 27 15:58:25 2017 +0100 Temporarily skip test_socket on ix86 diff --git a/pypy3.spec b/pypy3.spec index 24d9504..6843000 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -711,6 +711,12 @@ CheckPyPy() { # test_multiprocessing, so skip it for now: SkipTest test_multiprocessing + # the timeout tests are hanging on i686 + # see
https://bitbucket.org/pypy/pypy/issues/2717
+ %ifarch %{ix86} + SkipTest test_socket + %endif + echo "== Test names ==" cat testnames.txt echo "=================" @@ -833,6 +839,7 @@ CheckPyPy %{name}-stackless - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) - Enable JIT on power and s390x +- Temporarily skip test_socket on ix86 * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) commit a6780ec4355a7d2691bf8441b76b77186fb1b22d Author: Miro Hrončok <miro(a)hroncok.cz> Date: Wed Dec 27 15:57:17 2017 +0100 Enable JIT on power and s390x diff --git a/pypy3.spec b/pypy3.spec index cb0d323..24d9504 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -93,7 +93,7 @@ ExcludeArch: aarch64 # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -%ifarch %{ix86} x86_64 %{arm} +%ifarch %{ix86} x86_64 %{arm} %{power64} s390x %global with_jit 1 %else %global with_jit 0 @@ -832,6 +832,7 @@ CheckPyPy %{name}-stackless * Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 - Update to 5.10 (#1528841) - Use pypy2 and python2-pycparser (note the twos) +- Enable JIT on power and s390x * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) commit 2b72df539cd5d8839277452408071a8200689b29 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Dec 26 11:56:15 2017 +0100 Update to 5.10 (#1528841) diff --git a/.gitignore b/.gitignore index 602e7b0..40caefb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /pypy3.3-v5.5.0-alpha-src.tar.bz2 /pypy3-v5.7.0-src.tar.bz2 /pypy3-v5.9.0-src.tar.bz2 +/pypy3-v5.10.0-src.tar.bz2 diff --git a/pypy3.spec b/pypy3.spec index 9e9d37a..cb0d323 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,5 +1,5 @@ Name: pypy3 -Version: 5.9.0 +Version: 5.10.0 %global pyversion 3.5 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler @@ -171,7 +171,7 @@ Patch11: 011-no-faulthandler.patch %global use_self_when_building 0 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 -BuildRequires: pypy +BuildRequires: pypy2 # no pypy-pycparser available ATM %global bootstrap_python_interp pypy %else @@ -179,7 +179,7 @@ BuildRequires: pypy # pypy3 can only be build with python2 BuildRequires: python2-devel -BuildRequires: python-pycparser +BuildRequires: python2-pycparser %global bootstrap_python_interp python %endif @@ -829,6 +829,10 @@ CheckPyPy %{name}-stackless %changelog +* Mon Dec 25 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.10.0-1 +- Update to 5.10 (#1528841) +- Use pypy2 and python2-pycparser (note the twos) + * Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 - Update to 5.9 (#1504427) - Remove merged patches diff --git a/sources b/sources index 728ee37..d9f03a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3-v5.9.0-src.tar.bz2) = 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd +SHA512 (pypy3-v5.10.0-src.tar.bz2) = 69a373c18dbad9dd617f994ad885c8d8975f0c484ba9dd547e6e892c9a3030a43e9e3ee668aee5f4969403883de1311cef97a0a5e5701921172ee6c2119b771b commit 6eb88b178404d837b4ff02920550faaacb5cd92e Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Oct 20 20:31:31 2017 +0200 Update to 5.9 (#1504427) diff --git a/.gitignore b/.gitignore index 3fcf7b6..602e7b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /pypy3-2.4.0-src.tar.bz2 /pypy3.3-v5.2.0-alpha1-src.tar.bz2 /pypy3.3-v5.5.0-alpha-src.tar.bz2 +/pypy3-v5.7.0-src.tar.bz2 +/pypy3-v5.9.0-src.tar.bz2 diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch deleted file mode 100644 index 58ceb01..0000000 --- a/009-raise-an-error-when-STARTTLS-fails.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4c0f6a6fe6c71009ab4a6b3716e70af021e04904 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Sat, 2 Jul 2016 20:18:12 +0200 -Subject: [PATCH] Raise an error when STARTTLS fails - -CVE-2016-0772 python: smtplib StartTLS stripping attack -rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
-rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
- -Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> -- in changeset 101887:d590114c2394 3.4 --
https://hg.python.org/cpython/rev/d590114c2394
---- - lib-python/3/smtplib.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py -index 57f181b..5656cc6 100755 ---- a/lib-python/3/smtplib.py -+++ b/lib-python/3/smtplib.py -@@ -680,6 +680,11 @@ class SMTP: - self.ehlo_resp = None - self.esmtp_features = {} - self.does_esmtp = 0 -+ else: -+ # RFC 3207: -+ # 501 Syntax error (no parameters allowed) -+ # 454 TLS not available due to temporary reason -+ raise SMTPResponseException(resp, reply) - return (resp, reply) - - def sendmail(self, from_addr, to_addrs, msg, mail_options=[], --- -2.9.0 - diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch deleted file mode 100644 index bed386c..0000000 --- a/010-disabled-HTTP-header-injections-in-http.client.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 9a8db191cf8a3557a24e91081bf434d581b98c5a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Sat, 2 Jul 2016 20:20:58 +0200 -Subject: [PATCH] Disabled HTTP header injections in http.client. - -CVE-2016-5699 python: http protocol steam injection attack -rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
-rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- -Based on an upstream change by Demian Brecht and Serhiy Storchaka -- in changeset 94952:bf3e1c9b80e9 3.4 --
https://hg.python.org/cpython/rev/bf3e1c9b80e9
---- - lib-python/3/http/client.py | 37 +++++++++++++++++++++++++ - lib-python/3/test/test_httplib.py | 57 +++++++++++++++++++++++++++++++++++++++ - 2 files changed, 94 insertions(+) - -diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py -index e05c84d..476d6c8 100644 ---- a/lib-python/3/http/client.py -+++ b/lib-python/3/http/client.py -@@ -70,6 +70,7 @@ import email.parser - import email.message - import io - import os -+import re - import socket - import collections - from urllib.parse import urlsplit -@@ -217,6 +218,34 @@ _MAXLINE = 65536 - _MAXHEADERS = 100 - - -+# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) -+# -+# VCHAR = %x21-7E -+# obs-text = %x80-FF -+# header-field = field-name ":" OWS field-value OWS -+# field-name = token -+# field-value = *( field-content / obs-fold ) -+# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] -+# field-vchar = VCHAR / obs-text -+# -+# obs-fold = CRLF 1*( SP / HTAB ) -+# ; obsolete line folding -+# ; see Section 3.2.4 -+ -+# token = 1*tchar -+# -+# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" -+# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" -+# / DIGIT / ALPHA -+# ; any VCHAR, except delimiters -+# -+# VCHAR defined in
http://tools.ietf.org/html/rfc5234#appendix-B.1
-+ -+# the patterns for both name and value are more leniant than RFC -+# definitions to allow for backwards compatibility -+_is_legal_header_name = re.compile(b'^[^:\s][^:\r\n]*$').match -+_is_illegal_header_value = re.compile(b'\n(?![ \t])|\r(?![ \t\n])').search -+ - class HTTPMessage(email.message.Message): - # XXX The only usage of this method is in - # http.server.CGIHTTPRequestHandler. Maybe move the code there so -@@ -1035,12 +1064,20 @@ class HTTPConnection: - - if hasattr(header, 'encode'): - header = header.encode('ascii') -+ -+ if not _is_legal_header_name(header): -+ raise ValueError('Invalid header name %r' % (header,)) -+ - values = list(values) - for i, one_value in enumerate(values): - if hasattr(one_value, 'encode'): - values[i] = one_value.encode('latin-1') - elif isinstance(one_value, int): - values[i] = str(one_value).encode('ascii') -+ -+ if _is_illegal_header_value(values[i]): -+ raise ValueError('Invalid header value %r' % (values[i],)) -+ - value = b'\r\n\t'.join(values) - header = header + b': ' + value - self._output(header) -diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py -index c8ded92..fd71bea 100644 ---- a/lib-python/3/test/test_httplib.py -+++ b/lib-python/3/test/test_httplib.py -@@ -134,6 +134,33 @@ class HeaderTests(TestCase): - conn.putheader('Content-length', 42) - self.assertIn(b'Content-length: 42', conn._buffer) - -+ conn.putheader('Foo', ' bar ') -+ self.assertIn(b'Foo: bar ', conn._buffer) -+ conn.putheader('Bar', '\tbaz\t') -+ self.assertIn(b'Bar: \tbaz\t', conn._buffer) -+ conn.putheader('Authorization', 'Bearer mytoken') -+ self.assertIn(b'Authorization: Bearer mytoken', conn._buffer) -+ conn.putheader('IterHeader', 'IterA', 'IterB') -+ self.assertIn(b'IterHeader: IterA\r\n\tIterB', conn._buffer) -+ conn.putheader('LatinHeader', b'\xFF') -+ self.assertIn(b'LatinHeader: \xFF', conn._buffer) -+ conn.putheader('Utf8Header', b'\xc3\x80') -+ self.assertIn(b'Utf8Header: \xc3\x80', conn._buffer) -+ conn.putheader('C1-Control', b'next\x85line') -+ self.assertIn(b'C1-Control: next\x85line', conn._buffer) -+ conn.putheader('Embedded-Fold-Space', 'is\r\n allowed') -+ self.assertIn(b'Embedded-Fold-Space: is\r\n allowed', conn._buffer) -+ conn.putheader('Embedded-Fold-Tab', 'is\r\n\tallowed') -+ self.assertIn(b'Embedded-Fold-Tab: is\r\n\tallowed', conn._buffer) -+ conn.putheader('Key Space', 'value') -+ self.assertIn(b'Key Space: value', conn._buffer) -+ conn.putheader('KeySpace ', 'value') -+ self.assertIn(b'KeySpace : value', conn._buffer) -+ conn.putheader(b'Nonbreak\xa0Space', 'value') -+ self.assertIn(b'Nonbreak\xa0Space: value', conn._buffer) -+ conn.putheader(b'\xa0NonbreakSpace', 'value') -+ self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer) -+ - def test_ipv6host_header(self): - # Default host header on IPv6 transaction should wrapped by [] if - # its actual IPv6 address -@@ -153,6 +180,36 @@ class HeaderTests(TestCase): - conn.request('GET', '/foo') - self.assertTrue(sock.data.startswith(expected)) - -+ def test_invalid_headers(self): -+ conn = client.HTTPConnection('
example.com
') -+ conn.sock = FakeSocket('') -+ conn.putrequest('GET', '/') -+ -+ #
http://tools.ietf.org/html/rfc7230#section-3.2.4
, whitespace is no -+ # longer allowed in header names -+ cases = ( -+ (b'Invalid\r\nName', b'ValidValue'), -+ (b'Invalid\rName', b'ValidValue'), -+ (b'Invalid\nName', b'ValidValue'), -+ (b'\r\nInvalidName', b'ValidValue'), -+ (b'\rInvalidName', b'ValidValue'), -+ (b'\nInvalidName', b'ValidValue'), -+ (b' InvalidName', b'ValidValue'), -+ (b'\tInvalidName', b'ValidValue'), -+ (b'Invalid:Name', b'ValidValue'), -+ (b':InvalidName', b'ValidValue'), -+ (b'ValidName', b'Invalid\r\nValue'), -+ (b'ValidName', b'Invalid\rValue'), -+ (b'ValidName', b'Invalid\nValue'), -+ (b'ValidName', b'InvalidValue\r\n'), -+ (b'ValidName', b'InvalidValue\r'), -+ (b'ValidName', b'InvalidValue\n'), -+ ) -+ for name, value in cases: -+ with self.subTest((name, value)): -+ with self.assertRaisesRegex(ValueError, 'Invalid header'): -+ conn.putheader(name, value) -+ - - class BasicTest(TestCase): - def test_status_lines(self): --- -2.9.0 - diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index f0154eb..f96d232 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -1,30 +1,37 @@ -diff --git pypy3-v5.5.0-src/lib-python/3/test/regrtest.py pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new -index 8d18a9297a..e99322ebe1 100755 ---- pypy3-v5.5.0-src/lib-python/3/test/regrtest.py -+++ pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new -@@ -169,7 +169,6 @@ option '-uall,-gui'. - import importlib +commit ea4d6a12548eea7ce0424feea13a499fb7085e96 +Author: rpm-build <rpm-build> +Date: Wed Mar 29 04:31:55 2017 +0200 + + 011-no-faulthandler.patch + +diff --git a/lib-python/3/test/regrtest.py b/lib-python/3/test/regrtest.py +index c1d85f6..3d3072c 100755 +--- a/lib-python/3/test/regrtest.py ++++ b/lib-python/3/test/regrtest.py +@@ -124,7 +124,6 @@ import importlib + import argparse import builtins -import faulthandler - import getopt import io import json -@@ -197,6 +196,10 @@ try: - import multiprocessing.process + import locale +@@ -152,7 +151,10 @@ try: + import _multiprocessing, multiprocessing.process except ImportError: multiprocessing = None +- +try: + import faulthandler +except ImportError: + faulthandler = None - # Some times __path__ and __file__ are not absolute (e.g. while running from -@@ -283,17 +286,18 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, + # Lib/) and, if we change the CWD to run the tests in a temporary dir, some +@@ -486,17 +488,18 @@ def main(tests=None, **kwargs): + directly to set the values that would normally be set by flags on the command line. """ - - # Display the Python traceback on fatal errors (e.g. segfault) - faulthandler.enable(all_threads=True) - @@ -51,3 +58,37 @@ index 8d18a9297a..e99322ebe1 100755 replace_stdout() +diff --git a/lib-python/3/test/support/__init__.py b/lib-python/3/test/support/__init__.py +index 5d7f308..4424637 100644 +--- a/lib-python/3/test/support/__init__.py ++++ b/lib-python/3/test/support/__init__.py +@@ -6,7 +6,6 @@ if __name__ != 'test.support': + import collections.abc + import contextlib + import errno +-import faulthandler + import fnmatch + import functools + import gc +@@ -65,6 +64,11 @@ try: + except ImportError: + resource = None + ++try: ++ import faulthandler ++except ImportError: ++ faulthandler = None ++ + __all__ = [ + # globals + "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", +@@ -2060,7 +2064,8 @@ def start_threads(threads, unlock=None): + finally: + started = [t for t in started if t.isAlive()] + if started: +- faulthandler.dump_traceback(sys.stdout) ++ if faulthandler is not None: ++ faulthandler.dump_traceback(sys.stdout) + raise AssertionError('Unable to join %d threads' % len(started)) + + @contextlib.contextmanager diff --git a/pypy3.spec b/pypy3.spec index f878bb2..9e9d37a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,7 @@ Name: pypy3 -Version: 5.5.0 -Release: 6%{?dist} +Version: 5.9.0 +%global pyversion 3.5 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -131,7 +132,7 @@ ExcludeArch: aarch64 %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v%{version}-alpha-src.tar…
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-v%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -141,36 +142,21 @@ Source2: macros.pypy3 # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch0: 001-nevertty.patch +Patch1: 001-nevertty.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler # and linker are captured: -Patch1: 006-always-log-stdout.patch +Patch6: 006-always-log-stdout.patch # Disable the printing of a quote from IRC on startup (these are stored in # ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could # cause confusion for end-users (and many are in-jokes within the PyPy # community that won't make sense outside of it). [Sorry to be a killjoy] -Patch2: 007-remove-startup-message.patch - - -# CVE-2016-0772 python: smtplib StartTLS stripping attack -# rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
-# rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
-# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/d590114c2394
-# Raise an error when STARTTLS fails -Patch4: 009-raise-an-error-when-STARTTLS-fails.patch - -# CVE-2016-5699 python: http protocol steam injection attack -# rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
-# rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
-# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
-# Disabled HTTP header injections in http.client -Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch +Patch7: 007-remove-startup-message.patch # It seems ppc64 has no faulthandler -Patch6: 011-no-faulthandler.patch +Patch11: 011-no-faulthandler.patch # Build-time requirements: @@ -186,12 +172,14 @@ Patch6: 011-no-faulthandler.patch %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy +# no pypy-pycparser available ATM %global bootstrap_python_interp pypy %else # pypy3 can only be build with python2 BuildRequires: python2-devel +BuildRequires: python-pycparser %global bootstrap_python_interp python %endif @@ -523,8 +511,9 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages -ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 -ln -s pypy3.3 %{buildroot}/%{_bindir}/pypy3 +ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} +ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} +ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -790,10 +779,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy-c +CheckPyPy %{name}-c %if 0%{with_stackless} -CheckPyPy pypy3-stackless +CheckPyPy %{name}-stackless %endif %endif # run_selftests @@ -821,7 +810,7 @@ CheckPyPy pypy3-stackless %license LICENSE %doc README.rst %{_bindir}/pypy3 -%{_bindir}/pypy3.3 +%{_bindir}/pypy%{pyversion} %{pypyprefix}/bin/ %exclude %{_libdir}/%{name}-%{version}.tar.bz2 @@ -840,6 +829,13 @@ CheckPyPy pypy3-stackless %changelog +* Fri Oct 20 2017 Miro Hrončok <mhroncok(a)redhat.com> - 5.9.0-1 +- Update to 5.9 (#1504427) +- Remove merged patches +- Reindex the patches to match the filenames +- Rebase the faulthandler Patch11 +- BR python-pycparser + * Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-6 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/sources b/sources index 5155d51..728ee37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -536008fd7b17af8878915393fc1ecfc3 pypy3.3-v5.5.0-alpha-src.tar.bz2 +SHA512 (pypy3-v5.9.0-src.tar.bz2) = 3d5384d644fdd1bc8b95f5747dbd1771ae06eb2cfc7b57be359b8bf40177676afd097620d0cb9d9000c40d8cce075cfa6bfd92de987d3dd927c04d7d595dc5bd commit 79816c5293727d3eb45debfb1ba42e5bc8b3db29 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Aug 3 06:35:52 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 6997965..f878bb2 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-6 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+ * Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
commit aebba1447fc82a76bc6e7102083198e340d076bd Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Jul 27 09:23:17 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 73f75d3..6997965 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Thu Jul 27 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+ * Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
commit 717803cfa0815090a04163482c395a46dced8f02 Author: Petr Písař <ppisar(a)redhat.com> Date: Wed Jul 12 14:43:49 2017 +0200 perl dependency renamed to perl-interpreter <
https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules
> diff --git a/pypy3.spec b/pypy3.spec index c74d495..73f75d3 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -227,7 +227,7 @@ BuildRequires: time BuildRequires: /usr/bin/free # For use in the selftests, for imposing a per-test timeout: -BuildRequires: perl +BuildRequires: perl-interpreter %endif # No prelink on these arches commit 51ae82f0cce74a6fb047e40d45173c75bffc41f9 Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Sat Feb 11 08:09:09 2017 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 5598133..c74d495 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -840,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Sat Feb 11 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.5.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+ * Sun Nov 13 2016 Dan Horák <dan[at]danny.cz> - 5.5.0-3 - set z10 as the base CPU for s390(x) build commit b929faae35b08942da1a1d1d994b26e3400f48c3 Author: Dan Horák <dan(a)danny.cz> Date: Sun Nov 13 09:22:11 2016 +0100 - set z10 as the base CPU for s390(x) build diff --git a/pypy3.spec b/pypy3.spec index 903acb9..5598133 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -316,6 +316,11 @@ find lib-python/%{pylibver} -name "*.py" -exec \ %endif %build +%ifarch s390 s390x +# pypy3 requires z10 at least +%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /') +%endif + # Top memory usage is about 4.5GB on arm7hf free @@ -835,6 +840,9 @@ CheckPyPy pypy3-stackless %changelog +* Sun Nov 13 2016 Dan Horák <dan[at]danny.cz> - 5.5.0-3 +- set z10 as the base CPU for s390(x) build + * Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 5.5.0-2 - Also build on arm and s390* commit 404c37f2ddb3343127726d561cd86b1a6488cd7f Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 09:29:11 2016 -0500 Restore renaming of pypytrace-mode to pypy3trace-mode diff --git a/pypy3.spec b/pypy3.spec index 837273b..903acb9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -650,8 +650,9 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} -install -m0644 -p -D -t %{buildroot}/%{_emacs_sitelispdir} \ - rpython/jit/tool/pypytrace-mode.{el,elc} +mkdir -p %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: commit 91071982692c6dd8da9894e3180cd7bb5b4d290e Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 08:10:01 2016 -0500 It turns out ppc has no gold So use gold on arm/i686/amd64 only. diff --git a/pypy3.spec b/pypy3.spec index 16d5f46..837273b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -311,7 +311,9 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; -sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py +%ifarch %{ix86} x86_64 %{arm} + sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py +%endif %build # Top memory usage is about 4.5GB on arm7hf commit ad0d37c683891eaf084a84e4a9f2205ce3c5585b Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 06:51:54 2016 -0500 Also build on arm and s390* diff --git a/pypy3.spec b/pypy3.spec index b6e6d0b..16d5f46 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 5.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # LGPL and another free license we'd need to ask spot about are present in some @@ -11,7 +11,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 armv7hl s390 s390x +ExcludeArch: aarch64 # High-level configuration of the build: @@ -311,7 +311,10 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; +sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py + %build +# Top memory usage is about 4.5GB on arm7hf free BuildPyPy() { @@ -829,6 +832,9 @@ CheckPyPy pypy3-stackless %changelog +* Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 5.5.0-2 +- Also build on arm and s390* + * Sat Oct 15 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.5.0-1 - PyPy 3.3 5.5.0 - On Fedora 26+, BR compat-openssl10-devel commit 37fe95796cc55f2af8290bf78c32226b2ac09fc3 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Sat Nov 12 06:51:35 2016 -0500 Make the spec file a tiny bit shorter diff --git a/pypy3.spec b/pypy3.spec index 0245be9..b6e6d0b 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -260,7 +260,6 @@ CPU architecture. %package libs -Group: Development/Languages Summary: Run-time libraries used by PyPy implementations of Python 3 # We supply an emacs mode for the JIT viewer. @@ -274,7 +273,6 @@ Libraries required by the various PyPy implementations of Python 3. %package devel -Group: Development/Languages Summary: Development tools for working with PyPy3 Requires: pypy3%{?_isa} = %{version}-%{release} @@ -284,7 +282,6 @@ Header files for building C extension modules against PyPy3 %if 0%{with_stackless} %package stackless -Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless @@ -516,8 +513,8 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages -ln -s %{pypyprefix}/bin/pypy3 %{buildroot}/%{_bindir}/pypy3 ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 +ln -s pypy3.3 %{buildroot}/%{_bindir}/pypy3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -648,19 +645,17 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} -mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +install -m0644 -p -D -t %{buildroot}/%{_emacs_sitelispdir} \ + rpython/jit/tool/pypytrace-mode.{el,elc} %endif # Install macros for rpm: -mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d -install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d +install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2} # Remove files we don't want: -rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 -rm -f %{buildroot}%{pypyprefix}/LICENSE -rm -f %{buildroot}%{pypyprefix}/README.rst +rm -f %{buildroot}%{_libdir}/pypy3-5.2.0.tar.bz2 \ + %{buildroot}%{pypyprefix}/LICENSE \ + %{buildroot}%{pypyprefix}/README.rst # wtf? This is probably masking some bigger problem, but let's do this for now mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : commit 6b002d36f3cb6a967ccf98fb1e66330fdd7dda09 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 15:32:20 2016 -0500 Also exclude armv7hl Build generates a lot of warnings and errors, and fails despite having 4GB RAM + 4GB swap available. The error is /usr/bin/ld: failed to set dynamic section sizes: Memory exhausted collect2: error: ld returned 1 exit status but this might be caused by the earlier errors. diff --git a/pypy3.spec b/pypy3.spec index d6bb1dd..0245be9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -3,7 +3,6 @@ Version: 5.5.0 Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler -Group: Development/Languages # LGPL and another free license we'd need to ask spot about are present in some # java jars that we're not building with atm (in fact, we're deleting them # before building). If we restore those we'll have to work out the new @@ -12,7 +11,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 armv7hl s390 s390x # High-level configuration of the build: commit 0b4deeff51596dd2f8ec1b9ced18caa60f6ddaa0 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 07:57:41 2016 -0500 Add BR for free diff --git a/pypy3.spec b/pypy3.spec index 3c5f5c5..d6bb1dd 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -225,6 +225,7 @@ BuildRequires: gc-devel # For use in the selftests, for recording stats: BuildRequires: time +BuildRequires: /usr/bin/free # For use in the selftests, for imposing a per-test timeout: BuildRequires: perl commit 56984a45242e2ed09394b206e3cda14aef15fafa Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Nov 8 07:50:10 2016 -0500 Print the amount of available memory diff --git a/pypy3.spec b/pypy3.spec index 934a434..3c5f5c5 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -315,6 +315,7 @@ find lib-python/%{pylibver} -name "*.py" -exec \ \; %build +free BuildPyPy() { ExeName=$1 commit 693a83b0c291b9c876f08bdc5e81c6718bf71929 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Mon Nov 7 23:43:54 2016 -0500 Add a hack to fix tests, and restore building on ppc* I didn't test ppc64le yet, but at least ppc64 builds fine with the kludge. diff --git a/pypy3.spec b/pypy3.spec index 0c266d0..934a434 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,7 +12,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x ppc64le ppc64 +ExcludeArch: aarch64 s390 s390x # High-level configuration of the build: @@ -661,6 +661,9 @@ rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 rm -f %{buildroot}%{pypyprefix}/LICENSE rm -f %{buildroot}%{pypyprefix}/README.rst +# wtf? This is probably masking some bigger problem, but let's do this for now +mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || : + %check topdir=$(pwd) commit 817c77d554b6dd380fd335a29c43dce88ba052a5 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Thu Nov 3 18:42:18 2016 -0400 Also exclude ppc64* The tests are failing (looks like pypy wasn't tested on ppc64 at all), and I cannot solve this without access to the hardware. diff --git a/pypy3.spec b/pypy3.spec index d826142..0c266d0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -12,7 +12,7 @@ License: MIT and Python and UCD URL:
http://pypy.org/
# Not available yet -ExcludeArch: aarch64 s390 s390x +ExcludeArch: aarch64 s390 s390x ppc64le ppc64 # High-level configuration of the build: commit aa6a9d04d6a20b99222a9e8db25a1e669ccc7eb4 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Thu Nov 3 14:49:28 2016 -0400 PPC64 has no faulthandler diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch new file mode 100644 index 0000000..f0154eb --- /dev/null +++ b/011-no-faulthandler.patch @@ -0,0 +1,53 @@ +diff --git pypy3-v5.5.0-src/lib-python/3/test/regrtest.py pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +index 8d18a9297a..e99322ebe1 100755 +--- pypy3-v5.5.0-src/lib-python/3/test/regrtest.py ++++ pypy3-v5.5.0-src/lib-python/3/test/regrtest.py-new +@@ -169,7 +169,6 @@ option '-uall,-gui'. + import importlib + + import builtins +-import faulthandler + import getopt + import io + import json +@@ -197,6 +196,10 @@ try: + import multiprocessing.process + except ImportError: + multiprocessing = None ++try: ++ import faulthandler ++except ImportError: ++ faulthandler = None + + + # Some times __path__ and __file__ are not absolute (e.g. while running from +@@ -283,17 +286,18 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, + on the command line. + """ + +- # Display the Python traceback on fatal errors (e.g. segfault) +- faulthandler.enable(all_threads=True) +- +- # Display the Python traceback on SIGALRM or SIGUSR1 signal +- signals = [] +- if hasattr(signal, 'SIGALRM'): +- signals.append(signal.SIGALRM) +- if hasattr(signal, 'SIGUSR1'): +- signals.append(signal.SIGUSR1) +- for signum in signals: +- faulthandler.register(signum, chain=True) ++ if faulthandler: ++ # Display the Python traceback on fatal errors (e.g. segfault) ++ faulthandler.enable(all_threads=True) ++ ++ # Display the Python traceback on SIGALRM or SIGUSR1 signal ++ signals = [] ++ if hasattr(signal, 'SIGALRM'): ++ signals.append(signal.SIGALRM) ++ if hasattr(signal, 'SIGUSR1'): ++ signals.append(signal.SIGUSR1) ++ for signum in signals: ++ faulthandler.register(signum, chain=True) + + replace_stdout() + diff --git a/pypy3.spec b/pypy3.spec index ea45edf..d826142 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -170,6 +170,9 @@ Patch4: 009-raise-an-error-when-STARTTLS-fails.patch # Disabled HTTP header injections in http.client Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch +# It seems ppc64 has no faulthandler +Patch6: 011-no-faulthandler.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so commit 347fb465b0fc7717f6e6b171b895c0c01f6d77a3 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:52:20 2016 +0200 Exclude not available arches diff --git a/pypy3.spec b/pypy3.spec index 8652182..ea45edf 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -11,6 +11,9 @@ Group: Development/Languages License: MIT and Python and UCD URL:
http://pypy.org/
+# Not available yet +ExcludeArch: aarch64 s390 s390x + # High-level configuration of the build: # PyPy consists of an implementation of an interpreter (with JIT compilation) commit c12d8bfa0bbfd60c56c641dbe8d522681f3d35cf Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:17:55 2016 +0200 Sources for 347975d diff --git a/.gitignore b/.gitignore index 60f26ec..3fcf7b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pypy3-2.4.0-src.tar.bz2 /pypy3.3-v5.2.0-alpha1-src.tar.bz2 +/pypy3.3-v5.5.0-alpha-src.tar.bz2 diff --git a/sources b/sources index 0e4fa7b..5155d51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e4bbd6fe42481a17f705611d76914eda pypy3.3-v5.2.0-alpha1-src.tar.bz2 +536008fd7b17af8878915393fc1ecfc3 pypy3.3-v5.5.0-alpha-src.tar.bz2 commit 347975dbf4523b2a8636ff70c59a5b537b9b4375 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Oct 22 14:11:41 2016 +0200 PyPy 3.3 5.5.0 diff --git a/pypy3.spec b/pypy3.spec index 67819c7..8652182 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 -Version: 5.2.0 -Release: 0.1.alpha1%{?dist} +Version: 5.5.0 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -129,7 +129,7 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v%{version}-alpha-src.tar…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -201,13 +201,18 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel -BuildRequires: openssl-devel BuildRequires: gdbm-devel BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif +%if 0%{?fedora} >= 26 +BuildRequires: compat-openssl10-devel +%else +BuildRequires: openssl-devel +%endif + %if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -281,7 +286,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3.3-v5.2.0-alpha1-src -p1 -S git +%autosetup -n pypy3-v%{version}-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -803,6 +808,8 @@ CheckPyPy pypy3-stackless %{_bindir}/pypy3.3 %{pypyprefix}/bin/ +%exclude %{_libdir}/%{name}-%{version}.tar.bz2 + %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h @@ -817,6 +824,10 @@ CheckPyPy pypy3-stackless %changelog +* Sat Oct 15 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.5.0-1 +- PyPy 3.3 5.5.0 +- On Fedora 26+, BR compat-openssl10-devel + * Sat Jul 02 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.2.0-0.1.alpha1 - First alpha build of PyPy 3.3 commit 343676a8999d3e5b141b58ec6c9d8e167304ed9f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 8 14:38:18 2016 +0200 First alpha build of PyPy 3.3 diff --git a/.gitignore b/.gitignore index c9f3d9d..60f26ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pypy3-2.4.0-src.tar.bz2 +/pypy3.3-v5.2.0-alpha1-src.tar.bz2 diff --git a/001-nevertty.patch b/001-nevertty.patch new file mode 100644 index 0000000..b1db988 --- /dev/null +++ b/001-nevertty.patch @@ -0,0 +1,13 @@ +diff --git a/rpython/tool/ansi_print.py b/rpython/tool/ansi_print.py +index bfa40be..29dd332 100644 +--- a/rpython/tool/ansi_print.py ++++ b/rpython/tool/ansi_print.py +@@ -7,7 +7,7 @@ from py.io import ansi_print + from rpython.tool.ansi_mandelbrot import Driver + + +-isatty = getattr(sys.stderr, 'isatty', lambda: False) ++isatty = lambda: False + mandelbrot_driver = Driver() + wrote_dot = False # global shared state + diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch index 5d49335..0635200 100644 --- a/006-always-log-stdout.patch +++ b/006-always-log-stdout.patch @@ -1,7 +1,8 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py ---- pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:35:37.680237338 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:41:04.113098738 +0200 -@@ -138,6 +138,8 @@ class Platform(object): +diff --git a/rpython/translator/platform/__init__.py b/rpython/translator/platform/__init__.py +index 051668b..6e59acc 100644 +--- a/rpython/translator/platform/__init__.py ++++ b/rpython/translator/platform/__init__.py +@@ -140,6 +140,8 @@ class Platform(object): self._handle_error(returncode, stdout, stderr, outname) def _handle_error(self, returncode, stdout, stderr, outname): diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index 2ff9068..9654d1c 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -1,12 +1,24 @@ -diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py ---- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 -+++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 -@@ -4,7 +4,7 @@ import sys - irc_header = "And now for something completely different" - - --def interactive_console(mainmodule=None, quiet=False): -+def interactive_console(mainmodule=None, quiet=True): - # set sys.{ps1,ps2} just before invoking the interactive interpreter. This - # mimics what CPython does in pythonrun.c - if not hasattr(sys, 'ps1'): +diff --git a/lib_pypy/_pypy_interact.py b/lib_pypy/_pypy_interact.py +index 9542f54..5e44fb4 100644 +--- a/lib_pypy/_pypy_interact.py ++++ b/lib_pypy/_pypy_interact.py +@@ -13,19 +13,6 @@ def interactive_console(mainmodule=None, quiet=False): + sys.ps1 = '>>>> ' + if not hasattr(sys, 'ps2'): + sys.ps2 = '.... ' +- # +- if not quiet: +- try: +- from _pypy_irc_topic import some_topic +- text = "%s: ``%s''" % ( irc_header, some_topic()) +- while len(text) >= 80: +- i = text[:80].rfind(' ') +- print(text[:i]) +- text = text[i+1:] +- print(text) +- except ImportError: +- pass +- # + run_interactive = run_simple_interactive_console + try: + if not os.isatty(sys.stdin.fileno()): diff --git a/008-maximum-recursion-depth.patch b/008-maximum-recursion-depth.patch deleted file mode 100644 index 6d3d157..0000000 --- a/008-maximum-recursion-depth.patch +++ /dev/null @@ -1,179 +0,0 @@ -diff --git a/rpython/jit/metainterp/blackhole.py b/rpython/jit/metainterp/blackhole.py -index 9b14943..b9d1c4c 100644 ---- a/rpython/jit/metainterp/blackhole.py -+++ b/rpython/jit/metainterp/blackhole.py -@@ -1052,35 +1052,45 @@ class BlackholeInterpreter(object): - - @arguments("cpu", "i", "R", "d", returns="i") - def bhimpl_residual_call_r_i(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, None, args_r, None, calldescr) - @arguments("cpu", "i", "R", "d", returns="r") - def bhimpl_residual_call_r_r(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, None, args_r, None, calldescr) - @arguments("cpu", "i", "R", "d") - def bhimpl_residual_call_r_v(cpu, func, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, None, args_r, None, calldescr) - - @arguments("cpu", "i", "I", "R", "d", returns="i") - def bhimpl_residual_call_ir_i(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, args_i, args_r, None, calldescr) - @arguments("cpu", "i", "I", "R", "d", returns="r") - def bhimpl_residual_call_ir_r(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, args_i, args_r, None, calldescr) - @arguments("cpu", "i", "I", "R", "d") - def bhimpl_residual_call_ir_v(cpu, func, args_i, args_r, calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, args_i, args_r, None, calldescr) - - @arguments("cpu", "i", "I", "R", "F", "d", returns="i") - def bhimpl_residual_call_irf_i(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_i(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d", returns="r") - def bhimpl_residual_call_irf_r(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_r(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d", returns="f") - def bhimpl_residual_call_irf_f(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_f(func, args_i, args_r, args_f, calldescr) - @arguments("cpu", "i", "I", "R", "F", "d") - def bhimpl_residual_call_irf_v(cpu, func, args_i,args_r,args_f,calldescr): -+ workaround2200.active = True - return cpu.bh_call_v(func, args_i, args_r, args_f, calldescr) - - # conditional calls - note that they cannot return stuff -@@ -1108,44 +1118,54 @@ class BlackholeInterpreter(object): - - @arguments("cpu", "j", "R", returns="i") - def bhimpl_inline_call_r_i(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "R", returns="r") - def bhimpl_inline_call_r_r(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "R") - def bhimpl_inline_call_r_v(cpu, jitcode, args_r): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - None, args_r, None, jitcode.calldescr) - - @arguments("cpu", "j", "I", "R", returns="i") - def bhimpl_inline_call_ir_i(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", returns="r") - def bhimpl_inline_call_ir_r(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - @arguments("cpu", "j", "I", "R") - def bhimpl_inline_call_ir_v(cpu, jitcode, args_i, args_r): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - args_i, args_r, None, jitcode.calldescr) - - @arguments("cpu", "j", "I", "R", "F", returns="i") - def bhimpl_inline_call_irf_i(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F", returns="r") - def bhimpl_inline_call_irf_r(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F", returns="f") - def bhimpl_inline_call_irf_f(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_f(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - @arguments("cpu", "j", "I", "R", "F") - def bhimpl_inline_call_irf_v(cpu, jitcode, args_i, args_r, args_f): -+ workaround2200.active = True - return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), - args_i, args_r, args_f, jitcode.calldescr) - -@@ -1438,6 +1458,8 @@ class BlackholeInterpreter(object): - if not self.nextblackholeinterp: - self._exit_frame_with_exception(current_exc) - return current_exc -+ finally: -+ workaround2200.active = False - # - # pass the frame's return value to the caller - caller = self.nextblackholeinterp -@@ -1656,3 +1678,10 @@ def convert_and_run_from_pyjitpl(metainterp, raising_exception=False): - current_exc = lltype.nullptr(rclass.OBJECTPTR.TO) - # - _run_forever(firstbh, current_exc) -+ -+# ____________________________________________________________ -+ -+class WorkaroundIssue2200(object): -+ pass -+workaround2200 = WorkaroundIssue2200() -+workaround2200.active = False -diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py -index ad81456..c820185 100644 ---- a/rpython/jit/metainterp/test/test_ajit.py -+++ b/rpython/jit/metainterp/test/test_ajit.py -@@ -4044,3 +4044,30 @@ class TestLLtype(BaseLLtypeTests, LLJitMixin): - res = self.interp_operations(f, [17]) - assert res == 42 - self.check_operations_history(guard_true=1, guard_false=0) -+ -+ def test_issue2200_recursion(self): -+ # Reproduces issue #2200. This test contains no recursion, -+ # but due to an unlikely combination of factors it ends up -+ # creating an RPython-level recursion, one per loop iteration. -+ # The recursion is: blackhole interp from the failing guard -> -+ # does the call to enter() as a normal call -> enter() runs -+ # can_enter_jit() as if we're interpreted -> we enter the JIT -+ # again from the start of the loop -> the guard fails again -+ # during the next iteration -> blackhole interp. All arrows -+ # in the previous sentence are one or more levels of RPython -+ # function calls. -+ driver = JitDriver(greens=[], reds=["i"]) -+ def enter(i): -+ driver.can_enter_jit(i=i) -+ def f(): -+ set_param(None, 'trace_eagerness', 999999) -+ i = 0 -+ while True: -+ driver.jit_merge_point(i=i) -+ i += 1 -+ if i >= 300: -+ return i -+ promote(i + 1) # a failing guard -+ enter(i) -+ -+ self.meta_interp(f, []) -diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py -index 805933e..ca47f03 100644 ---- a/rpython/jit/metainterp/warmstate.py -+++ b/rpython/jit/metainterp/warmstate.py -@@ -405,6 +405,14 @@ class WarmEnterState(object): - bound_reached(hash, None, *args) - return - -+ # Workaround for issue #2200, maybe temporary. This is not -+ # a proper fix, but only a hack that should work well enough -+ # for PyPy's main jitdriver... See test_issue2200_recursion -+ from rpython.jit.metainterp.blackhole import workaround2200 -+ if workaround2200.active: -+ workaround2200.active = False -+ return -+ - # Here, we have found 'cell'. - # - if cell.flags & (JC_TRACING | JC_TEMPORARY): diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch index ba1cc53..58ceb01 100644 --- a/009-raise-an-error-when-STARTTLS-fails.patch +++ b/009-raise-an-error-when-STARTTLS-fails.patch @@ -1,6 +1,6 @@ -From 9092f6266c3054befff053aa943632856cedbdba Mon Sep 17 00:00:00 2001 +From 4c0f6a6fe6c71009ab4a6b3716e70af021e04904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Fri, 1 Jul 2016 11:42:53 +0200 +Date: Sat, 2 Jul 2016 20:18:12 +0200 Subject: [PATCH] Raise an error when STARTTLS fails CVE-2016-0772 python: smtplib StartTLS stripping attack @@ -15,10 +15,10 @@ Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> 1 file changed, 5 insertions(+) diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py -index 679e478..1aacfaf 100644 +index 57f181b..5656cc6 100755 --- a/lib-python/3/smtplib.py +++ b/lib-python/3/smtplib.py -@@ -666,6 +666,11 @@ class SMTP: +@@ -680,6 +680,11 @@ class SMTP: self.ehlo_resp = None self.esmtp_features = {} self.does_esmtp = 0 diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch index 10591d5..bed386c 100644 --- a/010-disabled-HTTP-header-injections-in-http.client.patch +++ b/010-disabled-HTTP-header-injections-in-http.client.patch @@ -1,6 +1,6 @@ -From 82dc922c7c4771ef789f5b395f54a603c693b05e Mon Sep 17 00:00:00 2001 +From 9a8db191cf8a3557a24e91081bf434d581b98c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> -Date: Fri, 1 Jul 2016 13:08:55 +0200 +Date: Sat, 2 Jul 2016 20:20:58 +0200 Subject: [PATCH] Disabled HTTP header injections in http.client. CVE-2016-5699 python: http protocol steam injection attack @@ -16,7 +16,7 @@ Based on an upstream change by Demian Brecht and Serhiy Storchaka 2 files changed, 94 insertions(+) diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py -index 5466d06..1d215d8 100644 +index e05c84d..476d6c8 100644 --- a/lib-python/3/http/client.py +++ b/lib-python/3/http/client.py @@ -70,6 +70,7 @@ import email.parser @@ -27,9 +27,9 @@ index 5466d06..1d215d8 100644 import socket import collections from urllib.parse import urlsplit -@@ -207,6 +208,34 @@ MAXAMOUNT = 1048576 - # maximal line length when calling readline(). - _MAXLINE = 65536 +@@ -217,6 +218,34 @@ _MAXLINE = 65536 + _MAXHEADERS = 100 + +# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) +# @@ -62,7 +62,7 @@ index 5466d06..1d215d8 100644 class HTTPMessage(email.message.Message): # XXX The only usage of this method is in # http.server.CGIHTTPRequestHandler. Maybe move the code there so -@@ -953,12 +982,20 @@ class HTTPConnection: +@@ -1035,12 +1064,20 @@ class HTTPConnection: if hasattr(header, 'encode'): header = header.encode('ascii') @@ -73,7 +73,7 @@ index 5466d06..1d215d8 100644 values = list(values) for i, one_value in enumerate(values): if hasattr(one_value, 'encode'): - values[i] = one_value.encode('latin1') + values[i] = one_value.encode('latin-1') elif isinstance(one_value, int): values[i] = str(one_value).encode('ascii') + @@ -84,12 +84,12 @@ index 5466d06..1d215d8 100644 header = header + b': ' + value self._output(header) diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py -index 420302c..31d3bd0 100644 +index c8ded92..fd71bea 100644 --- a/lib-python/3/test/test_httplib.py +++ b/lib-python/3/test/test_httplib.py @@ -134,6 +134,33 @@ class HeaderTests(TestCase): conn.putheader('Content-length', 42) - self.assertTrue(b'Content-length: 42' in conn._buffer) + self.assertIn(b'Content-length: 42', conn._buffer) + conn.putheader('Foo', ' bar ') + self.assertIn(b'Foo: bar ', conn._buffer) diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch deleted file mode 100644 index c97eaf3..0000000 --- a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py ---- pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-27 10:35:37.648237156 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-28 10:15:58.200426205 +0200 -@@ -25,7 +25,7 @@ class AnsiLog: - self.kw_to_color = self.KW_TO_COLOR.copy() - self.kw_to_color.update(kw_to_color) - self.file = file -- self.fancy = True -+ self.fancy = False - self.isatty = getattr(sys.stderr, 'isatty', lambda: False) - if self.fancy and self.isatty(): - self.mandelbrot_driver = Driver() diff --git a/pypy3.spec b/pypy3.spec index 5666e56..67819c7 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 -Version: 2.4.0 -Release: 6%{?dist} +Version: 5.2.0 +Release: 0.1.alpha1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -116,7 +116,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/%{name}-%{version} +%global pypyprefix %{_libdir}/pypy3-%{version} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -129,17 +129,17 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/%{name}-%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.2.0-alpha1-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.%{name} +Source2: macros.pypy3 # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch0: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +Patch0: 001-nevertty.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler @@ -152,9 +152,6 @@ Patch1: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch2: 007-remove-startup-message.patch -#
https://bugzilla.redhat.com/show_bug.cgi?id=1307889
-#
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
-Patch3: 008-maximum-recursion-depth.patch # CVE-2016-0772 python: smtplib StartTLS stripping attack # rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
@@ -180,7 +177,7 @@ Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch # Note, pypy3 is built with pypy2, so no dependency cycle -%global use_self_when_building 1 +%global use_self_when_building 0 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy @@ -205,6 +202,8 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel +BuildRequires: gdbm-devel +BuildRequires: xz-devel %ifnarch s390 BuildRequires: valgrind-devel %endif @@ -234,7 +233,7 @@ BuildRequires: emacs BuildRequires: git # Metadata for the core package (the JIT build): -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -266,7 +265,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pypy3%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -276,13 +275,13 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n %{name}-%{version}-src -p1 -S git +%autosetup -n pypy3.3-v5.2.0-alpha1-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -304,20 +303,6 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; -# Hacky fix to allow the curses module to build on x86_64; otherwise we get: -# cffi.ffiplatform.VerificationError: anonymous MEVENT: wrong total size -# (we have 24, but C compiler says 20) -#
https://github.com/archlinuxcn/repo/commit/560a75090333b6de8a1de960acac5e62…
-%ifarch x86_64 - _type=unsigned -%else - _type=uint32_t -%endif - -sed -i -e "s/typedef unsigned long mmask_t/typedef $_type mmask_t/" \ - -e "s/typedef unsigned long chtype/typedef $_type chtype/" \ - lib_pypy/_curses.py - %build BuildPyPy() { @@ -379,8 +364,7 @@ BuildPyPy() { # of root pointers: %global gcrootfinder_options --gcrootfinder=shadowstack - # Prevent memory exhaustion - export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-g//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS") %else # Go with the default, which is "asmgcc" @@ -399,7 +383,7 @@ BuildPyPy() { # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//' -e 's/-g//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') %endif @@ -425,7 +409,6 @@ BuildPyPy() { PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ $INTERP ../../rpython/bin/rpython \ - --output=$ExeName \ %{gcrootfinder_options} \ $Options \ targetpypystandalone @@ -442,7 +425,7 @@ BuildPyPy() { } BuildPyPy \ - %{name} \ + pypy3 \ %if 0%{with_jit} "-Ojit" \ %else @@ -452,7 +435,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - %{name}-stackless \ + pypy3-stackless \ "--stackless" %endif @@ -498,35 +481,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy %{name} - -%if 0%{with_stackless} -InstallPyPy %{name}-stackless -%endif - -# Install the various support libraries as described at: -#
http://codespeak.net/pypy/dist/pypy/doc/getting-started-python.html#install…
-# which refers to a "PREFIX" found relative to the location of the binary. -# Given that the pypy binaries will be in /usr/bin, PREFIX can be -# "../share/pypy-1.2" relative to that directory, i.e. /usr/share/pypy-1.2 -# -# Running "strace" on a built binary indicates that it searches within -# PREFIX/lib-python/modified-2.5.2 -# not -# PREFIX/lib-python/modified.2.5.2 -# as given on the above page, i.e. it uses '-' not '.' +# Run installing script, archive-name %{name}-%{version} in %{buildroot}/%{_libdir} == %{pypyprefix} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{version} --builddir %{buildroot}/%{_libdir} -cp -a lib-python %{buildroot}/%{pypyprefix} - -cp -a lib_pypy %{buildroot}/%{pypyprefix} - -# Remove a text file that documents which selftests fail on Win32: -rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt - -# Remove a text file containing upstream's recipe for syncing stdlib in -# their hg repository with cpython's: -rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: @@ -546,6 +504,8 @@ find \ mkdir -p %{buildroot}/%{pypyprefix}/site-packages +ln -s %{pypyprefix}/bin/pypy3 %{buildroot}/%{_bindir}/pypy3 +ln -s %{pypyprefix}/bin/pypy3.3 %{buildroot}/%{_bindir}/pypy3.3 # pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly # different bytecode format to CPython. It doesn't use .pyo files: the -O flag @@ -604,16 +564,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/%{name} \ + %{buildroot}%{pypyprefix}/bin/pypy3 \ 0 -%{buildroot}/%{pypyprefix}/%{name} -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/%{name} -c 'import tkinter' -%{buildroot}/%{pypyprefix}/%{name} -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/%{name} -c 'import _curses' -%{buildroot}/%{pypyprefix}/%{name} -c 'import curses' -%{buildroot}/%{pypyprefix}/%{name} -c 'import syslog' -%{buildroot}/%{pypyprefix}/%{name} -c 'from _sqlite3 import *' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _sqlite3' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _curses' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import curses' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import syslog' +%{buildroot}%{pypyprefix}/bin/pypy3 -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -626,8 +586,8 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # it's not yet clear to me how upstream plan to deal with the C extension # interface going forward, so let's just mimic upstream for now. %global pypy_include_dir %{pypyprefix}/include -mkdir -p %{buildroot}/%{pypy_include_dir} -cp include/*.h %{buildroot}/%{pypy_include_dir} +mkdir -p %{buildroot}%{pypy_include_dir} +rm -f %{buildroot}%{pypy_include_dir}/README # Capture the RPython source code files from the build within the debuginfo @@ -677,16 +637,18 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d -# Remove build script from the package -rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py +# Remove files we don't want: +rm -f %{buildroot}%{_libdir}//pypy3-5.2.0.tar.bz2 +rm -f %{buildroot}%{pypyprefix}/LICENSE +rm -f %{buildroot}%{pypyprefix}/README.rst %check topdir=$(pwd) @@ -807,10 +769,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy %{name} +CheckPyPy pypy-c %if 0%{with_stackless} -CheckPyPy %{name}-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -826,37 +788,39 @@ CheckPyPy %{name}-stackless %dir %{pypyprefix} %dir %{pypyprefix}/lib-python -%{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/%{name}trace-mode.el -%{_emacs_sitelispdir}/%{name}trace-mode.elc +%{_emacs_sitelispdir}/pypy3trace-mode.el +%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif %files %license LICENSE %doc README.rst -%{_bindir}/%{name} -%{pypyprefix}/%{name} +%{_bindir}/pypy3 +%{_bindir}/pypy3.3 +%{pypyprefix}/bin/ %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{_rpmconfigdir}/macros.d/macros.%{name} +%{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless %license LICENSE %doc README.rst -%{_bindir}/%{name}-stackless +%{_bindir}/pypy-stackless %endif %changelog -* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-6 +* Sat Jul 02 2016 Miro Hrončok <mhroncok(a)redhat.com> - 5.2.0-0.1.alpha1 +- First alpha build of PyPy 3.3 + +* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-3 - Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack - Raise an error when STARTTLS fails - rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
@@ -867,18 +831,6 @@ CheckPyPy %{name}-stackless - rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
-* Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 -- Fix FTBFS (#1307889) -- Add patch to fix maximum recursion depth error during build -- Don't use -g flag to prevent memory exhaustion -- Add fix form Arch Linux to prevent VerificationError during the build - -* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
- -* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 -- Bump release to rebuild with new execstack - * Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/sources b/sources index e4d98b7..0e4fa7b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -96ba72916114d16904e12562b5d84e51 pypy3-2.4.0-src.tar.bz2 +e4bbd6fe42481a17f705611d76914eda pypy3.3-v5.2.0-alpha1-src.tar.bz2 commit 092bdc18b3bd62174ce8db6323a5a1f59d080fd9 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri Jul 1 15:59:13 2016 +0200 Fix for CVE-2016-0772 and CVE-2016-5699 Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack - Raise an error when STARTTLS fails - rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
- rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
- Fixed upstream:
https://hg.python.org/cpython/rev/d590114c2394
Fix for: CVE-2016-5699 python: http protocol steam injection attack - rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
- rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
diff --git a/009-raise-an-error-when-STARTTLS-fails.patch b/009-raise-an-error-when-STARTTLS-fails.patch new file mode 100644 index 0000000..ba1cc53 --- /dev/null +++ b/009-raise-an-error-when-STARTTLS-fails.patch @@ -0,0 +1,35 @@ +From 9092f6266c3054befff053aa943632856cedbdba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> +Date: Fri, 1 Jul 2016 11:42:53 +0200 +Subject: [PATCH] Raise an error when STARTTLS fails + +CVE-2016-0772 python: smtplib StartTLS stripping attack +rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+ +Based on an upstream change by Benjamin Peterson <benjamin(a)python.org> +- in changeset 101887:d590114c2394 3.4 +-
https://hg.python.org/cpython/rev/d590114c2394
+--- + lib-python/3/smtplib.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib-python/3/smtplib.py b/lib-python/3/smtplib.py +index 679e478..1aacfaf 100644 +--- a/lib-python/3/smtplib.py ++++ b/lib-python/3/smtplib.py +@@ -666,6 +666,11 @@ class SMTP: + self.ehlo_resp = None + self.esmtp_features = {} + self.does_esmtp = 0 ++ else: ++ # RFC 3207: ++ # 501 Syntax error (no parameters allowed) ++ # 454 TLS not available due to temporary reason ++ raise SMTPResponseException(resp, reply) + return (resp, reply) + + def sendmail(self, from_addr, to_addrs, msg, mail_options=[], +-- +2.9.0 + diff --git a/010-disabled-HTTP-header-injections-in-http.client.patch b/010-disabled-HTTP-header-injections-in-http.client.patch new file mode 100644 index 0000000..10591d5 --- /dev/null +++ b/010-disabled-HTTP-header-injections-in-http.client.patch @@ -0,0 +1,163 @@ +From 82dc922c7c4771ef789f5b395f54a603c693b05e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro(a)hroncok.cz> +Date: Fri, 1 Jul 2016 13:08:55 +0200 +Subject: [PATCH] Disabled HTTP header injections in http.client. + +CVE-2016-5699 python: http protocol steam injection attack +rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+ +Based on an upstream change by Demian Brecht and Serhiy Storchaka +- in changeset 94952:bf3e1c9b80e9 3.4 +-
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+--- + lib-python/3/http/client.py | 37 +++++++++++++++++++++++++ + lib-python/3/test/test_httplib.py | 57 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 94 insertions(+) + +diff --git a/lib-python/3/http/client.py b/lib-python/3/http/client.py +index 5466d06..1d215d8 100644 +--- a/lib-python/3/http/client.py ++++ b/lib-python/3/http/client.py +@@ -70,6 +70,7 @@ import email.parser + import email.message + import io + import os ++import re + import socket + import collections + from urllib.parse import urlsplit +@@ -207,6 +208,34 @@ MAXAMOUNT = 1048576 + # maximal line length when calling readline(). + _MAXLINE = 65536 + ++# Header name/value ABNF (
http://tools.ietf.org/html/rfc7230#section-3.2
) ++# ++# VCHAR = %x21-7E ++# obs-text = %x80-FF ++# header-field = field-name ":" OWS field-value OWS ++# field-name = token ++# field-value = *( field-content / obs-fold ) ++# field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] ++# field-vchar = VCHAR / obs-text ++# ++# obs-fold = CRLF 1*( SP / HTAB ) ++# ; obsolete line folding ++# ; see Section 3.2.4 ++ ++# token = 1*tchar ++# ++# tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" ++# / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" ++# / DIGIT / ALPHA ++# ; any VCHAR, except delimiters ++# ++# VCHAR defined in
http://tools.ietf.org/html/rfc5234#appendix-B.1
++ ++# the patterns for both name and value are more leniant than RFC ++# definitions to allow for backwards compatibility ++_is_legal_header_name = re.compile(b'^[^:\s][^:\r\n]*$').match ++_is_illegal_header_value = re.compile(b'\n(?![ \t])|\r(?![ \t\n])').search ++ + class HTTPMessage(email.message.Message): + # XXX The only usage of this method is in + # http.server.CGIHTTPRequestHandler. Maybe move the code there so +@@ -953,12 +982,20 @@ class HTTPConnection: + + if hasattr(header, 'encode'): + header = header.encode('ascii') ++ ++ if not _is_legal_header_name(header): ++ raise ValueError('Invalid header name %r' % (header,)) ++ + values = list(values) + for i, one_value in enumerate(values): + if hasattr(one_value, 'encode'): + values[i] = one_value.encode('latin1') + elif isinstance(one_value, int): + values[i] = str(one_value).encode('ascii') ++ ++ if _is_illegal_header_value(values[i]): ++ raise ValueError('Invalid header value %r' % (values[i],)) ++ + value = b'\r\n\t'.join(values) + header = header + b': ' + value + self._output(header) +diff --git a/lib-python/3/test/test_httplib.py b/lib-python/3/test/test_httplib.py +index 420302c..31d3bd0 100644 +--- a/lib-python/3/test/test_httplib.py ++++ b/lib-python/3/test/test_httplib.py +@@ -134,6 +134,33 @@ class HeaderTests(TestCase): + conn.putheader('Content-length', 42) + self.assertTrue(b'Content-length: 42' in conn._buffer) + ++ conn.putheader('Foo', ' bar ') ++ self.assertIn(b'Foo: bar ', conn._buffer) ++ conn.putheader('Bar', '\tbaz\t') ++ self.assertIn(b'Bar: \tbaz\t', conn._buffer) ++ conn.putheader('Authorization', 'Bearer mytoken') ++ self.assertIn(b'Authorization: Bearer mytoken', conn._buffer) ++ conn.putheader('IterHeader', 'IterA', 'IterB') ++ self.assertIn(b'IterHeader: IterA\r\n\tIterB', conn._buffer) ++ conn.putheader('LatinHeader', b'\xFF') ++ self.assertIn(b'LatinHeader: \xFF', conn._buffer) ++ conn.putheader('Utf8Header', b'\xc3\x80') ++ self.assertIn(b'Utf8Header: \xc3\x80', conn._buffer) ++ conn.putheader('C1-Control', b'next\x85line') ++ self.assertIn(b'C1-Control: next\x85line', conn._buffer) ++ conn.putheader('Embedded-Fold-Space', 'is\r\n allowed') ++ self.assertIn(b'Embedded-Fold-Space: is\r\n allowed', conn._buffer) ++ conn.putheader('Embedded-Fold-Tab', 'is\r\n\tallowed') ++ self.assertIn(b'Embedded-Fold-Tab: is\r\n\tallowed', conn._buffer) ++ conn.putheader('Key Space', 'value') ++ self.assertIn(b'Key Space: value', conn._buffer) ++ conn.putheader('KeySpace ', 'value') ++ self.assertIn(b'KeySpace : value', conn._buffer) ++ conn.putheader(b'Nonbreak\xa0Space', 'value') ++ self.assertIn(b'Nonbreak\xa0Space: value', conn._buffer) ++ conn.putheader(b'\xa0NonbreakSpace', 'value') ++ self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer) ++ + def test_ipv6host_header(self): + # Default host header on IPv6 transaction should wrapped by [] if + # its actual IPv6 address +@@ -153,6 +180,36 @@ class HeaderTests(TestCase): + conn.request('GET', '/foo') + self.assertTrue(sock.data.startswith(expected)) + ++ def test_invalid_headers(self): ++ conn = client.HTTPConnection('
example.com
') ++ conn.sock = FakeSocket('') ++ conn.putrequest('GET', '/') ++ ++ #
http://tools.ietf.org/html/rfc7230#section-3.2.4
, whitespace is no ++ # longer allowed in header names ++ cases = ( ++ (b'Invalid\r\nName', b'ValidValue'), ++ (b'Invalid\rName', b'ValidValue'), ++ (b'Invalid\nName', b'ValidValue'), ++ (b'\r\nInvalidName', b'ValidValue'), ++ (b'\rInvalidName', b'ValidValue'), ++ (b'\nInvalidName', b'ValidValue'), ++ (b' InvalidName', b'ValidValue'), ++ (b'\tInvalidName', b'ValidValue'), ++ (b'Invalid:Name', b'ValidValue'), ++ (b':InvalidName', b'ValidValue'), ++ (b'ValidName', b'Invalid\r\nValue'), ++ (b'ValidName', b'Invalid\rValue'), ++ (b'ValidName', b'Invalid\nValue'), ++ (b'ValidName', b'InvalidValue\r\n'), ++ (b'ValidName', b'InvalidValue\r'), ++ (b'ValidName', b'InvalidValue\n'), ++ ) ++ for name, value in cases: ++ with self.subTest((name, value)): ++ with self.assertRaisesRegex(ValueError, 'Invalid header'): ++ conn.putheader(name, value) ++ + + class BasicTest(TestCase): + def test_status_lines(self): +-- +2.9.0 + diff --git a/pypy3.spec b/pypy3.spec index e31b4d4..5666e56 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -156,6 +156,20 @@ Patch2: 007-remove-startup-message.patch #
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
Patch3: 008-maximum-recursion-depth.patch +# CVE-2016-0772 python: smtplib StartTLS stripping attack +# rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+# rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/d590114c2394
+# Raise an error when STARTTLS fails +Patch4: 009-raise-an-error-when-STARTTLS-fails.patch + +# CVE-2016-5699 python: http protocol steam injection attack +# rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+# rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+# FIXED UPSTREAM:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+# Disabled HTTP header injections in http.client +Patch5: 010-disabled-HTTP-header-injections-in-http.client.patch + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -842,6 +856,17 @@ CheckPyPy %{name}-stackless %changelog +* Fri Jul 01 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-6 +- Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack +- Raise an error when STARTTLS fails +- rhbz#1303647:
https://bugzilla.redhat.com/show_bug.cgi?id=1303647
+- rhbz#1351680:
https://bugzilla.redhat.com/show_bug.cgi?id=1351680
+- Fixed upstream:
https://hg.python.org/cpython/rev/d590114c2394
+- Fix for: CVE-2016-5699 python: http protocol steam injection attack +- rhbz#1303699:
https://bugzilla.redhat.com/show_bug.cgi?id=1303699
+- rhbz#1351687:
https://bugzilla.redhat.com/show_bug.cgi?id=1351687
+- Fixed upstream:
https://hg.python.org/cpython/rev/bf3e1c9b80e9
+ * Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 - Fix FTBFS (#1307889) - Add patch to fix maximum recursion depth error during build commit 4a3038ff5634b498b5afbf2552eeec9ae5d6e03b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Fri May 13 02:07:16 2016 +0200 Fix FTBFS (#1307889) - Add patch to fix maximum recursion depth error during build - Don't use -g flag to prevent memory exhaustion - Add fix form Arch Linux to prevent VerificationError during the build diff --git a/008-maximum-recursion-depth.patch b/008-maximum-recursion-depth.patch new file mode 100644 index 0000000..6d3d157 --- /dev/null +++ b/008-maximum-recursion-depth.patch @@ -0,0 +1,179 @@ +diff --git a/rpython/jit/metainterp/blackhole.py b/rpython/jit/metainterp/blackhole.py +index 9b14943..b9d1c4c 100644 +--- a/rpython/jit/metainterp/blackhole.py ++++ b/rpython/jit/metainterp/blackhole.py +@@ -1052,35 +1052,45 @@ class BlackholeInterpreter(object): + + @arguments("cpu", "i", "R", "d", returns="i") + def bhimpl_residual_call_r_i(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, None, args_r, None, calldescr) + @arguments("cpu", "i", "R", "d", returns="r") + def bhimpl_residual_call_r_r(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, None, args_r, None, calldescr) + @arguments("cpu", "i", "R", "d") + def bhimpl_residual_call_r_v(cpu, func, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, None, args_r, None, calldescr) + + @arguments("cpu", "i", "I", "R", "d", returns="i") + def bhimpl_residual_call_ir_i(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, args_i, args_r, None, calldescr) + @arguments("cpu", "i", "I", "R", "d", returns="r") + def bhimpl_residual_call_ir_r(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, args_i, args_r, None, calldescr) + @arguments("cpu", "i", "I", "R", "d") + def bhimpl_residual_call_ir_v(cpu, func, args_i, args_r, calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, args_i, args_r, None, calldescr) + + @arguments("cpu", "i", "I", "R", "F", "d", returns="i") + def bhimpl_residual_call_irf_i(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_i(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d", returns="r") + def bhimpl_residual_call_irf_r(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_r(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d", returns="f") + def bhimpl_residual_call_irf_f(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_f(func, args_i, args_r, args_f, calldescr) + @arguments("cpu", "i", "I", "R", "F", "d") + def bhimpl_residual_call_irf_v(cpu, func, args_i,args_r,args_f,calldescr): ++ workaround2200.active = True + return cpu.bh_call_v(func, args_i, args_r, args_f, calldescr) + + # conditional calls - note that they cannot return stuff +@@ -1108,44 +1118,54 @@ class BlackholeInterpreter(object): + + @arguments("cpu", "j", "R", returns="i") + def bhimpl_inline_call_r_i(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "R", returns="r") + def bhimpl_inline_call_r_r(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "R") + def bhimpl_inline_call_r_v(cpu, jitcode, args_r): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + None, args_r, None, jitcode.calldescr) + + @arguments("cpu", "j", "I", "R", returns="i") + def bhimpl_inline_call_ir_i(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", returns="r") + def bhimpl_inline_call_ir_r(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + @arguments("cpu", "j", "I", "R") + def bhimpl_inline_call_ir_v(cpu, jitcode, args_i, args_r): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + args_i, args_r, None, jitcode.calldescr) + + @arguments("cpu", "j", "I", "R", "F", returns="i") + def bhimpl_inline_call_irf_i(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_i(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F", returns="r") + def bhimpl_inline_call_irf_r(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_r(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F", returns="f") + def bhimpl_inline_call_irf_f(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_f(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + @arguments("cpu", "j", "I", "R", "F") + def bhimpl_inline_call_irf_v(cpu, jitcode, args_i, args_r, args_f): ++ workaround2200.active = True + return cpu.bh_call_v(jitcode.get_fnaddr_as_int(), + args_i, args_r, args_f, jitcode.calldescr) + +@@ -1438,6 +1458,8 @@ class BlackholeInterpreter(object): + if not self.nextblackholeinterp: + self._exit_frame_with_exception(current_exc) + return current_exc ++ finally: ++ workaround2200.active = False + # + # pass the frame's return value to the caller + caller = self.nextblackholeinterp +@@ -1656,3 +1678,10 @@ def convert_and_run_from_pyjitpl(metainterp, raising_exception=False): + current_exc = lltype.nullptr(rclass.OBJECTPTR.TO) + # + _run_forever(firstbh, current_exc) ++ ++# ____________________________________________________________ ++ ++class WorkaroundIssue2200(object): ++ pass ++workaround2200 = WorkaroundIssue2200() ++workaround2200.active = False +diff --git a/rpython/jit/metainterp/test/test_ajit.py b/rpython/jit/metainterp/test/test_ajit.py +index ad81456..c820185 100644 +--- a/rpython/jit/metainterp/test/test_ajit.py ++++ b/rpython/jit/metainterp/test/test_ajit.py +@@ -4044,3 +4044,30 @@ class TestLLtype(BaseLLtypeTests, LLJitMixin): + res = self.interp_operations(f, [17]) + assert res == 42 + self.check_operations_history(guard_true=1, guard_false=0) ++ ++ def test_issue2200_recursion(self): ++ # Reproduces issue #2200. This test contains no recursion, ++ # but due to an unlikely combination of factors it ends up ++ # creating an RPython-level recursion, one per loop iteration. ++ # The recursion is: blackhole interp from the failing guard -> ++ # does the call to enter() as a normal call -> enter() runs ++ # can_enter_jit() as if we're interpreted -> we enter the JIT ++ # again from the start of the loop -> the guard fails again ++ # during the next iteration -> blackhole interp. All arrows ++ # in the previous sentence are one or more levels of RPython ++ # function calls. ++ driver = JitDriver(greens=[], reds=["i"]) ++ def enter(i): ++ driver.can_enter_jit(i=i) ++ def f(): ++ set_param(None, 'trace_eagerness', 999999) ++ i = 0 ++ while True: ++ driver.jit_merge_point(i=i) ++ i += 1 ++ if i >= 300: ++ return i ++ promote(i + 1) # a failing guard ++ enter(i) ++ ++ self.meta_interp(f, []) +diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py +index 805933e..ca47f03 100644 +--- a/rpython/jit/metainterp/warmstate.py ++++ b/rpython/jit/metainterp/warmstate.py +@@ -405,6 +405,14 @@ class WarmEnterState(object): + bound_reached(hash, None, *args) + return + ++ # Workaround for issue #2200, maybe temporary. This is not ++ # a proper fix, but only a hack that should work well enough ++ # for PyPy's main jitdriver... See test_issue2200_recursion ++ from rpython.jit.metainterp.blackhole import workaround2200 ++ if workaround2200.active: ++ workaround2200.active = False ++ return ++ + # Here, we have found 'cell'. + # + if cell.flags & (JC_TRACING | JC_TEMPORARY): diff --git a/pypy3.spec b/pypy3.spec index 53c2241..e31b4d4 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -152,6 +152,9 @@ Patch1: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch2: 007-remove-startup-message.patch +#
https://bugzilla.redhat.com/show_bug.cgi?id=1307889
+#
https://bitbucket.org/pypy/pypy/commits/c4c54cb69aba
+Patch3: 008-maximum-recursion-depth.patch # Build-time requirements: @@ -287,6 +290,20 @@ find lib-python/%{pylibver} -name "*.py" -exec \ "{}" \ \; +# Hacky fix to allow the curses module to build on x86_64; otherwise we get: +# cffi.ffiplatform.VerificationError: anonymous MEVENT: wrong total size +# (we have 24, but C compiler says 20) +#
https://github.com/archlinuxcn/repo/commit/560a75090333b6de8a1de960acac5e62…
+%ifarch x86_64 + _type=unsigned +%else + _type=uint32_t +%endif + +sed -i -e "s/typedef unsigned long mmask_t/typedef $_type mmask_t/" \ + -e "s/typedef unsigned long chtype/typedef $_type chtype/" \ + lib_pypy/_curses.py + %build BuildPyPy() { @@ -348,7 +365,8 @@ BuildPyPy() { # of root pointers: %global gcrootfinder_options --gcrootfinder=shadowstack - export CFLAGS=$(echo "$RPM_OPT_FLAGS") + # Prevent memory exhaustion + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-g//') %else # Go with the default, which is "asmgcc" @@ -367,7 +385,7 @@ BuildPyPy() { # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
- export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//' -e 's/-g//') %endif @@ -824,6 +842,12 @@ CheckPyPy %{name}-stackless %changelog +* Fri May 13 2016 Miro Hrončok <mhroncok(a)redhat.com> - 2.4.0-5 +- Fix FTBFS (#1307889) +- Add patch to fix maximum recursion depth error during build +- Don't use -g flag to prevent memory exhaustion +- Add fix form Arch Linux to prevent VerificationError during the build + * Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
commit 37de776457faff9eeedd146ed613f098a688d9cf Author: Fedora Release Engineering <releng(a)fedoraproject.org> Date: Thu Feb 4 18:47:53 2016 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index 04952a9..53c2241 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Feb 04 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 2.4.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+ * Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 - Bump release to rebuild with new execstack commit ffbf97517e896aea68cb51cb99a36e5bf95422e8 Author: Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> Date: Tue Aug 4 11:50:06 2015 -0400 Bump release to rebuild with new execstack diff --git a/pypy3.spec b/pypy3.spec index afc59f7..04952a9 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek(a)in.waw.pl> - 2.4.0-3 +- Bump release to rebuild with new execstack + * Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
commit a039768e93ec1249319bb9b49149c6981717b0ab Author: Dennis Gilmore <dennis(a)ausil.us> Date: Thu Jun 18 18:15:59 2015 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/pypy3.spec b/pypy3.spec index fbacd83..afc59f7 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,6 +1,6 @@ Name: pypy3 Version: 2.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages @@ -824,6 +824,9 @@ CheckPyPy %{name}-stackless %changelog +* Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.4.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+ * Wed Sep 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.4.0-1 - Update to 2.4.0 commit a7f7d048aa94963f46c11bea18071aef0fb8c954 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Thu Jun 11 11:40:02 2015 +0200 Sync with pypy diff --git a/pypy3.spec b/pypy3.spec index 6e6bd46..fbacd83 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -116,7 +116,7 @@ URL:
http://pypy.org/
# Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy3-%{version} +%global pypyprefix %{_libdir}/%{name}-%{version} %global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: @@ -129,11 +129,11 @@ URL:
http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/%{name}-%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy3 +Source2: macros.%{name} # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -217,7 +217,7 @@ BuildRequires: emacs BuildRequires: git # Metadata for the core package (the JIT build): -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -249,7 +249,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: pypy3%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -259,13 +259,13 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-2.4.0-src -p1 -S git +%autosetup -n %{name}-%{version}-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -410,7 +410,7 @@ BuildPyPy() { } BuildPyPy \ - pypy3 \ + %{name} \ %if 0%{with_jit} "-Ojit" \ %else @@ -420,7 +420,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - pypy3-stackless \ + %{name}-stackless \ "--stackless" %endif @@ -466,10 +466,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy pypy3 +InstallPyPy %{name} %if 0%{with_stackless} -InstallPyPy pypy3-stackless +InstallPyPy %{name}-stackless %endif @@ -572,16 +572,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/pypy3 \ + %{buildroot}/%{_bindir}/%{name} \ 0 -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import tkinter' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import _curses' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import curses' -%{buildroot}/%{pypyprefix}/pypy3 -c 'import syslog' -%{buildroot}/%{pypyprefix}/pypy3 -c 'from _sqlite3 import *' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/%{name} -c 'import tkinter' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/%{name} -c 'import _curses' +%{buildroot}/%{pypyprefix}/%{name} -c 'import curses' +%{buildroot}/%{pypyprefix}/%{name} -c 'import syslog' +%{buildroot}/%{pypyprefix}/%{name} -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -645,8 +645,8 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el -cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc %endif # Install macros for rpm: @@ -775,10 +775,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy3 +CheckPyPy %{name} %if 0%{with_stackless} -CheckPyPy pypy3-stackless +CheckPyPy %{name}-stackless %endif %endif # run_selftests @@ -800,26 +800,26 @@ CheckPyPy pypy3-stackless %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypy3trace-mode.el -%{_emacs_sitelispdir}/pypy3trace-mode.elc +%{_emacs_sitelispdir}/%{name}trace-mode.el +%{_emacs_sitelispdir}/%{name}trace-mode.elc %endif %files %license LICENSE %doc README.rst -%{_bindir}/pypy3 -%{pypyprefix}/pypy3 +%{_bindir}/%{name} +%{pypyprefix}/%{name} %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{_rpmconfigdir}/macros.d/macros.pypy3 +%{_rpmconfigdir}/macros.d/macros.%{name} %if 0%{with_stackless} %files stackless %license LICENSE %doc README.rst -%{_bindir}/pypy-stackless +%{_bindir}/%{name}-stackless %endif commit 908d523efb68df54d872af8a8c6324e0f8f7f106 Merge: ff9537b 5f5775a Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun May 10 16:16:10 2015 +0200 Merge with pypy + package review (#1215732) history commit 5f5775aa52401c7c7261d2e610fa796420e51b9d Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sun May 10 16:04:51 2015 +0200 Remove unused patches diff --git a/008-fix-dynamic-symbols-script.patch b/008-fix-dynamic-symbols-script.patch deleted file mode 100644 index 5b1d551..0000000 --- a/008-fix-dynamic-symbols-script.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py ---- a/pypy/translator/platform/posix.py -+++ b/pypy/translator/platform/posix.py -@@ -48,8 +48,10 @@ - response_file = self._make_response_file("dynamic-symbols-") - f = response_file.open("w") - f.write("{\n") -+ f.write(" global:\n") - for sym in eci.export_symbols: -- f.write("%s;\n" % (sym,)) -+ f.write(" %s;\n" % (sym,)) -+ f.write(" local:*;\n") - f.write("};") - f.close() - diff --git a/config.patch b/config.patch deleted file mode 100644 index bf81d7d..0000000 --- a/config.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py ---- pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:35:37.679237332 +0200 -+++ pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:47:41.506354482 +0200 -@@ -32,19 +32,20 @@ class BaseLinux(BasePosix): - return self._pkg_config("libffi", "--libs-only-L", - ['/usr/lib/libffi']) - -- def library_dirs_for_libffi_a(self): -- # places where we need to look for libffi.a -- # XXX obscuuure! only look for libffi.a if run with translate.py -- if 'translate' in sys.modules: -- if sys.maxint > 2**32: -- host = 'x86_64' -- else: -- host = 'x86' -- return self.library_dirs_for_libffi() + [ -- '/usr/lib', -- '/usr/lib/%s-linux-gnu/' % host] -- else: -- return [] -+ #Fedora, at least, has the shared version but not the static: -+ #def library_dirs_for_libffi_a(self): -+ # # places where we need to look for libffi.a -+ # # XXX obscuuure! only look for libffi.a if run with translate.py -+ # if 'translate' in sys.modules: -+ # if sys.maxint > 2**32: -+ # host = 'x86_64' -+ # else: -+ # host = 'x86' -+ # return self.library_dirs_for_libffi() + [ -+ # '/usr/lib', -+ # '/usr/lib/%s-linux-gnu/' % host] -+ # else: -+ # return [] - - - class Linux(BaseLinux): diff --git a/more-readable-c-code.patch b/more-readable-c-code.patch deleted file mode 100644 index 92d340f..0000000 --- a/more-readable-c-code.patch +++ /dev/null @@ -1,693 +0,0 @@ -diff -up pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code pypy-pypy-release-1.7/pypy/interpreter/pycode.py ---- pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/interpreter/pycode.py 2011-11-21 16:16:15.673463780 -0500 -@@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non - from pypy.interpreter.astcompiler.consts import ( - CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, - CO_GENERATOR, CO_CONTAINSGLOBALS) -+from pypy.interpreter.pytraceback import offset2lineno - from pypy.rlib.rarithmetic import intmask - from pypy.rlib.debug import make_sure_not_resized - from pypy.rlib import jit -@@ -81,6 +82,7 @@ class PyCode(eval.Code): - self.hidden_applevel = hidden_applevel - self.magic = magic - self._signature = cpython_code_signature(self) -+ self._cached_source = None - self._initialize() - - def _initialize(self): -@@ -397,3 +399,23 @@ class PyCode(eval.Code): - - def repr(self, space): - return space.wrap(self.get_repr()) -+ -+ def get_linenum_for_offset(self, offset): -+ # Given a bytecode offset, return a 1-based index into the lines of the -+ # source code -+ return offset2lineno(self, offset) -+ -+ def _ensure_source(self): -+ # Lazily grab the source lines into self._cached_source (or raise -+ # an IOError) -+ if not self._cached_source: -+ f = open(self.co_filename, 'r') -+ source = [line.rstrip() for line in f.readlines()] -+ f.close() -+ self._cached_source = source -+ -+ def get_source_text(self, linenum): -+ # Given a 1-based index, get the corresponding line of source code (or -+ # raise an IOError) -+ self._ensure_source() -+ return self._cached_source[linenum - 1] -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/model.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/model.py 2011-11-21 16:15:36.599466455 -0500 -@@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden - - __metaclass__ = type - -+class SourceLoc(object): -+ # A srcloc is a specific location within the RPython source code, -+ # intended for human display -+ __slots__ = ('code', # code object -+ 'linenum' # 1-based index, as displayed to a user -+ ) -+ def __init__(self, code, linenum): -+ self.code = code -+ self.linenum = linenum -+ -+ def get_text(self): -+ # Get the actual source text of this line -+ return self.code.get_source_text(self.linenum) -+ -+ def __eq__(self, other): -+ return self.code == other.code and self.linenum == other.linenum -+ -+ def __ne__(self, other): -+ if other: -+ return self.code != other.code or self.linenum != other.linenum -+ else: -+ return True -+ -+class CodeLoc(object): -+ # A codeloc is a specific location within the RPython bytecode -+ __slots__ = ('code', # code object -+ 'offset' # int index into bytecode, or -1 -+ ) -+ -+ def __init__(self, code, offset): -+ self.code = code -+ self.offset = offset -+ -+ def __str__(self): -+ if self.offset >= 0: -+ return "%s@%d" % (self.code.co_name, self.offset) -+ else: -+ return "" -+ -+ def __ne__(self, other): -+ if other: -+ return self.code != other.code or self.offset != other.offset -+ else: -+ return True -+ -+ def __cmp__(self, other): -+ # Partial ordering, for those locations that have an offset: -+ if other: -+ if self.offset >= 0 and other.offset >= 0: -+ return self.offset - other.offset -+ return 0 -+ -+ def get_source_loc(self): -+ # Convert to a SourceLoc: -+ return SourceLoc(self.code, self.code.get_linenum_for_offset(self.offset)) -+ -+class OperationLoc(object): -+ # An oploc is the location within the RPython source code of a given -+ # operation -+ # -+ # This is a list consisting of CodeLoc instances, some of which may be None -+ # -+ # For the simple case, this is list of length 1 with a single CodeLoc -+ # -+ # For an operation inside an inlined callsite, we have a list of length 2: -+ # [codeloc of callsite, -+ # codeloc of operation within inlined body] -+ # -+ # For more interesting inlined cases, we have a chain of source locations: -+ # [codeloc of callsite, -+ # codeloc of inner callsite, -+ # ... , -+ # codeloc of innermost inlined callsite, -+ # codeloc of operation within inlined body] -+ # -+ -+ __slots__ = ('codelocs', ) -+ -+ def __init__(self, codelocs): -+ self.codelocs = codelocs -+ -+ def __str__(self): -+ return '[' + ' > '.join(str(codeloc) for codeloc in self.codelocs) + ']' -+ -+ def __cmp__(self, other): -+ return cmp(self.codelocs, other.codelocs) -+ -+def block_comparator(blk0, blk1): -+ ''' -+ Sort function for blocks, putting them in an ordering that attempts to -+ maximize readability of the generated C code -+ ''' -+ # print 'comparing %r and %r' % (blk0, blk1) -+ # Put the start/end block at the top/bottom: -+ if blk0.isstartblock: -+ return -1 -+ -+ if blk1.isstartblock: -+ return 1 -+ -+ # Order blocks by the offset, where present: -+ if blk0.operations: -+ if blk1.operations: -+ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) -+ else: -+ return -1 -+ else: -+ if blk1.operations: -+ return 1 -+ else: -+ return 0 -+ -+def edge_comparator(edge0, edge1): -+ return block_comparator(edge0.target, edge1.target) - - class FunctionGraph(object): - __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] -@@ -94,6 +208,21 @@ class FunctionGraph(object): - seen[block] = True - stack += block.exits[::-1] - -+ def iterblocks_by_source(self): -+ # Try to preserve logical source ordering in the blocks -+ block = self.startblock -+ yield block -+ seen = {block: True} -+ stack = list(block.exits[::-1]) -+ stack.sort(edge_comparator) -+ while stack: -+ block = stack.pop().target -+ if block not in seen: -+ yield block -+ seen[block] = True -+ stack += block.exits[::-1] -+ stack.sort(edge_comparator) -+ - def iterlinks(self): - block = self.startblock - seen = {block: True} -@@ -183,14 +312,14 @@ class Block(object): - self.exits = [] # list of Link(s) - - def at(self): -- if self.operations and self.operations[0].offset >= 0: -- return "@%d" % self.operations[0].offset -+ if self.operations: -+ return str(self.operations[0].oploc) - else: - return "" - - def __str__(self): - if self.operations: -- txt = "block@%d" % self.operations[0].offset -+ txt = "block%s" % self.operations[0].oploc - else: - if (not self.exits) and len(self.inputargs) == 1: - txt = "return block" -@@ -245,6 +374,21 @@ class Block(object): - from pypy.translator.tool.graphpage import try_show - try_show(self) - -+ def isreturnblock(self): -+ return (not self.operations) and (not self.exits) and len(self.inputargs) == 1 -+ -+ def get_base_label(self, blocknum): -+ # Generate a more friendly C label for this block -+ if self.operations: -+ txt = "block" -+ elif (not self.exits) and len(self.inputargs) == 1: -+ txt = "return_block" -+ elif (not self.exits) and len(self.inputargs) == 2: -+ txt = "raise_block" -+ else: -+ txt = "codeless_block" -+ return '%s%d' % (txt, blocknum) -+ - - class Variable(object): - __slots__ = ["_name", "_nr", "concretetype"] -@@ -331,13 +475,15 @@ class WrapException(Exception): - - - class SpaceOperation(object): -- __slots__ = "opname args result offset".split() -+ __slots__ = "opname args result oploc".split() - -- def __init__(self, opname, args, result, offset=-1): -+ def __init__(self, opname, args, result, oploc=None): - self.opname = intern(opname) # operation name - self.args = list(args) # mixed list of var/const - self.result = result # either Variable or Constant instance -- self.offset = offset # offset in code string -+ if oploc is None: -+ oploc = OperationLoc([None]) -+ self.oploc = oploc - - def __eq__(self, other): - return (self.__class__ is other.__class__ and -@@ -352,8 +498,9 @@ class SpaceOperation(object): - return hash((self.opname,tuple(self.args),self.result)) - - def __repr__(self): -- return "%r = %s(%s)" % (self.result, self.opname, -- ", ".join(map(repr, self.args))) -+ return "%r = %s(%s) (%s)" % (self.result, self.opname, -+ ", ".join(map(repr, self.args)), -+ self.oploc) - - class Atom(object): - def __init__(self, name): -@@ -427,8 +574,7 @@ def copygraph(graph, shallow=False, varm - for op in oplist: - copyop = SpaceOperation(op.opname, - [copyvar(v) for v in op.args], -- copyvar(op.result), op.offset) -- #copyop.offset = op.offset -+ copyvar(op.result), op.oploc) - result.append(copyop) - return result - newblock.operations = copyoplist(block.operations) -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py 2011-11-21 16:15:36.600466455 -0500 -@@ -315,7 +315,9 @@ class FlowObjSpace(ObjSpace): - def do_operation(self, name, *args_w): - spaceop = SpaceOperation(name, args_w, Variable()) - if hasattr(self, 'executioncontext'): # not here during bootstrapping -- spaceop.offset = self.executioncontext.crnt_offset -+ codeloc = CodeLoc(self.executioncontext.code, -+ self.executioncontext.crnt_offset) -+ spaceop.oploc = OperationLoc([codeloc]) - self.executioncontext.recorder.append(spaceop) - return spaceop.result - -diff -up pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py ---- pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py 2011-11-21 16:15:36.600466455 -0500 -@@ -119,3 +119,25 @@ def test_variable(): - assert v2.renamed - assert v2.name.startswith("foobar_") and v2.name != v.name - assert v2.name.split('_', 1)[1].isdigit() -+ -+def test_source_locations(): -+ # Invent some random offsets into the code: -+ co = sample_function.__code__ -+ codelocA = CodeLoc(co, 42) -+ codelocB = CodeLoc(co, 87) -+ -+ assert str(codelocA) == 'sample_function@42' -+ assert str(codelocB) == 'sample_function@87' -+ -+ assert cmp(codelocA, codelocB) < 0 -+ assert cmp(codelocB, codelocA) > 0 -+ -+ oplocA = OperationLoc([codelocA]) -+ oplocB = OperationLoc([codelocB]) -+ -+ assert str(oplocA) == '[sample_function@42]' -+ assert str(oplocB) == '[sample_function@87]' -+ -+ assert cmp(oplocA, oplocB) < 0 -+ assert cmp(oplocB, oplocA) > 0 -+ -diff -up pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/rpython/rtyper.py ---- pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/rpython/rtyper.py 2011-11-21 16:15:36.601466455 -0500 -@@ -800,7 +800,7 @@ class HighLevelOp(object): - return vars - - def genop(self, opname, args_v, resulttype=None): -- return self.llops.genop(opname, args_v, resulttype) -+ return self.llops.genop(opname, args_v, resulttype, self.spaceop.oploc) - - def gendirectcall(self, ll_function, *args_v): - return self.llops.gendirectcall(ll_function, *args_v) -@@ -935,7 +935,7 @@ class LowLevelOpList(list): - v.concretetype)) - return v - -- def genop(self, opname, args_v, resulttype=None): -+ def genop(self, opname, args_v, resulttype=None, oploc=None): - try: - for v in args_v: - v.concretetype -@@ -944,7 +944,7 @@ class LowLevelOpList(list): - " and pass its result to genop()," - " never hop.args_v directly.") - vresult = Variable() -- self.append(SpaceOperation(opname, args_v, vresult)) -+ self.append(SpaceOperation(opname, args_v, vresult, oploc)) - if resulttype is None: - vresult.concretetype = Void - return None -diff -up pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py ---- pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py 2011-11-21 16:15:36.601466455 -0500 -@@ -4,6 +4,7 @@ from pypy.translator.simplify import get - from pypy.translator.unsimplify import copyvar - from pypy.objspace.flow.model import Variable, Constant, Block, Link - from pypy.objspace.flow.model import SpaceOperation, c_last_exception -+from pypy.objspace.flow.model import OperationLoc - from pypy.objspace.flow.model import FunctionGraph - from pypy.objspace.flow.model import mkentrymap, checkgraph - from pypy.annotation import model as annmodel -@@ -231,6 +232,7 @@ class BaseInliner(object): - self.varmap = {} - self._copied_blocks = {} - self.op = block.operations[index_operation] -+ self.callsite_oploc = self.op.oploc - self.graph_to_inline = self.get_graph_from_op(self.op) - self.exception_guarded = False - if (block.exitswitch == c_last_exception and -@@ -290,7 +292,9 @@ class BaseInliner(object): - - def copy_operation(self, op): - args = [self.get_new_name(arg) for arg in op.args] -- result = SpaceOperation(op.opname, args, self.get_new_name(op.result)) -+ new_oploc = OperationLoc(self.callsite_oploc.codelocs[:] + op.oploc.codelocs[:]) -+ result = SpaceOperation(op.opname, args, self.get_new_name(op.result), -+ new_oploc) - return result - - def copy_block(self, block): -diff -up pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/funcgen.py ---- pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/c/funcgen.py 2011-11-21 16:15:36.602466455 -0500 -@@ -1,4 +1,6 @@ - import sys -+import inspect -+import dis - from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring - from pypy.translator.c.support import cdecl - from pypy.translator.c.support import llvalue_from_constant, gen_assignments -@@ -22,6 +24,38 @@ LOCALVAR = 'l_%s' - - KEEP_INLINED_GRAPHS = False - -+def block_comparator(blk0, blk1): -+ ''' -+ Sort function for blocks, putting them in an ordering that attempts to -+ maximize readability of the generated C code -+ ''' -+ # print 'comparing %r and %r' % (blk0, blk1) -+ # Put the start/end block at the top/bottom: -+ if blk0.isstartblock: -+ return -1 -+ -+ if blk1.isstartblock: -+ return 1 -+ -+ # Order blocks by the offset, where present: -+ if blk0.operations: -+ if blk1.operations: -+ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) -+ else: -+ return -1 -+ else: -+ if blk1.operations: -+ return 1 -+ else: -+ return 0 -+ -+def escape_c_comments(py_src): -+ # Escape C comments within RPython source, to avoid generating bogus -+ # comments in our generated C source: -+ py_src = py_src.replace('/*', '') -+ py_src = py_src.replace('*/', '') -+ return py_src -+ - class FunctionCodeGenerator(object): - """ - Collects information about a function which we have to generate -@@ -207,14 +241,57 @@ class FunctionCodeGenerator(object): - - def cfunction_body(self): - graph = self.graph -- yield 'goto block0;' # to avoid a warning "this label is not used" -+ # Try to print python source code: -+ if hasattr(graph, 'func'): -+ filename = inspect.getfile(graph.func) -+ #yield '/* name: %r */' % filename -+ try: -+ src, startline = inspect.getsourcelines(graph.func) -+ except IOError: -+ pass # No source found -+ except IndexError: -+ pass # Bulletproofing -+ else: -+ yield '/* Python source %r' % filename -+ for i, line in enumerate(src): -+ line = line.rstrip() -+ line = escape_c_comments(line) -+ # FuncNode.funcgen_implementation treats lines ending in ':' -+ # as C blocks, which messes up the formatting. -+ # Work around this: -+ if line.endswith(':'): -+ line += ' ' -+ yield ' * %4d : %s' % (startline + i, line) -+ yield ' */' -+ -+ label = graph.startblock.get_base_label(self.blocknum[graph.startblock]) -+ yield 'goto %s;' % label # to avoid a warning "this label is not used" -+ -+ # Sort the blocks into a (hopefully) readable order: -+ blocks = list(graph.iterblocks_by_source()) -+ blocks.sort(block_comparator) - - # generate the body of each block -- for block in graph.iterblocks(): -+ for block in blocks: -+ cursrcloc = None - myblocknum = self.blocknum[block] - yield '' -- yield 'block%d:' % myblocknum -+ yield '%s:' % block.get_base_label(myblocknum) -+ #yield "/* repr(block): %r */" % (block, ) -+ #yield "/* type(block): %r */" % (type(block), ) - for i, op in enumerate(block.operations): -+ #yield "/* type(op): %r */" % (type(op), ) -+ #yield "/* op.oploc: %s */" % (op.oploc, ) -+ codeloc = op.oploc.codelocs[-1] -+ if codeloc: -+ srcloc = codeloc.get_source_loc() -+ if srcloc != cursrcloc: -+ try: -+ yield "/* %s:%d : %s */" % (codeloc.code.co_name, srcloc.linenum, escape_c_comments(srcloc.get_text())) -+ cursrcloc = srcloc -+ except IOError: -+ pass -+ - for line in self.gen_op(op): - yield line - if len(block.exits) == 0: -@@ -306,7 +383,7 @@ class FunctionCodeGenerator(object): - assignments.append((a2typename, dest, src)) - for line in gen_assignments(assignments): - yield line -- label = 'block%d' % self.blocknum[link.target] -+ label = link.target.get_base_label(self.blocknum[link.target]) - if link.target in self.innerloops: - loop = self.innerloops[link.target] - if link is loop.links[-1]: # link that ends a loop -diff -up pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py ---- pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py 2011-11-21 16:15:36.602466455 -0500 -@@ -1,4 +1,5 @@ - import autopath, sys, os, py -+import re - from pypy.rpython.lltypesystem.lltype import * - from pypy.annotation import model as annmodel - from pypy.translator.translator import TranslationContext -@@ -532,3 +533,130 @@ def test_inhibit_tail_call(): - else: - assert 0, "the call was not found in the C source" - assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] -+ -+def get_generated_c_source(fn, types): -+ # Return a (optimized fn, c source code, c source filename) 3-tuple -+ t = Translation(fn) -+ t.annotate(types) -+ c_filename_path = t.source_c() -+ h = c_filename_path.open() -+ src = h.read() -+ h.close() -+ c_fn = t.compile_c() -+ return (c_fn, src, c_filename_path) -+ -+def extract_c_function(c_src, fname): -+ # Extract the source for a given C function out of a the given src string -+ # Makes assumptions about the layout of the source -+ pattern = '^(.+) \**%s\(.*\) {$' % fname -+ within_fn = False -+ result = '' -+ for line in c_src.splitlines(): -+ if within_fn: -+ result += line + '\n' -+ if line.startswith('}'): -+ return result -+ else: -+ m = re.match(pattern, line) -+ if m: -+ within_fn = True -+ result += line + '\n' -+ return result -+ -+ -+ -+def test_generated_c_source(): -+ # Verify that generate C source "looks good" -+ # We'll use is_perfect_number, as it contains a loop and a conditional -+ -+ # Generate C source code -+ from pypy.translator.test.snippet import is_perfect_number -+ c_fn, c_src, c_filename_path = get_generated_c_source(is_perfect_number, -+ [int]) -+ -+ # Locate the C source for the type-specialized function: -+ c_fn_src = extract_c_function(c_src, 'pypy_g_is_perfect_number') -+ -+ # Verify that the C source contains embedded comments containing the lines -+ # of the python source: -+ expected_comment_lines = [ -+ '/* is_perfect_number:31 : while div < n: */', -+ '/* is_perfect_number:32 : if n % div == 0: */', -+ '/* is_perfect_number:33 : sum += div */', -+ '/* is_perfect_number:34 : div += 1 */', -+ '/* is_perfect_number:35 : return n == sum */'] -+ for exp_line in expected_comment_lines: -+ assert exp_line in c_fn_src -+ -+ # Verify that the lines occur in the correct order -+ # ...we do this by filtering the function's generated C source to just -+ # those lines containing our comments (and dropping whitespace): -+ lines = c_fn_src.splitlines() -+ lines = [line.strip() -+ for line in lines -+ if '/* is_perfect_number:' in line] -+ -+ # ...we should now have exact equality: the ordering should be as expected, -+ # and each comment should appear exactly once: -+ assert lines == expected_comment_lines -+ -+ # Ensure that the generated C function does the right thing: -+ assert c_fn(5) == False -+ assert c_fn(6) == True -+ assert c_fn(7) == False -+ -+ assert c_fn(5.0) == False -+ assert c_fn(6.0) == True -+ assert c_fn(7.0) == False -+ -+ assert c_fn(5L) == False -+ assert c_fn(6L) == True -+ assert c_fn(7L) == False -+ -+ try: -+ c_fn('hello world') -+ except: -+ pass -+ else: -+ raise 'Was expected exception' -+ -+def test_escaping_c_comments(): -+ # Ensure that c comments within RPython code get escaped when we generate -+ # our .c code (to avoid generating bogus C) -+ # See e.g. pypy.module.cpyext.dictobject's PyDict_Next, which has a -+ # docstring embedding a C comment -+ def c_style_comment(a, b): -+ '''Here is a C-style comment within an RPython docstring: -+ /* hello world */ -+ ''' -+ # and here's one in a string literal: -+ return '/* hello world a:%s b:%s */' % (a, b) -+ -+ def cplusplus_style_comment(a, b): -+ '''Here is a C++-style comment within an RPython docstring: -+ // hello world -+ ''' -+ # and here are some in string literals, and one as the floor division -+ # operator: -+ return '// hello world: a // b = %s' % (a // b) -+ -+ for fn_name, exp_output in [('c_style_comment', -+ '/* hello world a:6 b:3 */'), -+ ('cplusplus_style_comment', -+ '// hello world: a // b = 2')]: -+ fn = locals()[fn_name] -+ -+ c_fn, c_src, c_filename_path = get_generated_c_source(fn, [int, int]) -+ # If the above survived, then the C compiler managed to handle -+ # the generated C code -+ -+ # Verify that the generated code works (i.e. that we didn't -+ # accidentally change the meaning): -+ assert c_fn(6, 3) == exp_output -+ -+ # Ensure that at least part of the docstrings made it into the C -+ # code: -+ c_fn_src = extract_c_function(c_src, 'pypy_g_' + fn_name) -+ assert 'Here is a ' in c_fn_src -+ assert 'style comment within an RPython docstring' in c_fn_src -+ -diff -up pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/driver.py ---- pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/driver.py 2011-11-21 16:15:36.603466455 -0500 -@@ -535,6 +535,7 @@ class TranslationDriver(SimpleTaskEngine - dstname = self.compute_exe_name() + '.staticdata.info' - shutil.copy(str(fname), str(dstname)) - self.log.info('Static data info written to %s' % dstname) -+ return c_source_filename - - # - task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -up pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/gensupp.py ---- pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/gensupp.py 2011-11-21 16:15:36.603466455 -0500 -@@ -14,8 +14,8 @@ def ordered_blocks(graph): - allblocks = [] - for block in graph.iterblocks(): - # first we order by offset in the code string -- if block.operations: -- ofs = block.operations[0].offset -+ if block.operations and block.operations[0].oploc.codelocs[0]: -+ ofs = block.operations[0].oploc.codelocs[0].offset - else: - ofs = sys.maxint - # then we order by input variable name or value -diff -up pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/interactive.py ---- pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/interactive.py 2011-11-21 16:15:36.604466454 -0500 -@@ -138,7 +138,7 @@ class Translation(object): - def source_c(self, argtypes=None, **kwds): - self.update_options(argtypes, kwds) - self.ensure_backend('c') -- self.driver.source_c() -+ return self.driver.source_c() - - def source_cl(self, argtypes=None, **kwds): - self.update_options(argtypes, kwds) -diff -up pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py ---- pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py 2011-11-21 16:15:36.604466454 -0500 -@@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam - # "return result" - block = Block(wrapper_inputargs) - wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) -+ if hasattr(graph, 'func'): -+ wgraph.func = graph.func - translator.update_call_graph(wgraph, graph, object()) - translator.graphs.append(wgraph) - block.operations[:] = newops -diff -up pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/simplify.py ---- pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/simplify.py 2011-11-21 16:15:36.605466454 -0500 -@@ -292,7 +292,7 @@ def join_blocks(graph): - return renaming.get(v, v) - def rename_op(op): - args = [rename(a) for a in op.args] -- op = SpaceOperation(op.opname, args, rename(op.result), op.offset) -+ op = SpaceOperation(op.opname, args, rename(op.result), op.oploc) - # special case... - if op.opname == 'indirect_call': - if isinstance(op.args[0], Constant): diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch deleted file mode 100644 index 2391f32..0000000 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rup pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py ---- pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-27 10:35:37.762237806 +0200 -+++ pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-28 10:13:03.182536196 +0200 -@@ -587,7 +587,7 @@ class ProcessTestCase(BaseTestCase): - for i in range(1024): - # Windows raises IOError. Others raise OSError. - with self.assertRaises(EnvironmentError) as c: -- subprocess.Popen(['nonexisting_i_hope'], -+ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - # ignore errors that indicate the command was not found commit ff9537b3ed920fc031a5b18ab8b27efd0a194202 Author: Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> Date: Fri May 8 17:05:34 2015 +0000 Initial setup of the repo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 commit 36afc7f79102c83960c3d6bf8f4a8620554c0137 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue May 5 18:32:38 2015 +0200 Replace all lib-python python shebangs with pypy diff --git a/pypy3.spec b/pypy3.spec index edbfd2f..6e6bd46 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -281,6 +281,11 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done +# Replace all lib-python python shebangs with pypy +find lib-python/%{pylibver} -name "*.py" -exec \ + sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \ + "{}" \ + \; %build commit 976314ef808d7b7dbe2bc8961a5de2deae1cdc9f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:49:51 2015 +0200 Build with pypy diff --git a/pypy3.spec b/pypy3.spec index 218ce3e..edbfd2f 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -161,7 +161,9 @@ Patch2: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -%global use_self_when_building 0 +# Note, pypy3 is built with pypy2, so no dependency cycle + +%global use_self_when_building 1 %if 0%{use_self_when_building} # pypy3 can only be build with pypy2 BuildRequires: pypy commit 980f988cc4d495d359155cf3c1d12b2dfc81a08f Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:48:44 2015 +0200 BR git for %autosetup -S git diff --git a/pypy3.spec b/pypy3.spec index 77ffa2d..218ce3e 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -211,6 +211,8 @@ BuildRequires: /usr/bin/execstack BuildRequires: emacs %endif +# For %%autosetup -S git +BuildRequires: git # Metadata for the core package (the JIT build): Requires: pypy3-libs%{?_isa} = %{version}-%{release} commit 819b9f5595c2ac93d1a8a693a647a006f2c9bbc0 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon May 4 12:47:32 2015 +0200 Use %global instead of %define diff --git a/pypy3.spec b/pypy3.spec index e992b00..77ffa2d 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -337,14 +337,14 @@ BuildPyPy() { # This is the most portable option, and avoids a reliance on non-guaranteed # behaviors within GCC's code generator: use an explicitly-maintained stack # of root pointers: - %define gcrootfinder_options --gcrootfinder=shadowstack + %global gcrootfinder_options --gcrootfinder=shadowstack export CFLAGS=$(echo "$RPM_OPT_FLAGS") %else # Go with the default, which is "asmgcc" - %define gcrootfinder_options %{nil} + %global gcrootfinder_options %{nil} #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
# The generated Makefile compiles the .c files into assembler (.s), rather commit 524d40e5a2091088f5a28f16c996b757acbeb06b Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 20:05:42 2015 +0200 Remove build script from the package diff --git a/pypy3.spec b/pypy3.spec index 3b40c9a..e992b00 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -644,6 +644,9 @@ cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pyp mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d +# Remove build script from the package +rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py + %check topdir=$(pwd) commit cfca1560fdf042a07e2f7108eafc072b93f2617c Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 20:01:21 2015 +0200 Use git in %autosetup to avoid .orig files diff --git a/pypy3.spec b/pypy3.spec index 2f9ed15..3b40c9a 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -261,7 +261,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%autosetup -n pypy3-2.4.0-src -p1 +%autosetup -n pypy3-2.4.0-src -p1 -S git # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ commit 1120251a081f3a611d8d3f742b184985833e9998 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 19:58:39 2015 +0200 Change python-devel to python2-devel diff --git a/pypy3.spec b/pypy3.spec index 0c5b340..2f9ed15 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -170,7 +170,7 @@ BuildRequires: pypy # pypy3 can only be build with python2 -BuildRequires: python-devel +BuildRequires: python2-devel %global bootstrap_python_interp python %endif commit a7610e26e5c7a0bbaa8a7810daa04a625ae357af Author: Miro Hrončok <miro(a)hroncok.cz> Date: Tue Apr 28 19:51:45 2015 +0200 Don't mark RPM macros in /etc as %config diff --git a/pypy3.spec b/pypy3.spec index d9e54fd..0c5b340 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -801,7 +801,7 @@ CheckPyPy pypy3-stackless %files devel %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 +%{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless commit 7e82938b0f41850371be195e7be814fedd889d08 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:35:23 2015 +0200 Share the docdir across subpackages diff --git a/pypy3.spec b/pypy3.spec index 85a2dfc..d9e54fd 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -771,6 +771,10 @@ CheckPyPy pypy3-stackless %endif # run_selftests +# Because there's a bunch of binary subpackages and creating +# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that +# is just confusing for the user. +%global _docdir_fmt %{name} %files libs %license LICENSE commit 1842b1b13e95edfcea412981ed8f4cbe3e7a8383 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:26:21 2015 +0200 Require pypy3-libs with %{?_isa} diff --git a/pypy3.spec b/pypy3.spec index 93e53f0..85a2dfc 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -213,7 +213,7 @@ BuildRequires: emacs # Metadata for the core package (the JIT build): -Requires: pypy3-libs = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU @@ -245,7 +245,7 @@ Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages Summary: Development tools for working with PyPy3 -Requires: pypy3 = %{version}-%{release} +Requires: pypy3%{?_isa} = %{version}-%{release} %description devel Header files for building C extension modules against PyPy3 @@ -255,7 +255,7 @@ Header files for building C extension modules against PyPy3 %package stackless Group: Development/Languages Summary: Stackless Python interpreter built using PyPy3 -Requires: pypy3-libs = %{version}-%{release} +Requires: pypy3-libs%{?_isa} = %{version}-%{release} %description stackless Build of PyPy3 with support for micro-threads for massive concurrency %endif commit 7e5676a0456e5e3c711d481fe1e949c0448975ec Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:24:57 2015 +0200 Use %autosetup diff --git a/pypy3.spec b/pypy3.spec index 99c2a31..93e53f0 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -261,10 +261,7 @@ Build of PyPy3 with support for micro-threads for massive concurrency %endif %prep -%setup -q -n pypy3-2.4.0-src -%patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build -%patch1 -p1 -%patch2 -p1 +%autosetup -n pypy3-2.4.0-src -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ commit e7218e672da6a8e5c553080c36c8e72087e55817 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:16:19 2015 +0200 Use %license diff --git a/pypy3.spec b/pypy3.spec index 5bee793..99c2a31 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -776,7 +776,8 @@ CheckPyPy pypy3-stackless %files libs -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python @@ -791,7 +792,8 @@ CheckPyPy pypy3-stackless %endif %files -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{_bindir}/pypy3 %{pypyprefix}/pypy3 @@ -802,7 +804,8 @@ CheckPyPy pypy3-stackless %if 0%{with_stackless} %files stackless -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{_bindir}/pypy-stackless %endif commit 146960e8a0ae6b7d82f10d6a2c24e60cf3eadd59 Author: Miro Hrončok <miro(a)hroncok.cz> Date: Mon Apr 27 18:15:27 2015 +0200 Removed deprecated statements diff --git a/pypy3.spec b/pypy3.spec index 95ee959..5bee793 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -10,7 +10,6 @@ Group: Development/Languages # licensing terms License: MIT and Python and UCD URL:
http://pypy.org/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # High-level configuration of the build: @@ -425,8 +424,6 @@ BuildPyPy \ %install -rm -rf $RPM_BUILD_ROOT - # Install the various executables: InstallPyPy() { @@ -778,12 +775,7 @@ CheckPyPy pypy3-stackless %endif # run_selftests -%clean -rm -rf $RPM_BUILD_ROOT - - %files libs -%defattr(-,root,root,-) %doc LICENSE README.rst %dir %{pypyprefix} @@ -799,20 +791,17 @@ rm -rf $RPM_BUILD_ROOT %endif %files -%defattr(-,root,root,-) %doc LICENSE README.rst %{_bindir}/pypy3 %{pypyprefix}/pypy3 %files devel -%defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h %config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless -%defattr(-,root,root,-) %doc LICENSE README.rst %{_bindir}/pypy-stackless %endif commit 26c3863db65451cb67c67cd4e72a826698ef7bdf Author: Miro Hrončok <miro(a)hroncok.cz> Date: Sat Apr 25 00:48:59 2015 +0200 Change pypy2 spec to pypy3 diff --git a/.gitignore b/.gitignore index a61aa79..c9f3d9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1 @@ -/pypy-1.4.1-src.tar.bz2 -/pypy-1.5-src.tar.bz2 -/release-1.6.tar.bz2 -/release-1.7.tar.bz2 -/release-1.8.tar.bz2 -/release-1.9.tar.bz2 -/release-2.0-beta-1.tar.bz2 -/release-2.0.2.tar.bz2 -/release-2.1.0.tar.bz2 -/pypy-2.2-src.tar.bz2 -/pypy-2.2.1-src.tar.bz2 -/pypy-2.3-src.tar.bz2 -/release-2.3.1.tar.bz2 -/pypy-2.4.0-src.tar.bz2 +/pypy3-2.4.0-src.tar.bz2 diff --git a/macros.pypy b/macros.pypy deleted file mode 100644 index 5f40b6f..0000000 --- a/macros.pypy +++ /dev/null @@ -1,5 +0,0 @@ -%__pypy /usr/bin/pypy -%pypy_sitelib %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -%pypy_sitearch %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") -%pypy_version %(%{__pypy} -c "import sys; sys.stdout.write(sys.version[:3])") -%pypydir %{_builddir}/pypy-%{name}-%{version}-%{release} diff --git a/macros.pypy3 b/macros.pypy3 new file mode 100644 index 0000000..ef1f600 --- /dev/null +++ b/macros.pypy3 @@ -0,0 +1,5 @@ +%__pypy3 /usr/bin/pypy3 +%pypy3_sitelib %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%pypy3_sitearch %(%{__pypy3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") +%pypy3_version %(%{__pypy3} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy3dir %{_builddir}/pypy3-%{name}-%{version}-%{release} diff --git a/pypy.spec b/pypy3.spec similarity index 94% rename from pypy.spec rename to pypy3.spec index 4a3e56c..95ee959 100644 --- a/pypy.spec +++ b/pypy3.spec @@ -1,7 +1,7 @@ -Name: pypy +Name: pypy3 Version: 2.4.0 Release: 1%{?dist} -Summary: Python implementation with a Just-In-Time compiler +Summary: Python 3 implementation with a Just-In-Time compiler Group: Development/Languages # LGPL and another free license we'd need to ask spot about are present in some @@ -117,8 +117,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to turn off the selftests: %global run_selftests 1 -%global pypyprefix %{_libdir}/pypy-%{version} -%global pylibver 2.7 +%global pypyprefix %{_libdir}/pypy3-%{version} +%global pylibver 3 # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/goal @@ -130,11 +130,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy +Source2: macros.pypy3 # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -164,19 +164,15 @@ Patch2: 007-remove-startup-message.patch %global use_self_when_building 0 %if 0%{use_self_when_building} +# pypy3 can only be build with pypy2 BuildRequires: pypy %global bootstrap_python_interp pypy %else -# Python 2.6 or later is needed, so on RHEL5 (2.4) we need to use the alternate -# python26 rpm: -%if 0%{?rhel} == 5 -BuildRequires: python26-devel -%global bootstrap_python_interp python26 -%else + +# pypy3 can only be build with python2 BuildRequires: python-devel %global bootstrap_python_interp python -%endif %endif @@ -218,10 +214,10 @@ BuildRequires: emacs # Metadata for the core package (the JIT build): -Requires: pypy-libs = %{version}-%{release} +Requires: pypy3-libs = %{version}-%{release} %description -PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU +PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU architectures, and various optimized implementations of the standard types (strings, dictionaries, etc) @@ -235,7 +231,7 @@ CPU architecture. %package libs Group: Development/Languages -Summary: Run-time libraries used by PyPy implementations of Python +Summary: Run-time libraries used by PyPy implementations of Python 3 # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) @@ -244,39 +240,29 @@ Requires: emacs-filesystem >= %{_emacs_version} %endif %description libs -Libraries required by the various PyPy implementations of Python. +Libraries required by the various PyPy implementations of Python 3. %package devel Group: Development/Languages -Summary: Development tools for working with PyPy -Requires: pypy = %{version}-%{release} +Summary: Development tools for working with PyPy3 +Requires: pypy3 = %{version}-%{release} %description devel -Header files for building C extension modules against PyPy +Header files for building C extension modules against PyPy3 %if 0%{with_stackless} %package stackless Group: Development/Languages -Summary: Stackless Python interpreter built using PyPy -Requires: pypy-libs = %{version}-%{release} +Summary: Stackless Python interpreter built using PyPy3 +Requires: pypy3-libs = %{version}-%{release} %description stackless -Build of PyPy with support for micro-threads for massive concurrency +Build of PyPy3 with support for micro-threads for massive concurrency %endif -%if 0%{with_stackless} -%package stackless -Group: Development/Languages -Summary: Stackless Python interpreter built using PyPy -Requires: pypy-libs = %{version}-%{release} -%description stackless -Build of PyPy with support for micro-threads for massive concurrency -%endif - - %prep -%setup -q -n pypy-2.4.0-src +%setup -q -n pypy3-2.4.0-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -295,8 +281,6 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done -rm -rf lib-python/3 - %build @@ -421,7 +405,7 @@ BuildPyPy() { } BuildPyPy \ - pypy \ + pypy3 \ %if 0%{with_jit} "-Ojit" \ %else @@ -431,7 +415,7 @@ BuildPyPy \ %if 0%{with_stackless} BuildPyPy \ - pypy-stackless \ + pypy3-stackless \ "--stackless" %endif @@ -479,10 +463,10 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{pypyprefix} -InstallPyPy pypy +InstallPyPy pypy3 %if 0%{with_stackless} -InstallPyPy pypy-stackless +InstallPyPy pypy3-stackless %endif @@ -585,16 +569,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # Note that some of the test files deliberately contain syntax errors, so # we pass 0 for the second argument ("errors_terminate"): /usr/lib/rpm/brp-python-bytecompile \ - %{buildroot}/%{_bindir}/pypy \ + %{buildroot}/%{_bindir}/pypy3 \ 0 -%{buildroot}/%{pypyprefix}/pypy -c 'import _tkinter' -%{buildroot}/%{pypyprefix}/pypy -c 'import Tkinter' -%{buildroot}/%{pypyprefix}/pypy -c 'import _sqlite3' -%{buildroot}/%{pypyprefix}/pypy -c 'import _curses' -%{buildroot}/%{pypyprefix}/pypy -c 'import curses' -%{buildroot}/%{pypyprefix}/pypy -c 'import syslog' -%{buildroot}/%{pypyprefix}/pypy -c 'from _sqlite3 import *' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import tkinter' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import _curses' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import curses' +%{buildroot}/%{pypyprefix}/pypy3 -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy3 -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -658,7 +642,8 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el +cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif # Install macros for rpm: @@ -694,7 +679,7 @@ CheckPyPy() { # Use regrtest to explicitly list all tests: ( ./$ExeName -c \ - "from test.regrtest import findtests; print '\n'.join(findtests())" + "from test.regrtest import findtests; print('\n'.join(findtests()))" ) > testnames.txt # Skip some tests: @@ -784,10 +769,10 @@ CheckPyPy() { #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log %if %{run_selftests} -CheckPyPy pypy +CheckPyPy pypy3 %if 0%{with_stackless} -CheckPyPy pypy-stackless +CheckPyPy pypy3-stackless %endif %endif # run_selftests @@ -809,21 +794,21 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ %if %{with_emacs} -%{_emacs_sitelispdir}/pypytrace-mode.el -%{_emacs_sitelispdir}/pypytrace-mode.elc +%{_emacs_sitelispdir}/pypy3trace-mode.el +%{_emacs_sitelispdir}/pypy3trace-mode.elc %endif %files %defattr(-,root,root,-) %doc LICENSE README.rst -%{_bindir}/pypy -%{pypyprefix}/pypy +%{_bindir}/pypy3 +%{pypyprefix}/pypy3 %files devel %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy +%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy3 %if 0%{with_stackless} %files stackless diff --git a/sources b/sources index ab6b8f5..e4d98b7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6a25a212e7c5121f1f3988c118d05695 pypy-2.4.0-src.tar.bz2 +96ba72916114d16904e12562b5d84e51 pypy3-2.4.0-src.tar.bz2 commit e76c4a29685bfaf725af1ae1991d5b1fb7b7701c Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 23 12:20:25 2014 +0200 Update to 2.4.0 diff --git a/.gitignore b/.gitignore index 1babd6b..a61aa79 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /pypy-2.2.1-src.tar.bz2 /pypy-2.3-src.tar.bz2 /release-2.3.1.tar.bz2 +/pypy-2.4.0-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index daf5015..4a3e56c 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.3.1 -Release: 4%{?dist} +Version: 2.4.0 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.3.1.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -276,7 +276,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-32f35069a16d +%setup -q -n pypy-2.4.0-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -295,6 +295,8 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done +rm -rf lib-python/3 + %build @@ -832,6 +834,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Sep 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.4.0-1 +- Update to 2.4.0 + * Tue Sep 02 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-4 - Move devel subpackage requires so that it gets picked up by rpm diff --git a/sources b/sources index b80a17c..ab6b8f5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e9d26e6ed2ca809a791d88137e90629b release-2.3.1.tar.bz2 +6a25a212e7c5121f1f3988c118d05695 pypy-2.4.0-src.tar.bz2 commit f7434bab3f45aaf75e2d6b05664c9fd78197c10a Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 2 10:01:18 2014 +0200 Bump spec diff --git a/pypy.spec b/pypy.spec index 6f90d89..daf5015 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -832,6 +832,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 02 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-4 +- Move devel subpackage requires so that it gets picked up by rpm + * Sun Aug 17 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.1-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
commit 5efcdc8fe2e02fffb9ffce1004f3d25a8e86d593 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Sep 2 09:57:46 2014 +0200 Move devel subpackage requires so that it gets picked up by rpm Up to this point it belonged to the description, so pypy-devel did not require pypy. diff --git a/pypy.spec b/pypy.spec index f811755..6f90d89 100644 --- a/pypy.spec +++ b/pypy.spec @@ -250,11 +250,11 @@ Libraries required by the various PyPy implementations of Python. %package devel Group: Development/Languages Summary: Development tools for working with PyPy +Requires: pypy = %{version}-%{release} + %description devel Header files for building C extension modules against PyPy -Requires: pypy = %{version}-%{release} - %if 0%{with_stackless} %package stackless commit 7498717b84a98b28987846d94baf9177cf5b36ee Author: Peter Robinson <pbrobinson(a)fedoraproject.org> Date: Sun Aug 17 20:41:57 2014 +0000 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 8ab5959..f811755 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -832,6 +832,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Aug 17 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.1-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+ * Mon Jul 7 2014 Peter Robinson <pbrobinson(a)fedoraproject.org> 2.3.1-2 - ARMv7 is supported for JIT - no prelink on aarch64/ppc64le commit 43ee7785260fd8f42b86e62be70de5bc361a34d7 Author: Peter Robinson <pbrobinson(a)gmail.com> Date: Mon Jul 7 23:07:38 2014 +0100 ARMv7 is supported for JIT, no prelink on aarch64/ppc64le diff --git a/pypy.spec b/pypy.spec index 7c4106a..8ab5959 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -78,20 +78,20 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # # Unfortunately, the JIT support is only available on some architectures. # -# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the +# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the # following options: # 'i386', 'x86' # 'x86-without-sse2': # 'x86_64' +# 'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI) # 'cli' # 'llvm' # # We will only build with JIT support on those architectures, and build without # it on the other archs. The resulting binary will typically be slower than # CPython for the latter case. -# -%ifarch %{ix86} x86_64 -# FIXME: is there a better way of expressing "intel" here? + +%ifarch %{ix86} x86_64 %{arm} %global with_jit 1 %else %global with_jit 0 @@ -206,7 +206,10 @@ BuildRequires: time BuildRequires: perl %endif +# No prelink on these arches +%ifnarch aarch64 ppc64le BuildRequires: /usr/bin/execstack +%endif # For byte-compiling the JIT-viewing mode: %if %{with_emacs} @@ -466,7 +469,9 @@ InstallPyPy() { # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: +%ifnarch aarch64 ppc64le execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName +%endif } mkdir -p %{buildroot}/%{_bindir} @@ -827,6 +832,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jul 7 2014 Peter Robinson <pbrobinson(a)fedoraproject.org> 2.3.1-2 +- ARMv7 is supported for JIT +- no prelink on aarch64/ppc64le + * Sun Jun 08 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-1 - Update to 2.3.1 commit edc736c1c58fc920291a8e672c906b76d6e87a31 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Sun Jun 8 20:55:40 2014 +0200 Update to 2.3.1 diff --git a/.gitignore b/.gitignore index f59302b..1babd6b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /pypy-2.2-src.tar.bz2 /pypy-2.2.1-src.tar.bz2 /pypy-2.3-src.tar.bz2 +/release-2.3.1.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 96e21d5..7c4106a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.3 -Release: 5%{?dist} +Version: 2.3.1 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.3.1.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-394146e9bb67 +%setup -q -n pypy-pypy-32f35069a16d %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jun 08 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3.1-1 +- Update to 2.3.1 + * Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources index 8f25b0c..b80a17c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c93a8e47f3b3109af2f66d2bd766eb97 pypy-2.3-src.tar.bz2 +e9d26e6ed2ca809a791d88137e90629b release-2.3.1.tar.bz2 commit 1972c9c31b94769515b1972a39a9d4efe493e6d6 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Sat Jun 7 13:12:20 2014 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 6bdb671..96e21d5 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+ * Tue May 27 2014 Dennis Gilmore <dennis(a)ausil.us> - 2.3-4 - valgrind is available everywhere except 31 bit s390 commit a0374180ff792eb0a2b41434d1a3a47efe340d3e Author: Dennis Gilmore <dennis(a)ausil.us> Date: Tue May 27 16:16:43 2014 -0500 valgrind is available everywhere except 31 bit s390 diff --git a/pypy.spec b/pypy.spec index 096bd7d..6bdb671 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -191,7 +191,7 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel -%ifarch %{ix86} x86_64 ppc ppc64 s390x +%ifnarch s390 BuildRequires: valgrind-devel %endif @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 27 2014 Dennis Gilmore <dennis(a)ausil.us> - 2.3-4 +- valgrind is available everywhere except 31 bit s390 + * Wed May 21 2014 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.3-3 - Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
commit ce731cfa651140b831eeeabd176c041b6f9f4943 Author: Jaroslav Škarvada <jskarvad(a)redhat.com> Date: Wed May 21 12:32:28 2014 +0200 - Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
diff --git a/pypy.spec b/pypy.spec index 39b18d8..096bd7d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed May 21 2014 Jaroslav Škarvada <jskarvad(a)redhat.com> - 2.3-3 +- Rebuilt for
https://fedoraproject.org/wiki/Changes/f21tcl86
+ * Thu May 15 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-2 - Rebuilt (f21-python) commit a3993a30d37ff85750008622cc987a4650786896 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu May 15 12:20:24 2014 +0200 Rebuilt (f21-python) diff --git a/pypy.spec b/pypy.spec index 6e050f3..39b18d8 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu May 15 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-2 +- Rebuilt (f21-python) + * Tue May 13 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-1 - Updated to 2.3 commit db10290f0939d5c2dfd4d437bc2f98888752a48b Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Wed May 14 12:40:14 2014 +0200 Update to 2.3 diff --git a/.gitignore b/.gitignore index da7257b..f59302b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /release-2.1.0.tar.bz2 /pypy-2.2-src.tar.bz2 /pypy-2.2.1-src.tar.bz2 +/pypy-2.3-src.tar.bz2 diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index 1dddb69..2ff9068 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -2,7 +2,7 @@ diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46c --- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 +++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 @@ -4,7 +4,7 @@ import sys - import os + irc_header = "And now for something completely different" -def interactive_console(mainmodule=None, quiet=False): diff --git a/pypy.spec b/pypy.spec index c46997a..6e050f3 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 2.2.1 -Release: 3%{?dist} +Version: 2.3 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-2.2.1-src +%setup -q -n pypy-pypy-394146e9bb67 %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 13 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.3-1 +- Updated to 2.3 + * Mon Mar 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-3 - Put RPM macros in proper location diff --git a/sources b/sources index f8f0564..8f25b0c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ec9f48702323f9e93654ba73dd46720 pypy-2.2.1-src.tar.bz2 +c93a8e47f3b3109af2f66d2bd766eb97 pypy-2.3-src.tar.bz2 commit bca3bcda512353328ab9a768e28d0ac7b6904aa6 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Mar 11 09:05:43 2014 +0100 Also chenge files section diff --git a/pypy.spec b/pypy.spec index 85003c1..c46997a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -816,7 +816,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%config(noreplace) %{_sysconfdir}/rpm/macros.pypy +%config(noreplace) %{_rpmconfigdir}/macros.d/macros.pypy %if 0%{with_stackless} %files stackless commit 4dbc78c1aab1cf75870cf055ad54a46262e3fafb Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Mar 10 09:17:48 2014 +0100 Also add changelog entry diff --git a/pypy.spec b/pypy.spec index 6e73099..85003c1 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -827,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Mar 10 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-3 +- Put RPM macros in proper location + * Thu Jan 16 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-2 - Fixed errors due to missing __pycache__ commit 355feb2755aa6396e4fa0b512652ce25c2502ca7 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Feb 3 13:24:01 2014 +0100 Put rpm macros in proper location diff --git a/pypy.spec b/pypy.spec index 8604207..6e73099 100644 --- a/pypy.spec +++ b/pypy.spec @@ -655,8 +655,8 @@ cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} %endif # Install macros for rpm: -mkdir -p %{buildroot}/%{_sysconfdir}/rpm -install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm +mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d +install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d %check topdir=$(pwd) commit f8a7311107aa7a76736e8e763a17148340131c32 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Fri Jan 17 10:46:17 2014 +0100 Fix errors due to missing __pycache__ diff --git a/pypy.spec b/pypy.spec index 21987ac..8604207 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 2.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -581,10 +581,13 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 -%{goal_dir}/pypy -c 'import _tkinter' -%{goal_dir}/pypy -c 'import _sqlite3' -%{goal_dir}/pypy -c 'import _curses' -%{goal_dir}/pypy -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy -c 'import _tkinter' +%{buildroot}/%{pypyprefix}/pypy -c 'import Tkinter' +%{buildroot}/%{pypyprefix}/pypy -c 'import _sqlite3' +%{buildroot}/%{pypyprefix}/pypy -c 'import _curses' +%{buildroot}/%{pypyprefix}/pypy -c 'import curses' +%{buildroot}/%{pypyprefix}/pypy -c 'import syslog' +%{buildroot}/%{pypyprefix}/pypy -c 'from _sqlite3 import *' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) @@ -824,6 +827,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 16 2014 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-2 +- Fixed errors due to missing __pycache__ + * Thu Dec 05 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-1 - Updated to 2.2.1 - Several bundled modules (tkinter, sqlite3, curses, syslog) were commit 2cbecfd01cab504997f12fd8b434035e083dcec6 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu Jan 2 10:47:41 2014 +0100 Update to 2.2.1 diff --git a/.gitignore b/.gitignore index fa54eea..da7257b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /release-2.0.2.tar.bz2 /release-2.1.0.tar.bz2 /pypy-2.2-src.tar.bz2 +/pypy-2.2.1-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index cfb219f..21987ac 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,5 +1,5 @@ Name: pypy -Version: 2.2.0 +Version: 2.2.1 Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -273,7 +273,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-2.2-src +%setup -q -n pypy-2.2.1-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -768,6 +768,11 @@ CheckPyPy() { echo "--------------------------------------------------------------" } +#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600 +#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python +#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test +#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log + %if %{run_selftests} CheckPyPy pypy @@ -819,6 +824,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Dec 05 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.1-1 +- Updated to 2.2.1 +- Several bundled modules (tkinter, sqlite3, curses, syslog) were + not bytecompiled properly during build, that is now fixed +- prepared new tests, not enabled yet + * Thu Nov 14 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.0-1 - Updated to 2.2.0 diff --git a/sources b/sources index d5b9932..f8f0564 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5a5a3822605d7d811066b1b279da3c6e pypy-2.2-src.tar.bz2 +7ec9f48702323f9e93654ba73dd46720 pypy-2.2.1-src.tar.bz2 commit a79a105a7453f9b3f55d296774b2b28a256d8318 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Thu Jan 2 10:45:26 2014 +0100 Bytecompiled bunch of modules diff --git a/pypy.spec b/pypy.spec index cd225b9..cfb219f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -181,6 +181,10 @@ BuildRequires: python-devel %endif BuildRequires: libffi-devel +BuildRequires: tcl-devel +BuildRequires: tk-devel + +BuildRequires: sqlite-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel @@ -577,6 +581,10 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 +%{goal_dir}/pypy -c 'import _tkinter' +%{goal_dir}/pypy -c 'import _sqlite3' +%{goal_dir}/pypy -c 'import _curses' +%{goal_dir}/pypy -c 'import syslog' # Header files for C extension modules. # Upstream's packaging process (pypy/tool/release/package.py) commit 66ffb916e263ca7b45e75d7a209248c04f918264 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Tue Nov 12 10:19:28 2013 +0100 Updated to 2.2.0 diff --git a/.gitignore b/.gitignore index cad553e..fa54eea 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /release-2.0-beta-1.tar.bz2 /release-2.0.2.tar.bz2 /release-2.1.0.tar.bz2 +/pypy-2.2-src.tar.bz2 diff --git a/pypy.spec b/pypy.spec index e7ef81f..cd225b9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,5 +1,5 @@ Name: pypy -Version: 2.1.0 +Version: 2.2.0 Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler @@ -130,7 +130,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.1.0.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -162,7 +162,7 @@ Patch2: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -%global use_self_when_building 1 +%global use_self_when_building 0 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -269,7 +269,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-352c78d2e80f +%setup -q -n pypy-2.2-src %patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build %patch1 -p1 %patch2 -p1 @@ -811,6 +811,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Nov 14 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.2.0-1 +- Updated to 2.2.0 + * Thu Aug 15 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.1-1 - Updated to 2.1.0 diff --git a/sources b/sources index fff5a1a..d5b9932 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -59af571317843a1759cb1ff392c26260 release-2.1.0.tar.bz2 +5a5a3822605d7d811066b1b279da3c6e pypy-2.2-src.tar.bz2 commit febbbdb0e4b360dffdd77a04e5101afc16e463a8 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Fri Aug 16 10:12:29 2013 +0200 Updated to 2.1.0 diff --git a/.gitignore b/.gitignore index 63a65d6..cad553e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /release-1.9.tar.bz2 /release-2.0-beta-1.tar.bz2 /release-2.0.2.tar.bz2 +/release-2.1.0.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 1c72138..e7ef81f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,8 +1,6 @@ -%global alphatag b1 - Name: pypy -Version: 2.0.2 -Release: 5%{?dist} +Version: 2.1.0 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,50 +130,28 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.1.0.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch -Source2: macros.pypy - -# Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: config.patch +Source2: macros.pypy # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. # This obscures useful messages, and may waste CPU cycles, so suppress it, and # merely render dots: -Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch - -# Try to improve the readability of the generated .c code, by adding in the -# RPython source as comments where possible. -# A version of this was sent upstream as: -#
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
-# TODO: get this into the upstream bug tracker, and finish inlining -# support (rhbz#666963) -Patch4: more-readable-c-code.patch - -# In my koji builds, /root/bin is in the PATH for some reason -# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" -# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising -# OSError: [Errno 13] Permission denied -# when it tries to read /root/bin, rather than raising "No such file" -# -# Work around this by specifying an absolute path for the non-existant -# executable -# Not yet sent upstream -Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +Patch0: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch # Patch pypy.translator.platform so that stdout from "make" etc gets logged, # rather than just stderr, so that the command-line invocations of the compiler # and linker are captured: -Patch6: 006-always-log-stdout.patch +Patch1: 006-always-log-stdout.patch # Disable the printing of a quote from IRC on startup (these are stored in # ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could # cause confusion for end-users (and many are in-jokes within the PyPy # community that won't make sense outside of it). [Sorry to be a killjoy] -Patch7: 007-remove-startup-message.patch +Patch2: 007-remove-startup-message.patch # Build-time requirements: @@ -186,37 +162,7 @@ Patch7: 007-remove-startup-message.patch # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: -# I'm disabling the self-hosting for now, due to a fatal error seen inside the -# JIT, presumably whilst JIT-compiling something within the translator's -# inliner. -# -# Specifically, building pypy-1.4.1-7.fc15.src.rpm on x86_64 using pypy-1.4.1-5.fc15.x86_64 -#
http://koji.fedoraproject.org/koji/taskinfo?taskID=2721517
-# failed with this RPython traceback: -# ... snip ... -# [rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctransform.asmgcroot.ShapeDecompressor instance at 0x00000000f0b5bc80> has no attribute 'addr' -# [rtyper] specializing: 179300 / 180508 blocks (99%) -# [rtyper] specializing: 180500 / 180566 blocks (99%) -# [rtyper] -=- specialized 1363 more blocks -=- -# [rtyper] specializing: 180600 / 180777 blocks (99%) -# [rtyper] -=- specialized 211 more blocks -=- -# [backendopt:inlining] phase with threshold factor: 32.4 -# [backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic -# [x86/regalloc] Bogus arg in operation 76 at 0 -# RPython traceback: -# File "implement_62.c", line 39979, in send_bridge_to_backend -# File "implement_69.c", line 65301, in Assembler386_assemble_bridge -# File "implement_72.c", line 8078, in RegAlloc_prepare_bridge -# File "implement_40.c", line 53061, in RegAlloc__prepare -# File "implement_44.c", line 14305, in RegAlloc__compute_vars_longevity -# Fatal RPython error: NotImplementedError -# -# This appears to be deep within pypy/jit/backend/x86/regalloc.py which has -# called "not_implemented" to emit this message to stderr, before raising the -# exception: -# [x86/regalloc] Bogus arg in operation 76 at 0 - -%global use_self_when_building 0 +%global use_self_when_building 1 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -234,12 +180,6 @@ BuildRequires: python-devel %endif - -# FIXME: I'm seeing errors like this in the logs: -# [translation:WARNING] The module '_rawffi' is disabled -# [translation:WARNING] because importing pypy.rlib.libffi raised ImportError -# [translation:WARNING] 'libffi.a' not found in ['/usr/lib/libffi', '/usr/lib'] -# Presumably we need to fix things to support dynamically-linked libffi BuildRequires: libffi-devel BuildRequires: zlib-devel @@ -269,11 +209,6 @@ BuildRequires: /usr/bin/execstack BuildRequires: emacs %endif -# pypy is bundling these so we delete them in %%prep. I don't think they are -# needed unless we build pypy targetted at running on the jvm. -#BuildRequires: jna -#BuildRequires: jasmin # Not yet in Fedora - # Metadata for the core package (the JIT build): Requires: pypy-libs = %{version}-%{release} @@ -334,47 +269,10 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-f66246c46ca3 -%patch0 -p1 -b .configure-fedora -%patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build - -# Disabled for now, as it needs regenerating for 1.8 -#patch4 -p1 -b .more-readable-c-code -# Fails on 1.8 with this error: -# [translation:ERROR] Error: -# [translation:ERROR] Traceback (most recent call last): -# [translation:ERROR] File "translate.py", line 309, in main -# [translation:ERROR] drv.proceed(goals) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 811, in proceed -# [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/tool/taskengine.py", line 116, in _execute -# [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 287, in _do -# [translation:ERROR] res = func() -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 530, in task_source_c -# [translation:ERROR] exe_name=exe_name) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 252, in generate_source -# [translation:ERROR] split=self.split) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 989, in gen_source -# [translation:ERROR] sg.gen_readable_parts_of_source(f) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 843, in gen_readable_parts_of_source -# [translation:ERROR] for node, impl in nodeiter: -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 729, in subiter -# [translation:ERROR] impl = '\n'.join(list(node.implementation())).split('\n') -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 867, in implementation -# [translation:ERROR] for s in self.funcgen_implementation(funcgen): -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 901, in funcgen_implementation -# [translation:ERROR] for line in bodyiter: -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 272, in cfunction_body -# [translation:ERROR] blocks.sort(block_comparator) -# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 34, in block_comparator -# [translation:ERROR] if blk0.isstartblock: -# [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' - -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 - +%setup -q -n pypy-pypy-352c78d2e80f +%patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build +%patch1 -p1 +%patch2 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -383,15 +281,6 @@ find -name "*.py" -exec \ "{}" \ \; -find . -name '*.jar' -exec rm \{\} \; - -# Remove stray ".svn" directories present within the 1.4.1 tarball -# (reported as
https://codespeak.net/issue/pypy-dev/issue612
) -find . -path '*/.svn*' -delete - -# Remove DOS batch files: -find -name "*.bat"|xargs rm -f - for f in rpython/translator/goal/bpnn.py ; do # Detect shebang lines && remove them: sed -e '/^#!/Q 0' -e 'Q 1' $f \ @@ -399,6 +288,7 @@ for f in rpython/translator/goal/bpnn.py ; do chmod a-x $f done + %build BuildPyPy() { @@ -540,10 +430,10 @@ BuildPyPy \ %{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif + %install rm -rf $RPM_BUILD_ROOT - # Install the various executables: InstallPyPy() { @@ -921,6 +811,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 15 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.1-1 +- Updated to 2.1.0 + * Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0.2-5 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources index a37f747..fff5a1a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -328a509c092b5477f99be8dd452d81c2 release-2.0.2.tar.bz2 +59af571317843a1759cb1ff392c26260 release-2.1.0.tar.bz2 commit 309e1cf6aab2cc2ecf9ae9897a22f271a9d4fb9c Author: Dennis Gilmore <dennis(a)ausil.us> Date: Sun Aug 4 01:04:23 2013 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 8f28baf..1c72138 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Aug 04 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0.2-5 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+ * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-4 - Patch1 fix commit b4e1c2185a5384e5ba4d898fe7fbca0ad3db45c2 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 10:44:06 2013 +0200 Patch1 fix diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch index 257f60f..c97eaf3 100644 --- a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +++ b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch @@ -1,7 +1,6 @@ -diff --git a/pypy/tool/ansi_print.py b/pypy/tool/ansi_print.py -index 3eff27c..fac4ba2 100644 ---- a/pypy/tool/ansi_print.py -+++ b/pypy/tool/ansi_print.py +diff -rup pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py +--- pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-27 10:35:37.648237156 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-28 10:15:58.200426205 +0200 @@ -25,7 +25,7 @@ class AnsiLog: self.kw_to_color = self.KW_TO_COLOR.copy() self.kw_to_color.update(kw_to_color) diff --git a/pypy.spec b/pypy.spec index 2470609..8f28baf 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-4 +- Patch1 fix + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-3 - Yet another Sources fix commit 8c737bc2aa985ae04d4540daefef663e827f8ba2 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 10:29:01 2013 +0200 Yet another Sources fix diff --git a/.gitignore b/.gitignore index 2793282..63a65d6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /release-1.8.tar.bz2 /release-1.9.tar.bz2 /release-2.0-beta-1.tar.bz2 +/release-2.0.2.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 66a66a9..2470609 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2#/pypy-pypy-f66246…
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-3 +- Yet another Sources fix + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-2 - Fixed Source URL diff --git a/sources b/sources index e7d211b..a37f747 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4a346df59983e4a5c50e8ee211f80619 release-2.0-beta-1.tar.bz2 +328a509c092b5477f99be8dd452d81c2 release-2.0.2.tar.bz2 commit 5694529edb24cba3edd56720cee077b791e8378c Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 09:24:07 2013 +0200 Fixed Source URL diff --git a/pypy.spec b/pypy.spec index 1ce9198..66a66a9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2#/pypy-pypy-f66246…
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -921,6 +921,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-2 +- Fixed Source URL + * Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-1 - 2.0.2, patch 8 does not seem necessary anymore commit c3a10ade23f8dac35b5ef0edc6f2c23856705044 Author: Matej Stuchlik <mstuchli(a)redhat.com> Date: Mon Jun 24 08:57:35 2013 +0200 Updated to 2.0.2 diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch index 2df1f00..5d49335 100644 --- a/006-always-log-stdout.patch +++ b/006-always-log-stdout.patch @@ -1,6 +1,7 @@ ---- pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py.always_log_stdout 2012-07-06 11:13:46.878979461 -0400 -+++ pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py 2012-07-06 11:25:26.281235732 -0400 -@@ -126,6 +126,8 @@ class Platform(object): +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:35:37.680237338 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:41:04.113098738 +0200 +@@ -138,6 +138,8 @@ class Platform(object): self._handle_error(returncode, stdout, stderr, outname) def _handle_error(self, returncode, stdout, stderr, outname): diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch index e05586b..1dddb69 100644 --- a/007-remove-startup-message.patch +++ b/007-remove-startup-message.patch @@ -1,21 +1,12 @@ ---- pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py.remove_startup_message 2012-07-06 12:10:46.504228264 -0400 -+++ pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py 2012-07-06 12:11:01.986034714 -0400 -@@ -13,18 +13,6 @@ def interactive_console(mainmodule=None) - sys.ps2 = '.... ' - # - try: -- from _pypy_irc_topic import some_topic -- text = "And now for something completely different: ``%s''" % ( -- some_topic(),) -- while len(text) >= 80: -- i = text[:80].rfind(' ') -- print text[:i] -- text = text[i+1:] -- print text -- except ImportError: -- pass -- # -- try: - if not os.isatty(sys.stdin.fileno()): - # Bail out if stdin is not tty-like, as pyrepl wouldn't be happy - # For example, with: +diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py +--- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 ++++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 +@@ -4,7 +4,7 @@ import sys + import os + + +-def interactive_console(mainmodule=None, quiet=False): ++def interactive_console(mainmodule=None, quiet=True): + # set sys.{ps1,ps2} just before invoking the interactive interpreter. This + # mimics what CPython does in pythonrun.c + if not hasattr(sys, 'ps1'): diff --git a/config.patch b/config.patch index a11f397..bf81d7d 100644 --- a/config.patch +++ b/config.patch @@ -1,7 +1,7 @@ -diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-2346207d9946/pypy/translator/platform/linux.py ---- pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/pypy/translator/platform/linux.py 2012-02-10 09:06:20.393066016 -0500 -@@ -31,13 +31,14 @@ class BaseLinux(BasePosix): +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:35:37.679237332 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:47:41.506354482 +0200 +@@ -32,19 +32,20 @@ class BaseLinux(BasePosix): return self._pkg_config("libffi", "--libs-only-L", ['/usr/lib/libffi']) @@ -9,15 +9,27 @@ diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedo - # places where we need to look for libffi.a - # XXX obscuuure! only look for libffi.a if run with translate.py - if 'translate' in sys.modules: -- return self.library_dirs_for_libffi() + ['/usr/lib'] +- if sys.maxint > 2**32: +- host = 'x86_64' +- else: +- host = 'x86' +- return self.library_dirs_for_libffi() + [ +- '/usr/lib', +- '/usr/lib/%s-linux-gnu/' % host] - else: - return [] -+ # Fedora, at least, has the shared version but not the static: ++ #Fedora, at least, has the shared version but not the static: + #def library_dirs_for_libffi_a(self): + # # places where we need to look for libffi.a + # # XXX obscuuure! only look for libffi.a if run with translate.py + # if 'translate' in sys.modules: -+ # return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # if sys.maxint > 2**32: ++ # host = 'x86_64' ++ # else: ++ # host = 'x86' ++ # return self.library_dirs_for_libffi() + [ ++ # '/usr/lib', ++ # '/usr/lib/%s-linux-gnu/' % host] + # else: + # return [] diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch index 9071be5..2391f32 100644 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -1,6 +1,7 @@ ---- pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py.orig 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py 2012-02-10 09:14:08.312216221 -0500 -@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): +diff -rup pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-27 10:35:37.762237806 +0200 ++++ pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-28 10:13:03.182536196 +0200 +@@ -587,7 +587,7 @@ class ProcessTestCase(BaseTestCase): for i in range(1024): # Windows raises IOError. Others raise OSError. with self.assertRaises(EnvironmentError) as c: diff --git a/pypy.spec b/pypy.spec index dbcbc8d..1ce9198 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,8 +1,8 @@ %global alphatag b1 Name: pypy -Version: 2.0 -Release: 0.2.%{alphatag}%{?dist} +Version: 2.0.2 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -123,7 +123,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %global pylibver 2.7 # We refer to this subdir of the source tree in a few places during the build: -%global goal_dir pypy/translator/goal +%global goal_dir pypy/goal # Turn off the brp-python-bytecompile postprocessing script @@ -132,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -177,21 +177,6 @@ Patch6: 006-always-log-stdout.patch # community that won't make sense outside of it). [Sorry to be a killjoy] Patch7: 007-remove-startup-message.patch -# With pypy-1.9-1.fc17.x86_64, the pypy binary exposes about 200k symbols to -# the dynamic linker: -# $ eu-readelf -s $(which pypy) | head -# Symbol table [ 5] '.dynsym' contains 194163 entries: -# which is far more than necessary. -# Fix the version script for the linker as invoked thus in the Makefile: -# "-Wl,--export-dynamic,--version-script=../dynamic-symbols-6" -# so that it contains a "local: *;" clause, thus hiding the bulk of the -# symbols from the dynamic linker. -# Ideally we'd add: -# __attribute__ ((visibility ("hidden"))) -# to most symbols, allowing the compiler to potentially generate better code. -# Not yet reported upstream -Patch8: 008-fix-dynamic-symbols-script.patch - # Build-time requirements: @@ -349,7 +334,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-07e08e9c885c +%setup -q -n pypy-pypy-f66246c46ca3 %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -389,7 +374,6 @@ Build of PyPy with support for micro-threads for massive concurrency %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: @@ -408,9 +392,7 @@ find . -path '*/.svn*' -delete # Remove DOS batch files: find -name "*.bat"|xargs rm -f -# The "demo" directory gets auto-installed by virture of being listed in %doc -# Remove shebang lines from demo .py files, and remove executability from them: -for f in demo/bpnn.py ; do +for f in rpython/translator/goal/bpnn.py ; do # Detect shebang lines && remove them: sed -e '/^#!/Q 0' -e 'Q 1' $f \ && sed -i '1d' $f @@ -522,15 +504,11 @@ BuildPyPy() { RPM_BUILD_ROOT= \ PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ - $INTERP translate.py \ -%if 0%{verbose_logs} - --translation-verbose \ -%endif - --cflags="$CFLAGS" \ - --batch \ + $INTERP ../../rpython/bin/rpython \ --output=$ExeName \ %{gcrootfinder_options} \ - $Options + $Options \ + targetpypystandalone echo "--------------------------------------------------------------" echo "--------------------------------------------------------------" @@ -559,7 +537,7 @@ BuildPyPy \ %endif %if %{with_emacs} -%{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el +%{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif %install @@ -772,7 +750,7 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} %endif # Install macros for rpm: @@ -908,7 +886,7 @@ rm -rf $RPM_BUILD_ROOT %files libs %defattr(-,root,root,-) -%doc LICENSE README demo +%doc LICENSE README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python @@ -924,7 +902,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy %{pypyprefix}/pypy @@ -937,12 +915,15 @@ rm -rf $RPM_BUILD_ROOT %if 0%{with_stackless} %files stackless %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy-stackless %endif %changelog +* Mon Jun 24 2013 Matej Stuchlik <mstuchli(a)redhat.com> - 2.0.2-1 +- 2.0.2, patch 8 does not seem necessary anymore + * Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0-0.2.b1 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
commit fd80b8a933ad44429dfb88ee58aecaf24faf9135 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Thu Feb 14 12:48:36 2013 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index b29583d..dbcbc8d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -2,7 +2,7 @@ Name: pypy Version: 2.0 -Release: 0.1.%{alphatag}%{?dist} +Release: 0.2.%{alphatag}%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -943,6 +943,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 14 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.0-0.2.b1 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+ * Tue Dec 11 2012 David Malcolm <dmalcolm(a)redhat.com> - 2.0-0.1.b1 - 2.0b1 (drop upstreamed patch 9) commit 8e0c0345a5ec642705520ed20aad13dfb15ec7c2 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Dec 13 06:16:11 2012 -0500 2.0-0.1.b1 diff --git a/.gitignore b/.gitignore index 4c551cc..2793282 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /release-1.7.tar.bz2 /release-1.8.tar.bz2 /release-1.9.tar.bz2 +/release-2.0-beta-1.tar.bz2 diff --git a/009-add-PyInt_AsUnsignedLongLongMask.patch b/009-add-PyInt_AsUnsignedLongLongMask.patch deleted file mode 100644 index dae7e16..0000000 --- a/009-add-PyInt_AsUnsignedLongLongMask.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/pypy/module/cpyext/intobject.py b/pypy/module/cpyext/intobject.py ---- a/pypy/module/cpyext/intobject.py -+++ b/pypy/module/cpyext/intobject.py -@@ -6,7 +6,7 @@ - PyObject, PyObjectFields, CONST_STRING, CANNOT_FAIL, Py_ssize_t) - from pypy.module.cpyext.pyobject import ( - make_typedescr, track_reference, RefcountState, from_ref) --from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST -+from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST, r_ulonglong - from pypy.objspace.std.intobject import W_IntObject - import sys - -@@ -83,6 +83,20 @@ - num = space.bigint_w(w_int) - return num.uintmask() - -+@cpython_api([PyObject], rffi.ULONGLONG, error=-1) -+def PyInt_AsUnsignedLongLongMask(space, w_obj): -+ """Will first attempt to cast the object to a PyIntObject or -+ PyLongObject, if it is not already one, and then return its value as -+ unsigned long long, without checking for overflow. -+ """ -+ w_int = space.int(w_obj) -+ if space.is_true(space.isinstance(w_int, space.w_int)): -+ num = space.int_w(w_int) -+ return r_ulonglong(num) -+ else: -+ num = space.bigint_w(w_int) -+ return num.ulonglongmask() -+ - @cpython_api([PyObject], lltype.Signed, error=CANNOT_FAIL) - def PyInt_AS_LONG(space, w_int): - """Return the value of the object w_int. No error checking is performed.""" -diff --git a/pypy/module/cpyext/test/test_intobject.py b/pypy/module/cpyext/test/test_intobject.py ---- a/pypy/module/cpyext/test/test_intobject.py -+++ b/pypy/module/cpyext/test/test_intobject.py -@@ -34,6 +34,11 @@ - assert (api.PyInt_AsUnsignedLongMask(space.wrap(10**30)) - == 10**30 % ((sys.maxint + 1) * 2)) - -+ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(sys.maxint)) -+ == sys.maxint) -+ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(10**30)) -+ == 10**30 % (2**64)) -+ - def test_coerce(self, space, api): - class Coerce(object): - def __int__(self): diff --git a/pypy.spec b/pypy.spec index 057fbdd..b29583d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,8 @@ +%global alphatag b1 + Name: pypy -Version: 1.9 -Release: 4%{?dist} +Version: 2.0 +Release: 0.1.%{alphatag}%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -130,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-2.0-beta-1.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -191,12 +193,6 @@ Patch7: 007-remove-startup-message.patch Patch8: 008-fix-dynamic-symbols-script.patch -# Cherrypick upstream patch to add PyInt_AsUnsignedLongLongMask (used by -# the rpm python bindings); see
https://bugs.pypy.org/issue1211
-# This is
https://bitbucket.org/pypy/pypy/changeset/542d481517d3
-Patch9: 009-add-PyInt_AsUnsignedLongLongMask.patch - - # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -353,7 +349,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-341e1e3821ff +%setup -q -n pypy-pypy-07e08e9c885c %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -394,7 +390,6 @@ Build of PyPy with support for micro-threads for massive concurrency %patch6 -p1 %patch7 -p1 %patch8 -p1 -%patch9 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: @@ -631,6 +626,10 @@ cp -a lib_pypy %{buildroot}/%{pypyprefix} # Remove a text file that documents which selftests fail on Win32: rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt +# Remove a text file containing upstream's recipe for syncing stdlib in +# their hg repository with cpython's: +rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt + # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: find \ @@ -944,6 +943,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 11 2012 David Malcolm <dmalcolm(a)redhat.com> - 2.0-0.1.b1 +- 2.0b1 (drop upstreamed patch 9) + * Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.9-4 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/sources b/sources index 2a64332..e7d211b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f92c0171a9578a3e4a0f74947ec596ab release-1.9.tar.bz2 +4a346df59983e4a5c50e8ee211f80619 release-2.0-beta-1.tar.bz2 commit cd9f89c255519e6d52d820882b9cc72cc74932b7 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Fri Jul 20 23:22:27 2012 -0500 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 2ed932b..057fbdd 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -944,6 +944,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jul 21 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.9-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+ * Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 - log all output from "make" (patch 6) - disable the MOTD at startup (patch 7) commit 26f62305fe07f9429bb6f4dc47d8749d7bd8ca7f Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Jul 10 16:45:52 2012 -0400 1.9-3 * Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 - log all output from "make" (patch 6) - disable the MOTD at startup (patch 7) - hide symbols from the dynamic linker (patch 8) - add PyInt_AsUnsignedLongLongMask (patch 9) - capture the Makefile, the typeids.txt, and the dynamic-symbols file within the debuginfo package diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch new file mode 100644 index 0000000..2df1f00 --- /dev/null +++ b/006-always-log-stdout.patch @@ -0,0 +1,11 @@ +--- pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py.always_log_stdout 2012-07-06 11:13:46.878979461 -0400 ++++ pypy-pypy-341e1e3821ff/pypy/translator/platform/__init__.py 2012-07-06 11:25:26.281235732 -0400 +@@ -126,6 +126,8 @@ class Platform(object): + self._handle_error(returncode, stdout, stderr, outname) + + def _handle_error(self, returncode, stdout, stderr, outname): ++ for line in stdout.splitlines(): ++ log.message(line) + if returncode != 0: + errorfile = outname.new(ext='errors') + errorfile.write(stderr, 'wb') diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch new file mode 100644 index 0000000..e05586b --- /dev/null +++ b/007-remove-startup-message.patch @@ -0,0 +1,21 @@ +--- pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py.remove_startup_message 2012-07-06 12:10:46.504228264 -0400 ++++ pypy-pypy-341e1e3821ff/lib_pypy/_pypy_interact.py 2012-07-06 12:11:01.986034714 -0400 +@@ -13,18 +13,6 @@ def interactive_console(mainmodule=None) + sys.ps2 = '.... ' + # + try: +- from _pypy_irc_topic import some_topic +- text = "And now for something completely different: ``%s''" % ( +- some_topic(),) +- while len(text) >= 80: +- i = text[:80].rfind(' ') +- print text[:i] +- text = text[i+1:] +- print text +- except ImportError: +- pass +- # +- try: + if not os.isatty(sys.stdin.fileno()): + # Bail out if stdin is not tty-like, as pyrepl wouldn't be happy + # For example, with: diff --git a/008-fix-dynamic-symbols-script.patch b/008-fix-dynamic-symbols-script.patch new file mode 100644 index 0000000..5b1d551 --- /dev/null +++ b/008-fix-dynamic-symbols-script.patch @@ -0,0 +1,15 @@ +diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py +--- a/pypy/translator/platform/posix.py ++++ b/pypy/translator/platform/posix.py +@@ -48,8 +48,10 @@ + response_file = self._make_response_file("dynamic-symbols-") + f = response_file.open("w") + f.write("{\n") ++ f.write(" global:\n") + for sym in eci.export_symbols: +- f.write("%s;\n" % (sym,)) ++ f.write(" %s;\n" % (sym,)) ++ f.write(" local:*;\n") + f.write("};") + f.close() + diff --git a/009-add-PyInt_AsUnsignedLongLongMask.patch b/009-add-PyInt_AsUnsignedLongLongMask.patch new file mode 100644 index 0000000..dae7e16 --- /dev/null +++ b/009-add-PyInt_AsUnsignedLongLongMask.patch @@ -0,0 +1,48 @@ +diff --git a/pypy/module/cpyext/intobject.py b/pypy/module/cpyext/intobject.py +--- a/pypy/module/cpyext/intobject.py ++++ b/pypy/module/cpyext/intobject.py +@@ -6,7 +6,7 @@ + PyObject, PyObjectFields, CONST_STRING, CANNOT_FAIL, Py_ssize_t) + from pypy.module.cpyext.pyobject import ( + make_typedescr, track_reference, RefcountState, from_ref) +-from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST ++from pypy.rlib.rarithmetic import r_uint, intmask, LONG_TEST, r_ulonglong + from pypy.objspace.std.intobject import W_IntObject + import sys + +@@ -83,6 +83,20 @@ + num = space.bigint_w(w_int) + return num.uintmask() + ++@cpython_api([PyObject], rffi.ULONGLONG, error=-1) ++def PyInt_AsUnsignedLongLongMask(space, w_obj): ++ """Will first attempt to cast the object to a PyIntObject or ++ PyLongObject, if it is not already one, and then return its value as ++ unsigned long long, without checking for overflow. ++ """ ++ w_int = space.int(w_obj) ++ if space.is_true(space.isinstance(w_int, space.w_int)): ++ num = space.int_w(w_int) ++ return r_ulonglong(num) ++ else: ++ num = space.bigint_w(w_int) ++ return num.ulonglongmask() ++ + @cpython_api([PyObject], lltype.Signed, error=CANNOT_FAIL) + def PyInt_AS_LONG(space, w_int): + """Return the value of the object w_int. No error checking is performed.""" +diff --git a/pypy/module/cpyext/test/test_intobject.py b/pypy/module/cpyext/test/test_intobject.py +--- a/pypy/module/cpyext/test/test_intobject.py ++++ b/pypy/module/cpyext/test/test_intobject.py +@@ -34,6 +34,11 @@ + assert (api.PyInt_AsUnsignedLongMask(space.wrap(10**30)) + == 10**30 % ((sys.maxint + 1) * 2)) + ++ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(sys.maxint)) ++ == sys.maxint) ++ assert (api.PyInt_AsUnsignedLongLongMask(space.wrap(10**30)) ++ == 10**30 % (2**64)) ++ + def test_coerce(self, space, api): + class Coerce(object): + def __int__(self): diff --git a/pypy.spec b/pypy.spec index e579720..2ed932b 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -164,6 +164,39 @@ Patch4: more-readable-c-code.patch # Not yet sent upstream Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +# Patch pypy.translator.platform so that stdout from "make" etc gets logged, +# rather than just stderr, so that the command-line invocations of the compiler +# and linker are captured: +Patch6: 006-always-log-stdout.patch + +# Disable the printing of a quote from IRC on startup (these are stored in +# ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could +# cause confusion for end-users (and many are in-jokes within the PyPy +# community that won't make sense outside of it). [Sorry to be a killjoy] +Patch7: 007-remove-startup-message.patch + +# With pypy-1.9-1.fc17.x86_64, the pypy binary exposes about 200k symbols to +# the dynamic linker: +# $ eu-readelf -s $(which pypy) | head +# Symbol table [ 5] '.dynsym' contains 194163 entries: +# which is far more than necessary. +# Fix the version script for the linker as invoked thus in the Makefile: +# "-Wl,--export-dynamic,--version-script=../dynamic-symbols-6" +# so that it contains a "local: *;" clause, thus hiding the bulk of the +# symbols from the dynamic linker. +# Ideally we'd add: +# __attribute__ ((visibility ("hidden"))) +# to most symbols, allowing the compiler to potentially generate better code. +# Not yet reported upstream +Patch8: 008-fix-dynamic-symbols-script.patch + + +# Cherrypick upstream patch to add PyInt_AsUnsignedLongLongMask (used by +# the rpm python bindings); see
https://bugs.pypy.org/issue1211
+# This is
https://bitbucket.org/pypy/pypy/changeset/542d481517d3
+Patch9: 009-add-PyInt_AsUnsignedLongLongMask.patch + + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -358,6 +391,11 @@ Build of PyPy with support for micro-threads for massive concurrency # [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 + # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -696,15 +734,31 @@ mkdir -p %{buildroot}%{pypy_debuginfo_dir} # copy over everything: cp -a pypy %{buildroot}%{pypy_debuginfo_dir} -# ...then delete files that aren't .py files: +# ...then delete files that aren't: +# - *.py files +# - the Makefile +# - typeids.txt +# - dynamic-symbols-* find \ - %{buildroot}%{pypy_debuginfo_dir} \ - \( -type f \ - -a \ - \! -name "*.py" \ - \) \ + %{buildroot}%{pypy_debuginfo_dir} \ + \( -type f \ + -a \ + \! \( -name "*.py" \ + -o \ + -name "Makefile" \ + -o \ + -name "typeids.txt" \ + -o \ + -name "dynamic-symbols-*" \ + \) \ + \) \ -delete +# Alternatively, we could simply keep everything. This leads to a ~350MB +# debuginfo package, but it makes it easy to hack on the Makefile and C build +# flags by rebuilding/linking the sources. +# To do so, remove the above "find" command. + # We don't need bytecode for these files; they are being included for reference # purposes. # There are some rpmlint warnings from these files: @@ -890,6 +944,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jul 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-3 +- log all output from "make" (patch 6) +- disable the MOTD at startup (patch 7) +- hide symbols from the dynamic linker (patch 8) +- add PyInt_AsUnsignedLongLongMask (patch 9) +- capture the Makefile, the typeids.txt, and the dynamic-symbols file within +the debuginfo package + * Mon Jun 18 2012 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.9-2 - Compile with PIC, fixes FTBFS on ARM commit 92ec0ebc5bf5746a03e45726d8e300ef51ff7940 Author: Peter Robinson <pbrobinson(a)gmail.com> Date: Mon Jun 18 09:50:36 2012 +0100 Compile with PIC, fixes FTBFS on ARM diff --git a/pypy.spec b/pypy.spec index 80b4039..e579720 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -471,7 +471,7 @@ BuildPyPy() { # The generated C code leads to many thousands of warnings of the form: # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] # Suppress them: - export CFLAGS=$(echo "$CFLAGS" -Wno-unused) + export CFLAGS=$(echo "$CFLAGS" -Wno-unused -fPIC) # If we're already built the JIT-enabled "pypy", then use it for subsequent # builds (of other configurations): @@ -890,6 +890,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 18 2012 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.9-2 +- Compile with PIC, fixes FTBFS on ARM + * Fri Jun 8 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-1 - 1.9 commit 615fd77fe04457d552feff9d10986589b35a6148 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Wed Jun 13 11:11:16 2012 -0400 upload 1.9 tarball diff --git a/.gitignore b/.gitignore index 86ec921..4c551cc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /release-1.6.tar.bz2 /release-1.7.tar.bz2 /release-1.8.tar.bz2 +/release-1.9.tar.bz2 diff --git a/sources b/sources index 30a988e..2a64332 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -661be06978fdc907d84f0ee1f1228c8b release-1.8.tar.bz2 +f92c0171a9578a3e4a0f74947ec596ab release-1.9.tar.bz2 commit b042622bfa38e9ad3794d4f845207042e589b20b Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jun 8 20:18:15 2012 -0400 1.9 diff --git a/pypy.spec b/pypy.spec index 8b80611..80b4039 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.8 -Release: 2%{?dist} +Version: 1.9 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -320,7 +320,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-2346207d9946 +%setup -q -n pypy-pypy-341e1e3821ff %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -861,7 +861,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix}/lib-python %{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ -%{pypyprefix}/lib-python/modified-%{pylibver}/ %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ @@ -891,6 +890,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jun 8 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.9-1 +- 1.9 + * Fri Feb 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-2 - disable C readability patch for now (patch 4) commit 07098c88a6645a0333d4c0d927251a23d002376d Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Feb 10 11:12:43 2012 -0500 1.8-2: disable C readability patch for now (patch 4) diff --git a/pypy.spec b/pypy.spec index 9838bae..8b80611 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -324,7 +324,38 @@ Build of PyPy with support for micro-threads for massive concurrency %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build -%patch4 -p1 -b .more-readable-c-code +# Disabled for now, as it needs regenerating for 1.8 +#patch4 -p1 -b .more-readable-c-code +# Fails on 1.8 with this error: +# [translation:ERROR] Error: +# [translation:ERROR] Traceback (most recent call last): +# [translation:ERROR] File "translate.py", line 309, in main +# [translation:ERROR] drv.proceed(goals) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 811, in proceed +# [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/tool/taskengine.py", line 116, in _execute +# [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 287, in _do +# [translation:ERROR] res = func() +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/driver.py", line 530, in task_source_c +# [translation:ERROR] exe_name=exe_name) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 252, in generate_source +# [translation:ERROR] split=self.split) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 989, in gen_source +# [translation:ERROR] sg.gen_readable_parts_of_source(f) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 843, in gen_readable_parts_of_source +# [translation:ERROR] for node, impl in nodeiter: +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/genc.py", line 729, in subiter +# [translation:ERROR] impl = '\n'.join(list(node.implementation())).split('\n') +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 867, in implementation +# [translation:ERROR] for s in self.funcgen_implementation(funcgen): +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/node.py", line 901, in funcgen_implementation +# [translation:ERROR] for line in bodyiter: +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 272, in cfunction_body +# [translation:ERROR] blocks.sort(block_comparator) +# [translation:ERROR] File "/builddir/build/BUILD/pypy-pypy-2346207d9946/pypy/translator/c/funcgen.py", line 34, in block_comparator +# [translation:ERROR] if blk0.isstartblock: +# [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' %patch5 -p1 @@ -860,6 +891,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 10 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-2 +- disable C readability patch for now (patch 4) + * Thu Feb 9 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-1 - 1.8; regenerate config patch (patch 0); drop selinux patch (patch 2); regenerate patch 5 commit 52a91fcc4b0ffbdb511ad40e389fe6566d1b8623 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Feb 10 09:19:56 2012 -0500 1.8 rebase to 1.8: * regenerate config patch (patch 0) * drop selinux patch (patch 2) * regenerate patch 5 diff --git a/.gitignore b/.gitignore index 99af398..86ec921 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /pypy-1.5-src.tar.bz2 /release-1.6.tar.bz2 /release-1.7.tar.bz2 +/release-1.8.tar.bz2 diff --git a/config.patch b/config.patch index afd7a7d..a11f397 100644 --- a/config.patch +++ b/config.patch @@ -1,31 +1,7 @@ -diff -up pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-release-1.7/pypy/translator/platform/linux.py ---- pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora 2011-11-19 02:44:54.000000000 -0500 -+++ pypy-pypy-release-1.7/pypy/translator/platform/linux.py 2011-11-21 13:07:03.454240019 -0500 -@@ -1,15 +1,21 @@ - """Support for Linux.""" - -+import os - import sys - from pypy.translator.platform.posix import BasePosix - -+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', -+ '-Wall', '-Wno-unused'] -+if os.environ.get('CFLAGS', None): -+ CFLAGS.extend(os.environ['CFLAGS'].split()) -+CFLAGS = tuple(CFLAGS) -+ - class BaseLinux(BasePosix): - name = "linux" - - link_flags = ('-pthread',) - extra_libs = ('-lrt',) -- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', -- '-Wall', '-Wno-unused') -+ cflags = CFLAGS - standalone_only = () - shared_only = ('-fPIC',) - so_ext = 'so' -@@ -26,13 +32,14 @@ class BaseLinux(BasePosix): +diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-2346207d9946/pypy/translator/platform/linux.py +--- pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora 2012-02-09 13:27:19.000000000 -0500 ++++ pypy-pypy-2346207d9946/pypy/translator/platform/linux.py 2012-02-10 09:06:20.393066016 -0500 +@@ -31,13 +31,14 @@ class BaseLinux(BasePosix): return self._pkg_config("libffi", "--libs-only-L", ['/usr/lib/libffi']) diff --git a/fix-test_commands-expected-ls-output-issue7108.patch b/fix-test_commands-expected-ls-output-issue7108.patch deleted file mode 100644 index becc3e0..0000000 --- a/fix-test_commands-expected-ls-output-issue7108.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- test/test_commands.py.orig 2010-12-22 13:25:11.357333216 -0500 -+++ test/test_commands.py 2010-12-22 13:25:57.927166219 -0500 -@@ -47,7 +47,7 @@ class CommandTests(unittest.TestCase): - # Note that the first case above has a space in the group name - # while the second one has a space in both names. - pat = r'''d......... # It is a directory. -- \+? # It may have ACLs. -+ [.+@]? # It may have alt access (SELinux, ACLs or metadata ('@' OS X). - \s+\d+ # It has some number of links. - [^/]* # Skip user, group, size, and date. - /\. # and end with the name of the file. diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch index eb6f324..9071be5 100644 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -1,6 +1,5 @@ -diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py ---- pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path 2011-08-20 11:46:31.410646024 -0400 -+++ pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py 2011-08-20 11:46:39.421645476 -0400 +--- pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py.orig 2012-02-09 13:27:19.000000000 -0500 ++++ pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py 2012-02-10 09:14:08.312216221 -0500 @@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): for i in range(1024): # Windows raises IOError. Others raise OSError. @@ -9,4 +8,4 @@ diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readab + subprocess.Popen(['/usr/bin/nonexisting_i_hope'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if c.exception.errno != errno.ENOENT: # ignore "no such file" + # ignore errors that indicate the command was not found diff --git a/pypy.spec b/pypy.spec index b5982bd..9838bae 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.7 -Release: 4%{?dist} +Version: 1.8 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -145,10 +145,6 @@ Patch0: config.patch # merely render dots: Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch -# test_commmands fails on SELinux systems due to a change in the output -# of "ls" (
http://bugs.python.org/issue7108
) -Patch2: fix-test_commands-expected-ls-output-issue7108.patch - # Try to improve the readability of the generated .c code, by adding in the # RPython source as comments where possible. # A version of this was sent upstream as: @@ -324,14 +320,10 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-release-%{version} +%setup -q -n pypy-pypy-2346207d9946 %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build -pushd lib-python/%{pylibver} -%patch2 -p0 -popd - %patch4 -p1 -b .more-readable-c-code %patch5 -p1 @@ -868,6 +860,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 9 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.8-1 +- 1.8; regenerate config patch (patch 0); drop selinux patch (patch 2); +regenerate patch 5 + * Tue Jan 31 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.7-4 - fix an incompatibility with virtualenv (rhbz#742641) diff --git a/sources b/sources index 197491c..30a988e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fc22184c931ead98bdae9ec3e79595c2 release-1.7.tar.bz2 +661be06978fdc907d84f0ee1f1228c8b release-1.8.tar.bz2 commit a8e52ca5f82917a1b2fb3a3684272c2c1e39f146 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Jan 31 04:53:38 2012 -0500 fix an incompatibility with virtualenv (rhbz#742641) Previously, we manually fixed up the library search path to be below %{pypyprefix}, by patching pypy/translator/goal/app_main.py (adding LIBRARY_INSTALLATION_PATH in patch 3, then using sed to change it to the correct value in %prep after applying the patch). This led to issues when using pypy with virtualenv, so now (as suggested in
https://codespeak.net/issue/pypy-dev/issue614
) we simply install the pypy binary into %{pypyprefix}, and make /usr/bin/pypy be a symlink to it. This allows pypy to find its libraries both when run outside a virtualenv, and within it. Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=742641
diff --git a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch deleted file mode 100644 index 93bcb69..0000000 --- a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -r cd083843b67a pypy/translator/goal/app_main.py ---- a/pypy/translator/goal/app_main.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/goal/app_main.py Wed Dec 22 17:43:21 2010 -0500 -@@ -191,6 +191,12 @@ - IS_WINDOWS = False - - def get_library_path(executable): -+ # FIXME: get this from translator configuration -+ dirname = LIBRARY_INSTALLATION_PATH -+ newpath = sys.pypy_initial_path(dirname) -+ if newpath: -+ return newpath -+ - search = executable - while 1: - dirname = resolvedirof(search) diff --git a/pypy.spec b/pypy.spec index 4bf93a4..b5982bd 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -149,18 +149,6 @@ Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch # of "ls" (
http://bugs.python.org/issue7108
) Patch2: fix-test_commands-expected-ls-output-issue7108.patch -# When locating the pypy standard libraries, look first within -# LIBRARY_INSTALLATION_PATH. -# We convert this from being a non-existant variable into a string literal -# with the value of "pypyprefix" in the "prep" phase below. -# -# We still use the scanning relative to the binary location when invoking a -# pypy binary during the build (e.g. during "check") -# -# Sent upstream (with caveats) as: -#
https://codespeak.net/issue/pypy-dev/issue614
-Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch - # Try to improve the readability of the generated .c code, by adding in the # RPython source as comments where possible. # A version of this was sent upstream as: @@ -344,14 +332,6 @@ pushd lib-python/%{pylibver} %patch2 -p0 popd -# Look for the pypy libraries within LIBRARY_INSTALLATION_PATH first: -%patch3 -p1 -# Fixup LIBRARY_INSTALLATION_PATH to be a string literal containing our value -# for "pypyprefix": -sed -i \ - -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ - pypy/translator/goal/app_main.py - %patch4 -p1 -b .more-readable-c-code %patch5 -p1 @@ -535,7 +515,19 @@ rm -rf $RPM_BUILD_ROOT InstallPyPy() { ExeName=$1 - install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{_bindir} + # To ensure compatibility with virtualenv, pypy finds its libraries + # relative to itself; this happens within + # pypy/translator/goal/app_main.py:get_library_path + # which calls sys.pypy_initial_path(dirname) on the dir containing + # the executable, with symlinks resolved. + # + # Hence we make /usr/bin/pypy be a symlink to the real binary, which we + # place within /usr/lib[64]/pypy-1.* as pypy + # + # This ought to enable our pypy build to work with virtualenv + # (rhbz#742641) + install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{pypyprefix}/$ExeName + ln -s %{pypyprefix}/$ExeName %{buildroot}/%{_bindir} # The generated machine code doesn't need an executable stack, but # one of the assembler files (gcmaptable.s) doesn't have the necessary @@ -546,10 +538,11 @@ InstallPyPy() { # # I tried various approaches involving fixing the build, but the simplest # approach is to postprocess the ELF file: - execstack --clear-execstack %{buildroot}/%{_bindir}/$ExeName + execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName } mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{pypyprefix} InstallPyPy pypy @@ -570,7 +563,6 @@ InstallPyPy pypy-stackless # PREFIX/lib-python/modified.2.5.2 # as given on the above page, i.e. it uses '-' not '.' -mkdir -p %{buildroot}/%{pypyprefix} cp -a lib-python %{buildroot}/%{pypyprefix} cp -a lib_pypy %{buildroot}/%{pypyprefix} @@ -859,6 +851,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/pypy +%{pypyprefix}/pypy %files devel %defattr(-,root,root,-) @@ -875,6 +868,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 31 2012 David Malcolm <dmalcolm(a)redhat.com> - 1.7-4 +- fix an incompatibility with virtualenv (rhbz#742641) + * Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7-3 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
commit e21faf468c1f7001f4680cff5f09fca068fb0397 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Fri Jan 13 19:29:18 2012 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index d99d341..4bf93a4 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -875,6 +875,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jan 14 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.7-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+ * Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 - use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, with -Wno-unused (rhbz#666966 and rhbz#707707) commit 416c353a67345f32fa7da698b18eef5ad1d1e77e Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Dec 16 17:15:41 2011 -0500 1.7-2: use --gcrootfinder=shadowstack, and use standard Fedora compilation flags * Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 - use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, with -Wno-unused (rhbz#666966 and rhbz#707707) diff --git a/pypy.spec b/pypy.spec index 1d6b6af..d99d341 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -110,6 +110,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to enable/disable verbose logging: %global verbose_logs 0 +# Forcibly use the shadow-stack option for detecting GC roots, rather than +# relying on hacking up generated assembler with regexps: +%global shadow_stack 1 + # Easy way to turn off the selftests: %global run_selftests 1 @@ -429,6 +433,22 @@ BuildPyPy() { # plus all substrings from CFLAGS in the environment. # This is used to generate a value for CFLAGS that's written into the Makefile + # How will we track garbage-collection roots in the generated code? + #
http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
+ +%if 0%{shadow_stack} + # This is the most portable option, and avoids a reliance on non-guaranteed + # behaviors within GCC's code generator: use an explicitly-maintained stack + # of root pointers: + %define gcrootfinder_options --gcrootfinder=shadowstack + + export CFLAGS=$(echo "$RPM_OPT_FLAGS") + +%else + # Go with the default, which is "asmgcc" + + %define gcrootfinder_options %{nil} + #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
# The generated Makefile compiles the .c files into assembler (.s), rather # than direct to .o It then post-processes this assembler to locate @@ -443,6 +463,13 @@ BuildPyPy() { # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') +%endif + + # The generated C code leads to many thousands of warnings of the form: + # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] + # Suppress them: + export CFLAGS=$(echo "$CFLAGS" -Wno-unused) + # If we're already built the JIT-enabled "pypy", then use it for subsequent # builds (of other configurations): if test -x './pypy' ; then @@ -466,6 +493,7 @@ BuildPyPy() { --cflags="$CFLAGS" \ --batch \ --output=$ExeName \ + %{gcrootfinder_options} \ $Options echo "--------------------------------------------------------------" @@ -847,6 +875,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Dec 16 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-2 +- use --gcrootfinder=shadowstack, and use standard Fedora compilation flags, +with -Wno-unused (rhbz#666966 and rhbz#707707) + * Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 - 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated code) commit 4ef3f10721000d632a9dcfcfca05c7cde0f91b95 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Nov 22 11:30:49 2011 -0500 1.7 * Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 - 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated code) diff --git a/.gitignore b/.gitignore index ecd135f..99af398 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /pypy-1.4.1-src.tar.bz2 /pypy-1.5-src.tar.bz2 /release-1.6.tar.bz2 +/release-1.7.tar.bz2 diff --git a/config.patch b/config.patch new file mode 100644 index 0000000..afd7a7d --- /dev/null +++ b/config.patch @@ -0,0 +1,49 @@ +diff -up pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-release-1.7/pypy/translator/platform/linux.py +--- pypy-pypy-release-1.7/pypy/translator/platform/linux.py.configure-fedora 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/platform/linux.py 2011-11-21 13:07:03.454240019 -0500 +@@ -1,15 +1,21 @@ + """Support for Linux.""" + ++import os + import sys + from pypy.translator.platform.posix import BasePosix + ++CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', ++ '-Wall', '-Wno-unused'] ++if os.environ.get('CFLAGS', None): ++ CFLAGS.extend(os.environ['CFLAGS'].split()) ++CFLAGS = tuple(CFLAGS) ++ + class BaseLinux(BasePosix): + name = "linux" + + link_flags = ('-pthread',) + extra_libs = ('-lrt',) +- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', +- '-Wall', '-Wno-unused') ++ cflags = CFLAGS + standalone_only = () + shared_only = ('-fPIC',) + so_ext = 'so' +@@ -26,13 +32,14 @@ class BaseLinux(BasePosix): + return self._pkg_config("libffi", "--libs-only-L", + ['/usr/lib/libffi']) + +- def library_dirs_for_libffi_a(self): +- # places where we need to look for libffi.a +- # XXX obscuuure! only look for libffi.a if run with translate.py +- if 'translate' in sys.modules: +- return self.library_dirs_for_libffi() + ['/usr/lib'] +- else: +- return [] ++ # Fedora, at least, has the shared version but not the static: ++ #def library_dirs_for_libffi_a(self): ++ # # places where we need to look for libffi.a ++ # # XXX obscuuure! only look for libffi.a if run with translate.py ++ # if 'translate' in sys.modules: ++ # return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # else: ++ # return [] + + + class Linux(BaseLinux): diff --git a/pypy-1.5-more-readable-c-code.patch b/more-readable-c-code.patch similarity index 83% rename from pypy-1.5-more-readable-c-code.patch rename to more-readable-c-code.patch index b7103e2..92d340f 100644 --- a/pypy-1.5-more-readable-c-code.patch +++ b/more-readable-c-code.patch @@ -1,15 +1,15 @@ -diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-src/pypy/interpreter/pycode.py ---- pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/interpreter/pycode.py 2011-05-02 14:28:33.942161002 -0400 +diff -up pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code pypy-pypy-release-1.7/pypy/interpreter/pycode.py +--- pypy-pypy-release-1.7/pypy/interpreter/pycode.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/interpreter/pycode.py 2011-11-21 16:16:15.673463780 -0500 @@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non - from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, + from pypy.interpreter.astcompiler.consts import ( CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, CO_GENERATOR, CO_CONTAINSGLOBALS) +from pypy.interpreter.pytraceback import offset2lineno from pypy.rlib.rarithmetic import intmask from pypy.rlib.debug import make_sure_not_resized from pypy.rlib import jit -@@ -80,6 +81,7 @@ class PyCode(eval.Code): +@@ -81,6 +82,7 @@ class PyCode(eval.Code): self.hidden_applevel = hidden_applevel self.magic = magic self._signature = cpython_code_signature(self) @@ -17,7 +17,7 @@ diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-s self._initialize() def _initialize(self): -@@ -396,3 +398,23 @@ class PyCode(eval.Code): +@@ -397,3 +399,23 @@ class PyCode(eval.Code): def repr(self, space): return space.wrap(self.get_repr()) @@ -41,9 +41,9 @@ diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-s + # raise an IOError) + self._ensure_source() + return self._cached_source[linenum - 1] -diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/model.py ---- pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/model.py 2011-05-02 14:28:33.942161002 -0400 +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/model.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/model.py 2011-11-21 16:15:36.599466455 -0500 @@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden __metaclass__ = type @@ -268,10 +268,10 @@ diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5- result.append(copyop) return result newblock.operations = copyoplist(block.operations) -diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/objspace.py ---- pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/objspace.py 2011-05-02 14:28:33.943161001 -0400 -@@ -313,7 +313,9 @@ class FlowObjSpace(ObjSpace): +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/objspace.py 2011-11-21 16:15:36.600466455 -0500 +@@ -315,7 +315,9 @@ class FlowObjSpace(ObjSpace): def do_operation(self, name, *args_w): spaceop = SpaceOperation(name, args_w, Variable()) if hasattr(self, 'executioncontext'): # not here during bootstrapping @@ -282,9 +282,9 @@ diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1 self.executioncontext.recorder.append(spaceop) return spaceop.result -diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/test/test_model.py ---- pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/objspace/flow/test/test_model.py 2011-05-02 14:28:33.943161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py +--- pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/objspace/flow/test/test_model.py 2011-11-21 16:15:36.600466455 -0500 @@ -119,3 +119,25 @@ def test_variable(): assert v2.renamed assert v2.name.startswith("foobar_") and v2.name != v.name @@ -311,9 +311,9 @@ diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code + assert cmp(oplocA, oplocB) < 0 + assert cmp(oplocB, oplocA) > 0 + -diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/pypy/rpython/rtyper.py ---- pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/rpython/rtyper.py 2011-05-02 14:28:33.943161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/rpython/rtyper.py +--- pypy-pypy-release-1.7/pypy/rpython/rtyper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/rpython/rtyper.py 2011-11-21 16:15:36.601466455 -0500 @@ -800,7 +800,7 @@ class HighLevelOp(object): return vars @@ -341,9 +341,9 @@ diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/p if resulttype is None: vresult.concretetype = Void return None -diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-1.5-src/pypy/translator/backendopt/inline.py ---- pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/backendopt/inline.py 2011-05-02 14:32:26.975161005 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py +--- pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/backendopt/inline.py 2011-11-21 16:15:36.601466455 -0500 @@ -4,6 +4,7 @@ from pypy.translator.simplify import get from pypy.translator.unsimplify import copyvar from pypy.objspace.flow.model import Variable, Constant, Block, Link @@ -371,9 +371,9 @@ diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code return result def copy_block(self, block): -diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/funcgen.py ---- pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/c/funcgen.py 2011-05-02 14:28:33.944161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/funcgen.py +--- pypy-pypy-release-1.7/pypy/translator/c/funcgen.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/c/funcgen.py 2011-11-21 16:15:36.602466455 -0500 @@ -1,4 +1,6 @@ import sys +import inspect @@ -420,7 +420,7 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 class FunctionCodeGenerator(object): """ Collects information about a function which we have to generate -@@ -210,14 +244,57 @@ class FunctionCodeGenerator(object): +@@ -207,14 +241,57 @@ class FunctionCodeGenerator(object): def cfunction_body(self): graph = self.graph @@ -481,7 +481,7 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 for line in self.gen_op(op): yield line if len(block.exits) == 0: -@@ -309,7 +386,7 @@ class FunctionCodeGenerator(object): +@@ -306,7 +383,7 @@ class FunctionCodeGenerator(object): assignments.append((a2typename, dest, src)) for line in gen_assignments(assignments): yield line @@ -490,16 +490,16 @@ diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5 if link.target in self.innerloops: loop = self.innerloops[link.target] if link is loop.links[-1]: # link that ends a loop -diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/test/test_genc.py ---- pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/c/test/test_genc.py 2011-05-02 14:28:33.945161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py +--- pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/c/test/test_genc.py 2011-11-21 16:15:36.602466455 -0500 @@ -1,4 +1,5 @@ import autopath, sys, os, py +import re from pypy.rpython.lltypesystem.lltype import * from pypy.annotation import model as annmodel from pypy.translator.translator import TranslationContext -@@ -515,3 +516,130 @@ def test_inhibit_tail_call(): +@@ -532,3 +533,130 @@ def test_inhibit_tail_call(): else: assert 0, "the call was not found in the C source" assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] @@ -630,10 +630,10 @@ diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code p + assert 'Here is a ' in c_fn_src + assert 'style comment within an RPython docstring' in c_fn_src + -diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-src/pypy/translator/driver.py ---- pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/driver.py 2011-05-02 14:28:33.945161001 -0400 -@@ -536,6 +536,7 @@ class TranslationDriver(SimpleTaskEngine +diff -up pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/driver.py +--- pypy-pypy-release-1.7/pypy/translator/driver.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/driver.py 2011-11-21 16:15:36.603466455 -0500 +@@ -535,6 +535,7 @@ class TranslationDriver(SimpleTaskEngine dstname = self.compute_exe_name() + '.staticdata.info' shutil.copy(str(fname), str(dstname)) self.log.info('Static data info written to %s' % dstname) @@ -641,9 +641,9 @@ diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-sr # task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-src/pypy/translator/gensupp.py ---- pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/gensupp.py 2011-05-02 14:33:31.026161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/gensupp.py +--- pypy-pypy-release-1.7/pypy/translator/gensupp.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/gensupp.py 2011-11-21 16:15:36.603466455 -0500 @@ -14,8 +14,8 @@ def ordered_blocks(graph): allblocks = [] for block in graph.iterblocks(): @@ -655,9 +655,9 @@ diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-s else: ofs = sys.maxint # then we order by input variable name or value -diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1.5-src/pypy/translator/interactive.py ---- pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/interactive.py 2011-05-02 14:28:33.946161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/interactive.py +--- pypy-pypy-release-1.7/pypy/translator/interactive.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/interactive.py 2011-11-21 16:15:36.604466454 -0500 @@ -138,7 +138,7 @@ class Translation(object): def source_c(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) @@ -667,9 +667,9 @@ diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1 def source_cl(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) -diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-1.5-src/pypy/translator/llsupport/wrapper.py ---- pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/llsupport/wrapper.py 2011-05-02 14:28:33.946161001 -0400 +diff -up pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py +--- pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/llsupport/wrapper.py 2011-11-21 16:15:36.604466454 -0500 @@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam # "return result" block = Block(wrapper_inputargs) @@ -679,10 +679,10 @@ diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code translator.update_call_graph(wgraph, graph, object()) translator.graphs.append(wgraph) block.operations[:] = newops -diff -up pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code pypy-1.5-src/pypy/translator/simplify.py ---- pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/simplify.py 2011-05-02 14:28:33.952161001 -0400 -@@ -298,7 +298,7 @@ def join_blocks(graph): +diff -up pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code pypy-pypy-release-1.7/pypy/translator/simplify.py +--- pypy-pypy-release-1.7/pypy/translator/simplify.py.more-readable-c-code 2011-11-19 02:44:54.000000000 -0500 ++++ pypy-pypy-release-1.7/pypy/translator/simplify.py 2011-11-21 16:15:36.605466454 -0500 +@@ -292,7 +292,7 @@ def join_blocks(graph): return renaming.get(v, v) def rename_op(op): args = [rename(a) for a in op.args] diff --git a/pypy-1.5-config.patch b/pypy-1.5-config.patch deleted file mode 100644 index 82d8fc9..0000000 --- a/pypy-1.5-config.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora pypy-1.5-src/pypy/translator/platform/linux.py ---- pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora 2011-04-30 10:18:50.000000000 -0400 -+++ pypy-1.5-src/pypy/translator/platform/linux.py 2011-04-30 18:59:24.041160978 -0400 -@@ -1,13 +1,18 @@ - """Support for Linux.""" -- -+import os - from pypy.translator.platform.posix import BasePosix - -+CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', -+ '-Wall', '-Wno-unused'] -+if os.environ.get('CFLAGS', None): -+ CFLAGS.extend(os.environ['CFLAGS'].split()) -+CFLAGS = tuple(CFLAGS) -+ - class BaseLinux(BasePosix): - name = "linux" - - link_flags = ('-pthread', '-lrt') -- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', -- '-Wall', '-Wno-unused') -+ cflags = CFLAGS - standalone_only = () - shared_only = ('-fPIC',) - so_ext = 'so' -@@ -29,9 +34,10 @@ class Linux(BaseLinux): - shared_only = () # it seems that on 32-bit linux, compiling with -fPIC - # gives assembler that asmgcc is not happy about. - -- def library_dirs_for_libffi_a(self): -- # places where we need to look for libffi.a -- return self.library_dirs_for_libffi() + ['/usr/lib'] -+ # Fedora Linux, at least, has the shared version but not the static -+ #def library_dirs_for_libffi_a(self): -+ # # places where we need to look for libffi.a -+ # return self.library_dirs_for_libffi() + ['/usr/lib'] - - - class Linux64(BaseLinux): diff --git a/pypy.spec b/pypy.spec index 2579860..1d6b6af 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.6 -Release: 7%{?dist} +Version: 1.7 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -126,14 +126,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch Source2: macros.pypy # Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: pypy-1.5-config.patch +Patch0: config.patch # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -163,7 +163,7 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch #
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
# TODO: get this into the upstream bug tracker, and finish inlining # support (rhbz#666963) -Patch4: pypy-1.5-more-readable-c-code.patch +Patch4: more-readable-c-code.patch # In my koji builds, /root/bin is in the PATH for some reason # This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" @@ -847,6 +847,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 21 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.7-1 +- 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated +code) + * Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 - skip test_multiprocessing diff --git a/sources b/sources index 5660f1e..197491c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1189352effc5df7df84e6916b3b3eae3 release-1.6.tar.bz2 +fc22184c931ead98bdae9ec3e79595c2 release-1.7.tar.bz2 commit 953cba8f403df754b658c3310b0505c1ba5dc5a5 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Oct 4 14:37:40 2011 -0400 1.6-7: skip test_multiprocessing * Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 - skip test_multiprocessing diff --git a/pypy.spec b/pypy.spec index 90b3f88..2579860 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -728,6 +728,12 @@ CheckPyPy() { # "strop" module doesn't exist for pypy yet: SkipTest test_strop + # I'm seeing Koji builds hanging e.g.: + #
http://koji.fedoraproject.org/koji/getfile?taskID=3386821&name=build.log
+ # The only test that seems to have timed out in that log is + # test_multiprocessing, so skip it for now: + SkipTest test_multiprocessing + echo "== Test names ==" cat testnames.txt echo "=================" @@ -841,13 +847,15 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Oct 4 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-7 +- skip test_multiprocessing + * Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 - don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; missing _emacs_bytecompile macro on el5) * Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 - build using python26 on el5 (2.4 is too early) - * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 - fix SkipTest function to avoid corrupting the name of "test_gdbm" commit 2d36a5e81680be23c3e25e9f4bff4737a550687f Author: David Malcolm <dmalcolm(a)redhat.com> Date: Tue Sep 13 05:00:09 2011 -0400 don't ship the emacs JIT-viewer on el5 and el6 * Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 - don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; missing _emacs_bytecompile macro on el5) diff --git a/pypy.spec b/pypy.spec index 9fc1462..90b3f88 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -100,6 +100,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Should we build a "pypy-stackless" binary? %global with_stackless 0 +# Should we build the emacs JIT-viewing mode? +%if 0%{?rhel} == 5 || 0%{?rhel} == 6 +%global with_emacs 0 +%else +%global with_emacs 1 +%endif # Easy way to enable/disable verbose logging: %global verbose_logs 0 @@ -257,7 +263,9 @@ BuildRequires: perl BuildRequires: /usr/bin/execstack # For byte-compiling the JIT-viewing mode: +%if %{with_emacs} BuildRequires: emacs +%endif # pypy is bundling these so we delete them in %%prep. I don't think they are # needed unless we build pypy targetted at running on the jvm. @@ -287,7 +295,9 @@ Summary: Run-time libraries used by PyPy implementations of Python # We supply an emacs mode for the JIT viewer. # (This doesn't bring in all of emacs, just the directory structure) +%if %{with_emacs} Requires: emacs-filesystem >= %{_emacs_version} +%endif %description libs Libraries required by the various PyPy implementations of Python. @@ -484,7 +494,9 @@ BuildPyPy \ "--stackless" %endif +%if %{with_emacs} %{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el +%endif %install rm -rf $RPM_BUILD_ROOT @@ -662,8 +674,10 @@ find \ # are acceptable. # Install the JIT trace mode for Emacs: +%if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +%endif # Install macros for rpm: mkdir -p %{buildroot}/%{_sysconfdir}/rpm @@ -802,8 +816,10 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ +%if %{with_emacs} %{_emacs_sitelispdir}/pypytrace-mode.el %{_emacs_sitelispdir}/pypytrace-mode.elc +%endif %files %defattr(-,root,root,-) @@ -825,6 +841,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-6 +- don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem; +missing _emacs_bytecompile macro on el5) + * Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 - build using python26 on el5 (2.4 is too early) commit 009aeb1c2d9928be62c11bf154af0644f08816eb Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon Sep 12 21:01:16 2011 -0400 build using python26 on el5 (2.4 is too early) diff --git a/pypy.spec b/pypy.spec index b303232..9fc1462 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -213,10 +213,18 @@ Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch BuildRequires: pypy %global bootstrap_python_interp pypy %else + +# Python 2.6 or later is needed, so on RHEL5 (2.4) we need to use the alternate +# python26 rpm: +%if 0%{?rhel} == 5 +BuildRequires: python26-devel +%global bootstrap_python_interp python26 +%else BuildRequires: python-devel %global bootstrap_python_interp python %endif +%endif # FIXME: I'm seeing errors like this in the logs: @@ -817,6 +825,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Sep 12 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-5 +- build using python26 on el5 (2.4 is too early) + * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 - fix SkipTest function to avoid corrupting the name of "test_gdbm" commit 106cb91275756dab4a44a6e75cd090ea57c6d5a7 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Aug 25 14:50:53 2011 -0400 fix SkipTest function to avoid corrupting the name of "test_gdbm" diff --git a/pypy.spec b/pypy.spec index 2c3e47c..b303232 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -666,7 +666,7 @@ topdir=$(pwd) SkipTest() { TEST_NAME=$1 - sed -i -e"s|$TEST_NAME||" testnames.txt + sed -i -e"s|^$TEST_NAME$||g" testnames.txt } CheckPyPy() { @@ -817,6 +817,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-4 +- fix SkipTest function to avoid corrupting the name of "test_gdbm" + * Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-3 - add rpm macros file to the devel subpackage (source 2) - skip some tests that can't pass yet commit afabd9d6bee5ad70b522d5d9c5745256ff46b827 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Aug 25 11:58:55 2011 -0400 1.6-3: add rpm macros file to the devel subpackage; skip some tests diff --git a/macros.pypy b/macros.pypy new file mode 100644 index 0000000..5f40b6f --- /dev/null +++ b/macros.pypy @@ -0,0 +1,5 @@ +%__pypy /usr/bin/pypy +%pypy_sitelib %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%pypy_sitearch %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") +%pypy_version %(%{__pypy} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypydir %{_builddir}/pypy-%{name}-%{version}-%{release} diff --git a/pypy.spec b/pypy.spec index 3280ff9..2c3e47c 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -122,6 +122,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Source and patches: Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
+# Supply various useful RPM macros for building python modules against pypy: +# __pypy, pypy_sitelib, pypy_sitearch +Source2: macros.pypy + # Edit a translator file for linux in order to configure our cflags and dynamic libffi Patch0: pypy-1.5-config.patch @@ -653,13 +657,16 @@ find \ mkdir -p %{buildroot}/%{_emacs_sitelispdir} cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +# Install macros for rpm: +mkdir -p %{buildroot}/%{_sysconfdir}/rpm +install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm + %check topdir=$(pwd) SkipTest() { - # Append the given test name to TESTS_TO_SKIP TEST_NAME=$1 - TESTS_TO_SKIP="$TESTS_TO_SKIP $TEST_NAME" + sed -i -e"s|$TEST_NAME||" testnames.txt } CheckPyPy() { @@ -686,6 +693,19 @@ CheckPyPy() { "from test.regrtest import findtests; print '\n'.join(findtests())" ) > testnames.txt + # Skip some tests: + # "audioop" doesn't exist for pypy yet: + SkipTest test_audioop + + # The gdb CPython hooks haven't been ported to cpyext: + SkipTest test_gdb + + # hotshot relies heavily on _hotshot, which doesn't exist: + SkipTest test_hotshot + + # "strop" module doesn't exist for pypy yet: + SkipTest test_strop + echo "== Test names ==" cat testnames.txt echo "=================" @@ -786,6 +806,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h +%config(noreplace) %{_sysconfdir}/rpm/macros.pypy %if 0%{with_stackless} %files stackless @@ -796,6 +817,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 25 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-3 +- add rpm macros file to the devel subpackage (source 2) +- skip some tests that can't pass yet + * Sat Aug 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-2 - work around test_subprocess failure seen in koji (patch 5) commit 1df5c3e618c5f2bcbdbe44f329039dfffc1cd79e Author: David Malcolm <dmalcolm(a)redhat.com> Date: Sat Aug 20 11:59:48 2011 -0400 work around test_subprocess failure seen in koji (patch 5) diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch new file mode 100644 index 0000000..eb6f324 --- /dev/null +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -0,0 +1,12 @@ +diff -up pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py.non-readable-path 2011-08-20 11:46:31.410646024 -0400 ++++ pypy-pypy-release-1.6/lib-python/2.7/test/test_subprocess.py 2011-08-20 11:46:39.421645476 -0400 +@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): + for i in range(1024): + # Windows raises IOError. Others raise OSError. + with self.assertRaises(EnvironmentError) as c: +- subprocess.Popen(['nonexisting_i_hope'], ++ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if c.exception.errno != errno.ENOENT: # ignore "no such file" diff --git a/pypy.spec b/pypy.spec index c3faabb..3280ff9 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -155,6 +155,16 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch # support (rhbz#666963) Patch4: pypy-1.5-more-readable-c-code.patch +# In my koji builds, /root/bin is in the PATH for some reason +# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" +# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising +# OSError: [Errno 13] Permission denied +# when it tries to read /root/bin, rather than raising "No such file" +# +# Work around this by specifying an absolute path for the non-existant +# executable +# Not yet sent upstream +Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch # Build-time requirements: @@ -318,6 +328,7 @@ sed -i \ %patch4 -p1 -b .more-readable-c-code +%patch5 -p1 # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -785,6 +796,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Aug 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-2 +- work around test_subprocess failure seen in koji (patch 5) + * Thu Aug 18 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-1 - 1.6 - rewrite the %%check section, introducing per-test timeouts commit 3a2c2ec86de943a3dbdc8de5608e6a8f79c48a85 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Aug 19 19:04:38 2011 -0400 pypy-1.6-1 - 1.6 - rewrite the %check section, introducing per-test timeouts diff --git a/.gitignore b/.gitignore index 017cf34..ecd135f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pypy-1.4.1-src.tar.bz2 /pypy-1.5-src.tar.bz2 +/release-1.6.tar.bz2 diff --git a/pypy.spec b/pypy.spec index 0c2c717..c3faabb 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.5 -Release: 2%{?dist} +Version: 1.6 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -104,6 +104,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Easy way to enable/disable verbose logging: %global verbose_logs 0 +# Easy way to turn off the selftests: +%global run_selftests 1 + %global pypyprefix %{_libdir}/pypy-%{version} %global pylibver 2.7 @@ -117,7 +120,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
+Source0:
https://bitbucket.org/pypy/pypy/get/release-1.6.tar.bz2
# Edit a translator file for linux in order to configure our cflags and dynamic libffi Patch0: pypy-1.5-config.patch @@ -218,9 +221,17 @@ BuildRequires: openssl-devel BuildRequires: valgrind-devel %endif +%if %{run_selftests} # Used by the selftests, though not by the build: BuildRequires: gc-devel +# For use in the selftests, for recording stats: +BuildRequires: time + +# For use in the selftests, for imposing a per-test timeout: +BuildRequires: perl +%endif + BuildRequires: /usr/bin/execstack # For byte-compiling the JIT-viewing mode: @@ -289,7 +300,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-%{version}-src +%setup -q -n pypy-pypy-release-%{version} %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -656,445 +667,47 @@ CheckPyPy() { pushd %{goal_dir} - # Gather a list of tests to skip, due to known failures - # TODO: report these failures to pypy upstream - # See also rhbz#666967 and rhbz#666969 - TESTS_TO_SKIP="" - - # Test failures relating to missing codecs - # Hopefully when pypy merges to 2.7 support we'll gain these via a - # refreshed stdlib: - # test_codecencodings_cn: - # all tests fail, with one of - # unknown encoding: gb18030 - # unknown encoding: gb2312 - # unknown encoding: gbk - SkipTest test_codecencodings_cn - - # test_codecencodings_hk: - # all tests fail, with: - # unknown encoding: big5hkscs - SkipTest test_codecencodings_hk - - # test_codecencodings_jp: - # all tests fail, with one of: - # unknown encoding: cp932 - # unknown encoding: euc_jisx0213 - # unknown encoding: euc_jp - # unknown encoding: shift_jis - # unknown encoding: shift_jisx0213 - SkipTest test_codecencodings_jp - - # test_codecencodings_kr: - # all tests fail, with one of: - # unknown encoding: cp949 - # unknown encoding: euc_kr - # unknown encoding: johab - SkipTest test_codecencodings_kr - - # test_codecencodings_tw: - # all tests fail, with: - # unknown encoding: big5 - SkipTest test_codecencodings_tw - - # test_multibytecodec: - # 14 failures out of 15, due to: - # unknown encoding: euc-kr - # unknown encoding: gb2312 - # unknown encoding: jisx0213 - # unknown encoding: cp949 - # unknown encoding: iso2022-jp - # unknown encoding: gb18030 - SkipTest test_multibytecodec - - # - # Other failures: - # - # test_asynchat: - # seems to hang on this test, within test_line_terminator - SkipTest test_asynchat - - # test_audioop: - # test test_audioop crashed -- <type 'exceptions.ImportError'>: No module named audioop - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/regrtest.py", line 874, in runtest_inner - # the_package = __import__(abstest, globals(), locals(), []) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_audioop.py", line 1, in <module> - # import audioop - # ImportError: No module named audioop - SkipTest test_audioop - - # test_capi: - # RPython traceback: - # RPython traceback: - # File "implement.c", line 243013, in _PyObject_New - # File "implement_1.c", line 31707, in _PyObject_NewVar - # File "implement.c", line 217060, in from_ref - # Fatal RPython error: AssertionError - SkipTest test_capi - - # test_compiler: - # 4 errors out of 13: - # testSourceCodeEncodingsError - # testWith - # testWithAss - # testYieldExpr - SkipTest test_compiler - - # test_ctypes: - # failures=17, errors=20, out of 132 tests - SkipTest test_ctypes - - # test_distutils: - # Warning -- os.environ was modified by test_distutils - # test test_distutils failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_distutils - - # test_frozen: - # TestFailed: import __hello__ failed:No module named __hello__ - SkipTest test_frozen - - # test_gc: - # test test_gc crashed -- <type 'exceptions.AttributeError'>: 'module' object has no attribute 'get_debug' - SkipTest test_gc - - # test_gdb: - # test test_gdb crashed -- <type 'exceptions.KeyError'>: 'PY_CFLAGS' - SkipTest test_gdb - - # test_generators: - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # exiting - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # exiting - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # del g; gc_collect() - # Expected: - # finally - # Got nothing - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine - # Failed example: - # sys.stderr.getvalue().startswith( - # "Exception RuntimeError: 'generator ignored GeneratorExit' in " - # ) - # Expected: - # True - # Got: - # False - # ********************************************************************** - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.refleaks - # Failed example: - # try: - # sys.stderr = StringIO.StringIO() - # class Leaker: - # def __del__(self): - # raise RuntimeError - # l = Leaker() - # del l - # gc_collect() - # err = sys.stderr.getvalue().strip() - # err.startswith( - # "Exception RuntimeError: RuntimeError() in " - # ) - # err.endswith("> ignored") - # len(err.splitlines()) - # finally: - # sys.stderr = old - # Expected: - # True - # True - # 1 - # Got: - # False - # False - # 0 - # ********************************************************************** - # 2 items had failures: - # 4 of 107 in test.test_generators.__test__.coroutine - # 1 of 11 in test.test_generators.__test__.refleaks - # ***Test Failed*** 5 failures. - # test test_generators failed -- 5 of 294 doctests failed - SkipTest test_generators - - # test_getargs2: - # test test_getargs2 failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_getargs2 - - # test_hotshot: - # test test_hotshot crashed -- <type 'exceptions.ImportError'>: No module named _hotshot - SkipTest test_hotshot - - # test_io: - # test test_io failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_io - - # test_ioctl: - # Failing in Koji with dist-f15 with: - # ====================================================================== - # FAIL: test_ioctl (test.test_ioctl.IoctlTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 25, in test_ioctl - # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) - # AssertionError: 0 not in (8304, 17737) - # ====================================================================== - # FAIL: test_ioctl_mutate (test.test_ioctl.IoctlTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 35, in test_ioctl_mutate - # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) - # AssertionError: 0 not in (8304, 17737) - # ---------------------------------------------------------------------- - SkipTest test_ioctl - - # test_iterlen: - # 24 failures out of 25, apparently all due to TypeError - SkipTest test_iterlen - - # test_multiprocessing: - # test test_multiprocessing failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_multiprocessing - - # test_module: - # test test_module failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_module.py", line 81, in test_clear_dict_in_ref_cycle - # self.assertEqual(destroyed, [1]) - # AssertionError: Lists differ: [] != [1] - # Second list contains 1 additional elements. - # First extra element 0: - # 1 - # - [] - # + [1] - # ? + - SkipTest test_module - - # test_parser: - # 12 failures out of 15 - SkipTest test_parser - - # test_platform: - # Koji builds show: - # test test_platform failed -- errors occurred in test.test_platform.PlatformTest - SkipTest test_platform - - # test_posix: - # test test_posix failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 361, in test_getcwd_long_pathnames - # _create_and_do_getcwd(dirname) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # [...repeats...] - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd - # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 356, in _create_and_do_getcwd - # self.assertEqual(e.errno, expected_errno) - # AssertionError: 36 != 34 - SkipTest test_posix - - # test_readline: - # test test_readline failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_readline.py", line 16, in testHistoryUpdates - # readline.clear_history() - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 277, in clear_history - # del self.get_reader().history[:] - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 186, in get_reader - # console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING) - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 103, in __init__ - # self._clear = _my_getstr("clear") - # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 45, in _my_getstr - # "terminal doesn't have the required '%s' capability"%cap - # InvalidTerminal: terminal doesn't have the required 'clear' capability - SkipTest test_readline - - # test_scope: - # test test_scope failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_scope.py", line 437, in testLeaks - # self.assertEqual(Foo.count, 0) - # AssertionError: 100 != 0 - SkipTest test_scope - - # test_socket: - # testSockName can fail in Koji with: - # my_ip_addr = socket.gethostbyname(socket.gethostname()) - # gaierror: (-3, 'Temporary failure in name resolution') - SkipTest test_socket - - # test_sort: - # some failures - SkipTest test_sort - - # test_sqlite: - # 3 of the sqlite3.test.dbapi.ExtensionTests raise: - # ProgrammingError: Incomplete statement '' - SkipTest test_sqlite - - # test_strop: - # test test_strop crashed -- <type 'exceptions.ImportError'>: No module named strop - SkipTest test_strop - - # test_structmembers: - # test test_structmembers failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_structmembers - - # test_subprocess: - # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset - # 'import site' failed - # . - # this bit of output is from a test of stdout in a different process ... - # /builddir/build/BUILD/pypy-1.5-src/lib_pypy/ctypes_support.py:26: RuntimeWarning: C function without declared arguments called - # return standard_c_lib.__errno_location() - # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset - # 'import site' failed - # . - # this bit of output is from a test of stdout in a different process ... - # test test_subprocess failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_subprocess - - # test_symtable: - # test test_symtable crashed -- <type 'exceptions.ImportError'>: No module named _symtable - SkipTest test_symtable - - # test_sys_settrace: - # test test_sys_settrace failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 334, in test_13_genexp - # self.run_test(generator_example) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 280, in run_test - # self.run_and_compare(func, func.events) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 277, in run_and_compare - # tracer.events, events) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 269, in compare_events - # [str(x) for x in events]))) - # AssertionError: events did not match expectation: - # (0, 'call') - # (2, 'line') - # (-6, 'call') - # (-5, 'line') - # (-4, 'line') - # (-4, 'return') - # - (-4, 'call') - # - (-4, 'exception') - # - (-1, 'line') - # - (-1, 'return') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (6, 'line') - # (5, 'line') - # (5, 'return') - SkipTest test_sys_settrace - - # test_tempfile: - # test test_tempfile failed -- multiple errors occurred; run in verbose mode for details - SkipTest test_tempfile - - # test_thread - # Koji build appears to hang here - SkipTest test_thread - - # test_traceback: - # works when run standalone; failures seen when run as part of a suite - SkipTest test_traceback - - # test_uuid: - # ====================================================================== - # ERROR: test_ifconfig_getnode (test.test_uuid.TestUUID) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_uuid.py", line 306, in test_ifconfig_getnode - # node = uuid._ifconfig_getnode() - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/uuid.py", line 326, in _ifconfig_getnode - # ip_addr = socket.gethostbyname(socket.gethostname()) - # gaierror: [Errno -3] Temporary failure in name resolution - # ---------------------------------------------------------------------- - # Ran 14 tests in 0.369s - # FAILED (errors=1) - SkipTest test_uuid - - # test_zipimport_support: - # ====================================================================== - # ERROR: test_doctest_main_issue4197 (test.test_zipimport_support.ZipSupportTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 194, in test_doctest_main_issue4197 - # exit_code, data = run_python(script_name) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 80, in run_python - # p = spawn_python(*args, **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python - # **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ - # errread, errwrite) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child - # raise child_exception - # OSError: [Errno 13] Permission denied - # ====================================================================== - # ERROR: test_pdb_issue4201 (test.test_zipimport_support.ZipSupportTests) - # ---------------------------------------------------------------------- - # Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 221, in test_pdb_issue4201 - # p = spawn_python(script_name) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python - # **kwargs) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ - # errread, errwrite) - # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child - # raise child_exception - # OSError: [Errno 13] Permission denied - # ---------------------------------------------------------------------- - # Ran 4 tests in 0.726s - # FAILED (errors=2) - SkipTest test_zipimport_support - - # test_zlib: - # failure seen in Koji, not sure of reason why: - # test test_zlib failed -- Traceback (most recent call last): - # File "/builddir/build/BUILD/pypy-1.4.1-src/lib-python/2.5.2/test/test_zlib.py", line 72, in test_baddecompressobj - # self.assertRaises(ValueError, zlib.decompressobj, 0) - # AssertionError: ValueError not raised - SkipTest test_zlib - - %if 0%{use_self_when_building} - # Patch 3 prioritizes the installed copy of pypy's libraries over the - # build copy. - # This leads to test failures of test_pep263 and test_tarfile - # For now, suppress these when building using pypy itself: - SkipTest test_pep263 # on-disk encoding issues - SkipTest test_tarfile # permissions issues - %endif - - # Run the built binary through the selftests - # "-w" : re-run failed tests in verbose mode - time ./$ExeName -m test.regrtest -w -x $TESTS_TO_SKIP + # I'm seeing numerous cases where tests seem to hang, or fail unpredictably + # So we'll run each test in its own process, with a timeout + + # Use regrtest to explicitly list all tests: + ( ./$ExeName -c \ + "from test.regrtest import findtests; print '\n'.join(findtests())" + ) > testnames.txt + + echo "== Test names ==" + cat testnames.txt + echo "=================" + + echo "" > failed-tests.txt + + for TestName in $(cat testnames.txt) ; do + + echo "===================" $TestName "====================" + + # Use /usr/bin/time (rather than the shell "time" builtin) to gather + # info on the process (time/CPU/memory). This passes on the exit + # status of the underlying command + # + # Use perl's alarm command to impose a timeout + # 900 seconds is 15 minutes per test. + # If a test hangs, that test should get terminated, allowing the build + # to continue. + # + # Invoke pypy on test.regrtest to run the specific test suite + # verbosely + # + # For now, || true, so that any failures don't halt the build: + ( /usr/bin/time \ + perl -e 'alarm shift @ARGV; exec @ARGV' 900 \ + ./$ExeName -m test.regrtest -v $TestName ) \ + || (echo $TestName >> failed-tests.txt) \ + || true + done + + echo "== Failed tests ==" + cat failed-tests.txt + echo "=================" popd @@ -1124,12 +737,14 @@ CheckPyPy() { echo "--------------------------------------------------------------" } +%if %{run_selftests} CheckPyPy pypy %if 0%{with_stackless} CheckPyPy pypy-stackless %endif +%endif # run_selftests %clean @@ -1142,7 +757,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix} %dir %{pypyprefix}/lib-python -%{pypyprefix}/lib-python/TODO %{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib-python/modified-%{pylibver}/ @@ -1171,6 +785,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Aug 18 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.6-1 +- 1.6 +- rewrite the %%check section, introducing per-test timeouts + * Tue Aug 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-2 - add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace logs in emacs diff --git a/sources b/sources index a047407..5660f1e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb9ada2c50666318c3a2863da1fbe487 pypy-1.5-src.tar.bz2 +1189352effc5df7df84e6916b3b3eae3 release-1.6.tar.bz2 commit 1feef4d56b6572b03fd805e50ad8f6e43900cfac Author: David Malcolm <dmalcolm(a)redhat.com> Date: Wed Aug 3 13:02:57 2011 -0400 add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace logs in emacs diff --git a/pypy.spec b/pypy.spec index b4705c1..0c2c717 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -223,6 +223,9 @@ BuildRequires: gc-devel BuildRequires: /usr/bin/execstack +# For byte-compiling the JIT-viewing mode: +BuildRequires: emacs + # pypy is bundling these so we delete them in %%prep. I don't think they are # needed unless we build pypy targetted at running on the jvm. #BuildRequires: jna @@ -248,6 +251,11 @@ CPU architecture. %package libs Group: Development/Languages Summary: Run-time libraries used by PyPy implementations of Python + +# We supply an emacs mode for the JIT viewer. +# (This doesn't bring in all of emacs, just the directory structure) +Requires: emacs-filesystem >= %{_emacs_version} + %description libs Libraries required by the various PyPy implementations of Python. @@ -442,6 +450,8 @@ BuildPyPy \ "--stackless" %endif +%{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el + %install rm -rf $RPM_BUILD_ROOT @@ -617,6 +627,10 @@ find \ # but given that the objective is to preserve a copy of the source code, those # are acceptable. +# Install the JIT trace mode for Emacs: +mkdir -p %{buildroot}/%{_emacs_sitelispdir} +cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} + %check topdir=$(pwd) @@ -1135,6 +1149,8 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib-python/conftest.py* %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ +%{_emacs_sitelispdir}/pypytrace-mode.el +%{_emacs_sitelispdir}/pypytrace-mode.elc %files %defattr(-,root,root,-) @@ -1155,6 +1171,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Aug 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-2 +- add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace +logs in emacs + * Mon May 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-1 - 1.5 commit 3d2cef177d26ff303a5be984f912e2b8d4266b0d Author: Dan Horák <dan(a)danny.cz> Date: Wed May 11 10:15:52 2011 +0200 fix build on non-jit arches Build on non-jit arch like s390 fails with [translation:info] Translating target as defined by targetpypystandalone [platform:msg] Setting platform to 'host' cc=None Traceback (most recent call last): File "translate.py", line 322, in <module> main() File "translate.py", line 208, in main targetspec_dic, translateconfig, config, args = parse_options_and_load_target() File "translate.py", line 176, in parse_options_and_load_target targetspec_dic['handle_config'](config, translateconfig) File "targetpypystandalone.py", line 109, in handle_config raise Exception("You have to specify the --opt level.\n" Exception: You have to specify the --opt level. Try --opt=2 or --opt=jit, or equivalently -O2 or -Ojit . diff --git a/pypy.spec b/pypy.spec index 1a651e0..b4705c1 100644 --- a/pypy.spec +++ b/pypy.spec @@ -431,6 +431,8 @@ BuildPyPy \ pypy \ %if 0%{with_jit} "-Ojit" \ +%else + "-O2" \ %endif %{nil} commit 169de85aca1a527ea42ef102aa32a40ba1740168 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon May 2 14:46:32 2011 -0400 Rebase to 1.5 (rhbz#701121) Update patches: patch 0: pypy-1.4-config.patch -> pypy-1.5-config.patch patch 4: pypy-1.4.1-more-readable-c-code.patch -> pypy-1.5-more-readable-c-code.patch Remove references to *.inl files, no longer present Add the following tests to the skip list: test_audioop, test_capi, test_distutils, test_gc, test_gdb, test_generators, test_getargs2, test_hotshot, test_io, test_multiprocessing, test_posix, test_readline, test_scope, test_strop, test_structmembers, test_subprocess, test_symtable, test_sys_settrace, test_tempfile, test_thread, test_uuid, test_zipimport_support Add a couple of text files to the payload (TODO, stdlib-version.txt) diff --git a/.gitignore b/.gitignore index 2878978..017cf34 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pypy-1.4.1-src.tar.bz2 +/pypy-1.5-src.tar.bz2 diff --git a/pypy-1.4-config.patch b/pypy-1.5-config.patch similarity index 69% rename from pypy-1.4-config.patch rename to pypy-1.5-config.patch index 0b82ac8..82d8fc9 100644 --- a/pypy-1.4-config.patch +++ b/pypy-1.5-config.patch @@ -1,9 +1,10 @@ -Index: pypy-1.4/pypy/translator/platform/linux.py -=================================================================== ---- pypy-1.4.orig/pypy/translator/platform/linux.py -+++ pypy-1.4/pypy/translator/platform/linux.py -@@ -3,17 +3,22 @@ import py, os - from pypy.translator.platform import _run_subprocess +diff -up pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora pypy-1.5-src/pypy/translator/platform/linux.py +--- pypy-1.5-src/pypy/translator/platform/linux.py.configure-fedora 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/platform/linux.py 2011-04-30 18:59:24.041160978 -0400 +@@ -1,13 +1,18 @@ + """Support for Linux.""" +- ++import os from pypy.translator.platform.posix import BasePosix +CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', @@ -22,16 +23,10 @@ Index: pypy-1.4/pypy/translator/platform/linux.py standalone_only = () shared_only = ('-fPIC',) so_ext = 'so' - so_prefixes = ('lib', '') -- -+ - def _args_for_shared(self, args): - return ['-shared'] + args - -@@ -29,9 +34,10 @@ class BaseLinux(BasePosix): - class Linux(BaseLinux): +@@ -29,9 +34,10 @@ class Linux(BaseLinux): shared_only = () # it seems that on 32-bit linux, compiling with -fPIC # gives assembler that asmgcc is not happy about. + - def library_dirs_for_libffi_a(self): - # places where we need to look for libffi.a - return self.library_dirs_for_libffi() + ['/usr/lib'] diff --git a/pypy-1.4.1-more-readable-c-code.patch b/pypy-1.5-more-readable-c-code.patch similarity index 81% rename from pypy-1.4.1-more-readable-c-code.patch rename to pypy-1.5-more-readable-c-code.patch index 45fa534..b7103e2 100644 --- a/pypy-1.4.1-more-readable-c-code.patch +++ b/pypy-1.5-more-readable-c-code.patch @@ -1,7 +1,7 @@ -diff -r cd083843b67a pypy/interpreter/pycode.py ---- a/pypy/interpreter/pycode.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/interpreter/pycode.py Wed Jan 05 16:14:35 2011 -0500 -@@ -14,6 +14,7 @@ +diff -up pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code pypy-1.5-src/pypy/interpreter/pycode.py +--- pypy-1.5-src/pypy/interpreter/pycode.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/interpreter/pycode.py 2011-05-02 14:28:33.942161002 -0400 +@@ -13,6 +13,7 @@ from pypy.interpreter.gateway import Non from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, CO_GENERATOR, CO_CONTAINSGLOBALS) @@ -9,7 +9,7 @@ diff -r cd083843b67a pypy/interpreter/pycode.py from pypy.rlib.rarithmetic import intmask from pypy.rlib.debug import make_sure_not_resized from pypy.rlib import jit -@@ -81,6 +82,7 @@ +@@ -80,6 +81,7 @@ class PyCode(eval.Code): self.hidden_applevel = hidden_applevel self.magic = magic self._signature = cpython_code_signature(self) @@ -17,10 +17,10 @@ diff -r cd083843b67a pypy/interpreter/pycode.py self._initialize() def _initialize(self): -@@ -403,3 +405,25 @@ +@@ -396,3 +398,23 @@ class PyCode(eval.Code): + def repr(self, space): return space.wrap(self.get_repr()) - repr.unwrap_spec = ['self', ObjSpace] + + def get_linenum_for_offset(self, offset): + # Given a bytecode offset, return a 1-based index into the lines of the @@ -41,12 +41,10 @@ diff -r cd083843b67a pypy/interpreter/pycode.py + # raise an IOError) + self._ensure_source() + return self._cached_source[linenum - 1] -+ -+ -diff -r cd083843b67a pypy/objspace/flow/model.py ---- a/pypy/objspace/flow/model.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/model.py Wed Jan 05 16:14:35 2011 -0500 -@@ -31,6 +31,120 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/model.py +--- pypy-1.5-src/pypy/objspace/flow/model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/model.py 2011-05-02 14:28:33.942161002 -0400 +@@ -31,6 +31,120 @@ from pypy.tool.identity_dict import iden __metaclass__ = type @@ -167,7 +165,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class FunctionGraph(object): __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] -@@ -94,6 +208,21 @@ +@@ -94,6 +208,21 @@ class FunctionGraph(object): seen[block] = True stack += block.exits[::-1] @@ -189,7 +187,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py def iterlinks(self): block = self.startblock seen = {block: True} -@@ -183,14 +312,14 @@ +@@ -183,14 +312,14 @@ class Block(object): self.exits = [] # list of Link(s) def at(self): @@ -207,7 +205,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py else: if (not self.exits) and len(self.inputargs) == 1: txt = "return block" -@@ -245,6 +374,21 @@ +@@ -245,6 +374,21 @@ class Block(object): from pypy.translator.tool.graphpage import try_show try_show(self) @@ -229,7 +227,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class Variable(object): __slots__ = ["_name", "_nr", "concretetype"] -@@ -331,13 +475,15 @@ +@@ -331,13 +475,15 @@ class WrapException(Exception): class SpaceOperation(object): @@ -248,7 +246,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py def __eq__(self, other): return (self.__class__ is other.__class__ and -@@ -352,8 +498,9 @@ +@@ -352,8 +498,9 @@ class SpaceOperation(object): return hash((self.opname,tuple(self.args),self.result)) def __repr__(self): @@ -260,7 +258,7 @@ diff -r cd083843b67a pypy/objspace/flow/model.py class Atom(object): def __init__(self, name): -@@ -448,8 +595,7 @@ +@@ -427,8 +574,7 @@ def copygraph(graph, shallow=False, varm for op in oplist: copyop = SpaceOperation(op.opname, [copyvar(v) for v in op.args], @@ -270,10 +268,10 @@ diff -r cd083843b67a pypy/objspace/flow/model.py result.append(copyop) return result newblock.operations = copyoplist(block.operations) -diff -r cd083843b67a pypy/objspace/flow/objspace.py ---- a/pypy/objspace/flow/objspace.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/objspace.py Wed Jan 05 16:14:35 2011 -0500 -@@ -310,7 +310,9 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/objspace.py +--- pypy-1.5-src/pypy/objspace/flow/objspace.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/objspace.py 2011-05-02 14:28:33.943161001 -0400 +@@ -313,7 +313,9 @@ class FlowObjSpace(ObjSpace): def do_operation(self, name, *args_w): spaceop = SpaceOperation(name, args_w, Variable()) if hasattr(self, 'executioncontext'): # not here during bootstrapping @@ -284,10 +282,10 @@ diff -r cd083843b67a pypy/objspace/flow/objspace.py self.executioncontext.recorder.append(spaceop) return spaceop.result -diff -r cd083843b67a pypy/objspace/flow/test/test_model.py ---- a/pypy/objspace/flow/test/test_model.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/objspace/flow/test/test_model.py Wed Jan 05 16:14:35 2011 -0500 -@@ -132,3 +132,25 @@ +diff -up pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code pypy-1.5-src/pypy/objspace/flow/test/test_model.py +--- pypy-1.5-src/pypy/objspace/flow/test/test_model.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/objspace/flow/test/test_model.py 2011-05-02 14:28:33.943161001 -0400 +@@ -119,3 +119,25 @@ def test_variable(): assert v2.renamed assert v2.name.startswith("foobar_") and v2.name != v.name assert v2.name.split('_', 1)[1].isdigit() @@ -313,10 +311,10 @@ diff -r cd083843b67a pypy/objspace/flow/test/test_model.py + assert cmp(oplocA, oplocB) < 0 + assert cmp(oplocB, oplocA) > 0 + -diff -r cd083843b67a pypy/rpython/rtyper.py ---- a/pypy/rpython/rtyper.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/rpython/rtyper.py Wed Jan 05 16:14:35 2011 -0500 -@@ -800,7 +800,7 @@ +diff -up pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code pypy-1.5-src/pypy/rpython/rtyper.py +--- pypy-1.5-src/pypy/rpython/rtyper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/rpython/rtyper.py 2011-05-02 14:28:33.943161001 -0400 +@@ -800,7 +800,7 @@ class HighLevelOp(object): return vars def genop(self, opname, args_v, resulttype=None): @@ -325,7 +323,7 @@ diff -r cd083843b67a pypy/rpython/rtyper.py def gendirectcall(self, ll_function, *args_v): return self.llops.gendirectcall(ll_function, *args_v) -@@ -935,7 +935,7 @@ +@@ -935,7 +935,7 @@ class LowLevelOpList(list): v.concretetype)) return v @@ -334,7 +332,7 @@ diff -r cd083843b67a pypy/rpython/rtyper.py try: for v in args_v: v.concretetype -@@ -944,7 +944,7 @@ +@@ -944,7 +944,7 @@ class LowLevelOpList(list): " and pass its result to genop()," " never hop.args_v directly.") vresult = Variable() @@ -343,18 +341,18 @@ diff -r cd083843b67a pypy/rpython/rtyper.py if resulttype is None: vresult.concretetype = Void return None -diff -r cd083843b67a pypy/translator/backendopt/inline.py ---- a/pypy/translator/backendopt/inline.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/backendopt/inline.py Wed Jan 05 16:14:35 2011 -0500 -@@ -4,6 +4,7 @@ +diff -up pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code pypy-1.5-src/pypy/translator/backendopt/inline.py +--- pypy-1.5-src/pypy/translator/backendopt/inline.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/backendopt/inline.py 2011-05-02 14:32:26.975161005 -0400 +@@ -4,6 +4,7 @@ from pypy.translator.simplify import get from pypy.translator.unsimplify import copyvar from pypy.objspace.flow.model import Variable, Constant, Block, Link from pypy.objspace.flow.model import SpaceOperation, c_last_exception +from pypy.objspace.flow.model import OperationLoc from pypy.objspace.flow.model import FunctionGraph - from pypy.objspace.flow.model import traverse, mkentrymap, checkgraph + from pypy.objspace.flow.model import mkentrymap, checkgraph from pypy.annotation import model as annmodel -@@ -231,6 +232,7 @@ +@@ -231,6 +232,7 @@ class BaseInliner(object): self.varmap = {} self._copied_blocks = {} self.op = block.operations[index_operation] @@ -362,7 +360,7 @@ diff -r cd083843b67a pypy/translator/backendopt/inline.py self.graph_to_inline = self.get_graph_from_op(self.op) self.exception_guarded = False if (block.exitswitch == c_last_exception and -@@ -297,7 +299,9 @@ +@@ -290,7 +292,9 @@ class BaseInliner(object): def copy_operation(self, op): args = [self.get_new_name(arg) for arg in op.args] @@ -373,9 +371,9 @@ diff -r cd083843b67a pypy/translator/backendopt/inline.py return result def copy_block(self, block): -diff -r cd083843b67a pypy/translator/c/funcgen.py ---- a/pypy/translator/c/funcgen.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/c/funcgen.py Wed Jan 05 16:14:35 2011 -0500 +diff -up pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/funcgen.py +--- pypy-1.5-src/pypy/translator/c/funcgen.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/c/funcgen.py 2011-05-02 14:28:33.944161001 -0400 @@ -1,4 +1,6 @@ import sys +import inspect @@ -383,7 +381,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring from pypy.translator.c.support import cdecl from pypy.translator.c.support import llvalue_from_constant, gen_assignments -@@ -22,6 +24,38 @@ +@@ -22,6 +24,38 @@ LOCALVAR = 'l_%s' KEEP_INLINED_GRAPHS = False @@ -422,7 +420,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py class FunctionCodeGenerator(object): """ Collects information about a function which we have to generate -@@ -210,14 +244,57 @@ +@@ -210,14 +244,57 @@ class FunctionCodeGenerator(object): def cfunction_body(self): graph = self.graph @@ -483,7 +481,7 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py for line in self.gen_op(op): yield line if len(block.exits) == 0: -@@ -310,7 +387,7 @@ +@@ -309,7 +386,7 @@ class FunctionCodeGenerator(object): assignments.append((a2typename, dest, src)) for line in gen_assignments(assignments): yield line @@ -492,16 +490,16 @@ diff -r cd083843b67a pypy/translator/c/funcgen.py if link.target in self.innerloops: loop = self.innerloops[link.target] if link is loop.links[-1]: # link that ends a loop -diff -r cd083843b67a pypy/translator/c/test/test_genc.py ---- a/pypy/translator/c/test/test_genc.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/c/test/test_genc.py Wed Jan 05 16:14:35 2011 -0500 +diff -up pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code pypy-1.5-src/pypy/translator/c/test/test_genc.py +--- pypy-1.5-src/pypy/translator/c/test/test_genc.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/c/test/test_genc.py 2011-05-02 14:28:33.945161001 -0400 @@ -1,4 +1,5 @@ import autopath, sys, os, py +import re from pypy.rpython.lltypesystem.lltype import * from pypy.annotation import model as annmodel from pypy.translator.translator import TranslationContext -@@ -498,3 +499,130 @@ +@@ -515,3 +516,130 @@ def test_inhibit_tail_call(): else: assert 0, "the call was not found in the C source" assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] @@ -632,10 +630,10 @@ diff -r cd083843b67a pypy/translator/c/test/test_genc.py + assert 'Here is a ' in c_fn_src + assert 'style comment within an RPython docstring' in c_fn_src + -diff -r cd083843b67a pypy/translator/driver.py ---- a/pypy/translator/driver.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/driver.py Wed Jan 05 16:14:35 2011 -0500 -@@ -539,6 +539,7 @@ +diff -up pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code pypy-1.5-src/pypy/translator/driver.py +--- pypy-1.5-src/pypy/translator/driver.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/driver.py 2011-05-02 14:28:33.945161001 -0400 +@@ -536,6 +536,7 @@ class TranslationDriver(SimpleTaskEngine dstname = self.compute_exe_name() + '.staticdata.info' shutil.copy(str(fname), str(dstname)) self.log.info('Static data info written to %s' % dstname) @@ -643,12 +641,12 @@ diff -r cd083843b67a pypy/translator/driver.py # task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") -diff -r cd083843b67a pypy/translator/gensupp.py ---- a/pypy/translator/gensupp.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/gensupp.py Wed Jan 05 16:14:35 2011 -0500 -@@ -16,8 +16,8 @@ - def visit(block): - if isinstance(block, Block): +diff -up pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code pypy-1.5-src/pypy/translator/gensupp.py +--- pypy-1.5-src/pypy/translator/gensupp.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/gensupp.py 2011-05-02 14:33:31.026161001 -0400 +@@ -14,8 +14,8 @@ def ordered_blocks(graph): + allblocks = [] + for block in graph.iterblocks(): # first we order by offset in the code string - if block.operations: - ofs = block.operations[0].offset @@ -657,10 +655,10 @@ diff -r cd083843b67a pypy/translator/gensupp.py else: ofs = sys.maxint # then we order by input variable name or value -diff -r cd083843b67a pypy/translator/interactive.py ---- a/pypy/translator/interactive.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/interactive.py Wed Jan 05 16:14:35 2011 -0500 -@@ -138,7 +138,7 @@ +diff -up pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code pypy-1.5-src/pypy/translator/interactive.py +--- pypy-1.5-src/pypy/translator/interactive.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/interactive.py 2011-05-02 14:28:33.946161001 -0400 +@@ -138,7 +138,7 @@ class Translation(object): def source_c(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) self.ensure_backend('c') @@ -669,10 +667,10 @@ diff -r cd083843b67a pypy/translator/interactive.py def source_cl(self, argtypes=None, **kwds): self.update_options(argtypes, kwds) -diff -r cd083843b67a pypy/translator/llsupport/wrapper.py ---- a/pypy/translator/llsupport/wrapper.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/llsupport/wrapper.py Wed Jan 05 16:14:35 2011 -0500 -@@ -59,6 +59,8 @@ +diff -up pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code pypy-1.5-src/pypy/translator/llsupport/wrapper.py +--- pypy-1.5-src/pypy/translator/llsupport/wrapper.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/llsupport/wrapper.py 2011-05-02 14:28:33.946161001 -0400 +@@ -59,6 +59,8 @@ def new_wrapper(func, translator, newnam # "return result" block = Block(wrapper_inputargs) wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) @@ -681,10 +679,10 @@ diff -r cd083843b67a pypy/translator/llsupport/wrapper.py translator.update_call_graph(wgraph, graph, object()) translator.graphs.append(wgraph) block.operations[:] = newops -diff -r cd083843b67a pypy/translator/simplify.py ---- a/pypy/translator/simplify.py Mon Dec 20 17:17:45 2010 +0100 -+++ b/pypy/translator/simplify.py Wed Jan 05 16:14:35 2011 -0500 -@@ -294,7 +294,7 @@ +diff -up pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code pypy-1.5-src/pypy/translator/simplify.py +--- pypy-1.5-src/pypy/translator/simplify.py.more-readable-c-code 2011-04-30 10:18:50.000000000 -0400 ++++ pypy-1.5-src/pypy/translator/simplify.py 2011-05-02 14:28:33.952161001 -0400 +@@ -298,7 +298,7 @@ def join_blocks(graph): return renaming.get(v, v) def rename_op(op): args = [rename(a) for a in op.args] diff --git a/pypy.spec b/pypy.spec index c69893a..1a651e0 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy -Version: 1.4.1 -Release: 10%{?dist} +Version: 1.5 +Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -105,7 +105,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %global verbose_logs 0 %global pypyprefix %{_libdir}/pypy-%{version} -%global pylibver 2.5.2 +%global pylibver 2.7 # We refer to this subdir of the source tree in a few places during the build: %global goal_dir pypy/translator/goal @@ -120,7 +120,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
# Edit a translator file for linux in order to configure our cflags and dynamic libffi -Patch0: pypy-1.4-config.patch +Patch0: pypy-1.5-config.patch # By default, if built at a tty, the translation process renders a Mandelbrot # set to indicate progress. @@ -150,7 +150,7 @@ Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch #
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
# TODO: get this into the upstream bug tracker, and finish inlining # support (rhbz#666963) -Patch4: pypy-1.4.1-more-readable-c-code.patch +Patch4: pypy-1.5-more-readable-c-code.patch # Build-time requirements: @@ -584,7 +584,7 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # interface going forward, so let's just mimic upstream for now. %global pypy_include_dir %{pypyprefix}/include mkdir -p %{buildroot}/%{pypy_include_dir} -cp include/*.h include/*.inl %{buildroot}/%{pypy_include_dir} +cp include/*.h %{buildroot}/%{pypy_include_dir} # Capture the RPython source code files from the build within the debuginfo @@ -698,6 +698,25 @@ CheckPyPy() { # seems to hang on this test, within test_line_terminator SkipTest test_asynchat + # test_audioop: + # test test_audioop crashed -- <type 'exceptions.ImportError'>: No module named audioop + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/regrtest.py", line 874, in runtest_inner + # the_package = __import__(abstest, globals(), locals(), []) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_audioop.py", line 1, in <module> + # import audioop + # ImportError: No module named audioop + SkipTest test_audioop + + # test_capi: + # RPython traceback: + # RPython traceback: + # File "implement.c", line 243013, in _PyObject_New + # File "implement_1.c", line 31707, in _PyObject_NewVar + # File "implement.c", line 217060, in from_ref + # Fatal RPython error: AssertionError + SkipTest test_capi + # test_compiler: # 4 errors out of 13: # testSourceCodeEncodingsError @@ -710,10 +729,102 @@ CheckPyPy() { # failures=17, errors=20, out of 132 tests SkipTest test_ctypes + # test_distutils: + # Warning -- os.environ was modified by test_distutils + # test test_distutils failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_distutils + # test_frozen: # TestFailed: import __hello__ failed:No module named __hello__ SkipTest test_frozen + # test_gc: + # test test_gc crashed -- <type 'exceptions.AttributeError'>: 'module' object has no attribute 'get_debug' + SkipTest test_gc + + # test_gdb: + # test test_gdb crashed -- <type 'exceptions.KeyError'>: 'PY_CFLAGS' + SkipTest test_gdb + + # test_generators: + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # exiting + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # exiting + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # del g; gc_collect() + # Expected: + # finally + # Got nothing + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.coroutine + # Failed example: + # sys.stderr.getvalue().startswith( + # "Exception RuntimeError: 'generator ignored GeneratorExit' in " + # ) + # Expected: + # True + # Got: + # False + # ********************************************************************** + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_generators.py", line ?, in test.test_generators.__test__.refleaks + # Failed example: + # try: + # sys.stderr = StringIO.StringIO() + # class Leaker: + # def __del__(self): + # raise RuntimeError + # l = Leaker() + # del l + # gc_collect() + # err = sys.stderr.getvalue().strip() + # err.startswith( + # "Exception RuntimeError: RuntimeError() in " + # ) + # err.endswith("> ignored") + # len(err.splitlines()) + # finally: + # sys.stderr = old + # Expected: + # True + # True + # 1 + # Got: + # False + # False + # 0 + # ********************************************************************** + # 2 items had failures: + # 4 of 107 in test.test_generators.__test__.coroutine + # 1 of 11 in test.test_generators.__test__.refleaks + # ***Test Failed*** 5 failures. + # test test_generators failed -- 5 of 294 doctests failed + SkipTest test_generators + + # test_getargs2: + # test test_getargs2 failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_getargs2 + + # test_hotshot: + # test test_hotshot crashed -- <type 'exceptions.ImportError'>: No module named _hotshot + SkipTest test_hotshot + + # test_io: + # test test_io failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_io + # test_ioctl: # Failing in Koji with dist-f15 with: # ====================================================================== @@ -737,6 +848,23 @@ CheckPyPy() { # 24 failures out of 25, apparently all due to TypeError SkipTest test_iterlen + # test_multiprocessing: + # test test_multiprocessing failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_multiprocessing + + # test_module: + # test test_module failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_module.py", line 81, in test_clear_dict_in_ref_cycle + # self.assertEqual(destroyed, [1]) + # AssertionError: Lists differ: [] != [1] + # Second list contains 1 additional elements. + # First extra element 0: + # 1 + # - [] + # + [1] + # ? + + SkipTest test_module + # test_parser: # 12 failures out of 15 SkipTest test_parser @@ -746,6 +874,44 @@ CheckPyPy() { # test test_platform failed -- errors occurred in test.test_platform.PlatformTest SkipTest test_platform + # test_posix: + # test test_posix failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 361, in test_getcwd_long_pathnames + # _create_and_do_getcwd(dirname) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # [...repeats...] + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 351, in _create_and_do_getcwd + # _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_posix.py", line 356, in _create_and_do_getcwd + # self.assertEqual(e.errno, expected_errno) + # AssertionError: 36 != 34 + SkipTest test_posix + + # test_readline: + # test test_readline failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_readline.py", line 16, in testHistoryUpdates + # readline.clear_history() + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 277, in clear_history + # del self.get_reader().history[:] + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/readline.py", line 186, in get_reader + # console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING) + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 103, in __init__ + # self._clear = _my_getstr("clear") + # File "/builddir/build/BUILD/pypy-1.5-src/lib_pypy/pyrepl/unix_console.py", line 45, in _my_getstr + # "terminal doesn't have the required '%s' capability"%cap + # InvalidTerminal: terminal doesn't have the required 'clear' capability + SkipTest test_readline + + # test_scope: + # test test_scope failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_scope.py", line 437, in testLeaks + # self.assertEqual(Foo.count, 0) + # AssertionError: 100 != 0 + SkipTest test_scope + # test_socket: # testSockName can fail in Koji with: # my_ip_addr = socket.gethostbyname(socket.gethostname()) @@ -761,10 +927,138 @@ CheckPyPy() { # ProgrammingError: Incomplete statement '' SkipTest test_sqlite + # test_strop: + # test test_strop crashed -- <type 'exceptions.ImportError'>: No module named strop + SkipTest test_strop + + # test_structmembers: + # test test_structmembers failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_structmembers + + # test_subprocess: + # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset + # 'import site' failed + # . + # this bit of output is from a test of stdout in a different process ... + # /builddir/build/BUILD/pypy-1.5-src/lib_pypy/ctypes_support.py:26: RuntimeWarning: C function without declared arguments called + # return standard_c_lib.__errno_location() + # debug: WARNING: library path not found, using compiled-in sys.path and sys.prefix will be unset + # 'import site' failed + # . + # this bit of output is from a test of stdout in a different process ... + # test test_subprocess failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_subprocess + + # test_symtable: + # test test_symtable crashed -- <type 'exceptions.ImportError'>: No module named _symtable + SkipTest test_symtable + + # test_sys_settrace: + # test test_sys_settrace failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 334, in test_13_genexp + # self.run_test(generator_example) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 280, in run_test + # self.run_and_compare(func, func.events) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 277, in run_and_compare + # tracer.events, events) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/test/test_sys_settrace.py", line 269, in compare_events + # [str(x) for x in events]))) + # AssertionError: events did not match expectation: + # (0, 'call') + # (2, 'line') + # (-6, 'call') + # (-5, 'line') + # (-4, 'line') + # (-4, 'return') + # - (-4, 'call') + # - (-4, 'exception') + # - (-1, 'line') + # - (-1, 'return') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (6, 'line') + # (5, 'line') + # (5, 'return') + SkipTest test_sys_settrace + + # test_tempfile: + # test test_tempfile failed -- multiple errors occurred; run in verbose mode for details + SkipTest test_tempfile + + # test_thread + # Koji build appears to hang here + SkipTest test_thread + # test_traceback: # works when run standalone; failures seen when run as part of a suite SkipTest test_traceback + # test_uuid: + # ====================================================================== + # ERROR: test_ifconfig_getnode (test.test_uuid.TestUUID) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_uuid.py", line 306, in test_ifconfig_getnode + # node = uuid._ifconfig_getnode() + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/uuid.py", line 326, in _ifconfig_getnode + # ip_addr = socket.gethostbyname(socket.gethostname()) + # gaierror: [Errno -3] Temporary failure in name resolution + # ---------------------------------------------------------------------- + # Ran 14 tests in 0.369s + # FAILED (errors=1) + SkipTest test_uuid + + # test_zipimport_support: + # ====================================================================== + # ERROR: test_doctest_main_issue4197 (test.test_zipimport_support.ZipSupportTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 194, in test_doctest_main_issue4197 + # exit_code, data = run_python(script_name) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 80, in run_python + # p = spawn_python(*args, **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python + # **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ + # errread, errwrite) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child + # raise child_exception + # OSError: [Errno 13] Permission denied + # ====================================================================== + # ERROR: test_pdb_issue4201 (test.test_zipimport_support.ZipSupportTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/test_zipimport_support.py", line 221, in test_pdb_issue4201 + # p = spawn_python(script_name) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/2.7/test/script_helper.py", line 66, in spawn_python + # **kwargs) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 672, in __init__ + # errread, errwrite) + # File "/builddir/build/BUILD/pypy-1.5-src/lib-python/modified-2.7/subprocess.py", line 1206, in _execute_child + # raise child_exception + # OSError: [Errno 13] Permission denied + # ---------------------------------------------------------------------- + # Ran 4 tests in 0.726s + # FAILED (errors=2) + SkipTest test_zipimport_support + # test_zlib: # failure seen in Koji, not sure of reason why: # test test_zlib failed -- Traceback (most recent call last): @@ -832,6 +1126,8 @@ rm -rf $RPM_BUILD_ROOT %dir %{pypyprefix} %dir %{pypyprefix}/lib-python +%{pypyprefix}/lib-python/TODO +%{pypyprefix}/lib-python/stdlib-version.txt %{pypyprefix}/lib-python/%{pylibver}/ %{pypyprefix}/lib-python/modified-%{pylibver}/ %{pypyprefix}/lib-python/conftest.py* @@ -847,7 +1143,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{pypy_include_dir} %{pypy_include_dir}/*.h -%{pypy_include_dir}/*.inl %if 0%{with_stackless} %files stackless @@ -858,6 +1153,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 2 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.5-1 +- 1.5 + * Wed Apr 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-10 - build a /usr/bin/pypy (but without the JIT compiler) on architectures that don't support the JIT, so that they do at least have something that runs diff --git a/sources b/sources index 90f34be..a047407 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ebbbb156b1eb842e9e65d909ed5f9f6d pypy-1.4.1-src.tar.bz2 +cb9ada2c50666318c3a2863da1fbe487 pypy-1.5-src.tar.bz2 commit 3ca83f1944c99711e69be7a733f36a976d1fcec2 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Sat Apr 30 18:24:07 2011 -0400 Fix the build on architectures that the JIT doesn't support - build a /usr/bin/pypy (but without the JIT compiler) on architectures that don't support the JIT, so that they do at least have something that runs diff --git a/pypy.spec b/pypy.spec index ca09b94..c69893a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -74,7 +74,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # [Timer] Total: --- 5215.3 s -# Should we build a "pypy" binary? (with jit) +# We will build a "pypy" binary. +# +# Unfortunately, the JIT support is only available on some architectures. +# # pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the # following options: # 'i386', 'x86' @@ -82,6 +85,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # 'x86_64' # 'cli' # 'llvm' +# +# We will only build with JIT support on those architectures, and build without +# it on the other archs. The resulting binary will typically be slower than +# CPython for the latter case. +# %ifarch %{ix86} x86_64 # FIXME: is there a better way of expressing "intel" here? %global with_jit 1 @@ -225,8 +233,16 @@ BuildRequires: /usr/bin/execstack Requires: pypy-libs = %{version}-%{release} %description -PyPy's implementation of Python, featuring a Just-In-Time compiler, and various -optimized implementations of the standard types (strings, dictionaries, etc) +PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU +architectures, and various optimized implementations of the standard types +(strings, dictionaries, etc) + +%if 0%{with_jit} +This build of PyPy has JIT-compilation enabled. +%else +This build of PyPy has JIT-compilation disabled, as it is not supported on this +CPU architecture. +%endif %package libs @@ -411,11 +427,12 @@ BuildPyPy() { popd } -%if 0%{with_jit} BuildPyPy \ pypy \ - "-Ojit" +%if 0%{with_jit} + "-Ojit" \ %endif + %{nil} %if 0%{with_stackless} BuildPyPy \ @@ -448,9 +465,7 @@ InstallPyPy() { mkdir -p %{buildroot}/%{_bindir} -%if 0%{with_jit} InstallPyPy pypy -%endif %if 0%{with_stackless} InstallPyPy pypy-stackless @@ -799,9 +814,7 @@ CheckPyPy() { echo "--------------------------------------------------------------" } -%if 0%{with_jit} CheckPyPy pypy -%endif %if 0%{with_stackless} CheckPyPy pypy-stackless @@ -825,12 +838,10 @@ rm -rf $RPM_BUILD_ROOT %{pypyprefix}/lib_pypy/ %{pypyprefix}/site-packages/ -%if 0%{with_jit} %files %defattr(-,root,root,-) %doc LICENSE README %{_bindir}/pypy -%endif %files devel %defattr(-,root,root,-) @@ -847,6 +858,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 20 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-10 +- build a /usr/bin/pypy (but without the JIT compiler) on architectures that +don't support the JIT, so that they do at least have something that runs + * Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.4.1-9 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
commit d853ff6a5bdd4ce40976333f048aba1616374604 Author: Dennis Gilmore <dennis(a)ausil.us> Date: Tue Feb 8 20:23:05 2011 -0600 - Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/pypy.spec b/pypy.spec index 6f44a9a..ca09b94 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -847,6 +847,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.4.1-9 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+ * Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-8 - disable self-hosting for now, due to fatal error seen JIT-compiling the translator commit c225b1c0921c528b804bdce231951a10f040cb6c Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jan 14 11:58:45 2011 -0500 Disable self-hosting for now, due to fatal error seen JIT-compiling the translator diff --git a/pypy.spec b/pypy.spec index 9c8134d..6f44a9a 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -152,8 +152,38 @@ Patch4: pypy-1.4.1-more-readable-c-code.patch # # Turn it off with this boolean, to revert back to rebuilding using CPython # and avoid a cycle in the build-time dependency graph: + +# I'm disabling the self-hosting for now, due to a fatal error seen inside the +# JIT, presumably whilst JIT-compiling something within the translator's +# inliner. +# +# Specifically, building pypy-1.4.1-7.fc15.src.rpm on x86_64 using pypy-1.4.1-5.fc15.x86_64 +#
http://koji.fedoraproject.org/koji/taskinfo?taskID=2721517
+# failed with this RPython traceback: +# ... snip ... +# [rtyper:WARNING] prebuilt instance <pypy.rpython.memory.gctransform.asmgcroot.ShapeDecompressor instance at 0x00000000f0b5bc80> has no attribute 'addr' +# [rtyper] specializing: 179300 / 180508 blocks (99%) +# [rtyper] specializing: 180500 / 180566 blocks (99%) +# [rtyper] -=- specialized 1363 more blocks -=- +# [rtyper] specializing: 180600 / 180777 blocks (99%) +# [rtyper] -=- specialized 211 more blocks -=- +# [backendopt:inlining] phase with threshold factor: 32.4 +# [backendopt:inlining] heuristic: pypy.translator.backendopt.inline.inlining_heuristic +# [x86/regalloc] Bogus arg in operation 76 at 0 +# RPython traceback: +# File "implement_62.c", line 39979, in send_bridge_to_backend +# File "implement_69.c", line 65301, in Assembler386_assemble_bridge +# File "implement_72.c", line 8078, in RegAlloc_prepare_bridge +# File "implement_40.c", line 53061, in RegAlloc__prepare +# File "implement_44.c", line 14305, in RegAlloc__compute_vars_longevity +# Fatal RPython error: NotImplementedError # -%global use_self_when_building 1 +# This appears to be deep within pypy/jit/backend/x86/regalloc.py which has +# called "not_implemented" to emit this message to stderr, before raising the +# exception: +# [x86/regalloc] Bogus arg in operation 76 at 0 + +%global use_self_when_building 0 %if 0%{use_self_when_building} BuildRequires: pypy %global bootstrap_python_interp pypy @@ -817,6 +847,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-8 +- disable self-hosting for now, due to fatal error seen JIT-compiling the +translator + * Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-7 - skip test_ioctl for now commit 7632349386659a82412f3dfbd37e714bf56aa152 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Fri Jan 14 11:06:07 2011 -0500 skip test_ioctl for now diff --git a/pypy.spec b/pypy.spec index 71b2db6..9c8134d 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -669,6 +669,25 @@ CheckPyPy() { # TestFailed: import __hello__ failed:No module named __hello__ SkipTest test_frozen + # test_ioctl: + # Failing in Koji with dist-f15 with: + # ====================================================================== + # FAIL: test_ioctl (test.test_ioctl.IoctlTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 25, in test_ioctl + # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + # AssertionError: 0 not in (8304, 17737) + # ====================================================================== + # FAIL: test_ioctl_mutate (test.test_ioctl.IoctlTests) + # ---------------------------------------------------------------------- + # Traceback (most recent call last): + # File "/usr/lib/pypy-1.4.1/lib-python/2.5.2/test/test_ioctl.py", line 35, in test_ioctl_mutate + # self.assert_(rpgrp in ids, "%s not in %s" % (rpgrp, ids)) + # AssertionError: 0 not in (8304, 17737) + # ---------------------------------------------------------------------- + SkipTest test_ioctl + # test_iterlen: # 24 failures out of 25, apparently all due to TypeError SkipTest test_iterlen @@ -798,6 +817,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 14 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-7 +- skip test_ioctl for now + * Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 - add a "pypy-devel" subpackage, and install the header files there - in %%check, re-run failed tests in verbose mode commit 0a81116e89104e6bd77075151eadf5bde029085d Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Jan 13 19:51:26 2011 -0500 Add a pypy-devel subpackage; rerun failed selftests in verbose mode * Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 - add a "pypy-devel" subpackage, and install the header files there - in %%check, re-run failed tests in verbose mode diff --git a/pypy.spec b/pypy.spec index 4d66f89..71b2db6 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -205,6 +205,16 @@ Summary: Run-time libraries used by PyPy implementations of Python %description libs Libraries required by the various PyPy implementations of Python. + +%package devel +Group: Development/Languages +Summary: Development tools for working with PyPy +%description devel +Header files for building C extension modules against PyPy + +Requires: pypy = %{version}-%{release} + + %if 0%{with_stackless} %package stackless Group: Development/Languages @@ -516,6 +526,22 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 + +# Header files for C extension modules. +# Upstream's packaging process (pypy/tool/release/package.py) +# creates an "include" subdir and copies all *.h/*.inl from "include" there +# (it also has an apparently out-of-date comment about copying them from +# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't +# seem to do this as of 2011-01-13) + +# FIXME: arguably these should be instead put into a subdir below /usr/include, +# it's not yet clear to me how upstream plan to deal with the C extension +# interface going forward, so let's just mimic upstream for now. +%global pypy_include_dir %{pypyprefix}/include +mkdir -p %{buildroot}/%{pypy_include_dir} +cp include/*.h include/*.inl %{buildroot}/%{pypy_include_dir} + + # Capture the RPython source code files from the build within the debuginfo # package (rhbz#666975) %global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src @@ -692,8 +718,9 @@ CheckPyPy() { SkipTest test_tarfile # permissions issues %endif - # Run the built binary through the selftests: - time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP + # Run the built binary through the selftests + # "-w" : re-run failed tests in verbose mode + time ./$ExeName -m test.regrtest -w -x $TESTS_TO_SKIP popd @@ -756,6 +783,12 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/pypy %endif +%files devel +%defattr(-,root,root,-) +%dir %{pypy_include_dir} +%{pypy_include_dir}/*.h +%{pypy_include_dir}/*.inl + %if 0%{with_stackless} %files stackless %defattr(-,root,root,-) @@ -765,6 +798,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 13 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-6 +- add a "pypy-devel" subpackage, and install the header files there +- in %%check, re-run failed tests in verbose mode + * Fri Jan 7 2011 Dan Horák <dan[at]danny.cz> - 1.4.1-5 - valgrind available only on selected architectures commit d39359a3af6a0dee27f50e4a4fe52860f9c6b426 Author: Dan Horák <dan(a)danny.cz> Date: Fri Jan 7 17:56:06 2011 +0100 - valgrind available only on selected architectures diff --git a/pypy.spec b/pypy.spec index 162ed5f..4d66f89 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -176,7 +176,9 @@ BuildRequires: bzip2-devel BuildRequires: ncurses-devel BuildRequires: expat-devel BuildRequires: openssl-devel +%ifarch %{ix86} x86_64 ppc ppc64 s390x BuildRequires: valgrind-devel +%endif # Used by the selftests, though not by the build: BuildRequires: gc-devel @@ -763,6 +765,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 7 2011 Dan Horák <dan[at]danny.cz> - 1.4.1-5 +- valgrind available only on selected architectures + * Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 - rebuild pypy using itself, for speed, with a boolean to break this cycle in the build-requirement graph (falling back to using "python-devel" aka CPython) commit 00e57e74f81587a2c49341341a7a291a54e22dc8 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Thu Jan 6 17:09:03 2011 -0500 * Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 - rebuild pypy using itself, for speed, with a boolean to break this cycle in the build-requirement graph (falling back to using "python-devel" aka CPython) - add work-in-progress patch to try to make generated c more readable (rhbz#666963) - capture the RPython source code files from the build within the debuginfo package (rhbz#666975) diff --git a/pypy-1.4.1-more-readable-c-code.patch b/pypy-1.4.1-more-readable-c-code.patch new file mode 100644 index 0000000..45fa534 --- /dev/null +++ b/pypy-1.4.1-more-readable-c-code.patch @@ -0,0 +1,695 @@ +diff -r cd083843b67a pypy/interpreter/pycode.py +--- a/pypy/interpreter/pycode.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/interpreter/pycode.py Wed Jan 05 16:14:35 2011 -0500 +@@ -14,6 +14,7 @@ + from pypy.interpreter.astcompiler.consts import (CO_OPTIMIZED, + CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED, + CO_GENERATOR, CO_CONTAINSGLOBALS) ++from pypy.interpreter.pytraceback import offset2lineno + from pypy.rlib.rarithmetic import intmask + from pypy.rlib.debug import make_sure_not_resized + from pypy.rlib import jit +@@ -81,6 +82,7 @@ + self.hidden_applevel = hidden_applevel + self.magic = magic + self._signature = cpython_code_signature(self) ++ self._cached_source = None + self._initialize() + + def _initialize(self): +@@ -403,3 +405,25 @@ + def repr(self, space): + return space.wrap(self.get_repr()) + repr.unwrap_spec = ['self', ObjSpace] ++ ++ def get_linenum_for_offset(self, offset): ++ # Given a bytecode offset, return a 1-based index into the lines of the ++ # source code ++ return offset2lineno(self, offset) ++ ++ def _ensure_source(self): ++ # Lazily grab the source lines into self._cached_source (or raise ++ # an IOError) ++ if not self._cached_source: ++ f = open(self.co_filename, 'r') ++ source = [line.rstrip() for line in f.readlines()] ++ f.close() ++ self._cached_source = source ++ ++ def get_source_text(self, linenum): ++ # Given a 1-based index, get the corresponding line of source code (or ++ # raise an IOError) ++ self._ensure_source() ++ return self._cached_source[linenum - 1] ++ ++ +diff -r cd083843b67a pypy/objspace/flow/model.py +--- a/pypy/objspace/flow/model.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/model.py Wed Jan 05 16:14:35 2011 -0500 +@@ -31,6 +31,120 @@ + + __metaclass__ = type + ++class SourceLoc(object): ++ # A srcloc is a specific location within the RPython source code, ++ # intended for human display ++ __slots__ = ('code', # code object ++ 'linenum' # 1-based index, as displayed to a user ++ ) ++ def __init__(self, code, linenum): ++ self.code = code ++ self.linenum = linenum ++ ++ def get_text(self): ++ # Get the actual source text of this line ++ return self.code.get_source_text(self.linenum) ++ ++ def __eq__(self, other): ++ return self.code == other.code and self.linenum == other.linenum ++ ++ def __ne__(self, other): ++ if other: ++ return self.code != other.code or self.linenum != other.linenum ++ else: ++ return True ++ ++class CodeLoc(object): ++ # A codeloc is a specific location within the RPython bytecode ++ __slots__ = ('code', # code object ++ 'offset' # int index into bytecode, or -1 ++ ) ++ ++ def __init__(self, code, offset): ++ self.code = code ++ self.offset = offset ++ ++ def __str__(self): ++ if self.offset >= 0: ++ return "%s@%d" % (self.code.co_name, self.offset) ++ else: ++ return "" ++ ++ def __ne__(self, other): ++ if other: ++ return self.code != other.code or self.offset != other.offset ++ else: ++ return True ++ ++ def __cmp__(self, other): ++ # Partial ordering, for those locations that have an offset: ++ if other: ++ if self.offset >= 0 and other.offset >= 0: ++ return self.offset - other.offset ++ return 0 ++ ++ def get_source_loc(self): ++ # Convert to a SourceLoc: ++ return SourceLoc(self.code, self.code.get_linenum_for_offset(self.offset)) ++ ++class OperationLoc(object): ++ # An oploc is the location within the RPython source code of a given ++ # operation ++ # ++ # This is a list consisting of CodeLoc instances, some of which may be None ++ # ++ # For the simple case, this is list of length 1 with a single CodeLoc ++ # ++ # For an operation inside an inlined callsite, we have a list of length 2: ++ # [codeloc of callsite, ++ # codeloc of operation within inlined body] ++ # ++ # For more interesting inlined cases, we have a chain of source locations: ++ # [codeloc of callsite, ++ # codeloc of inner callsite, ++ # ... , ++ # codeloc of innermost inlined callsite, ++ # codeloc of operation within inlined body] ++ # ++ ++ __slots__ = ('codelocs', ) ++ ++ def __init__(self, codelocs): ++ self.codelocs = codelocs ++ ++ def __str__(self): ++ return '[' + ' > '.join(str(codeloc) for codeloc in self.codelocs) + ']' ++ ++ def __cmp__(self, other): ++ return cmp(self.codelocs, other.codelocs) ++ ++def block_comparator(blk0, blk1): ++ ''' ++ Sort function for blocks, putting them in an ordering that attempts to ++ maximize readability of the generated C code ++ ''' ++ # print 'comparing %r and %r' % (blk0, blk1) ++ # Put the start/end block at the top/bottom: ++ if blk0.isstartblock: ++ return -1 ++ ++ if blk1.isstartblock: ++ return 1 ++ ++ # Order blocks by the offset, where present: ++ if blk0.operations: ++ if blk1.operations: ++ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) ++ else: ++ return -1 ++ else: ++ if blk1.operations: ++ return 1 ++ else: ++ return 0 ++ ++def edge_comparator(edge0, edge1): ++ return block_comparator(edge0.target, edge1.target) + + class FunctionGraph(object): + __slots__ = ['startblock', 'returnblock', 'exceptblock', '__dict__'] +@@ -94,6 +208,21 @@ + seen[block] = True + stack += block.exits[::-1] + ++ def iterblocks_by_source(self): ++ # Try to preserve logical source ordering in the blocks ++ block = self.startblock ++ yield block ++ seen = {block: True} ++ stack = list(block.exits[::-1]) ++ stack.sort(edge_comparator) ++ while stack: ++ block = stack.pop().target ++ if block not in seen: ++ yield block ++ seen[block] = True ++ stack += block.exits[::-1] ++ stack.sort(edge_comparator) ++ + def iterlinks(self): + block = self.startblock + seen = {block: True} +@@ -183,14 +312,14 @@ + self.exits = [] # list of Link(s) + + def at(self): +- if self.operations and self.operations[0].offset >= 0: +- return "@%d" % self.operations[0].offset ++ if self.operations: ++ return str(self.operations[0].oploc) + else: + return "" + + def __str__(self): + if self.operations: +- txt = "block@%d" % self.operations[0].offset ++ txt = "block%s" % self.operations[0].oploc + else: + if (not self.exits) and len(self.inputargs) == 1: + txt = "return block" +@@ -245,6 +374,21 @@ + from pypy.translator.tool.graphpage import try_show + try_show(self) + ++ def isreturnblock(self): ++ return (not self.operations) and (not self.exits) and len(self.inputargs) == 1 ++ ++ def get_base_label(self, blocknum): ++ # Generate a more friendly C label for this block ++ if self.operations: ++ txt = "block" ++ elif (not self.exits) and len(self.inputargs) == 1: ++ txt = "return_block" ++ elif (not self.exits) and len(self.inputargs) == 2: ++ txt = "raise_block" ++ else: ++ txt = "codeless_block" ++ return '%s%d' % (txt, blocknum) ++ + + class Variable(object): + __slots__ = ["_name", "_nr", "concretetype"] +@@ -331,13 +475,15 @@ + + + class SpaceOperation(object): +- __slots__ = "opname args result offset".split() ++ __slots__ = "opname args result oploc".split() + +- def __init__(self, opname, args, result, offset=-1): ++ def __init__(self, opname, args, result, oploc=None): + self.opname = intern(opname) # operation name + self.args = list(args) # mixed list of var/const + self.result = result # either Variable or Constant instance +- self.offset = offset # offset in code string ++ if oploc is None: ++ oploc = OperationLoc([None]) ++ self.oploc = oploc + + def __eq__(self, other): + return (self.__class__ is other.__class__ and +@@ -352,8 +498,9 @@ + return hash((self.opname,tuple(self.args),self.result)) + + def __repr__(self): +- return "%r = %s(%s)" % (self.result, self.opname, +- ", ".join(map(repr, self.args))) ++ return "%r = %s(%s) (%s)" % (self.result, self.opname, ++ ", ".join(map(repr, self.args)), ++ self.oploc) + + class Atom(object): + def __init__(self, name): +@@ -448,8 +595,7 @@ + for op in oplist: + copyop = SpaceOperation(op.opname, + [copyvar(v) for v in op.args], +- copyvar(op.result), op.offset) +- #copyop.offset = op.offset ++ copyvar(op.result), op.oploc) + result.append(copyop) + return result + newblock.operations = copyoplist(block.operations) +diff -r cd083843b67a pypy/objspace/flow/objspace.py +--- a/pypy/objspace/flow/objspace.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/objspace.py Wed Jan 05 16:14:35 2011 -0500 +@@ -310,7 +310,9 @@ + def do_operation(self, name, *args_w): + spaceop = SpaceOperation(name, args_w, Variable()) + if hasattr(self, 'executioncontext'): # not here during bootstrapping +- spaceop.offset = self.executioncontext.crnt_offset ++ codeloc = CodeLoc(self.executioncontext.code, ++ self.executioncontext.crnt_offset) ++ spaceop.oploc = OperationLoc([codeloc]) + self.executioncontext.recorder.append(spaceop) + return spaceop.result + +diff -r cd083843b67a pypy/objspace/flow/test/test_model.py +--- a/pypy/objspace/flow/test/test_model.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/objspace/flow/test/test_model.py Wed Jan 05 16:14:35 2011 -0500 +@@ -132,3 +132,25 @@ + assert v2.renamed + assert v2.name.startswith("foobar_") and v2.name != v.name + assert v2.name.split('_', 1)[1].isdigit() ++ ++def test_source_locations(): ++ # Invent some random offsets into the code: ++ co = sample_function.__code__ ++ codelocA = CodeLoc(co, 42) ++ codelocB = CodeLoc(co, 87) ++ ++ assert str(codelocA) == 'sample_function@42' ++ assert str(codelocB) == 'sample_function@87' ++ ++ assert cmp(codelocA, codelocB) < 0 ++ assert cmp(codelocB, codelocA) > 0 ++ ++ oplocA = OperationLoc([codelocA]) ++ oplocB = OperationLoc([codelocB]) ++ ++ assert str(oplocA) == '[sample_function@42]' ++ assert str(oplocB) == '[sample_function@87]' ++ ++ assert cmp(oplocA, oplocB) < 0 ++ assert cmp(oplocB, oplocA) > 0 ++ +diff -r cd083843b67a pypy/rpython/rtyper.py +--- a/pypy/rpython/rtyper.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/rpython/rtyper.py Wed Jan 05 16:14:35 2011 -0500 +@@ -800,7 +800,7 @@ + return vars + + def genop(self, opname, args_v, resulttype=None): +- return self.llops.genop(opname, args_v, resulttype) ++ return self.llops.genop(opname, args_v, resulttype, self.spaceop.oploc) + + def gendirectcall(self, ll_function, *args_v): + return self.llops.gendirectcall(ll_function, *args_v) +@@ -935,7 +935,7 @@ + v.concretetype)) + return v + +- def genop(self, opname, args_v, resulttype=None): ++ def genop(self, opname, args_v, resulttype=None, oploc=None): + try: + for v in args_v: + v.concretetype +@@ -944,7 +944,7 @@ + " and pass its result to genop()," + " never hop.args_v directly.") + vresult = Variable() +- self.append(SpaceOperation(opname, args_v, vresult)) ++ self.append(SpaceOperation(opname, args_v, vresult, oploc)) + if resulttype is None: + vresult.concretetype = Void + return None +diff -r cd083843b67a pypy/translator/backendopt/inline.py +--- a/pypy/translator/backendopt/inline.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/backendopt/inline.py Wed Jan 05 16:14:35 2011 -0500 +@@ -4,6 +4,7 @@ + from pypy.translator.unsimplify import copyvar + from pypy.objspace.flow.model import Variable, Constant, Block, Link + from pypy.objspace.flow.model import SpaceOperation, c_last_exception ++from pypy.objspace.flow.model import OperationLoc + from pypy.objspace.flow.model import FunctionGraph + from pypy.objspace.flow.model import traverse, mkentrymap, checkgraph + from pypy.annotation import model as annmodel +@@ -231,6 +232,7 @@ + self.varmap = {} + self._copied_blocks = {} + self.op = block.operations[index_operation] ++ self.callsite_oploc = self.op.oploc + self.graph_to_inline = self.get_graph_from_op(self.op) + self.exception_guarded = False + if (block.exitswitch == c_last_exception and +@@ -297,7 +299,9 @@ + + def copy_operation(self, op): + args = [self.get_new_name(arg) for arg in op.args] +- result = SpaceOperation(op.opname, args, self.get_new_name(op.result)) ++ new_oploc = OperationLoc(self.callsite_oploc.codelocs[:] + op.oploc.codelocs[:]) ++ result = SpaceOperation(op.opname, args, self.get_new_name(op.result), ++ new_oploc) + return result + + def copy_block(self, block): +diff -r cd083843b67a pypy/translator/c/funcgen.py +--- a/pypy/translator/c/funcgen.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/c/funcgen.py Wed Jan 05 16:14:35 2011 -0500 +@@ -1,4 +1,6 @@ + import sys ++import inspect ++import dis + from pypy.translator.c.support import USESLOTS # set to False if necessary while refactoring + from pypy.translator.c.support import cdecl + from pypy.translator.c.support import llvalue_from_constant, gen_assignments +@@ -22,6 +24,38 @@ + + KEEP_INLINED_GRAPHS = False + ++def block_comparator(blk0, blk1): ++ ''' ++ Sort function for blocks, putting them in an ordering that attempts to ++ maximize readability of the generated C code ++ ''' ++ # print 'comparing %r and %r' % (blk0, blk1) ++ # Put the start/end block at the top/bottom: ++ if blk0.isstartblock: ++ return -1 ++ ++ if blk1.isstartblock: ++ return 1 ++ ++ # Order blocks by the offset, where present: ++ if blk0.operations: ++ if blk1.operations: ++ return cmp(blk0.operations[0].oploc, blk1.operations[0].oploc) ++ else: ++ return -1 ++ else: ++ if blk1.operations: ++ return 1 ++ else: ++ return 0 ++ ++def escape_c_comments(py_src): ++ # Escape C comments within RPython source, to avoid generating bogus ++ # comments in our generated C source: ++ py_src = py_src.replace('/*', '') ++ py_src = py_src.replace('*/', '') ++ return py_src ++ + class FunctionCodeGenerator(object): + """ + Collects information about a function which we have to generate +@@ -210,14 +244,57 @@ + + def cfunction_body(self): + graph = self.graph +- yield 'goto block0;' # to avoid a warning "this label is not used" ++ # Try to print python source code: ++ if hasattr(graph, 'func'): ++ filename = inspect.getfile(graph.func) ++ #yield '/* name: %r */' % filename ++ try: ++ src, startline = inspect.getsourcelines(graph.func) ++ except IOError: ++ pass # No source found ++ except IndexError: ++ pass # Bulletproofing ++ else: ++ yield '/* Python source %r' % filename ++ for i, line in enumerate(src): ++ line = line.rstrip() ++ line = escape_c_comments(line) ++ # FuncNode.funcgen_implementation treats lines ending in ':' ++ # as C blocks, which messes up the formatting. ++ # Work around this: ++ if line.endswith(':'): ++ line += ' ' ++ yield ' * %4d : %s' % (startline + i, line) ++ yield ' */' ++ ++ label = graph.startblock.get_base_label(self.blocknum[graph.startblock]) ++ yield 'goto %s;' % label # to avoid a warning "this label is not used" ++ ++ # Sort the blocks into a (hopefully) readable order: ++ blocks = list(graph.iterblocks_by_source()) ++ blocks.sort(block_comparator) + + # generate the body of each block +- for block in graph.iterblocks(): ++ for block in blocks: ++ cursrcloc = None + myblocknum = self.blocknum[block] + yield '' +- yield 'block%d:' % myblocknum ++ yield '%s:' % block.get_base_label(myblocknum) ++ #yield "/* repr(block): %r */" % (block, ) ++ #yield "/* type(block): %r */" % (type(block), ) + for i, op in enumerate(block.operations): ++ #yield "/* type(op): %r */" % (type(op), ) ++ #yield "/* op.oploc: %s */" % (op.oploc, ) ++ codeloc = op.oploc.codelocs[-1] ++ if codeloc: ++ srcloc = codeloc.get_source_loc() ++ if srcloc != cursrcloc: ++ try: ++ yield "/* %s:%d : %s */" % (codeloc.code.co_name, srcloc.linenum, escape_c_comments(srcloc.get_text())) ++ cursrcloc = srcloc ++ except IOError: ++ pass ++ + for line in self.gen_op(op): + yield line + if len(block.exits) == 0: +@@ -310,7 +387,7 @@ + assignments.append((a2typename, dest, src)) + for line in gen_assignments(assignments): + yield line +- label = 'block%d' % self.blocknum[link.target] ++ label = link.target.get_base_label(self.blocknum[link.target]) + if link.target in self.innerloops: + loop = self.innerloops[link.target] + if link is loop.links[-1]: # link that ends a loop +diff -r cd083843b67a pypy/translator/c/test/test_genc.py +--- a/pypy/translator/c/test/test_genc.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/c/test/test_genc.py Wed Jan 05 16:14:35 2011 -0500 +@@ -1,4 +1,5 @@ + import autopath, sys, os, py ++import re + from pypy.rpython.lltypesystem.lltype import * + from pypy.annotation import model as annmodel + from pypy.translator.translator import TranslationContext +@@ -498,3 +499,130 @@ + else: + assert 0, "the call was not found in the C source" + assert 'PYPY_INHIBIT_TAIL_CALL();' in lines[i+1] ++ ++def get_generated_c_source(fn, types): ++ # Return a (optimized fn, c source code, c source filename) 3-tuple ++ t = Translation(fn) ++ t.annotate(types) ++ c_filename_path = t.source_c() ++ h = c_filename_path.open() ++ src = h.read() ++ h.close() ++ c_fn = t.compile_c() ++ return (c_fn, src, c_filename_path) ++ ++def extract_c_function(c_src, fname): ++ # Extract the source for a given C function out of a the given src string ++ # Makes assumptions about the layout of the source ++ pattern = '^(.+) \**%s\(.*\) {$' % fname ++ within_fn = False ++ result = '' ++ for line in c_src.splitlines(): ++ if within_fn: ++ result += line + '\n' ++ if line.startswith('}'): ++ return result ++ else: ++ m = re.match(pattern, line) ++ if m: ++ within_fn = True ++ result += line + '\n' ++ return result ++ ++ ++ ++def test_generated_c_source(): ++ # Verify that generate C source "looks good" ++ # We'll use is_perfect_number, as it contains a loop and a conditional ++ ++ # Generate C source code ++ from pypy.translator.test.snippet import is_perfect_number ++ c_fn, c_src, c_filename_path = get_generated_c_source(is_perfect_number, ++ [int]) ++ ++ # Locate the C source for the type-specialized function: ++ c_fn_src = extract_c_function(c_src, 'pypy_g_is_perfect_number') ++ ++ # Verify that the C source contains embedded comments containing the lines ++ # of the python source: ++ expected_comment_lines = [ ++ '/* is_perfect_number:31 : while div < n: */', ++ '/* is_perfect_number:32 : if n % div == 0: */', ++ '/* is_perfect_number:33 : sum += div */', ++ '/* is_perfect_number:34 : div += 1 */', ++ '/* is_perfect_number:35 : return n == sum */'] ++ for exp_line in expected_comment_lines: ++ assert exp_line in c_fn_src ++ ++ # Verify that the lines occur in the correct order ++ # ...we do this by filtering the function's generated C source to just ++ # those lines containing our comments (and dropping whitespace): ++ lines = c_fn_src.splitlines() ++ lines = [line.strip() ++ for line in lines ++ if '/* is_perfect_number:' in line] ++ ++ # ...we should now have exact equality: the ordering should be as expected, ++ # and each comment should appear exactly once: ++ assert lines == expected_comment_lines ++ ++ # Ensure that the generated C function does the right thing: ++ assert c_fn(5) == False ++ assert c_fn(6) == True ++ assert c_fn(7) == False ++ ++ assert c_fn(5.0) == False ++ assert c_fn(6.0) == True ++ assert c_fn(7.0) == False ++ ++ assert c_fn(5L) == False ++ assert c_fn(6L) == True ++ assert c_fn(7L) == False ++ ++ try: ++ c_fn('hello world') ++ except: ++ pass ++ else: ++ raise 'Was expected exception' ++ ++def test_escaping_c_comments(): ++ # Ensure that c comments within RPython code get escaped when we generate ++ # our .c code (to avoid generating bogus C) ++ # See e.g. pypy.module.cpyext.dictobject's PyDict_Next, which has a ++ # docstring embedding a C comment ++ def c_style_comment(a, b): ++ '''Here is a C-style comment within an RPython docstring: ++ /* hello world */ ++ ''' ++ # and here's one in a string literal: ++ return '/* hello world a:%s b:%s */' % (a, b) ++ ++ def cplusplus_style_comment(a, b): ++ '''Here is a C++-style comment within an RPython docstring: ++ // hello world ++ ''' ++ # and here are some in string literals, and one as the floor division ++ # operator: ++ return '// hello world: a // b = %s' % (a // b) ++ ++ for fn_name, exp_output in [('c_style_comment', ++ '/* hello world a:6 b:3 */'), ++ ('cplusplus_style_comment', ++ '// hello world: a // b = 2')]: ++ fn = locals()[fn_name] ++ ++ c_fn, c_src, c_filename_path = get_generated_c_source(fn, [int, int]) ++ # If the above survived, then the C compiler managed to handle ++ # the generated C code ++ ++ # Verify that the generated code works (i.e. that we didn't ++ # accidentally change the meaning): ++ assert c_fn(6, 3) == exp_output ++ ++ # Ensure that at least part of the docstrings made it into the C ++ # code: ++ c_fn_src = extract_c_function(c_src, 'pypy_g_' + fn_name) ++ assert 'Here is a ' in c_fn_src ++ assert 'style comment within an RPython docstring' in c_fn_src ++ +diff -r cd083843b67a pypy/translator/driver.py +--- a/pypy/translator/driver.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/driver.py Wed Jan 05 16:14:35 2011 -0500 +@@ -539,6 +539,7 @@ + dstname = self.compute_exe_name() + '.staticdata.info' + shutil.copy(str(fname), str(dstname)) + self.log.info('Static data info written to %s' % dstname) ++ return c_source_filename + + # + task_source_c = taskdef(task_source_c, ['database_c'], "Generating c source") +diff -r cd083843b67a pypy/translator/gensupp.py +--- a/pypy/translator/gensupp.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/gensupp.py Wed Jan 05 16:14:35 2011 -0500 +@@ -16,8 +16,8 @@ + def visit(block): + if isinstance(block, Block): + # first we order by offset in the code string +- if block.operations: +- ofs = block.operations[0].offset ++ if block.operations and block.operations[0].oploc.codelocs[0]: ++ ofs = block.operations[0].oploc.codelocs[0].offset + else: + ofs = sys.maxint + # then we order by input variable name or value +diff -r cd083843b67a pypy/translator/interactive.py +--- a/pypy/translator/interactive.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/interactive.py Wed Jan 05 16:14:35 2011 -0500 +@@ -138,7 +138,7 @@ + def source_c(self, argtypes=None, **kwds): + self.update_options(argtypes, kwds) + self.ensure_backend('c') +- self.driver.source_c() ++ return self.driver.source_c() + + def source_cl(self, argtypes=None, **kwds): + self.update_options(argtypes, kwds) +diff -r cd083843b67a pypy/translator/llsupport/wrapper.py +--- a/pypy/translator/llsupport/wrapper.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/llsupport/wrapper.py Wed Jan 05 16:14:35 2011 -0500 +@@ -59,6 +59,8 @@ + # "return result" + block = Block(wrapper_inputargs) + wgraph = FunctionGraph('pyfn_' + (newname or func.func_name), block) ++ if hasattr(graph, 'func'): ++ wgraph.func = graph.func + translator.update_call_graph(wgraph, graph, object()) + translator.graphs.append(wgraph) + block.operations[:] = newops +diff -r cd083843b67a pypy/translator/simplify.py +--- a/pypy/translator/simplify.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/simplify.py Wed Jan 05 16:14:35 2011 -0500 +@@ -294,7 +294,7 @@ + return renaming.get(v, v) + def rename_op(op): + args = [rename(a) for a in op.args] +- op = SpaceOperation(op.opname, args, rename(op.result), op.offset) ++ op = SpaceOperation(op.opname, args, rename(op.result), op.oploc) + # special case... + if op.opname == 'indirect_call': + if isinstance(op.args[0], Constant): diff --git a/pypy.spec b/pypy.spec index 96354e2..162ed5f 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.4.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python implementation with a Just-In-Time compiler Group: Development/Languages @@ -136,9 +136,33 @@ Patch2: fix-test_commands-expected-ls-output-issue7108.patch #
https://codespeak.net/issue/pypy-dev/issue614
Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch +# Try to improve the readability of the generated .c code, by adding in the +# RPython source as comments where possible. +# A version of this was sent upstream as: +#
http://codespeak.net/pipermail/pypy-dev/2010q4/006532.html
+# TODO: get this into the upstream bug tracker, and finish inlining +# support (rhbz#666963) +Patch4: pypy-1.4.1-more-readable-c-code.patch + + # Build-time requirements: -BuildRequires: python-devel +# pypy's can be rebuilt using itself, rather than with CPython; doing so +# halves the build time. +# +# Turn it off with this boolean, to revert back to rebuilding using CPython +# and avoid a cycle in the build-time dependency graph: +# +%global use_self_when_building 1 +%if 0%{use_self_when_building} +BuildRequires: pypy +%global bootstrap_python_interp pypy +%else +BuildRequires: python-devel +%global bootstrap_python_interp python +%endif + + # FIXME: I'm seeing errors like this in the logs: # [translation:WARNING] The module '_rawffi' is disabled @@ -215,6 +239,8 @@ sed -i \ -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ pypy/translator/goal/app_main.py +%patch4 -p1 -b .more-readable-c-code + # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -304,6 +330,7 @@ BuildPyPy() { # doesn't interract well with the results of using our standard build flags. # For now, filter our CFLAGS of everything that could be conflicting with # pypy. Need to check these and reenable ones that are okay later. + # Filed as
https://bugzilla.redhat.com/show_bug.cgi?id=666966
export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') # If we're already built the JIT-enabled "pypy", then use it for subsequent @@ -311,7 +338,10 @@ BuildPyPy() { if test -x './pypy' ; then INTERP='./pypy' else - INTERP='python' + # First pypy build within this rpm build? + # Fall back to using the bootstrap python interpreter, which might be a + # system copy of pypy from an earlier rpm, or be cpython's /usr/bin/python: + INTERP='%{bootstrap_python_interp}' fi # Here's where we actually invoke the build: @@ -484,6 +514,34 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages %{buildroot}/%{_bindir}/pypy \ 0 +# Capture the RPython source code files from the build within the debuginfo +# package (rhbz#666975) +%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src +mkdir -p %{buildroot}%{pypy_debuginfo_dir} + +# copy over everything: +cp -a pypy %{buildroot}%{pypy_debuginfo_dir} + +# ...then delete files that aren't .py files: +find \ + %{buildroot}%{pypy_debuginfo_dir} \ + \( -type f \ + -a \ + \! -name "*.py" \ + \) \ + -delete + +# We don't need bytecode for these files; they are being included for reference +# purposes. +# There are some rpmlint warnings from these files: +# non-executable-script +# wrong-script-interpreter +# zero-length +# script-without-shebang +# dangling-symlink +# but given that the objective is to preserve a copy of the source code, those +# are acceptable. + %check topdir=$(pwd) @@ -511,6 +569,7 @@ CheckPyPy() { # Gather a list of tests to skip, due to known failures # TODO: report these failures to pypy upstream + # See also rhbz#666967 and rhbz#666969 TESTS_TO_SKIP="" # Test failures relating to missing codecs @@ -622,6 +681,14 @@ CheckPyPy() { # AssertionError: ValueError not raised SkipTest test_zlib + %if 0%{use_self_when_building} + # Patch 3 prioritizes the installed copy of pypy's libraries over the + # build copy. + # This leads to test failures of test_pep263 and test_tarfile + # For now, suppress these when building using pypy itself: + SkipTest test_pep263 # on-disk encoding issues + SkipTest test_tarfile # permissions issues + %endif # Run the built binary through the selftests: time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP @@ -696,6 +763,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jan 5 2011 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-4 +- rebuild pypy using itself, for speed, with a boolean to break this cycle in +the build-requirement graph (falling back to using "python-devel" aka CPython) +- add work-in-progress patch to try to make generated c more readable +(rhbz#666963) +- capture the RPython source code files from the build within the debuginfo +package (rhbz#666975) + * Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-3 - try to respect the FHS by installing libraries below libdir, rather than datadir; patch app_main.py to look in this installation location first when commit f756cfcb34f7e48db6afaf04f79ca5c576a4b696 Author: David Malcolm <dmalcolm(a)redhat.com> Date: Mon Jan 3 15:06:28 2011 -0500 Initial import of pypy-1.4.1-3 from package review (rhbz#588941) diff --git a/.gitignore b/.gitignore index e69de29..2878978 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pypy-1.4.1-src.tar.bz2 diff --git a/fix-test_commands-expected-ls-output-issue7108.patch b/fix-test_commands-expected-ls-output-issue7108.patch new file mode 100644 index 0000000..becc3e0 --- /dev/null +++ b/fix-test_commands-expected-ls-output-issue7108.patch @@ -0,0 +1,11 @@ +--- test/test_commands.py.orig 2010-12-22 13:25:11.357333216 -0500 ++++ test/test_commands.py 2010-12-22 13:25:57.927166219 -0500 +@@ -47,7 +47,7 @@ class CommandTests(unittest.TestCase): + # Note that the first case above has a space in the group name + # while the second one has a space in both names. + pat = r'''d......... # It is a directory. +- \+? # It may have ACLs. ++ [.+@]? # It may have alt access (SELinux, ACLs or metadata ('@' OS X). + \s+\d+ # It has some number of links. + [^/]* # Skip user, group, size, and date. + /\. # and end with the name of the file. diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch new file mode 100644 index 0000000..257f60f --- /dev/null +++ b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch @@ -0,0 +1,13 @@ +diff --git a/pypy/tool/ansi_print.py b/pypy/tool/ansi_print.py +index 3eff27c..fac4ba2 100644 +--- a/pypy/tool/ansi_print.py ++++ b/pypy/tool/ansi_print.py +@@ -25,7 +25,7 @@ class AnsiLog: + self.kw_to_color = self.KW_TO_COLOR.copy() + self.kw_to_color.update(kw_to_color) + self.file = file +- self.fancy = True ++ self.fancy = False + self.isatty = getattr(sys.stderr, 'isatty', lambda: False) + if self.fancy and self.isatty(): + self.mandelbrot_driver = Driver() diff --git a/pypy-1.4-config.patch b/pypy-1.4-config.patch new file mode 100644 index 0000000..0b82ac8 --- /dev/null +++ b/pypy-1.4-config.patch @@ -0,0 +1,44 @@ +Index: pypy-1.4/pypy/translator/platform/linux.py +=================================================================== +--- pypy-1.4.orig/pypy/translator/platform/linux.py ++++ pypy-1.4/pypy/translator/platform/linux.py +@@ -3,17 +3,22 @@ import py, os + from pypy.translator.platform import _run_subprocess + from pypy.translator.platform.posix import BasePosix + ++CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', ++ '-Wall', '-Wno-unused'] ++if os.environ.get('CFLAGS', None): ++ CFLAGS.extend(os.environ['CFLAGS'].split()) ++CFLAGS = tuple(CFLAGS) ++ + class BaseLinux(BasePosix): + name = "linux" + + link_flags = ('-pthread', '-lrt') +- cflags = ('-O3', '-pthread', '-fomit-frame-pointer', +- '-Wall', '-Wno-unused') ++ cflags = CFLAGS + standalone_only = () + shared_only = ('-fPIC',) + so_ext = 'so' + so_prefixes = ('lib', '') +- ++ + def _args_for_shared(self, args): + return ['-shared'] + args + +@@ -29,9 +34,10 @@ class BaseLinux(BasePosix): + class Linux(BaseLinux): + shared_only = () # it seems that on 32-bit linux, compiling with -fPIC + # gives assembler that asmgcc is not happy about. +- def library_dirs_for_libffi_a(self): +- # places where we need to look for libffi.a +- return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # Fedora Linux, at least, has the shared version but not the static ++ #def library_dirs_for_libffi_a(self): ++ # # places where we need to look for libffi.a ++ # return self.library_dirs_for_libffi() + ['/usr/lib'] + + + class Linux64(BaseLinux): diff --git a/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch new file mode 100644 index 0000000..93bcb69 --- /dev/null +++ b/pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch @@ -0,0 +1,16 @@ +diff -r cd083843b67a pypy/translator/goal/app_main.py +--- a/pypy/translator/goal/app_main.py Mon Dec 20 17:17:45 2010 +0100 ++++ b/pypy/translator/goal/app_main.py Wed Dec 22 17:43:21 2010 -0500 +@@ -191,6 +191,12 @@ + IS_WINDOWS = False + + def get_library_path(executable): ++ # FIXME: get this from translator configuration ++ dirname = LIBRARY_INSTALLATION_PATH ++ newpath = sys.pypy_initial_path(dirname) ++ if newpath: ++ return newpath ++ + search = executable + while 1: + dirname = resolvedirof(search) diff --git a/pypy.spec b/pypy.spec new file mode 100644 index 0000000..96354e2 --- /dev/null +++ b/pypy.spec @@ -0,0 +1,762 @@ +Name: pypy +Version: 1.4.1 +Release: 3%{?dist} +Summary: Python implementation with a Just-In-Time compiler + +Group: Development/Languages +# LGPL and another free license we'd need to ask spot about are present in some +# java jars that we're not building with atm (in fact, we're deleting them +# before building). If we restore those we'll have to work out the new +# licensing terms +License: MIT and Python and UCD +URL:
http://pypy.org/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# High-level configuration of the build: + +# PyPy consists of an implementation of an interpreter (with JIT compilation) +# for the full Python language written in a high-level language, leaving many +# of the implementation details as "pluggable" policies. +# +# The implementation language is then compiled down to .c code, from which we +# obtain a binary. +# +# This allows us to build a near-arbitrary collection of different +# implementations of Python with differing tradeoffs +# +# (As it happens, the implementation language is itself Python, albeit a +# restricted subset "RPython", chosen to making it amenable to being compiled. +# The result implements the full Python language though) + +# We could build many different implementations of Python. +# For now, let's focus on the implementation that appears to be receiving the +# most attention upstream: the JIT-enabled build, with all standard +# optimizations + +# Building a configuration can take significant time: + +# A build of pypy (with jit) on i686 took 77 mins: +# [Timer] Timings: +# [Timer] annotate --- 583.3 s +# [Timer] rtype_lltype --- 760.9 s +# [Timer] pyjitpl_lltype --- 567.3 s +# [Timer] backendopt_lltype --- 375.6 s +# [Timer] stackcheckinsertion_lltype --- 54.1 s +# [Timer] database_c --- 852.2 s +# [Timer] source_c --- 1007.3 s +# [Timer] compile_c --- 419.9 s +# [Timer] =========================================== +# [Timer] Total: --- 4620.5 s +# +# A build of pypy (nojit) on x86_64 took about an hour: +# [Timer] Timings: +# [Timer] annotate --- 537.5 s +# [Timer] rtype_lltype --- 667.3 s +# [Timer] backendopt_lltype --- 385.4 s +# [Timer] stackcheckinsertion_lltype --- 42.5 s +# [Timer] database_c --- 625.3 s +# [Timer] source_c --- 1040.2 s +# [Timer] compile_c --- 273.9 s +# [Timer] =========================================== +# [Timer] Total: --- 3572.0 s +# +# +# A build of pypy-stackless on i686 took about 87 mins: +# [Timer] Timings: +# [Timer] annotate --- 584.2 s +# [Timer] rtype_lltype --- 777.3 s +# [Timer] backendopt_lltype --- 365.9 s +# [Timer] stackcheckinsertion_lltype --- 39.3 s +# [Timer] database_c --- 1089.6 s +# [Timer] source_c --- 1868.6 s +# [Timer] compile_c --- 490.4 s +# [Timer] =========================================== +# [Timer] Total: --- 5215.3 s + + +# Should we build a "pypy" binary? (with jit) +# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the +# following options: +# 'i386', 'x86' +# 'x86-without-sse2': +# 'x86_64' +# 'cli' +# 'llvm' +%ifarch %{ix86} x86_64 +# FIXME: is there a better way of expressing "intel" here? +%global with_jit 1 +%else +%global with_jit 0 +%endif + +# Should we build a "pypy-stackless" binary? +%global with_stackless 0 + + +# Easy way to enable/disable verbose logging: +%global verbose_logs 0 + +%global pypyprefix %{_libdir}/pypy-%{version} +%global pylibver 2.5.2 + +# We refer to this subdir of the source tree in a few places during the build: +%global goal_dir pypy/translator/goal + + +# Turn off the brp-python-bytecompile postprocessing script +# We manually invoke it later on, using the freshly built pypy binary +%global __os_install_post \ + %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') + +# Source and patches: +Source0:
http://pypy.org/download/pypy-%{version}-src.tar.bz2
+ +# Edit a translator file for linux in order to configure our cflags and dynamic libffi +Patch0: pypy-1.4-config.patch + +# By default, if built at a tty, the translation process renders a Mandelbrot +# set to indicate progress. +# This obscures useful messages, and may waste CPU cycles, so suppress it, and +# merely render dots: +Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch + +# test_commmands fails on SELinux systems due to a change in the output +# of "ls" (
http://bugs.python.org/issue7108
) +Patch2: fix-test_commands-expected-ls-output-issue7108.patch + +# When locating the pypy standard libraries, look first within +# LIBRARY_INSTALLATION_PATH. +# We convert this from being a non-existant variable into a string literal +# with the value of "pypyprefix" in the "prep" phase below. +# +# We still use the scanning relative to the binary location when invoking a +# pypy binary during the build (e.g. during "check") +# +# Sent upstream (with caveats) as: +#
https://codespeak.net/issue/pypy-dev/issue614
+Patch3: pypy-1.4.1-add-LIBRARY_INSTALLATION_PATH.patch + +# Build-time requirements: + +BuildRequires: python-devel + +# FIXME: I'm seeing errors like this in the logs: +# [translation:WARNING] The module '_rawffi' is disabled +# [translation:WARNING] because importing pypy.rlib.libffi raised ImportError +# [translation:WARNING] 'libffi.a' not found in ['/usr/lib/libffi', '/usr/lib'] +# Presumably we need to fix things to support dynamically-linked libffi +BuildRequires: libffi-devel + +BuildRequires: zlib-devel +BuildRequires: bzip2-devel +BuildRequires: ncurses-devel +BuildRequires: expat-devel +BuildRequires: openssl-devel +BuildRequires: valgrind-devel + +# Used by the selftests, though not by the build: +BuildRequires: gc-devel + +BuildRequires: /usr/bin/execstack + +# pypy is bundling these so we delete them in %%prep. I don't think they are +# needed unless we build pypy targetted at running on the jvm. +#BuildRequires: jna +#BuildRequires: jasmin # Not yet in Fedora + + +# Metadata for the core package (the JIT build): +Requires: pypy-libs = %{version}-%{release} + +%description +PyPy's implementation of Python, featuring a Just-In-Time compiler, and various +optimized implementations of the standard types (strings, dictionaries, etc) + + +%package libs +Group: Development/Languages +Summary: Run-time libraries used by PyPy implementations of Python +%description libs +Libraries required by the various PyPy implementations of Python. + +%if 0%{with_stackless} +%package stackless +Group: Development/Languages +Summary: Stackless Python interpreter built using PyPy +Requires: pypy-libs = %{version}-%{release} +%description stackless +Build of PyPy with support for micro-threads for massive concurrency +%endif + +%if 0%{with_stackless} +%package stackless +Group: Development/Languages +Summary: Stackless Python interpreter built using PyPy +Requires: pypy-libs = %{version}-%{release} +%description stackless +Build of PyPy with support for micro-threads for massive concurrency +%endif + + +%prep +%setup -q -n pypy-%{version}-src +%patch0 -p1 -b .configure-fedora +%patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build + +pushd lib-python/%{pylibver} +%patch2 -p0 +popd + +# Look for the pypy libraries within LIBRARY_INSTALLATION_PATH first: +%patch3 -p1 +# Fixup LIBRARY_INSTALLATION_PATH to be a string literal containing our value +# for "pypyprefix": +sed -i \ + -e 's|LIBRARY_INSTALLATION_PATH|"%{pypyprefix}"|' \ + pypy/translator/goal/app_main.py + + +# Replace /usr/local/bin/python shebangs with /usr/bin/python: +find -name "*.py" -exec \ + sed \ + -i -e "s|/usr/local/bin/python|/usr/bin/python|" \ + "{}" \ + \; + +find . -name '*.jar' -exec rm \{\} \; + +# Remove stray ".svn" directories present within the 1.4.1 tarball +# (reported as
https://codespeak.net/issue/pypy-dev/issue612
) +find . -path '*/.svn*' -delete + +# Remove DOS batch files: +find -name "*.bat"|xargs rm -f + +# The "demo" directory gets auto-installed by virture of being listed in %doc +# Remove shebang lines from demo .py files, and remove executability from them: +for f in demo/bpnn.py ; do + # Detect shebang lines && remove them: + sed -e '/^#!/Q 0' -e 'Q 1' $f \ + && sed -i '1d' $f + chmod a-x $f +done + +%build + +BuildPyPy() { + ExeName=$1 + Options=$2 + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "STARTING BUILD OF: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + pushd %{goal_dir} + + # The build involves invoking a python script, passing in particular + # arguments, environment variables, etc. + # Some notes on those follow: + + # The generated binary embeds copies of the values of all environment + # variables. We need to unset "RPM_BUILD_ROOT" to avoid a fatal error from + # /usr/lib/rpm/check-buildroot + # during the postprocessing of the rpmbuild, complaining about this + # reference to the buildroot + + + # By default, pypy's autogenerated C code is placed in + # /tmp/usession-N + # + # and it appears that this stops rpm from extracting the source code to the + # debuginfo package + # + # The logic in pypy-1.4/pypy/tool/udir.py indicates that it is generated in: + # $PYPY_USESSION_DIR/usession-$PYPY_USESSION_BASENAME-N + # and so we set PYPY_USESSION_DIR so that this tempdir is within the build + # location, and set $PYPY_USESSION_BASENAME so that the tempdir is unique + # for each invocation of BuildPyPy + + # Compilation flags for C code: + # pypy-1.4/pypy/translator/c/genc.py:gen_makefile + # assembles a Makefile within + # THE_UDIR/testing_1/Makefile + # calling out to platform.gen_makefile + # For us, that's + # pypy-1.4/pypy/translator/platform/linux.py: class BaseLinux(BasePosix): + # which by default has: + # CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer', + # '-Wall', '-Wno-unused'] + # plus all substrings from CFLAGS in the environment. + # This is used to generate a value for CFLAGS that's written into the Makefile + + #
https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
+ # The generated Makefile compiles the .c files into assembler (.s), rather + # than direct to .o It then post-processes this assembler to locate + # garbage-collection roots (building .lbl.s and .gcmap files, and a + # "gcmaptable.s"). (The modified .lbl.s files have extra code injected + # within them). + # Unfortunately, the code to do this: + # pypy-1.4/pypy/translator/c/gcc/trackgcroot.py + # doesn't interract well with the results of using our standard build flags. + # For now, filter our CFLAGS of everything that could be conflicting with + # pypy. Need to check these and reenable ones that are okay later. + export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//') + + # If we're already built the JIT-enabled "pypy", then use it for subsequent + # builds (of other configurations): + if test -x './pypy' ; then + INTERP='./pypy' + else + INTERP='python' + fi + + # Here's where we actually invoke the build: + time \ + RPM_BUILD_ROOT= \ + PYPY_USESSION_DIR=$(pwd) \ + PYPY_USESSION_BASENAME=$ExeName \ + $INTERP translate.py \ +%if 0%{verbose_logs} + --translation-verbose \ +%endif + --cflags="$CFLAGS" \ + --batch \ + --output=$ExeName \ + $Options + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "FINISHED BUILDING: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + popd +} + +%if 0%{with_jit} +BuildPyPy \ + pypy \ + "-Ojit" +%endif + +%if 0%{with_stackless} +BuildPyPy \ + pypy-stackless \ + "--stackless" +%endif + +%install +rm -rf $RPM_BUILD_ROOT + + +# Install the various executables: + +InstallPyPy() { + ExeName=$1 + + install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{_bindir} + + # The generated machine code doesn't need an executable stack, but + # one of the assembler files (gcmaptable.s) doesn't have the necessary + # metadata to inform gcc of that, and thus gcc pessimistically assumes + # that the built binary does need an executable stack. + # + # Reported upstream as:
https://codespeak.net/issue/pypy-dev/issue610
+ # + # I tried various approaches involving fixing the build, but the simplest + # approach is to postprocess the ELF file: + execstack --clear-execstack %{buildroot}/%{_bindir}/$ExeName +} + +mkdir -p %{buildroot}/%{_bindir} + +%if 0%{with_jit} +InstallPyPy pypy +%endif + +%if 0%{with_stackless} +InstallPyPy pypy-stackless +%endif + + +# Install the various support libraries as described at: +#
http://codespeak.net/pypy/dist/pypy/doc/getting-started-python.html#install…
+# which refers to a "PREFIX" found relative to the location of the binary. +# Given that the pypy binaries will be in /usr/bin, PREFIX can be +# "../share/pypy-1.2" relative to that directory, i.e. /usr/share/pypy-1.2 +# +# Running "strace" on a built binary indicates that it searches within +# PREFIX/lib-python/modified-2.5.2 +# not +# PREFIX/lib-python/modified.2.5.2 +# as given on the above page, i.e. it uses '-' not '.' + +mkdir -p %{buildroot}/%{pypyprefix} +cp -a lib-python %{buildroot}/%{pypyprefix} + +cp -a lib_pypy %{buildroot}/%{pypyprefix} + +# Remove a text file that documents which selftests fail on Win32: +rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt + +# Remove shebang lines from .py files that aren't executable, and +# remove executability from .py files that don't have a shebang line: +find \ + %{buildroot} \ + -name "*.py" \ + \( \ + \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ + -print -exec sed -i '1d' {} \; \ + \) \ + -o \ + \( \ + -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ + -exec chmod a-x {} \; \ + \) \ + \) + +mkdir -p %{buildroot}/%{pypyprefix}/site-packages + + +# pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly +# different bytecode format to CPython. It doesn't use .pyo files: the -O flag +# is treated as a "dummy optimization flag for compatibility with C Python" +# +# pypy-1.4/pypy/module/imp/importing.py has this comment: + # XXX picking a magic number is a mess. So far it works because we + # have only two extra opcodes, which bump the magic number by +1 and + # +2 respectively, and CPython leaves a gap of 10 when it increases + # its own magic number. To avoid assigning exactly the same numbers + # as CPython we always add a +2. We'll have to think again when we + # get at the fourth new opcode :-( + # + # * CALL_LIKELY_BUILTIN +1 + # * CALL_METHOD +2 + # + # In other words: + # + # default_magic -- used by CPython without the -U option + # default_magic + 1 -- used by CPython with the -U option + # default_magic + 2 -- used by PyPy without any extra opcode + # ... + # default_magic + 5 -- used by PyPy with both extra opcodes +# + +# pypy-1.4/pypy/interpreter/pycode.py has: +# +# default_magic = (62141+2) | 0x0a0d0000 # this PyPy's magic +# # (62131=CPython 2.5.1) +# giving a value for "default_magic" for PyPy of 0xa0df2bf. +# Note that this corresponds to the "default_magic + 2" from the comment above + +# In my builds: +# $ ./pypy --info | grep objspace.opcodes +# objspace.opcodes.CALL_LIKELY_BUILTIN: False +# objspace.opcodes.CALL_METHOD: True +# so I'd expect the magic number to be: +# 0x0a0df2bf + 2 (the flag for CALL_METHOD) +# giving +# 0x0a0df2c1 +# +# I'm seeing +# c1 f2 0d 0a +# as the first four bytes of the .pyc files, which is consistent with this. + + +# Bytecompile all of the .py files we ship, using our pypy binary, giving us +# .pyc files for pypy. The script actually does the work twice (passing in -O +# the second time) but it's simplest to reuse that script. +# +# The script has special-casing for .py files below +# /usr/lib{64}/python[0-9].[0-9] +# but given that we're installing into a different path, the supplied "default" +# implementation gets used instead. +# +# Note that some of the test files deliberately contain syntax errors, so +# we pass 0 for the second argument ("errors_terminate"): +/usr/lib/rpm/brp-python-bytecompile \ + %{buildroot}/%{_bindir}/pypy \ + 0 + +%check +topdir=$(pwd) + +SkipTest() { + # Append the given test name to TESTS_TO_SKIP + TEST_NAME=$1 + TESTS_TO_SKIP="$TESTS_TO_SKIP $TEST_NAME" +} + +CheckPyPy() { + # We'll be exercising one of the freshly-built binaries using the + # test suite from the standard library (overridden in places by pypy's + # modified version) + ExeName=$1 + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "STARTING TEST OF: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + + pushd %{goal_dir} + + # Gather a list of tests to skip, due to known failures + # TODO: report these failures to pypy upstream + TESTS_TO_SKIP="" + + # Test failures relating to missing codecs + # Hopefully when pypy merges to 2.7 support we'll gain these via a + # refreshed stdlib: + # test_codecencodings_cn: + # all tests fail, with one of + # unknown encoding: gb18030 + # unknown encoding: gb2312 + # unknown encoding: gbk + SkipTest test_codecencodings_cn + + # test_codecencodings_hk: + # all tests fail, with: + # unknown encoding: big5hkscs + SkipTest test_codecencodings_hk + + # test_codecencodings_jp: + # all tests fail, with one of: + # unknown encoding: cp932 + # unknown encoding: euc_jisx0213 + # unknown encoding: euc_jp + # unknown encoding: shift_jis + # unknown encoding: shift_jisx0213 + SkipTest test_codecencodings_jp + + # test_codecencodings_kr: + # all tests fail, with one of: + # unknown encoding: cp949 + # unknown encoding: euc_kr + # unknown encoding: johab + SkipTest test_codecencodings_kr + + # test_codecencodings_tw: + # all tests fail, with: + # unknown encoding: big5 + SkipTest test_codecencodings_tw + + # test_multibytecodec: + # 14 failures out of 15, due to: + # unknown encoding: euc-kr + # unknown encoding: gb2312 + # unknown encoding: jisx0213 + # unknown encoding: cp949 + # unknown encoding: iso2022-jp + # unknown encoding: gb18030 + SkipTest test_multibytecodec + + # + # Other failures: + # + # test_asynchat: + # seems to hang on this test, within test_line_terminator + SkipTest test_asynchat + + # test_compiler: + # 4 errors out of 13: + # testSourceCodeEncodingsError + # testWith + # testWithAss + # testYieldExpr + SkipTest test_compiler + + # test_ctypes: + # failures=17, errors=20, out of 132 tests + SkipTest test_ctypes + + # test_frozen: + # TestFailed: import __hello__ failed:No module named __hello__ + SkipTest test_frozen + + # test_iterlen: + # 24 failures out of 25, apparently all due to TypeError + SkipTest test_iterlen + + # test_parser: + # 12 failures out of 15 + SkipTest test_parser + + # test_platform: + # Koji builds show: + # test test_platform failed -- errors occurred in test.test_platform.PlatformTest + SkipTest test_platform + + # test_socket: + # testSockName can fail in Koji with: + # my_ip_addr = socket.gethostbyname(socket.gethostname()) + # gaierror: (-3, 'Temporary failure in name resolution') + SkipTest test_socket + + # test_sort: + # some failures + SkipTest test_sort + + # test_sqlite: + # 3 of the sqlite3.test.dbapi.ExtensionTests raise: + # ProgrammingError: Incomplete statement '' + SkipTest test_sqlite + + # test_traceback: + # works when run standalone; failures seen when run as part of a suite + SkipTest test_traceback + + # test_zlib: + # failure seen in Koji, not sure of reason why: + # test test_zlib failed -- Traceback (most recent call last): + # File "/builddir/build/BUILD/pypy-1.4.1-src/lib-python/2.5.2/test/test_zlib.py", line 72, in test_baddecompressobj + # self.assertRaises(ValueError, zlib.decompressobj, 0) + # AssertionError: ValueError not raised + SkipTest test_zlib + + + # Run the built binary through the selftests: + time ./$ExeName -m test.regrtest -x $TESTS_TO_SKIP + + popd + + # Doublecheck pypy's own test suite, using the built pypy binary: + + # Disabled for now: + # x86_64 shows various failures inside: + # jit/backend/x86/test + # followed by a segfault inside + # jit/backend/x86/test/test_runner.py + # + # i686 shows various failures inside: + # jit/backend/x86/test + # with the x86_64 failure leading to cancellation of the i686 build + + # Here's the disabled code: + # pushd pypy + # time translator/goal/$ExeName test_all.py + # popd + + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "FINISHED TESTING: $ExeName" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" + echo "--------------------------------------------------------------" +} + +%if 0%{with_jit} +CheckPyPy pypy +%endif + +%if 0%{with_stackless} +CheckPyPy pypy-stackless +%endif + + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files libs +%defattr(-,root,root,-) +%doc LICENSE README demo + +%dir %{pypyprefix} +%dir %{pypyprefix}/lib-python +%{pypyprefix}/lib-python/%{pylibver}/ +%{pypyprefix}/lib-python/modified-%{pylibver}/ +%{pypyprefix}/lib-python/conftest.py* +%{pypyprefix}/lib_pypy/ +%{pypyprefix}/site-packages/ + +%if 0%{with_jit} +%files +%defattr(-,root,root,-) +%doc LICENSE README +%{_bindir}/pypy +%endif + +%if 0%{with_stackless} +%files stackless +%defattr(-,root,root,-) +%doc LICENSE README +%{_bindir}/pypy-stackless +%endif + + +%changelog +* Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-3 +- try to respect the FHS by installing libraries below libdir, rather than +datadir; patch app_main.py to look in this installation location first when +scanning for the pypy library directories. +- clarifications and corrections to the comments in the specfile + +* Wed Dec 22 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-2 +- remove .svn directories +- disable verbose logging +- add a %%check section +- introduce %%goal_dir variable, to avoid repetition +- remove shebang line from demo/bpnn.py, as we're treating this as a +documentation file +- regenerate patch 2 to apply without generating a .orig file + +* Tue Dec 21 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4.1-1 +- 1.4.1; fixup %%setup to reflect change in toplevel directory in upstream +source tarball +- apply SELinux fix to the bundled test_commands.py (patch 2) + +* Wed Dec 15 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.4-4 +- rename the jit build and subpackge to just "pypy", and remove the nojit and +sandbox builds, as upstream now seems to be focussing on the JIT build (with +only stackless called out in the getting-started-python docs); disable +stackless for now +- add a verbose_logs specfile boolean; leave it enabled for now (whilst fixing +build issues) +- add more comments, and update others to reflect 1.2 -> 1.4 changes +- re-enable debuginfo within CFLAGS ("-g") +- add the LICENSE and README to all subpackages +- ensure the built binaries don't have the "I need an executable stack" flag +- remove DOS batch files during %%prep (idlelib.bat) +- remove shebang lines from .py files that aren't executable, and remove +executability from .py files that don't have a shebang line (taken from +our python3.spec) +- bytecompile the .py files into .pyc files in pypy's bytecode format + +* Sun Nov 28 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-3 +- BuildRequire valgrind-devel +- Install pypy library from the new directory +- Disable building with our CFLAGS for now because they are causing a build failure. +- Include site-packages directory + +* Sat Nov 27 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-2 +- Add patch to configure the build to use our CFLAGS and link libffi + dynamically + +* Sat Nov 27 2010 Toshio Kuratomi <toshio(a)fedoraproject.org> - 1.4-1 +- Update to 1.4 +- Drop patch for py2.6 that's in this build +- Switch to building pypy with itself once pypy is built once as recommended by + upstream +- Remove bundled, prebuilt java libraries +- Fix license tag +- Fix source url +- Version pypy-libs Req + +* Tue May 4 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.2-2 +- cherrypick r72073 from upstream SVN in order to fix the build against +python 2.6.5 (patch 2) + +* Wed Apr 28 2010 David Malcolm <dmalcolm(a)redhat.com> - 1.2-1 +- initial packaging + diff --git a/sources b/sources index e69de29..90f34be 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ebbbb156b1eb842e9e65d909ed5f9f6d pypy-1.4.1-src.tar.bz2
1
0
0
0
Architecture specific change in rpms/mold.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/mold.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=4b8087c272d389f…
https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=c2eb4e5e7397c2a…
https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=0a4d019d56ab1e1…
. Change: +ExclusiveArch: x86_64 aarch64 riscv64 +ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 +ExclusiveArch: x86_64 aarch64 riscv64 Thanks. Full change: ============ commit 4b8087c272d389ff6c8299106b8ffed110604d36 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 08:12:01 2022 +0100 Revert "Try enabling %{ix86}" This reverts commit c2eb4e5e7397c2af39ed26afdc74612d3c450aa0. diff --git a/mold.spec b/mold.spec index c4ab880..e17b391 100644 --- a/mold.spec +++ b/mold.spec @@ -21,8 +21,8 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# mold can currently produce native binaries for these architectures only -ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 +# mold can currently produce native binaries for x86, aarch64 and riscv64 only +ExclusiveArch: x86_64 aarch64 riscv64 BuildRequires: cmake %if 0%{?el7} commit f8b2cd122d0fd76bb9acc0dddd69e227c7cccb5b Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 08:11:57 2022 +0100 Revert "Fix failing unit test on i686" This reverts commit 5eeedfa448f6dc9b698d64dfccc3393d386f90eb. diff --git a/0003-Fix-dynamic-unit-test-on-i686.patch b/0003-Fix-dynamic-unit-test-on-i686.patch deleted file mode 100644 index 907f712..0000000 --- a/0003-Fix-dynamic-unit-test-on-i686.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 857d311771606ad332264719588af016e5320ede Mon Sep 17 00:00:00 2001 -Message-Id: <857d311771606ad332264719588af016e5320ede.1645598116.git.github(a)sicherha.de> -From: Christoph Erhardt <github(a)sicherha.de> -Date: Wed, 23 Feb 2022 07:34:21 +0100 -Subject: [PATCH] Fix dynamic unit test on i686 - -Signed-off-by: Christoph Erhardt <github(a)sicherha.de> ---- - test/elf/dynamic.sh | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/test/elf/dynamic.sh b/test/elf/dynamic.sh -index 0ea7ae82..8f9a6628 100755 ---- a/test/elf/dynamic.sh -+++ b/test/elf/dynamic.sh -@@ -30,6 +30,14 @@ EOF - - $CC -B. -o $t/exe -pie $t/b.o - count=$(readelf -W --relocs $t/exe | grep -E 'R_[a-zA-Z0-9_]+_RELATIVE' | wc -l) --readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" -+ -+case "$(uname -m)" in -+i?86) -+ readelf -W --dynamic $t/exe | grep -q "RELCOUNT.*\b$count\b" -+ ;; -+*) -+ readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" -+ ;; -+esac - - echo OK --- -2.35.1 - diff --git a/mold.spec b/mold.spec index 874e8d9..c4ab880 100644 --- a/mold.spec +++ b/mold.spec @@ -21,9 +21,6 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# Fix unit test on i686 -Patch3: 0003-Fix-dynamic-unit-test-on-i686.patch - # mold can currently produce native binaries for these architectures only ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 commit 5eeedfa448f6dc9b698d64dfccc3393d386f90eb Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 07:36:30 2022 +0100 Fix failing unit test on i686 diff --git a/0003-Fix-dynamic-unit-test-on-i686.patch b/0003-Fix-dynamic-unit-test-on-i686.patch new file mode 100644 index 0000000..907f712 --- /dev/null +++ b/0003-Fix-dynamic-unit-test-on-i686.patch @@ -0,0 +1,34 @@ +From 857d311771606ad332264719588af016e5320ede Mon Sep 17 00:00:00 2001 +Message-Id: <857d311771606ad332264719588af016e5320ede.1645598116.git.github(a)sicherha.de> +From: Christoph Erhardt <github(a)sicherha.de> +Date: Wed, 23 Feb 2022 07:34:21 +0100 +Subject: [PATCH] Fix dynamic unit test on i686 + +Signed-off-by: Christoph Erhardt <github(a)sicherha.de> +--- + test/elf/dynamic.sh | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/test/elf/dynamic.sh b/test/elf/dynamic.sh +index 0ea7ae82..8f9a6628 100755 +--- a/test/elf/dynamic.sh ++++ b/test/elf/dynamic.sh +@@ -30,6 +30,14 @@ EOF + + $CC -B. -o $t/exe -pie $t/b.o + count=$(readelf -W --relocs $t/exe | grep -E 'R_[a-zA-Z0-9_]+_RELATIVE' | wc -l) +-readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" ++ ++case "$(uname -m)" in ++i?86) ++ readelf -W --dynamic $t/exe | grep -q "RELCOUNT.*\b$count\b" ++ ;; ++*) ++ readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" ++ ;; ++esac + + echo OK +-- +2.35.1 + diff --git a/mold.spec b/mold.spec index c4ab880..874e8d9 100644 --- a/mold.spec +++ b/mold.spec @@ -21,6 +21,9 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch +# Fix unit test on i686 +Patch3: 0003-Fix-dynamic-unit-test-on-i686.patch + # mold can currently produce native binaries for these architectures only ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 commit c2eb4e5e7397c2af39ed26afdc74612d3c450aa0 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 06:43:57 2022 +0100 Try enabling %{ix86} diff --git a/mold.spec b/mold.spec index e17b391..c4ab880 100644 --- a/mold.spec +++ b/mold.spec @@ -21,8 +21,8 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# mold can currently produce native binaries for x86, aarch64 and riscv64 only -ExclusiveArch: x86_64 aarch64 riscv64 +# mold can currently produce native binaries for these architectures only +ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 BuildRequires: cmake %if 0%{?el7} commit e59637bab87d63f69ca2deddf59308d3bb0f4b7a Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 06:43:19 2022 +0100 Do not parallelise the testsuite execution This hopefully fixes an issue where the aarch64 builder sporadically runs out of resources: ``` Testing lto-dso ... terminate called after throwing an instance of 'std::runtime_error' what(): pthread_create has failed: Resource temporarily unavailable collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped compilation terminated. ``` diff --git a/mold.spec b/mold.spec index 00dc62b..e17b391 100644 --- a/mold.spec +++ b/mold.spec @@ -102,7 +102,7 @@ fi %if 0%{?el8} . /opt/rh/gcc-toolset-10/enable %endif -%make_build %{build_args} test +%make_build -j1 %{build_args} test %files %license LICENSE commit 0a4d019d56ab1e130e35a3c7bca303bef57cdc1d Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Tue Feb 22 22:16:29 2022 +0100 Bump version to 1.1 diff --git a/.gitignore b/.gitignore index 306fe31..bb526e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /mold-1.0.2.tar.gz +/mold-1.1.tar.gz diff --git a/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch b/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch deleted file mode 100644 index be1412e..0000000 --- a/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 03ba8f93255055adaf69984c17bcfea3b22340db Mon Sep 17 00:00:00 2001 -Message-Id: <03ba8f93255055adaf69984c17bcfea3b22340db.1642970958.git.github(a)sicherha.de> -From: Christoph Erhardt <github(a)sicherha.de> -Date: Sun, 23 Jan 2022 21:42:21 +0100 -Subject: [PATCH] Fix out-of-bounds error on aarch64 with `_GLIBCXX_ASSERTIONS` - enabled - -While an iterator may point beyond the last element of a `std::span`, a -pointer may not. - -Fixes #298. - -Signed-off-by: Christoph Erhardt <github(a)sicherha.de> ---- - elf/arch-arm64.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/elf/arch-arm64.cc b/elf/arch-arm64.cc -index aba86330..c608ae49 100644 ---- a/elf/arch-arm64.cc -+++ b/elf/arch-arm64.cc -@@ -574,7 +574,7 @@ static void create_thunks(Context<E> &ctx, OutputSection<E> &osec) { - thunk.offset = offset; - - // Scan relocations between B and C to collect symbols that need thunks. -- tbb::parallel_for_each(&members[b], &members[c], [&](InputSection<E> *isec) { -+ tbb::parallel_for_each(members.begin() + b, members.begin() + c, [&](InputSection<E> *isec) { - std::span<ElfRel<E>> rels = isec->get_rels(ctx); - isec->range_extn.resize(rels.size()); - -@@ -619,7 +619,7 @@ static void create_thunks(Context<E> &ctx, OutputSection<E> &osec) { - } - - // Scan relocations again to fix symbol offsets in the last thunk. -- tbb::parallel_for_each(&members[b], &members[c], [&](InputSection<E> *isec) { -+ tbb::parallel_for_each(members.begin() + b, members.begin() + c, [&](InputSection<E> *isec) { - std::span<ElfRel<E>> rels = isec->get_rels(ctx); - - for (i64 i = 0; i < rels.size(); i++) { --- -2.34.1 - diff --git a/0001-Skip-reloc-rodata-test-on-aarch64.patch b/0001-Skip-reloc-rodata-test-on-aarch64.patch new file mode 100644 index 0000000..f0380ba --- /dev/null +++ b/0001-Skip-reloc-rodata-test-on-aarch64.patch @@ -0,0 +1,30 @@ +From e9e051f50f5c4e324bc37b9a67996ca2df1530f5 Mon Sep 17 00:00:00 2001 +Message-Id: <e9e051f50f5c4e324bc37b9a67996ca2df1530f5.1645476282.git.github(a)sicherha.de> +From: Christoph Erhardt <github(a)sicherha.de> +Date: Mon, 21 Feb 2022 21:44:34 +0100 +Subject: [PATCH] Skip reloc-rodata test on aarch64 + +The test expects an error when an object compiled with `-fno-PIC` is +linked with `-pie`, but that doesn't happen on aarch64. + +Signed-off-by: Christoph Erhardt <github(a)sicherha.de> +--- + test/elf/reloc-rodata.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/elf/reloc-rodata.sh b/test/elf/reloc-rodata.sh +index 2eeb237c..b9cf8161 100755 +--- a/test/elf/reloc-rodata.sh ++++ b/test/elf/reloc-rodata.sh +@@ -10,6 +10,8 @@ mold="$(pwd)/mold" + t=out/test/elf/$testname + mkdir -p $t + ++[ "$(uname -m)" = aarch64 ] && { echo skipped; exit; } ++ + cat <<EOF | $CC -fno-PIC -c -o $t/a.o -xc - + #include <stdio.h> + +-- +2.35.1 + diff --git a/0002-Fix-compatibility-with-libstdc-9.patch b/0002-Fix-compatibility-with-libstdc-9.patch new file mode 100644 index 0000000..90e547a --- /dev/null +++ b/0002-Fix-compatibility-with-libstdc-9.patch @@ -0,0 +1,38 @@ +From 705cbd8cbbfed2ee4416c0567217f7ef42ced443 Mon Sep 17 00:00:00 2001 +Message-Id: <705cbd8cbbfed2ee4416c0567217f7ef42ced443.1645562924.git.github(a)sicherha.de> +From: Christoph Erhardt <github(a)sicherha.de> +Date: Tue, 22 Feb 2022 21:21:18 +0100 +Subject: [PATCH] Fix compatibility with libstdc++ < 9 + +mimalloc does not override the `nothrow` variants of the `delete` +operator because it assumes that their implementation in libstdc++ +redirects to the default `delete` operators. This is not the case for +libstdc++ < 9, where `std::free()` is called directly. + +Upstream bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
+ +This patch ensures that the `nothrow` `delete` operators are overridden +as well. +--- + main.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/main.cc b/main.cc +index b390b0f7..2aea03a0 100644 +--- a/main.cc ++++ b/main.cc +@@ -6,6 +6,11 @@ + + #ifdef USE_SYSTEM_MIMALLOC + #include <mimalloc-new-delete.h> ++ ++// Additionally override the nothrow delete operators for compatibility with ++// buggy libstdc++ < 9 ++void operator delete(void* p, const std::nothrow_t&) noexcept { mi_free(p); } ++void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_free(p); } + #endif + + namespace mold { +-- +2.35.1 + diff --git a/bundled_lib_system_flags.patch b/bundled_lib_system_flags.patch deleted file mode 100644 index e5704e0..0000000 --- a/bundled_lib_system_flags.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 06537164083e0af844224651bf7e7c7340a47675 Mon Sep 17 00:00:00 2001 -Message-Id: <06537164083e0af844224651bf7e7c7340a47675.1642950243.git.github(a)sicherha.de> -From: Christoph Erhardt <github(a)sicherha.de> -Date: Sun, 23 Jan 2022 14:28:45 +0100 -Subject: [PATCH] Pass `CXXFLAGS` to bundled tbb - -This makes work easier for distributions that specify custom hardened -compiler flags. - -Signed-off-by: Christoph Erhardt <github(a)sicherha.de> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index e2d7cd97..913ac97a 100644 ---- a/Makefile -+++ b/Makefile -@@ -147,7 +147,7 @@ $(MIMALLOC_LIB): - - $(TBB_LIB): - mkdir -p out/tbb -- (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS=-D__TBB_DYNAMIC_LOAD_ENABLED=0 -DTBB_STRICT=OFF ../../third-party/tbb) -+ (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -D__TBB_DYNAMIC_LOAD_ENABLED=0" -DTBB_STRICT=OFF ../../third-party/tbb) - $(MAKE) -C out/tbb tbb - (cd out/tbb; ln -sf *_relwithdebinfo libs) - --- -2.34.1 - diff --git a/mold.spec b/mold.spec index e97731b..00dc62b 100644 --- a/mold.spec +++ b/mold.spec @@ -1,6 +1,6 @@ Name: mold -Version: 1.0.2 -Release: 2%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: A Modern Linker License: AGPLv3+ @@ -14,16 +14,15 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # in the Fedora tbb package) Patch0: tbb-strip-werror.patch -# Pass the system's CXXFLAGS and CFLAGS to the bundled libraries to ensure they -# are built with all the Fedora hardening flags and with PIE (otherwise the -# linker errors linking non-PIE code with PIE code). -Patch1: bundled_lib_system_flags.patch +# Skip failing test on aarch64 +Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch -# Fix for failed assertion on aarch64 -Patch2: 0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch +# Fix mimalloc compatibility with libstdc++ < 9: +#
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
+Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# mold can currently produce native binaries for x86 and aarch64 only -ExclusiveArch: x86_64 aarch64 +# mold can currently produce native binaries for x86, aarch64 and riscv64 only +ExclusiveArch: x86_64 aarch64 riscv64 BuildRequires: cmake %if 0%{?el7} @@ -59,7 +58,7 @@ Requires(preun): %{_sbindir}/alternatives #
https://bugzilla.redhat.com/show_bug.cgi?id=2036372
Provides: bundled(tbb) = 2021.3 -%define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 SYSTEM_XXHASH=1 +%define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 %description mold is a faster drop-in replacement for existing Unix linkers. @@ -118,6 +117,11 @@ fi %{_mandir}/man1/mold.1* %changelog +* Mon Feb 21 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.1-1 +- Bump version to 1.1 +- Drop upstreamed patches +- Update description + * Thu Feb 17 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.0.2-2 - Rebuild due to mimalloc soname change diff --git a/sources b/sources index 59c74a6..1be872a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mold-1.0.2.tar.gz) = 27f6664e63c76c32a6e3ec8bfc4b204138926001f5431be94da9ce47a5d9d3b51aa634c5cd6df45be660d52ac0507f7b7eec17134e35db402db5747d2ecc3715 +SHA512 (mold-1.1.tar.gz) = b8b125c77563abe2741c2f32d73ab2b12dff275b92b633fcd015336c6ea735e38e95c3d2afb50e5baace2023d4f9de3eb50d53053eabc2cd2f045110eef4cc1e commit caac06b970116f61dcf5de3f156a8b3cfdfb7697 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Tue Feb 22 22:15:29 2022 +0100 Update description diff --git a/mold.spec b/mold.spec index bc907ab..e97731b 100644 --- a/mold.spec +++ b/mold.spec @@ -62,10 +62,10 @@ Provides: bundled(tbb) = 2021.3 %define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 SYSTEM_XXHASH=1 %description -mold is a multi-threaded, high-performance linker that is several times faster -than the industry-standard ones, namely, GNU ld, GNU gold or LLVM lld. It is -developed as a drop-in replacement for these linkers and command-line compatible -with them with a few exceptions. +mold is a faster drop-in replacement for existing Unix linkers. +It is several times faster than the LLVM lld linker. +mold is designed to increase developer productivity by reducing +build time, especially in rapid debug-edit-rebuild cycles. %prep %autosetup -p1 commit 9302df38eb7e845126ec7e7882c361bc160741d1 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Tue Feb 22 22:15:11 2022 +0100 Don't explicitly require gcc on epel It's already covered by devtoolset-10-toolchain / gcc-toolset-10-toolchain. diff --git a/mold.spec b/mold.spec index cb4e4ce..bc907ab 100644 --- a/mold.spec +++ b/mold.spec @@ -26,7 +26,6 @@ Patch2: 0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch ExclusiveArch: x86_64 aarch64 BuildRequires: cmake -BuildRequires: gcc %if 0%{?el7} BuildRequires: devtoolset-10-toolchain %endif @@ -34,6 +33,7 @@ BuildRequires: devtoolset-10-toolchain BuildRequires: gcc-toolset-10-toolchain %endif %if 0%{!?el7} && 0%{!?el8} +BuildRequires: gcc BuildRequires: gcc-c++ >= 10 %endif BuildRequires: mimalloc-devel commit b4b2364218fb413dd00e06b4a1a43db2b602490d Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Thu Feb 17 08:07:20 2022 +0100 Rebuild due to mimalloc soname change diff --git a/mold.spec b/mold.spec index e56c342..cb4e4ce 100644 --- a/mold.spec +++ b/mold.spec @@ -1,6 +1,6 @@ Name: mold Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Modern Linker License: AGPLv3+ @@ -118,6 +118,9 @@ fi %{_mandir}/man1/mold.1* %changelog +* Thu Feb 17 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.0.2-2 +- Rebuild due to mimalloc soname change + * Sun Jan 23 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.0.2-1 - Bump version to 1.0.2.
1
0
0
0
Architecture specific change in rpms/golang-github-onsi-gomega.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/golang-github-onsi-gomega.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/golang-github-onsi-gomega.git/commi…
. Change: +%ifarch x86_64 Thanks. Full change: ============ commit 7aebe3cc16bb4395f2885be5027270dae52f4fa1 Author: Robert-André Mauchin <zebob.m(a)gmail.com> Date: Wed Feb 23 20:01:04 2022 +0100 Fix FTBFS Close: rhbz#2045596 diff --git a/glide.lock b/glide.lock deleted file mode 100644 index 8c8e9db..0000000 --- a/glide.lock +++ /dev/null @@ -1,8 +0,0 @@ -hash: 19096dd6a744a7e5b1fe5109ec77b9af9389d5ba5679676f5705b35e0f0a504d -imports: -- name:
github.com/golang/protobuf
- subpackages: - - proto - version: 9c8fb7a95075eb047ab75e702de52f68ff360f17 -updated: '2018-06-20T11:39:50.634587+00:00' - diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index c614edc..0000000 --- a/glide.yaml +++ /dev/null @@ -1,7 +0,0 @@ -import: -- package:
github.com/golang/protobuf
- subpackages: - - proto - version: 9c8fb7a95075eb047ab75e702de52f68ff360f17 -package:
github.com/onsi/gomega
- diff --git a/golang-github-onsi-gomega.spec b/golang-github-onsi-gomega.spec index bd9e457..c7f5cce 100644 --- a/golang-github-onsi-gomega.spec +++ b/golang-github-onsi-gomega.spec @@ -1,5 +1,8 @@ # Generated by go2rpm +# Rounding errors +%ifarch x86_64 %bcond_without check +%endif #
https://github.com/onsi/gomega
%global goipath
github.com/onsi/gomega
@@ -13,8 +16,6 @@ Ginkgo's preferred matcher library.} %global golicenses LICENSE %global godocs CHANGELOG.md CONTRIBUTING.md README.md RELEASING.md -%global gosupfiles glide.lock glide.yaml - Name: %{goname} Release: %autorelease Summary: Ginkgo's preferred matcher library @@ -22,8 +23,6 @@ Summary: Ginkgo's preferred matcher library License: MIT URL: %{gourl} Source0: %{gosource} -Source1: glide.yaml -Source2: glide.lock BuildRequires:
golang(github.com/golang/protobuf/proto)
BuildRequires:
golang(golang.org/x/net/html/charset)
@@ -38,13 +37,13 @@ BuildRequires: golang(gopkg.in/yaml.v2) %prep %goprep -cp %{S:1} %{S:2} . - %install %gopkginstall %if %{with check} %check +# Need Internet access et Go modules +rm -rfv gexec/build_test.go %gocheck %endif commit 42a04d4f0b0c91830924065b81eba151c29bbcdd Author: Robert-André Mauchin <zebob.m(a)gmail.com> Date: Wed Feb 23 19:35:20 2022 +0100 Convert to rpmautospec diff --git a/changelog b/changelog new file mode 100644 index 0000000..4b7e479 --- /dev/null +++ b/changelog @@ -0,0 +1,96 @@ +* Thu Jan 20 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.16.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+ +* Thu Aug 26 2021 Fabian Affolter <mail(a)fabian-affolter.ch> - 1.16.0-1 +- Update to latest upstream release 1.16.0 (closes rhbz#1923878) + +* Thu Jul 22 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.10.4-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+ +* Tue Jan 26 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.10.4-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+ +* Sun Jan 3 22:50:04 CET 2021 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.10.4-1 +- Update to 1.10.4 +- Close: rhbz#1876049 + +* Thu Jul 30 15:27:51 CEST 2020 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.10.1-1 +- Update to 1.10.1 + +* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ +* Wed Jan 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.0-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+ +* Thu Jul 25 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+ +* Mon Apr 22 23:56:31 CEST 2019 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.5.0-1 +- Release 1.5.0 + +* Fri Mar 08 2019 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.4.3-1 +- Release 1.4.3 + +* Fri Feb 01 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.9.git2152b45 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+ +* Tue Oct 23 2018 Nicolas Mailhot <nim(a)fedoraproject.org> - 1.0-0.8.git2152b45 +- redhat-rpm-config-123 triggers bugs in gosetup, remove it from Go spec files as it’s just an alias +-
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org…
+ +* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.7.git2152b45 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+ +* Wed Jun 20 2018 Jan Chaloupka <jchaloup(a)redhat.com> - 1.0-0.6.git2152b45 +- Upload glide files + +* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.5.git2152b45 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+ +* Wed Aug 02 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.4.git2152b45 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+ +* Wed Jul 26 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.3.git2152b45 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+ +* Fri Feb 10 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.2.git2152b45 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+ +* Fri Jan 06 2017 Jan Chaloupka <jchaloup(a)redhat.com> - 1.0-0.1.git2152b45 +- Bump to upstream 2152b45fa28a361beba9aab0885972323a444e28 + related: #1248013 + +* Tue Aug 09 2016 jchaloup <jchaloup(a)redhat.com> - 0-0.9.git8adf9e1 +- Polish spec file, enable devel and unit-test for epel7 + related: #1248013 + +* Thu Jul 21 2016 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0-0.8.git8adf9e1 +-
https://fedoraproject.org/wiki/Changes/golang1.7
+ +* Mon Feb 22 2016 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0-0.7.git8adf9e1 +-
https://fedoraproject.org/wiki/Changes/golang1.6
+ +* Wed Feb 03 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.6.git8adf9e1 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+ +* Mon Aug 17 2015 jchaloup <jchaloup(a)redhat.com> - 0-0.5.git8adf9e1 +- internal packages are no longer provided + related: #1248013 + +* Wed Jul 29 2015 Fridolin Pokorny <fpokorny(a)redhat.com> - 0-0.1.git8adf9e1 +- Update of spec file to spec-2.0 + resolves: #1248013 + +* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0-0.4.git8adf9e1 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+ +* Fri Feb 06 2015 jchaloup <jchaloup(a)redhat.com> - 0-0.3.git8adf9e1 +- Bump to upstream 8adf9e1730c55cdc590de7d49766cb2acc88d8f2 + related: #1148452 + +* Mon Oct 13 2014 jchaloup <jchaloup(a)redhat.com> - 0-0.2.gita0ee4df +- BuildArch to ExclusiveArch + +* Wed Oct 01 2014 root - 0-0.1.git90d6a47 +- First package for Fedora diff --git a/golang-github-onsi-gomega.spec b/golang-github-onsi-gomega.spec index beb4bba..bd9e457 100644 --- a/golang-github-onsi-gomega.spec +++ b/golang-github-onsi-gomega.spec @@ -16,7 +16,7 @@ Ginkgo's preferred matcher library.} %global gosupfiles glide.lock glide.yaml Name: %{goname} -Release: 2%{?dist} +Release: %autorelease Summary: Ginkgo's preferred matcher library License: MIT @@ -51,100 +51,4 @@ cp %{S:1} %{S:2} . %gopkgfiles %changelog -* Thu Jan 20 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.16.0-2 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
- -* Thu Aug 26 2021 Fabian Affolter <mail(a)fabian-affolter.ch> - 1.16.0-1 -- Update to latest upstream release 1.16.0 (closes rhbz#1923878) - -* Thu Jul 22 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.10.4-3 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
- -* Tue Jan 26 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.10.4-2 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
- -* Sun Jan 3 22:50:04 CET 2021 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.10.4-1 -- Update to 1.10.4 -- Close: rhbz#1876049 - -* Thu Jul 30 15:27:51 CEST 2020 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.10.1-1 -- Update to 1.10.1 - -* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.0-4 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- -* Wed Jan 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.0-3 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
- -* Thu Jul 25 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.0-2 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
- -* Mon Apr 22 23:56:31 CEST 2019 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.5.0-1 -- Release 1.5.0 - -* Fri Mar 08 2019 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.4.3-1 -- Release 1.4.3 - -* Fri Feb 01 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.9.git2152b45 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
- -* Tue Oct 23 2018 Nicolas Mailhot <nim(a)fedoraproject.org> - 1.0-0.8.git2152b45 -- redhat-rpm-config-123 triggers bugs in gosetup, remove it from Go spec files as it’s just an alias --
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org…
- -* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.7.git2152b45 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
- -* Wed Jun 20 2018 Jan Chaloupka <jchaloup(a)redhat.com> - 1.0-0.6.git2152b45 -- Upload glide files - -* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.5.git2152b45 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
- -* Wed Aug 02 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.4.git2152b45 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
- -* Wed Jul 26 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.3.git2152b45 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
- -* Fri Feb 10 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0-0.2.git2152b45 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
- -* Fri Jan 06 2017 Jan Chaloupka <jchaloup(a)redhat.com> - 1.0-0.1.git2152b45 -- Bump to upstream 2152b45fa28a361beba9aab0885972323a444e28 - related: #1248013 - -* Tue Aug 09 2016 jchaloup <jchaloup(a)redhat.com> - 0-0.9.git8adf9e1 -- Polish spec file, enable devel and unit-test for epel7 - related: #1248013 - -* Thu Jul 21 2016 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0-0.8.git8adf9e1 --
https://fedoraproject.org/wiki/Changes/golang1.7
- -* Mon Feb 22 2016 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0-0.7.git8adf9e1 --
https://fedoraproject.org/wiki/Changes/golang1.6
- -* Wed Feb 03 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.6.git8adf9e1 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
- -* Mon Aug 17 2015 jchaloup <jchaloup(a)redhat.com> - 0-0.5.git8adf9e1 -- internal packages are no longer provided - related: #1248013 - -* Wed Jul 29 2015 Fridolin Pokorny <fpokorny(a)redhat.com> - 0-0.1.git8adf9e1 -- Update of spec file to spec-2.0 - resolves: #1248013 - -* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0-0.4.git8adf9e1 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
- -* Fri Feb 06 2015 jchaloup <jchaloup(a)redhat.com> - 0-0.3.git8adf9e1 -- Bump to upstream 8adf9e1730c55cdc590de7d49766cb2acc88d8f2 - related: #1148452 - -* Mon Oct 13 2014 jchaloup <jchaloup(a)redhat.com> - 0-0.2.gita0ee4df -- BuildArch to ExclusiveArch - -* Wed Oct 01 2014 root - 0-0.1.git90d6a47 -- First package for Fedora - +%autochangelog
1
0
0
0
Architecture specific change in rpms/mold.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/mold.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=4b8087c272d389f…
https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=c2eb4e5e7397c2a…
https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=0a4d019d56ab1e1…
. Change: +ExclusiveArch: x86_64 aarch64 riscv64 +ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 +ExclusiveArch: x86_64 aarch64 riscv64 Thanks. Full change: ============ commit 4b8087c272d389ff6c8299106b8ffed110604d36 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 08:12:01 2022 +0100 Revert "Try enabling %{ix86}" This reverts commit c2eb4e5e7397c2af39ed26afdc74612d3c450aa0. diff --git a/mold.spec b/mold.spec index c4ab880..e17b391 100644 --- a/mold.spec +++ b/mold.spec @@ -21,8 +21,8 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# mold can currently produce native binaries for these architectures only -ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 +# mold can currently produce native binaries for x86, aarch64 and riscv64 only +ExclusiveArch: x86_64 aarch64 riscv64 BuildRequires: cmake %if 0%{?el7} commit f8b2cd122d0fd76bb9acc0dddd69e227c7cccb5b Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 08:11:57 2022 +0100 Revert "Fix failing unit test on i686" This reverts commit 5eeedfa448f6dc9b698d64dfccc3393d386f90eb. diff --git a/0003-Fix-dynamic-unit-test-on-i686.patch b/0003-Fix-dynamic-unit-test-on-i686.patch deleted file mode 100644 index 907f712..0000000 --- a/0003-Fix-dynamic-unit-test-on-i686.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 857d311771606ad332264719588af016e5320ede Mon Sep 17 00:00:00 2001 -Message-Id: <857d311771606ad332264719588af016e5320ede.1645598116.git.github(a)sicherha.de> -From: Christoph Erhardt <github(a)sicherha.de> -Date: Wed, 23 Feb 2022 07:34:21 +0100 -Subject: [PATCH] Fix dynamic unit test on i686 - -Signed-off-by: Christoph Erhardt <github(a)sicherha.de> ---- - test/elf/dynamic.sh | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/test/elf/dynamic.sh b/test/elf/dynamic.sh -index 0ea7ae82..8f9a6628 100755 ---- a/test/elf/dynamic.sh -+++ b/test/elf/dynamic.sh -@@ -30,6 +30,14 @@ EOF - - $CC -B. -o $t/exe -pie $t/b.o - count=$(readelf -W --relocs $t/exe | grep -E 'R_[a-zA-Z0-9_]+_RELATIVE' | wc -l) --readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" -+ -+case "$(uname -m)" in -+i?86) -+ readelf -W --dynamic $t/exe | grep -q "RELCOUNT.*\b$count\b" -+ ;; -+*) -+ readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" -+ ;; -+esac - - echo OK --- -2.35.1 - diff --git a/mold.spec b/mold.spec index 874e8d9..c4ab880 100644 --- a/mold.spec +++ b/mold.spec @@ -21,9 +21,6 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# Fix unit test on i686 -Patch3: 0003-Fix-dynamic-unit-test-on-i686.patch - # mold can currently produce native binaries for these architectures only ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 commit 5eeedfa448f6dc9b698d64dfccc3393d386f90eb Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 07:36:30 2022 +0100 Fix failing unit test on i686 diff --git a/0003-Fix-dynamic-unit-test-on-i686.patch b/0003-Fix-dynamic-unit-test-on-i686.patch new file mode 100644 index 0000000..907f712 --- /dev/null +++ b/0003-Fix-dynamic-unit-test-on-i686.patch @@ -0,0 +1,34 @@ +From 857d311771606ad332264719588af016e5320ede Mon Sep 17 00:00:00 2001 +Message-Id: <857d311771606ad332264719588af016e5320ede.1645598116.git.github(a)sicherha.de> +From: Christoph Erhardt <github(a)sicherha.de> +Date: Wed, 23 Feb 2022 07:34:21 +0100 +Subject: [PATCH] Fix dynamic unit test on i686 + +Signed-off-by: Christoph Erhardt <github(a)sicherha.de> +--- + test/elf/dynamic.sh | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/test/elf/dynamic.sh b/test/elf/dynamic.sh +index 0ea7ae82..8f9a6628 100755 +--- a/test/elf/dynamic.sh ++++ b/test/elf/dynamic.sh +@@ -30,6 +30,14 @@ EOF + + $CC -B. -o $t/exe -pie $t/b.o + count=$(readelf -W --relocs $t/exe | grep -E 'R_[a-zA-Z0-9_]+_RELATIVE' | wc -l) +-readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" ++ ++case "$(uname -m)" in ++i?86) ++ readelf -W --dynamic $t/exe | grep -q "RELCOUNT.*\b$count\b" ++ ;; ++*) ++ readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" ++ ;; ++esac + + echo OK +-- +2.35.1 + diff --git a/mold.spec b/mold.spec index c4ab880..874e8d9 100644 --- a/mold.spec +++ b/mold.spec @@ -21,6 +21,9 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch +# Fix unit test on i686 +Patch3: 0003-Fix-dynamic-unit-test-on-i686.patch + # mold can currently produce native binaries for these architectures only ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 commit c2eb4e5e7397c2af39ed26afdc74612d3c450aa0 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 06:43:57 2022 +0100 Try enabling %{ix86} diff --git a/mold.spec b/mold.spec index e17b391..c4ab880 100644 --- a/mold.spec +++ b/mold.spec @@ -21,8 +21,8 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch #
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# mold can currently produce native binaries for x86, aarch64 and riscv64 only -ExclusiveArch: x86_64 aarch64 riscv64 +# mold can currently produce native binaries for these architectures only +ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 BuildRequires: cmake %if 0%{?el7} commit e59637bab87d63f69ca2deddf59308d3bb0f4b7a Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Wed Feb 23 06:43:19 2022 +0100 Do not parallelise the testsuite execution This hopefully fixes an issue where the aarch64 builder sporadically runs out of resources: ``` Testing lto-dso ... terminate called after throwing an instance of 'std::runtime_error' what(): pthread_create has failed: Resource temporarily unavailable collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped compilation terminated. ``` diff --git a/mold.spec b/mold.spec index 00dc62b..e17b391 100644 --- a/mold.spec +++ b/mold.spec @@ -102,7 +102,7 @@ fi %if 0%{?el8} . /opt/rh/gcc-toolset-10/enable %endif -%make_build %{build_args} test +%make_build -j1 %{build_args} test %files %license LICENSE commit 0a4d019d56ab1e130e35a3c7bca303bef57cdc1d Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Tue Feb 22 22:16:29 2022 +0100 Bump version to 1.1 diff --git a/.gitignore b/.gitignore index 306fe31..bb526e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /mold-1.0.2.tar.gz +/mold-1.1.tar.gz diff --git a/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch b/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch deleted file mode 100644 index be1412e..0000000 --- a/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 03ba8f93255055adaf69984c17bcfea3b22340db Mon Sep 17 00:00:00 2001 -Message-Id: <03ba8f93255055adaf69984c17bcfea3b22340db.1642970958.git.github(a)sicherha.de> -From: Christoph Erhardt <github(a)sicherha.de> -Date: Sun, 23 Jan 2022 21:42:21 +0100 -Subject: [PATCH] Fix out-of-bounds error on aarch64 with `_GLIBCXX_ASSERTIONS` - enabled - -While an iterator may point beyond the last element of a `std::span`, a -pointer may not. - -Fixes #298. - -Signed-off-by: Christoph Erhardt <github(a)sicherha.de> ---- - elf/arch-arm64.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/elf/arch-arm64.cc b/elf/arch-arm64.cc -index aba86330..c608ae49 100644 ---- a/elf/arch-arm64.cc -+++ b/elf/arch-arm64.cc -@@ -574,7 +574,7 @@ static void create_thunks(Context<E> &ctx, OutputSection<E> &osec) { - thunk.offset = offset; - - // Scan relocations between B and C to collect symbols that need thunks. -- tbb::parallel_for_each(&members[b], &members[c], [&](InputSection<E> *isec) { -+ tbb::parallel_for_each(members.begin() + b, members.begin() + c, [&](InputSection<E> *isec) { - std::span<ElfRel<E>> rels = isec->get_rels(ctx); - isec->range_extn.resize(rels.size()); - -@@ -619,7 +619,7 @@ static void create_thunks(Context<E> &ctx, OutputSection<E> &osec) { - } - - // Scan relocations again to fix symbol offsets in the last thunk. -- tbb::parallel_for_each(&members[b], &members[c], [&](InputSection<E> *isec) { -+ tbb::parallel_for_each(members.begin() + b, members.begin() + c, [&](InputSection<E> *isec) { - std::span<ElfRel<E>> rels = isec->get_rels(ctx); - - for (i64 i = 0; i < rels.size(); i++) { --- -2.34.1 - diff --git a/0001-Skip-reloc-rodata-test-on-aarch64.patch b/0001-Skip-reloc-rodata-test-on-aarch64.patch new file mode 100644 index 0000000..f0380ba --- /dev/null +++ b/0001-Skip-reloc-rodata-test-on-aarch64.patch @@ -0,0 +1,30 @@ +From e9e051f50f5c4e324bc37b9a67996ca2df1530f5 Mon Sep 17 00:00:00 2001 +Message-Id: <e9e051f50f5c4e324bc37b9a67996ca2df1530f5.1645476282.git.github(a)sicherha.de> +From: Christoph Erhardt <github(a)sicherha.de> +Date: Mon, 21 Feb 2022 21:44:34 +0100 +Subject: [PATCH] Skip reloc-rodata test on aarch64 + +The test expects an error when an object compiled with `-fno-PIC` is +linked with `-pie`, but that doesn't happen on aarch64. + +Signed-off-by: Christoph Erhardt <github(a)sicherha.de> +--- + test/elf/reloc-rodata.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/elf/reloc-rodata.sh b/test/elf/reloc-rodata.sh +index 2eeb237c..b9cf8161 100755 +--- a/test/elf/reloc-rodata.sh ++++ b/test/elf/reloc-rodata.sh +@@ -10,6 +10,8 @@ mold="$(pwd)/mold" + t=out/test/elf/$testname + mkdir -p $t + ++[ "$(uname -m)" = aarch64 ] && { echo skipped; exit; } ++ + cat <<EOF | $CC -fno-PIC -c -o $t/a.o -xc - + #include <stdio.h> + +-- +2.35.1 + diff --git a/0002-Fix-compatibility-with-libstdc-9.patch b/0002-Fix-compatibility-with-libstdc-9.patch new file mode 100644 index 0000000..90e547a --- /dev/null +++ b/0002-Fix-compatibility-with-libstdc-9.patch @@ -0,0 +1,38 @@ +From 705cbd8cbbfed2ee4416c0567217f7ef42ced443 Mon Sep 17 00:00:00 2001 +Message-Id: <705cbd8cbbfed2ee4416c0567217f7ef42ced443.1645562924.git.github(a)sicherha.de> +From: Christoph Erhardt <github(a)sicherha.de> +Date: Tue, 22 Feb 2022 21:21:18 +0100 +Subject: [PATCH] Fix compatibility with libstdc++ < 9 + +mimalloc does not override the `nothrow` variants of the `delete` +operator because it assumes that their implementation in libstdc++ +redirects to the default `delete` operators. This is not the case for +libstdc++ < 9, where `std::free()` is called directly. + +Upstream bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
+ +This patch ensures that the `nothrow` `delete` operators are overridden +as well. +--- + main.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/main.cc b/main.cc +index b390b0f7..2aea03a0 100644 +--- a/main.cc ++++ b/main.cc +@@ -6,6 +6,11 @@ + + #ifdef USE_SYSTEM_MIMALLOC + #include <mimalloc-new-delete.h> ++ ++// Additionally override the nothrow delete operators for compatibility with ++// buggy libstdc++ < 9 ++void operator delete(void* p, const std::nothrow_t&) noexcept { mi_free(p); } ++void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_free(p); } + #endif + + namespace mold { +-- +2.35.1 + diff --git a/bundled_lib_system_flags.patch b/bundled_lib_system_flags.patch deleted file mode 100644 index e5704e0..0000000 --- a/bundled_lib_system_flags.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 06537164083e0af844224651bf7e7c7340a47675 Mon Sep 17 00:00:00 2001 -Message-Id: <06537164083e0af844224651bf7e7c7340a47675.1642950243.git.github(a)sicherha.de> -From: Christoph Erhardt <github(a)sicherha.de> -Date: Sun, 23 Jan 2022 14:28:45 +0100 -Subject: [PATCH] Pass `CXXFLAGS` to bundled tbb - -This makes work easier for distributions that specify custom hardened -compiler flags. - -Signed-off-by: Christoph Erhardt <github(a)sicherha.de> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index e2d7cd97..913ac97a 100644 ---- a/Makefile -+++ b/Makefile -@@ -147,7 +147,7 @@ $(MIMALLOC_LIB): - - $(TBB_LIB): - mkdir -p out/tbb -- (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS=-D__TBB_DYNAMIC_LOAD_ENABLED=0 -DTBB_STRICT=OFF ../../third-party/tbb) -+ (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -D__TBB_DYNAMIC_LOAD_ENABLED=0" -DTBB_STRICT=OFF ../../third-party/tbb) - $(MAKE) -C out/tbb tbb - (cd out/tbb; ln -sf *_relwithdebinfo libs) - --- -2.34.1 - diff --git a/mold.spec b/mold.spec index e97731b..00dc62b 100644 --- a/mold.spec +++ b/mold.spec @@ -1,6 +1,6 @@ Name: mold -Version: 1.0.2 -Release: 2%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: A Modern Linker License: AGPLv3+ @@ -14,16 +14,15 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # in the Fedora tbb package) Patch0: tbb-strip-werror.patch -# Pass the system's CXXFLAGS and CFLAGS to the bundled libraries to ensure they -# are built with all the Fedora hardening flags and with PIE (otherwise the -# linker errors linking non-PIE code with PIE code). -Patch1: bundled_lib_system_flags.patch +# Skip failing test on aarch64 +Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch -# Fix for failed assertion on aarch64 -Patch2: 0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch +# Fix mimalloc compatibility with libstdc++ < 9: +#
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
+Patch2: 0002-Fix-compatibility-with-libstdc-9.patch -# mold can currently produce native binaries for x86 and aarch64 only -ExclusiveArch: x86_64 aarch64 +# mold can currently produce native binaries for x86, aarch64 and riscv64 only +ExclusiveArch: x86_64 aarch64 riscv64 BuildRequires: cmake %if 0%{?el7} @@ -59,7 +58,7 @@ Requires(preun): %{_sbindir}/alternatives #
https://bugzilla.redhat.com/show_bug.cgi?id=2036372
Provides: bundled(tbb) = 2021.3 -%define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 SYSTEM_XXHASH=1 +%define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 %description mold is a faster drop-in replacement for existing Unix linkers. @@ -118,6 +117,11 @@ fi %{_mandir}/man1/mold.1* %changelog +* Mon Feb 21 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.1-1 +- Bump version to 1.1 +- Drop upstreamed patches +- Update description + * Thu Feb 17 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.0.2-2 - Rebuild due to mimalloc soname change diff --git a/sources b/sources index 59c74a6..1be872a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mold-1.0.2.tar.gz) = 27f6664e63c76c32a6e3ec8bfc4b204138926001f5431be94da9ce47a5d9d3b51aa634c5cd6df45be660d52ac0507f7b7eec17134e35db402db5747d2ecc3715 +SHA512 (mold-1.1.tar.gz) = b8b125c77563abe2741c2f32d73ab2b12dff275b92b633fcd015336c6ea735e38e95c3d2afb50e5baace2023d4f9de3eb50d53053eabc2cd2f045110eef4cc1e commit caac06b970116f61dcf5de3f156a8b3cfdfb7697 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Tue Feb 22 22:15:29 2022 +0100 Update description diff --git a/mold.spec b/mold.spec index bc907ab..e97731b 100644 --- a/mold.spec +++ b/mold.spec @@ -62,10 +62,10 @@ Provides: bundled(tbb) = 2021.3 %define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 SYSTEM_XXHASH=1 %description -mold is a multi-threaded, high-performance linker that is several times faster -than the industry-standard ones, namely, GNU ld, GNU gold or LLVM lld. It is -developed as a drop-in replacement for these linkers and command-line compatible -with them with a few exceptions. +mold is a faster drop-in replacement for existing Unix linkers. +It is several times faster than the LLVM lld linker. +mold is designed to increase developer productivity by reducing +build time, especially in rapid debug-edit-rebuild cycles. %prep %autosetup -p1 commit 9302df38eb7e845126ec7e7882c361bc160741d1 Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Tue Feb 22 22:15:11 2022 +0100 Don't explicitly require gcc on epel It's already covered by devtoolset-10-toolchain / gcc-toolset-10-toolchain. diff --git a/mold.spec b/mold.spec index cb4e4ce..bc907ab 100644 --- a/mold.spec +++ b/mold.spec @@ -26,7 +26,6 @@ Patch2: 0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch ExclusiveArch: x86_64 aarch64 BuildRequires: cmake -BuildRequires: gcc %if 0%{?el7} BuildRequires: devtoolset-10-toolchain %endif @@ -34,6 +33,7 @@ BuildRequires: devtoolset-10-toolchain BuildRequires: gcc-toolset-10-toolchain %endif %if 0%{!?el7} && 0%{!?el8} +BuildRequires: gcc BuildRequires: gcc-c++ >= 10 %endif BuildRequires: mimalloc-devel commit b4b2364218fb413dd00e06b4a1a43db2b602490d Author: Christoph Erhardt <fedora(a)sicherha.de> Date: Thu Feb 17 08:07:20 2022 +0100 Rebuild due to mimalloc soname change diff --git a/mold.spec b/mold.spec index e56c342..cb4e4ce 100644 --- a/mold.spec +++ b/mold.spec @@ -1,6 +1,6 @@ Name: mold Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Modern Linker License: AGPLv3+ @@ -118,6 +118,9 @@ fi %{_mandir}/man1/mold.1* %changelog +* Thu Feb 17 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.0.2-2 +- Rebuild due to mimalloc soname change + * Sun Jan 23 2022 Christoph Erhardt <fedora(a)sicherha.de> - 1.0.2-1 - Bump version to 1.0.2.
1
0
0
0
Architecture specific change in rpms/golang-github-streadway-amqp.git
by githook-noreply@fedoraproject.org
23 Feb '22
23 Feb '22
The package rpms/golang-github-streadway-amqp.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/golang-github-streadway-amqp.git/co…
. Change: +%ifarch aarch64 Thanks. Full change: ============ commit 8277e5b6ad35c37c5893c2b979da728cf6d25c9c Author: Robert-André Mauchin <zebob.m(a)gmail.com> Date: Wed Feb 23 18:53:52 2022 +0100 Disable a test failing on aarch64 diff --git a/golang-github-streadway-amqp.spec b/golang-github-streadway-amqp.spec index 1706a02..f1c9fc0 100644 --- a/golang-github-streadway-amqp.spec +++ b/golang-github-streadway-amqp.spec @@ -35,11 +35,15 @@ Source0: %{gosource} %if %{with check} %check -# Use outadated insecure algorithm SHA1-RSA +# Use outsdated insecure algorithm SHA1-RSA for test in "TestTLSHandshake" \ ; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done +# Fail on aarch64, upstream dead +%ifarch aarch64 +rm -rvf client_test.go tls_test.go +%endif %gocheck %endif commit 32cdc0775da96e43cdf6d3b10cbf87dab85c77f5 Author: Robert-André Mauchin <zebob.m(a)gmail.com> Date: Wed Feb 23 18:00:09 2022 +0100 Fix FTBFS Close: rhbz#2045618 diff --git a/golang-github-streadway-amqp.spec b/golang-github-streadway-amqp.spec index 2c83498..1706a02 100644 --- a/golang-github-streadway-amqp.spec +++ b/golang-github-streadway-amqp.spec @@ -35,6 +35,11 @@ Source0: %{gosource} %if %{with check} %check +# Use outadated insecure algorithm SHA1-RSA +for test in "TestTLSHandshake" \ +; do +awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) +done %gocheck %endif commit 9de3a47741b38ea41ec24484bc890daa29d6939d Author: Robert-André Mauchin <zebob.m(a)gmail.com> Date: Wed Feb 23 17:40:49 2022 +0100 Convert to rpmautospec diff --git a/changelog b/changelog new file mode 100644 index 0000000..1fcd07f --- /dev/null +++ b/changelog @@ -0,0 +1,39 @@ +* Thu Jan 20 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.0-4 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+ +* Thu Jul 22 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.0-3 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+ +* Tue Jan 26 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.0-2 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+ +* Sun Aug 02 21:55:08 CEST 2020 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.0.0-1 +- Update to 1.0.0 + +* Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.9 +- Second attempt - Rebuilt for +
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ +* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.8 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+ +* Wed Jan 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.7 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+ +* Thu Jul 25 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.6 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+ +* Wed May 15 00:55:41 CEST 2019 Robert-André Mauchin <zebob.m(a)gmail.com> - 0-0.5.20190515git75d898a +- Bump to commit 75d898a42a940fbc854dfd1a4199eabdc00cf024 + +* Fri Feb 01 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.4.20170926gitcefed15 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+ +* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.3.20170926gitcefed15 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+ +* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.2.20170926gitcefed15 +- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+ +* Tue Oct 03 2017 Ed Marshall <esm(a)logic.net> - 0-0.1.20170926gitcefed15 +- First package for Fedora diff --git a/golang-github-streadway-amqp.spec b/golang-github-streadway-amqp.spec index 929ec7a..2c83498 100644 --- a/golang-github-streadway-amqp.spec +++ b/golang-github-streadway-amqp.spec @@ -14,7 +14,7 @@ Package Amqp is an AMQP 0.9.1 client with RabbitMQ extensions.} %global godocs _examples CONTRIBUTING.md README.md Name: %{goname} -Release: 4%{?dist} +Release: %autorelease Summary: Go client for AMQP 0.9.1 # Upstream license specification: BSD-2-Clause @@ -41,42 +41,4 @@ Source0: %{gosource} %gopkgfiles %changelog -* Thu Jan 20 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.0-4 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
- -* Thu Jul 22 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.0-3 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
- -* Tue Jan 26 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.0-2 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
- -* Sun Aug 02 21:55:08 CEST 2020 Robert-André Mauchin <zebob.m(a)gmail.com> - 1.0.0-1 -- Update to 1.0.0 - -* Sat Aug 01 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.9 -- Second attempt - Rebuilt for -
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- -* Mon Jul 27 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.8 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- -* Wed Jan 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.7 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
- -* Thu Jul 25 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.6 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
- -* Wed May 15 00:55:41 CEST 2019 Robert-André Mauchin <zebob.m(a)gmail.com> - 0-0.5.20190515git75d898a -- Bump to commit 75d898a42a940fbc854dfd1a4199eabdc00cf024 - -* Fri Feb 01 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.4.20170926gitcefed15 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
- -* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.3.20170926gitcefed15 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
- -* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 0-0.2.20170926gitcefed15 -- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
- -* Tue Oct 03 2017 Ed Marshall <esm(a)logic.net> - 0-0.1.20170926gitcefed15 -- First package for Fedora +%autochangelog
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
38
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Results per page:
10
25
50
100
200