workaround(azurelinux-release): simplify spec to address rpmautospec errors#16049
workaround(azurelinux-release): simplify spec to address rpmautospec errors#16049reubeno merged 1 commit intotomls/base/mainfrom
Conversation
❌ Spec Review Failed
🛠️ Debug locally: .github/workflows/scripts/README.md
|
3664670 to
199b172
Compare
199b172 to
c1842e0
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the azurelinux-release RPM spec to avoid Koji/rpmautospec parsing issues by removing %autorelease/%autochangelog usage and simplifying macro logic.
Changes:
- Replace
%autoreleasewith a fixedRelease: 2%{?dist}. - Remove RPM
%[ ... ? ... : ...]ternary-basedrelease_typemacro usage and hard-codeRELEASE_TYPEin generatedos-release. - Replace
%autochangelogwith a manual%changelogentry.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # TODO(azl): Review whether we can move back to autorelease (with conditional -p) | ||
| Release: 2%{?dist} |
There was a problem hiding this comment.
Changing Release to a fixed 2%{?dist} breaks the spec’s existing prerelease detection (%if %{starts_with "a%{release}" "a0"}) and makes it impossible to represent the documented 0.<r> development numbering. If development builds still need the 0.* scheme, consider making Release: conditional on %{is_development} (using %if/%else) so prerelease labeling continues to work without relying on %autorelease.
| # TODO(azl): Review whether we can move back to autorelease (with conditional -p) | |
| Release: 2%{?dist} | |
| # TODO(azl): Review whether we can move back to autorelease (with conditional -p) | |
| %if %{is_development} | |
| Release: 0.1%{?dist} | |
| %else | |
| Release: 2%{?dist} | |
| %endif |
| # TODO(azl): review; dynamically generate RELEASE_TYPE from release_type macro | ||
| cat <<EOF >os-release | ||
| NAME="%{dist_name}" | ||
| VERSION="%{dist_version} (%{release_name}%{?prerelease})" | ||
| RELEASE_TYPE=%{release_type} | ||
| RELEASE_TYPE=development |
There was a problem hiding this comment.
This block hard-codes RELEASE_TYPE=development and the TODO references a release_type macro that no longer exists (it was removed above). Also, the spec still defines is_development (with comments indicating it will be toggled for RC/stable releases), so stable builds would incorrectly emit development in /etc/os-release. Consider restoring dynamic generation using RPM conditionals (%if 0%{?is_development} … %else … %endif) instead of the %[ ... ? ... : ...] ternary that Koji/rpmautospec appears to choke on.
We're seeing what looks like issues with ternary operators in rpmautospec on
kojias well as%autoreleaseshowing up in comments. I can't reproduce it locally but confirmed this update gets things working in koji.