Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitute package variables in pkg_zip#package_dir. #577

Merged
merged 1 commit into from
May 4, 2022

Conversation

dlj-NaN
Copy link
Contributor

@dlj-NaN dlj-NaN commented Apr 21, 2022

This change adds logic and tests for substituting values from pkg_zip#package_variables into pkg_zip#package_dir. This behavior largely matches pkg_tar (pkg_zip does not have an equivalent to pkg_tar#package_dir_file, but they are otherwise the same).

This change adds logic and tests for substituting values from
`pkg_zip#package_variables` into `pkg_zip#package_dir`. This behavior
largely matches `pkg_tar` (`pkg_zip` does not have an equivalent to
`pkg_tar#package_dir_file`, but they are otherwise the same).
@dlj-NaN dlj-NaN requested review from aiuto and nacl as code owners April 21, 2022 19:21
@aiuto
Copy link
Collaborator

aiuto commented Apr 22, 2022

I would have liked to see an issue for this first, but it seems on the right track. I can look next week.

@dlj-NaN
Copy link
Contributor Author

dlj-NaN commented Apr 22, 2022

I would have liked to see an issue for this first, but it seems on the right track. I can look next week.

Sure, filed #578.

dlj-NaN added a commit to protocolbuffers/protobuf that referenced this pull request Apr 22, 2022
This change adds `rules_pkg`-based targets that will produce source distribution archives, similar to `make dist`.

These rules produce nearly the same outputs as `make dist`. However, there are some differences and caveats:

1. The outputs do not contain vendored googletest sources.
2. You have to run `autogen.sh` before `blaze build pkg:all`. This produces several autotools-related files directly into the source tree.
3. The output .zip files do not have a directory prefix like `protobuf-3.20.1-rc-1` (this will be addressed after [Substitute package variables in `pkg_zip#package_dir`. bazelbuild/rules_pkg#577](bazelbuild/rules_pkg#577); the tar files do have this prefix, though.)
4. One file is missing from the archives, which is produced during the `make` build: benchmarks/gogo/cpp_no_group/cpp_benchmark.cc
5. In several places, I have explicitly excluded some files that are not in the autotools distribution outputs. I think most of those files should probably be included, but for now, I'm aiming for parity with `make dist`. These are marked with comments, so it should be easy to clean them up later.
acozzette pushed a commit to protocolbuffers/protobuf-javascript that referenced this pull request Apr 27, 2022
This change adds `rules_pkg`-based targets that will produce source distribution archives, similar to `make dist`.

These rules produce nearly the same outputs as `make dist`. However, there are some differences and caveats:

1. The outputs do not contain vendored googletest sources.
2. You have to run `autogen.sh` before `blaze build pkg:all`. This produces several autotools-related files directly into the source tree.
3. The output .zip files do not have a directory prefix like `protobuf-3.20.1-rc-1` (this will be addressed after [Substitute package variables in `pkg_zip#package_dir`. bazelbuild/rules_pkg#577](bazelbuild/rules_pkg#577); the tar files do have this prefix, though.)
4. One file is missing from the archives, which is produced during the `make` build: benchmarks/gogo/cpp_no_group/cpp_benchmark.cc
5. In several places, I have explicitly excluded some files that are not in the autotools distribution outputs. I think most of those files should probably be included, but for now, I'm aiming for parity with `make dist`. These are marked with comments, so it should be easy to clean them up later.
@aiuto aiuto merged commit 00c8f6f into bazelbuild:main May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants