mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] How to create "hotfix" packages
@ 2017-10-31 17:28 Guillermo Rodriguez Garcia
  2017-11-01 11:01 ` Michael Olbrich
  0 siblings, 1 reply; 8+ messages in thread
From: Guillermo Rodriguez Garcia @ 2017-10-31 17:28 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 588 bytes --]

Hello all,

For a ptxdist BSP I am managing I need to create a "hotfix" package to
patch a number of files on already deployed devices.

This package will only be used on devices which are already deployed, and
its files should not be part of the rootfs images if the platform is
rebuilt. Is it possible to have ptxdist build an .ipk package that will not
be included in the filesystem images ?

I was hoping that marking the package as "M" in ptxdist menuconfig would do
the trick :) but that doesn't do what I thought.

Thank you,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 880 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] How to create "hotfix" packages
  2017-10-31 17:28 [ptxdist] How to create "hotfix" packages Guillermo Rodriguez Garcia
@ 2017-11-01 11:01 ` Michael Olbrich
  2017-11-02 12:20   ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Olbrich @ 2017-11-01 11:01 UTC (permalink / raw)
  To: ptxdist

Hi,

On Tue, Oct 31, 2017 at 06:28:14PM +0100, Guillermo Rodriguez Garcia wrote:
> For a ptxdist BSP I am managing I need to create a "hotfix" package to
> patch a number of files on already deployed devices.
> 
> This package will only be used on devices which are already deployed, and
> its files should not be part of the rootfs images if the platform is
> rebuilt. Is it possible to have ptxdist build an .ipk package that will not
> be included in the filesystem images ?
> 
> I was hoping that marking the package as "M" in ptxdist menuconfig would do
> the trick :) but that doesn't do what I thought.

It can be used like that, but for a single package, it's a bit complex.
If you use the regular images, then you can create a "lazy" package.
Just create a normal package and then modify the makefile like this:
"PACKAGES-$(PTXCONF_..." -> "LAZY_PACKAGES-$(PTXCONF_..."

The package will not be added to the rootfs, however, it will not be built
by default either. So you need to run "ptxdist targetinstall <pkg-name>" to
build it.

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] How to create "hotfix" packages
  2017-11-01 11:01 ` Michael Olbrich
@ 2017-11-02 12:20   ` Guillermo Rodriguez Garcia
  2017-11-02 12:38     ` Michael Olbrich
  0 siblings, 1 reply; 8+ messages in thread
From: Guillermo Rodriguez Garcia @ 2017-11-02 12:20 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1547 bytes --]

Hello Michael,

2017-11-01 12:01 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:

> Hi,
>
> On Tue, Oct 31, 2017 at 06:28:14PM +0100, Guillermo Rodriguez Garcia wrote:
> > For a ptxdist BSP I am managing I need to create a "hotfix" package to
> > patch a number of files on already deployed devices.
> >
> > This package will only be used on devices which are already deployed, and
> > its files should not be part of the rootfs images if the platform is
> > rebuilt. Is it possible to have ptxdist build an .ipk package that will
> not
> > be included in the filesystem images ?
> >
> > I was hoping that marking the package as "M" in ptxdist menuconfig would
> do
> > the trick :) but that doesn't do what I thought.
>
> It can be used like that, but for a single package, it's a bit complex.
>

Do you marking the package as "M"? I tried that but it seems to do exactly
the same as when I just enable it (with "*"). Am I missing something?


> If you use the regular images, then you can create a "lazy" package.
> Just create a normal package and then modify the makefile like this:
> "PACKAGES-$(PTXCONF_..." -> "LAZY_PACKAGES-$(PTXCONF_..."
>
> The package will not be added to the rootfs, however, it will not be built
> by default either. So you need to run "ptxdist targetinstall <pkg-name>" to
> build it.
>

But then when I do ptxdist targetinstall <pkg-name>, the .ipk will be
built, but will the files also be added to sysroot? The latter is what I
would like to avoid...


Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 2394 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] How to create "hotfix" packages
  2017-11-02 12:20   ` Guillermo Rodriguez Garcia
@ 2017-11-02 12:38     ` Michael Olbrich
  2017-11-02 14:09       ` Andreas Glatz
  2017-11-02 15:19       ` Guillermo Rodriguez Garcia
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Olbrich @ 2017-11-02 12:38 UTC (permalink / raw)
  To: ptxdist

On Thu, Nov 02, 2017 at 01:20:17PM +0100, Guillermo Rodriguez Garcia wrote:
> 2017-11-01 12:01 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> > On Tue, Oct 31, 2017 at 06:28:14PM +0100, Guillermo Rodriguez Garcia wrote:
> > > For a ptxdist BSP I am managing I need to create a "hotfix" package to
> > > patch a number of files on already deployed devices.
> > >
> > > This package will only be used on devices which are already deployed, and
> > > its files should not be part of the rootfs images if the platform is
> > > rebuilt. Is it possible to have ptxdist build an .ipk package that will
> > not
> > > be included in the filesystem images ?
> > >
> > > I was hoping that marking the package as "M" in ptxdist menuconfig would
> > do
> > > the trick :) but that doesn't do what I thought.
> >
> > It can be used like that, but for a single package, it's a bit complex.
> >
> 
> Do you marking the package as "M"? I tried that but it seems to do exactly
> the same as when I just enable it (with "*"). Am I missing something?

No, you need to use collections as well. There is some stuff about this in
the documentation.

> > If you use the regular images, then you can create a "lazy" package.
> > Just create a normal package and then modify the makefile like this:
> > "PACKAGES-$(PTXCONF_..." -> "LAZY_PACKAGES-$(PTXCONF_..."
> >
> > The package will not be added to the rootfs, however, it will not be built
> > by default either. So you need to run "ptxdist targetinstall <pkg-name>" to
> > build it.
> >
> 
> But then when I do ptxdist targetinstall <pkg-name>, the .ipk will be
> built, but will the files also be added to sysroot? The latter is what I
> would like to avoid...

Why? Sysroot is not used for the target rootfs. Do the files conflict with
other packages? In this case, you could define a custom <pkg>.install.post
target in the package makefile. That's the stage that copies the files to
sysroot-target.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] How to create "hotfix" packages
  2017-11-02 12:38     ` Michael Olbrich
@ 2017-11-02 14:09       ` Andreas Glatz
  2017-11-02 15:19       ` Guillermo Rodriguez Garcia
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Glatz @ 2017-11-02 14:09 UTC (permalink / raw)
  To: ptxdist

On Thu, Nov 2, 2017 at 12:38 PM, Michael Olbrich
<m.olbrich@pengutronix.de> wrote:
> On Thu, Nov 02, 2017 at 01:20:17PM +0100, Guillermo Rodriguez Garcia wrote:
>> 2017-11-01 12:01 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
>> > On Tue, Oct 31, 2017 at 06:28:14PM +0100, Guillermo Rodriguez Garcia wrote:
>> > > For a ptxdist BSP I am managing I need to create a "hotfix" package to
>> > > patch a number of files on already deployed devices.
>> > >
>> > > This package will only be used on devices which are already deployed, and
>> > > its files should not be part of the rootfs images if the platform is
>> > > rebuilt. Is it possible to have ptxdist build an .ipk package that will
>> > not
>> > > be included in the filesystem images ?
>> > >
>> > > I was hoping that marking the package as "M" in ptxdist menuconfig would
>> > do
>> > > the trick :) but that doesn't do what I thought.
>> >
>> > It can be used like that, but for a single package, it's a bit complex.
>> >
>>
>> Do you marking the package as "M"? I tried that but it seems to do exactly
>> the same as when I just enable it (with "*"). Am I missing something?
>
> No, you need to use collections as well. There is some stuff about this in
> the documentation.
>

We had a similar use-case, albeit it wasn't for a hotfix package.

I think the steps to achieve your goal could be as follows:

(i) you mark your hotfix package as 'tristate' in the *.in file
(ii) you create a collection config that does NOT include the hotfix
package, e.g. using 'ptxdist menuconfig collection
configs/mycollectionconfig'
(iii) run 'ptxdist go' (without any collection config link) to
generate all the packages + hotfix package
(iv) run 'ptxdist --collectionconfig=configs/mycollectionconfig images
=> creates the flash images, but w/o hotfix package applied

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] How to create "hotfix" packages
  2017-11-02 12:38     ` Michael Olbrich
  2017-11-02 14:09       ` Andreas Glatz
@ 2017-11-02 15:19       ` Guillermo Rodriguez Garcia
  2017-11-02 15:33         ` Michael Olbrich
  1 sibling, 1 reply; 8+ messages in thread
From: Guillermo Rodriguez Garcia @ 2017-11-02 15:19 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 2654 bytes --]

2017-11-02 13:38 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:

> On Thu, Nov 02, 2017 at 01:20:17PM +0100, Guillermo Rodriguez Garcia wrote:
> > 2017-11-01 12:01 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> > > On Tue, Oct 31, 2017 at 06:28:14PM +0100, Guillermo Rodriguez Garcia
> wrote:
> > > > For a ptxdist BSP I am managing I need to create a "hotfix" package
> to
> > > > patch a number of files on already deployed devices.
> > > >
> > > > This package will only be used on devices which are already
> deployed, and
> > > > its files should not be part of the rootfs images if the platform is
> > > > rebuilt. Is it possible to have ptxdist build an .ipk package that
> will
> > > not
> > > > be included in the filesystem images ?
> > > >
> > > > I was hoping that marking the package as "M" in ptxdist menuconfig
> would
> > > do
> > > > the trick :) but that doesn't do what I thought.
> > >
> > > It can be used like that, but for a single package, it's a bit complex.
> > >
> >
> > Do you marking the package as "M"? I tried that but it seems to do
> exactly
> > the same as when I just enable it (with "*"). Am I missing something?
>
> No, you need to use collections as well. There is some stuff about this in
> the documentation.
>

Ah, yes.


>
> > > If you use the regular images, then you can create a "lazy" package.
> > > Just create a normal package and then modify the makefile like this:
> > > "PACKAGES-$(PTXCONF_..." -> "LAZY_PACKAGES-$(PTXCONF_..."
> > >
> > > The package will not be added to the rootfs, however, it will not be
> built
> > > by default either. So you need to run "ptxdist targetinstall
> <pkg-name>" to
> > > build it.
> > >
> >
> > But then when I do ptxdist targetinstall <pkg-name>, the .ipk will be
> > built, but will the files also be added to sysroot? The latter is what I
> > would like to avoid...
>
> Why? Sysroot is not used for the target rootfs. Do the files conflict with
> other packages? In this case, you could define a custom <pkg>.install.post
> target in the package makefile. That's the stage that copies the files to
> sysroot-target.
>

Sorry for the confusion, I think I am mixing the sysroot-target with the
target rootfs. The actual question should have been:

When I do ptxdist targetinstall <pkg-name>, the .ipk will be built, files
copied to sysroot etc.

If I now recreate the rootfs images (via ptxdist images), will the files
from
this .ipk (which has now been built) be included? This is what I want
to avoid.

The reason as you point out is that these files conflict with other
packages.

Thank you,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 3969 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] How to create "hotfix" packages
  2017-11-02 15:19       ` Guillermo Rodriguez Garcia
@ 2017-11-02 15:33         ` Michael Olbrich
  2017-11-02 15:50           ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Olbrich @ 2017-11-02 15:33 UTC (permalink / raw)
  To: ptxdist

On Thu, Nov 02, 2017 at 04:19:03PM +0100, Guillermo Rodriguez Garcia wrote:
> 2017-11-02 13:38 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> > > > If you use the regular images, then you can create a "lazy" package.
> > > > Just create a normal package and then modify the makefile like this:
> > > > "PACKAGES-$(PTXCONF_..." -> "LAZY_PACKAGES-$(PTXCONF_..."
> > > >
> > > > The package will not be added to the rootfs, however, it will not be
> > built
> > > > by default either. So you need to run "ptxdist targetinstall
> > <pkg-name>" to
> > > > build it.
> > > >
> > >
> > > But then when I do ptxdist targetinstall <pkg-name>, the .ipk will be
> > > built, but will the files also be added to sysroot? The latter is what I
> > > would like to avoid...
> >
> > Why? Sysroot is not used for the target rootfs. Do the files conflict with
> > other packages? In this case, you could define a custom <pkg>.install.post
> > target in the package makefile. That's the stage that copies the files to
> > sysroot-target.
> >
> 
> Sorry for the confusion, I think I am mixing the sysroot-target with the
> target rootfs. The actual question should have been:
> 
> When I do ptxdist targetinstall <pkg-name>, the .ipk will be built, files
> copied to sysroot etc.
> 
> If I now recreate the rootfs images (via ptxdist images), will the files
> from
> this .ipk (which has now been built) be included? This is what I want
> to avoid.
> 
> The reason as you point out is that these files conflict with other
> packages.

That's what lazy packages are for. The rootfs images are created from the
ipkgs. All lazy packages are excluded from the default package list, so
those wont be included in the rootfs images.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] How to create "hotfix" packages
  2017-11-02 15:33         ` Michael Olbrich
@ 2017-11-02 15:50           ` Guillermo Rodriguez Garcia
  0 siblings, 0 replies; 8+ messages in thread
From: Guillermo Rodriguez Garcia @ 2017-11-02 15:50 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1950 bytes --]

Hi,

2017-11-02 16:33 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:

> On Thu, Nov 02, 2017 at 04:19:03PM +0100, Guillermo Rodriguez Garcia wrote:
> > 2017-11-02 13:38 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> > > > > If you use the regular images, then you can create a "lazy"
> package.
> > > > > Just create a normal package and then modify the makefile like
> this:
> > > > > "PACKAGES-$(PTXCONF_..." -> "LAZY_PACKAGES-$(PTXCONF_..."
> > > > >
> > > > > The package will not be added to the rootfs, however, it will not
> be
> > > built
> > > > > by default either. So you need to run "ptxdist targetinstall
> > > <pkg-name>" to
> > > > > build it.
> > > > >
> > > >
> > > > But then when I do ptxdist targetinstall <pkg-name>, the .ipk will be
> > > > built, but will the files also be added to sysroot? The latter is
> what I
> > > > would like to avoid...
> > >
> > > Why? Sysroot is not used for the target rootfs. Do the files conflict
> with
> > > other packages? In this case, you could define a custom
> <pkg>.install.post
> > > target in the package makefile. That's the stage that copies the files
> to
> > > sysroot-target.
> > >
> >
> > Sorry for the confusion, I think I am mixing the sysroot-target with the
> > target rootfs. The actual question should have been:
> >
> > When I do ptxdist targetinstall <pkg-name>, the .ipk will be built, files
> > copied to sysroot etc.
> >
> > If I now recreate the rootfs images (via ptxdist images), will the files
> > from
> > this .ipk (which has now been built) be included? This is what I want
> > to avoid.
> >
> > The reason as you point out is that these files conflict with other
> > packages.
>
> That's what lazy packages are for. The rootfs images are created from the
> ipkgs. All lazy packages are excluded from the default package list, so
> those wont be included in the rootfs images.
>

Then this is exactly what I am looking for. Thank you!

Guillermo

[-- Attachment #1.2: Type: text/html, Size: 2871 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2017-11-02 15:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 17:28 [ptxdist] How to create "hotfix" packages Guillermo Rodriguez Garcia
2017-11-01 11:01 ` Michael Olbrich
2017-11-02 12:20   ` Guillermo Rodriguez Garcia
2017-11-02 12:38     ` Michael Olbrich
2017-11-02 14:09       ` Andreas Glatz
2017-11-02 15:19       ` Guillermo Rodriguez Garcia
2017-11-02 15:33         ` Michael Olbrich
2017-11-02 15:50           ` Guillermo Rodriguez Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox