mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Opkg status file in initrd
@ 2020-08-24 14:50 Ariel Garcia
  2020-08-28  9:50 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Ariel Garcia @ 2020-08-24 14:50 UTC (permalink / raw)
  To: ptxdist

Hello,

i'm having a hard time trying to understand why a /usr/share/opkg/status
file is landing in the root.cpio which itself is used for the initrd in a 
kernel... (resp. which script/step/etc may i touch to change that)

I am trying to make the build fully reproducible and the opkg/status file 
contains the "Installation-Time".

Any hint?

Thanks in advance,
A. Garcia




_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Opkg status file in initrd
  2020-08-24 14:50 [ptxdist] Opkg status file in initrd Ariel Garcia
@ 2020-08-28  9:50 ` Michael Olbrich
  2020-08-28 12:56   ` Ariel Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2020-08-28  9:50 UTC (permalink / raw)
  To: ptxdist

Hi,

On Mon, Aug 24, 2020 at 04:50:02PM +0200, Ariel Garcia wrote:
> i'm having a hard time trying to understand why a /usr/share/opkg/status
> file is landing in the root.cpio which itself is used for the initrd in a 
> kernel... (resp. which script/step/etc may i touch to change that)
> 
> I am trying to make the build fully reproducible and the opkg/status file 
> contains the "Installation-Time".
> 
> Any hint?

I think the best solution would be to just remove /usr/share/opkg before
the cpio is created. You don't need this anyways.
If you use the default rule for root.cpio, then you can copy
config/images/cpio.config into your BSP and add:

exec-pre = "rm -r '${IMAGEMOUNTPATH}/usr/share/opkg'"

I think. This is untested, so you should probably start with an 'echo' to
see if the path is correct.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Opkg status file in initrd
  2020-08-28  9:50 ` Michael Olbrich
@ 2020-08-28 12:56   ` Ariel Garcia
  2020-08-28 13:26     ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Ariel Garcia @ 2020-08-28 12:56 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

Hi,

thanks a lot for your answer.

It works now, i only had to fiddle a bit to find the right path variables...
genimage does not seem to export any for exec-pre commands (in particular TMPPATH 
used internally) so had to resort to a not-so-nice shell glob
  ${PTXDIST_TEMPDIR}/genimage.*/root/usr/share/opkg


For future reference, the end result is:

-----------
$ cat configs/platform-name/config/images/cpio.config

image @IMAGE@ {
    exec-pre = "rm -rf ${PTXDIST_TEMPDIR}/genimage.*/root/usr/share/opkg ; \
                touch -r ${PTXDIST_TEMPDIR}/genimage.*/root/usr {PTXDIST_TEMPDIR}/genimage.*/root/usr/share"
    cpio {
        format = "@FORMAT@"
        compress = "@COMPRESS@"
    }
}
-----------

Greetings


On Friday, 28 August 2020 11:50:15 CEST Michael Olbrich wrote:
> Hi,
> 
> On Mon, Aug 24, 2020 at 04:50:02PM +0200, Ariel Garcia wrote:
> > i'm having a hard time trying to understand why a /usr/share/opkg/status
> > file is landing in the root.cpio which itself is used for the initrd in a
> > kernel... (resp. which script/step/etc may i touch to change that)
> > 
> > I am trying to make the build fully reproducible and the opkg/status file
> > contains the "Installation-Time".
> > 
> > Any hint?
> 
> I think the best solution would be to just remove /usr/share/opkg before
> the cpio is created. You don't need this anyways.
> If you use the default rule for root.cpio, then you can copy
> config/images/cpio.config into your BSP and add:
> 
> exec-pre = "rm -r '${IMAGEMOUNTPATH}/usr/share/opkg'"
> 
> I think. This is untested, so you should probably start with an 'echo' to
> see if the path is correct.





_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Opkg status file in initrd
  2020-08-28 12:56   ` Ariel Garcia
@ 2020-08-28 13:26     ` Michael Olbrich
  2020-09-04 17:23       ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2020-08-28 13:26 UTC (permalink / raw)
  To: ptxdist; +Cc: Ariel Garcia

On Fri, Aug 28, 2020 at 02:56:23PM +0200, Ariel Garcia wrote:
> Hi,
> 
> thanks a lot for your answer.
> 
> It works now, i only had to fiddle a bit to find the right path variables...
> genimage does not seem to export any for exec-pre commands (in particular TMPPATH 
> used internally) so had to resort to a not-so-nice shell glob
>   ${PTXDIST_TEMPDIR}/genimage.*/root/usr/share/opkg

Right, $IMAGEMOUNTPATH should be defined, but it's not. That's a bug in
genimage. I need to fix that. You can work around this by explicitly
setting 'mountpoint = "/"'. Then $IMAGEMOUNTPATH is defined.

Michael

> 
> For future reference, the end result is:
> 
> -----------
> $ cat configs/platform-name/config/images/cpio.config
> 
> image @IMAGE@ {
>     exec-pre = "rm -rf ${PTXDIST_TEMPDIR}/genimage.*/root/usr/share/opkg ; \
>                 touch -r ${PTXDIST_TEMPDIR}/genimage.*/root/usr {PTXDIST_TEMPDIR}/genimage.*/root/usr/share"
>     cpio {
>         format = "@FORMAT@"
>         compress = "@COMPRESS@"
>     }
> }
> -----------
> 
> Greetings
> 
> 
> On Friday, 28 August 2020 11:50:15 CEST Michael Olbrich wrote:
> > Hi,
> > 
> > On Mon, Aug 24, 2020 at 04:50:02PM +0200, Ariel Garcia wrote:
> > > i'm having a hard time trying to understand why a /usr/share/opkg/status
> > > file is landing in the root.cpio which itself is used for the initrd in a
> > > kernel... (resp. which script/step/etc may i touch to change that)
> > > 
> > > I am trying to make the build fully reproducible and the opkg/status file
> > > contains the "Installation-Time".
> > > 
> > > Any hint?
> > 
> > I think the best solution would be to just remove /usr/share/opkg before
> > the cpio is created. You don't need this anyways.
> > If you use the default rule for root.cpio, then you can copy
> > config/images/cpio.config into your BSP and add:
> > 
> > exec-pre = "rm -r '${IMAGEMOUNTPATH}/usr/share/opkg'"
> > 
> > I think. This is untested, so you should probably start with an 'echo' to
> > see if the path is correct.
> 
> 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] Opkg status file in initrd
  2020-08-28 13:26     ` Michael Olbrich
@ 2020-09-04 17:23       ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2020-09-04 17:23 UTC (permalink / raw)
  To: ptxdist, Ariel Garcia

On Fri, Aug 28, 2020 at 03:26:10PM +0200, Michael Olbrich wrote:
> On Fri, Aug 28, 2020 at 02:56:23PM +0200, Ariel Garcia wrote:
> > Hi,
> > 
> > thanks a lot for your answer.
> > 
> > It works now, i only had to fiddle a bit to find the right path variables...
> > genimage does not seem to export any for exec-pre commands (in particular TMPPATH 
> > used internally) so had to resort to a not-so-nice shell glob
> >   ${PTXDIST_TEMPDIR}/genimage.*/root/usr/share/opkg
> 
> Right, $IMAGEMOUNTPATH should be defined, but it's not. That's a bug in
> genimage. I need to fix that. You can work around this by explicitly
> setting 'mountpoint = "/"'. Then $IMAGEMOUNTPATH is defined.

FYI: https://github.com/pengutronix/genimage/pull/119

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

end of thread, other threads:[~2020-09-04 17:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 14:50 [ptxdist] Opkg status file in initrd Ariel Garcia
2020-08-28  9:50 ` Michael Olbrich
2020-08-28 12:56   ` Ariel Garcia
2020-08-28 13:26     ` Michael Olbrich
2020-09-04 17:23       ` Michael Olbrich

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