sip infinite loop in PyQt 4.10.1

Issues related to applications and software problems
Post Reply
Fałek
Posts: 6
Joined: 2018/05/10 13:02:11

sip infinite loop in PyQt 4.10.1

Post by Fałek » 2020/01/15 14:31:44

Hey everyone,

Some time ago we run across sip infinite loop bug in PyQt 4.10.1.

This problem with an example is described here.
It seems it was fixed in PyQt 4.10.4 but epel and CentOS does not provide such package.

I found some PyQt 4.12 package in cbs repo, but there were no PyQt-webkit (normally PyQt is in CentOS base, while PyQt-webkit in epel), so I couldn't test it, as I need both packages.

Anyone can help how to solve this problem? I'm not sure why there is still old, not fixed PyQt4 package in base repo, not the fixed one.

Btw. what is the purpose of cbs repo, I run across it for the first time.

Thanks for any help!

User avatar
TrevorH
Forum Moderator
Posts: 29662
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: sip infinite loop in PyQt 4.10.1

Post by TrevorH » 2020/01/15 16:17:59

Red Hat maintain their own packages. Please see https://access.redhat.com/security/updates/backporting for details but what it amounts to is that packages are frozen in time on the version that was available when the RHEL version was first built - so for el7 that would be 2014. You will need to raise a bug on bugzilla.redhat.com to ask them to backport the fix to their version.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

bonedome
Posts: 173
Joined: 2017/04/22 08:11:04

Re: sip infinite loop in PyQt 4.10.1

Post by bonedome » 2020/01/15 19:59:05

Hello
you could try installing with pip

Code: Select all

pip3.6 search pyqt4
shows

Code: Select all

PyQt4 (4.11.4)                                - Python bindings for the Qt
                                                cross platform GUI toolkit
you can see installed packages with

Code: Select all

pip3.6 list 
and available updates

Code: Select all

pip3.6 list -o
I tend to install pip updates in my home folder so yum doesn't get confused

Code: Select all

pip3.6 install --upgrade PyQt4 --user
otherwise install as root without --user

User avatar
TrevorH
Forum Moderator
Posts: 29662
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: sip infinite loop in PyQt 4.10.1

Post by TrevorH » 2020/01/15 21:42:06

That's a really bad idea, especially the bit about running it as root. There are packaged versions of this and some things may require those packages be installed and then you will get into a situation where one tries to overwrite the other and things will break.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Fałek
Posts: 6
Joined: 2018/05/10 13:02:11

Re: sip infinite loop in PyQt 4.10.1

Post by Fałek » 2020/01/21 10:42:35

bonedome wrote:
2020/01/15 19:59:05
Hello
you could try installing with pip
We are still using Python 2, so it won't help. Anyway, we are using CentOS main package manager only. We try not to mix it with the pip, as TrevorH said it is not the best idea I guess. But thanks for help.

I posted this bug on https://bugzilla.redhat.com/show_bug.cgi?id=1791387
If I recognised it correctly, it should be fixed in the next release of RHEL, is that right?

User avatar
TrevorH
Forum Moderator
Posts: 29662
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: sip infinite loop in PyQt 4.10.1

Post by TrevorH » 2020/01/21 15:12:31

I have never seen a bugzilla entry go from NEW to POST with no other information given before. I presume that it's going to get fixed or perhaps is already fixed in 7.8 (RH Internal only) but there is nothing there that says anything useful from their side.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Fałek
Posts: 6
Joined: 2018/05/10 13:02:11

Re: sip infinite loop in PyQt 4.10.1

Post by Fałek » 2020/02/21 10:32:08

There is reply that it won't get fixed. I guess I will need to build this version of PyQt on my own. But firstly I have to know how to do this.

User avatar
TrevorH
Forum Moderator
Posts: 29662
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: sip infinite loop in PyQt 4.10.1

Post by TrevorH » 2020/02/21 12:16:34

I had a quick look at what's available and I see this lot:

Code: Select all

# yum list \*pyqt\*
Loaded plugins: priorities
734 packages excluded due to repository priority protections
Installed Packages
PyQt4.x86_64                                                     4.10.1-13.el7                                    @base
Available Packages
PyQt4.i686                                                       4.10.1-13.el7                                    base 
PyQt4-devel.i686                                                 4.10.1-13.el7                                    base 
PyQt4-devel.x86_64                                               4.10.1-13.el7                                    base 
PyQt4-webkit.x86_64                                              4.10.1-2.el7                                     epel 
PyQt4-webkit-devel.noarch                                        4.10.1-2.el7                                     epel 
plplot-pyqt.x86_64                                               5.10.0-10.el7                                    epel 
python36-pyqt4-sip.x86_64                                        4.19.16-3.el7                                    epel 
python36-pyqt5-sip.x86_64                                        4.19.16-3.el7                                    epel 
So looking at that lot, I see there are much newer pyqt packages in EPEL for python 3.6. If your code is python3 compatible - quite a big if - then you could switch over to using that as there are now python3 packages in the base/updates repos for CentOS 7. Otherwise you will need to see if you can find an individual patch for the bug you have and rebuild the base/updates version of pyqt to include it. That might have all sorts of knock on effects on other packages or it might be relatively easy. You'll only really find out when you try but since it comes from its own SRPM - PyQt4-4.10.1-13.el7.src.rpm - it might be ok.

So, grab that SRPM from vault.centos.org and set up a normal user to use rpmbuild using https://wiki.centos.org/HowTos/SetupRpmBuildEnvironment then rpm --install /path/to/PyQt4-4.10.1-13.el7.src.rpm to install that SRPM into your new ~/rpmbuild tree. You need to edit the spec file in the SPECS dir to bump the version number (probably by incrementing the %dist) then add a new Patch$n: line to it pointing to your patch file and also a new %patch$n line in the %prep or %build stanza to apply the patch to the newly unpacked source before it's built. Once that's done you use rpmbuild -bs PyQt4.spec (may need --nodeps) to build a new SRPM. Now use mock --rebuild /path/to/newSRPM.rpm to rebuild that using mock which does all the building in a chroot environment and keeps your build system clean and also stops the build from pulling in any foreign things and creating an incorrect rpm. Iterate that a few times until it builds!

The reason for incrementing the dist is so that if RH patch PyQt4 you need to make sure you didn't make yours a higher version number than the new one they issue so that when you do a yum update in the future, it will replace yours with their new one or you might be missing a security patch. If that happens you will have to rebuild yours against the new SRPM...
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”