diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index b60e6c4..747328e 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -209,6 +209,8 @@ def main(): 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 @@ def main(): 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 diff --git a/rust2rpm/templates/main.spec b/rust2rpm/templates/main.spec index d901e6d..84bd97d 100644 --- a/rust2rpm/templates/main.spec +++ b/rust2rpm/templates/main.spec @@ -179,4 +179,6 @@ which use {% if feature is not none %}"{{ feature }}" feature of {% endif %}"%{c %endif %changelog -{% include target ~ "-changelog.spec.inc" %} +{% if auto_changelog_entry %} + {% include target ~ "-changelog.spec.inc" %} +{% endif %}