From 9f2bf3436922b6de204f691fc7a468d46794df79 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Jul 27 2023 16:46:20 +0000 Subject: Add notes on new dist macros Add information on the new dist macros, as introduced in https://src.fedoraproject.org/rpms/fedora-release/pull-request/223 --- diff --git a/guidelines/modules/ROOT/pages/DistTag.adoc b/guidelines/modules/ROOT/pages/DistTag.adoc index 1ecf643..f83174e 100644 --- a/guidelines/modules/ROOT/pages/DistTag.adoc +++ b/guidelines/modules/ROOT/pages/DistTag.adoc @@ -130,6 +130,20 @@ and *NOT* Without the extra 0, if `+%{rhel}+` is undefined, the `+%if+` conditional will cease to exist, and the rpm will fail to build. +=== Distribution-specific values + +Fedora 37 onwards, a few helper macros are defined to help packagers write distribution-agnostic spec files: + +`+%{dist_vendor}+`: The vendor of the distribution. For Fedora, this is `+Fedora+`. +`+%{dist_name}+`: The name of the distribution. For Fedora, this is `+Fedora Linux+`. +`+%{dist_home_url}+`: The URL of the homepage of the distribution. For Fedora, this is `+https://fedoraproject.org/+` +`+%{dist_bug_report_url}+`: The URL for reporting bugs. For Fedora, this is `+https://bugzilla.redhat.com/+` +`+%{dist_debuginfod_url}+`: The URL where the debuginfod server runs (if any). This is used +in elfutils.spec. For Fedora, this is `+https://debuginfod.fedoraproject.org/+`. + +These values are configured via the `+fedora-release+` package. Downstream distributions of +Fedora are expected to provide their distribution-specific values here. + === Things that you cannot use +%{?dist}+ for * You must not override the variables for `+%{dist}+` (or any of the related variables).