autopkg / smithjw-recipes

Smithjw's AutoPkg recipes
Apache License 2.0
14 stars 16 forks source link

Docker recipes - Installation successful but Docker.app gets deleted during installation #49

Open ehjmx opened 5 months ago

ehjmx commented 5 months ago

Hi,

I was preparing patchday for one of our clients and ran three of your Docker recipes Docker/Docker.pkg.recipe.yaml, the same recipe with an override that changes the download and package to arm64 and the Docker/Docker-Universal.pkg.recipe.yaml. None of the recipes failed, I had three packages Docker_x64-4.30.0.pkg, Docker_arm64-4.30.0.pkg and Docker-Universal-4.30.0.

I copied them to my Test-Mac and did an installation via the GUI. None of the packages failed each showed success. Looking into /Applications I saw that the Docker.app was missing. So I re-ran the Installation for Docker_arm64-4.30.0.pkg and Docker-Universal-4.30.pkg and saw that during the very last seconds the Docker.app that exists in the Application folder gets deleted.

As I couldn't explain it and found no hint in the install.log I went to my colleague and asked him to test the Universal installer with the same result. We did a bit of debugging, used https://mothersruin.com/software/Apparency/ but couldn't identify what leads to the deletion of the already installed Docker.app and still gives a success at the end of the installation process.

We suspected the postinstall script but that didn't help either. Still installation succeeded and the app got deleted.

I found this DockerUniversal recipe at moofit https://github.com/autopkg/moofit-recipes/blob/83b476da1e0b253e61dfef6a2a6d8335327a831a/Docker/DockerUniversal.pkg.recipe.yaml, ran it and it works.

I haven't compared the two scripts in detail yet, it's just that the postinstall script in the moofit recipe is longer but basically does the same as yours.

With Docker 4.28 and 4.29 there was no issue using your Docker/Docker.pkg.recipe.yaml with two overrides, one for arm64 and one for x64.

Build machine: macOS 14.5 autopkg 2.73 Build machine 2: macOS 12.6.8 autopkg 2.72

test mac: macOS 14.3

test vm: 14.4.1 test vm 2: macOS 14.5

packages were build yesterday 2024-05-27 and today 2024-05-28

Let me know if you need more information.