[Bug 891152] New: format_spec_file can damage spec file
https://bugzilla.novell.com/show_bug.cgi?id=891152 https://bugzilla.novell.com/show_bug.cgi?id=891152#c0 Summary: format_spec_file can damage spec file Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: BuildService AssignedTo: ro@suse.com ReportedBy: sbrabec@suse.com QAContact: adrian@suse.com Found By: --- Blocker: --- Created an attachment (id=601758) --> (http://bugzilla.novell.com/attachment.cgi?id=601758) spec file before mangling by format_spec_file (copy it to python-libmount.spec and edit Name: to see what happens after format_spec_file). I created a very special spec file with preamble containing many conditionals. This spec file is intended to be compiled with 3 different names, where only Name tags needs to be edited. The spec file is mangled by format_spec_file: - Group tag is edited to an incorrect value. - License tag is move to incorrect place causes build to fail: [ 5s] error: License field must be present in package: (main package) diff -ur BEFORE_FORMAT/python-libmount.spec AFTER_FORMAT/python-libmount.spec --- BEFORE_FORMAT/python-libmount.spec 2014-08-08 23:19:08.000000000 +0200 +++ AFTER_FORMAT/python-libmount.spec 2014-08-08 23:19:45.000000000 +0200 @@ -109,7 +109,6 @@ # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -License: GPL-2.0+ Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init @@ -159,7 +158,8 @@ PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities -Group: System/Base +License: GPL-2.0+ +Group: System/Filesystems %if %{with enable_eject} Provides: eject = 2.1.0-166.8 %endif @@ -199,13 +199,13 @@ # if condition across preamble and subsequent sections. %if %build_python_libmount # Exact copy of the %%package tag from python-libmount section below: -Group: System/Filesystems Summary: Python bindings for the libmount library +Group: System/Filesystems %else %if %build_util_linux_systemd # Exact copy of the %%package tag from systemd section below: Summary: A collection of basic systemd utilities -Group: System/Base +Group: System/Filesystems Supplements: packageand(util-linux:systemd) # Split-provides for upgrade from SLE < 12 and openSUSE <= 13.1 Provides: util-linux:/usr/lib/systemd/system/fstrim.service diff -ur BEFORE_FORMAT/util-linux.spec AFTER_FORMAT/util-linux.spec --- BEFORE_FORMAT/util-linux.spec 2014-08-08 23:19:08.000000000 +0200 +++ AFTER_FORMAT/util-linux.spec 2014-08-08 23:19:45.000000000 +0200 @@ -109,7 +109,6 @@ # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -License: GPL-2.0+ Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init @@ -159,6 +158,7 @@ PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities +License: GPL-2.0+ Group: System/Base %if %{with enable_eject} Provides: eject = 2.1.0-166.8 @@ -199,8 +199,8 @@ # if condition across preamble and subsequent sections. %if %build_python_libmount # Exact copy of the %%package tag from python-libmount section below: -Group: System/Filesystems Summary: Python bindings for the libmount library +Group: System/Base %else %if %build_util_linux_systemd # Exact copy of the %%package tag from systemd section below: diff -ur BEFORE_FORMAT/util-linux-systemd.spec AFTER_FORMAT/util-linux-systemd.spec --- BEFORE_FORMAT/util-linux-systemd.spec 2014-08-08 23:19:08.000000000 +0200 +++ AFTER_FORMAT/util-linux-systemd.spec 2014-08-08 23:19:45.000000000 +0200 @@ -109,7 +109,6 @@ # these tools as well #!BuildIgnore: pwdutils Url: https://www.kernel.org/pub/linux/utils/util-linux/ -License: GPL-2.0+ Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.25/%{_name}-%{version}.tar.xz Source1: util-linux-rpmlintrc Source4: raw.init @@ -159,6 +158,7 @@ PreReq: %insserv_prereq %fillup_prereq /bin/sed Recommends: %{name}-lang = %{version} Summary: A collection of basic system utilities +License: GPL-2.0+ Group: System/Base %if %{with enable_eject} Provides: eject = 2.1.0-166.8 @@ -199,8 +199,8 @@ # if condition across preamble and subsequent sections. %if %build_python_libmount # Exact copy of the %%package tag from python-libmount section below: -Group: System/Filesystems Summary: Python bindings for the libmount library +Group: System/Base %else %if %build_util_linux_systemd # Exact copy of the %%package tag from systemd section below: -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c3
--- Comment #3 from Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c4
--- Comment #4 from Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c5
Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c6
Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c7
Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c8
Ruediger Oertel
Some reference files as test suite would be nice :-) yes ...
okay, pushed to GIT, to openSUSE:Tools, sr created for Factory and SLE-12 deployed on service-servers for OBS and IBS -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c10
--- Comment #10 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c11
--- Comment #11 from Stanislav Brabec
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c12
Stanislav Brabec
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c13
Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c14
--- Comment #14 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c15
--- Comment #15 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c16
Togan Muftuoglu
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c17
--- Comment #17 from Stanislav Brabec
https://bugzilla.novell.com/show_bug.cgi?id=891152
https://bugzilla.novell.com/show_bug.cgi?id=891152#c18
--- Comment #18 from Ruediger Oertel
participants (1)
-
bugzilla_noreply@novell.com