-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bzlmod: introducing proxy repository
Introducing a proxy repository to make it easier to consume rpms by not polluting the public repository namespace
- Loading branch information
1 parent
7b9b7c5
commit b3f3041
Showing
7 changed files
with
158 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Import Aspect bazelrc presets | ||
try-import %workspace%/../../.aspect/bazelrc/bazel7.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/bazel6.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/convenience.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/correctness.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/debug.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/performance.bazelrc | ||
|
||
common --enable_bzlmod | ||
|
||
# Specific project flags go here if we have some | ||
|
||
# Load any settings & overrides specific to the current user from `.bazelrc.user`. | ||
# This file should appear in `.gitignore` so that settings are not shared with team members. This | ||
# should be last statement in this config so the user configuration is able to overwrite flags from | ||
# this file. See https://bazel.build/configure/best-practices#bazelrc-file. | ||
try-import %workspace%/../../.bazelrc.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
load("@bazeldnf//bazeldnf:defs.bzl", "bazeldnf", "rpmtree", "tar2files") | ||
load("@rules_pkg//pkg:tar.bzl", "pkg_tar") | ||
|
||
bazeldnf( | ||
name = "bazeldnf", | ||
) | ||
|
||
rpmtree( | ||
name = "something", | ||
rpms = [ | ||
"@bazeldnf_rpms//libvirt-libs-6.1.0-2.fc32.x86_64.rpm", | ||
"@bazeldnf_rpms//libvirt-devel-6.1.0-2.fc32.x86_64.rpm", | ||
], | ||
) | ||
|
||
tar2files( | ||
name = "something_libs", | ||
files = { | ||
"/usr/lib64": [ | ||
"libvirt.so.0", | ||
"libvirt.so.0.6001.0", | ||
], | ||
}, | ||
tar = ":something", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_tar( | ||
name = "whatever", | ||
deps = [":something"], | ||
) | ||
|
||
cc_library( | ||
name = "bar", | ||
srcs = ["//:something_libs/usr/lib64"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"example MODULE.bazel to test bzlmod integration for bazeldnf with a prebuilt toolchain" | ||
|
||
module(name = "example-bazeldnf-with-bzlmod-non-legacy-mode") | ||
|
||
bazel_dep(name = "bazeldnf") | ||
local_path_override( | ||
module_name = "bazeldnf", | ||
path = "../..", | ||
) | ||
|
||
bazel_dep(name = "rules_pkg", version = "1.0.1") | ||
|
||
bazeldnf = use_extension("@bazeldnf//bazeldnf:extensions.bzl", "bazeldnf") | ||
bazeldnf.config(legacy_mode = False) | ||
bazeldnf.rpm( | ||
name = "libvirt-libs-6.1.0-2.fc32.x86_64.rpm", | ||
sha256 = "3a0a3d88c6cb90008fbe49fe05e7025056fb9fa3a887c4a78f79e63f8745c845", | ||
urls = [ | ||
"https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/l/libvirt-libs-6.1.0-2.fc32.x86_64.rpm", | ||
"https://storage.googleapis.com/builddeps/3a0a3d88c6cb90008fbe49fe05e7025056fb9fa3a887c4a78f79e63f8745c845", | ||
], | ||
) | ||
bazeldnf.rpm( | ||
name = "libvirt-devel-6.1.0-2.fc32.x86_64.rpm", | ||
sha256 = "2ebb715341b57a74759aff415e0ff53df528c49abaa7ba5b794b4047461fa8d6", | ||
urls = [ | ||
"https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/l/libvirt-devel-6.1.0-2.fc32.x86_64.rpm", | ||
"https://storage.googleapis.com/builddeps/2ebb715341b57a74759aff415e0ff53df528c49abaa7ba5b794b4047461fa8d6", | ||
], | ||
) | ||
use_repo(bazeldnf, "bazeldnf_rpms") |
Empty file.