public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/5] Isar fixes
@ 2017-08-27 14:38 Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 1/5] classes/base: Fix fetch task dependency Alexander Smirnov
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-27 14:38 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Hello all,

this series contains various fixes that improve code quality and Isar
stability.

With best regards,
Alex

8<--

Alexander Smirnov (3):
  classes/base: Fix fetch task dependency
  scripts/ci_build: Update build script
  doc/technical_overview: Fix formatting

Frank Lenormand (2):
  meta-isar/hello: Update recipe version
  debian/stretch: Use ftp.d.o instead of deb.d.o

 doc/technical_overview.md                 |  4 ++-
 meta-isar/conf/distro/debian-jessie.conf  |  2 +-
 meta-isar/conf/distro/debian-stretch.conf |  2 +-
 meta-isar/conf/distro/debian-wheezy.conf  |  2 +-
 meta-isar/recipes-app/hello/hello.bb      |  2 +-
 meta/classes/dpkg.bbclass                 |  2 +-
 scripts/ci_build.sh                       | 46 +++++++++++++++++--------------
 7 files changed, 33 insertions(+), 27 deletions(-)

-- 
2.1.4


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

* [PATCH 1/5] classes/base: Fix fetch task dependency
  2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
@ 2017-08-27 14:38 ` Alexander Smirnov
  2017-08-28 14:57   ` Henning Schild
  2017-08-27 14:38 ` [PATCH 2/5] meta-isar/hello: Update recipe version Alexander Smirnov
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-27 14:38 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Fetch task should be run before unpack, not before build.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta/classes/dpkg.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 23d5e6c..360a95c 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -25,7 +25,7 @@ python do_fetch() {
         raise bb.build.FuncFailed(e)
 }
 
-addtask fetch before do_build
+addtask fetch before do_unpack
 
 do_unpack[dirs] = "${BUILDROOT}"
 do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
-- 
2.1.4


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

* [PATCH 2/5] meta-isar/hello: Update recipe version
  2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 1/5] classes/base: Fix fetch task dependency Alexander Smirnov
@ 2017-08-27 14:38 ` Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 3/5] debian/stretch: Use ftp.d.o instead of deb.d.o Alexander Smirnov
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-27 14:38 UTC (permalink / raw)
  To: isar-users; +Cc: Frank Lenormand, Alexander Smirnov

From: Frank Lenormand <lenormf@gmail.com>

Use correct version for 'hello' recipe.

Signed-off-by: Frank Lenormand <lenormf@gmail.com>
Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta-isar/recipes-app/hello/hello.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-isar/recipes-app/hello/hello.bb b/meta-isar/recipes-app/hello/hello.bb
index 56424fb..44b8bc3 100644
--- a/meta-isar/recipes-app/hello/hello.bb
+++ b/meta-isar/recipes-app/hello/hello.bb
@@ -8,7 +8,7 @@ DESCRIPTION = "Sample application for ISAR"
 LICENSE = "gpl-2.0"
 LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
 
-PV = "1.0"
+PV = "0.1+g7f35942-1"
 
 SRC_URI = "git://github.com/ilbers/hello.git;protocol=https"
 SRCREV = "ad7065ecc4840cc436bfcdac427386dbba4ea719"
-- 
2.1.4


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

* [PATCH 3/5] debian/stretch: Use ftp.d.o instead of deb.d.o
  2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 1/5] classes/base: Fix fetch task dependency Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 2/5] meta-isar/hello: Update recipe version Alexander Smirnov
@ 2017-08-27 14:38 ` Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 4/5] scripts/ci_build: Update build script Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 5/5] doc/technical_overview: Fix formatting Alexander Smirnov
  4 siblings, 0 replies; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-27 14:38 UTC (permalink / raw)
  To: isar-users; +Cc: Frank Lenormand, Alexander Smirnov

From: Frank Lenormand <lenormf@gmail.com>

deb.d.o used to be preferred due to geomirroring. Unfortunately, it
fails sporadically with 404.

Signed-off-by: Frank Lenormand <lenormf@gmail.com>
Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 meta-isar/conf/distro/debian-jessie.conf  | 2 +-
 meta-isar/conf/distro/debian-stretch.conf | 2 +-
 meta-isar/conf/distro/debian-wheezy.conf  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-isar/conf/distro/debian-jessie.conf b/meta-isar/conf/distro/debian-jessie.conf
index 6a639e1..2a5d29f 100644
--- a/meta-isar/conf/distro/debian-jessie.conf
+++ b/meta-isar/conf/distro/debian-jessie.conf
@@ -5,5 +5,5 @@
 
 DISTRO_SUITE ?= "jessie"
 DISTRO_COMPONENTS ?= "main contrib non-free"
-DISTRO_APT_SOURCE ?= "http://deb.debian.org/debian"
+DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
 DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
diff --git a/meta-isar/conf/distro/debian-stretch.conf b/meta-isar/conf/distro/debian-stretch.conf
index 3555c14..de6af63 100644
--- a/meta-isar/conf/distro/debian-stretch.conf
+++ b/meta-isar/conf/distro/debian-stretch.conf
@@ -3,5 +3,5 @@
 
 DISTRO_SUITE ?= "stretch"
 DISTRO_COMPONENTS ?= "main contrib non-free"
-DISTRO_APT_SOURCE ?= "http://deb.debian.org/debian"
+DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
 DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
diff --git a/meta-isar/conf/distro/debian-wheezy.conf b/meta-isar/conf/distro/debian-wheezy.conf
index 8e5ceac..1892ed9 100644
--- a/meta-isar/conf/distro/debian-wheezy.conf
+++ b/meta-isar/conf/distro/debian-wheezy.conf
@@ -5,5 +5,5 @@
 
 DISTRO_SUITE ?= "wheezy"
 DISTRO_COMPONENTS ?= "main contrib non-free"
-DISTRO_APT_SOURCE ?= "http://deb.debian.org/debian"
+DISTRO_APT_SOURCE ?= "http://ftp.debian.org/debian"
 DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
-- 
2.1.4


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

* [PATCH 4/5] scripts/ci_build: Update build script
  2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
                   ` (2 preceding siblings ...)
  2017-08-27 14:38 ` [PATCH 3/5] debian/stretch: Use ftp.d.o instead of deb.d.o Alexander Smirnov
@ 2017-08-27 14:38 ` Alexander Smirnov
  2017-08-27 14:38 ` [PATCH 5/5] doc/technical_overview: Fix formatting Alexander Smirnov
  4 siblings, 0 replies; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-27 14:38 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Rework the build script for Jenkins CI.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 scripts/ci_build.sh | 46 +++++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 3deadbf..2cacdf1 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -1,29 +1,33 @@
-# Script for GitLab runner
+# Script for Jenkins build
 #
 # Alexander Smirnov <asmirnov@ilbers.de>
-# Copyright (c) 2016 ilbers GmbH
+# Copyright (c) 2016-2017 ilbers GmbH
 
 #!/bin/sh
 
 # Export $PATH to use 'parted' tool
 export PATH=$PATH:/sbin
 
-WORKSPACE=`pwd`
-
-. isar-init-build-env build
-bitbake multiconfig:qemuarm:isar-image-base multiconfig:rpi:isar-image-base multiconfig:qemuarm:isar-image-debug multiconfig:rpi:isar-image-debug
-
-cd $WORKSPACE
-mkdir images
-cd images
-
-# Get QEMU image
-cp ../build/tmp/deploy/images/isar-image-base-qemuarm.ext4.img .
-gzip -9 isar-image-base-qemuarm.ext4.img
-
-# Get RPi SD card image
-cp ../build/tmp/deploy/images/isar-image-base.rpi-sdimg .
-gzip -9 isar-image-base.rpi-sdimg
-
-cd ..
-sudo rm -rf build
+# Get parameters from the command line
+WORKSPACE=$1
+GIT_COMMIT=$2
+
+# Go to Isar root
+cd $(dirname $0)/..
+
+# Setup build folder for current revision
+if [ ! -d /build/$WORKSPACE/$GIT_COMMIT ]; then
+        mkdir -p /build/$WORKSPACE/$GIT_COMMIT
+fi
+source isar-init-build-env /build/$WORKSPACE/$GIT_COMMIT
+
+# Start build for all possible configurations
+bitbake \
+        multiconfig:qemuarm-wheezy:isar-image-base \
+        multiconfig:qemuarm-jessie:isar-image-base \
+        multiconfig:qemuarm-stretch:isar-image-base \
+        multiconfig:qemui386-jessie:isar-image-base \
+        multiconfig:qemui386-stretch:isar-image-base \
+        multiconfig:qemuamd64-jessie:isar-image-base \
+        multiconfig:qemuamd64-stretch:isar-image-base \
+        multiconfig:rpi-jessie:isar-image-base
-- 
2.1.4


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

* [PATCH 5/5] doc/technical_overview: Fix formatting
  2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
                   ` (3 preceding siblings ...)
  2017-08-27 14:38 ` [PATCH 4/5] scripts/ci_build: Update build script Alexander Smirnov
@ 2017-08-27 14:38 ` Alexander Smirnov
  4 siblings, 0 replies; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-27 14:38 UTC (permalink / raw)
  To: isar-users; +Cc: Alexander Smirnov

Break a long line at column 78.

Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
---
 doc/technical_overview.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/technical_overview.md b/doc/technical_overview.md
index a4563b3..20e08b4 100644
--- a/doc/technical_overview.md
+++ b/doc/technical_overview.md
@@ -121,7 +121,9 @@ All these steps are described in details below.
 
 ## 3.2 Initial Buildchroot Generation
 
-As mentioned above, initial buildchroot is generated using multistrap. The bitbake recipe which is responsible for buildchroot can be found here: `meta/recipes-devtools/buildchroot/buildchroot.bb`
+As mentioned above, initial buildchroot is generated using multistrap. The
+bitbake recipe which is responsible for buildchroot can be found here:
+`meta/recipes-devtools/buildchroot/buildchroot.bb`
 
 This recipe implementes `do_build` task which performs the following:
 
-- 
2.1.4


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

* Re: [PATCH 1/5] classes/base: Fix fetch task dependency
  2017-08-27 14:38 ` [PATCH 1/5] classes/base: Fix fetch task dependency Alexander Smirnov
@ 2017-08-28 14:57   ` Henning Schild
  2017-08-29  6:27     ` Alexander Smirnov
  0 siblings, 1 reply; 10+ messages in thread
From: Henning Schild @ 2017-08-28 14:57 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Sun, 27 Aug 2017 17:38:36 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Fetch task should be run before unpack, not before build.
> 
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
>  meta/classes/dpkg.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index 23d5e6c..360a95c 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -25,7 +25,7 @@ python do_fetch() {
>          raise bb.build.FuncFailed(e)
>  }
>  
> -addtask fetch before do_build
> +addtask fetch before do_unpack
>  
>  do_unpack[dirs] = "${BUILDROOT}"
>  do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"

A few lines below that you find:

> addtask unpack after do_fetch before do_build

With this patch you would have the order expressed twice, which is not
a good idea. This patches does not change anything, it just introduces
redundant information.

Henning

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

* Re: [PATCH 1/5] classes/base: Fix fetch task dependency
  2017-08-28 14:57   ` Henning Schild
@ 2017-08-29  6:27     ` Alexander Smirnov
  2017-08-29  7:43       ` Henning Schild
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-29  6:27 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 08/28/2017 05:57 PM, Henning Schild wrote:
> Am Sun, 27 Aug 2017 17:38:36 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> 
>> Fetch task should be run before unpack, not before build.
>>
>> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
>> ---
>>   meta/classes/dpkg.bbclass | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>> index 23d5e6c..360a95c 100644
>> --- a/meta/classes/dpkg.bbclass
>> +++ b/meta/classes/dpkg.bbclass
>> @@ -25,7 +25,7 @@ python do_fetch() {
>>           raise bb.build.FuncFailed(e)
>>   }
>>   
>> -addtask fetch before do_build
>> +addtask fetch before do_unpack
>>   
>>   do_unpack[dirs] = "${BUILDROOT}"
>>   do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
> 
> A few lines below that you find:
> 
>> addtask unpack after do_fetch before do_build
> 
> With this patch you would have the order expressed twice, which is not
> a good idea. This patches does not change anything, it just introduces
> redundant information.

This patch is not about technical issues, it just improves code 
readability and explicitly defines the order of tasks. If task fetch 
should go before unpack, it would be more evident do define it in this way.

-- 
With best regards,
Alexander Smirnov

ilbers GmbH
Baierbrunner Str. 28c
D-81379 Munich
+49 (89) 122 67 24-0
http://ilbers.de/
Commercial register Munich, HRB 214197
General manager: Baurzhan Ismagulov

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

* Re: [PATCH 1/5] classes/base: Fix fetch task dependency
  2017-08-29  6:27     ` Alexander Smirnov
@ 2017-08-29  7:43       ` Henning Schild
  2017-08-29  7:54         ` Alexander Smirnov
  0 siblings, 1 reply; 10+ messages in thread
From: Henning Schild @ 2017-08-29  7:43 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: isar-users

Am Tue, 29 Aug 2017 09:27:59 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> On 08/28/2017 05:57 PM, Henning Schild wrote:
> > Am Sun, 27 Aug 2017 17:38:36 +0300
> > schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> >   
> >> Fetch task should be run before unpack, not before build.
> >>
> >> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> >> ---
> >>   meta/classes/dpkg.bbclass | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> >> index 23d5e6c..360a95c 100644
> >> --- a/meta/classes/dpkg.bbclass
> >> +++ b/meta/classes/dpkg.bbclass
> >> @@ -25,7 +25,7 @@ python do_fetch() {
> >>           raise bb.build.FuncFailed(e)
> >>   }
> >>   
> >> -addtask fetch before do_build
> >> +addtask fetch before do_unpack
> >>   
> >>   do_unpack[dirs] = "${BUILDROOT}"
> >>   do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"  
> > 
> > A few lines below that you find:
> >   
> >> addtask unpack after do_fetch before do_build  
> > 
> > With this patch you would have the order expressed twice, which is
> > not a good idea. This patches does not change anything, it just
> > introduces redundant information.  
> 
> This patch is not about technical issues, it just improves code 
> readability and explicitly defines the order of tasks. If task fetch 
> should go before unpack, it would be more evident do define it in
> this way.

The order is already explicit. Writing it down twice is redundant. And
redundancy means that future changes would have to keep both
expressions in sync.
In my point of view it harms readability because one has to still read
both expressions and make sure to what result they will add up.

Henning

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

* Re: [PATCH 1/5] classes/base: Fix fetch task dependency
  2017-08-29  7:43       ` Henning Schild
@ 2017-08-29  7:54         ` Alexander Smirnov
  0 siblings, 0 replies; 10+ messages in thread
From: Alexander Smirnov @ 2017-08-29  7:54 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users



On 08/29/2017 10:43 AM, Henning Schild wrote:
> Am Tue, 29 Aug 2017 09:27:59 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> 
>> On 08/28/2017 05:57 PM, Henning Schild wrote:
>>> Am Sun, 27 Aug 2017 17:38:36 +0300
>>> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
>>>    
>>>> Fetch task should be run before unpack, not before build.
>>>>
>>>> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
>>>> ---
>>>>    meta/classes/dpkg.bbclass | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
>>>> index 23d5e6c..360a95c 100644
>>>> --- a/meta/classes/dpkg.bbclass
>>>> +++ b/meta/classes/dpkg.bbclass
>>>> @@ -25,7 +25,7 @@ python do_fetch() {
>>>>            raise bb.build.FuncFailed(e)
>>>>    }
>>>>    
>>>> -addtask fetch before do_build
>>>> +addtask fetch before do_unpack
>>>>    
>>>>    do_unpack[dirs] = "${BUILDROOT}"
>>>>    do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>>>
>>> A few lines below that you find:
>>>    
>>>> addtask unpack after do_fetch before do_build
>>>
>>> With this patch you would have the order expressed twice, which is
>>> not a good idea. This patches does not change anything, it just
>>> introduces redundant information.
>>
>> This patch is not about technical issues, it just improves code
>> readability and explicitly defines the order of tasks. If task fetch
>> should go before unpack, it would be more evident do define it in
>> this way.
> 
> The order is already explicit. 

The order is not actually explicit, the line:

   addtask fetch before do_build

doesn't provide information that fetch task stays before unpack. You 
need to reference another line in code to get this information.

> Writing it down twice is redundant. And
> redundancy means that future changes would have to keep both
> expressions in sync. > In my point of view it harms readability because one has to still read
> both expressions and make sure to what result they will add up.

Instead, with such definition one doesn't need to read both lines, each 
line provides self-contained information about order of tasks in pipeline.

Also do_fetch task will go to base class because it's generic.

Alex

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

end of thread, other threads:[~2017-08-29  7:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-27 14:38 [PATCH 0/5] Isar fixes Alexander Smirnov
2017-08-27 14:38 ` [PATCH 1/5] classes/base: Fix fetch task dependency Alexander Smirnov
2017-08-28 14:57   ` Henning Schild
2017-08-29  6:27     ` Alexander Smirnov
2017-08-29  7:43       ` Henning Schild
2017-08-29  7:54         ` Alexander Smirnov
2017-08-27 14:38 ` [PATCH 2/5] meta-isar/hello: Update recipe version Alexander Smirnov
2017-08-27 14:38 ` [PATCH 3/5] debian/stretch: Use ftp.d.o instead of deb.d.o Alexander Smirnov
2017-08-27 14:38 ` [PATCH 4/5] scripts/ci_build: Update build script Alexander Smirnov
2017-08-27 14:38 ` [PATCH 5/5] doc/technical_overview: Fix formatting Alexander Smirnov

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