Skip to content

Commit 4bd4dd8

Browse files
committed
fix(rocm-compilersupport): introduce azl_release counter
The hard-coded "Release: 15.rocm%{rocm_version}%{?dist}" line in this spec gives no machine-readable signal for "AZL has rebuilt this on top of an unchanged upstream pin", which means every distro-local change (overlay tweak, build-flag adjustment, dependency rebuild) requires hand-editing the Release prefix to bump it. That is easy to forget and trivial to get wrong. Switch to the same %{azl_release}-driven pattern used elsewhere in the distro: Release: %[15 + %{azl_release}].rocm%{rocm_version}%{?dist} %{azl_release} is set via build.defines in the comp.toml and is meant to be incremented monotonically by every commit that changes a tracked input (overlay edit, build-define change, lock pin refresh), which is what check-azl-release.yml enforces. The "15 +" base preserves continuity with the previously shipped Release == 15 builds so the schema stays monotonic across the switchover. The initial value (3) accounts for the upstream-fingerprint-changing commits that preceded this one, plus this commit itself; the inline comment in comp.toml lists them by title so reviewers can audit the counter against history without scraping git log. No build behaviour changes besides the literal Release number.
1 parent 99fe90a commit 4bd4dd8

4 files changed

Lines changed: 40 additions & 3 deletions

File tree

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
11
[components.rocm-compilersupport]
2-
# Release: 15.rocm%{rocm_version}%{?dist}
2+
# Release is composed in the overlay below as
3+
# Release: %[15 + %{azl_release}].rocm%{rocm_version}%{?dist}
4+
# The "15 +" base anchors the formula at the last hard-coded Release
5+
# value before the counter was introduced; %{azl_release} then adds the
6+
# number of AZL-only rebuilds on top of that, ensuring Release stays
7+
# monotonic across the switchover.
38
release = { calculation = "manual" }
9+
10+
[components.rocm-compilersupport.build.defines]
11+
# AZL-only release counter. Composed with the "15." base via the overlay
12+
# below (Release: %[15 + %{azl_release}].rocm...), keeping a monotonically
13+
# increasing single-number Release schema. Bump whenever an AZL-only
14+
# change requires a new RPM (new overlay, build-flag change, rebuild
15+
# against new dependency) WITHOUT moving the upstream pin.
16+
#
17+
# Current value matches the number of times the lock file's
18+
# input-fingerprint has changed under the rules enforced by
19+
# check-azl-release.yml. Each commit that touches a tracked input
20+
# (overlay edit, build-define change, lock pin refresh, etc.) advances
21+
# the counter by one in the same PR.
22+
#
23+
# Commits that have bumped this counter (newest last):
24+
# 1. feat: introduce deterministic commit resolution via Azure Linux lock file
25+
# 2. fix(rocm-compilersupport): set manual release calculation
26+
# 3. fix(rocm-compilersupport): introduce azl_release counter
27+
azl_release = "3"
28+
29+
[[components.rocm-compilersupport.overlays]]
30+
description = "Switch hard-coded Release prefix to %{azl_release}-driven formula so AZL-only rebuilds bump cleanly without manual edits"
31+
type = "spec-search-replace"
32+
regex = '''Release: 15\.rocm%\{rocm_version\}%\{\?dist\}'''
33+
replacement = '''Release: %[15 + %{azl_release}].rocm%{rocm_version}%{?dist}'''

locks/rocm-compilersupport.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
version = 1
33
import-commit = '878261eeebbede5f9f220522155fb1ccd8110df8'
44
upstream-commit = '878261eeebbede5f9f220522155fb1ccd8110df8'
5-
input-fingerprint = 'sha256:85e674748ef2b244a89da353d8de60b5f64024025b9b7bb8db662555e85c0f60'
5+
input-fingerprint = 'sha256:ba5c7c12d93828b38f2bfed2431fba93ff016e2b23620b706ca356cc6b2a3115'
66
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Macros file automatically generated by azldev.
2+
# Do not edit manually; changes will be overwritten.
3+
%azl_release 3

specs/r/rocm-compilersupport/rocm-compilersupport.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# This spec file has been modified by azldev to include build configuration overlays.
22
# Do not edit manually; changes may be overwritten.
33

4+
# All Azure Linux specs with overlays include this macro file, irrespective of whether new macros have been added.
5+
%{load:%{_sourcedir}/rocm-compilersupport.azl.macros}
6+
47
# The package follows LLVM's major version, but API version is still important:
58
%global comgr_maj_api_ver 3
69
# local, fedora
@@ -42,7 +45,7 @@
4245

4346
Name: rocm-compilersupport
4447
Version: %{llvm_maj_ver}
45-
Release: 15.rocm%{rocm_version}%{?dist}
48+
Release: %[15 + %{azl_release}].rocm%{rocm_version}%{?dist}
4649
Summary: Various AMD ROCm LLVM related services
4750
%if 0%{?suse_version}
4851
Group: Development/Languages/Other
@@ -53,6 +56,7 @@ Url: https://github.com/ROCm/llvm-project
5356
License: NCSA and MIT
5457
Source0: https://github.com/ROCm/%{upstreamname}/archive/refs/tags/rocm-%{rocm_version}.tar.gz#/%{name}-%{rocm_version}.tar.gz
5558
Source1: rocm-compilersupport.prep.in
59+
Source9999: rocm-compilersupport.azl.macros
5660

5761
Patch3: 0001-Remove-err_drv_duplicate_config-check.patch
5862
Patch4: 0001-Replace-use-of-mktemp-with-mkstemp.patch

0 commit comments

Comments
 (0)