AlmaLinux / AlmaLinux/build-system

Enable shared yum cache for mock builds

Đang mở
#527 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
32
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Summary

Add support for sharing the yum/dnf package cache across mock builds of the same platform and architecture. This avoids redundant package downloads when multiple builds run for the same platform/arch combination, improving build performance.

## Changes

### Shared yum cache (`use_shared_yum_cache`)

When `use_shared_yum_cache: true` is set in a platform's `data.mock` config, the build node generates a `cache_key` in mock.cfg based on the platform name and target architecture:

```
config_opts["plugin_conf"]["yum_cache_opts"]["cache_key"] = "almalinux-kitten-10-x86_64"
```

This tells mock's yum_cache plugin to share the cached packages across all builds matching that key, instead of maintaining separate caches per chroot.

### Yum caching options (`keepcache`, `metadata_expire`)

Platform configs can now set `keepcache` and `metadata_expire` in `data.yum` to control yum.conf caching behavior inside the chroot. AlmaLinux-Kitten-10 is configured with `keepcache: true` and `metadata_expire: 60`.

### Nested dict support in MockConfig

`MockConfig.render_config_option` now supports two-level nested dictionaries, enabling direct setting of `plugin_conf` options without resetting existing plugin defaults.

## Pull Requests

- AlmaLinux/albs-build-lib#5 — nested dict support in `render_config_option`, `keepcache` and `metadata_expire` parameters in `YumConfig`
- AlmaLinux/albs-node#221 — shared yum cache handling in build node
- AlmaLinux/albs-web-server#1210 — enable `use_shared_yum_cache`, `keepcache`, and `metadata_expire` for AlmaLinux-Kitten-10

Merge order: albs-build-lib → albs-node → albs-web-server

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.