Re: [PATCH] scripts/package: snap-pkg target

From: Jim Davis
Date: Tue Jul 18 2017 - 20:02:54 EST


On Mon, Jul 10, 2017 at 11:13 PM, Paolo Pisati
<paolo.pisati@xxxxxxxxxxxxx> wrote:
> On Mon, Jul 10, 2017 at 6:46 PM, Jim Davis <jim.epost@xxxxxxxxx> wrote:
>>>
>>> For more information on snap packages: https://snapcraft.io/docs/
>>
>> Is this something a user could do with the existing deb target, and
>> then running deb2snap?
>
> No, the kernel snap is a special case, it requires communication with
> the store (e.g. to download the core snap) and some extra steps,
> therefore you should use snapcraft and abstract from these details.

>From a quick check on top of 4.13-rc1 it does what it says, but...
building a snap like this, unless I'm missing something, is quite
different from building a kernel deb or rpm or tar package.

Once I fed the snap into ubuntu-image, after hunting down a plausible
model file, I did get an image file that booted under qemu. I guess
if you're in the know about snap (and I don't include myself in that
august company) you'd know that the snap-pkg target won't directly
give you something you can boot, but the "make help" output looks so
similar to the other conventional build targets that the some might
miss that point.

The snap-informed would also know that the snap-pkg target would
download stuff from the internet as part of the build process, but
that's unusual enough in kernel building that another recent build
target, linkcheckdocs, included "(will connect to external hosts)" as
part of its "make help" output. That probably would be a good idea
for the snap-pkg target too.

Running snap-pkg twice in a row seems to have rebuilt the entire
kernel source, unlike the other more conventional build targets.


--
Jim