| |
@@ -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")
|
| |
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.