Skip to content

Commit 6cd5c31

Browse files
committed
Added some README.md info on lock files
This change adds some brief information on how to generate lock files with `bazeldnf rpmtree` and the format of the lock files themselves.
1 parent 3644a6a commit 6cd5c31

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,35 @@ the `--nobest` option can be supplied. With this option all packages are
235235
considered. Newest packages will have the higest weight but it may not always be
236236
able to choose them and older packages may be pulled in instead.
237237

238+
### Lock files
239+
240+
bazeldnf can use lock files as the source of RPMs in lieu of using the WORKSPACE file. These
241+
can be hand written or generated with `bazeldnf rpmtree` similarly to how WORKSPACE files work.
242+
Lock files can *only* be used when working in bzlmod mode, not in workspace mode.
243+
244+
To generate lock files you can run the following:
245+
246+
```bash
247+
bazeldnf rpmtree --lockfile rpms.json --configname myrpms --name libvirttree libvirt
248+
```
249+
250+
The lock file JSON format is as follows:
251+
```
252+
{
253+
"name": "bazeldnf-rpms",
254+
"rpms": [
255+
{
256+
"name": "libvirt-libs",
257+
"sha256": "aac272a2ace134b5ef60a41e6624deb24331e79c76699ef6cef0dca22d94ac7e",
258+
"urls": [
259+
"https://kojipkgs.fedoraproject.org//packages/libvirt/11.0.0/1.fc42/x86_64/libvirt-libs-11.0.0-1.fc42.x86_64.rpm"
260+
]
261+
}
262+
]
263+
}
264+
265+
```
266+
238267
### Dependency resolution limitations
239268

240269
##### Missing features

0 commit comments

Comments
 (0)