nebula-plugins / gradle-ospackage-plugin

Gradle plugin for constructing linux packages, specifically RPM and DEBs.
Apache License 2.0
366 stars 123 forks source link

How to set el7 as OS version when building RPM? #239

Open santoshkt opened 7 years ago

santoshkt commented 7 years ago

I do not see an option for CentOS or RHEL, specifically el7 ? There are some for Linux. How should I set the package version to el7 ?

http://redline-rpm.org/apidocs/org/redline_rpm/header/Os.html

I see its probably a redline issue too. I will create a ticket there as well. Hoping to find some suggestions from the group here.

malazbw commented 7 years ago

Did you get any solution? i have the same problem

santoshkt commented 7 years ago

I did not find a solution. I skipped setting OS.

lbrigman124 commented 7 years ago

I had an open issue like this too. There are two different things here. package naming and meta data. package naming is a convention and you must handle that manually. The meta data for the package is set by using the 'distribution' directive. That is being set properly for an RPM package. The naming convention issue, I solved with this: distribution = System.getenv("DISTRO") release = System.getenv("BUILD_NUMBER")+distribution The env variables allow me to use Jenkins and different OS versions to build the same package.

santoshkt commented 7 years ago

The original issue is setting the value in RPM header.

aaron868 commented 6 years ago

From my reading of the RPM packaging guidelines I think lbrigman124 has it right. os = LINUX distribution = 'el7' release = 'x.el7' (where x is your release ID)

I do not think you set the OS variable to RHEL or Centos, that goes into "distribution". This is what I do and the rpm query commands return what I expect.