From fbcd328be2305d5c97d9fb0289d40640b8bf7142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Thu, 15 Jun 2023 16:27:39 +0200 Subject: [PATCH] update to rpm 3.0.1 --- gradle-plugin-rpm/gradle.properties | 2 +- .../groovy/org/xbib/gradle/plugin/Rpm.groovy | 17 +++++++++++++++++ .../org/xbib/gradle/plugin/RpmCopyAction.groovy | 3 ++- gradle.properties | 2 +- settings.gradle | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/gradle-plugin-rpm/gradle.properties b/gradle-plugin-rpm/gradle.properties index d6a4ac1..0d73a52 100644 --- a/gradle-plugin-rpm/gradle.properties +++ b/gradle-plugin-rpm/gradle.properties @@ -1,2 +1,2 @@ name = gradle-plugin-rpm -version = 3.0.0 +version = 3.0.1 diff --git a/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/Rpm.groovy b/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/Rpm.groovy index f72fff2..a4ba249 100644 --- a/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/Rpm.groovy +++ b/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/Rpm.groovy @@ -11,6 +11,8 @@ import org.xbib.rpm.Link import org.xbib.rpm.lead.Architecture import org.xbib.rpm.lead.Os import org.xbib.rpm.lead.PackageType +import org.xbib.rpm.payload.CompressionType +import org.xbib.rpm.security.HashAlgo import java.util.concurrent.Callable @@ -269,9 +271,24 @@ class Rpm extends AbstractArchiveTask { @Input List provides + @Optional + @Input + HashAlgo privateKeyHashAlgo + + @Optional + @Input + HashAlgo fileDigestsHashAlgo + + @Optional + @Input + CompressionType compressionType + Rpm() { super() // sane defaults + privateKeyHashAlgo = HashAlgo.SHA256 + fileDigestsHashAlgo = HashAlgo.MD5 + compressionType = CompressionType.GZIP os = Os.LINUX arch = Architecture.AMD64 packageType = PackageType.BINARY diff --git a/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/RpmCopyAction.groovy b/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/RpmCopyAction.groovy index fbf94d1..5638ff2 100644 --- a/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/RpmCopyAction.groovy +++ b/gradle-plugin-rpm/src/main/groovy/org/xbib/gradle/plugin/RpmCopyAction.groovy @@ -14,6 +14,7 @@ import org.xbib.rpm.Directory import org.xbib.rpm.Link import org.xbib.rpm.RpmBuilder import org.xbib.rpm.payload.Directive + import java.nio.file.Files import java.nio.file.Path import java.nio.file.StandardOpenOption @@ -47,7 +48,7 @@ class RpmCopyAction implements CopyAction { } RpmBuilder createRpm() { - RpmBuilder builder = new RpmBuilder() + RpmBuilder builder = new RpmBuilder(task.privateKeyHashAlgo, task.fileDigestsHashAlgo, task.compressionType) builder.setPackage task.packageName, task.packageVersion, task.packageRelease, task.epoch builder.setType task.packageType builder.setPlatform task.arch, task.os diff --git a/gradle.properties b/gradle.properties index 64e5678..45c6ad7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group = org.xbib.gradle.plugin name = gradle-plugins -version = 0.0.3 +version = 0.0.4 org.gradle.warning.mode = ALL diff --git a/settings.gradle b/settings.gradle index 71bc9e1..5fe9ccc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -24,7 +24,7 @@ dependencyResolutionManagement { library('jflex', 'de.jflex', 'jflex').version('1.9.1') library('jacc', 'org.xbib', 'jacc').version('3.0.0') library('groovy-git', 'org.xbib.groovy', 'groovy-git').version('2.1.0') - library('rpm', 'org.xbib', 'rpm-core').version('3.0.0') + library('rpm', 'org.xbib', 'rpm-core').version('3.0.1') plugin('publish', 'com.gradle.plugin-publish').version('1.1.0') } }