nebula-plugins / gradle-ospackage-plugin

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

User and Group not set for Rpm #229

Open smohanas opened 7 years ago

smohanas commented 7 years ago

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

AndreAlves3 commented 5 years ago

any news on this?