#102 Use rpmautospec in the packaging tutorial
Merged a year ago by oturpe. Opened a year ago by oturpe.
fedora-docs/ oturpe/package-maintainer-docs tutorial-rpmautospec  into  main

@@ -68,7 +68,7 @@ 

  ----

  Name:     hello

  Version:  2.10

- Release:  1%{?dist}

+ Release:  %autorelease

  Summary:  Produces a familiar, friendly greeting

  License:  GPLv3+

  URL:      https://www.gnu.org/software/hello/
@@ -92,12 +92,15 @@ 

  %files

  

  %changelog

- * Sat Oct 23 2021 Patricia Packager <patricia@example.com> - 2.10-1

- - Initial version of the package

+ %autochangelog

  ----

  

  The `+Version+` should mirror the upstream,

  while `+Release+` numbers our work within Fedora.

+ `+%autorelease+` is part of https://docs.pagure.org/fedora-infra.rpmautospec/index.html[rpmautospec],

+ which is https://fedoraproject.org/wiki/Changes/Rpmautospec_by_Default[recommended for Fedora packages].

+ It ties `+Release+` to package's Git history.

+ As we do not have a Git repository, the default value 1 will be used.

  

  The first letter of the `+Summary+` should be uppercase

  to avoid `+rpmlint+` complaints.
@@ -116,9 +119,9 @@ 

  to find out if specific bug and security patches were included in the installed software,

  thanks to the diligent Fedora packagers who include this info

  with the relevant https://cve.mitre.org/[CVE] numbers.

- 

- The `+%changelog+` entry should include the version string

- to avoid `+rpmlint+` complaints.

+ `+%autochangelog+` also comes from rpmautospec

+ and populates the changelog from Git commit messages.

+ As we do not have a Git repository, the changelog will be empty.

  

  Multi-line sections like `+%changelog+` or `+%description+`

  start on a line under the directive,
@@ -380,7 +383,7 @@ 

  ----

  Name:           hello

  Version:        2.10

- Release:        1%{?dist}

+ Release:        %autorelease

  Summary:        Produces a familiar, friendly greeting

  

  License:        GPLv3+
@@ -421,8 +424,7 @@ 

  %license COPYING

  

  %changelog

- * Sat Oct 23 2021 Patricia Packager <patricia@example.com> - 2.10-1

- - Initial version of the package

+ %autochangelog

  ----

  

  With this `.spec` file,

This approach is recommended since "Rpmautospec by Default"
(https://fedoraproject.org/wiki/Changes/Rpmautospec_by_Default),
thus the tutorial should also use it.

Do not merge until the Change is approved.

rebased onto b094671

a year ago

The Rpmautospec by Default change has been approved,
and no negative reviews of this pull request have appeared.
Merging.

Pull-Request has been merged by oturpe

a year ago
Metadata