From 82eb6bedbf8c3badf74cc407b91f3c0a406a5871 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Jan 13 2020 13:16:57 +0000 Subject: [PATCH 1/4] Recommend storing changelog entries in separate file. This helps to keep spec files shorter as well as it enables easier generating changelog by automation. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 041a054..c7713d9 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -593,6 +593,13 @@ A comment SHOULD be added near Version tag of the main package to remind maintai _Every time_ you make changes, that is, whenever you increment the E-V-R of a package, add a changelog entry. This is important not only to have an idea about the history of a package, but also to enable users, fellow packagers, and QA people to easily spot the changes that you make. +The changelog should be stored in separate `changelog` file, which is included into the main spec file. See the example of the `%changelog` section bellow: + +.... +%changelog +%include changelog +.... + If a particular change is related to a Bugzilla bug, include the bug ID in the changelog entry for easy reference, e.g. .... From 278b89682d53768166beff22a6fa629ebb2c4750 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Feb 03 2020 14:52:12 +0000 Subject: [PATCH 2/4] Define, that the 'changelog' files muste be listed among sources. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index c7713d9..43107f9 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -593,11 +593,17 @@ A comment SHOULD be added near Version tag of the main package to remind maintai _Every time_ you make changes, that is, whenever you increment the E-V-R of a package, add a changelog entry. This is important not only to have an idea about the history of a package, but also to enable users, fellow packagers, and QA people to easily spot the changes that you make. -The changelog should be stored in separate `changelog` file, which is included into the main spec file. See the example of the `%changelog` section bellow: +The changelog should be stored in separate `changelog` file referenced among sources: + +.... +Source1: changelog +.... + +Please note, that the source number is arbitrary. This file is later included into the spec file: .... %changelog -%include changelog +%include %{S:1} .... If a particular change is related to a Bugzilla bug, include the bug ID in the changelog entry for easy reference, e.g. From 65563ecd04131a3e0d7a1b4aa929f5646e600601 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Feb 03 2020 14:53:37 +0000 Subject: [PATCH 3/4] Use simple `cat` instead of `%include`. This is preferred way by RPM upstream. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 43107f9..361772e 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -603,7 +603,7 @@ Please note, that the source number is arbitrary. This file is later included in .... %changelog -%include %{S:1} +%(cat %{S:1}) .... If a particular change is related to a Bugzilla bug, include the bug ID in the changelog entry for easy reference, e.g. From b2743bffcf55e138854fbd8e0527533cdb2fe72d Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Feb 03 2020 14:55:37 +0000 Subject: [PATCH 4/4] Introduce `%external_changelog` macro. This macro needs to be defined in redhat-rpm-config package. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 361772e..7671cd5 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -599,11 +599,11 @@ The changelog should be stored in separate `changelog` file referenced among sou Source1: changelog .... -Please note, that the source number is arbitrary. This file is later included into the spec file: +Please note, that the source number is arbitrary. This file is later included into the spec file via `+%external_changelog+` macro: .... %changelog -%(cat %{S:1}) +%external_changelog %{S:1} .... If a particular change is related to a Bugzilla bug, include the bug ID in the changelog entry for easy reference, e.g.