cdklabs / aws-delivlib

setup and manage continuous delivery pipelines for code libraries in multiple languages
Apache License 2.0
375 stars 35 forks source link

fix: `ENOENT` updating GPG custom resource #1704

Closed rix0rrr closed 3 months ago

rix0rrr commented 3 months ago

In #1703 the GPG binaries in the zip file were replaced, but the file structure inside the zip file was changes as well, leading to the following error after deploying:

Received response status [FAILED] from custom resource. Message returned: spawn /opt/gpg ENOENT (RequestId: 567a5e01-d1d7-4164-a542-1721669088c3)

This PR changes the ZIP structure to look the way it should have been (see https://github.com/cdklabs/aws-delivlib/pull/1703#issuecomment-2242932761):

$  unzip -l ./lib/custom-resource-handlers/layers/gpg-layer.zip
Archive:  ./lib/custom-resource-handlers/layers/gpg-layer.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     6148  07-18-2024 03:25   .DS_Store
   938568  07-18-2024 02:04   gpg
   300648  01-21-2020 18:44   gpg-agent
        0  07-18-2024 03:24   lib/
     6148  07-18-2024 03:24   lib/.DS_Store
   358304  07-18-2024 03:22   lib/libreadline.so.8.1
    87040  07-18-2024 03:20   lib/libassuan.so.0.8.5
    24152  07-18-2024 03:19   lib/libnpth.so.0.1.2
  1331864  07-18-2024 03:18   lib/libgcrypt.so.20.4.2
   153696  07-18-2024 03:19   lib/libgpg-error.so.0.32.0
    81024  07-18-2024 03:24   lib/libbz2.so.1.0.8
---------                     -------
  3287592                     11 files

The .DS_Store files shouldn't be there, but they don't harm either.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.