All of lore.kernel.org
 help / color / mirror / Atom feed
* How to install a Snap package in Image #mickledore #snapd
@ 2024-09-30 18:22 Spore, David
  2024-10-01  4:50 ` [yocto] " Michael Opdenacker
  0 siblings, 1 reply; 4+ messages in thread
From: Spore, David @ 2024-09-30 18:22 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

Hello,

I have a snap package provided by a vendor that I would like to include in my Debian Bookworm 12 image (built with Yocto).  How do I create a recipe that can run Snapd to install a pre-built snap package?  Are there any examples of how to deploy a pre-built snap package during the image build process?  I want to avoid having to manually run snap on the package after the image is deployed.

DART-MX8M-PLUS - Debian Bookworm 12.5 based on Yocto Mickledore 4.2 with NXP BSP L6.1.36_2.1.0

Thanks!

David

[-- Attachment #2: Type: text/html, Size: 1324 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] How to install a Snap package in Image #mickledore #snapd
  2024-09-30 18:22 How to install a Snap package in Image #mickledore #snapd Spore, David
@ 2024-10-01  4:50 ` Michael Opdenacker
  2024-10-01 13:21   ` Spore, David
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Opdenacker @ 2024-10-01  4:50 UTC (permalink / raw)
  To: yocto, dspore; +Cc: michael.opdenacker

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

Hi David,

On 9/30/24 20:22, Spore, David wrote:
> Hello,
> I have a snap package provided by a vendor that I would like to 
> include in my Debian Bookworm 12 image (built with Yocto). How do I 
> create a recipe that can run Snapd to install a pre-built snap 
> package?  Are there any examples of how to deploy a pre-built snap 
> package during the image build process?  I want to avoid having to 
> manually run snap on the package after the image is deployed.
> DART-MX8M-PLUS - Debian Bookworm 12.5 based on Yocto Mickledore 4.2 
> with NXP BSP L6.1.36_2.1.0


For my understanding, have you tried manually first to prove that it 
could work? I guess you already built snapd using meta-snapd or 
meta-snappy 
(https://layers.openembedded.org/layerindex/branch/master/recipes/?q=snapd)

By the way, trying to install Debian packages won't work, or at least 
the installed binaries are not expected to work because they were built 
against different libraries. However, this might work with a snap 
container if all the library prerequisites are indeed included, in 
particular the standard C library.

Cheers
Michael.

-- 

Michael Opdenacker
Root Commit
https://rootcommit.com

[-- Attachment #2: Type: text/html, Size: 2746 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] How to install a Snap package in Image #mickledore #snapd
  2024-10-01  4:50 ` [yocto] " Michael Opdenacker
@ 2024-10-01 13:21   ` Spore, David
  2024-10-02 13:36     ` Michael Opdenacker
  0 siblings, 1 reply; 4+ messages in thread
From: Spore, David @ 2024-10-01 13:21 UTC (permalink / raw)
  To: Michael Opdenacker, yocto

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

Michael,

Thanks for your reply!  Yes, I have deployed the snap on my target machine manually after having installed snapd.  Now I am looking for a way to run snap packages during the image build, as well as deploy rpm and/or deb packages.   I've deployed these packages manually on the target machine.  My problem is that I don't know how to write recipes for automating these tasks at build time.

David

[-- Attachment #2: Type: text/html, Size: 522 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] How to install a Snap package in Image #mickledore #snapd
  2024-10-01 13:21   ` Spore, David
@ 2024-10-02 13:36     ` Michael Opdenacker
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2024-10-02 13:36 UTC (permalink / raw)
  To: dspore; +Cc: michael.opdenacker, yocto

Hi David

On 10/1/24 15:21, Spore, David wrote:
> Michael,
> Thanks for your reply!  Yes, I have deployed the snap on my target 
> machine manually after having installed snapd.


But did you check that the snap worked as expected?

> Now I am looking for a way to run snap packages during the image 
> build, as well as deploy rpm and/or deb packages.


Do you mean deploying rpm and deb packages from other distros like 
Fedora and Debian? Those are extremely likely to break, as the binaries 
were built against different C libraries. RPM and DEB are package 
formats, they don't provide binary compatibility.

>   I've deployed these packages manually on the target machine.  My 
> problem is that I don't know how to write recipes for automating these 
> tasks at build time.

I guess you should write a class which the recipes would inherit. You 
may ask the meta-snapd or meta-snappy people for advice.
Cheers
Michael.

-- 
Michael Opdenacker
Root Commit
https://rootcommit.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-02 13:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 18:22 How to install a Snap package in Image #mickledore #snapd Spore, David
2024-10-01  4:50 ` [yocto] " Michael Opdenacker
2024-10-01 13:21   ` Spore, David
2024-10-02 13:36     ` Michael Opdenacker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.