#62 Add option to not generate a default changelog entry
Merged 5 years ago by ngompa. Opened 5 years ago by ngompa.

file modified
+7
@@ -209,6 +209,8 @@ 

                                       formatter_class=argparse.RawTextHelpFormatter)

      parser.add_argument("--show-license-map", action="store_true",

                          help="Print license mappings and exit")

+     parser.add_argument("--no-auto-changelog-entry", action="store_true",

+                         help="Do not generate a changelog entry")

      parser.add_argument("-", "--stdout", action="store_true",

                          help="Print spec and patches into stdout")

      parser.add_argument("-t", "--target", action="store",
@@ -261,6 +263,11 @@ 

          raise ValueError("No bins and no libs")

      kwargs["include_devel"] = is_lib

  

+     if args.no_auto_changelog_entry:

+         kwargs["auto_changelog_entry"] = False

+     else:

+         kwargs["auto_changelog_entry"] = True

+ 

      if args.target in ("fedora", "mageia", "opensuse"):

          kwargs["include_build_requires"] = True

          kwargs["include_provides"] = False

file modified
+3 -1
@@ -179,4 +179,6 @@ 

  %endif

  

  %changelog

- {% include target ~ "-changelog.spec.inc" %}

+ {% if auto_changelog_entry %}

+   {% include target ~ "-changelog.spec.inc" %}

+ {% endif %}

For Rust packages created through the OBS source service, the changelog is managed by an external <pkg>.changes file that is transformed into an RPM changelog and appended to the spec file automatically by the Open Build Service.

Having a default entry means that the changelog handling will not always work correctly and package builds may fail due to changelog entries not being in reverse chronological order.

This also is a future enabler for other workflows for external changelog management in automated package builds.

Signed-off-by: Neal Gompa ngompa13@gmail.com

So, I'm shipping this feature in the openSUSE package for rust2rpm v6 because I need it for obs-service-rust2rpm development.

No one has said anything in two weeks, so...

Pull-Request has been merged by ngompa

5 years ago