#222 Adjust documentation for changed Versioning Guidelines
Merged 2 years ago by nphilipp. Opened 2 years ago by zbyszek.
fedora-infra/ zbyszek/rpmautospec docs-versioning  into  main

file modified
+32 -7
@@ -8,17 +8,13 @@ 

  

  ::

  

-     <pkgrel>[.<extraver>][.<snapinfo>]%{?dist}[.<minorbump>]

+     <pkgrel>%{?dist}[.<minorbump>]

  

- Each element in square brackets indicates an optional item.

+ Square brackets indicate an optional item.

  

  The ``%autorelease`` macro accepts these parameters to allow packagers to specify

  the different portions of the release field:

  

- * ``-p <prerelease>``: Designates a pre-release, i.e. ``pkgrel`` will be prefixed

-   with ``0.``.

- * ``-e <extraver>``: Allows specifying the ``extraver`` portion of the release.

- * ``-s <snapinfo>``: Allows specifying the ``snapinfo`` portion of the release.

  * ``-b <baserelease>``: Allows specifying a custom base release number (i.e. other than 1).

  

  
@@ -63,6 +59,34 @@ 

      test-autorelease-baserelease-1.0-100.fc34.x86_64

  

  

+ .. _traditional_versioning:

+ 

+ Traditional versioning with part of the upstream version information in the release field

+ =========================================================================================

+ 

+ Additional parameters are available to support an older form of package versioning.

+ This form is recommended for packages with complex versioning requirements

+ when support for RHEL7 and other systems with old rpm versions is required.

+ See `Traditional Versioning`_ in the Packaging Guidelines for details.

+ 

+ The release field is extended::

+ 

+     <pkgrel>[.<extraver>][.<snapinfo>]%{?dist}[.<minorbump>]

+ 

+ Square brackets indicate an optional item.

+ 

+ The ``%autorelease`` macro accepts these parameters to allow packagers to specify

+ those added fields:

+ 

+ * ``-p``: Designates a pre-release, i.e. ``pkgrel`` will be prefixed with ``0.``.

+ * ``-e <extraver>``: Allows specifying the ``extraver`` portion of the release.

+ * ``-s <snapinfo>``: Allows specifying the ``snapinfo`` portion of the release.

+ 

+ In the modern versioning, those fields are embedded in the package `Version` instead.

+ 

+ Examples

+ --------

+ 

  .. _prerelease example:

  

  The Pre-Release Case
@@ -123,4 +147,5 @@ 

      test-autorelease-extraver-snapshot-1.0-1.pre1.20200317git1234abcd.fc34.x86_64

  

  

- .. _Versioning Guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_more_complex_versioning

+ .. _Versioning Guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_simple_versioning

+ .. _Traditional Versioning: https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_traditional_versioning_with_part_of_the_upstream_version_information_in_the_release_field

file modified
+5 -4
@@ -7,12 +7,13 @@ 

  

  The `%autorelease` macro takes a couple of parameters to allow the user to specify different

  portions of the release field, as described in the [Versioning

- Guidelines](https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_more_complex_versioning):

+ Guidelines](https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_simple_versioning):

  

- * `-p`, "prerelease": Designates a pre-release, i.e. the left-most digit of `pkgrel` will be `0`.

- * `-e <extraver>`: Allows specifying the `extraver` portion of the release.

- * `-s <snapinfo>`: Allows specifying the `snapinfo` portion of the release.

  * `-b <baserelease>`: Allows specifying a custom base release number (i.e. other than 1).

  

+ For compatiblity with "traditional versioning", `%autorelease` accepts `-p`, `-e <extraver>` and  `-s <snapinfo>`.

+ See [Traditional Versioning](https://docs.pagure.org/fedora-infra.rpmautospec/autorelease.html/#_traditional_versioning)

+ for details.

+ 

  NB: In the prototype version the macro was named `%autorel`. To make its purpose more obvious, it is

  `%autorelease` now.

no initial comment

Build succeeded.

Thanks for contributing!

One thing, I understand the versioning guidelines that pre-releases in the new scheme are indicated by the use of the tilde in the version field, the release field isn't prefixed with 0. in this case. So we probably should mention the -p flag only in the traditional versioning section, right?

rebased onto e2ea95b5335155c343a8efc9b30f8ecbded0f439

2 years ago

Yes, this seems appropriate. I changed the patch like this. Updated.

Build succeeded.

Metadata Update from @nphilipp:
- Request assigned

2 years ago

rebased onto 0588c63

2 years ago

Pull-Request has been merged by nphilipp

2 years ago

Build succeeded.