public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] Fix mounting of downloads dir into buildchroot
@ 2018-06-12 21:35 Jan Kiszka
  2018-06-14  8:40 ` Henning Schild
  2018-06-14 13:10 ` Maxim Yu. Osipov
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Kiszka @ 2018-06-12 21:35 UTC (permalink / raw)
  To: isar-users

setup_root_file_system() mounts most of the required paths buildchroot
needs into its rootfs - except for the downloads dir. But do_build() of
dpkg-base cannot not detect this gap because it tests for isar-apt being
mounted.

To close the gap without causing duplicate mounts, just add the missing
mount to the end of buildchroot do_build().

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-devtools/buildchroot/buildchroot.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
index 538c577..2ed5cf2 100644
--- a/meta/recipes-devtools/buildchroot/buildchroot.bb
+++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
@@ -78,4 +78,6 @@ do_build() {
     # Configure root filesystem
     sudo install -m 755 ${WORKDIR}/configscript.sh ${BUILDCHROOT_DIR}
     sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
+
+    sudo mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads
 }
-- 
2.13.7

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

* Re: [PATCH] Fix mounting of downloads dir into buildchroot
  2018-06-12 21:35 [PATCH] Fix mounting of downloads dir into buildchroot Jan Kiszka
@ 2018-06-14  8:40 ` Henning Schild
  2018-06-14  8:43   ` Jan Kiszka
  2018-06-14 13:10 ` Maxim Yu. Osipov
  1 sibling, 1 reply; 6+ messages in thread
From: Henning Schild @ 2018-06-14  8:40 UTC (permalink / raw)
  To: [ext] Jan Kiszka; +Cc: isar-users

Am Tue, 12 Jun 2018 23:35:48 +0200
schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:

> setup_root_file_system() mounts most of the required paths buildchroot
> needs into its rootfs - except for the downloads dir. But do_build()
> of dpkg-base cannot not detect this gap because it tests for isar-apt
> being mounted.
>
> To close the gap without causing duplicate mounts, just add the
> missing mount to the end of buildchroot do_build().

I am not sure i understand why you need that directory mounted in the
first place. You build deps or recipe SRC_URI should provide you with
everything you need.
Can you please provide an example?

Henning
 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta/recipes-devtools/buildchroot/buildchroot.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb
> b/meta/recipes-devtools/buildchroot/buildchroot.bb index
> 538c577..2ed5cf2 100644 ---
> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++
> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -78,4 +78,6 @@
> do_build() { # Configure root filesystem
>      sudo install -m 755 ${WORKDIR}/configscript.sh ${BUILDCHROOT_DIR}
>      sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
> +
> +    sudo mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads
>  }


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

* Re: [PATCH] Fix mounting of downloads dir into buildchroot
  2018-06-14  8:40 ` Henning Schild
@ 2018-06-14  8:43   ` Jan Kiszka
  2018-06-14 11:15     ` Henning Schild
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2018-06-14  8:43 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 2018-06-14 10:40, Henning Schild wrote:
> Am Tue, 12 Jun 2018 23:35:48 +0200
> schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
> 
>> setup_root_file_system() mounts most of the required paths buildchroot
>> needs into its rootfs - except for the downloads dir. But do_build()
>> of dpkg-base cannot not detect this gap because it tests for isar-apt
>> being mounted.
>>
>> To close the gap without causing duplicate mounts, just add the
>> missing mount to the end of buildchroot do_build().
> 
> I am not sure i understand why you need that directory mounted in the
> first place. You build deps or recipe SRC_URI should provide you with
> everything you need.
> Can you please provide an example?

 - retrieval of git revision for the build (see also 9a8b7fe77cbd)
 - pushing recipe-private downloads into that folder (that is a special
   case, granted)

Jan

> 
> Henning
>  
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  meta/recipes-devtools/buildchroot/buildchroot.bb | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb
>> b/meta/recipes-devtools/buildchroot/buildchroot.bb index
>> 538c577..2ed5cf2 100644 ---
>> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++
>> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -78,4 +78,6 @@
>> do_build() { # Configure root filesystem
>>      sudo install -m 755 ${WORKDIR}/configscript.sh ${BUILDCHROOT_DIR}
>>      sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
>> +
>> +    sudo mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads
>>  }
> 


-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* Re: [PATCH] Fix mounting of downloads dir into buildchroot
  2018-06-14  8:43   ` Jan Kiszka
@ 2018-06-14 11:15     ` Henning Schild
  2018-06-14 12:09       ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Henning Schild @ 2018-06-14 11:15 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: isar-users

Am Thu, 14 Jun 2018 10:43:52 +0200
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> On 2018-06-14 10:40, Henning Schild wrote:
> > Am Tue, 12 Jun 2018 23:35:48 +0200
> > schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
> >   
> >> setup_root_file_system() mounts most of the required paths
> >> buildchroot needs into its rootfs - except for the downloads dir.
> >> But do_build() of dpkg-base cannot not detect this gap because it
> >> tests for isar-apt being mounted.
> >>
> >> To close the gap without causing duplicate mounts, just add the
> >> missing mount to the end of buildchroot do_build().  
> > 
> > I am not sure i understand why you need that directory mounted in
> > the first place. You build deps or recipe SRC_URI should provide
> > you with everything you need.
> > Can you please provide an example?  
> 
>  - retrieval of git revision for the build (see also 9a8b7fe77cbd)

mhh that stupid git again, i wish my "non-shared unpack" patch would
have gotten accepted in bitbake.
So that mount from 9a8b7fe77cbd got lost with debootstrap?

>  - pushing recipe-private downloads into that folder (that is a
> special case, granted)

Something that probably should not be allowed ... thinking about
reproducing a build. Right now we "just" have to tame apt and bitbake.

Henning

> 
> Jan
> 
> > 
> > Henning
> >    
> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >> ---
> >>  meta/recipes-devtools/buildchroot/buildchroot.bb | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb
> >> b/meta/recipes-devtools/buildchroot/buildchroot.bb index
> >> 538c577..2ed5cf2 100644 ---
> >> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++
> >> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -78,4 +78,6
> >> @@ do_build() { # Configure root filesystem
> >>      sudo install -m 755 ${WORKDIR}/configscript.sh
> >> ${BUILDCHROOT_DIR} sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
> >> +
> >> +    sudo mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads
> >>  }  
> >   
> 
> 


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

* Re: [PATCH] Fix mounting of downloads dir into buildchroot
  2018-06-14 11:15     ` Henning Schild
@ 2018-06-14 12:09       ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2018-06-14 12:09 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 2018-06-14 13:15, Henning Schild wrote:
> Am Thu, 14 Jun 2018 10:43:52 +0200
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> 
>> On 2018-06-14 10:40, Henning Schild wrote:
>>> Am Tue, 12 Jun 2018 23:35:48 +0200
>>> schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
>>>   
>>>> setup_root_file_system() mounts most of the required paths
>>>> buildchroot needs into its rootfs - except for the downloads dir.
>>>> But do_build() of dpkg-base cannot not detect this gap because it
>>>> tests for isar-apt being mounted.
>>>>
>>>> To close the gap without causing duplicate mounts, just add the
>>>> missing mount to the end of buildchroot do_build().  
>>>
>>> I am not sure i understand why you need that directory mounted in
>>> the first place. You build deps or recipe SRC_URI should provide
>>> you with everything you need.
>>> Can you please provide an example?  
>>
>>  - retrieval of git revision for the build (see also 9a8b7fe77cbd)
> 
> mhh that stupid git again, i wish my "non-shared unpack" patch would
> have gotten accepted in bitbake.

It's not git-specific. It's about the build system of the package has a
chance to retrieve the git revision from the repo - in case the upstream
package is expecting to do that, like in the Jailhouse case.

> So that mount from 9a8b7fe77cbd got lost with debootstrap?

Yes, that is a likely a regression of the debootstrap refactoring.

> 
>>  - pushing recipe-private downloads into that folder (that is a
>> special case, granted)
> 
> Something that probably should not be allowed ... thinking about
> reproducing a build. Right now we "just" have to tame apt and bitbake.

It's not as bad in this case as it seems (and fixing the issue makes it
even better) because buildroot [1] is pulling well-defined packages.

Jan

[1]
https://github.com/siemens/jailhouse-images/blob/master/recipes-core/non-root-initramfs/non-root-initramfs_2017.11.2.bb

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* Re: [PATCH] Fix mounting of downloads dir into buildchroot
  2018-06-12 21:35 [PATCH] Fix mounting of downloads dir into buildchroot Jan Kiszka
  2018-06-14  8:40 ` Henning Schild
@ 2018-06-14 13:10 ` Maxim Yu. Osipov
  1 sibling, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2018-06-14 13:10 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

On 06/12/2018 11:35 PM, Jan Kiszka wrote:
> setup_root_file_system() mounts most of the required paths buildchroot
> needs into its rootfs - except for the downloads dir. But do_build() of
> dpkg-base cannot not detect this gap because it tests for isar-apt being
> mounted.
> 
> To close the gap without causing duplicate mounts, just add the missing
> mount to the end of buildchroot do_build().
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>   meta/recipes-devtools/buildchroot/buildchroot.bb | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb b/meta/recipes-devtools/buildchroot/buildchroot.bb
> index 538c577..2ed5cf2 100644
> --- a/meta/recipes-devtools/buildchroot/buildchroot.bb
> +++ b/meta/recipes-devtools/buildchroot/buildchroot.bb
> @@ -78,4 +78,6 @@ do_build() {
>       # Configure root filesystem
>       sudo install -m 755 ${WORKDIR}/configscript.sh ${BUILDCHROOT_DIR}
>       sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
> +
> +    sudo mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads
>   }
> 

Applied to the 'next'.

Thanks,
Maxim.

-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

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

end of thread, other threads:[~2018-06-14 13:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 21:35 [PATCH] Fix mounting of downloads dir into buildchroot Jan Kiszka
2018-06-14  8:40 ` Henning Schild
2018-06-14  8:43   ` Jan Kiszka
2018-06-14 11:15     ` Henning Schild
2018-06-14 12:09       ` Jan Kiszka
2018-06-14 13:10 ` Maxim Yu. Osipov

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