* bind mount for /downloads not happening
@ 2018-02-28 17:37 chombourger
2018-02-28 17:55 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: chombourger @ 2018-02-28 17:37 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 1994 bytes --]
Hi Jan,
I was in the process of rebasing to the latest Isar/next to discard some of
the local commits we had.
In particular we had a change from Christian to make git trees available to
the build process.
This change should no longer be required thanks to
9a8b7fe77cbd006b6053f85e593301c60ea0cfbd (Make sure git repos are usable
inside buildchroot)
It unfortunately did not quite work for me. I believe I understand why and
wanted to run my theory by you to double-check!.
#
https://github.com/ilbers/isar/blob/next/meta/classes/dpkg-base.bbclass#L44
do_build() {
mkdir -p ${BUILDROOT}
sudo mount --bind ${WORKDIR} ${BUILDROOT}
sudo flock ${MOUNT_LOCKFILE} -c ' \
if ! grep -q ${BUILDCHROOT_DIR}/isar-apt /proc/mounts; then \
mount --bind ${DEPLOY_DIR_APT}/${DISTRO}
${BUILDCHROOT_DIR}/isar-apt; \
mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads; \
mount -t devtmpfs -o mode=0755,nosuid devtmpfs
${BUILDCHROOT_DIR}/dev; \
mount -t proc none ${BUILDCHROOT_DIR}/proc; \
fi'
We check if isar-apt was mounted to mount everything else. OK.
We however have the following code also mounting isar-apt:
#
https://github.com/ilbers/isar/blob/next/meta/recipes-devtools/buildchroot/buildchroot.bb#L68
do_build() {
...
sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO}
${BUILDCHROOT_DIR}/isar-apt
sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs
${BUILDCHROOT_DIR}/dev
sudo mount -t proc none ${BUILDCHROOT_DIR}/proc
...
If you do a full platform build, isar-apt will get mounted from the
buildchroot recipe and our downloads folder will not be mounted from
dpkg-base.bb (and cause our swiupdate recipe to fail)
I would be tempted to add a bind mount for downloads in the buildchroot
recipe. The other option would be add a check in dpkg-base.bb for downloads
being mounted (we would then have 2 "if" statements in the code block
passed to flock.
Thoughts?
Cedric
[-- Attachment #1.2: Type: text/html, Size: 5260 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bind mount for /downloads not happening
2018-02-28 17:37 bind mount for /downloads not happening chombourger
@ 2018-02-28 17:55 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2018-02-28 17:55 UTC (permalink / raw)
To: chombourger, isar-users
On 2018-02-28 18:37, chombourger@gmail.com wrote:
> Hi Jan,
>
> I was in the process of rebasing to the latest Isar/next to discard some of
> the local commits we had.
> In particular we had a change from Christian to make git trees available to
> the build process.
> This change should no longer be required thanks to
> 9a8b7fe77cbd006b6053f85e593301c60ea0cfbd (Make sure git repos are usable
> inside buildchroot)
>
> It unfortunately did not quite work for me. I believe I understand why and
> wanted to run my theory by you to double-check!.
>
> #
> https://github.com/ilbers/isar/blob/next/meta/classes/dpkg-base.bbclass#L44
> do_build() {
> mkdir -p ${BUILDROOT}
> sudo mount --bind ${WORKDIR} ${BUILDROOT}
>
> sudo flock ${MOUNT_LOCKFILE} -c ' \
> if ! grep -q ${BUILDCHROOT_DIR}/isar-apt /proc/mounts; then \
> mount --bind ${DEPLOY_DIR_APT}/${DISTRO}
> ${BUILDCHROOT_DIR}/isar-apt; \
> mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads; \
> mount -t devtmpfs -o mode=0755,nosuid devtmpfs
> ${BUILDCHROOT_DIR}/dev; \
> mount -t proc none ${BUILDCHROOT_DIR}/proc; \
> fi'
>
> We check if isar-apt was mounted to mount everything else. OK.
>
> We however have the following code also mounting isar-apt:
>
> #
> https://github.com/ilbers/isar/blob/next/meta/recipes-devtools/buildchroot/buildchroot.bb#L68
> do_build() {
> ...
> sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO}
> ${BUILDCHROOT_DIR}/isar-apt
> sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs
> ${BUILDCHROOT_DIR}/dev
> sudo mount -t proc none ${BUILDCHROOT_DIR}/proc
> ...
>
> If you do a full platform build, isar-apt will get mounted from the
> buildchroot recipe and our downloads folder will not be mounted from
> dpkg-base.bb (and cause our swiupdate recipe to fail)
>
> I would be tempted to add a bind mount for downloads in the buildchroot
> recipe. The other option would be add a check in dpkg-base.bb for downloads
> being mounted (we would then have 2 "if" statements in the code block
> passed to flock.
>
> Thoughts?
Good catch. I probably missed this during tests because I didn't check
the result of a full rebuild.
Let's just quickly add the download mount also to buildchroot.bb. Things
should get centralized soon with the switch to debootstrap and Claudius'
refactorings along that.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-28 17:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 17:37 bind mount for /downloads not happening chombourger
2018-02-28 17:55 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox