[Buildroot] [PATCH v3 10/10] package/flutter-gallery: clean up install_target_cmds

Yann E. MORIN yann.morin.1998 at free.fr
Sat Jan 20 21:59:17 UTC 2024


Adam, All,

On 2024-01-17 15:50 -0700, Adam Duskett spake thusly:
> Remove and create the kernel_blob.bin file in the flutter_assets directory:
> 
>   When Flutter compiles the source code, it creates the kernel_blob.bin file,
>   a Dart Kernel Bytecode of the application.
> 
>   If kernel_blob.bin exists inside the flutter_assets directory, then the
>   application source code can be extracted with nothing more than apktool.
>   Not only is this a security risk, it's also redundant and a waste of space.
> 
>   Removing the kernel_blob.bin file generated for flutter-gallery saves 86M!
>   Because this package is a reference package, and some applications may check
>   if the kernel_blob.bin file exists, we also touch a blank kernel_blob.bin
>   file.
> 
> Do not use relative symlinks:
>   Users may not install their applications in the
>   /usr/share/flutter/${package_name} directory. Because this is a reference
>   application, using exact symlinks to icudtl.dat and libflutter_engine.so
>   is preferable.

It was not directly obvious to me what this section meant, so I reworded
it, and introduced a bad typo... At least I could only spot one...
Sorry... :-(

> Signed-off-by: Adam Duskett <adam.duskett at amarulasolutions.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/flutter-gallery/flutter-gallery.mk | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/package/flutter-gallery/flutter-gallery.mk b/package/flutter-gallery/flutter-gallery.mk
> index e23dc399da..6b0954cb32 100644
> --- a/package/flutter-gallery/flutter-gallery.mk
> +++ b/package/flutter-gallery/flutter-gallery.mk
> @@ -45,10 +45,12 @@ define FLUTTER_GALLERY_INSTALL_TARGET_CMDS
>  	$(INSTALL) -D -m 0755 $(@D)/libapp.so \
>  		$(FLUTTER_GALLERY_INSTALL_DIR)/lib/libapp.so
>  
> -	ln -sf ../../../$(FLUTTER_ENGINE_RUNTIME_MODE)/data/icudtl.dat \
> +	ln -sf /usr/share/flutter/$(FLUTTER_ENGINE_RUNTIME_MODE)/data/icudtl.dat \
>  	$(FLUTTER_GALLERY_INSTALL_DIR)/data/
>  
> -	ln -sf ../../../../../lib/libflutter_engine.so $(FLUTTER_GALLERY_INSTALL_DIR)/lib/
> +	ln -sf /usr/lib/libflutter_engine.so $(FLUTTER_GALLERY_INSTALL_DIR)/lib/
> +	$(RM) $(FLUTTER_GALLERY_INSTALL_DIR)/data/flutter_assets/kernel_blob.bin
> +	touch $(FLUTTER_GALLERY_INSTALL_DIR)/data/flutter_assets/kernel_blob.bin
>  endef
>  
>  $(eval $(generic-package))
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list