Can't build pc-amd64-gadget

Hi,

When I build the stock pc-amd64-gadget tree directly after git clone https://github.com/snapcore/pc-amd64-gadget with either the latest/stable snapcraft or 6.x/stable snapcraft, either with --use-lxd or on my host with --destructive-mode, I get the following build error:

The package grub-efi-amd64-signed has unmet dependencies:

Any suggestions since I need to build a new gadget?

Thank you!

The issue may be that the highest version of the grub-efi-amd64-signed deb for a system that uses focal-updates and the uc-staging-ppa PPA is 2:1.167.2+2.04-1ubuntu44.2. This lives in the PPA. This version requires a specific version of grub-efi-amd64-bin (= 2.04-1ubuntu44.2), but there is a higher version of that package in focal-updates archive (2.04-1ubuntu47.4), so grub-efi-amd64-signed cannot be installed as needed to build the gadget.

The resolution may be to bump the version (and requirements) of the grub-efi-amd64-signed and grub-efi-amd64-bin packages in the PPA so that they are higher than the ones in the focal-update archive.

Details:

The pc-amd64-gadget snapcraft.yaml specifies the following PPA: ppa: ucdev/uc-staging-ppa

It then adds the following deb to the snap: stage-packages:

  • grub-efi-amd64-signed

The grub-efi-amd64-signed in the PPA version is: 2.167.2+2.04-1ubuntu44.2

$ apt policy grub-efi-amd64-signed
grub-efi-amd64-signed:
  Installed: (none)
  Candidate: 2:1.167.2+2.04-1ubuntu44.2
  Version table:
     2:1.167.2+2.04-1ubuntu44.2 500
        500 http://ppa.launchpad.net/ucdev/uc-staging-ppa/ubuntu focal/main amd64 Packages
     1.173.2~20.04.1+2.04-1ubuntu47.4 500
[ . . . ]

This version of grub-efi-amd64-signed depends on a specific version of grub-efi-amd64-bin:

$ sudo apt install -s grub-efi-amd64-signed
[ . . . ]
The following packages have unmet dependencies:
 grub-efi-amd64-signed : Depends: grub-efi-amd64-bin (= 2.04-1ubuntu44.2)

But, the focal-updates archive has a higher version of that package:

$ apt policy grub-efi-amd64-bin
grub-efi-amd64-bin:
  Installed: 2.04-1ubuntu47.4
  Candidate: 2.04-1ubuntu47.4
  Version table:
 *** 2.04-1ubuntu47.4 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status

I think this means the first package cannot be installed because it requires grub-efi-amd64-bin (= 2.04-1ubuntu44.2) but grub-efi-amd64-bin 2.04-1ubuntu47.4 it the highest available.

1 Like

Is there a workaround for this? I have the same problem.

1 Like

Hi, we run into the same issue when building the gadget snap. Not sure if it is the case that the updated snapcraft.yaml file can work for uc22 but not uc20.

i have been working on a new approach for custom gadget snaps that simply re-use the existing snap from the store instead of needing to pull deb packages from anywhere … i currently only have a core22 source tree around at:

… but plan to also have a core20 tree eventually

feel free to try this out, it should definitely work around the annoyances that relying on PPAs brings along.