amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
500 stars 37 forks source link

[Bug] - python3-boto3 1.33.6 conflicts with awscli-2 #704

Open daniejstriata opened 2 months ago

daniejstriata commented 2 months ago

Describe the bug when Installing python3-botocore I get the following error:

Problem: package python3-boto3-1.33.6-1.amzn2023.0.1.noarch from amazonlinux conflicts with awscli-2 < 2.13.29-1.amzn2023.0.1 provided by awscli-2-2.9.19-1.amzn2023.0.1.noarch from amazonlinux

To Reproduce yum install python3-boto3 python3-botocore


Last metadata expiration check: 5:26:39 ago on Fri Apr 26 01:50:29 2024.
Dependencies resolved.

 Problem: package python3-boto3-1.33.6-1.amzn2023.0.1.noarch from amazonlinux conflicts with awscli-2 < 2.13.29-1.amzn2023.0.1 provided by awscli-2-2.9.19-1.amzn2023.0.1.noarch from amazonlinux
  - cannot install the best candidate for the job
===============================================================================================================================================================
 Package                                  Architecture                 Version                                         Repository                         Size
===============================================================================================================================================================
Installing:
 python3-boto3                            noarch                       1.28.21-1.amzn2023.0.1                          amazonlinux                       165 k
Installing dependencies:
 python3-botocore                         noarch                       1.31.21-1.amzn2023.0.1                          amazonlinux                       6.1 M
 python3-s3transfer                       noarch                       0.6.2-1.amzn2023.0.1                            amazonlinux                       117 k
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 awscli-2                                 noarch                       2.9.19-1.amzn2023.0.1                           amazonlinux                       9.5 M
 python3-boto3                            noarch                       1.33.6-1.amzn2023.0.1                           amazonlinux                       170 k

Transaction Summary
===============================================================================================================================================================
Install  3 Packages
Skip     2 Packages

Total download size: 6.3 M
Installed size: 86 M
Is this ok [y/N]: n
Operation aborted.

This seems to be an issue on multiple hosts.

Also. The awscli-2 spec file is also missing a build requirement: python3-flit-core OS Version → cat /etc/os-release NAME="Amazon Linux" VERSION="2023" ID="amzn" ID_LIKE="fedora" VERSION_ID="2023" PLATFORM_ID="platform:al2023" PRETTY_NAME="Amazon Linux 2023.4.20240416" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023" HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/" DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/" SUPPORT_URL="https://aws.amazon.com/premiumsupport/" BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023" VENDOR_NAME="AWS" VENDOR_URL="https://aws.amazon.com/" SUPPORT_END="2028-03-15"

zcobol commented 2 months ago

@daniejstriata your AL2023 image(s) might need some updating. On the latest al2023 there were no unsatisfied dependencies:

[ec2-user@ip-172-x-x-x ~]$ sudo dnf install python3-boto3 awscli-2
Last metadata expiration check: 0:07:41 ago on Sat Apr 27 00:14:00 2024.
Package awscli-2-2.14.5-1.amzn2023.0.1.noarch is already installed.
Dependencies resolved.
====================================================================================================================================
 Package                            Architecture           Version                                Repository                   Size
====================================================================================================================================
Installing:
 python3-boto3                      noarch                 1.28.21-1.amzn2023.0.1                 amazonlinux                 165 k
Installing dependencies:
 python3-botocore                   noarch                 1.31.21-1.amzn2023.0.1                 amazonlinux                 6.1 M
 python3-s3transfer                 noarch                 0.6.2-1.amzn2023.0.1                   amazonlinux                 117 k

Transaction Summary
====================================================================================================================================
Install  3 Packages

Total download size: 6.3 M
Installed size: 86 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): python3-s3transfer-0.6.2-1.amzn2023.0.1.noarch.rpm                                           916 kB/s | 117 kB     00:00    
(2/3): python3-boto3-1.28.21-1.amzn2023.0.1.noarch.rpm                                              1.1 MB/s | 165 kB     00:00    
(3/3): python3-botocore-1.31.21-1.amzn2023.0.1.noarch.rpm                                            18 MB/s | 6.1 MB     00:00    
------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                15 MB/s | 6.3 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                            1/1 
  Installing       : python3-botocore-1.31.21-1.amzn2023.0.1.noarch                                                             1/3 
  Installing       : python3-s3transfer-0.6.2-1.amzn2023.0.1.noarch                                                             2/3 
  Installing       : python3-boto3-1.28.21-1.amzn2023.0.1.noarch                                                                3/3 
  Running scriptlet: python3-boto3-1.28.21-1.amzn2023.0.1.noarch                                                                3/3 
  Verifying        : python3-boto3-1.28.21-1.amzn2023.0.1.noarch                                                                1/3 
  Verifying        : python3-botocore-1.31.21-1.amzn2023.0.1.noarch                                                             2/3 
  Verifying        : python3-s3transfer-0.6.2-1.amzn2023.0.1.noarch                                                             3/3 

Installed:
  python3-boto3-1.28.21-1.amzn2023.0.1.noarch                      python3-botocore-1.31.21-1.amzn2023.0.1.noarch                  
  python3-s3transfer-0.6.2-1.amzn2023.0.1.noarch                  

Complete!

The only repos used for testing were the default one:

ec2-user@ip-172-x-x-x ~]$ dnf repolist
repo id                                             repo name
amazonlinux                                         Amazon Linux 2023 repository
kernel-livepatch                                    Amazon Linux 2023 Kernel Livepatch repository
daniejstriata commented 2 months ago

Thank you for looking. I don't have an issue installing python3-boto3 on Amazon Linux 2023.4.20240416 but once it is installed I can't upgrade it as awscli-2 requires 1.28.21 to be installed. That's why when I install python3-boto3 it installs 1.28.21 and not the current 1.33.6

Transaction Summary

Install 3 Packages

* Upgrading python3-boto3

Problem: cannot install both awscli-2-2.9.19-1.amzn2023.0.1.noarch from amazonlinux and awscli-2-2.14.5-1.amzn2023.0.1.noarch from @System

elsaco commented 2 months ago

The issue is with awscli-2 < 2.13.29. From python-boto3.spec file:

  27 # older versions of the awscli-2 packages incorrecly set an
  28 # unversioned Provides: python3.9dist(botocore) and Provides:
  29 # python3-botocore.  We need to conflict with those older versions, or
  30 # else dnf will incorrently interpret them as fulfilling boto3's
  31 # requires:
  32 Conflicts:      awscli-2 < 2.13.29-1.amzn2023.0.1

However, awscli-2 is version 2.14.5. I did a test specifying what package version to install and there were no conflicts:

[ec2-user] ~$ sudo dnf install python3-boto3-1.33.6-1.amzn2023.0.1.noarch
Last metadata expiration check: 0:57:29 ago on Mon Apr 29 13:49:06 2024.
Dependencies resolved.
========================================================================================================================
 Package                         Architecture        Version                             Repository                Size
========================================================================================================================
Installing:
 python3-boto3                   noarch              1.33.6-1.amzn2023.0.1               amazonlinux              170 k
Installing dependencies:
 python3-botocore                noarch              1.33.6-1.amzn2023.0.1               amazonlinux              6.5 M
 python3-s3transfer              noarch              0.8.2-1.amzn2023.0.1                amazonlinux              120 k

Transaction Summary
========================================================================================================================
Install  3 Packages

Total download size: 6.7 M
Installed size: 91 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): python3-s3transfer-0.8.2-1.amzn2023.0.1.noarch.rpm                               1.0 MB/s | 120 kB     00:00
(2/3): python3-boto3-1.33.6-1.amzn2023.0.1.noarch.rpm                                   1.4 MB/s | 170 kB     00:00
(3/3): python3-botocore-1.33.6-1.amzn2023.0.1.noarch.rpm                                 26 MB/s | 6.5 MB     00:00
------------------------------------------------------------------------------------------------------------------------
Total                                                                                    22 MB/s | 6.7 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Installing       : python3-botocore-1.33.6-1.amzn2023.0.1.noarch                                                  1/3
  Installing       : python3-s3transfer-0.8.2-1.amzn2023.0.1.noarch                                                 2/3
  Installing       : python3-boto3-1.33.6-1.amzn2023.0.1.noarch                                                     3/3
  Running scriptlet: python3-boto3-1.33.6-1.amzn2023.0.1.noarch                                                     3/3
  Verifying        : python3-boto3-1.33.6-1.amzn2023.0.1.noarch                                                     1/3
  Verifying        : python3-botocore-1.33.6-1.amzn2023.0.1.noarch                                                  2/3
  Verifying        : python3-s3transfer-0.8.2-1.amzn2023.0.1.noarch                                                 3/3

Installed:
  python3-boto3-1.33.6-1.amzn2023.0.1.noarch                  python3-botocore-1.33.6-1.amzn2023.0.1.noarch
  python3-s3transfer-0.8.2-1.amzn2023.0.1.noarch

Complete!
jafd commented 1 month ago

If this is "fixed", why is dnf insisting on installing 2.9.19-1.amzn2023.0.1?

$ rpm -qa | rg awscli
awscli-2-2.15.30-1.amzn2023.0.1.noarch
$ sudo dnf upgrade 
Last metadata expiration check: 21:41:42 ago on Tue May 14 16:22:30 2024.
Dependencies resolved.

 Problem: cannot install both awscli-2-2.9.19-1.amzn2023.0.1.noarch from amazonlinux and awscli-2-2.15.30-1.amzn2023.0.1.noarch from @System
  - cannot install the best update candidate for package python3-botocore-1.33.6-1.amzn2023.0.1.noarch
  - cannot install the best update candidate for package awscli-2-2.15.30-1.amzn2023.0.1.noarch

Not making this up... Could you please fix the repository? Shouldn't be a hard thing since it's "versioned" and "deterministic", right?