public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Clean bitbake.conf and allow DL_DIR from env
@ 2018-11-27  9:52 Harald Seiler
  2018-11-27  9:53 ` [PATCH 1/2] meta: Only use isar's own bitbake.conf Harald Seiler
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Harald Seiler @ 2018-11-27  9:52 UTC (permalink / raw)
  To: isar-users

As suggested by Jan in <09b4d369-b3bf-0e2e-7d1e-47b1660d555e@siemens.com>:

> Then I would say - in order to keep bitbake/ clean - we should promote 
> isar-bitbake.conf to the only bitbake.conf we use, migrating current 
> bitbake.conf content over.

Harald Seiler (2):
  meta: Only use isar's own bitbake.conf
  meta: Allow setting DL_DIR from environment

 meta/conf/isar-bitbake.conf | 30 +++++++++++++++++++++++++++++-
 scripts/isar-setup-builddir | 21 ---------------------
 2 files changed, 29 insertions(+), 22 deletions(-)


-- 
Harald

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62  Fax: +49-8142-66989-80   Email: hws@denx.de 


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

* [PATCH 1/2] meta: Only use isar's own bitbake.conf
  2018-11-27  9:52 [PATCH 0/2] Clean bitbake.conf and allow DL_DIR from env Harald Seiler
@ 2018-11-27  9:53 ` Harald Seiler
  2018-12-07 14:30   ` Jan Kiszka
  2018-11-27  9:54 ` [PATCH 2/2] meta: Allow setting DL_DIR from environment Harald Seiler
  2018-12-10 10:22 ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env claudius.heine.ext
  2 siblings, 1 reply; 12+ messages in thread
From: Harald Seiler @ 2018-11-27  9:53 UTC (permalink / raw)
  To: isar-users

Similarly to yocto, this commit makes isar only
use its own bitbake.conf.  It also adds necessary
variables from bitbake's config so everything still
works.

Signed-off-by: Harald Seiler <hws@denx.de>
---
 meta/conf/isar-bitbake.conf | 28 ++++++++++++++++++++++++++++
 scripts/isar-setup-builddir | 21 ---------------------
 2 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
index bc52d08..f23bf6e 100644
--- a/meta/conf/isar-bitbake.conf
+++ b/meta/conf/isar-bitbake.conf
@@ -18,6 +18,34 @@
 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 # OTHER DEALINGS IN THE SOFTWARE.
 
+# Variables from bitbake/conf/bitbake.conf
+B = "${S}"
+CVSDIR = "${DL_DIR}/cvs"
+DEPENDS = ""
+DEPLOY_DIR = "${TMPDIR}/deploy"
+FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
+FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
+GITDIR = "${DL_DIR}/git"
+IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
+IMAGE_ROOTFS = "${TMPDIR}/rootfs"
+OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
+P = "${PN}-${PV}"
+PF = "${PN}-${PV}-${PR}"
+PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
+PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
+PROVIDES = ""
+PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
+S = "${WORKDIR}/${P}"
+SRC_URI = "file://${FILE}"
+STAMP = "${TMPDIR}/stamps/${PF}"
+SVNDIR = "${DL_DIR}/svn"
+T = "${WORKDIR}/temp"
+TARGET_ARCH = "${BUILD_ARCH}"
+TMPDIR = "${TOPDIR}/tmp"
+PERSISTENT_DIR = "${TMPDIR}/cache"
+GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
+
+# isar specific config
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
 DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
index cabe732..d344148 100755
--- a/scripts/isar-setup-builddir
+++ b/scripts/isar-setup-builddir
@@ -110,30 +110,9 @@ cat <<EOF > $BUILDDIR/conf/bitbake.conf
 # THIS FILE IS GENERATED! DO NOT MESS WITH IT!
 # ********************************************
 
-# ---------
-# begin original bitbake.conf
-# ---------
-
-EOF
-cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
-  "$BUILDDIR/conf/bitbake.conf"
-cat <<EOF >> $BUILDDIR/conf/bitbake.conf
-# ---------
-# end original bitbake.conf
-# ---------
-
-# ---------
-# begin isar-bitbake.conf
-# ---------
-
 EOF
 cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
   "$BUILDDIR/conf/bitbake.conf"
-cat <<EOF >> $BUILDDIR/conf/bitbake.conf
-# ---------
-# end isar-bitbake.conf
-# ---------
-EOF
 
 # Ending the first-time run message. Show the no documentation banner.
 if [ ! -z "$SHOWYPDOC" ]; then

-- 
Harald

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62  Fax: +49-8142-66989-80   Email: hws@denx.de 


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

* [PATCH 2/2] meta: Allow setting DL_DIR from environment
  2018-11-27  9:52 [PATCH 0/2] Clean bitbake.conf and allow DL_DIR from env Harald Seiler
  2018-11-27  9:53 ` [PATCH 1/2] meta: Only use isar's own bitbake.conf Harald Seiler
@ 2018-11-27  9:54 ` Harald Seiler
  2018-12-10 10:22 ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env claudius.heine.ext
  2 siblings, 0 replies; 12+ messages in thread
From: Harald Seiler @ 2018-11-27  9:54 UTC (permalink / raw)
  To: isar-users

This patch allows adding DL_DIR to BB_ENV_EXTRAWHITE
and then specifying a custon DL_DIR in the environment.

This behavior mirros the one in poky/yocto.

Signed-off-by: Harald Seiler <hws@denx.de>
---
 meta/conf/isar-bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
index f23bf6e..7e8dea1 100644
--- a/meta/conf/isar-bitbake.conf
+++ b/meta/conf/isar-bitbake.conf
@@ -49,7 +49,7 @@ GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
 DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
-DL_DIR = "${TOPDIR}/downloads"
+DL_DIR ?= "${TOPDIR}/downloads"
 SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
 BUILDCHROOT_HOST_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-host/rootfs"
 BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target/rootfs"

-- 
Harald

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62  Fax: +49-8142-66989-80   Email: hws@denx.de 


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

* Re: [PATCH 1/2] meta: Only use isar's own bitbake.conf
  2018-11-27  9:53 ` [PATCH 1/2] meta: Only use isar's own bitbake.conf Harald Seiler
@ 2018-12-07 14:30   ` Jan Kiszka
  2018-12-10  9:31     ` Claudius Heine
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Kiszka @ 2018-12-07 14:30 UTC (permalink / raw)
  To: Harald Seiler, isar-users

On 27.11.18 10:53, Harald Seiler wrote:
> Similarly to yocto, this commit makes isar only
> use its own bitbake.conf.  It also adds necessary
> variables from bitbake's config so everything still
> works.
> 
> Signed-off-by: Harald Seiler <hws@denx.de>
> ---
>   meta/conf/isar-bitbake.conf | 28 ++++++++++++++++++++++++++++
>   scripts/isar-setup-builddir | 21 ---------------------
>   2 files changed, 28 insertions(+), 21 deletions(-)
> 
> diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
> index bc52d08..f23bf6e 100644
> --- a/meta/conf/isar-bitbake.conf
> +++ b/meta/conf/isar-bitbake.conf
> @@ -18,6 +18,34 @@
>   # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>   # OTHER DEALINGS IN THE SOFTWARE.
>   
> +# Variables from bitbake/conf/bitbake.conf
> +B = "${S}"
> +CVSDIR = "${DL_DIR}/cvs"
> +DEPENDS = ""
> +DEPLOY_DIR = "${TMPDIR}/deploy"
> +FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
> +FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
> +GITDIR = "${DL_DIR}/git"
> +IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
> +IMAGE_ROOTFS = "${TMPDIR}/rootfs"
> +OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
> +P = "${PN}-${PV}"
> +PF = "${PN}-${PV}-${PR}"
> +PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
> +PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
> +PROVIDES = ""
> +PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
> +S = "${WORKDIR}/${P}"
> +SRC_URI = "file://${FILE}"
> +STAMP = "${TMPDIR}/stamps/${PF}"
> +SVNDIR = "${DL_DIR}/svn"
> +T = "${WORKDIR}/temp"
> +TARGET_ARCH = "${BUILD_ARCH}"
> +TMPDIR = "${TOPDIR}/tmp"
> +PERSISTENT_DIR = "${TMPDIR}/cache"
> +GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
> +
> +# isar specific config
>   WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
>   DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
>   DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
> diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
> index cabe732..d344148 100755
> --- a/scripts/isar-setup-builddir
> +++ b/scripts/isar-setup-builddir
> @@ -110,30 +110,9 @@ cat <<EOF > $BUILDDIR/conf/bitbake.conf
>   # THIS FILE IS GENERATED! DO NOT MESS WITH IT!
>   # ********************************************
>   
> -# ---------
> -# begin original bitbake.conf
> -# ---------
> -
> -EOF
> -cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
> -  "$BUILDDIR/conf/bitbake.conf"
> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> -# ---------
> -# end original bitbake.conf
> -# ---------
> -
> -# ---------
> -# begin isar-bitbake.conf
> -# ---------
> -
>   EOF
>   cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
>     "$BUILDDIR/conf/bitbake.conf"
> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> -# ---------
> -# end isar-bitbake.conf
> -# ---------
> -EOF
>   
>   # Ending the first-time run message. Show the no documentation banner.
>   if [ ! -z "$SHOWYPDOC" ]; then
> 

This series is still pending, I just realized (while writing "all configuration 
starts with bitbake.conf").

Looks good, I just think we should simply rename isar-bitbake.conf to 
bitbake.conf and copy that in during setup.

Jan

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

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

* Re: [PATCH 1/2] meta: Only use isar's own bitbake.conf
  2018-12-07 14:30   ` Jan Kiszka
@ 2018-12-10  9:31     ` Claudius Heine
  2018-12-10  9:32       ` Jan Kiszka
  0 siblings, 1 reply; 12+ messages in thread
From: Claudius Heine @ 2018-12-10  9:31 UTC (permalink / raw)
  To: [ext] Jan Kiszka, Harald Seiler, isar-users

Hi Jan,

On 07/12/2018 15.30, [ext] Jan Kiszka wrote:
> On 27.11.18 10:53, Harald Seiler wrote:
>> Similarly to yocto, this commit makes isar only
>> use its own bitbake.conf.  It also adds necessary
>> variables from bitbake's config so everything still
>> works.
>>
>> Signed-off-by: Harald Seiler <hws@denx.de>
>> ---
>>   meta/conf/isar-bitbake.conf | 28 ++++++++++++++++++++++++++++
>>   scripts/isar-setup-builddir | 21 ---------------------
>>   2 files changed, 28 insertions(+), 21 deletions(-)
>>
>> diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
>> index bc52d08..f23bf6e 100644
>> --- a/meta/conf/isar-bitbake.conf
>> +++ b/meta/conf/isar-bitbake.conf
>> @@ -18,6 +18,34 @@
>>   # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>>   # OTHER DEALINGS IN THE SOFTWARE.
>> +# Variables from bitbake/conf/bitbake.conf
>> +B = "${S}"
>> +CVSDIR = "${DL_DIR}/cvs"
>> +DEPENDS = ""
>> +DEPLOY_DIR = "${TMPDIR}/deploy"
>> +FILESPATH = 
>> "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" 
>>
>> +FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
>> +GITDIR = "${DL_DIR}/git"
>> +IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
>> +IMAGE_ROOTFS = "${TMPDIR}/rootfs"
>> +OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
>> +P = "${PN}-${PV}"
>> +PF = "${PN}-${PV}-${PR}"
>> +PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', 
>> False),d)[0] or 'defaultpkgname'}"
>> +PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', 
>> False),d)[2] or 'r0'}"
>> +PROVIDES = ""
>> +PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', 
>> False),d)[1] or '1.0'}"
>> +S = "${WORKDIR}/${P}"
>> +SRC_URI = "file://${FILE}"
>> +STAMP = "${TMPDIR}/stamps/${PF}"
>> +SVNDIR = "${DL_DIR}/svn"
>> +T = "${WORKDIR}/temp"
>> +TARGET_ARCH = "${BUILD_ARCH}"
>> +TMPDIR = "${TOPDIR}/tmp"
>> +PERSISTENT_DIR = "${TMPDIR}/cache"
>> +GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
>> +
>> +# isar specific config
>>   WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
>>   DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
>>   DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
>> diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
>> index cabe732..d344148 100755
>> --- a/scripts/isar-setup-builddir
>> +++ b/scripts/isar-setup-builddir
>> @@ -110,30 +110,9 @@ cat <<EOF > $BUILDDIR/conf/bitbake.conf
>>   # THIS FILE IS GENERATED! DO NOT MESS WITH IT!
>>   # ********************************************
>> -# ---------
>> -# begin original bitbake.conf
>> -# ---------
>> -
>> -EOF
>> -cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
>> -  "$BUILDDIR/conf/bitbake.conf"
>> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
>> -# ---------
>> -# end original bitbake.conf
>> -# ---------
>> -
>> -# ---------
>> -# begin isar-bitbake.conf
>> -# ---------
>> -
>>   EOF
>>   cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
>>     "$BUILDDIR/conf/bitbake.conf"
>> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
>> -# ---------
>> -# end isar-bitbake.conf
>> -# ---------
>> -EOF
>>   # Ending the first-time run message. Show the no documentation banner.
>>   if [ ! -z "$SHOWYPDOC" ]; then
>>
> 
> This series is still pending, I just realized (while writing "all 
> configuration starts with bitbake.conf").
> 
> Looks good, I just think we should simply rename isar-bitbake.conf to 
> bitbake.conf and copy that in during setup.

Why? That is not how it is done in current versions of OE.

The copying process implemented here is a relic from an older bitbake 
version, where it didn't support loading the bitbake.conf from a layer.

Cheers,
Claudius

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

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

* Re: [PATCH 1/2] meta: Only use isar's own bitbake.conf
  2018-12-10  9:31     ` Claudius Heine
@ 2018-12-10  9:32       ` Jan Kiszka
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Kiszka @ 2018-12-10  9:32 UTC (permalink / raw)
  To: Claudius Heine, Harald Seiler, isar-users

On 10.12.18 10:31, Claudius Heine wrote:
> Hi Jan,
> 
> On 07/12/2018 15.30, [ext] Jan Kiszka wrote:
>> On 27.11.18 10:53, Harald Seiler wrote:
>>> Similarly to yocto, this commit makes isar only
>>> use its own bitbake.conf.  It also adds necessary
>>> variables from bitbake's config so everything still
>>> works.
>>>
>>> Signed-off-by: Harald Seiler <hws@denx.de>
>>> ---
>>>   meta/conf/isar-bitbake.conf | 28 ++++++++++++++++++++++++++++
>>>   scripts/isar-setup-builddir | 21 ---------------------
>>>   2 files changed, 28 insertions(+), 21 deletions(-)
>>>
>>> diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
>>> index bc52d08..f23bf6e 100644
>>> --- a/meta/conf/isar-bitbake.conf
>>> +++ b/meta/conf/isar-bitbake.conf
>>> @@ -18,6 +18,34 @@
>>>   # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>>>   # OTHER DEALINGS IN THE SOFTWARE.
>>> +# Variables from bitbake/conf/bitbake.conf
>>> +B = "${S}"
>>> +CVSDIR = "${DL_DIR}/cvs"
>>> +DEPENDS = ""
>>> +DEPLOY_DIR = "${TMPDIR}/deploy"
>>> +FILESPATH = 
>>> "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}" 
>>>
>>> +FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
>>> +GITDIR = "${DL_DIR}/git"
>>> +IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
>>> +IMAGE_ROOTFS = "${TMPDIR}/rootfs"
>>> +OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
>>> +P = "${PN}-${PV}"
>>> +PF = "${PN}-${PV}-${PR}"
>>> +PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 
>>> 'defaultpkgname'}"
>>> +PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 
>>> 'r0'}"
>>> +PROVIDES = ""
>>> +PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or 
>>> '1.0'}"
>>> +S = "${WORKDIR}/${P}"
>>> +SRC_URI = "file://${FILE}"
>>> +STAMP = "${TMPDIR}/stamps/${PF}"
>>> +SVNDIR = "${DL_DIR}/svn"
>>> +T = "${WORKDIR}/temp"
>>> +TARGET_ARCH = "${BUILD_ARCH}"
>>> +TMPDIR = "${TOPDIR}/tmp"
>>> +PERSISTENT_DIR = "${TMPDIR}/cache"
>>> +GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
>>> +
>>> +# isar specific config
>>>   WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
>>>   DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
>>>   DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
>>> diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
>>> index cabe732..d344148 100755
>>> --- a/scripts/isar-setup-builddir
>>> +++ b/scripts/isar-setup-builddir
>>> @@ -110,30 +110,9 @@ cat <<EOF > $BUILDDIR/conf/bitbake.conf
>>>   # THIS FILE IS GENERATED! DO NOT MESS WITH IT!
>>>   # ********************************************
>>> -# ---------
>>> -# begin original bitbake.conf
>>> -# ---------
>>> -
>>> -EOF
>>> -cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
>>> -  "$BUILDDIR/conf/bitbake.conf"
>>> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
>>> -# ---------
>>> -# end original bitbake.conf
>>> -# ---------
>>> -
>>> -# ---------
>>> -# begin isar-bitbake.conf
>>> -# ---------
>>> -
>>>   EOF
>>>   cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
>>>     "$BUILDDIR/conf/bitbake.conf"
>>> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
>>> -# ---------
>>> -# end isar-bitbake.conf
>>> -# ---------
>>> -EOF
>>>   # Ending the first-time run message. Show the no documentation banner.
>>>   if [ ! -z "$SHOWYPDOC" ]; then
>>>
>>
>> This series is still pending, I just realized (while writing "all 
>> configuration starts with bitbake.conf").
>>
>> Looks good, I just think we should simply rename isar-bitbake.conf to 
>> bitbake.conf and copy that in during setup.
> 
> Why? That is not how it is done in current versions of OE.
> 
> The copying process implemented here is a relic from an older bitbake version, 
> where it didn't support loading the bitbake.conf from a layer.

Ah, you mean, we do not need to copy at all? That would be even better!

Jan

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

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

* [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env
  2018-11-27  9:52 [PATCH 0/2] Clean bitbake.conf and allow DL_DIR from env Harald Seiler
  2018-11-27  9:53 ` [PATCH 1/2] meta: Only use isar's own bitbake.conf Harald Seiler
  2018-11-27  9:54 ` [PATCH 2/2] meta: Allow setting DL_DIR from environment Harald Seiler
@ 2018-12-10 10:22 ` claudius.heine.ext
  2018-12-10 10:22   ` [PATCH v2 1/3] meta: Only use isar's own bitbake.conf claudius.heine.ext
                     ` (3 more replies)
  2 siblings, 4 replies; 12+ messages in thread
From: claudius.heine.ext @ 2018-12-10 10:22 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine

From: Claudius Heine <ch@denx.de>

Hi,

I took over Haralds patchset. My changes are only that I rename the
'isar-bitbake.conf' to 'bitbake.conf' in order to trigger the default
bitbake configuration loading procedure that searches for a
'bitbake.conf' in the 'conf' directory of a layer.

Cheers,
Claudius

Claudius Heine (1):
  meta: rename isar-bitbake.conf to bitbake.conf

Harald Seiler (2):
  meta: Only use isar's own bitbake.conf
  meta: Allow setting DL_DIR from environment

 meta/conf/{isar-bitbake.conf => bitbake.conf} | 30 ++++++++++++++++++-
 scripts/isar-setup-builddir                   | 30 -------------------
 2 files changed, 29 insertions(+), 31 deletions(-)
 rename meta/conf/{isar-bitbake.conf => bitbake.conf} (71%)

-- 
2.19.2


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

* [PATCH v2 1/3] meta: Only use isar's own bitbake.conf
  2018-12-10 10:22 ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env claudius.heine.ext
@ 2018-12-10 10:22   ` claudius.heine.ext
  2018-12-10 10:25     ` Harald Seiler
  2018-12-10 10:22   ` [PATCH v2 2/3] meta: Allow setting DL_DIR from environment claudius.heine.ext
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: claudius.heine.ext @ 2018-12-10 10:22 UTC (permalink / raw)
  To: isar-users; +Cc: Harald Seiler

From: Harald Seiler <hws@denx.de>

Similarly to yocto, this commit makes isar only
use its own bitbake.conf.  It also adds necessary
variables from bitbake's config so everything still
works.

Signed-off-by: Harald Seiler <hws@denx.de>
---
 meta/conf/isar-bitbake.conf | 28 ++++++++++++++++++++++++++++
 scripts/isar-setup-builddir | 21 ---------------------
 2 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
index bc52d08..f23bf6e 100644
--- a/meta/conf/isar-bitbake.conf
+++ b/meta/conf/isar-bitbake.conf
@@ -18,6 +18,34 @@
 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 # OTHER DEALINGS IN THE SOFTWARE.
 
+# Variables from bitbake/conf/bitbake.conf
+B = "${S}"
+CVSDIR = "${DL_DIR}/cvs"
+DEPENDS = ""
+DEPLOY_DIR = "${TMPDIR}/deploy"
+FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
+FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
+GITDIR = "${DL_DIR}/git"
+IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
+IMAGE_ROOTFS = "${TMPDIR}/rootfs"
+OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
+P = "${PN}-${PV}"
+PF = "${PN}-${PV}-${PR}"
+PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
+PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
+PROVIDES = ""
+PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
+S = "${WORKDIR}/${P}"
+SRC_URI = "file://${FILE}"
+STAMP = "${TMPDIR}/stamps/${PF}"
+SVNDIR = "${DL_DIR}/svn"
+T = "${WORKDIR}/temp"
+TARGET_ARCH = "${BUILD_ARCH}"
+TMPDIR = "${TOPDIR}/tmp"
+PERSISTENT_DIR = "${TMPDIR}/cache"
+GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
+
+# isar specific config
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
 DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
index cabe732..d344148 100755
--- a/scripts/isar-setup-builddir
+++ b/scripts/isar-setup-builddir
@@ -110,30 +110,9 @@ cat <<EOF > $BUILDDIR/conf/bitbake.conf
 # THIS FILE IS GENERATED! DO NOT MESS WITH IT!
 # ********************************************
 
-# ---------
-# begin original bitbake.conf
-# ---------
-
-EOF
-cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
-  "$BUILDDIR/conf/bitbake.conf"
-cat <<EOF >> $BUILDDIR/conf/bitbake.conf
-# ---------
-# end original bitbake.conf
-# ---------
-
-# ---------
-# begin isar-bitbake.conf
-# ---------
-
 EOF
 cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
   "$BUILDDIR/conf/bitbake.conf"
-cat <<EOF >> $BUILDDIR/conf/bitbake.conf
-# ---------
-# end isar-bitbake.conf
-# ---------
-EOF
 
 # Ending the first-time run message. Show the no documentation banner.
 if [ ! -z "$SHOWYPDOC" ]; then
-- 
2.19.2


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

* [PATCH v2 2/3] meta: Allow setting DL_DIR from environment
  2018-12-10 10:22 ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env claudius.heine.ext
  2018-12-10 10:22   ` [PATCH v2 1/3] meta: Only use isar's own bitbake.conf claudius.heine.ext
@ 2018-12-10 10:22   ` claudius.heine.ext
  2018-12-10 10:22   ` [PATCH v2 3/3] meta: rename isar-bitbake.conf to bitbake.conf claudius.heine.ext
  2018-12-10 12:05   ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env Maxim Yu. Osipov
  3 siblings, 0 replies; 12+ messages in thread
From: claudius.heine.ext @ 2018-12-10 10:22 UTC (permalink / raw)
  To: isar-users; +Cc: Harald Seiler

From: Harald Seiler <hws@denx.de>

This patch allows adding DL_DIR to BB_ENV_EXTRAWHITE
and then specifying a custon DL_DIR in the environment.

This behavior mirros the one in poky/yocto.

Signed-off-by: Harald Seiler <hws@denx.de>
---
 meta/conf/isar-bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
index f23bf6e..7e8dea1 100644
--- a/meta/conf/isar-bitbake.conf
+++ b/meta/conf/isar-bitbake.conf
@@ -49,7 +49,7 @@ GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
 DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
 DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
-DL_DIR = "${TOPDIR}/downloads"
+DL_DIR ?= "${TOPDIR}/downloads"
 SSTATE_DIR ?= "${TMPDIR}/sstate-cache"
 BUILDCHROOT_HOST_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-host/rootfs"
 BUILDCHROOT_TARGET_DIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target/rootfs"
-- 
2.19.2


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

* [PATCH v2 3/3] meta: rename isar-bitbake.conf to bitbake.conf
  2018-12-10 10:22 ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env claudius.heine.ext
  2018-12-10 10:22   ` [PATCH v2 1/3] meta: Only use isar's own bitbake.conf claudius.heine.ext
  2018-12-10 10:22   ` [PATCH v2 2/3] meta: Allow setting DL_DIR from environment claudius.heine.ext
@ 2018-12-10 10:22   ` claudius.heine.ext
  2018-12-10 12:05   ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env Maxim Yu. Osipov
  3 siblings, 0 replies; 12+ messages in thread
From: claudius.heine.ext @ 2018-12-10 10:22 UTC (permalink / raw)
  To: isar-users; +Cc: Claudius Heine

From: Claudius Heine <ch@denx.de>

With current bitbake versions it reads the 'bitbake.conf' from the
'conf' directory of a layer. So no copying is necessary.

Signed-off-by: Claudius Heine <ch@denx.de>
---
 meta/conf/{isar-bitbake.conf => bitbake.conf} | 0
 scripts/isar-setup-builddir                   | 9 ---------
 2 files changed, 9 deletions(-)
 rename meta/conf/{isar-bitbake.conf => bitbake.conf} (100%)

diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/bitbake.conf
similarity index 100%
rename from meta/conf/isar-bitbake.conf
rename to meta/conf/bitbake.conf
diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
index d344148..227ab01 100755
--- a/scripts/isar-setup-builddir
+++ b/scripts/isar-setup-builddir
@@ -105,15 +105,6 @@ EOM
     SHOWYPDOC=yes
 fi
 
-cat <<EOF > $BUILDDIR/conf/bitbake.conf
-# ********************************************
-# THIS FILE IS GENERATED! DO NOT MESS WITH IT!
-# ********************************************
-
-EOF
-cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
-  "$BUILDDIR/conf/bitbake.conf"
-
 # Ending the first-time run message. Show the no documentation banner.
 if [ ! -z "$SHOWYPDOC" ]; then
     cat <<EOM
-- 
2.19.2


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

* Re: [PATCH v2 1/3] meta: Only use isar's own bitbake.conf
  2018-12-10 10:22   ` [PATCH v2 1/3] meta: Only use isar's own bitbake.conf claudius.heine.ext
@ 2018-12-10 10:25     ` Harald Seiler
  0 siblings, 0 replies; 12+ messages in thread
From: Harald Seiler @ 2018-12-10 10:25 UTC (permalink / raw)
  To: claudius.heine.ext, isar-users

Thank you, Claudius!

On Mon, 2018-12-10 at 11:22 +0100, claudius.heine.ext@siemens.com wrote:
> From: Harald Seiler <hws@denx.de>
> 
> Similarly to yocto, this commit makes isar only
> use its own bitbake.conf.  It also adds necessary
> variables from bitbake's config so everything still
> works.
> 
> Signed-off-by: Harald Seiler <hws@denx.de>
> ---
>  meta/conf/isar-bitbake.conf | 28 ++++++++++++++++++++++++++++
>  scripts/isar-setup-builddir | 21 ---------------------
>  2 files changed, 28 insertions(+), 21 deletions(-)
> 
> diff --git a/meta/conf/isar-bitbake.conf b/meta/conf/isar-bitbake.conf
> index bc52d08..f23bf6e 100644
> --- a/meta/conf/isar-bitbake.conf
> +++ b/meta/conf/isar-bitbake.conf
> @@ -18,6 +18,34 @@
>  # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>  # OTHER DEALINGS IN THE SOFTWARE.
>  
> +# Variables from bitbake/conf/bitbake.conf
> +B = "${S}"
> +CVSDIR = "${DL_DIR}/cvs"
> +DEPENDS = ""
> +DEPLOY_DIR = "${TMPDIR}/deploy"
> +FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
> +FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
> +GITDIR = "${DL_DIR}/git"
> +IMAGE_CMD = "_NO_DEFINED_IMAGE_TYPES_"
> +IMAGE_ROOTFS = "${TMPDIR}/rootfs"
> +OVERRIDES = "local:${MACHINE}:${TARGET_OS}:${TARGET_ARCH}"
> +P = "${PN}-${PV}"
> +PF = "${PN}-${PV}-${PR}"
> +PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
> +PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
> +PROVIDES = ""
> +PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
> +S = "${WORKDIR}/${P}"
> +SRC_URI = "file://${FILE}"
> +STAMP = "${TMPDIR}/stamps/${PF}"
> +SVNDIR = "${DL_DIR}/svn"
> +T = "${WORKDIR}/temp"
> +TARGET_ARCH = "${BUILD_ARCH}"
> +TMPDIR = "${TOPDIR}/tmp"
> +PERSISTENT_DIR = "${TMPDIR}/cache"
> +GITPKGV = "${@bb.fetch2.get_srcrev(d, 'gitpkgv_revision')}"
> +
> +# isar specific config
>  WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PF}"
>  DEPLOY_DIR_BOOTSTRAP = "${DEPLOY_DIR}/bootstrap"
>  DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
> diff --git a/scripts/isar-setup-builddir b/scripts/isar-setup-builddir
> index cabe732..d344148 100755
> --- a/scripts/isar-setup-builddir
> +++ b/scripts/isar-setup-builddir
> @@ -110,30 +110,9 @@ cat <<EOF > $BUILDDIR/conf/bitbake.conf
>  # THIS FILE IS GENERATED! DO NOT MESS WITH IT!
>  # ********************************************
>  
> -# ---------
> -# begin original bitbake.conf
> -# ---------
> -
> -EOF
> -cat "$ISARROOT/bitbake/conf/bitbake.conf" >> \
> -  "$BUILDDIR/conf/bitbake.conf"
> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> -# ---------
> -# end original bitbake.conf
> -# ---------
> -
> -# ---------
> -# begin isar-bitbake.conf
> -# ---------
> -
>  EOF
>  cat "$ISARROOT/meta/conf/isar-bitbake.conf" >> \
>    "$BUILDDIR/conf/bitbake.conf"
> -cat <<EOF >> $BUILDDIR/conf/bitbake.conf
> -# ---------
> -# end isar-bitbake.conf
> -# ---------
> -EOF
>  
>  # Ending the first-time run message. Show the no documentation banner.
>  if [ ! -z "$SHOWYPDOC" ]; then
-- 
Harald

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62  Fax: +49-8142-66989-80   Email: hws@denx.de

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

* Re: [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env
  2018-12-10 10:22 ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env claudius.heine.ext
                     ` (2 preceding siblings ...)
  2018-12-10 10:22   ` [PATCH v2 3/3] meta: rename isar-bitbake.conf to bitbake.conf claudius.heine.ext
@ 2018-12-10 12:05   ` Maxim Yu. Osipov
  3 siblings, 0 replies; 12+ messages in thread
From: Maxim Yu. Osipov @ 2018-12-10 12:05 UTC (permalink / raw)
  To: claudius.heine.ext, isar-users; +Cc: Claudius Heine

On 12/10/18 1:22 PM, claudius.heine.ext@siemens.com wrote:
> From: Claudius Heine <ch@denx.de>
> 
> Hi,
> 
> I took over Haralds patchset. My changes are only that I rename the
> 'isar-bitbake.conf' to 'bitbake.conf' in order to trigger the default
> bitbake configuration loading procedure that searches for a
> 'bitbake.conf' in the 'conf' directory of a layer.

Applied to the 'next',

Thanks,
Maxim.

> Cheers,
> Claudius
> 
> Claudius Heine (1):
>    meta: rename isar-bitbake.conf to bitbake.conf
> 
> Harald Seiler (2):
>    meta: Only use isar's own bitbake.conf
>    meta: Allow setting DL_DIR from environment
> 
>   meta/conf/{isar-bitbake.conf => bitbake.conf} | 30 ++++++++++++++++++-
>   scripts/isar-setup-builddir                   | 30 -------------------
>   2 files changed, 29 insertions(+), 31 deletions(-)
>   rename meta/conf/{isar-bitbake.conf => bitbake.conf} (71%)
> 


-- 
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] 12+ messages in thread

end of thread, other threads:[~2018-12-10 12:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27  9:52 [PATCH 0/2] Clean bitbake.conf and allow DL_DIR from env Harald Seiler
2018-11-27  9:53 ` [PATCH 1/2] meta: Only use isar's own bitbake.conf Harald Seiler
2018-12-07 14:30   ` Jan Kiszka
2018-12-10  9:31     ` Claudius Heine
2018-12-10  9:32       ` Jan Kiszka
2018-11-27  9:54 ` [PATCH 2/2] meta: Allow setting DL_DIR from environment Harald Seiler
2018-12-10 10:22 ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env claudius.heine.ext
2018-12-10 10:22   ` [PATCH v2 1/3] meta: Only use isar's own bitbake.conf claudius.heine.ext
2018-12-10 10:25     ` Harald Seiler
2018-12-10 10:22   ` [PATCH v2 2/3] meta: Allow setting DL_DIR from environment claudius.heine.ext
2018-12-10 10:22   ` [PATCH v2 3/3] meta: rename isar-bitbake.conf to bitbake.conf claudius.heine.ext
2018-12-10 12:05   ` [PATCH v2 0/3] Clean bitbake.conf and allow DL_DIR from env 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