Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Feb 21, 2024
1 parent e481c63 commit 3b262eb
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ protected void testInit() throws IOException {
this.signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(this.privateKey.getPublicKeyPacket().getAlgorithm(), this.digestAlgorithm));
this.signatureGenerator.init(PGPSignature.BINARY_DOCUMENT, this.privateKey);

this.armoredOutput = new ArmoredOutputStream(this.stream);
final ArmoredOutputStream.Builder builder = ArmoredOutputStream.builder();
if (this.version != null) {
this.armoredOutput.setHeader("Version", this.version);
builder.setVersion(this.version);
}

this.armoredOutput = builder.build(this.stream);

if (this.inline) {
this.armoredOutput.beginClearText(this.digestAlgorithm);
}
Expand Down
6 changes: 5 additions & 1 deletion deb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -51,4 +55,4 @@
</plugins>
</build>

</project>
</project>
2 changes: 1 addition & 1 deletion deb/src/main/java/org/eclipse/packager/deb/Packages.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static Map<String, String> parseControlFile(final File packageFile) throw
}
try (final TarArchiveInputStream inputStream = new TarArchiveInputStream(new GZIPInputStream(in))) {
TarArchiveEntry te;
while ((te = inputStream.getNextTarEntry()) != null) {
while ((te = inputStream.getNextEntry()) != null) {
String name = te.getName();
if (name.startsWith("./")) {
name = name.substring(2);
Expand Down
20 changes: 13 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<java.release>8</java.release>
<java.source>1.8</java.source>
<java.release>11</java.release>
<java.source>11</java.source>

<bouncycastle.version>1.71</bouncycastle.version>
<commons-compress.version>1.21</commons-compress.version>
<guava.version>31.1-jre</guava.version>
<bouncycastle.version>1.77</bouncycastle.version>
<commons-compress.version>1.26.0</commons-compress.version>
<commons-codec.version>1.16.1</commons-codec.version>
<guava.version>33.0.0-jre</guava.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<logback.version>1.2.11</logback.version>
<slf4j.version>1.7.36</slf4j.version>
<logback.version>1.5.0</logback.version>
<slf4j.version>2.0.12</slf4j.version>
<xz.version>1.9</xz.version>

<mavenVersion>3.2.5</mavenVersion>
Expand Down Expand Up @@ -139,6 +140,11 @@
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion rpm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<!-- show log output during tests using logback as the slfj backend. -->
<!-- show log output during tests using logback as the slf4j backend. -->
<!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
2 changes: 1 addition & 1 deletion rpm/src/main/java/org/eclipse/packager/rpm/app/Dumper.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static void dumpAll(final RpmInputStream in) throws IOException {
if (!SKIP_PAYLOAD) {
final CpioArchiveInputStream cpio = in.getCpioStream();
CpioArchiveEntry entry;
while ((entry = cpio.getNextCPIOEntry()) != null) {
while ((entry = cpio.getNextEntry()) != null) {
dumpEntry(entry);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -81,7 +82,7 @@ public static RpmInformation makeInformation(final RpmInputStream in) throws IOE
changes.add(new RpmInformation.Changelog(ts[i], authors[i], texts[i]));
}

Collections.sort(changes, (o1, o2) -> Long.compare(o1.getTimestamp(), o2.getTimestamp()));
Collections.sort(changes, Comparator.comparingLong(RpmInformation.Changelog::getTimestamp));

result.setChangelog(changes);
}
Expand All @@ -97,7 +98,7 @@ public static RpmInformation makeInformation(final RpmInputStream in) throws IOE

final CpioArchiveInputStream cpio = in.getCpioStream();
CpioArchiveEntry cpioEntry;
while ((cpioEntry = cpio.getNextCPIOEntry()) != null) {
while ((cpioEntry = cpio.getNextEntry()) != null) {
final String name = normalize(cpioEntry.getName());

if (cpioEntry.isRegularFile()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.compress.utils.IOUtils;
import org.apache.commons.io.IOUtils;
import org.bouncycastle.bcpg.ArmoredInputStream;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPPrivateKey;
Expand Down Expand Up @@ -114,7 +114,7 @@ public static void perform(File rpm, InputStream privateKeyIn, String passphrase

// Write to the OutputStream
try (FileInputStream in = new FileInputStream(rpm)) {
IOUtils.copyRange(in, leadLength, out);
IOUtils.copyLarge(in, out, 0, leadLength);
IOUtils.skip(in, signatureHeaderLength);
out.write(signatureHeader);
IOUtils.copy(in, out);
Expand Down

0 comments on commit 3b262eb

Please sign in to comment.