New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 874735 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Task



Sign in to add a comment

Move platform/system_api to platform2/system_api.

Project Member Reported by hidehiko@chromium.org, Aug 16

Issue description

Currently system_api is a standalone repository.
The main reason is it is checked out via gclient into chromium.

Historically, it has been there, because chromium does not want to checkout whole the platform2/ repository.

Now, we have gsubtreed
cf) https://chromium.googlesource.com/infra/infra/+/master/infra/services/gsubtreed/README.md

so the problem will be resolved with it.
The main benefit is, with the transition, we no longer need to split the CL to change the APIs of the Chrome OS services exported into Chrome.

Small cons is, the git hash int he DEPS file will be different from what we have in platform2/.




 
if you want to do the history rewrite and import, you can push it to your sandbox space for review
Do you have any reference/docs etc I can refer for the procedure?
i thought you had done this before :).  here's the script i have laying around.  not sure of its status.
import-repo
2.2 KB View Download
Owner: hidehiko@chromium.org
Status: Assigned (was: Untriaged)
Re #3: Thank you for sharing the script.

So here's my transition plan;
- Send a PSA to announce the transition sometime soon.
- Add platform2/system_api sometime. (Hereafter, until the switching is completed, we need to maintain both platform/system_api and platform2/system_api, in theory. Practically, we could have some room to be slightly flexible, though.).
- Set up gsubtreed for platform2/system_api.
- Switch DEPS in chromium.

Here, the switching is done, and following the clean up.
- Then, delete all files in platform/system_api.
- Remove the platform/system_api from repo.

to be overly clear, you'll also want to update the ebuild after merging system_api into platform2
Re #5: yes, I will. I was thinking it is a part of "Add platform2/system_api". Thank you for clarification.

Status: Started (was: Assigned)
Let's move forward.

For DEPS update in Chromium, I found an example: https://chromium-review.googlesource.com/758743
So, it should work, I think.

Created a branch for review. vapier@ PTAL?
https://chromium.googlesource.com/chromiumos/platform2/+/sandbox/hidehiko/merge/system_api

There's four inflight CLs for system_api. Once those are landed, I'll recreate and push as a first step.
Once it's done, I'll create another bug for gsubtreed setup.
you'll want to run `./common-mk/check-readme.py` manually and add another commit to address those issues

as part of that, you could do the README->README.md migration in system_api now and i can approve that

for the commit history, how do you feel about changing the commit messages to include a "system_api: " prefix on all of them (when there isn't already one) ?
RE #9: Thank you for review. Done for README. PTAL.

There're three CLs in CQ, and one under review. I'll re-run the import script after these are landed.

As for "system_api: " prefix, IMHO, I'd probably avoid it, to keep consistency with the code review slightly more (searching with "system_api: " prefixed title wouldn't work).
For the record.
platform2/system_api has been pushed now.  crbug.com/889715  gsubtreed request is filed.
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/d8bbd9c561122ca0432f7c4ab7157bd318bd90e4

commit d8bbd9c561122ca0432f7c4ab7157bd318bd90e4
Author: Hidehiko Abe <hidehiko@chromium.org>
Date: Fri Sep 28 02:45:17 2018

system_api: Use platform2/ instead of platform/.

BUG= chromium:874735 
TEST=Build locally.

Change-Id: Ib7e4ac7a68c811be4d1fd21f78bddfb20b468397
Reviewed-on: https://chromium-review.googlesource.com/1233216
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/d8bbd9c561122ca0432f7c4ab7157bd318bd90e4/chromeos-base/system_api/system_api-9999.ebuild

Cc: norvez@chromium.org
I just repo sync'd my local tree and I can't build anymore:

"
=== Start output for job system_api-0.0.1-r3445 (0m4.7s) ===
	chromeos-base/system_api-0.0.1-r3445
system_api-0.0.1-r3445: >>> Emerging (1 of 1) chromeos-base/system_api-0.0.1-r3445::chromiumos
system_api-0.0.1-r3445:  * Running stacked hooks for pre_pkg_setup
system_api-0.0.1-r3445:  *    sysroot_build_bin_dir ...                                          [ ok ]
system_api-0.0.1-r3445:  * Running stacked hooks for post_pkg_setup
system_api-0.0.1-r3445:  *    python_eclass_hack ...                                             [ ok ]
system_api-0.0.1-r3445:  * Running stacked hooks for pre_src_unpack
system_api-0.0.1-r3445:  *    python_multilib_setup ...                                          [ ok ]
system_api-0.0.1-r3445: >>> Unpacking source...
system_api-0.0.1-r3445:  * /mnt/host/source/src/platform2 is not at rev fd40bd97dcbf119f40ca42e6c52610cdf0fc9bad
system_api-0.0.1-r3445: Cloning into '/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1'...
system_api-0.0.1-r3445: done.
system_api-0.0.1-r3445: >>> Source unpacked in /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work
system_api-0.0.1-r3445:  * Running stacked hooks for post_src_unpack
system_api-0.0.1-r3445:  *    asan_init ...                                                      [ ok ]
system_api-0.0.1-r3445: >>> Preparing source in /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/system_api ...
system_api-0.0.1-r3445: >>> Source prepared.
system_api-0.0.1-r3445: >>> Configuring source in /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/system_api ...
system_api-0.0.1-r3445: /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/platform2.py --host --libdir=/usr/lib64 --use_flags=abi_x86_64 amd64 cros_host elibc_glibc kernel_linux userland_GNU --jobs=48 --action=configure --cache_dir=/var/cache/portage/chromeos-base/system_api --platform_subdir=system_api /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/system_api/system_api.gyp
system_api-0.0.1-r3445: 20:16:06: INFO: RunCommand: gyp /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/system_api/system_api.gyp '--format=ninja' '--include=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/common.gypi' '--depth=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1' '--toplevel-dir=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1' '--generator-output=/var/cache/portage/chromeos-base/system_api' '-Dexternal_cflags=-O2 -pipe' '-Dexternal_cppflags= -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE' '-Denable_exceptions=0' '-Dbuild_root=/var/cache/portage/chromeos-base/system_api' '-Dexternal_ldflags=-Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed' '-Dplatform2_root=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1' '-Dexternal_cxxflags=-O2 -pipe' '-DOS=linux' '-Dlibdir=/usr/lib64' '-Dlibbase_ver=395517' '-Dsysroot=/' '-Dpkg-config=pkg-config' '-DUSE_abi_x86_64=1' '-DUSE_amd64=1' '-DUSE_cros_host=1' '-DUSE_elibc_glibc=1' '-DUSE_kernel_linux=1' '-DUSE_userland_GNU=1' in /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1
system_api-0.0.1-r3445: gyp: /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/platform2/common-mk/protoc.gypi not found (cwd: /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1) while reading includes of /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/system_api/system_api.gyp
system_api-0.0.1-r3445: platform2.py: Unhandled exception:
system_api-0.0.1-r3445: Traceback (most recent call last):
system_api-0.0.1-r3445:   File "/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/platform2.py", line 443, in <module>
system_api-0.0.1-r3445:     commandline.ScriptWrapperMain(lambda _: main)
system_api-0.0.1-r3445:   File "/usr/lib64/python2.7/site-packages/chromite/lib/commandline.py", line 912, in ScriptWrapperMain
system_api-0.0.1-r3445:     ret = target(argv[1:])
system_api-0.0.1-r3445:   File "/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/platform2.py", line 439, in main
system_api-0.0.1-r3445:     getattr(p2, options.action)(options.args)
system_api-0.0.1-r3445:   File "/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/platform2.py", line 239, in configure
system_api-0.0.1-r3445:     self.configure_gyp(args)
system_api-0.0.1-r3445:   File "/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/platform2.py", line 303, in configure_gyp
system_api-0.0.1-r3445:     cwd=self.get_platform2_root())
system_api-0.0.1-r3445:   File "/usr/lib64/python2.7/site-packages/chromite/lib/cros_build_lib.py", line 647, in RunCommand
system_api-0.0.1-r3445:     raise RunCommandError(msg, cmd_result)
system_api-0.0.1-r3445: chromite.lib.cros_build_lib.RunCommandError: return code: 1; command: gyp /var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/system_api/system_api.gyp '--format=ninja' '--include=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/common.gypi' '--depth=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1' '--toplevel-dir=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1' '--generator-output=/var/cache/portage/chromeos-base/system_api' '-Dexternal_cflags=-O2 -pipe' '-Dexternal_cppflags= -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE' '-Denable_exceptions=0' '-Dbuild_root=/var/cache/portage/chromeos-base/system_api' '-Dexternal_ldflags=-Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed' '-Dplatform2_root=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1' '-Dexternal_cxxflags=-O2 -pipe' '-DOS=linux' '-Dlibdir=/usr/lib64' '-Dlibbase_ver=395517' '-Dsysroot=/' '-Dpkg-config=pkg-config' '-DUSE_abi_x86_64=1' '-DUSE_amd64=1' '-DUSE_cros_host=1' '-DUSE_elibc_glibc=1' '-DUSE_kernel_linux=1' '-DUSE_userland_GNU=1'
system_api-0.0.1-r3445: cmd=['gyp', '/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/system_api/system_api.gyp', '--format=ninja', '--include=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1/common-mk/common.gypi', '--depth=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1', '--toplevel-dir=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1', '--generator-output=/var/cache/portage/chromeos-base/system_api', '-Dexternal_cflags=-O2 -pipe', '-Dexternal_cppflags= -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE', '-Denable_exceptions=0', '-Dbuild_root=/var/cache/portage/chromeos-base/system_api', '-Dexternal_ldflags=-Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed', '-Dplatform2_root=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1', '-Dexternal_cxxflags=-O2 -pipe', '-DOS=linux', '-Dlibdir=/usr/lib64', '-Dlibbase_ver=395517', '-Dsysroot=/', '-Dpkg-config=pkg-config', '-DUSE_abi_x86_64=1', '-DUSE_amd64=1', '-DUSE_cros_host=1', '-DUSE_elibc_glibc=1', '-DUSE_kernel_linux=1', '-DUSE_userland_GNU=1'], cwd=/var/tmp/portage/chromeos-base/system_api-0.0.1-r3445/work/system_api-0.0.1

"


"setup_board --force" fails the same way. That might be related?
Cc: oka@chromium.org
Re #13: Sorry for breakage. Talked to sheriff and the fix is in CQ.
cf) https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1250262

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 2

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/manifest-internal/+/89bec095aa2e966ce1bb06a9b38965c2c0024528

commit 89bec095aa2e966ce1bb06a9b38965c2c0024528
Author: Mike Frysinger <vapier@chromium.org>
Date: Tue Oct 02 20:23:11 2018

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/manifest/+/1524300c869d0050cc2aada97280ec4345b9953f

commit 1524300c869d0050cc2aada97280ec4345b9953f
Author: Mike Frysinger <vapier@chromium.org>
Date: Tue Oct 02 20:23:05 2018

drop system_api repo

This is in platform2 now.

BUG= chromium:874735 
TEST=precq passes

Change-Id: Ib29c7174b050a935a04739d5f74c8588139c3972
Reviewed-on: https://chromium-review.googlesource.com/1256083
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>

[modify] https://crrev.com/1524300c869d0050cc2aada97280ec4345b9953f/full.xml

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4685c874f6e76222bb84ecfa53bcd9f6d47f9206

commit 4685c874f6e76222bb84ecfa53bcd9f6d47f9206
Author: Hidehiko Abe <hidehiko@chromium.org>
Date: Thu Oct 04 10:01:24 2018

Switch cros_system_api repo from platform/ to platform2/.

The sync revision is just after merge.
The next roll should come just after this CL.

BUG= 874735 
TEST=Build.

Change-Id: I4fe902ca404d8dccd6409efb19c5d73104293ef9
Reviewed-on: https://chromium-review.googlesource.com/c/1260422
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596566}
[modify] https://crrev.com/4685c874f6e76222bb84ecfa53bcd9f6d47f9206/DEPS

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/169cb74055e8c3372f8809d455d480963af30623

commit 169cb74055e8c3372f8809d455d480963af30623
Author: Hidehiko Abe <hidehiko@chromium.org>
Date: Thu Oct 04 16:54:28 2018

Roll src/third_party/cros_system_api/ 7d4f284ec..2e1f8c671 (1 commit)

https://chromium.googlesource.com/chromiumos/platform2/system_api.git/+log/7d4f284ecdc0..2e1f8c671bd4

$ git log 7d4f284ec..2e1f8c671 --date=short --no-merges --format='%ad %ae %s'
2018-09-27 xiaochu system_api: add update_engine proto for d-bus method parameter

Created with:
  roll-dep src/third_party/cros_system_api

Bug:  874735 ,  879313 
Test: Try.
Change-Id: Ieab49202022b6f823989b32eaa7b8c5519c8c5d7
Reviewed-on: https://chromium-review.googlesource.com/c/1261535
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596709}
[modify] https://crrev.com/169cb74055e8c3372f8809d455d480963af30623/DEPS

Status: Fixed (was: Started)
Verified that we can roll platform2/system_api by roll-dep.
Project Member

Comment 21 by bugdroid1@chromium.org, Dec 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/df098dab04d9887a1a2c1af0ad3b59f4f57a8490

commit df098dab04d9887a1a2c1af0ad3b59f4f57a8490
Author: Ben Chan <benchan@chromium.org>
Date: Wed Dec 12 17:56:45 2018

system_api: remove unnecessary MODULE_LICENSE_BSD

As system_api is now under platform2, it doesn't need
MODULE_LICENSE_BSD.

BUG= chromium:874735 
TEST=None

Change-Id: Id628d6c00243db1179970bb0213ead2e557845d1
Reviewed-on: https://chromium-review.googlesource.com/c/1248044
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[delete] https://crrev.com/1afc0e97d9d8d70ae27cffd3d6c4b04a51f77503/system_api/MODULE_LICENSE_BSD

Sign in to add a comment