diff mbox series

[LEDE-DEV] base-files: sysupgrade depends on sha256sum now

Message ID 20180311133350.24668-1-bjorn@mork.no
State Rejected
Delegated to: John Crispin
Headers show
Series [LEDE-DEV] base-files: sysupgrade depends on sha256sum now | expand

Commit Message

Bjørn Mork March 11, 2018, 1:33 p.m. UTC
commit 6ed389da85a9 ("base-files: sysupgrade: do not rely on opkg
to list changed conffile") adds a call to sha256sum.  Make sure it
exists.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
You'll see this unless you select sha256sum:

root@wrt1900ac-1:~# sysupgrade -b /tmp/foo
/sbin/sysupgrade: eval: line 1: sha256sum: not found
/sbin/sysupgrade: eval: line 1: sha256sum: not found
/sbin/sysupgrade: eval: line 1: sha256sum: not found
/sbin/sysupgrade: eval: line 1: sha256sum: not found
..


 package/base-files/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matthias Schiffer March 11, 2018, 1:45 p.m. UTC | #1
On 03/11/2018 02:33 PM, Bjørn Mork wrote:
> commit 6ed389da85a9 ("base-files: sysupgrade: do not rely on opkg
> to list changed conffile") adds a call to sha256sum.  Make sure it
> exists.
> 
> Signed-off-by: Bjørn Mork <bjorn@mork.no>
> ---

We generally do no add dependencies for busybox applets that are enabled by
default - otherwise, we would also need to add dependencies for sed, awk,
grep, etc. When you change the busybox configuration, you are on your own,
and you should regularly check the output of scripts/diffconfig.sh when
updating your tree to catch changed defaults.

Regards,
Matthias


> You'll see this unless you select sha256sum:
> 
> root@wrt1900ac-1:~# sysupgrade -b /tmp/foo
> /sbin/sysupgrade: eval: line 1: sha256sum: not found
> /sbin/sysupgrade: eval: line 1: sha256sum: not found
> /sbin/sysupgrade: eval: line 1: sha256sum: not found
> /sbin/sysupgrade: eval: line 1: sha256sum: not found
> ..
> 
> 
>  package/base-files/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/base-files/Makefile b/package/base-files/Makefile
> index f4505d6843c4..4b668aa2da05 100644
> --- a/package/base-files/Makefile
> +++ b/package/base-files/Makefile
> @@ -39,7 +39,7 @@ endif
>  define Package/base-files
>    SECTION:=base
>    CATEGORY:=Base system
> -  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
> +  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool +@BUSYBOX_CONFIG_SHA256SUM
>    TITLE:=Base filesystem for OpenWrt
>    URL:=http://openwrt.org/
>    VERSION:=$(PKG_RELEASE)-$(REVISION)
>
Bjørn Mork March 11, 2018, 1:51 p.m. UTC | #2
Matthias Schiffer <mschiffer@universe-factory.net> writes:

> We generally do no add dependencies for busybox applets that are enabled by
> default - otherwise, we would also need to add dependencies for sed, awk,
> grep, etc. When you change the busybox configuration, you are on your own,
> and you should regularly check the output of scripts/diffconfig.sh when
> updating your tree to catch changed defaults.

OK, thanks for explaining.  I guess I only hit this because I lazily
reused an old config with make oldconfig.


Bjørn
diff mbox series

Patch

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index f4505d6843c4..4b668aa2da05 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -39,7 +39,7 @@  endif
 define Package/base-files
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
+  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:lede-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool +@BUSYBOX_CONFIG_SHA256SUM
   TITLE:=Base filesystem for OpenWrt
   URL:=http://openwrt.org/
   VERSION:=$(PKG_RELEASE)-$(REVISION)