From b91e3e1f5b496fd55415e77e2584edf2027cafbe Mon Sep 17 00:00:00 2001 From: sixg0000d Date: Sep 04 2021 18:01:17 +0000 Subject: Remove the 2nd empty line when rpmautospec --- diff --git a/go2rpm/__main__.py b/go2rpm/__main__.py index 9113e83..04f51c6 100644 --- a/go2rpm/__main__.py +++ b/go2rpm/__main__.py @@ -685,7 +685,6 @@ def main(): else: with open(spec_file, "w") as fobj: fobj.write(spec_contents) - fobj.write("\n") if __name__ == "__main__": diff --git a/go2rpm/templates/profile1.spec b/go2rpm/templates/profile1.spec index d23205e..c7c3b1d 100644 --- a/go2rpm/templates/profile1.spec +++ b/go2rpm/templates/profile1.spec @@ -163,7 +163,7 @@ ln -s %{gopath}/src/%{goipath} %{buildroot}%{gopath}/src/%{altipath{{ loop.index %changelog {% if rpmautospec %} %autochangelog -{%- else %} +{% else %} {% if auto_changelog_entry %} {% if version is none and tag is none and commit is not none %} * {{ date }} {{ packager|default("go2rpm ") }} - 0-{{ pkg_release }}.{{ shortdate }}git{{ shortcommit }} diff --git a/go2rpm/templates/profile2.spec b/go2rpm/templates/profile2.spec index cfd3d96..2f0e625 100644 --- a/go2rpm/templates/profile2.spec +++ b/go2rpm/templates/profile2.spec @@ -123,7 +123,7 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %changelog {% if rpmautospec %} %autochangelog -{%- else %} +{% else %} {% if auto_changelog_entry %} {% if version is none and tag is none and commit is not none %} * {{ date }} {{ packager|default("go2rpm ") }} - 0-{{ pkg_release }}.{{ shortdate }}git{{ shortcommit }}