JasonN3 / build-container-installer

Creates an ISO for installing a container image as an OS
GNU General Public License v3.0
63 stars 9 forks source link

[BUG] GPG key file is empty in flatpak repo #77

Closed noelmiller closed 8 months ago

noelmiller commented 8 months ago

Describe the bug For some reason, the flatpak.trustedkeys.gpg is an empty file when installing from generated bluefin ISO.

To Reproduce

docker run --rm --privileged --pull always --volume .:/github/workspace/build  ghcr.io/jasonn3/build-container-installer:main VERSION=39 IMAGE_REPO=ghcr.io/ublue-os IMAGE_NAME=bluefin IMAGE_TAG=39-testing VARIANT=Silverblue FLATPAK_REMOTE_REFS_DIR=/github/workspace/build/flatpaks

Expected behavior File should not be empty

Screenshots Discussion happening in discord ISO thread: https://discord.com/channels/1072614816579063828/1192504002252914791

JasonN3 commented 8 months ago

Can't replicate. Steps used:

  1. docker run --rm --privileged --pull always --volume .:/github/workspace/build ghcr.io/jasonn3/build-container-installer:main VERSION=39 IMAGE_REPO=ghcr.io/ublue-os IMAGE_NAME=bluefin IMAGE_TAG=39-testing VARIANT=Silverblue FLATPAK_REMOTE_REFS_DIR=/github/workspace/build/flatpaks
  2. Boot from resulting deploy.iso
  3. Create a user
  4. Run flatpak update image
  5. Run flatpak install org.mozilla.firefox image
noelmiller commented 8 months ago

Really odd. Can you pull down the flatpaks folder from Bluefin PR I'm using and take a look? Maybe there is something goofy going on with how I defined the flatpaks in there. https://github.com/ublue-os/bluefin/pull/1022

JasonN3 commented 8 months ago

So far the build process looks fine. I haven't installed the OS yet, but did you have internet while the build process was running? It pulls down the flatpakrepo file in order to extract the gpgkey. If it failed to pull it down the file would probably be empty

JasonN3 commented 8 months ago

Still works even with that list of flatpaks

noelmiller commented 8 months ago

That might be what happened. I'll try again when I'm home. Internet has been really bad here.

JasonN3 commented 8 months ago

That might be what happened. I'll try again when I'm home. Internet has been really bad here.

I'll leave this open so you can confirm it works. Once you do, please close this issue

noelmiller commented 8 months ago

Update: Built an updated ISO in Github, downloaded it, installed, and got the same error. Did it again, and did not get the error. It is very hit or miss on when it happens. I'm so confused by this issue, it's driving me crazy.

JasonN3 commented 8 months ago

Update: Built an updated ISO in Github, downloaded it, installed, and got the same error. Did it again, and did not get the error. It is very hit or miss on when it happens. I'm so confused by this issue, it's driving me crazy.

Do you have a link to the GH run that built a failed ISO so I can look through the log? And when you said you "did it again", did you run the same ISO or did you rebuild the ISO?

noelmiller commented 8 months ago

Update: Built an updated ISO in Github, downloaded it, installed, and got the same error. Did it again, and did not get the error. It is very hit or miss on when it happens. I'm so confused by this issue, it's driving me crazy.

Do you have a link to the GH run that built a failed ISO so I can look through the log? And when you said you "did it again", did you run the same ISO or did you rebuild the ISO?

I thought I linked the GH run, sorry about that. https://github.com/ublue-os/bluefin/actions/runs/8305702296/job/22732901460

I used this same ISO more than once. One time it failed copying over the GPG key and it was just an empty file, tested it 2 more times and couldn't get it to fail to copy the GPG key again.

JasonN3 commented 8 months ago

If it's the same ISO, then there isn't something wrong with the build process. The installation process just needs to be able to find the flatpak repo in a known location. This is the entire script: https://github.com/JasonN3/build-container-installer/blob/main/lorax_templates/scripts/post/flatpak_configure If you get it to fail again, try to grab the anaconda logs. It might show what failed during the installation.

noelmiller commented 8 months ago

If it's the same ISO, then there isn't something wrong with the build process. The installation process just needs to be able to find the flatpak repo in a known location. This is the entire script: https://github.com/JasonN3/build-container-installer/blob/main/lorax_templates/scripts/post/flatpak_configure If you get it to fail again, try to grab the anaconda logs. It might show what failed during the installation.

Yeah, I'll keep messing with it and pull logs. It's frustrating I can't get it to reproduce the issue now. I had another person try it with a brand new ISO generated using docker and no issue with that ISO installation either.

Worst case, if someone does have a broken GPG key, it's a fairly trivial fix.

noelmiller commented 8 months ago

Closing this, I have not been able to duplicate it for quite some time.