#132 rust2rpm: use changelog timestamp without time and timezone on Fedora
Merged 2 years ago by zbyszek. Opened 2 years ago by decathorpe.
Unknown source dateformat  into  master

file modified
+6 -1
@@ -276,6 +276,8 @@

                          help="Do initial patching of Cargo.toml")

      parser.add_argument("-s", "--store-crate", action="store_true",

                          help="Store crate in current directory")

+     parser.add_argument("-a", "--rpmautospec", action="store_true", default=False,

+                         help="Use autorelease and autochangelog features")

      parser.add_argument("--all-features", action="store_true",

                          help="Activate all available features")

      parser.add_argument("--dynamic-buildrequires", action="store_true",
@@ -339,6 +341,7 @@

          kwargs["auto_changelog_entry"] = False

      else:

          kwargs["auto_changelog_entry"] = True

+     kwargs["rpmautospec"] = args.rpmautospec

  

      if args.target in {"fedora", "mageia", "opensuse"}:

          kwargs["include_build_requires"] = True
@@ -358,6 +361,8 @@

          kwargs["spec_copyright_year"] = time.strftime("%Y")

          kwargs["pkg_release"] = "0"

          kwargs["rust_group"] = "Development/Libraries/Rust"

+     elif args.rpmautospec:

+         kwargs["pkg_release"] = "%autorelease"

      else:

          kwargs["pkg_release"] = "1%{?dist}"

  
@@ -366,7 +371,7 @@

  

      kwargs["generate_buildrequires"] = args.dynamic_buildrequires

  

-     if args.target in {"opensuse", "fedora"}:

+     if args.target in {"opensuse"}:

          kwargs["date"] = time.strftime("%a %b %d %T %Z %Y")

      else:

          kwargs["date"] = time.strftime("%a %b %d %Y")

file modified
+5 -1
@@ -210,7 +210,11 @@

  %endif

  

  %changelog

- {%- if auto_changelog_entry %}

+ {% if rpmautospec %}

+ %autochangelog

+ {%- else %}

+ {%- if auto_changelog_entry -%}

  

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

  {% endif %}

+ {% endif %}

This PR changes the default timestamp in generated changelog entries to the one without time and timezone. rust2rpm is the only tool in Fedora that still uses this format by default, and RPM upstream does not want to support it.

This PR is stacked on top of PR#131 so it can be merged without rebasing. If necessary, I can split this into a separate PR without the first commit.

Both #131 and this look OK. I'll just merge this one.

Pull-Request has been merged by zbyszek

2 years ago

Great, thanks for reviewing and merging!