Open daniejstriata opened 1 month ago
I see the mistake I made. I swapped only curl and not libcurl.
dnf swap libcurl-minimal libcurl -y
→ curl -V
curl 8.5.0 (x86_64-amazon-linux-gnu) libcurl/8.5.0 OpenSSL/3.0.8 zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.2) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 OpenLDAP/2.4.57
Release-Date: 2023-12-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets
Is the curl package dependencies not broken? If I swap from curl-minimal why does the libcurl-minimal
package not also change? I looked at the SPEC file and it appears that curl-minimal
requires libcurl-minimal
but I don't see the same logic for curl
to requires libcurl
.
%package -n curl-minimal
Conflicts: curl
%package -n libcurl-minimal
Conflicts: libcurl%{?_isa}
@daniejstriata curl
requires libcurl
which is provided by libcurl-minimal
so when you do the swap the package manager detects all requirements solved:
All the other libraries were removed from the output for clarity:
[root ~]$ rpm -q --requires curl
libcurl(x86-64) >= 8.5.0-1.amzn2023.0.4
libcurl.so.4()(64bit)
What provides libcurl
:
[root ~]$ rpm -q --whatprovides libcurl
libcurl-minimal-8.5.0-1.amzn2023.0.4.x86_64
If you run ldd -v /usr/bin/curl
there are no missing libraries:
However, since libcurl
that comes with libcurl-minimal
has a limited set of features compared to the libcurl
package there should be a way to tell which one goes with what package. All dnf
sees is that libcurl
dependency is satisfied for the swap w/out knowing or caring which libcurl
!
I thought that it would be simple to set curl to require libcurl and obsoletes libcurl-minimal and vice versa.
The difficulty I think is with dnf swap
... I haven't tried (off the laptop right now) but it seems to only allow for swapping one package at a time unless I'm mistaken... and it's the "preferred" way of replacing the -minimal variants with the full ones
Fedora is doing the right thing here:
# rpm -qa | grep curl
libcurl-minimal-8.6.0-10.fc40.x86_64
curl-8.6.0-10.fc40.x86_64
There is just the curl package but you swap out the curl library. That makes it easier to facilitate the swap correctly.
The likely thing would be that our packaging forked from Fedora before this change. It's probably worth a revisit, but we'd have to ensure compatibility with any setups that currently worked (ie had dnf swap
in them), which may make it more difficult to do that.
@daniejstriata what version of Fedora did you use for testing?
I see the same behavior on FC39
as on AL2023
:
[elsaco@RIPPER ~]$ rpm -qa | grep curl
curl-minimal-8.2.1-5.fc39.x86_64
libcurl-minimal-8.2.1-5.fc39.x86_64
Swap curl-minimal
with curl
:
[elsaco@RIPPER ~]$ sudo dnf swap curl-minimal curl
Last metadata expiration check: 0:16:43 ago on Wed Aug 14 13:27:44 2024.
Dependencies resolved.
========================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================
Installing:
curl x86_64 8.2.1-5.fc39 updates 344 k
Removing:
curl-minimal x86_64 8.2.1-5.fc39 @updates 268 k
Transaction Summary
========================================================================================================================
Install 1 Package
Remove 1 Package
Total download size: 344 k
Is this ok [y/N]: y
Downloading Packages:
curl-8.2.1-5.fc39.x86_64.rpm 534 kB/s | 344 kB 00:00
------------------------------------------------------------------------------------------------------------------------
Total 329 kB/s | 344 kB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : curl-8.2.1-5.fc39.x86_64 1/2
Erasing : curl-minimal-8.2.1-5.fc39.x86_64 2/2
Running scriptlet: curl-minimal-8.2.1-5.fc39.x86_64 2/2
Verifying : curl-8.2.1-5.fc39.x86_64 1/2
Verifying : curl-minimal-8.2.1-5.fc39.x86_64 2/2
Installed:
curl-8.2.1-5.fc39.x86_64
Removed:
curl-minimal-8.2.1-5.fc39.x86_64
Complete!
Verify:
[elsaco@RIPPER ~]$ rpm -qa | grep curl
libcurl-minimal-8.2.1-5.fc39.x86_64
curl-8.2.1-5.fc39.x86_64
Notice that libcurl-minimal
was not replaced with libcurl
, just like in AL2023
Swap libcurl-minimal
with libcurl
:
[elsaco@RIPPER ~]$ sudo dnf swap libcurl-minimal libcurl
Last metadata expiration check: 0:19:04 ago on Wed Aug 14 13:27:44 2024.
Dependencies resolved.
========================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================
Installing:
libcurl x86_64 8.2.1-5.fc39 updates 322 k
Installing dependencies:
libssh x86_64 0.10.6-2.fc39 updates 212 k
libssh-config noarch 0.10.6-2.fc39 updates 9.0 k
Removing:
libcurl-minimal x86_64 8.2.1-5.fc39 @updates 570 k
Transaction Summary
========================================================================================================================
Install 3 Packages
Remove 1 Package
Total download size: 544 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): libssh-config-0.10.6-2.fc39.noarch.rpm 30 kB/s | 9.0 kB 00:00
(2/3): libssh-0.10.6-2.fc39.x86_64.rpm 363 kB/s | 212 kB 00:00
(3/3): libcurl-8.2.1-5.fc39.x86_64.rpm 487 kB/s | 322 kB 00:00
------------------------------------------------------------------------------------------------------------------------
Total 494 kB/s | 544 kB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libssh-config-0.10.6-2.fc39.noarch 1/4
Installing : libssh-0.10.6-2.fc39.x86_64 2/4
Installing : libcurl-8.2.1-5.fc39.x86_64 3/4
Erasing : libcurl-minimal-8.2.1-5.fc39.x86_64 4/4
Running scriptlet: libcurl-minimal-8.2.1-5.fc39.x86_64 4/4
Verifying : libcurl-8.2.1-5.fc39.x86_64 1/4
Verifying : libssh-0.10.6-2.fc39.x86_64 2/4
Verifying : libssh-config-0.10.6-2.fc39.noarch 3/4
Verifying : libcurl-minimal-8.2.1-5.fc39.x86_64 4/4
Installed:
libcurl-8.2.1-5.fc39.x86_64 libssh-0.10.6-2.fc39.x86_64 libssh-config-0.10.6-2.fc39.noarch
Removed:
libcurl-minimal-8.2.1-5.fc39.x86_64
Complete!
Now libcurl-minimal
was replaced with libcurl
.
I tested on FC40.
Is your feature request related to a problem? Please describe. I swapped out curl-minimal for curl.
As can be seen the libcurl package did not get changed as well. Can the requirements for curl and curl-minimal not require the appropriate library package?
swapping back: