nebula-plugins/gradle-ospackage-plugin

User and Group not set for Rpm

Open

#229 opened on Feb 9, 2017

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Groovy (128 forks)batch import
Hacktoberfest

Repository metrics

Stars
 (388 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi

I am using the latest nebula gradle plugin version '4.3.0', here is my code below:

apply plugin: 'nebula.ospackage'

buildscript {
	dependencies {
		classpath 'com.netflix.nebula:gradle-ospackage-plugin:3.4.0'
	}
}

task createTmp(type: Copy) {
	into 'build/tmpDist'
	
	from("${rootDir}/shellscripts") {
		include '*.sh'
		fileMode 0755
	}
}

ospackage {
	packageName = "utils"
    version = "1"
    release = "1"
    arch = NOARCH
    os = LINUX

    packageDescription = "This is test"
    sourcePackage = "utils-src-1.0.1-1.noarch.rpm" // does not exist
    
	user 'tomcat'
    permissionGroup 'app'
    
    postUninstall = file("${rootDir}/postUninstall.sh")
    
    into "/app/test/utils-1.0.0.1-1" 
    from('build/tmpDist') { 
        include '**/*' 
        exclude '*.sh'
    }
    from('build/tmpDist') { 
        include '*.sh' 
        fileMode 0755
    }
}

buildRpm {
	addParentDirs = false
	
	link("/app/test/utils", "/app/test/utils-1.0.0.1-1")	
}

I use the following command to build the RPM "gradle clean createTmp buildRpm". Any idea what could be wrong here?

Thanks Sri

Contributor guide