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

Added property osname to support AIX rpm. #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class SystemPackagingExtension {

@Input @Optional
Os os

@Input @Optional
String osName

@Input @Optional
RpmType type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ abstract class SystemPackagingTask extends AbstractArchiveTask {
}
return this
}

public String getOsString() {
return osName ? osName.toLowerCase() : (os?.toString()?.toLowerCase() ?: '');
}

@Override
public AbstractCopyTask from(Object sourcePath, Closure c) {
Expand Down
1 change: 1 addition & 0 deletions src/main/groovy/com/netflix/gradle/plugins/rpm/Rpm.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Rpm extends SystemPackagingTask {
parentExten?.getArchStr()?:Architecture.NOARCH.name()
})
mapping.map('os', { parentExten?.getOs()?:Os.UNKNOWN})
mapping.map('osName', { parentExten?.getOsName()?: ''})
mapping.map('type', { parentExten?.getType()?:RpmType.BINARY })

// NOTE: Believe parentExten is always null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ class RpmCopyAction extends AbstractPackagingCopyAction<Rpm> {
builder = createBuilder()
builder.setPackage task.packageName, task.version, task.release, task.epoch
builder.setType task.type
builder.setPlatform Architecture.valueOf(task.archStr.toUpperCase()), task.os
if (task.osName) {
builder.setPlatform Architecture.valueOf(task.archStr.toUpperCase()), task.osName
} else {
builder.setPlatform Architecture.valueOf(task.archStr.toUpperCase()), task.os
}

builder.setGroup task.packageGroup
builder.setBuildHost task.buildHost
builder.setSummary task.summary
Expand Down