diff mbox series

[v2] rauc: bump to version 0.2

Message ID 20171122041747.11363-1-yurovsky@gmail.com
State Changes Requested
Headers show
Series [v2] rauc: bump to version 0.2 | expand

Commit Message

Andrey Yurovsky Nov. 22, 2017, 4:17 a.m. UTC
Version 0.2 provides various bug fixes and feature enhancements.

Also the rauc host tool needs mksquashfs so it must select the squashfs
package.

Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
---
 package/rauc/Config.in.host | 1 +
 package/rauc/rauc.hash      | 4 ++--
 package/rauc/rauc.mk        | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

Comments

Thomas Petazzoni Nov. 22, 2017, 7:53 a.m. UTC | #1
Hello,

On Tue, 21 Nov 2017 20:17:47 -0800, Andrey Yurovsky wrote:

> diff --git a/package/rauc/Config.in.host b/package/rauc/Config.in.host
> index a58685a..1bd9a79 100644
> --- a/package/rauc/Config.in.host
> +++ b/package/rauc/Config.in.host
> @@ -1,5 +1,6 @@
>  config BR2_PACKAGE_HOST_RAUC
>  	bool "host rauc"
> +	select BR2_PACKAGE_HOST_SQUASHFS # run-time dependency

If it's a runtime dependency...

> -HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2
> +HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2 host-squashfs

...you don't need to list it in <pkg>_DEPENDENCIES.

Best regards,

Thomas
Baruch Siach Nov. 22, 2017, 8:37 a.m. UTC | #2
Hi Thomas,

On Wed, Nov 22, 2017 at 08:53:27AM +0100, Thomas Petazzoni wrote:
> On Tue, 21 Nov 2017 20:17:47 -0800, Andrey Yurovsky wrote:
> 
> > diff --git a/package/rauc/Config.in.host b/package/rauc/Config.in.host
> > index a58685a..1bd9a79 100644
> > --- a/package/rauc/Config.in.host
> > +++ b/package/rauc/Config.in.host
> > @@ -1,5 +1,6 @@
> >  config BR2_PACKAGE_HOST_RAUC
> >  	bool "host rauc"
> > +	select BR2_PACKAGE_HOST_SQUASHFS # run-time dependency
> 
> If it's a runtime dependency...
> 
> > -HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2
> > +HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2 host-squashfs
> 
> ...you don't need to list it in <pkg>_DEPENDENCIES.

This is probably right in this case, since there is no in-tree host-rauc 
dependency. But in the general case a host package might be used at any point 
in the build. So you need to make sure that, e.g., host-squashfs is ready when 
host-rauc is to run, right?

baruch
Thomas Petazzoni Nov. 22, 2017, 8:49 a.m. UTC | #3
Hello,

On Wed, 22 Nov 2017 10:37:10 +0200, Baruch Siach wrote:

> > If it's a runtime dependency...
> >   
> > > -HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2
> > > +HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2 host-squashfs  
> > 
> > ...you don't need to list it in <pkg>_DEPENDENCIES.  
> 
> This is probably right in this case, since there is no in-tree host-rauc 
> dependency. But in the general case a host package might be used at any point 
> in the build. So you need to make sure that, e.g., host-squashfs is ready when 
> host-rauc is to run, right?

Hum, you are right. I was thinking that host-rauc tools would be use
only in a post-image script, or after the build has finished. But
indeed, the tools can also be used by another package that depends on
host-rauc.

So: you're right, adding host-squashfs to <pkg>_DEPENDENCIES is needed.

Thanks!

Thomas
Thomas Petazzoni Nov. 22, 2017, 8:33 p.m. UTC | #4
Hello,

On Tue, 21 Nov 2017 20:17:47 -0800, Andrey Yurovsky wrote:

> -RAUC_VERSION = 0.1.1
> +RAUC_VERSION = 0.2
>  RAUC_SITE = https://github.com/rauc/rauc/releases/download/v$(RAUC_VERSION)
>  RAUC_SOURCE = rauc-$(RAUC_VERSION).tar.xz
>  RAUC_LICENSE = LGPL-2.1
> @@ -29,7 +29,7 @@ ifeq ($(BR2_PACKAGE_SYSTEMD),y)
>  RAUC_DEPENDENCIES += systemd
>  endif
>  
> -HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2
> +HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2 host-squashfs
>  HOST_RAUC_CONF_OPTS += --disable-network --disable-json --disable-service

Another question about this dependency: how is it possible that
host-squashfs is a runtime dependency of the host variant of rauc, but
that squashfs is not a runtime dependency of the target variant of
rauc ?

I can imagine that host-mksquashfs is needed by host-rauc to prepare
some filesystem image. But how does the target build of RAUC know that
it doesn't need mksquashfs ?

Is host-mksquashfs always needed by host-rauc, or only under certain
conditions/configurations ?

Best regards,

Thomas
Andrey Yurovsky Nov. 22, 2017, 9:23 p.m. UTC | #5
On Wed, Nov 22, 2017 at 12:33 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Tue, 21 Nov 2017 20:17:47 -0800, Andrey Yurovsky wrote:
>
>> -RAUC_VERSION = 0.1.1
>> +RAUC_VERSION = 0.2
>>  RAUC_SITE = https://github.com/rauc/rauc/releases/download/v$(RAUC_VERSION)
>>  RAUC_SOURCE = rauc-$(RAUC_VERSION).tar.xz
>>  RAUC_LICENSE = LGPL-2.1
>> @@ -29,7 +29,7 @@ ifeq ($(BR2_PACKAGE_SYSTEMD),y)
>>  RAUC_DEPENDENCIES += systemd
>>  endif
>>
>> -HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2
>> +HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2 host-squashfs
>>  HOST_RAUC_CONF_OPTS += --disable-network --disable-json --disable-service
>
> Another question about this dependency: how is it possible that
> host-squashfs is a runtime dependency of the host variant of rauc, but
> that squashfs is not a runtime dependency of the target variant of
> rauc ?
>
> I can imagine that host-mksquashfs is needed by host-rauc to prepare
> some filesystem image. But how does the target build of RAUC know that
> it doesn't need mksquashfs ?
>
> Is host-mksquashfs always needed by host-rauc, or only under certain
> conditions/configurations ?

On the host side we use rauc to make a software update bundle. It does
this by shelling out to mksquashfs in order to turn a directory of
files (including a manifest) into a signed squashfs image. On the
device side bundles are not created (so mksquashfs isn't needed),
however the Linux kernel must have squashfs file system support
enabled and loop mount enabled. rauc loop mounts the bundle and then
deals with the contents. As such mksquashfs is a run-time host
dependency because we assume on the host rauc is used only to generate
bundles. While it could theoretically generate bundles on the target,
I don't think anyone would use it that way. There are some more subtle
dependencies for example on the target rauc may shell out to mkfs.vfat
if a vfat partition must be made (but that depends on the system slot
configuration and manifest) or it could shell out to mkfs.ext4 for
similar reasons.

> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
Thomas Petazzoni Nov. 22, 2017, 9:44 p.m. UTC | #6
Hello,

On Wed, 22 Nov 2017 13:23:35 -0800, Andrey Yurovsky wrote:

> > Is host-mksquashfs always needed by host-rauc, or only under certain
> > conditions/configurations ?  
> 
> On the host side we use rauc to make a software update bundle. It does
> this by shelling out to mksquashfs in order to turn a directory of
> files (including a manifest) into a signed squashfs image.

Isn't that specific to your RAUC use case? I assume other people can
use RAUC without using signed squashfs images.

So perhaps we shouldn't make host-mksquashfs a mandatory dependency
like your patch does?

Best regards,

Thomas
Andrey Yurovsky Nov. 23, 2017, 2:11 a.m. UTC | #7
Hi Thomas,

On Wed, Nov 22, 2017 at 1:44 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Wed, 22 Nov 2017 13:23:35 -0800, Andrey Yurovsky wrote:
>
>> > Is host-mksquashfs always needed by host-rauc, or only under certain
>> > conditions/configurations ?
>>
>> On the host side we use rauc to make a software update bundle. It does
>> this by shelling out to mksquashfs in order to turn a directory of
>> files (including a manifest) into a signed squashfs image.
>
> Isn't that specific to your RAUC use case? I assume other people can
> use RAUC without using signed squashfs images.
>
> So perhaps we shouldn't make host-mksquashfs a mandatory dependency
> like your patch does?

No, that's just how rauc works, there's no other use case. That is, it
always make a signed squashfs image (there's no option to make
unsigned images or any other format). If mksquashfs isn't present, the
host tool is effectively useless since it can't make bundles, that's
why I feel that it's a run-time dependency and needs to be selected.
Thomas Petazzoni Nov. 23, 2017, 8:21 a.m. UTC | #8
Hello,

On Wed, 22 Nov 2017 18:11:12 -0800, Andrey Yurovsky wrote:

> > Isn't that specific to your RAUC use case? I assume other people can
> > use RAUC without using signed squashfs images.
> >
> > So perhaps we shouldn't make host-mksquashfs a mandatory dependency
> > like your patch does?  
> 
> No, that's just how rauc works, there's no other use case. That is, it
> always make a signed squashfs image (there's no option to make
> unsigned images or any other format). If mksquashfs isn't present, the
> host tool is effectively useless since it can't make bundles, that's
> why I feel that it's a run-time dependency and needs to be selected.

OK, thanks for the explanation! Is this dependency new in 0.2, or it
was already needed for the current 0.1.1 version of RAUC ?

Best regards,

Thomas
Andrey Yurovsky Nov. 23, 2017, 4:33 p.m. UTC | #9
On Thu, Nov 23, 2017 at 12:21 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Wed, 22 Nov 2017 18:11:12 -0800, Andrey Yurovsky wrote:
>
>> > Isn't that specific to your RAUC use case? I assume other people can
>> > use RAUC without using signed squashfs images.
>> >
>> > So perhaps we shouldn't make host-mksquashfs a mandatory dependency
>> > like your patch does?
>>
>> No, that's just how rauc works, there's no other use case. That is, it
>> always make a signed squashfs image (there's no option to make
>> unsigned images or any other format). If mksquashfs isn't present, the
>> host tool is effectively useless since it can't make bundles, that's
>> why I feel that it's a run-time dependency and needs to be selected.
>
> OK, thanks for the explanation! Is this dependency new in 0.2, or it
> was already needed for the current 0.1.1 version of RAUC ?

It was there in 0.1.1 as well, unfortunately I missed it when I sent
the original patch because my systems had mksquashfs available and I
didn't catch this until later so I was hoping to correct it now. The
0.2 changes are described here:
https://github.com/rauc/rauc/blob/master/CHANGES and are mainly bug
fixes and minor (though certainly worthwhile) improvements.
Thomas Petazzoni Nov. 23, 2017, 4:39 p.m. UTC | #10
Hello,

On Thu, 23 Nov 2017 08:33:40 -0800, Andrey Yurovsky wrote:

> > OK, thanks for the explanation! Is this dependency new in 0.2, or it
> > was already needed for the current 0.1.1 version of RAUC ?  
> 
> It was there in 0.1.1 as well, unfortunately I missed it when I sent
> the original patch because my systems had mksquashfs available and I
> didn't catch this until later so I was hoping to correct it now. The
> 0.2 changes are described here:
> https://github.com/rauc/rauc/blob/master/CHANGES and are mainly bug
> fixes and minor (though certainly worthwhile) improvements.

OK. Then we need two separate patches:

 - One that adds the host-mksquashfs dependency, which we will push to
   the master branch (it is a fix)

 - One that bumps rauc to 0.2, which we will push to the next branch
   (we're approaching the release, so we only accept fixes for the
   master branch).

Thanks!

Thomas
diff mbox series

Patch

diff --git a/package/rauc/Config.in.host b/package/rauc/Config.in.host
index a58685a..1bd9a79 100644
--- a/package/rauc/Config.in.host
+++ b/package/rauc/Config.in.host
@@ -1,5 +1,6 @@ 
 config BR2_PACKAGE_HOST_RAUC
 	bool "host rauc"
+	select BR2_PACKAGE_HOST_SQUASHFS # run-time dependency
 	help
 	  RAUC is the Robust Auto-Update Controller developed by
 	  Pengutronix. Enable this option to build the rauc
diff --git a/package/rauc/rauc.hash b/package/rauc/rauc.hash
index 78c3e27..a0503b2 100644
--- a/package/rauc/rauc.hash
+++ b/package/rauc/rauc.hash
@@ -1,3 +1,3 @@ 
 # Locally calculated, after verifying against
-# https://github.com/rauc/rauc/releases/download/v0.1.1/rauc-0.1.1.tar.xz.asc
-sha256 d2901d493f1d3210aef6411e83b02edac3a678d6d825d71a1c61b5b6afc7e478 rauc-0.1.1.tar.xz
+# https://github.com/rauc/rauc/releases/download/v0.2/rauc-0.2.tar.xz.asc
+sha256 83aa3ac3716e1c29315162e3cbf5d4db79f26dd95efe1bc634bbce364b95491a rauc-0.2.tar.xz
diff --git a/package/rauc/rauc.mk b/package/rauc/rauc.mk
index 479a583..4909062 100644
--- a/package/rauc/rauc.mk
+++ b/package/rauc/rauc.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-RAUC_VERSION = 0.1.1
+RAUC_VERSION = 0.2
 RAUC_SITE = https://github.com/rauc/rauc/releases/download/v$(RAUC_VERSION)
 RAUC_SOURCE = rauc-$(RAUC_VERSION).tar.xz
 RAUC_LICENSE = LGPL-2.1
@@ -29,7 +29,7 @@  ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 RAUC_DEPENDENCIES += systemd
 endif
 
-HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2
+HOST_RAUC_DEPENDENCIES = host-pkgconf host-openssl host-libglib2 host-squashfs
 HOST_RAUC_CONF_OPTS += --disable-network --disable-json --disable-service
 
 $(eval $(autotools-package))