-
Notifications
You must be signed in to change notification settings - Fork 676
chore(comps): annotate overlays in multiple categories with metadata #17888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.0
Are you sure you want to change the base?
Changes from all commits
7ab235f
d967094
fea7272
9e8f806
89251c0
fb80750
a2d0bf0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0256227f5434d9e00d7c8501b16848efa400a72b | ||
| 35d8fae562980db7bda057d79322cc51ddad8d62 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1 @@ | ||
| [components.anaconda-webui] | ||
|
|
||
| # The upstream Fedora spec requires fedora-logos (gated behind %if 0%{?fedora}). | ||
| # AZL uses generic-logos for branding; fedora-logos is not shipped and breaks | ||
| # repoclosure. Replace with system-logos, the distro-neutral virtual provide. | ||
| # Ref: https://github.com/microsoft/azurelinux/pull/16413 removed fedora-logos | ||
| # from the component list; this patches the consumer side. | ||
|
|
||
| [[components.anaconda-webui.overlays]] | ||
| description = "Remove Requires: fedora-logos (Fedora-specific)" | ||
| type = "spec-remove-tag" | ||
| tag = "Requires" | ||
| value = "fedora-logos" | ||
|
|
||
| [[components.anaconda-webui.overlays]] | ||
| description = "Add Requires: system-logos (distro-neutral virtual provide)" | ||
| type = "spec-add-tag" | ||
| tag = "Requires" | ||
| value = "system-logos" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # The upstream Fedora spec requires fedora-logos (gated behind %if 0%{?fedora}). | ||
| # AZL uses generic-logos for branding; fedora-logos is not shipped and breaks | ||
| # repoclosure. Replace with system-logos, the distro-neutral virtual provide. | ||
| # Ref: https://github.com/microsoft/azurelinux/pull/16413 removed fedora-logos | ||
| # from the component list; this patches the consumer side. | ||
|
|
||
| [metadata] | ||
| category = "azl-branding-policy" | ||
| upstreamable = false | ||
|
|
||
| [[overlays]] | ||
| description = "Remove Requires: fedora-logos (Fedora-specific)" | ||
| type = "spec-remove-tag" | ||
| tag = "Requires" | ||
| value = "fedora-logos" | ||
|
|
||
| [[overlays]] | ||
| description = "Add Requires: system-logos (distro-neutral virtual provide)" | ||
| type = "spec-add-tag" | ||
| tag = "Requires" | ||
| value = "system-logos" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,2 @@ | ||
| [components.azurelinux-rpm-config] | ||
| spec = { type = "upstream", upstream-name = "redhat-rpm-config" } | ||
| overlays = [ | ||
| # | ||
| # Overlays for spec. | ||
| # | ||
|
|
||
| # Set the component's name. | ||
| { type = "spec-set-tag", tag = "Name", value = "azurelinux-rpm-config" }, | ||
| # Set this distro's URL. | ||
| { type = "spec-set-tag", tag = "URL", value = "https://aka.ms/azurelinux" }, | ||
| # Set our version. | ||
| { type = "spec-update-tag", tag = "Version", value = "1004" }, | ||
|
|
||
| # WORKAROUND: manually bump the Release value for Stage2 bring-up. | ||
| { type = "spec-update-tag", tag = "Release", value = "2%{?dist}" }, | ||
|
|
||
| # Provide compatibility with Fedora's upstream version. | ||
| { type = "spec-add-tag", tag = "Provides", value = "redhat-rpm-config = %{version}-%{release}" }, | ||
| # Make sure this package takes precedence over (and would replace) any Fedora variant. | ||
| # Note that Fedora's version of redhat-rpm-config has a version equal to 300 + the release number | ||
| # (e.g., 343 for Fedora 43). | ||
| { type = "spec-add-tag", tag = "Obsoletes", value = "redhat-rpm-config < 1000" }, | ||
| { type = "spec-add-tag", tag = "Conflicts", value = "redhat-rpm-config < 1000" }, | ||
|
|
||
| # Create symlink for our own name: /usr/lib/rpm/azurelinux -> /usr/lib/rpm/redhat | ||
| # Note that we don't do the reverse to avoid conflicts with upstream Fedora | ||
| # redhat-rpm-config during bootstrapping (replacing a dir with a symlink is | ||
| # problematic in RPM land). | ||
| # TODO: remove symlinks after bootstrap | ||
| { type = "spec-prepend-lines", section = "%install", lines = ["mkdir -p %{buildroot}/usr/lib/rpm", "ln -sf redhat %{buildroot}/usr/lib/rpm/azurelinux"] }, | ||
| { type = "spec-prepend-lines", section = "%files", lines = ["/usr/lib/rpm/azurelinux"] }, | ||
|
|
||
| # Create symlink for lua dir: /usr/lib/rpm/lua/azurelinux -> /usr/lib/rpm/lua/fedora | ||
| # This allows the distro-specific name to be used with minimal required churn to | ||
| # spread references to the standard path in Fedora. | ||
| { type = "spec-append-lines", section = "%install", lines = ["ln -sf fedora %{buildroot}%{_rpmluadir}/azurelinux"] }, | ||
| { type = "spec-append-lines", section = "%files", lines = ["%{_rpmluadir}/azurelinux"] }, | ||
|
|
||
| # | ||
| # Overlays for non-spec files. | ||
| # | ||
|
|
||
| # Update all references to the Fedora version of this package to the Azure Linux one. | ||
| { type = "file-search-replace", file = "**/*", regex = "redhat-rpm-config", replacement = "azurelinux-rpm-config" }, | ||
|
|
||
| # Update vendor macro. | ||
| { type = "file-search-replace", file = "macros", regex = "%_vendor.*", replacement = "%_vendor azurelinux" }, | ||
|
|
||
| # Remove dist.sh file; we'll replace it wholesale with our own version. | ||
| { type = "file-remove", file = "dist.sh" }, | ||
| # Add our own version of dist.sh customized for Azure Linux. | ||
| { type = "file-add", file = "dist.sh", source = "dist.sh" }, | ||
|
|
||
| # Targeted adjustments in some macros files. | ||
| { type = "file-search-replace", file = "macros.fedora-misc-srpm", regex = "/lib/swidtag/fedoraproject.org", replacement = "/lib/swidtag/microsoft.com" }, | ||
| { type = "file-search-replace", file = "macros.fedora-misc-srpm", regex = "[Ff]edora", replacement = "azurelinux" }, | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| # | ||
| # Overlays for spec. | ||
| # | ||
|
|
||
| # Set the component's name. | ||
|
|
||
| [metadata] | ||
| category = "azl-branding-policy" | ||
| upstreamable = false | ||
|
|
||
| [[overlays]] | ||
| type = "spec-set-tag" | ||
| tag = "Name" | ||
| value = "azurelinux-rpm-config" | ||
|
|
||
| # Set this distro's URL. | ||
| [[overlays]] | ||
| type = "spec-set-tag" | ||
| tag = "URL" | ||
| value = "https://aka.ms/azurelinux" | ||
|
|
||
| # Set our version. | ||
| [[overlays]] | ||
| type = "spec-update-tag" | ||
| tag = "Version" | ||
| value = "1004" | ||
|
|
||
| # WORKAROUND: manually bump the Release value for Stage2 bring-up. | ||
| [[overlays]] | ||
| type = "spec-update-tag" | ||
| tag = "Release" | ||
| value = "2%{?dist}" | ||
|
|
||
| # Provide compatibility with Fedora's upstream version. | ||
| [[overlays]] | ||
| type = "spec-add-tag" | ||
| tag = "Provides" | ||
| value = "redhat-rpm-config = %{version}-%{release}" | ||
|
|
||
| # Make sure this package takes precedence over (and would replace) any Fedora variant. | ||
| # Note that Fedora's version of redhat-rpm-config has a version equal to 300 + the release number | ||
| # (e.g., 343 for Fedora 43). | ||
| [[overlays]] | ||
| type = "spec-add-tag" | ||
| tag = "Obsoletes" | ||
| value = "redhat-rpm-config < 1000" | ||
|
|
||
| [[overlays]] | ||
| type = "spec-add-tag" | ||
| tag = "Conflicts" | ||
| value = "redhat-rpm-config < 1000" | ||
|
|
||
| # Create symlink for our own name: /usr/lib/rpm/azurelinux -> /usr/lib/rpm/redhat | ||
| # Note that we don't do the reverse to avoid conflicts with upstream Fedora | ||
| # redhat-rpm-config during bootstrapping (replacing a dir with a symlink is | ||
| # problematic in RPM land). | ||
| # TODO: remove symlinks after bootstrap | ||
| [[overlays]] | ||
| type = "spec-prepend-lines" | ||
| section = "%install" | ||
| lines = ["mkdir -p %{buildroot}/usr/lib/rpm", "ln -sf redhat %{buildroot}/usr/lib/rpm/azurelinux"] | ||
|
|
||
| [[overlays]] | ||
| type = "spec-prepend-lines" | ||
| section = "%files" | ||
| lines = ["/usr/lib/rpm/azurelinux"] | ||
|
|
||
| # Create symlink for lua dir: /usr/lib/rpm/lua/azurelinux -> /usr/lib/rpm/lua/fedora | ||
| # This allows the distro-specific name to be used with minimal required churn to | ||
| # spread references to the standard path in Fedora. | ||
| [[overlays]] | ||
| type = "spec-append-lines" | ||
| section = "%install" | ||
| lines = ["ln -sf fedora %{buildroot}%{_rpmluadir}/azurelinux"] | ||
|
|
||
| [[overlays]] | ||
| type = "spec-append-lines" | ||
| section = "%files" | ||
| lines = ["%{_rpmluadir}/azurelinux"] | ||
|
|
||
| # | ||
| # Overlays for non-spec files. | ||
| # | ||
|
|
||
| # Update all references to the Fedora version of this package to the Azure Linux one. | ||
| [[overlays]] | ||
| type = "file-search-replace" | ||
| file = "**/*" | ||
| regex = "redhat-rpm-config" | ||
| replacement = "azurelinux-rpm-config" | ||
|
|
||
| # Update vendor macro. | ||
| [[overlays]] | ||
| type = "file-search-replace" | ||
| file = "macros" | ||
| regex = "%_vendor.*" | ||
| replacement = "%_vendor azurelinux" | ||
|
|
||
| # Remove dist.sh file; we'll replace it wholesale with our own version. | ||
| [[overlays]] | ||
| type = "file-remove" | ||
| file = "dist.sh" | ||
|
|
||
| # Add our own version of dist.sh customized for Azure Linux. | ||
| [[overlays]] | ||
| type = "file-add" | ||
| file = "dist.sh" | ||
| source = "../dist.sh" | ||
|
|
||
| # Targeted adjustments in some macros files. | ||
| [[overlays]] | ||
| type = "file-search-replace" | ||
| file = "macros.fedora-misc-srpm" | ||
| regex = "/lib/swidtag/fedoraproject.org" | ||
| replacement = "/lib/swidtag/microsoft.com" | ||
|
|
||
| [[overlays]] | ||
| type = "file-search-replace" | ||
| file = "macros.fedora-misc-srpm" | ||
| regex = "[Ff]edora" | ||
| replacement = "azurelinux" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,2 @@ | ||
| [components.chrony] | ||
|
|
||
| [[components.chrony.overlays]] | ||
| description = "Enable use of confdir at /etc/chrony.d" | ||
| type = "spec-search-replace" | ||
| regex = "^touch -r examples/chrony.conf.example2 chrony.conf" | ||
| replacement = "echo -e '\\n# Use confdir\\nconfdir /etc/chrony.d' >> chrony.conf\n\ntouch -r examples/chrony.conf.example2 chrony.conf" | ||
|
|
||
| [[components.chrony.overlays]] | ||
| description = "Create /etc/chrony.d dir" | ||
| type = "spec-search-replace" | ||
| regex = '\$RPM_BUILD_ROOT%\{_sysconfdir\}/\{sysconfig,logrotate.d\}' | ||
| replacement = '$RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,logrotate.d,chrony.d}' | ||
|
|
||
| [[components.chrony.overlays]] | ||
| description = "Add /etc/chrony.d dir to package" | ||
| type = "spec-append-lines" | ||
| section = "%files" | ||
| lines = ["%dir %{_sysconfdir}/chrony.d"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [metadata] | ||
| category = "azl-branding-policy" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is a fair use of branding-policy as a category. |
||
| upstreamable = false | ||
|
|
||
| [[overlays]] | ||
| description = "Enable use of confdir at /etc/chrony.d" | ||
| type = "spec-search-replace" | ||
| regex = "^touch -r examples/chrony.conf.example2 chrony.conf" | ||
| replacement = "echo -e '\\n# Use confdir\\nconfdir /etc/chrony.d' >> chrony.conf\n\ntouch -r examples/chrony.conf.example2 chrony.conf" | ||
|
|
||
| [[overlays]] | ||
| description = "Create /etc/chrony.d dir" | ||
| type = "spec-search-replace" | ||
| regex = "\\$RPM_BUILD_ROOT%\\{_sysconfdir\\}/\\{sysconfig,logrotate.d\\}" | ||
| replacement = "$RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,logrotate.d,chrony.d}" | ||
|
|
||
| [[overlays]] | ||
| description = "Add /etc/chrony.d dir to package" | ||
| type = "spec-append-lines" | ||
| section = "%files" | ||
| lines = ["%dir %{_sysconfdir}/chrony.d"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Re-enable bootstrap mode so rebar3 can build itself without needing the old | ||
| # broken erlang-rebar3 3.26.0 in the build tag. The latest upstream commit | ||
| # disabled bootstrap (since Fedora already has a working 3.27.0), but AZL | ||
| # doesn't yet. | ||
| # TODO: Remove this overlay once rebar3 3.27.0 is in the AZL build tag. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do we capture that this is a temporary workaround that needs action? |
||
|
|
||
| [metadata] | ||
| category = "azl-dep-missing-workaround" | ||
|
|
||
| [[overlays]] | ||
| description = "Enable bootstrap mode to break self-dependency on broken erlang-rebar3 3.26.0" | ||
| type = "spec-search-replace" | ||
| regex = "^%global bootstrap 0$" | ||
| replacement = "%global bootstrap 1" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,2 @@ | ||
| [components.firewalld] | ||
|
|
||
| [[components.firewalld.overlays]] | ||
| type = "spec-remove-tag" | ||
| description = "Remove Fedora patch that opens mdns port in public (default) zone" | ||
| tag = "Patch0" | ||
|
|
||
| [[components.firewalld.overlays]] | ||
| type = "file-remove" | ||
| description = "Remove Fedora patch that opens mdns port in public (default) zone" | ||
| file = "fedora-only-MDNS-default.patch" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| [metadata] | ||
| category = "azl-security-compliance" | ||
| upstreamable = false | ||
|
|
||
| [[overlays]] | ||
| type = "spec-remove-tag" | ||
| description = "Remove Fedora patch that opens mdns port in public (default) zone" | ||
| tag = "Patch0" | ||
|
|
||
| [[overlays]] | ||
| type = "file-remove" | ||
| description = "Remove Fedora patch that opens mdns port in public (default) zone" | ||
| file = "fedora-only-MDNS-default.patch" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Bump release for avif removal rebuild. | ||
|
|
||
| [metadata] | ||
| category = "azl-release-management" | ||
| upstreamable = false | ||
|
|
||
| [[overlays]] | ||
| description = "Bump release for avif removal rebuild" | ||
| type = "spec-set-tag" | ||
| tag = "Release" | ||
| value = "20%{?prever}%{?short}%{?dist}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| [metadata] | ||
| category = "azl-dep-missing-workaround" | ||
| upstreamable = false | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a legit upstream issue, then? |
||
|
|
||
| [[overlays]] | ||
| description = "Disable dynamic BuildRequires generation — transitive dep on dead golang-github-sagikazarmark-crypt" | ||
| type = "spec-search-replace" | ||
| section = "%generate_buildrequires" | ||
| regex = "%go_generate_buildrequires" | ||
| replacement = "# Disabled: transitive dep on dead golang-github-sagikazarmark-crypt (see comp.toml)" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [metadata] | ||
| category = "azl-dep-missing-workaround" | ||
| upstreamable = false | ||
|
|
||
| [[overlays]] | ||
| description = "Add missing jmespath BuildRequires — transitive dep of aws-sdk-go, not pulled in due to bootstrap mode" | ||
| type = "spec-add-tag" | ||
| tag = "BuildRequires" | ||
| value = "golang(github.com/jmespath/go-jmespath)" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1 @@ | ||
| [components.golang-mongodb-mongo-driver] | ||
|
|
||
| # The aws-sdk-go-devel bootstrap build has auto-generated Requires stripped, | ||
| # so it doesn't transitively pull in golang-github-jmespath-devel. Add the | ||
| # missing build dependency explicitly until a non-bootstrap aws-sdk-go is available. | ||
| [[components.golang-mongodb-mongo-driver.overlays]] | ||
| description = "Add missing transitive BuildRequires on go-jmespath (needed by aws-sdk-go, missing in bootstrap builds)" | ||
| type = "spec-add-tag" | ||
| tag = "BuildRequires" | ||
| value = "golang(github.com/jmespath/go-jmespath)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should absolutely be upstreamed.