Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated RPMs do not have OS set to Linux (ospackage-application-spring-boot) #435

Open
flozano opened this issue Jan 24, 2024 · 1 comment

Comments

@flozano
Copy link

flozano commented Jan 24, 2024

I'm building packages in a github action (and thus Linux).

My build looks like this:

build.gradle:

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.1'
    id 'io.spring.dependency-management' version '1.1.4'
    id 'com.netflix.nebula.ospackage-application-spring-boot' version '11.6.0'
}

group = 'com.mycompany'

repositories {
    mavenCentral()
}

java {
    sourceCompatibility = '21'
}

application {
    mainClass = 'com.mycompany.MyApp'
}

dependencies {
// ...
}

and when I generate an RPM with buildRpm task, I get:

# rpm -Uvh /tmp/myapp-0.1.5.noarch.rpm
Preparing...                          ################################# [100%]
	package myapp-0:0.1.5-.noarch is intended for a different operating system

# rpm -q --qf "%{OS}\n" -p /tmp/myapp-0.1.5.noarch.rpm
unknown

I understand the os should be set to linux instead... but I see no way to do it cleanly with the ospackage-application-spring-boot plugin. Any hint?

(adding settings.gradle for completion, but I don't think it's related):

plugins {
    id 'org.ajoberstar.reckon.settings' version '0.18.2'
}

reckon {
    defaultInferredScope = 'patch'
    parallelBranchScope = 'minor'
    scopeCalc = calcScopeFromProp().or(calcScopeFromCommitMessages())
    stageCalc = calcStageFromProp()
    snapshots()
}

rootProject.name = 'myapp'
@flozano flozano changed the title Generated RPMs do not have OS set to Linux Generated RPMs do not have OS set to Linux (ospackage-application-spring-boot) Jan 24, 2024
@flozano
Copy link
Author

flozano commented Jan 24, 2024

I've followed advice in #384

and added:

ospackage {
    os = org.redline_rpm.header.Os.LINUX
}

and it worked.

I think this should be the default, "unknown" OS RPMs are not common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant