#2 [DO NOT MERGE HERE] PyPy 3.9 7.3.8rc1
Closed 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/pypy3.8 pypy3.9  into  rawhide

file modified
+4
@@ -16,3 +16,7 @@ 

  /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

+ /pypy3.9-v7.3.8rc1-src.tar.bz2

+ /pypy3.9-v7.3.8rc2-src.tar.bz2

+ /pypy3.9-v7.3.8-src.tar.bz2

file modified
+18 -14
@@ -2,23 +2,26 @@ 

  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 @@ 

  +_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)

file added
+74
@@ -0,0 +1,74 @@ 

+ # 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')

+ addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/pypy3\.\d+/_.*test.*\.[ch]')

+ 

+ # 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')

+ 

+ # 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')

+ 

+ 

+ # 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) ')

pypy3.9.spec pypy3.8.spec
file renamed
+211 -268
@@ -1,13 +1,17 @@ 

  %global basever 7.3

- %global pyversion 3.8

+ %global micro 8

+ #global pre ...

+ %global pyversion 3.9

  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

  # 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
@@ -34,111 +38,35 @@ 

  # 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

+ %bcond_without jit

  %else

- %global with_jit 0

+ %bcond_with jit

  %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

- 

- # 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 emacs

  

  # Easy way to turn off the selftests:

- %global run_selftests 1

- 

- %global pypyprefix %{_libdir}/pypy%{pyversion}

- %global pylibver 3

+ %bcond_without selftests

  

  # 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

  %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
@@ -173,22 +101,20 @@ 

  

  # 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 build_using_pypy2

+ %if %{with build_using_pypy2}

  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
@@ -205,32 +131,33 @@ 

  BuildRequires:  bzip2-devel

  BuildRequires:  ncurses-devel

  BuildRequires:  expat-devel

- BuildRequires:  openssl1.1-devel

+ BuildRequires:  openssl-devel

  BuildRequires:  gdbm-devel

  BuildRequires:  xz-devel

  

  BuildRequires:  python-rpm-macros

  

- %ifnarch s390

+ %ifarch %{valgrind_arches}

  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:

+ # For recording stats:

  BuildRequires:  time

  BuildRequires:  /usr/bin/free

  

+ %if %{with selftests}

+ # Used by the selftests, though not by the build:

+ BuildRequires:  gc-devel

+ 

  # For use in the selftests, for imposing a per-test timeout:

  BuildRequires:  perl-interpreter

  %endif

  

  BuildRequires:  /usr/bin/execstack

+ BuildRequires:  /usr/bin/patchelf

  

  # For byte-compiling the JIT-viewing mode:

- %if %{with_emacs}

+ %if %{with emacs}

  BuildRequires:  emacs

  %endif

  
@@ -254,12 +181,20 @@ 

  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

+ # All other packages require the main package explicitly.

+ %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

  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
@@ -272,7 +207,7 @@ 

  

  # 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

  
@@ -286,8 +221,8 @@ 

  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
@@ -296,8 +231,11 @@ 

  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.20

+ Provides: bundled(python3dist(pycparser)) = 2.21

  

  # Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py

  Provides: bundled(python3dist(ply)) = 3.9
@@ -312,9 +250,25 @@ 

  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}

+ 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}

+ Requires: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release}

  

  %if %{with main_pypy3}

  Provides: pypy3-devel = %{version}-%{release}
@@ -329,7 +283,7 @@ 

  

  

  %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 %**}}
@@ -337,7 +291,6 @@ 

  %if %{with rpmwheels}

  %apply_patch -m %(basename %{SOURCE189}) %{SOURCE189}

  rm lib-python/3/ensurepip/_bundled/*.whl

- rmdir lib-python/3/ensurepip/_bundled

  %endif

  

  
@@ -356,7 +309,7 @@ 

  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}@' \

      "{}" \

      \;
@@ -368,7 +321,7 @@ 

    sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py

  %endif

  

- %if ! 0%{use_self_when_building}

+ %if %{without build_using_pypy2}

    # use the pycparser from PyPy even on CPython

    ln -s lib_pypy/cffi/_pycparser pycparser

  %endif
@@ -377,11 +330,6 @@ 

  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

  
@@ -438,35 +386,8 @@ 

    # 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:

-   %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:
@@ -489,9 +410,10 @@ 

      PYPY_USESSION_DIR=$(pwd) \

      PYPY_USESSION_BASENAME=$ExeName \

      $INTERP ../../rpython/bin/rpython  \

-     %{gcrootfinder_options} \

+     --gcrootfinder=shadowstack \

      $Options \

-     targetpypystandalone

+     targetpypystandalone \

+     --platlibdir=%{_lib}

  

    echo "--------------------------------------------------------------"

    echo "--------------------------------------------------------------"
@@ -506,25 +428,74 @@ 

  

  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

  

  

  %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

+ %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

+ %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_name_versioning

+ %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. 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_name_versioning

+ 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.%{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

+ #   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

+ 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}

+ 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}%{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

+ # 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
@@ -543,8 +514,6 @@ 

          \)                                                               \

      \)

  

- 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
@@ -554,92 +523,29 @@ 

  #

  # 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

- 

- # 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.

- 

+ execstack --clear-execstack %{buildroot}%{_bindir}/pypy%{pyversion}

  

  # Bytecompile all of the .py files we ship, using our pypy binary, giving us

  # .pyc files for pypy.

  #

  # 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}%{_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 *'

  

- %{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

- 

+ unset LD_LIBRARY_PATH

  

  # 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:
@@ -682,7 +588,7 @@ 

  # 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
@@ -693,25 +599,13 @@ 

  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/pypy3.debug

- 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"))')" = \

+ test "$(%{goal_dir}/pypy%{pyversion}-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \

       "%{libmpdec_version}"

  }

  
@@ -827,54 +721,103 @@ 

      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 pypy3-c

- %endif # run_selftests

+ %if %{with selftests}

+ CheckPyPy pypy%{pyversion}-c

+ %endif # with selftests

  

  # Because there's a bunch of binary subpackages and creating

  # /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that

  # 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

+ %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 %{with rpmwheels}

+ %exclude %{pypylibdir}/ensurepip/_bundled

+ %endif

+ %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}

+ %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

- %{_bindir}/pypy%{pyversion}

- %{pypyprefix}/bin/

+ # 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/

+ %exclude %{pypylibdir}/testcapi_long.h

+ 

+ # Keep this synced with %%files devel below

+ %exclude %{pypylibdir}/cffi/*.h

+ %exclude %{pypylibdir}/hpy/devel/

+ 

+ 

+ %files test

+ # Keep this synced with %%excluded %%files in libs

+ %{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/

+ %{pypylibdir}/testcapi_long.h

+ 

  

  %files devel

- %dir %{pypy_include_dir}

- %{pypy_include_dir}/*.h

- %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

  

+ # Keep this synced with %%excluded %%files in libs

+ %{pypylibdir}/cffi/*.h

+ %{pypylibdir}/hpy/devel/

+ 

  

  %changelog

+ * Tue Feb 22 2022 Miro Hrončok <mhroncok@redhat.com> - 7.3.8-1

+ - Update to 7.3.8 final

+ 

+ * Fri Feb 11 2022 Miro Hrončok <mhroncok@redhat.com> - 7.3.8~rc2-1

+ - Update to 7.3.8rc2

+ 

+ * Wed Jan 26 2022 Miro Hrončok <mhroncok@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

+ - Split tests into pypy3.9-test

+ 

  * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.3.7-3

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

  

file added
+28
@@ -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

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (pypy3.8-v7.3.7-src.tar.bz2) = 9e6701cc441d5535968656cfb0cfa9076c364f9ba32bc6f0ef64f06ab343281e2458dbe88791c0e02401457fbf80d367f397fc904f6146bff68e04a15e05fda2

+ SHA512 (pypy3.9-v7.3.8-src.tar.bz2) = aed018738af7a225f516ec37d059d539f486d9dd427fe000805147b197f496d5fcb0387e47008524753ad18224aebeb1e68f9e2093acbe37468e02bff92f7126

file modified
+2 -2
@@ -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

This needs a new component.

2 new commits added

  • PyPy 3.9
  • Update to 7.3.8rc1
2 years ago

2 new commits added

  • PyPy 3.9
  • Update to 7.3.8rc1
2 years ago

2 new commits added

  • PyPy 3.9
  • Update to 7.3.8rc1
2 years ago

2 new commits added

  • PyPy 3.9
  • Update to 7.3.8rc1
2 years ago

2 new commits added

  • PyPy 3.9
  • Update to 7.3.8rc1
2 years ago

2 new commits added

  • PyPy 3.9
  • Update to 7.3.8rc1
2 years ago

3 new commits added

  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

5 new commits added

  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

6 new commits added

  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

6 new commits added

  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

Build succeeded.

1 new commit added

  • WIP: Move to a CPython-like installation layout
2 years ago

7 new commits added

  • WIP: Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

7 new commits added

  • WIP: Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

7 new commits added

  • WIP: Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

7 new commits added

  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

rebased onto 82b51bb

2 years ago

7 new commits added

  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

8 new commits added

  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

1 new commit added

  • Remove tl;dr comments and commented out code
2 years ago

1 new commit added

  • Remove RHEL 6 conditional
2 years ago

1 new commit added

  • Stop requiring pypy3.9 from pypy3.9-libs
2 years ago

4 new commits added

  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
2 years ago

15 new commits added

  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
  • Stop requiring pypy3.9 from pypy3.9-libs
  • Remove RHEL 6 conditional
  • Remove tl;dr comments and commented out code
  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

Build succeeded.

4 new commits added

  • Introduce an rpmlintrc config file
  • Create a test subpackage, similar to python3-test
  • Move main %files to the top
  • Define %{pypylibdir} for easier %files
2 years ago

1 new commit added

  • Introduce an rpminspect config file
2 years ago

20 new commits added

  • Introduce an rpminspect config file
  • Introduce an rpmlintrc config file
  • Create a test subpackage, similar to python3-test
  • Move main %files to the top
  • Define %{pypylibdir} for easier %files
  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
  • Stop requiring pypy3.9 from pypy3.9-libs
  • Remove RHEL 6 conditional
  • Remove tl;dr comments and commented out code
  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

20 new commits added

  • Introduce an rpminspect config file
  • Introduce an rpmlintrc config file
  • Create a test subpackage, similar to python3-test
  • Move main %files to the top
  • Define %{pypylibdir} for easier %files
  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
  • Stop requiring pypy3.9 from pypy3.9-libs
  • Remove RHEL 6 conditional
  • Remove tl;dr comments and commented out code
  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

Not sure about those:

pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2-config.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2-impl.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2b-load-sse2.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2b-load-sse41.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2b-ref.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2b-round.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2b.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2s-load-sse2.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2s-load-sse41.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2s-load-xop.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2s-ref.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2s-round.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_blake2/impl/blake2s.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_cffi_ssl/_cffi_src/openssl/src/osrandom_engine.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_cffi_ssl/_cffi_src/openssl/src/osrandom_engine.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/basearith.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/basearith.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/bits.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/constants.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/constants.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/context.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/convolute.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/convolute.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/crt.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/crt.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/difradix2.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/difradix2.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/fnt.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/fnt.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/fourstep.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/fourstep.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/io.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/io.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/memory.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/memory.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/mpdecimal.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/mpdecimal.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/numbertheory.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/numbertheory.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/sixstep.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/sixstep.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/transpose.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/transpose.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/typearith.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/umodarith.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/vccompat.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_libmpdec/vcstdint.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_pypy_openssl.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_pypy_util_cffi_inner.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakHash.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakHash.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakP-1600-SnP-opt32.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakP-1600-SnP-opt64.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakP-1600-SnP.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakP-1600-inplace32BI.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakP-1600-opt64-config.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakP-1600-opt64.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakSponge.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/KeccakSponge.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/SnP-Relaned.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_sha3/kcp/align.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/cffi/_cffi_errors.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/cffi/_cffi_include.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/cffi/_embedding.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/cffi/parse_c_type.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/autogen_hpyfunc_declare.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/autogen_hpyslot.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/cpy_types.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/cpython/autogen_api_impl.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/cpython/autogen_hpyfunc_trampolines.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/cpython/hpyfunc_trampolines.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/cpython/misc.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/hpydef.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/hpyfunc.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/hpymodule.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/hpytype.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/macros.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/runtime/argparse.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/runtime/ctx_funcs.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/runtime/ctx_type.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/runtime/helpers.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/universal/autogen_ctx.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/universal/autogen_hpyfunc_trampolines.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/universal/autogen_trampolines.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/universal/hpyfunc_trampolines.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/universal/misc_trampolines.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/include/hpy/version.h
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/argparse.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_bytes.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_call.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_err.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_listbuilder.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_module.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_object.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_tracker.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_tuple.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_tuplebuilder.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/ctx_type.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/hpy/devel/src/runtime/helpers.c
pypy3.9-libs.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/testcapi_long.h
pypy3.9-test.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_ctypes_test.c
pypy3.9-test.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_testbuffer.c
pypy3.9-test.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_testcapimodule.c
pypy3.9-test.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_testimportmultiple.c
pypy3.9-test.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_testinternalcapi.c
pypy3.9-test.x86_64: W: devel-file-in-non-devel-package /usr/lib64/pypy3.9/_testmultiphase.c

I think we don't need to install any of the sources. But maybe we need the hpy headers installed in devel.... ?

1 new commit added

  • Stop shipping C sources, move some headers to -devel, one to -test
2 years ago

22 new commits added

  • Final touches to the rpmlintrc file
  • Stop shipping C sources, move some headers to -devel, one to -test
  • Introduce an rpminspect config file
  • Introduce an rpmlintrc config file
  • Create a test subpackage, similar to python3-test
  • Move main %files to the top
  • Define %{pypylibdir} for easier %files
  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
  • Stop requiring pypy3.9 from pypy3.9-libs
  • Remove RHEL 6 conditional
  • Remove tl;dr comments and commented out code
  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

22 new commits added

  • Final touches to the rpmlintrc file
  • Stop shipping C sources, move some headers to -devel, one to -test
  • Introduce an rpminspect config file
  • Introduce an rpmlintrc config file
  • Create a test subpackage, similar to python3-test
  • Move main %files to the top
  • Define %{pypylibdir} for easier %files
  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
  • Stop requiring pypy3.9 from pypy3.9-libs
  • Remove RHEL 6 conditional
  • Remove tl;dr comments and commented out code
  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

3 new commits added

  • Cleanup parts of the installation
  • Remove an useless s390(x) z10 sed, we are at z13+ in Fedora
  • Use %{valgrind_arches}
2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Could not execute build: database outage

[recheck]

Build succeeded.

26 new commits added

  • Update to 7.3.8rc2
  • Cleanup parts of the installation
  • Remove an useless s390(x) z10 sed, we are at z13+ in Fedora
  • Use %{valgrind_arches}
  • Final touches to the rpmlintrc file
  • Stop shipping C sources, move some headers to -devel, one to -test
  • Introduce an rpminspect config file
  • Introduce an rpmlintrc config file
  • Create a test subpackage, similar to python3-test
  • Move main %files to the top
  • Define %{pypylibdir} for easier %files
  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
  • Stop requiring pypy3.9 from pypy3.9-libs
  • Remove RHEL 6 conditional
  • Remove tl;dr comments and commented out code
  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

Pushed Update to 7.3.8rc2 -- totally untested.

Build succeeded.

I'm going in. May the gods have mercy on my soul.

Follows a commit by commit review in order.

Update to 7.3.8rc1

LGTM

Time and free is always needed

LGTM

PyPy 3.9

All makes sense except these two removed lines.

-            rmdir lib-python/3/ensurepip/_bundled

No longer needed?

              %dir %{pypy_include_dir}            
 -            %{pypy_include_dir}/*.h            
              %dir %{pypy_include_dir}/pypy%{pyversion}            
              %{pypy_include_dir}/pypy%{pyversion}/*.h            

I presume the *.h files used to be in both directories, but now they're only in the second one?

And point of order: does this type of review work for you?

I presume the *.h files used to be in both directories, but now they're only in the second one?

I see the pypy3-c and similar also became more versioned, so I guess this is the upstream change to have more things versioned?

PyPy 3.9

All makes sense except these two removed lines.

diff - rmdir lib-python/3/ensurepip/_bundled
No longer needed?

This is a change in the 3.9 standard library, ensurepip._bundled is now an importable package with init. I see that in CPython, we %exclude %{pylibdir}/ensurepip/_bundled so we might want to do the same here. TODO for me.

%dir %{pypy_include_dir} - %{pypy_include_dir}/*.h %dir %{pypy_include_dir}/pypy%{pyversion} %{pypy_include_dir}/pypy%{pyversion}/*.h

I presume the *.h files used to be in both directories, but now they're only in the second one?

I see the pypy3-c and similar also became more versioned, so I guess this is the upstream change to have more things versioned?

Yes. Upstream moved all headers to the namespaced subdirectory, allowing us to change the layout.

does this type of review work for you?

It does for now, but there are no threads, so we need to make sure we keep quoting ourselves when we answer questions.

Continuing review of commits in order.

Not main pypy yet

LGTM

Build with the default OpenSSL version (i.e. 3 on Fedora 36+)

LGTM

Set platlibdir

LGTM

Move to a CPython-like installation layout

  • %global soname_version 0.1

From upstream discussion [A] they're aiming to start versioning at 1.0, so why did
you choose 0.1? A comment explaining that (whatever the choice) would be welcome.

[A] https://mail.python.org/pipermail/pypy-dev/2022-January/016311.html

  • patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so

It seems to me you're patching the elf through the symlink instead of the moved so file directly, is there a reason?

  • %{_libdir}/libpypy%{pyversion}-c.so.%{soname_version}

I see the newly versioned .so file is in the libs subpackage, but the version-less symlink is in the devel subpackage. Why so?

Declare bundled cffi

LGTM

Remove tl;dr comments and commented out code

LGTM

Remove RHEL 6 conditional

So sad to see it go. LSTM.

Stop requiring pypy3.9 from pypy3.9-libs

  • %global __requires_exclude ^/usr/bin/pypy

As in CPython, libs indeed need not drag in the interpreter, but some of the other subpackages should.
The corresponding change in CPython [B] mentions All other packages require %%{pkgname} explicitly.
Have you verified that other packages here do the same? If so, I'd appreciate adding a similar comment in this spec file as well.

[B] https://src.fedoraproject.org/rpms/python3.9/pull-request/21#request_diff

Remove some unneeded globals

LGTM

Convert bool globals to bconds

LGTM

Rename use_self_when_building to pypy2_build, make it a bcond

I find pypy2_build to be very vague, bordering on misleading. How about build_using_pypy2? If you agree, don't forget to change the commit name too.

Remove the non-shadow_stack option, it has not been used in years

LGTM

Define %{pypylibdir} for easier %files

This spec is looking more beautiful commit by commit!

Move main %files to the top

Thanks! This has really bothered me :)

Create a test subpackage, similar to python3-test

python3-test has an explicit dependency on python3 (explicity required due to the requires filter). I think this subpackage deserves the same.

        Keep this synced with %%files test below

This note to keep the lines in sync should be included also in the %%files test section.

Introduce an rpmlintrc config file

LGTM

Introduce an rpminspect config file

LGTM

Stop shipping C sources, move some headers to -devel, one to -test

           7. Remove sources, we don't install them

How did you compile the list of sources? Looks fairly arbitrary, so a comment would be great.

         Keep this synced with %%files devel below

This note to keep the lines in sync should be included also in the %%files devel section.

Final touches to the rpmlintrc file

Are you sure it's really final? :P

Use %{valgrind_arches}

LGTM

Remove an useless s390(x) z10 sed, we are at z13+ in Fedora

LGTM

Cleanup parts of the installation

LGTM

Update to 7.3.8rc2

LGTM

Summary

Overall great PR. And sorry for a review just before recharge day :)

Move to a CPython-like installation layout

  • %global soname_version 0.1

From upstream discussion [A] they're aiming to start versioning at 1.0, so why did
you choose 0.1? A comment explaining that (whatever the choice) would be welcome.

This is what (already linked) Fedora packaging guidelines suggest. We intentionally choose a number in a form of 0.N in case upstream starts versioning it, so our version is lower. A single version usually maintains some ABI compatibility guarantees, so we should not use 1.0 just because CPython does (they are really careful not to change the ABI). Upstream PyPy might decide never to do 1.0 or to version it by PyPy version (e.g. 7.3) instead.

Here, I chose 0.1, and when the ABI changes we might need to bump it. I have not yet figured out if/how we do that :)

Comment suggestions welcome.

  • patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so

It seems to me you're patching the elf through the symlink instead of the moved so file directly, is there a reason?

No reason, TODO for me to do it the more straightforward way.

  • %{_libdir}/libpypy%{pyversion}-c.so.%{soname_version}

I see the newly versioned .so file is in the libs subpackage, but the version-less symlink is in the devel subpackage. Why so?

That is the classic setup for shared libraries. The version-less symbolic link is used when you build against the library, it is not created just because we would need to preserve some backward-compatibility thing (since PyPy 3.9 is a new package, we don't have any such concerns). See e.g. CPython:

$ rpm -qf /usr/lib64/libpython3.10.so
python3-devel-3.10.2-1.fc35.x86_64
$ rpm -qf /usr/lib64/libpython3.10.so.1.0 
python3-libs-3.10.2-1.fc35.x86_64

Or almost any other library:

$ rpm -qf /usr/lib64/libelf.so
elfutils-libelf-devel-0.186-1.fc35.x86_64
$ rpm -qf /usr/lib64/libelf.so.1 
elfutils-libelf-0.186-1.fc35.x86_64

$ rpm -qf /usr/lib64/libssl.so
openssl-devel-1.1.1l-2.fc35.x86_64
$ rpm -qf /usr/lib64/libssl.so.1.1
openssl-libs-1.1.1l-2.fc35.x86_64

Stop requiring pypy3.9 from pypy3.9-libs

  • %global __requires_exclude ^/usr/bin/pypy

As in CPython, libs indeed need not drag in the interpreter, but some of the other subpackages should.
The corresponding change in CPython [B] mentions All other packages require %%{pkgname} explicitly.
Have you verified that other packages here do the same? If so, I'd appreciate adding a similar comment in this spec file as well.

When I did this, there was just pypy + libs + devel and the only "all other subpackages" was devel. But now we also have test. And test probably needs it as well. So I'll verify and add that same comment. TODO.

Rename use_self_when_building to pypy2_build, make it a bcond

I find pypy2_build to be very vague, bordering on misleading. How about build_using_pypy2? If you agree, don't forget to change the commit name too.

Ack, TODO.

Define %{pypylibdir} for easier %files

This spec is looking more beautiful commit by commit!

:)

Create a test subpackage, similar to python3-test

python3-test has an explicit dependency on python3 (explicity required due to the requires filter). I think this subpackage deserves the same.

You are correct and there is already an existing TODO here that says I'll do that (due to the /usr/bin/pypy3 requires filter).

        Keep this synced with %%files test below

This note to keep the lines in sync should be included also in the %%files test section.

Ack, TODO.

Stop shipping C sources, move some headers to -devel, one to -test

           7. Remove sources, we don't install them

How did you compile the list of sources? Looks fairly arbitrary, so a comment would be great.

rpmlint to the rescue. TODO will update the comment.

         Keep this synced with %%files devel below

This note to keep the lines in sync should be included also in the %%files devel section.

Ack, TODO.

Final touches to the rpmlintrc file

Are you sure it's really final? :P

Yes, it passes now :) So final for this version at least.

Summary

Overall great PR. And sorry for a review just before recharge day :)

:beers:

I'll follow up with regular commits that implement each TODO. Probably next week. I'd rather avoid fixup commits in fear of conflicts.

Move to a CPython-like installation layout

  • %global soname_version 0.1

From upstream discussion [A] they're aiming to start versioning at 1.0, so why did
you choose 0.1? A comment explaining that (whatever the choice) would be welcome.

This is what (already linked) Fedora packaging guidelines suggest. We intentionally choose a number in a form of 0.N in case upstream starts versioning it, so our version is lower. A single version usually maintains some ABI compatibility guarantees, so we should not use 1.0 just because CPython does (they are really careful not to change the ABI). Upstream PyPy might decide never to do 1.0 or to version it by PyPy version (e.g. 7.3) instead.

Ah, makes cents. I still can't find this in the guidelines though, can you post a link?

Here, I chose 0.1, and when the ABI changes we might need to bump it. I have not yet figured out if/how we do that :)

Comment suggestions welcome.

How about: # Arbitrarily setting soname to 0.1 in Fedora, as versioning is required: <link to guidelines section>

  • patchelf --set-soname libpypy%{pyversion}-c.so.%{soname_version} %{packaged_prefix}/%{_lib}/libpypy%{pyversion}-c.so

It seems to me you're patching the elf through the symlink instead of the moved so file directly, is there a reason?

No reason, TODO for me to do it the more straightforward way.

  • %{_libdir}/libpypy%{pyversion}-c.so.%{soname_version}

I see the newly versioned .so file is in the libs subpackage, but the version-less symlink is in the devel subpackage. Why so?

That is the classic setup for shared libraries. The version-less symbolic link is used when you build against the library, it is not created just because we would need to preserve some backward-compatibility thing (since PyPy 3.9 is a new package, we don't have any such concerns). See e.g. CPython:

$ rpm -qf /usr/lib64/libpython3.10.so python3-devel-3.10.2-1.fc35.x86_64 $ rpm -qf /usr/lib64/libpython3.10.so.1.0 python3-libs-3.10.2-1.fc35.x86_64

Or almost any other library:

```
$ rpm -qf /usr/lib64/libelf.so
elfutils-libelf-devel-0.186-1.fc35.x86_64
$ rpm -qf /usr/lib64/libelf.so.1
elfutils-libelf-0.186-1.fc35.x86_64

$ rpm -qf /usr/lib64/libssl.so
openssl-devel-1.1.1l-2.fc35.x86_64
$ rpm -qf /usr/lib64/libssl.so.1.1
openssl-libs-1.1.1l-2.fc35.x86_64
```

Ah, TIL. Thanks for the explanation!

Summary

Overall great PR. And sorry for a review just before recharge day :)

:beers:

I'll follow up with regular commits that implement each TODO. Probably next week. I'd rather avoid fixup commits in fear of conflicts.

Sounds good!

Stop requiring pypy3.9 from pypy3.9-libs

  • %global __requires_exclude ^/usr/bin/pypy

As in CPython, libs indeed need not drag in the interpreter, but some of the other subpackages should.
The corresponding change in CPython [B] mentions All other packages require %%{pkgname} explicitly.
Have you verified that other packages here do the same? If so, I'd appreciate adding a similar comment in this spec file as well.

When I did this, there was just pypy + libs + devel and the only "all other subpackages" was devel. But now we also have test. And test probably needs it as well. So I'll verify and add that same comment. TODO.

Just for the sake of clarity, not just the test subpackage, I think the devel subpackage should also require pypy. And python3-devel requires python3.

The downstream soname version guidelines is https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning -- specifically search for "For downstream versioning, the name should be composed like this:"

8 new commits added

  • Update to 7.3.8 final
  • Add comment above the %soname_version definition
  • Explain how the removed sources list was created
  • Add reversed "keep this synced" comments
  • Rename pypy2_build to build_using_pypy2 to be less confusing
  • Make -test and -devel require both main package and -libs explicitly
  • Nitpick: patch the ELF, not a link to it
  • Mimic CPython, %exclude ensurepip/_bundled when built with RPM wheels
2 years ago

Added commits. All TODOs should be answered. Also updated to the final version.

Build succeeded.

Mimic CPython, %exclude ensurepip/_bundled when built with RPM wheels

LGTM

Nitpick: patch the ELF, not a link to it

LGTM

Make -test and -devel require both main package and -libs explicitly

All other packages require %%{pkgname} explicitly.

There's no pkgname macro in this specfile, unlike CPython :P

Rename pypy2_build to build_using_pypy2 to be less confusing

LGTM

Add reversed "keep this synced" comments

LGTM

Explain how the removed sources list was created

LGTM

Add comment above the %soname_version definition

LGTM

Update to 7.3.8 final

LGTM

And I went through the TODO notes in this discussion, and all were addressed. So after that one comment is adjusted, ship it!

1 new commit added

  • fixup! Make -test and -devel require both main package and -libs explicitly
2 years ago

fixup! Make -test and -devel require both main package and -libs explicitly

Perfect.

34 new commits added

  • Update to 7.3.8 final
  • Add comment above the %soname_version definition
  • Explain how the removed sources list was created
  • Add reversed "keep this synced" comments
  • Rename pypy2_build to build_using_pypy2 to be less confusing
  • Make -test and -devel require both main package and -libs explicitly
  • Nitpick: patch the ELF, not a link to it
  • Mimic CPython, %exclude ensurepip/_bundled when built with RPM wheels
  • Update to 7.3.8rc2
  • Cleanup parts of the installation
  • Remove an useless s390(x) z10 sed, we are at z13+ in Fedora
  • Use %{valgrind_arches}
  • Final touches to the rpmlintrc file
  • Stop shipping C sources, move some headers to -devel, one to -test
  • Introduce an rpminspect config file
  • Introduce an rpmlintrc config file
  • Create a test subpackage, similar to python3-test
  • Move main %files to the top
  • Define %{pypylibdir} for easier %files
  • Remove the non-shadow_stack option, it has not been used in years
  • Rename use_self_when_building to pypy2_build, make it a bcond
  • Convert bool globals to bconds
  • Remove some unneeded globals
  • Stop requiring pypy3.9 from pypy3.9-libs
  • Remove RHEL 6 conditional
  • Remove tl;dr comments and commented out code
  • Declare bundled cffi
  • Move to a CPython-like installation layout
  • Set platlibdir
  • Build with the default OpenSSL version (i.e. 3 on Fedora 36+)
  • Not main pypy yet
  • PyPy 3.9
  • Time and free is always needed
  • Update to 7.3.8rc1
2 years ago

All is well that force-pushes well! Merge it!

Merge it!

I cannot :) This is the wrong component. https://pagure.io/releng/fedora-scm-requests/issue/42492

Thanks for the review!

Build succeeded.

Pull-Request has been closed by churchyard

2 years ago