From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6527660707060645888 Date: Wed, 28 Feb 2018 09:37:23 -0800 (PST) From: chombourger@gmail.com To: isar-users Message-Id: Subject: bind mount for /downloads not happening MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6286_1047266988.1519839443116" X-Google-Token: ENPR29QFs_dMZkLSKhQ0 X-Google-IP: 81.14.33.59 X-TUID: xeFkqeA6aL4s ------=_Part_6286_1047266988.1519839443116 Content-Type: multipart/alternative; boundary="----=_Part_6287_812271645.1519839443117" ------=_Part_6287_812271645.1519839443117 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 ------=_Part_6287_812271645.1519839443117 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Jan,

I was in the process of rebasing to the lat= est 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 pr= ocess.
This change should no longer be required thanks to 9a8b7fe77cbd00= 6b6053f85e593301c60ea0cfbd (Make sure git repos are usable inside buildchro= ot)

It unfortunately did not quite work for me. I believe I understa= nd 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() {
=C2=A0=C2=A0=C2=A0=C2=A0 mkdir -p ${BU= ILDROOT}
=C2=A0=C2=A0=C2=A0=C2=A0 sudo mount --= bind ${WORKDIR} ${BUILDROOT}

=C2=A0=C2=A0=C2=A0=C2=A0 sudo flock ${= MOUNT_LOCKFILE} -c ' \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 if ! grep -q ${BUILDCHROOT_DIR}/isar-apt /proc/mounts; the= n \
=C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 mount --bind ${DEPLOY_DIR_= APT}/${DISTRO} ${BUILDCHROOT_DIR}/isar-apt; \
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2= =A0 =C2=A0=C2=A0=C2=A0 mount --bind ${DL_DIR} ${B= UILDCHROOT_DIR}/downloads; \
=C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 mount -t devtmpfs -o mode= =3D0755,nosuid devtmpfs ${BUILDCHROOT_DIR}/dev; \
=C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 mount -t proc none ${BUILD= CHROOT_DIR}/proc; \
=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0=C2=A0 fi'

We check if isar-apt was mounted to mount ever= ything else. OK.

We however have the following code also mounting is= ar-apt:

# https://github.com/ilbers/isar/blob/next/meta/recipes-devt= ools/buildchroot/buildchroot.bb#L68
do_build() {
=C2= =A0=C2=A0=C2=A0 ...
=C2=A0=C2=A0=C2=A0 sudo mount --bind ${DEPLOY_DIR_AP= T}/${DISTRO} ${BUILDCHROOT_DIR}/isar-apt
=C2=A0=C2=A0=C2=A0 sudo mount -t devt= mpfs -o mode=3D0755,nosuid devtmpfs ${BUILDCHROOT_DIR}/dev
=C2=A0=C2=A0=C2=A0 sudo mount -t proc none= ${BUILDCHROOT_DIR}/proc
=C2=A0=C2=A0=C2=A0 ...

If you do a full = platform build, isar-apt will get mounted from the buildchroot recipe and o= ur downloads folder will not be mounted from dpkg-base.bb (and cause our sw= iupdate recipe to fail)

I would be tempted to add a bind mount for d= ownloads in the buildchroot recipe. The other option would be add a check i= n dpkg-base.bb for downloads being mounted (we would then have 2 "if&q= uot; statements in the code block passed to flock.

Thoughts?

= Cedric
------=_Part_6287_812271645.1519839443117-- ------=_Part_6286_1047266988.1519839443116--