Skip to content

Commit

Permalink
[antlir][rpm.builder] Add rootless support to debuginfo.split
Browse files Browse the repository at this point in the history
Summary: Missed a spot

Test Plan:
```
[[email protected] /data/sandcastle/boxes/fbsource (c4111eae6|remote/fbcode/warm_fbcode_od_stable...)]$ buck2 build fbcode//metasim_da/kolibri/cli/...
Action failed: fbcode//metasim_da/kolibri/cli:fb-kolibri-cli--rpmbuild-layer (antlir2 compile)
Local command returned non-zero exit code 1
Reproduce locally: `env -- 'BUCK_SCRATCH_PATH=buck-out/v2/tmp/fbcode/df38f41ec8bfe3a0/antlir2/compile' 'RUST_LOG=antlir2 ...<omitted>... bcode/4ac4496ce7152983/metasim_da/kolibri/cli/__fb-kolibri-cli--rpmbuild-layer__/compile/plans.json' (run `buck2 log what-failed` to get the full command)`
stdout:
stderr:

##
## IMPORTANT!
##
## On Demand instances have very limited 'sudo' access.
##
##  * Run 'sudo -l' to see the list of commands you can run.
##
##  * If a password prompt appears, press Ctrl+C to cancel. Your
##    password will NOT work at this prompt. This means On Demand
##    does not allow running that command via sudo.
##
## For more information, see https://fburl.com/ondemandsudo
##

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
Buck UI: https://www.internalfb.com/buck2/214d2f76-f088-4102-bbda-1d20ee100966
Note:    Using experimental modern dice
Network: Up: 5.1MiB  Down: 6.1GiB  (reSessionID-c245dc8b-18f7-43e0-9594-11feb89f6476)
Jobs completed: 671706. Time elapsed: 3:07.1s.
Cache hits: 99%. Commands: 98007 (cached: 97061, remote: 925, local: 21)
BUILD FAILED
Failed to build 'fbcode//metasim_da/kolibri/cli:fb-kolibri-cli--rpmbuild-layer (cfg:linux-x86_64-fbcode-platform010-asan-ubsan-dev#4ac4496ce7152983)'
[[email protected] /data/sandcastle/boxes/fbsource (c4111eae6|remote/fbcode/warm_fbcode_od_stable...)]$ hg co D59004988
pulling D59004988 (bd049959b4f537568fcda62a784c1739e3d662e9) from 'mononoke://mononoke.internal.tfbnw.net/fbsource'
pulling 'bd049959b4f537568fcda62a784c1739e3d662e9' from 'mononoke://mononoke.internal.tfbnw.net/fbsource'
update complete
[[email protected] /data/sandcastle/boxes/fbsource (bd049959b)]$ buck2 build fbcode//metasim_da/kolibri/cli/...
File changed: fbcode//antlir/bzl/debuginfo.bzl
File changed: fbcode//registry/builder/rpm/bzl/rpm_builder.bzl
Buck UI: https://www.internalfb.com/buck2/e470bff4-9643-40c9-a519-260d7ad7c206
Note:    Using experimental modern dice
Network: Up: 0B  Down: 18MiB  (reSessionID-732e19f7-d20e-4f12-8ba6-3be291c78815)
Jobs completed: 5842. Time elapsed: 1.9s.
Cache hits: 0%. Commands: 3 (cached: 0, remote: 0, local: 3)
BUILD SUCCEEDED
```

Reviewed By: vmagro

Differential Revision: D59004988

fbshipit-source-id: cb0826fef2c82ce59fa2c9b736b36dad78b37e0d
  • Loading branch information
Naveed Golafshani authored and facebook-github-bot committed Jun 25, 2024
1 parent fa74e4a commit 58afcdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion antlir/bzl/debuginfo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def _split(
debuginfo_name: str | None = None,
flavor: str | None = None,
default_os: str | None = None,
visibility: list[str] | None = None) -> struct:
visibility: list[str] | None = None,
rootless: bool | None = None) -> struct:
"""
Given an OS-like image layer, split it into two images, one of which
contains the original layer minus any debug symbols and the other _only_ the
Expand All @@ -35,6 +36,7 @@ def _split(
],
parent_layer = layer,
visibility = visibility,
rootless = rootless,
**(default_os_kwarg | flavor_kwarg)
)
cfg_kwargs = {
Expand All @@ -52,6 +54,7 @@ def _split(
),
],
visibility = visibility,
rootless = rootless,
**cfg_kwargs
)
return struct(
Expand Down

0 comments on commit 58afcdf

Please sign in to comment.