Add option to not generate a default changelog entry
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>
This commit is contained in:
parent
83ea3796cd
commit
294c6f571c
2 changed files with 10 additions and 1 deletions
|
@ -209,6 +209,8 @@ def main():
|
||||||
formatter_class=argparse.RawTextHelpFormatter)
|
formatter_class=argparse.RawTextHelpFormatter)
|
||||||
parser.add_argument("--show-license-map", action="store_true",
|
parser.add_argument("--show-license-map", action="store_true",
|
||||||
help="Print license mappings and exit")
|
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",
|
parser.add_argument("-", "--stdout", action="store_true",
|
||||||
help="Print spec and patches into stdout")
|
help="Print spec and patches into stdout")
|
||||||
parser.add_argument("-t", "--target", action="store",
|
parser.add_argument("-t", "--target", action="store",
|
||||||
|
@ -261,6 +263,11 @@ def main():
|
||||||
raise ValueError("No bins and no libs")
|
raise ValueError("No bins and no libs")
|
||||||
kwargs["include_devel"] = is_lib
|
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"):
|
if args.target in ("fedora", "mageia", "opensuse"):
|
||||||
kwargs["include_build_requires"] = True
|
kwargs["include_build_requires"] = True
|
||||||
kwargs["include_provides"] = False
|
kwargs["include_provides"] = False
|
||||||
|
|
|
@ -179,4 +179,6 @@ which use {% if feature is not none %}"{{ feature }}" feature of {% endif %}"%{c
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
{% include target ~ "-changelog.spec.inc" %}
|
{% if auto_changelog_entry %}
|
||||||
|
{% include target ~ "-changelog.spec.inc" %}
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue