leocad
leocad copied to clipboard
RPM spec fails to build on Oracle Linux 8
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
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.