-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging: fix build-depends on multiarch debian systems #1324
Conversation
It's possible to have two versions of the same package installed on debian-based multiarch systems - e.g. i386 alongside amd64. This means that when getting the package status through dpkg-query we'd get a duplicated string: % dpkg-query -f '$${db:Status-Status}' -W libssl-dev $installed$installed % dpkg -l | grep libssl-dev ii libssl-dev:amd64 3.0.11-1~deb12u2 amd64 Secure Sockets Layer toolkit - development files ii libssl-dev:i386 3.0.11-1~deb12u2 i386 Secure Sockets Layer toolkit - development files The fix is to explicitely check for the main architecture and, in case for noarch (or rather all-arch in debian terms) packages, check for special :all architecture as well.
That's true of Fedora et al as well... |
Indeed, it seems the problem is similar on rpm-based:
However it's not as easy to fix, since architectures are all over the place:
And to make things even more complicated, 700ee28 fixed a real issue on Amazon Linux 2023 with curl-minimal providing curl, php8.2-devel providing php-devel, etc, and they don't really provide a CAPABILITY with the architecture bit there:
|
It's been many years since I last needed to run any 32bit stuff (the flash plugin...) I think part of the issue is that while there is really only From the setarch(8) man-page
My guess is that But and as I say it's been a long time since I needed to use 32bit stuff, I think you'll generally only find i686 rpms these days for 32bit Intel... (in Fedora's case anyway...) (And of course support for i386 was removed from Linux over a decade ago! ;-)) |
The problem is I'm a bit lost on how to detect arch and noarch packages, or rather, Provides which generally are not required to specify the architecture (or something similar to architecture). E.g. if we use a following patch to query for
We will be able to detect e.g.
|
Are you building 32bit packages? With rpm at least, it defaults to 64bit on x86_64 (as opposed to say defaulting to 32bit on Sparc64). If you're only building 64bit packages I don't think you really have anything to worry about, I mean whenever I've build rpms in the past I've never needed to worry about such things... |
I'm not building 32 bit packages. The rpm situation described is not something we have on our packages builder machines (contrary to the debian-based ones), but it's still possible for someone who will use our packaging to install both architectures of openssl-devel, which will confuse our check. |
Ping for a review |
Ping for a review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it does the job...
@thresheek Would you like us to merge, or would you prefer to merge yourself? If we don't hear otherwise, we'll toss it in next Monday. |
It's possible to have two versions of the same package installed on debian-based multiarch systems - e.g. i386 alongside amd64. This means that when getting the package status through dpkg-query we'd get a duplicated string:
% dpkg-query -f '$${db:Status-Status}' -W libssl-dev $installed$installed
% dpkg -l | grep libssl-dev
ii libssl-dev:amd64 3.0.11-1
deb12u2 amd64 Secure Sockets Layer toolkit - development filesdeb12u2 i386 Secure Sockets Layer toolkit - development filesii libssl-dev:i386 3.0.11-1
The fix is to explicitely check for the main architecture and, in case for noarch (or rather all-arch in debian terms) packages, check for special :all architecture as well.