[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#966573: progress packaging awscli v2



On Thu, Jun 17, 2021 at 09:56:10AM -0700, Noah Meyerhans wrote:
> awscli v2 remains quite difficult to package, but it seems that upstream
> is looking to address this.  See
> https://github.com/aws/aws-cli/issues/6186 for details and tracking.

Using the source dist poc from https://github.com/aws/aws-cli/pull/6352 I've
made enough progress to get a packaged aws-cli v2 working.  There's a lot more
that needs to be done, but idea of the above linked PR could work for us.  I'm
going to document my findings here.

The branch is based on 2.2.1.  All of its python dependencies except
aws-crt-python are packaged (though the versions in sid don't match the
requirements).  I ignored this with no ill side effects so far to focus on
aws-crt-python.

aws-crt-python is the hard part.  It depends on a bunch of C libraries which
follow a more modern development style.  They:
- provide no abi/api stability guarantees.
- have versioned releases, but no one cares about the versions.  The intention
  is that everyone should be following the main branch.
- only nominally support dynamic linking (it can be enabled, but is not used or
  tested by upstream).
- seem to be mostly used via source inclusion.

My first pass only produces -dev packages with headers and static libraries.
To test them out, build the debian/sid branch from these repos, in this order:
- https://salsa.debian.org/rvandegrift/aws-c-common
- https://salsa.debian.org/rvandegrift/aws-lc
- https://salsa.debian.org/rvandegrift/s2n-tls
- https://salsa.debian.org/rvandegrift/aws-c-cal
- https://salsa.debian.org/rvandegrift/aws-c-io
- https://salsa.debian.org/rvandegrift/aws-c-compression
- https://salsa.debian.org/rvandegrift/aws-checksums
- https://salsa.debian.org/rvandegrift/aws-c-http
- https://salsa.debian.org/rvandegrift/aws-c-mqtt
- https://salsa.debian.org/rvandegrift/aws-c-event-stream
- https://salsa.debian.org/rvandegrift/aws-c-auth
- https://salsa.debian.org/rvandegrift/aws-c-s3
- https://salsa.debian.org/rvandegrift/aws-crt-python
- https://salsa.debian.org/rvandegrift/aws-cli2-temp

With gbp and sbuild, you should be able to build each with:
  gbp buildpackage --git-builder=sbuild -d unstable --extra-package=$PWD/../build-area/


A few known issues:

- some repos have tests disabled due to failing during builds.  So far, I don't
  know if these are real failures, or if upstream's build method.

- copyright attribution for aws-lc is very hard.  It's a fork of Google's
  BoringSSL, which is a fork of pre-3.0 OpenSSL.

- That also means that aws-lc inherits the openssl gpl incompatibility.

- the aws-cli2-temp repo is based on upstream, not our awscli repo.  I was
  intentionally being sloppy to quickly get through a test.

- aws-lc and s2n-tls may be hard to maintain.  Both are complicated, security
  critical crypto libraries.

Ross


Reply to: