@bazeldnf//:def.bzl
legacy API
Functions & Macros
bazeldnfParameters
args | |
kwargs |
@bazeldnf//bazeldnf:defs.bzl
Public API to use bazeldnf from other repositories
Functions & Macros
bazeldnfParameters
kwargs |
rpmtreeCreates a tar file from a list of rpm files.
Parameters
*name | |
kwargs |
tar2filesExtracts files from a tar file.
Parameters
*name | The name of the tar file to be processed. |
files | A dictionary where each key-value pair represents a file to be extracted. Default: None |
kwargs | Additional keyword arguments to be passed to the _tar2files function. |
xattrsParameters
kwargs |
Repository Rules
rpm| Attribute | Type | Description |
|---|---|---|
*name | name | A unique name for this repository. |
repo_mapping | dictionary: String → String | In For example, an entry This attribute is not supported in |
urls | list of strings | Default: [] |
sha256 | string | Default: "" |
integrity | string | Default: "" |
dependencies | list of labels | Default: [] |
auth_patterns | dictionary: String → String | Default: {} |
@bazeldnf//bazeldnf:extensions.bzl
Extensions for bzlmod.
Installs the bazeldnf toolchain.
Module Extensions
bazeldnf_toolchainTag Classes
registerAllows registering a prebuilt bazeldnf toolchain
| Attribute | Type | Description |
|---|---|---|
name | name | Base name for generated repositories, allowing more than one bazeldnf toolchain to be registered. Default: "bazeldnf" |
disable | boolean | Default: False |
bazeldnfTag Classes
rpmAllows registering a Bazel repository wrapping an RPM file
| Attribute | Type | Description |
|---|---|---|
name | name | Name of the generated repository Default: "" |
urls | list of strings | URLs from which to download the RPM file Default: [] |
sha256 | string | The expected SHA-256 of the file downloaded. Default: "" |
integrity | string | Expected checksum in Subresource Integrity format of the file downloaded. Default: "" |
config| Attribute | Type | Description |
|---|---|---|
name | name | Name of the generated proxy repository Default: "bazeldnf_rpms" |
cache_dir | string | Path of the bazeldnf cache repository Default: "" |
lock_file | label | Label of the JSON file that contains the RPMs to expose, there's no legacy mode for RPMs defined by a lock file. The lock file content is as:
Default: None |
ignore_missing_lockfile | boolean | In case lockfile does not exist, create null rpm targets so that clients can still depend on them. One won't be prompted with "please run Default: False |
rpm_repository_prefix | string | A prefix to add to all generated rpm repositories Default: "" |
repofile | label | YAML file that defines the repositories used for this lock file Default: None |
rpms | list of strings | name of the RPMs to install Default: [] |
excludes | list of strings | Regex to pass to bazeldnf to exclude from the dependency tree Default: [] |
nobest | boolean | Allow picking versions which are not the newest Default: False |
ignore_deps | boolean | Don't include dependencies in resulting repositories Default: False |
architecture | string | Single architecture to enable in addition to noarch Default: "" |
architectures | list of strings | Custom list of architectures (can't be used with Can use more than one. The list defines architectures priority – Default: [] |
@bazeldnf//bazeldnf:platforms.bzl
Platforms definition for this repository
@bazeldnf//bazeldnf:repositories.bzl
Declare runtime dependencies
These are needed for local dev, and users must install them as well.
See https://docs.bazel.build/versions/main/skylark/deploying.html#dependencies
Functions & Macros
http_archiveParameters
*name | |
kwargs |
bazeldnf_dependenciesbazeldnf_register_toolchainsConvenience macro for users which does typical setup.
- create a repository for each built-in platform like "bazeldnf_linux_amd64" -
this repository is lazily fetched when node is needed for that platform. - TODO: create a convenience repository for the host platform like "bazeldnf_host"
- create a repository exposing toolchains for each platform like "bazeldnf_platforms"
- register a toolchain pointing at each platform
Users can avoid this macro and do these steps themselves, if they want more control.
Parameters
*name | base name for all created repos, like "bazeldnf1_14" |
register | whether to call through to native.register_toolchains. Default: True |
kwargs | passed to each node_repositories call |
Repository Rules
bazeldnf_repositoriesFetch external tools needed for bazeldnf toolchain
| Attribute | Type | Description |
|---|---|---|
*name | name | A unique name for this repository. |
repo_mapping | dictionary: String → String | In For example, an entry This attribute is not supported in |
*tool | string |
@bazeldnf//bazeldnf:toolchain.bzl
@bazeldnf//internal:bazeldnf.bzl
Provides a wrapper to run bazeldnf as a run target
Functions & Macros
bazeldnfParameters
kwargs |
@bazeldnf//internal:rpm.bzl
Exposes rpm files to a Bazel workspace
Rules
rpm_rule| Attribute | Type | Description |
|---|---|---|
*name | name | A unique name for this target. |
*file | label | |
deps | list of labels | Default: [] |
null_rpm_rule| Attribute | Type | Description |
|---|---|---|
*name | name | A unique name for this target. |
Repository Rules
rpm| Attribute | Type | Description |
|---|---|---|
*name | name | A unique name for this repository. |
repo_mapping | dictionary: String → String | In For example, an entry This attribute is not supported in |
urls | list of strings | Default: [] |
sha256 | string | Default: "" |
integrity | string | Default: "" |
dependencies | list of labels | Default: [] |
auth_patterns | dictionary: String → String | Default: {} |
Providers
RpmInfoInformation about an RPM file
Used to pass information about an RPM file from the rpm rule to
other rules like rpmtree
Fields
deps | depset of other dependencies |
file | label of the RPM file |
@bazeldnf//internal:rpmtree.bzl
Provide helpers to convert rpm files into a single tar file
This file exposes rpmtree and tar2files to convert a group of
rpm files into either a .tar or extract files from that tar to
make available to bazel
Functions & Macros
rpmtreeCreates a tar file from a list of rpm files.
Parameters
*name | |
kwargs |
tar2filesExtracts files from a tar file.
Parameters
*name | The name of the tar file to be processed. |
files | A dictionary where each key-value pair represents a file to be extracted. Default: None |
kwargs | Additional keyword arguments to be passed to the _tar2files function. |
@bazeldnf//internal:xattrs.bzl
Modify xattrs on tar file members
Functions & Macros
xattrsParameters
kwargs |
@bazeldnf//tools:integrity.bzl
Generated during release by release_prep.sh, using integrity.jq
@bazeldnf//tools:version.bzl
Generated during release generate_tools_prebuilts.sh