Code Monkey home page Code Monkey logo

gradle-ospackage-plugin's People

Contributors

ahadas avatar alankrueger avatar bi- avatar bmoyles avatar bmuschko avatar breskeby avatar chali avatar coryb avatar czietsman avatar danielthomas avatar danveloper avatar david-resnick avatar dlinszner avatar eskatos avatar hugares avatar javiplx avatar jkschneider avatar merscwog avatar mricciuti avatar nadavc avatar ngutzmann avatar noel-yap avatar odysseuslives avatar pniederw avatar quidryan avatar rpalcolea avatar rspieldenner avatar seanjreilly avatar sghill avatar sigmarw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradle-ospackage-plugin's Issues

Stop using internal Gradle API

I tried to integrate it on gradle 1.6, which we need now (since we are stuck on the version of the Gradle RPM plugin).

When I try to integrate it I get

10:51:41.398 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.GradleException: Could not generate a proxy class for class com.netflix.gradle.plugins.packaging.ProjectPackagingExtension.
10:51:41.398 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractClassGenerator.generate(AbstractClassGenerator.java:201)
10:51:41.399 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
10:51:41.399 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultConvention.create(DefaultConvention.java:115)
10:51:41.400 [ERROR] [org.gradle.BuildExceptionReporter] at com.netflix.gradle.plugins.packaging.SystemPackagingBasePlugin.createExtension(SystemPackagingBasePlugin.groovy:51)
10:51:41.400 [ERROR] [org.gradle.BuildExceptionReporter] at com.netflix.gradle.plugins.packaging.SystemPackagingBasePlugin.apply(SystemPackagingBasePlugin.groovy:42)
10:51:41.401 [ERROR] [org.gradle.BuildExceptionReporter] at com.netflix.gradle.plugins.packaging.SystemPackagingBasePlugin.apply(SystemPackagingBasePlugin.groovy)
10:51:41.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:107)
10:51:41.402 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:71)
10:51:41.403 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:41)
10:51:41.403 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.plugins.PluginContainer$apply.call(Unknown Source)
10:51:41.404 [ERROR] [org.gradle.BuildExceptionReporter] at com.netflix.gradle.plugins.packaging.SystemPackagingPlugin.apply(SystemPackagingPlugin.groovy:40)
10:51:41.407 [ERROR] [org.gradle.BuildExceptionReporter] at com.netflix.gradle.plugins.packaging.SystemPackagingPlugin.apply(SystemPackagingPlugin.groovy)
10:51:41.407 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:107)
10:51:41.408 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:71)
10:51:41.408 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:37)
10:51:41.409 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)
10:51:41.410 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)
10:51:41.410 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)
10:51:41.411 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)
10:51:41.411 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:39)
10:51:41.412 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Project$apply.call(Unknown Source)
10:51:41.413 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
10:51:41.413 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.Script$apply.callCurrent(Unknown Source)
10:51:41.414 [ERROR] [org.gradle.BuildExceptionReporter] at build_77q47vud11108k97t9liumnul1.run(/home/jacekf/src/dropwizard-spring-di-security-onejar-example/build.gradle:67)
10:51:41.414 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
10:51:41.415 [ERROR] [org.gradle.BuildExceptionReporter] ... 30 more
10:51:41.416 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoClassDefFoundError: org/gradle/api/internal/file/copy/DefaultCopySpec
10:51:41.433 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractClassGenerator.generate(AbstractClassGenerator.java:100)
10:51:41.434 [ERROR] [org.gradle.BuildExceptionReporter] ... 54 more
10:51:41.435 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.ClassNotFoundException: org.gradle.api.internal.file.copy.DefaultCopySpec
10:51:41.435 [ERROR] [org.gradle.BuildExceptionReporter] ... 55 more
10:51:41.436 [ERROR] [org.gradle.BuildExceptionReporter]

java.lang.ClassNotFoundException: org.gradle.api.internal.file.copy.DefaultCopySpec

By using Gradle internal API (which can change with every version) you are getting into the same Gradle version hell that the original Gradle RPM plugin has. Every version of it works only with a particular version of Gradle. You need to have the same version of Gradle on every box and you cannnot upgrade it without breaking some other app.

Good link here:
http://gradle.1045684.n5.nabble.com/Possible-Backwards-compatibility-problem-Gradle-1-7-crashes-with-RPM-plugin-td5711630.html

Please stop using internal Gradle API and thus ensure your plugin works reliably across different versions of Gradle on different boxes,

config | noreplace not being set

I am attempting to build an RPM and marking certain files as config noreplace. I have used this in the past with success, however, it now appears not to be working.

buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath "com.netflix.nebula:gradle-ospackage-plugin:1.12.7"
  }
}

apply plugin: "os-package"
version = '1.0'



ospackage {
    os      = LINUX
    arch    = X86_64
    release = 3
    version = project.version

    user    = 'root'
    packageName = 'example'
    permissionGroup = 'root'
    packageDescription = 'example proj'

    vendor  = 'foobar'
    url     = 'foobar.com'
    license = 'foo'

    from('config/testconf') {
        into '/opt/test/config'
        fileMode = 0644
        fileType = CONFIG | NOREPLACE
    }

    from('nonconfig/nonconfig') {
        into '/opt/test/not'
        fileMode = 0644
    }

}

task( type: Wrapper) {
   gradleVersion = '1.12'
}

Above is the example I have been using. After installing the RPM i queried the DB using

sudo rpm -q --qf '[%{filenames}: %{fileflags}\n]' example

and get the following results

/opt/test: 0
/opt/test/config: 0
/opt/test/config/testconf: 0
/opt/test/not: 0
/opt/test/not/nonconfig: 0

I believe the value of 0 should be equal to 17 if I translated the rpmlib.h correctly for /opt/test/config/testconf

Any suggestions or glaring mistakes that I have made?

Enforce package names

According to https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source the package name should only be "Package names (both source and binary, see Package, Section 5.6.7) must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character." We already do a simple check, but it should follow the Debian rules.

For RPMs, according to http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Common_Character_Set_for_Package_Naming: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._+"

CC @bmuschko @bmoyles

Unable to set fileType CONFIG for RPM

I'm running gradle 1.10 and attempting to set the fileType to CONFIG in a from section just like in the example. All of the files are making it into the RPM, but none of them are marked and configuration files as indicated by rpm -qp --configfiles mypackage-0.1.rpm. I also tried setting the default fileType to CONFIG without success.

I'm not seeing anything too strange in the debug logs except for the following from RpmCopyAction
"Got an empty spec from org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$StubbedFileCopyDetails for opt/opt"

Similar entries are repeated for all subdirectories. Each time the last element is repeated twice such as
opt/opt
opt/foo/foo
opt/foo/conf/conf

Any ideas?

RPM task used on a host with misconfigured hostname causes build failure

I've run into an issue with the RPM task (though this would apply to any SystemPackagingTask) on a build host without a properly configured hostname. There is a static field SystemPackagingTask.machineAddress that is initialized to InetAddress.localHost, however java seems to try to lookup the hostname to find the local address. This machine I found it on was configured with it's short hostname and it didn't have the correct search domain configured so when java tried to look up it's hostname it failed:

Caused by: java.net.UnknownHostException: lglbi178: lglbi178: Name or service not known
    at com.netflix.gradle.plugins.packaging.SystemPackagingTask.<clinit>(SystemPackagingTask.groovy:28)
    ... 48 more
Caused by: java.net.UnknownHostException: lglbi178: Name or service not known
    ... 49 more

One solution is to fix the host (of course), but I've made a change that prevent this from ever happening here: https://github.com/jonny-miller/gradle-ospackage-plugin/commit/1702e10621a88462669e2e7cd5af18980216a561

Should I open a pull request for this?

requires() don't work in version 2.0.0

tl;dr - When using the requires() method in distRpm-task, I get a
ClassNotFoundException: com.google.common.base.Preconditions


In Gradle 2.1:

plugins {
    id "nebula.os-package-base" version "2.0.0"
}

task distRpm(type: Rpm) {
    release = 1
    os = "LINUX"
    arch = "noarch"
    version = "0.1"
    requires("package")
}
FAILURE: Build failed with an exception.

* Where:
Build file '/usr/local/src/dev/ospackage-rpm-requires/build.gradle' line: 10


* What went wrong:
A problem occurred evaluating root project 'ospackage-rpm-requires'.
> com/google/common/base/Preconditions

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'ospackage-rpm-requires'.
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:190)
        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
        at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:521)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:82)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
        at com.netflix.gradle.plugins.packaging.SystemPackagingExtension.requires(SystemPackagingExtension.groovy:241)
        at com.netflix.gradle.plugins.packaging.SystemPackagingExtension.requires(SystemPackagingExtension.groovy:251)
        at com.netflix.gradle.plugins.packaging.SystemPackagingExtension$requires.call(Unknown Source)
        at com.netflix.gradle.plugins.packaging.SystemPackagingTask.requires(SystemPackagingTask.groovy:30)
        at build_7474ogitkhp8i0n286k7lio597$_run_closure1.doCall(/usr/local/src/dev/ospackage-rpm-requires/build.gradle:10)
        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:59)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:110)
        at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:482)
        at org.gradle.api.internal.project.AbstractProject.task(AbstractProject.java:884)
        at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:225)
        at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:129)
        at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
        at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
        at build_7474ogitkhp8i0n286k7lio597.run(/usr/local/src/dev/ospackage-rpm-requires/build.gradle:5)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
        ... 34 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions
        ... 50 more


BUILD FAILED

uploadArchives doesn't work in Jenkins

Jenkins is using 1.12 gradle. Trying to run gradle uploadArchives gives error. If I remove uploadArchives task, everything works fine. Also, if I run it from my command line, then uploadArchives works fine.

nexus {
attachSources = true
attachTests = true
attachJavadoc = true
sign = false
repositoryUrl = 'http://mynexuslocation:8080/nexus/content/repositories/releases/'
snapshotRepositoryUrl = 'http://mynexuslocation:8080/nexus/content/repositories/snapshots/'
}

FAILURE: Build failed with an exception.

  • What went wrong:
    Cannot invoke method readLine() on null object
  • Try:
    Run with --info or --debug option to get more log output.
  • Exception is:
    java.lang.NullPointerException: Cannot invoke method readLine() on null object
    at org.gradle.api.plugins.nexus.NexusPlugin$_configureUpload_closure12_closure23_closure24.doCall(NexusPlugin.groovy:215)
    at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
    at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:83)
    at org.gradle.listener.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
    at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy8.graphPopulated(Unknown Source)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:84)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:46)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.Main.main(Main.java:37)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

gradle-ospackage-plugin 1.12.1 does not work with gradle 2.0

Hi,

I have trying to use version 1.12.1 with gradle 2.0 but I get the following error:

  • What went wrong:
    Execution failed for task ':rpmApacheDEV'.

    java.lang.NoSuchFieldException: spec

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':rpmApacheDEV'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:296)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:81)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:39)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    Caused by: org.gradle.internal.UncheckedException: java.lang.NoSuchFieldException: spec
    at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
    at org.gradle.internal.UncheckedException$throwAsUncheckedException.call(Unknown Source)
    at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction.execute(AbstractPackagingCopyAction.groovy:47)
    at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator.execute(NormalizingCopyActionDecorator.java:52)
    at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator.execute(DuplicateHandlingCopyActionDecorator.java:42)
    at org.gradle.api.internal.file.copy.CopyActionExecuter.execute(CopyActionExecuter.java:38)
    at org.gradle.api.tasks.AbstractCopyTask.copy(AbstractCopyTask.java:83)
    at com.netflix.gradle.plugins.packaging.SystemPackagingTask.super$5$copy(SystemPackagingTask.groovy)
    at com.netflix.gradle.plugins.packaging.SystemPackagingTask$_copy_closure19.doCall(SystemPackagingTask.groovy:100)
    at com.netflix.gradle.plugins.packaging.SystemPackagingTask$_copy_closure19.doCall(SystemPackagingTask.groovy)
    at com.netflix.gradle.plugins.packaging.SystemPackagingTask.copy(SystemPackagingTask.groovy:99)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 44 more
    Caused by: java.lang.NoSuchFieldException: spec
    at java_lang_Class$getDeclaredField$0.call(Unknown Source)
    at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction.extractSpec(AbstractPackagingCopyAction.groovy:172)
    at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction.this$dist$invoke$1(AbstractPackagingCopyAction.groovy)
    at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction$StreamAction.methodMissing(AbstractPackagingCopyAction.groovy)
    at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction$StreamAction.processFile(AbstractPackagingCopyAction.groovy:59)
    at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1$1.processFile(NormalizingCopyActionDecorator.java:65)
    at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1$1.processFile(DuplicateHandlingCopyActionDecorator.java:60)
    at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.processFile(CopyFileVisitorImpl.java:60)
    at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.visitFile(CopyFileVisitorImpl.java:44)
    at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:157)
    at org.gradle.api.internal.file.collections.DirectoryFileTree.visitFrom(DirectoryFileTree.java:125)
    at org.gradle.api.internal.file.collections.DirectoryFileTree.visit(DirectoryFileTree.java:115)
    at org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:96)
    at org.gradle.api.internal.file.CompositeFileTree.visit(CompositeFileTree.java:54)
    at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:37)
    at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:24)
    at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:498)
    at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)
    at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)
    at org.gradle.api.internal.file.copy.DefaultCopySpec.walk(DefaultCopySpec.java:322)
    at org.gradle.api.internal.file.copy.CopySpecBackedCopyActionProcessingStream.process(CopySpecBackedCopyActionProcessingStream.java:36)
    at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1.process(DuplicateHandlingCopyActionDecorator.java:44)
    at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.process(NormalizingCopyActionDecorator.java:56)
    at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction.execute(AbstractPackagingCopyAction.groovy:44)
    ... 60 more

Do you have any plan on updating to version 2.0?

Thank you,

Frederic

directory() does not set ownership

com.netflix.nebula:gradle-ospackage-plugin:2.0.2

task buildRpm(type: Rpm) {
    release '0'

    os 'LINUX'
    user 'user'
    permissionGroup 'group'

    requires('jre', '1.7', GREATER | EQUAL)

    def baseDir = '/apps/myApp'

    into baseDir
    directory("$baseDir/var")
}

Creates /apps/myApp/var owned by root:root, not by user:group

How to modify rpm file listing to not manage all directories

I'm kind of having a hard time trying to figure out how to configure an rpm to only manage a subset of directories being installed. for example:

buildRpm {
    into('/opt/test')
    from(war.outputs.files) {
        into('warDir')
        user 'testuser'
        groupPermission 'testgroup'
    } 
}

when you copy the rpm out to a linux box and query the list of files managed shows:

rpm -qpl testwar.rpm
/opt/test
/opt/test/warDir
/opt/test/warDir/test.war

Installation will cause the /opt/test directory ownership to be testuser:testgroup even if the directory already exists. The install will also fail if the /opt/test directory is managed by another rpm with a 'file conflict' error

What I would like to see from the rpm is:

rpm -qpl testwar.rpm
/opt/test/warDir
/opt/test/warDir/test.war

But I can't figure out the correct combination of configuration to get it to work. Has anyone else ran into this?

Gradle 2.x and gradle-ospackage-plugin:2.0.0 -- java.lang.IncompatibleClassChangeError

Hello! Just tried a brand new 2.0.0 version of the plugin (in gradle 2.0 and 2.1) and got that:

Caused by: java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for com.netflix.gradle.plugins.deb.control.MultiArch do not match. Expected -1 but got 2
    at com.netflix.gradle.plugins.deb.control.MultiArch.$INIT(MultiArch.groovy)
    at com.netflix.gradle.plugins.deb.control.MultiArch.<clinit>(MultiArch.groovy)
    at com.netflix.gradle.plugins.deb.control.MultiArch$values.call(Unknown Source)
    at com.netflix.gradle.plugins.deb.DebPlugin.applyAliases(DebPlugin.groovy:46)
    at com.netflix.gradle.plugins.deb.DebPlugin$applyAliases.call(Unknown Source)
    at com.netflix.gradle.plugins.packaging.SystemPackagingBasePlugin.apply(SystemPackagingBasePlugin.groovy:43)
    at com.netflix.gradle.plugins.packaging.SystemPackagingBasePlugin.apply(SystemPackagingBasePlugin.groovy)
    at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:104)
    at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:68)
    at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:34)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:116)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:85)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:129)
    at org.gradle.groovy.scripts.DefaultScript.apply(DefaultScript.java:99)
    at org.gradle.api.Script$apply.callCurrent(Unknown Source)
    at rpm_4qaelfc8n5luuoduuvujb8auk0.run(/home/bkmz/blah/spms-java/gradle/rpm.gradle:4)
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
    ... 64 more

Plugin configuration (worked fine in gradle 1.12):

task rpm(type:Rpm, dependsOn:[bootRepackage, filterRpm]) {
    packageName = rpmPackageName
    version = rpmVersion
    release = rpmRelease
    arch = NOARCH
    os = LINUX

    preInstall = file("$buildDir/rpm-filtered/install/preInstall.sh")
    postInstall = file("$buildDir/rpm-filtered/install/postInstall.sh")
    preUninstall = file("$buildDir/rpm-filtered/install/preUninstall.sh")
    postUninstall = file("$buildDir/rpm-filtered/install/postUninstall.sh")

    requires('java', "$javaVer", GREATER | EQUAL)

    into "/opt/blah/$packageName"

    user 'tomcat'

    from(zipTree(project.buildDir.absolutePath + "/libs/${project.name}-${project.version}" + '.jar'))

    from("$buildDir/rpm-filtered/scripts") {
        include 'app.init'
        rename '.*', "$packageName"
        into '/etc/init.d'
        fileType CONFIG | NOREPLACE
        fileMode 0550
    }
    from("$buildDir/rpm-filtered/scripts") {
        include 'app.sysconfig'
        rename '.*', "$packageName"
        into '/etc/sysconfig'
        fileType CONFIG | NOREPLACE
    }
    from("$buildDir/rpm-filtered/scripts") {
        include 'app.logrotate'
        rename '.*', "$packageName"
        into '/etc/logrotate.d'
        fileType CONFIG | NOREPLACE
    }
}

Release of binary including latest content from gradle-1.9 branch

Would it be possible to release a version of the plugin with the latest content from the gradle-1.9 branch? I have looked around and the latest version I can find is 1.9.3 which does not include the conflicts/obsoletes functionality that we are looking to use.

Filter lead to incorrect file copy

Steps to reproduce:

  1. create two files with same name but different content
  2. put the filles into the following file hiearchy
    folder
    |------> subfolder1 ---> abc.html
    |------> subfolder2 ---> abc.html
  3. define a copySpec as follow in the osPackage plugin:
    from('folder') {
    include 'subfolder1/abc.html'
    include 'subfolder2/abc.html'
    into('folder')
    filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [version: project.version])
    }
  4. run buildDeb
  5. extract the files from the deb
  6. it turns out that both abc.html files become identical even when they were not initially

'directory' construct results in invalid rpm

Hi,

I want my RPM to create a few empty directory when installed. Like so, in an oldfashioned rpm spec:

%dir /var/opt/myapp/data

I tried using this

ospackage {
    packageName = 'foo'
}
buildRpm {
     directory('/var/opt/myapp/data', 640)
}

When calling rpm -q -filesbypkg -p <myrpm>, I get this, seemingly correct, output:

foo          /var/opt/myapp/data

But, when installing, it fails:

[vagrant@guest1 share]$ sudo rpm -i foo-0.0.1.noarch.rpm
error: unpacking of archive failed on file ./var/opt/myapp/data: cpio: Archive file not in header

I don't see, first of all, why it tries to install the directory in ".", and secondly, why even that fails.

Any hints would be most welcome since the Plugin-Rpm.md file is not very forthcoming on the issue of directories.

rpm 4.11.2 fails with "not an rpm package"

rpm 4.11.2-3
gradle 2.2

$ gradle clean rpm
$ rpm -qp build/distributions/test-1.0-0.noarch.rpm
error: build/distributions/test-1.0-0.noarch.rpm: headerRead failed: hdr load: BAD
error: build/distributions/test-1.0-0.noarch.rpm: not an rpm package (or package manifest)

build.gradle

group = 'org.relgames'
version = '1.0'
description = "test"

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'org.spockframework:spock-grails-support:0.7-groovy-2.0'
        classpath 'com.netflix.nebula:gradle-ospackage-plugin:1.12.2'
    }
}

apply plugin: 'rpm'

task rpm(type: Rpm) {
    release '0'
}

settings.gradle

rootProject.name = 'test'

unable to get fileType working

When I include fileType, my Gradle build fails on that line with the error at the bottom. I am using Gradle 1.8, Groovy 1.8.6 and 1.12.7 of the plugin (also tried with 1.12.2).

I am using it per the example in the read me.

  from('src'){
    include('foo.conf')
    fileType CONFIG | NOREPLACE
    into '/opt/foo'
  }

The error...

10:45:18.525 [ERROR] [org.gradle.BuildExceptionReporter] 
10:45:18.525 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
10:45:18.525 [ERROR] [org.gradle.BuildExceptionReporter] 
10:45:18.526 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
10:45:18.526 [ERROR] [org.gradle.BuildExceptionReporter] Build file '/Users/Jason/gap_svn/MerchantConnectMulti/build.gradle' line: 39
10:45:18.526 [ERROR] [org.gradle.BuildExceptionReporter] 
10:45:18.526 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
10:45:18.526 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project 'MerchantConnectMulti'.
10:45:18.527 [ERROR] [org.gradle.BuildExceptionReporter] > org/gradle/api/internal/file/copy/CopySpecWrapper
10:45:18.527 [ERROR] [org.gradle.BuildExceptionReporter] 
10:45:18.527 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
10:45:18.528 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MerchantConnectMulti'.
10:45:18.529 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
10:45:18.529 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:132)
10:45:18.529 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
10:45:18.529 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
10:45:18.530 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
10:45:18.530 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
10:45:18.530 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:468)
10:45:18.530 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:76)
10:45:18.531 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
10:45:18.531 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
10:45:18.531 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
10:45:18.531 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
10:45:18.531 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
10:45:18.532 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
10:45:18.532 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
10:45:18.532 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
10:45:18.532 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:45)
10:45:18.532 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
10:45:18.533 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.533 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:42)
10:45:18.533 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.533 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
10:45:18.533 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.534 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
10:45:18.534 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.534 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)
10:45:18.534 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.534 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)
10:45:18.535 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)
10:45:18.535 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.util.Swapper.swap(Swapper.java:38)
10:45:18.535 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)
10:45:18.535 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.535 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
10:45:18.536 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
10:45:18.536 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.536 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:59)
10:45:18.536 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
10:45:18.536 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.537 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:45)
10:45:18.537 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoordinator.java:186)
10:45:18.537 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:49)
10:45:18.537 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
10:45:18.537 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.538 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)
10:45:18.538 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.538 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
10:45:18.539 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:125)
10:45:18.539 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:48)
10:45:18.540 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:155)
10:45:18.540 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)
10:45:18.540 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:116)
10:45:18.541 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
10:45:18.541 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoClassDefFoundError: org/gradle/api/internal/file/copy/CopySpecWrapper
10:45:18.541 [ERROR] [org.gradle.BuildExceptionReporter]        at com.netflix.gradle.plugins.packaging.CopySpecEnhancement.appendFieldToCopySpec(CopySpecEnhancement.groovy:32)
10:45:18.542 [ERROR] [org.gradle.BuildExceptionReporter]        at com.netflix.gradle.plugins.packaging.CopySpecEnhancement$appendFieldToCopySpec.callStatic(Unknown Source)
10:45:18.542 [ERROR] [org.gradle.BuildExceptionReporter]        at com.netflix.gradle.plugins.packaging.CopySpecEnhancement.fileType(CopySpecEnhancement.groovy:60)
10:45:18.543 [ERROR] [org.gradle.BuildExceptionReporter]        at build_ttekl2lfgqeq3ava9vakft1a3$_run_closure1_closure4.doCall(/Users/Jason/gap_svn/MerchantConnectMulti/build.gradle:39)
10:45:18.543 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:58)
10:45:18.543 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130)
10:45:18.544 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91)
10:45:18.544 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.file.copy.DefaultCopySpec.from(DefaultCopySpec.java:102)
10:45:18.544 [ERROR] [org.gradle.BuildExceptionReporter]        at com.netflix.gradle.plugins.packaging.SystemPackagingTask$_from_closure20.doCall(SystemPackagingTask.groovy:179)
10:45:18.545 [ERROR] [org.gradle.BuildExceptionReporter]        at com.netflix.gradle.plugins.packaging.SystemPackagingTask$_from_closure20.doCall(SystemPackagingTask.groovy)
10:45:18.545 [ERROR] [org.gradle.BuildExceptionReporter]        at com.netflix.gradle.plugins.packaging.SystemPackagingTask.from(SystemPackagingTask.groovy:178)
10:45:18.546 [ERROR] [org.gradle.BuildExceptionReporter]        at com.netflix.gradle.plugins.packaging.SystemPackagingTask.from(SystemPackagingTask.groovy)
10:45:18.546 [ERROR] [org.gradle.BuildExceptionReporter]        at build_ttekl2lfgqeq3ava9vakft1a3$_run_closure1.doCall(/Users/Jason/gap_svn/MerchantConnectMulti/build.gradle:36)
10:45:18.546 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:58)
10:45:18.547 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130)
10:45:18.547 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:110)
10:45:18.547 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:433)
10:45:18.548 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.project.AbstractProject.task(AbstractProject.java:919)
10:45:18.548 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:246)
10:45:18.548 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:134)
10:45:18.549 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
10:45:18.549 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
10:45:18.549 [ERROR] [org.gradle.BuildExceptionReporter]        at build_ttekl2lfgqeq3ava9vakft1a3.run(/Users/Jason/gap_svn/MerchantConnectMulti/build.gradle:13)
10:45:18.550 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
10:45:18.550 [ERROR] [org.gradle.BuildExceptionReporter]        ... 51 more
10:45:18.550 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.ClassNotFoundException: org.gradle.api.internal.file.copy.CopySpecWrapper
10:45:18.551 [ERROR] [org.gradle.BuildExceptionReporter]        ... 75 more
10:45:18.551 [ERROR] [org.gradle.BuildExceptionReporter]

Set architecture in the DEB package

I would like to set the target architecture for the Debian package but I've seen that it is not implemented yet.
screen shot 2015-01-19 at 10 38 03

Would it be possible to implement it?
Thanks a lot

UnsupportedOperationException in NormalizingCopyActionDecorator$StubbedFileCopyDetails

This used to work. I'm going to have to git bisect, but ... I didn't change anything! Trust me!

$ ./gradlew --version


Gradle 1.12

Build time: 2014-04-29 09:24:31 UTC
Build number: none
Revision: a831fa866d46cbee94e61a09af15f9dd95987421

Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
Ivy: 2.2.0
JVM: 1.7.0_65 (Oracle Corporation 24.65-b04)
OS: Linux 3.2.0-56-generic amd64

buildDeb {
dependsOn installApp

    from (rootProject.file("project-package/src/pkg/debian")) {
            into "/"
    }

}

Caused by: java.lang.UnsupportedOperationException
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$StubbedFileCopyDetails.getFile(NormalizingCopyActionDecorator.java:126)
at com.netflix.gradle.plugins.deb.filevisitor.Java7AndHigherDebFileVisitorStrategy.addDirectory(Java7AndHigherDebFileVisitorStrategy.groovy:33)
at com.netflix.gradle.plugins.deb.DebCopyAction.visitDir(DebCopyAction.groovy:145)
at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction.this$dist$invoke$1(AbstractPackagingCopyAction.groovy)
at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction$StreamAction.methodMissing(AbstractPackagingCopyAction.groovy)
at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction$StreamAction.processFile(AbstractPackagingCopyAction.groovy:61)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.maybeVisit(NormalizingCopyActionDecorator.java:97)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.maybeVisit(NormalizingCopyActionDecorator.java:87)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.maybeVisit(NormalizingCopyActionDecorator.java:87)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.access$000(NormalizingCopyActionDecorator.java:52)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1$1.processFile(NormalizingCopyActionDecorator.java:64)
at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1$1.processFile(DuplicateHandlingCopyActionDecorator.java:60)
at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.processFile(CopyFileVisitorImpl.java:60)
at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.visitFile(CopyFileVisitorImpl.java:44)
at org.gradle.api.internal.file.collections.DirectoryFileTree.walkDir(DirectoryFileTree.java:157)
at org.gradle.api.internal.file.collections.DirectoryFileTree.visitFrom(DirectoryFileTree.java:125)
at org.gradle.api.internal.file.collections.DirectoryFileTree.visit(DirectoryFileTree.java:115)
at org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:96)
at org.gradle.api.internal.file.CompositeFileTree.visit(CompositeFileTree.java:54)
at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:37)
at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:24)
at org.gradle.api.internal.file.copy.DelegatingCopySpecInternal.walk(DelegatingCopySpecInternal.java:223)
at org.gradle.api.internal.file.copy.DelegatingCopySpecInternal.walk(DelegatingCopySpecInternal.java:225)
at org.gradle.api.internal.file.copy.DefaultCopySpec.walk(DefaultCopySpec.java:453)
at org.gradle.api.internal.file.copy.CopySpecBackedCopyActionProcessingStream.process(CopySpecBackedCopyActionProcessingStream.java:36)
at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1.process(DuplicateHandlingCopyActionDecorator.java:44)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.process(NormalizingCopyActionDecorator.java:56)
at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction.execute(AbstractPackagingCopyAction.groovy:44)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator.execute(NormalizingCopyActionDecorator.java:52)
at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator.execute(DuplicateHandlingCopyActionDecorator.java:42)
at org.gradle.api.internal.file.copy.CopyActionExecuter.execute(CopyActionExecuter.java:38)
at org.gradle.api.tasks.AbstractCopyTask.copy(AbstractCopyTask.java:65)
at com.netflix.gradle.plugins.packaging.SystemPackagingTask.super$5$copy(SystemPackagingTask.groovy)
at com.netflix.gradle.plugins.packaging.SystemPackagingTask$_copy_closure19.doCall(SystemPackagingTask.groovy:97)
at com.netflix.gradle.plugins.packaging.SystemPackagingTask$_copy_closure19.doCall(SystemPackagingTask.groovy)
at com.netflix.gradle.plugins.packaging.SystemPackagingTask.copy(SystemPackagingTask.groovy:96)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)

Task name clash?

I'm getting task name clashes when I apply the rpm plugin in a project that already defines a clean or assemble tasks. Considering these are quite common task names, shouldn't the rpm plugin use different names to avoid this kind of problems?

This is the error message:

A problem occurred evaluating root project 'vert.x'.
Cannot add task ':clean' as a task with that name already exists.

Unable to use fileType in Deb tasks

//Upstart file for Debian, customized compared to the CentOS version
from('src/deploy/resources/config/service/upstart/debian') {
    into '/etc/init'
    fileType = CONFIG | NOREPLACE
}

The upstart files between Debian and CentOS are pretty different, so we need to customize it in the Debian task, not in the common ospackage.

But when I do this we get....

  • What went wrong:
    A problem occurred evaluating root project 'myapp'.

    No such property: CONFIG for class: org.gradle.api.internal.file.copy.CopySpecWrapper_Decorated

it works though in the rpm task....

fileType does not work for debian packages

Hello

For debian packages, there is a problem config files. In the debian packages there must be conffiles file in control.tar.gz for configuration files. But the plugin does not create conffiles for configured fileType CONFIG | NOREPLACE

Regards

Unable to use 'user' in ospackage

when copying from ospackage

ospackage {    
    from ('conf') {
        user 'tomcat'
        permissionGroup 'tomcat'
        into '/usr/share/apache-tomcat-7.0.47/conf'    
    }
}

the 'user' seems to be ignored when installing a created RPM and i see the following:

warning: user cwalker does not exist - using root)

This doesn't occur if i move the 'from' config into the 'buildRpm' task

Is Gradle 2.1 supported?

The README says "the following can be used to incorporate this plugin within your Gradle 1.12.x project". Is Gradle 2.1 supported?

Also, the README mentions version 1.12.7. But the RPM guide mention version 1.12.2.

Any version of plugin greater than 1.12.3 crashes gradle daemon

When i try to use any version greater than 1.12.3 in the 1.12 stream of the plugin the gradle daemon crashes. If I run the build with the --no-daemon option I get the following information:

[machine-name]$ ./gradlew tasks --refresh-dependencies --no-daemon
> Configuring > 0/1 projects > root project#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb79f691b, pid=3567, tid=3074542480
#
# JRE version: 6.0_14-b08
# Java VM: Java HotSpot(TM) Server VM (14.0-b16 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x5d991b]
#
# An error report file with more information is saved as:
# /path/to/err/hs_err_pid3567.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted

I can add the hs_err_pid*.log file if you'd like but was wondering if anyone has encountered this issue before? I'd be willing to look into this myself but don't have any clues about where to start, so those would also be appreciated.

Version 2.2.1 forces dependency on default-jre | java6-runtime

In version 2.2.1 of this package, the upgrade of Jdeb to 1.4 adds a default dependency of "default-jre | java6-runtime"

If you aren't using debs with dependencies (or if your target system doesn't have either of those dependencies available), this will break your debians.
There is a workaround for JDeb in that JDeb will only use those code-defaults if the Depends: is not specified in the control file.
If Depends is specified but empty, it will not insert those defaults.
The existing control.ftl in this project only outputs a "Depends:" if there are non-empty dependencies specified.

Fortunately, the gradle-ospackage-plugin project generates the control file by rendering a template loaded from the classpath.
So we worked around this in our project by getting our own control.ftl on the classpath prior to the one included in this project.
We then modified it to remove the conditional around the "depends" part.
i.e. we added the following file to our buildSrc/src/main/resources/deb/control.ftl:

Source: ${name}
Section: ${section}
Priority: optional
Maintainer: ${author}
Uploaders: ${author}
Version: ${version}-${release}
Standards-Version: 3.8.3
Package: ${name}
Provides: ${provides}
Homepage: ${url}
Architecture: ${arch}<% if (multiArch) { %>
Multi-Arch: ${multiArch}<% } %>
Distribution: unstable
Depends: ${depends}
Description: ${summary}
 ${description}

This has fixed the problem for us.
I don't know if this is the best solution, but I imagine others may be experiencing it also.

Archive name is not configurable

This is a very helpful plugin, thanks for providing this plugin.
Just a suggestion regarding the archive properties, it would be good if the archiveName property as well as the archString property are made configurable, as some project may use their own naming conventions for archive files. Thanks!
(com.netflix.gradle.plugins.deb.Deb)

support creating empty directories

I would like to create a empty directory under /var/log in my rpm. I should be able to do this with
%file
%dir /var/log/myproject

I can't find a way to do this currently. If I make a empty tmp Dir and use that in from, it gets ignored. If I include a Dir with content and exclude all, it's also skipped. Is there a way to include empty dirs? Maybe have a directory option in the DSL?

Packages with links are never considered UP-TO-DATE

Any package that configures a link is always considered out of date.

$ ./gradlew buildDeb --info
<snip>
Executing task ':buildDeb' (up-to-date check took 0.073 secs) due to:
  Value of input property 'allLinks' has changed for task ':buildDeb'
<snip>

The above is the case even if the link configuration has not changed since the previous build.

Thanks

requires throws Precondition error without any details

After upgrading to latest Gradle 2.2.1 and trying to use the newest version of the RPM plugin I get this type of error:

Build file '-------------/build.gradle' line: 145

* What went wrong:
A problem occurred evaluating project ':schedule-service'.
> com.google.common.base.Preconditions

That's it. No additional details. The line in question is a simple requires:

 requires('java-1.7.0-openjdk', '1.7', GREATER | EQUAL)

I tried changing to anything I could even a simple

 requires('java-1.7.0-openjdk')

Nothing works, it still chokes on that line. It would be good if the Preconditions assertion provided some sort of message as to why this is getting rejected.

Prior to the upgrade we were using the original RPM plugin (com.trigonic) and it handle this just fine.

User and group not set for rpm?

Hi,

I cannot get generated RPM to set correct user and group for installed files. In ospackage I have:

from(jar.outputs.files) { 
    user 'someuser'
    permissionGroup 'somegroup'
    fileMode = 0440
    into 'lib'
}

I create user and group in preInstall, but when the jar file is installed permissions are set ok, but user is my username and group is root.

Am I missing something or is this a bug? (I use version plugin 1.9.3)

Thanks

version 2.0.2 import into intellij idea failing

I'm not sure where the problem lies here but while the following simple build file builds, i get an error trying to import with the 2.0.2 plugin into idea with "import project" and selecting the build.gradle file

plugins {
    id 'java'
    id "nebula.os-package" version "2.0.2"
}

version = "1.0.0"

repositories {
    mavenCentral()
}

when importing, the log file shows:

2014-10-09 16:24:06,611 [5709012]   INFO - .BaseProjectImportErrorHandler - Failed to import Gradle project at '/Users/cwalker/test/include/quickstart' 
org.gradle.tooling.BuildException: Could not run build action using Gradle installation '/development/tools/gradle/gradle-2.1'
...
Caused by: org.gradle.internal.exceptions.LocationAwareException: Build file '/Users/cwalker/test/include/quickstart/build.gradle' line: 4
An exception occurred applying plugin request [id: 'nebula.os-package', version: '2.0.2']
...
Caused by: org.gradle.api.plugins.InvalidPluginException: An exception occurred applying plugin request [id: 'nebula.os-package', version: '2.0.2']
    at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugin(DefaultPluginRequestApplicator.java:162)
    ... 58 more
Caused by: java.lang.ArrayStoreException: <unknown>

I was wondering if anyone was seeing this?

1.9.4 missing guava dependency in POM

The POM for 1.9.4 (http://search.maven.org/remotecontent?filepath=com/netflix/nebula/gradle-ospackage-plugin/1.9.4/gradle-ospackage-plugin-1.9.4.pom) doesn't include a reference to Guava, so builds fail, looking for Preconditions:

Caused by: java.lang.NoClassDefFoundError: com.google.common.base.Preconditions
[05:41:10]  at com.netflix.gradle.plugins.packaging.SystemPackagingExtension.class$(SystemPackagingExtension.groovy)
[05:41:10]  at com.netflix.gradle.plugins.packaging.SystemPackagingExtension.$get$$class$com$google$common$base$Preconditions(SystemPackagingExtension.groovy)
[05:41:10]  at com.netflix.gradle.plugins.packaging.SystemPackagingExtension.requires(SystemPackagingExtension.groovy:237)

It's easy enough to fix this by adding Guava to the buildscript.dependencies closure, but this is otherwise fatal.

from/into fails with dangling symlink and translates existing symlinks into file copies

Here is my simple build.gradle file:

apply plugin: 'nebula'
apply plugin: 'nebula-ospackage'

ospackage {
    packageName = 'symlink-test'
    version = '1.0.0'
}

Here is my test root:

$ find root -ls
11310173        0 drwxr-xr-x    3 coryb         coryb              102 Dec 20 10:22 root
11310178        0 drwxr-xr-x    3 coryb         coryb              102 Dec 20 10:22 root/usr
11310179        0 drwxr-xr-x    5 coryb         coryb              170 Dec 20 10:23 root/usr/bin
11310193        8 lrwxr-xr-x    1 coryb         coryb                7 Dec 20 10:23 root/usr/bin/dangling -> missing
11310190        8 lrwxr-xr-x    1 coryb         coryb                7 Dec 20 10:23 root/usr/bin/foo -> foo-1.2
11310182        0 -rwxr-xr-x    1 coryb         coryb                0 Dec 20 10:22 root/usr/bin/foo-1.2

What I expect to see in the rpm/deb is a copy of the tree with symlinks intact (even if symlinks are dangling). What I am seeing is a full copy file for intact symlinks and an exception on the dangling symlinks:

FAILURE: Build failed with an exception.

* What went wrong:
Could not list contents of '/home/coryb/gradle-test/root/usr/bin/dangling'.

Is there any way to access the generated SPEC file?

I'm having trouble removing the RPM package created by the plugin after installing it in a CentOS 5.9 box and I would like to debug the spec file so I can find what is missing in my plugin config.

Is there any way to get the SPEC file generated by the plugin to produce the RPM?

Invalid install commandline in postinst


Generates "root:root" as the dir's owner.
man install says this is invalid, and the group should be passed as -g

The actual upshot is this:

install -o root:root -d /opt
install: invalid user `root:root'
dpkg: error processing compilerworks-server (--install):
 subprocess installed post-installation script returned error exit status 1

Plugin availability?

I am currently using the trigonic rpm plugin but it doesn't look like it will be supported much longer according to the developer. This fork seems to add some new functionality for deb based packaging as well and seems to have more traction going forward with newer versions of gradle. Is this plugin available in a maven repo somewhere? I have looked but cannot seem to find it.

creating an empty rpm

Is it possible to create an empty rpm only has some dependencies?
e.g.
buildRpm {
packageName 'empty'
version '0.1'
release '1'
os LINUX
arch X86_64
requires('dependenciesA')
}

Looks like the rpm is not created after running ./gradlew build buildRpm,
can I create the rpm without (from.. into...)

RPM can't be built if project version contains '-' character

Hello all,

just run into as issue when building an RPM using plugin version 1.12.2 and Gradle 1.12.
My project has '.BUILD-SNAPSHOT' in the version.
The buildRpm task fails with the message in this case:

12:58:10.158 [ERROR] [org.gradle.BuildExceptionReporter] > version with value: '1.1.2.9.BUILD-SNAPSHOT' contains illegal character -
...
2:58:10.164 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.IllegalArgumentException: version with value: '1.1.2.9.BUILD-SNAPSHOT' contains illegal character -
12:58:10.164 [ERROR] [org.gradle.BuildExceptionReporter]    at org.freecompany.redline.Builder.checkVariableContainsIllegalChars(Builder.java:229)
12:58:10.164 [ERROR] [org.gradle.BuildExceptionReporter]    at org.freecompany.redline.Builder.setPackage(Builder.java:246)
12:58:10.164 [ERROR] [org.gradle.BuildExceptionReporter]    at com.netflix.gradle.plugins.rpm.RpmCopyAction.startVisit(RpmCopyAction.groovy:54)
12:58:10.164 [ERROR] [org.gradle.BuildExceptionReporter]    at com.netflix.gradle.plugins.packaging.AbstractPackagingCopyAction.execute(AbstractPackagingCopyAction.groovy:43)
12:58:10.164 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator.execute(NormalizingCopyActionDecorator.java:52)

Setting version explicitly to a value without '-' doesn't help:

ospackage {
version = '1.2.3'

Only if I change the main Gradle project version I get the RPM built.
Is this something that needs to be fixed?

Delegates hide Input annotations

When trying to put @input onto fields SystemPackagingExtension, I'm finding that AnnotationProcessingTaskFactory.attachValidationAction tries method.getDeclaringClass().getDeclaredField(fieldName); on the fieldName, it fails because the method doesn't show up via a Delegate.

Preserve symlinks when building deb packages

Ran into this trying to package hubot since it expects npm symlinks to be preserved.

As a workaround we put this in:

link('/ourapp/node_modules/hubot/node_modules/.bin/coffee', '../coffee-script/bin/coffee')

Debian files do not have parent directories when built on Windows

When a debian file is built on Windows, it does not include the parent directories of the files in the debian file.
This is not the case when built on Linux. Because of this, debian files built on Windows are not able to be installed.
This is fixed in JDeb 1.1 (tcurdt/jdeb#95)

Could the 2.2.x branch be upgraded to JDeb 1.1 or later (ideally the latest)?

Building DEB restricts shell and actions in install scripts

For the install scripts,

  • one cannot change default shell to anything other than "/bin/sh". This is fine if the user supplied code is dash-compatible (default on Debian systems). However it would be good to have this configurable, e.g., to specify "#!/bin/bash" if the user code is only bash-compatible.
  • the plugin assumes that user supplied code for preInstall and postInstall scripts are always invoked with "install" parameter. It would be good to provide flexibility for adding other actions such as "configure", "abort-remove" etc

The simplest fix is to make the preinst.ftl, postinst.ftl, prerm.ftl, postrm.ftl scripts free-form, i.e., just insert the user-supplied code verbatim (the user could then also specify the shell of choice in the she-bang line)

createDirectoryEntry is not working for empty dirs

com.netflix.nebula:gradle-ospackage-plugin:2.0.2

    File varDir = Files.createTempDirectory(null).toFile()
    println varDir
    from(varDir) {
        into "$baseDir/var"
        createDirectoryEntry = true
    }
    varDir.deleteOnExit();

Does not create var dir.
If I put empty file into varDir it works.

Can you upload the module to the Maven Central too?

In my organization we don't support bintray repositories, but we have an internal maven central mirror. I guess this situation may be quite common in the industry, so can you please add Maven Central to the deploy procedure?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.