update to rpm 3.0.1

This commit is contained in:
Jörg Prante 2023-06-15 16:27:39 +02:00
parent 3a759be190
commit fbcd328be2
5 changed files with 22 additions and 4 deletions

View file

@ -1,2 +1,2 @@
name = gradle-plugin-rpm name = gradle-plugin-rpm
version = 3.0.0 version = 3.0.1

View file

@ -11,6 +11,8 @@ import org.xbib.rpm.Link
import org.xbib.rpm.lead.Architecture import org.xbib.rpm.lead.Architecture
import org.xbib.rpm.lead.Os import org.xbib.rpm.lead.Os
import org.xbib.rpm.lead.PackageType import org.xbib.rpm.lead.PackageType
import org.xbib.rpm.payload.CompressionType
import org.xbib.rpm.security.HashAlgo
import java.util.concurrent.Callable import java.util.concurrent.Callable
@ -269,9 +271,24 @@ class Rpm extends AbstractArchiveTask {
@Input @Input
List<Dependency> provides List<Dependency> provides
@Optional
@Input
HashAlgo privateKeyHashAlgo
@Optional
@Input
HashAlgo fileDigestsHashAlgo
@Optional
@Input
CompressionType compressionType
Rpm() { Rpm() {
super() super()
// sane defaults // sane defaults
privateKeyHashAlgo = HashAlgo.SHA256
fileDigestsHashAlgo = HashAlgo.MD5
compressionType = CompressionType.GZIP
os = Os.LINUX os = Os.LINUX
arch = Architecture.AMD64 arch = Architecture.AMD64
packageType = PackageType.BINARY packageType = PackageType.BINARY

View file

@ -14,6 +14,7 @@ import org.xbib.rpm.Directory
import org.xbib.rpm.Link import org.xbib.rpm.Link
import org.xbib.rpm.RpmBuilder import org.xbib.rpm.RpmBuilder
import org.xbib.rpm.payload.Directive import org.xbib.rpm.payload.Directive
import java.nio.file.Files import java.nio.file.Files
import java.nio.file.Path import java.nio.file.Path
import java.nio.file.StandardOpenOption import java.nio.file.StandardOpenOption
@ -47,7 +48,7 @@ class RpmCopyAction implements CopyAction {
} }
RpmBuilder createRpm() { 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.setPackage task.packageName, task.packageVersion, task.packageRelease, task.epoch
builder.setType task.packageType builder.setType task.packageType
builder.setPlatform task.arch, task.os builder.setPlatform task.arch, task.os

View file

@ -1,5 +1,5 @@
group = org.xbib.gradle.plugin group = org.xbib.gradle.plugin
name = gradle-plugins name = gradle-plugins
version = 0.0.3 version = 0.0.4
org.gradle.warning.mode = ALL org.gradle.warning.mode = ALL

View file

@ -24,7 +24,7 @@ dependencyResolutionManagement {
library('jflex', 'de.jflex', 'jflex').version('1.9.1') library('jflex', 'de.jflex', 'jflex').version('1.9.1')
library('jacc', 'org.xbib', 'jacc').version('3.0.0') library('jacc', 'org.xbib', 'jacc').version('3.0.0')
library('groovy-git', 'org.xbib.groovy', 'groovy-git').version('2.1.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') plugin('publish', 'com.gradle.plugin-publish').version('1.1.0')
} }
} }