leocad icon indicating copy to clipboard operation
leocad copied to clipboard

RPM spec fails to build on Oracle Linux 8

Open KJ7LNW opened this issue 1 year ago • 1 comments

rpmbuild -bb leocad.spec error: License field must be present in package: (main package)

Describe the bug RPM spec fails to build on Oracle Linux 8

To Reproduce

  • Install Oracle Linux 8 (free)
  • git clone https://github.com/leozide/leocad.git
  • cd leocad
  • rpmbuild -bb leocad.spec error: License field must be present in package: (main package)

Expected behavior

It should build an RPM

Version (please complete the following information):

  • OS: Oracle Linux 8
  • LeoCAD from git as of ca11177a34efee4dec7caffca78ef1943b66ae9d

Simple fix This allowed it to build, but you might want something more elegant that meets your %if behavior:

diff --git a/leocad.spec b/leocad.spec
index 514adcaa..3ec4c655 100644
--- a/leocad.spec
+++ b/leocad.spec
@@ -19,6 +19,7 @@
 Summary: CAD program for creating virtual LEGO models
 Name: leocad
 URL: http://leocad.org
+License: GPLv2+
 %if 0%{?suse_version} || 0%{?sles_version}
 Group: Productivity/Graphics/Viewers
 %endif

KJ7LNW avatar May 08 '23 00:05 KJ7LNW

FYI in case you're not familiar with Oracle Linux: It is yet another clone of RHEL, like Alma Linux or Rocky Linux. Its almost 100% the same, but in this the %if's did not recognize the OS to put the right License in place.

Other than the License: header, it built fine.

KJ7LNW avatar May 08 '23 00:05 KJ7LNW