All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: Angelo Compagnucci <angelo@amarulasolutions.com>,
	Michael Trimarchi <michael@amarulasolutions.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Asaf Kahlon <asafka7@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH vRFC 2/3] package/depot-tools: new package
Date: Sun, 23 Jul 2023 21:52:56 +0200	[thread overview]
Message-ID: <20230723195256.GB3544423@scaer> (raw)
In-Reply-To: <20230720233629.1642220-3-adam.duskett@amarulasolutions.com>

Adam, All,

On 2023-07-20 16:36 -0700, Adam Duskett spake thusly:
> Chromium and Chromium OS use a package of scripts called
> depot_tools to manage checkouts and code reviews. This package
> also includes the gclient utility.
> 
> gclient is a Python script to manage a workspace of modular dependencies that
> are each checked out independently from different subversion or git
> repositories. Features include:
> 
>   - Dependencies can be specified on a per-OS basis.
>   - Dependencies can be specified relative to their parent dependency.
>   - Variables can be used to abstract concepts.
>   - Hooks can be specified to be run after a checkout.
>   - .gclient and DEPS are Python scripts. You can hack in easily or add
>      additional configuration data.
> 
> .gclient file: It's the primary file. It is, in fact, a Python script. It
> specifies the following variables:
> 
>   - solutions: an array of dictionaries specifying the projects that will be
>                fetched.
>   - hooks: additional hooks to be run when this meta checkout is synced.
>   - target_os: an optional array of (target) operating systems to fetch
>                OS-specific dependencies for.
>   - cache_dir: Primarily for bots, multiple working sets use a single git
>                cache.
> 
> gclient is necessary for checking out the flutter-engine source code, as the
> release tarballs provided on the flutter-engine github are in no state to
> compile. Google expects the use of gclient to download a source directory
> structure suitable to build the Flutter engine.

Thanks for this very detailed commit log.

> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
[--SNIP--]
> diff --git a/package/depot-tools/0001-Disable-ninjalog-upload.patch b/package/depot-tools/0001-Disable-ninjalog-upload.patch
> new file mode 100644
> index 0000000000..55fd78247f
> --- /dev/null
> +++ b/package/depot-tools/0001-Disable-ninjalog-upload.patch
> @@ -0,0 +1,35 @@
> +From eeea6ad620b88a81a4b05d49f32a375b4bbcef36 Mon Sep 17 00:00:00 2001
> +From: Adam Duskett <aduskett@gmail.com>
> +Date: Thu, 13 Jul 2023 15:50:25 -0700
> +Subject: [PATCH] Disable ninjalog upload
> +
> +Google doesn't need the ninja logs.
> +
> +Upstream: buildroot-specific.
> +Signed-off-by: Adam Duskett <aduskett@gmail.com>
> +---
> + autoninja | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/autoninja b/autoninja
> +index 06d45d1..354a2f1 100755
> +--- a/autoninja
> ++++ b/autoninja
> +@@ -30,12 +30,12 @@ if eval "$command"; then
> +   fi
> + 
> +   # Collect ninjalog from googler.
> +-  python3 "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
> ++  # python3 "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command

Don't comment lines out, just remove them (with the associated comment
while at it).

> +   exit
> + fi
> + 
> + # Collect ninjalog from googler.
> +-python3 "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command
> ++# python3 "$(dirname -- "$0")/ninjalog_uploader_wrapper.py" --cmd $command

Ditto.

[--SNIP--]
> diff --git a/package/depot-tools/depot-tools.mk b/package/depot-tools/depot-tools.mk
> new file mode 100644
> index 0000000000..906340016c
> --- /dev/null
> +++ b/package/depot-tools/depot-tools.mk
> @@ -0,0 +1,33 @@
> +################################################################################
> +#
> +# depot-tools
> +#
> +################################################################################
> +
> +DEPOT_TOOLS_VERSION = 4e87f5bfe244e903f712408ea68dc3c3a6fe2d00
> +DEPOT_TOOLS_SITE = https://chromium.googlesource.com/chromium/tools/depot_tools
> +DEPOT_TOOLS_SITE_METHOD = git
> +DEPOT_TOOLS_LICENSE = Chromium

The license in the LICENSE file looks suspiciously like it is in fact a
BSD-3-Clause:
    https://spdx.org/licenses/BSD-3-Clause.html

> +DEPOT_TOOLS_LICENSE_FILES = LICENSE
> +DEPOT_TOOLS_CPE_ID_VENDOR = google
> +HOST_DEPOT_TOOLS_DEPENDENCIES = \
> +	host-python3 \
> +	host-python-httplib2 \
> +	host-python-pyparsing \
> +	host-python-six
> +
> +define HOST_DEPOT_TOOLS_INSTALL_CMDS
> +	mkdir -p $(HOST_DIR)/share/depot_tools
> +	cp -dprf $(@D)/* $(HOST_DIR)/share/depot_tools/
> +endef
> +
> +# Helper wrapper to make using gclient easier.
> +DEPOT_TOOLS_GCLIENT=\

Spaces on both sides of the equal sign.

> +	PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools \
> +	LD_LIBRARY_PATH=$(HOST_DIR)/lib \

Ick. Why do we need to set LD_LIBRARY_PATH?

> +	PYTHONPATH=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR) \

PYTHONPATH=$(PYTHON3_PATH)

Why do we need to force it?

> +	DEPOT_TOOLS_UPDATE=0 \
> +	PYTHONDONTWRITEBYTECODE=1 \

Why do we need PYTHONDONTWRITEBYTECODE=1? I have it in my environment to
avoid littering repositories, indeed, but why do we need to force it for
gclient?

Regards,
Yann E. MORIN.

> +	$(HOST_DIR)/share/depot_tools/gclient.py
> +
> +$(eval $(host-generic-package))
> -- 
> 2.41.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

  reply	other threads:[~2023-07-23 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 23:36 [Buildroot] [PATCH vRFC 0/3] Initial flutter packages Adam Duskett
2023-07-20 23:36 ` [Buildroot] [PATCH vRFC 1/3] package/python-httplib2: add host variant Adam Duskett
2023-07-20 23:36 ` [Buildroot] [PATCH vRFC 2/3] package/depot-tools: new package Adam Duskett
2023-07-23 19:52   ` Yann E. MORIN [this message]
2023-07-20 23:36 ` [Buildroot] [PATCH vRFC 3/3] package/flutter-engine: " Adam Duskett
2023-07-23 21:26   ` Yann E. MORIN
2023-07-25 15:38     ` Adam Duskett
2023-07-20 23:37 ` [Buildroot] [PATCH vRFC 0/3] Initial flutter packages Adam Duskett

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=20230723195256.GB3544423@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=angelo@amarulasolutions.com \
    --cc=asafka7@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=michael@amarulasolutions.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.