From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 10/10] package/flutter-gallery: clean up install_target_cmds
Date: Sat, 20 Jan 2024 22:59:17 +0100 [thread overview]
Message-ID: <ZaxCNWaYXvkG3Mmv@landeda> (raw)
In-Reply-To: <20240117225049.28443-11-adam.duskett@amarulasolutions.com>
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@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@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. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-01-20 21:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 22:50 [Buildroot] [PATCH v3 00/10] more flutter package improvements Adam Duskett
2024-01-17 22:50 ` [Buildroot] [PATCH v3 01/10] package/ivi-homescreen: add standard_method_codec.h to keyboard manager plugin Adam Duskett
2024-01-17 22:50 ` [Buildroot] [PATCH v3 02/10] package/depot-tools: bump version to 8d14454ba4a35fd9d2483842b08815a2357ec86f Adam Duskett
2024-01-20 21:45 ` Yann E. MORIN
2024-02-03 11:27 ` Peter Korsgaard
2024-01-17 22:50 ` [Buildroot] [PATCH v3 03/10] package/flutter-engine/Config.in: Drop nptl dependency Adam Duskett
2024-01-17 22:50 ` [Buildroot] [PATCH v3 04/10] package/flutter-sdk-bin: bump version to 3.16.8 Adam Duskett
2024-01-17 22:50 ` [Buildroot] [PATCH v3 05/10] package/flutter-engine: " Adam Duskett
2024-01-17 22:50 ` [Buildroot] [PATCH v3 06/10] package/flutter-pi: bump version to 75e72fef8e8ce65ec72a002c00d9c6db4d1479d3 Adam Duskett
2024-01-17 22:50 ` [Buildroot] [PATCH v3 07/10] package/flutter-pi/Config.in: propagate flutter-engine dependencies Adam Duskett
2024-01-20 22:56 ` Yann E. MORIN
2024-01-17 22:50 ` [Buildroot] [PATCH v3 08/10] package/flutter-gallery: add a configure step Adam Duskett
2024-01-20 21:46 ` Yann E. MORIN
2024-02-03 12:09 ` Peter Korsgaard
2024-01-17 22:50 ` [Buildroot] [PATCH v3 09/10] package/flutter-gallery: fix build options Adam Duskett
2024-01-20 21:56 ` Yann E. MORIN
2024-02-03 12:09 ` Peter Korsgaard
2024-01-17 22:50 ` [Buildroot] [PATCH v3 10/10] package/flutter-gallery: clean up install_target_cmds Adam Duskett
2024-01-20 21:59 ` Yann E. MORIN [this message]
2024-02-03 12:09 ` Peter Korsgaard
2024-01-20 21:43 ` [Buildroot] [PATCH v3 00/10] more flutter package improvements Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZaxCNWaYXvkG3Mmv@landeda \
--to=yann.morin.1998@free.fr \
--cc=adam.duskett@amarulasolutions.com \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox