Compare commits
11 Commits
Author | SHA256 | Date | |
---|---|---|---|
c3cfcc8c6b | |||
56bfa21137 | |||
42fa286647 | |||
24d974cd44 | |||
ddcb6716cf | |||
a7aba1eaf8 | |||
f9da7ce151 | |||
1c36d25927 | |||
2f499e31bb | |||
8a74a44173 | |||
856bc5dfd2 |
12
encoding.patch
Normal file
12
encoding.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -urEwbB fop-2.10/fop/build.xml fop-2.10/fop/build.xml
|
||||
--- fop-2.10/fop/build.xml 2024-10-11 13:58:44.468271086 +0200
|
||||
+++ fop-2.10/fop/build.xml 2024-10-11 14:04:37.160704185 +0200
|
||||
@@ -185,7 +186,7 @@
|
||||
<javac fork="${javac.fork}"
|
||||
debug="${javac.debug}"
|
||||
deprecation="${javac.deprecation}"
|
||||
- optimize="${javac.optimize}"
|
||||
+ optimize="${javac.optimize}" encoding="utf-8"
|
||||
source="${javac.source}" target="${javac.target}"/>
|
||||
</presetdef>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
--- fop-2.5/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java 2020-05-05 11:42:05.000000000 +0200
|
||||
+++ fop-2.5/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java 2020-06-03 10:49:58.195555295 +0200
|
||||
diff -urEbwB fop-2.10/fop-events/src/main/java/org/apache/fop/eventtools/EventProducerCollector.java fop-2.10/fop-events/src/main/java/org/apache/fop/eventtools/EventProducerCollector.java
|
||||
--- fop-2.10/fop-events/src/main/java/org/apache/fop/eventtools/EventProducerCollector.java 2024-10-11 13:58:44.578271844 +0200
|
||||
+++ fop-2.10/fop-events/src/main/java/org/apache/fop/eventtools/EventProducerCollector.java 2024-10-11 14:09:42.446141414 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
import java.io.File;
|
BIN
fop-2.10-src.tar.gz
(Stored with Git LFS)
Normal file
BIN
fop-2.10-src.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
fop-2.8-src.tar.gz
(Stored with Git LFS)
BIN
fop-2.8-src.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,227 +1,24 @@
|
||||
--- fop-2.5/fop-core/src/main/java/org/apache/fop/afp/fonts/CharactersetEncoder.java 2020-05-05 11:42:04.000000000 +0200
|
||||
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/afp/fonts/CharactersetEncoder.java 2020-06-03 11:18:04.577537190 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.CharacterCodingException;
|
||||
@@ -68,7 +69,7 @@
|
||||
if (bb.hasArray()) {
|
||||
return getEncodedChars(bb.array(), bb.limit());
|
||||
} else {
|
||||
- bb.rewind();
|
||||
+ ((Buffer)bb).rewind();
|
||||
byte[] bytes = new byte[bb.remaining()];
|
||||
bb.get(bytes);
|
||||
return getEncodedChars(bytes, bytes.length);
|
||||
--- fop-2.5/fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java 2020-05-05 11:42:04.000000000 +0200
|
||||
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java 2020-06-03 11:18:04.581537214 +0200
|
||||
@@ -24,6 +24,7 @@
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -326,7 +327,7 @@
|
||||
throws SAXException {
|
||||
lastAttributes = new AttributesImpl(attributes);
|
||||
Maker maker = makers.get(localName);
|
||||
- content.clear();
|
||||
+ ((Buffer)content).clear();
|
||||
ignoreCharacters = true;
|
||||
if (maker != null) {
|
||||
ignoreCharacters = maker.ignoreCharacters();
|
||||
@@ -357,7 +358,7 @@
|
||||
Maker maker = makers.get(localName);
|
||||
if (maker != null) {
|
||||
maker.endElement();
|
||||
- content.clear();
|
||||
+ ((Buffer)content).clear();
|
||||
}
|
||||
ignoreCharacters = true;
|
||||
} else {
|
||||
@@ -845,7 +846,7 @@
|
||||
boolean reversed = XMLUtil.getAttributeAsBoolean(lastAttributes, "reversed", false);
|
||||
int[][] gposAdjustments
|
||||
= XMLUtil.getAttributeAsPositionAdjustments(lastAttributes, "position-adjust");
|
||||
- content.flip();
|
||||
+ ((Buffer)content).flip();
|
||||
WordArea word = new WordArea(
|
||||
offset, level, content.toString().trim(), letterAdjust,
|
||||
null, gposAdjustments, reversed);
|
||||
@@ -865,7 +866,7 @@
|
||||
int offset = XMLUtil.getAttributeAsInt(lastAttributes, "offset", 0);
|
||||
//TODO the isAdjustable parameter is currently not used/implemented
|
||||
if (content.position() > 0) {
|
||||
- content.flip();
|
||||
+ ((Buffer)content).flip();
|
||||
boolean adjustable = XMLUtil.getAttributeAsBoolean(lastAttributes, "adj", true);
|
||||
int level = XMLUtil.getAttributeAsInt(lastAttributes, "level", -1);
|
||||
SpaceArea space = new SpaceArea(offset, level, content.charAt(0), adjustable);
|
||||
@@ -1254,17 +1255,17 @@
|
||||
// allocate a larger buffer and transfer content
|
||||
CharBuffer newContent
|
||||
= CharBuffer.allocate(this.content.position() + length);
|
||||
- this.content.flip();
|
||||
+ ((Buffer)(this.content)).flip();
|
||||
newContent.put(this.content);
|
||||
this.content = newContent;
|
||||
}
|
||||
// make sure the full capacity is used
|
||||
- this.content.limit(this.content.capacity());
|
||||
+ ((Buffer)(this.content)).limit(this.content.capacity());
|
||||
// add characters to the buffer
|
||||
this.content.put(ch, start, length);
|
||||
// decrease the limit, if necessary
|
||||
if (this.content.position() < this.content.limit()) {
|
||||
- this.content.limit(this.content.position());
|
||||
+ ((Buffer)(this.content)).limit(this.content.position());
|
||||
}
|
||||
}
|
||||
}
|
||||
--- fop-2.5/fop-core/src/main/java/org/apache/fop/fo/FOText.java 2020-05-05 11:42:04.000000000 +0200
|
||||
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/fo/FOText.java 2020-06-03 11:18:04.581537214 +0200
|
||||
@@ -20,6 +20,7 @@
|
||||
package org.apache.fop.fo;
|
||||
|
||||
import java.awt.Color;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
@@ -134,17 +135,17 @@
|
||||
newCapacity = requires;
|
||||
}
|
||||
CharBuffer newBuffer = CharBuffer.allocate(newCapacity);
|
||||
- charBuffer.rewind();
|
||||
+ ((Buffer)charBuffer).rewind();
|
||||
newBuffer.put(charBuffer);
|
||||
charBuffer = newBuffer;
|
||||
}
|
||||
}
|
||||
// extend limit to capacity
|
||||
- charBuffer.limit(charBuffer.capacity());
|
||||
+ ((Buffer)charBuffer).limit(charBuffer.capacity());
|
||||
// append characters
|
||||
charBuffer.put(data, start, length);
|
||||
// shrink limit to position
|
||||
- charBuffer.limit(charBuffer.position());
|
||||
+ ((Buffer)charBuffer).limit(((Buffer)charBuffer).position());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,7 +157,7 @@
|
||||
if (this.charBuffer == null) {
|
||||
return null;
|
||||
}
|
||||
- this.charBuffer.rewind();
|
||||
+ ((Buffer)(this.charBuffer)).rewind();
|
||||
return this.charBuffer.asReadOnlyBuffer().subSequence(0, this.charBuffer.limit());
|
||||
}
|
||||
|
||||
@@ -169,9 +170,9 @@
|
||||
// pointed to is really a different one
|
||||
if (charBuffer != null) {
|
||||
ft.charBuffer = CharBuffer.allocate(charBuffer.limit());
|
||||
- charBuffer.rewind();
|
||||
+ ((Buffer)charBuffer).rewind();
|
||||
ft.charBuffer.put(charBuffer);
|
||||
- ft.charBuffer.rewind();
|
||||
+ ((Buffer)(ft.charBuffer)).rewind();
|
||||
}
|
||||
}
|
||||
ft.prevFOTextThisBlock = null;
|
||||
@@ -203,7 +204,7 @@
|
||||
/** {@inheritDoc} */
|
||||
public void endOfNode() throws FOPException {
|
||||
if (charBuffer != null) {
|
||||
- charBuffer.rewind();
|
||||
+ ((Buffer)charBuffer).rewind();
|
||||
}
|
||||
super.endOfNode();
|
||||
getFOEventHandler().characters(this);
|
||||
@@ -230,7 +231,7 @@
|
||||
}
|
||||
|
||||
char ch;
|
||||
- charBuffer.rewind();
|
||||
+ ((Buffer)charBuffer).rewind();
|
||||
while (charBuffer.hasRemaining()) {
|
||||
ch = charBuffer.get();
|
||||
if (!((ch == CharUtilities.SPACE)
|
||||
@@ -238,7 +239,7 @@
|
||||
|| (ch == CharUtilities.CARRIAGE_RETURN)
|
||||
|| (ch == CharUtilities.TAB))) {
|
||||
// not whitespace
|
||||
- charBuffer.rewind();
|
||||
+ ((Buffer)charBuffer).rewind();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -281,7 +282,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- charBuffer.rewind();
|
||||
+ ((Buffer)charBuffer).rewind();
|
||||
CharBuffer tmp = charBuffer.slice();
|
||||
char c;
|
||||
int lim = charBuffer.limit();
|
||||
@@ -548,19 +549,19 @@
|
||||
public void remove() {
|
||||
|
||||
if (this.canRemove) {
|
||||
- charBuffer.position(currentPosition);
|
||||
+ ((Buffer)charBuffer).position(currentPosition);
|
||||
// Slice the buffer at the current position
|
||||
CharBuffer tmp = charBuffer.slice();
|
||||
// Reset position to before current character
|
||||
- charBuffer.position(--currentPosition);
|
||||
+ ((Buffer)charBuffer).position(--currentPosition);
|
||||
if (tmp.hasRemaining()) {
|
||||
// Transfer any remaining characters
|
||||
- charBuffer.mark();
|
||||
+ ((Buffer)charBuffer).mark();
|
||||
charBuffer.put(tmp);
|
||||
- charBuffer.reset();
|
||||
+ ((Buffer)charBuffer).reset();
|
||||
}
|
||||
// Decrease limit
|
||||
- charBuffer.limit(charBuffer.limit() - 1);
|
||||
+ ((Buffer)charBuffer).limit(((Buffer)charBuffer).limit() - 1);
|
||||
// Make sure following calls fail, unless nextChar() was called
|
||||
this.canRemove = false;
|
||||
} else {
|
||||
@@ -743,7 +744,7 @@
|
||||
*/
|
||||
public void resetBuffer() {
|
||||
if (charBuffer != null) {
|
||||
- charBuffer.rewind();
|
||||
+ ((Buffer)charBuffer).rewind();
|
||||
}
|
||||
}
|
||||
|
||||
--- fop-2.5/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java 2020-05-05 11:42:05.000000000 +0200
|
||||
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java 2020-06-03 11:19:29.182037444 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.io.InputStream;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.util.ArrayList;
|
||||
@@ -731,7 +732,7 @@
|
||||
cb.put(c);
|
||||
}
|
||||
|
||||
- cb.flip();
|
||||
+ ((Buffer)cb).flip();
|
||||
return cb;
|
||||
}
|
||||
|
||||
diff -urEwbB fop-2.10/fop/build.xml fop-2.10/fop/build.xml
|
||||
--- fop-2.10/fop/build.xml 2024-10-11 13:58:44.468271086 +0200
|
||||
+++ fop-2.10/fop/build.xml 2024-10-11 14:04:37.160704185 +0200
|
||||
@@ -94,8 +94,9 @@
|
||||
<property name="javac.debug" value="on"/>
|
||||
<property name="javac.optimize" value="off"/>
|
||||
<property name="javac.deprecation" value="on"/>
|
||||
- <property name="javac.source" value="1.8"/>
|
||||
- <property name="javac.target" value="1.8"/>
|
||||
+ <property name="javac.release" value="8"/>
|
||||
+ <property name="javac.source" value="1.${javac.release}"/>
|
||||
+ <property name="javac.target" value="${javac.source}"/>
|
||||
<property name="javac.fork" value="no"/>
|
||||
<property name="junit.fork" value="yes"/>
|
||||
<property name="junit.haltonfailure" value="off"/>
|
||||
@@ -186,7 +187,7 @@
|
||||
debug="${javac.debug}"
|
||||
deprecation="${javac.deprecation}"
|
||||
optimize="${javac.optimize}" encoding="utf-8"
|
||||
- source="${javac.source}" target="${javac.target}"/>
|
||||
+ release="${javac.release}" source="${javac.source}" target="${javac.target}"/>
|
||||
</presetdef>
|
||||
|
||||
<presetdef name="junit">
|
||||
|
@@ -1,34 +1,153 @@
|
||||
https://github.com/apache/xmlgraphics-fop/pull/65
|
||||
partial fix for
|
||||
https://issues.apache.org/jira/browse/FOP-2854
|
||||
https://github.com/openSUSE/daps/issues/482
|
||||
|
||||
commit 0d3f0f9a473aad6f315fd60cc6ed1447afb791ef
|
||||
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||
Date: Wed Dec 23 13:53:56 2020 +0100
|
||||
|
||||
FOP-2854: Allow to override CreationDate
|
||||
|
||||
Allow to override build date with SOURCE_DATE_EPOCH
|
||||
in order to make builds reproducible.
|
||||
See https://reproducible-builds.org/ for why this is good
|
||||
and https://reproducible-builds.org/specs/source-date-epoch/
|
||||
for the definition of this variable.
|
||||
|
||||
This patch was done while working on reproducible builds for openSUSE.
|
||||
|
||||
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java
|
||||
index 3af9af606..ff708e371 100644
|
||||
--- a/fop-core/src/main/java/org/apache/fop/pdf/FileIDGenerator.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/pdf/FileIDGenerator.java
|
||||
@@ -86,7 +86,9 @@ abstract class FileIDGenerator {
|
||||
|
||||
private void generateFileID() {
|
||||
DateFormat df = new SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS");
|
||||
- digest.update(PDFDocument.encode(df.format(new Date())));
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ Date d = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
+ digest.update(PDFDocument.encode(df.format(d)));
|
||||
// Ignoring the filename here for simplicity even though it's recommended
|
||||
// by the PDF spec
|
||||
digest.update(PDFDocument.encode(String.valueOf(document.getCurrentFileSize())));
|
||||
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFEmbeddedFile.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFEmbeddedFile.java
|
||||
@@ -35,8 +35,10 @@ public class PDFEmbeddedFile extends PDFStream {
|
||||
put("Type", new PDFName("EmbeddedFile"));
|
||||
put("Subtype", new PDFName("application/octet-stream"));
|
||||
PDFDictionary params = new PDFDictionary();
|
||||
- params.put("CreationDate", PDFInfo.formatDateTime(new Date()));
|
||||
- params.put("ModDate", PDFInfo.formatDateTime(new Date()));
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ Date d = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
+ params.put("CreationDate", PDFInfo.formatDateTime(d));
|
||||
+ params.put("ModDate", PDFInfo.formatDateTime(d));
|
||||
put("Params", params);
|
||||
}
|
||||
|
||||
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFInfo.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFInfo.java
|
||||
@@ -251,7 +251,8 @@ public class PDFInfo extends PDFObject {
|
||||
|
||||
// creation date in form (D:YYYYMMDDHHmmSSOHH'mm')
|
||||
if (creationDate == null) {
|
||||
- creationDate = new Date();
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ creationDate = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
}
|
||||
bout.write(encode("/CreationDate "));
|
||||
bout.write(encodeString(formatDateTime(creationDate)));
|
||||
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java
|
||||
@@ -134,7 +134,9 @@ public class PDFMetadata extends PDFStream {
|
||||
@@ -135,7 +135,8 @@ public class PDFMetadata extends PDFStream {
|
||||
|
||||
//Set creation date if not available, yet
|
||||
if (info.getCreationDate() == null) {
|
||||
- Date d = new Date();
|
||||
+ Date d = System.getenv("SOURCE_DATE_EPOCH") == null ?
|
||||
+ new Date() :
|
||||
+ new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ Date d = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
info.setCreationDate(d);
|
||||
}
|
||||
|
||||
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFSignature.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFSignature.java
|
||||
@@ -106,7 +106,9 @@ public class PDFSignature {
|
||||
if (signParams.getReason() != null) {
|
||||
put("Reason", signParams.getReason());
|
||||
}
|
||||
- put("M", PDFInfo.formatDateTime(new Date()));
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ Date d = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
+ put("M", PDFInfo.formatDateTime(d));
|
||||
PDFArray array = new PDFArray();
|
||||
array.add(new SigRef());
|
||||
put("Reference", array);
|
||||
--- a/fop-core/src/main/java/org/apache/fop/render/intermediate/IFRenderer.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/render/intermediate/IFRenderer.java
|
||||
@@ -544,7 +544,9 @@ public class IFRenderer extends AbstractPathOrientedRenderer {
|
||||
} else {
|
||||
xmpBasic.setCreatorTool(Version.getVersion());
|
||||
}
|
||||
- xmpBasic.setMetadataDate(new java.util.Date());
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ java.util.Date d = (sde == null) ? new java.util.Date() : new java.util.Date(1000 * Long.parseLong(sde));
|
||||
+ xmpBasic.setMetadataDate(d);
|
||||
if (getUserAgent().getCreationDate() != null) {
|
||||
xmpBasic.setCreateDate(getUserAgent().getCreationDate());
|
||||
} else {
|
||||
--- a/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/render/pdf/PDFRenderingUtil.java
|
||||
@@ -262,7 +262,9 @@ class PDFRenderingUtil {
|
||||
fopXMP.mergeInto(docXMP, exclude);
|
||||
XMPBasicAdapter xmpBasic = XMPBasicSchema.getAdapter(docXMP);
|
||||
//Metadata was changed so update metadata date
|
||||
- xmpBasic.setMetadataDate(new java.util.Date());
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ java.util.Date d = (sde == null) ? new java.util.Date() : new java.util.Date(1000 * Long.parseLong(sde));
|
||||
+ xmpBasic.setMetadataDate(d);
|
||||
PDFMetadata.updateInfoFromMetadata(docXMP, pdfDoc.getInfo());
|
||||
|
||||
PDFMetadata pdfMetadata = pdfDoc.getFactory().makeMetadata(
|
||||
@@ -481,7 +483,9 @@ class PDFRenderingUtil {
|
||||
augmentDictionary((PDFDictionary)currentPage.get("DPart"), extension);
|
||||
}
|
||||
} else if (type == PDFDictionaryType.PagePiece) {
|
||||
- String date = DateFormatUtil.formatPDFDate(new Date(), TimeZone.getDefault());
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ Date dd = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
+ String date = DateFormatUtil.formatPDFDate(dd, TimeZone.getDefault());
|
||||
if (currentPage.get("PieceInfo") == null) {
|
||||
currentPage.put("PieceInfo", new PDFDictionary());
|
||||
currentPage.put("LastModified", date);
|
||||
--- a/fop-core/src/main/java/org/apache/fop/render/ps/PSDocumentHandler.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/render/ps/PSDocumentHandler.java
|
||||
@@ -211,7 +211,9 @@ public class PSDocumentHandler extends AbstractBinaryWritingIFDocumentHandler {
|
||||
//PostScript Header
|
||||
gen.writeln(DSCConstants.PS_ADOBE_30);
|
||||
gen.writeDSCComment(DSCConstants.CREATOR, new String[] {getUserAgent().getProducer()});
|
||||
- gen.writeDSCComment(DSCConstants.CREATION_DATE, new Object[] {new java.util.Date()});
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ java.util.Date d = (sde == null) ? new java.util.Date() : new java.util.Date(1000 * Long.parseLong(sde));
|
||||
+ gen.writeDSCComment(DSCConstants.CREATION_DATE, new Object[] {d});
|
||||
gen.writeDSCComment(DSCConstants.LANGUAGE_LEVEL, gen.getPSLevel());
|
||||
gen.writeDSCComment(DSCConstants.PAGES, new Object[] {DSCConstants.ATEND});
|
||||
gen.writeDSCComment(DSCConstants.BBOX, DSCConstants.ATEND);
|
||||
--- a/fop-core/src/main/java/org/apache/fop/tools/anttasks/FileCompare.java
|
||||
+++ b/fop-core/src/main/java/org/apache/fop/tools/anttasks/FileCompare.java
|
||||
@@ -149,8 +149,10 @@ public class FileCompare {
|
||||
}
|
||||
|
||||
private void writeHeader(PrintWriter results) {
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ Date d = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
String dateTime = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,
|
||||
- DateFormat.MEDIUM).format(new Date());
|
||||
+ DateFormat.MEDIUM).format(d);
|
||||
results.println("<html><head><title>Test Results</title></head><body>\n");
|
||||
results.println("<h2>Compare Results<br>");
|
||||
results.println("<font size='1'>created " + dateTime
|
||||
--- a/fop-core/src/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java
|
||||
+++ b/fop-core/src/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java
|
||||
@@ -82,7 +82,8 @@ abstract class TestDocument {
|
||||
para.newLineBreak();
|
||||
para.newText("generated by class " + getClass().getName());
|
||||
para.newLineBreak();
|
||||
- para.newText("generated on " + new Date());
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ para.newText("generated on " + (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde)));
|
||||
para.close();
|
||||
}
|
||||
}
|
||||
--- a/fop/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
|
||||
+++ b/fop/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
|
||||
@@ -129,7 +129,8 @@ public class SimplePlanDrawer implements PlanDrawer {
|
||||
}
|
||||
|
||||
protected void addPlan(Document doc, Element svgRoot, EventList data) {
|
||||
- Date currentDate = new Date();
|
||||
+ String sde = System.getenv("SOURCE_DATE_EPOCH");
|
||||
+ Date currentDate = (sde == null) ? new Date() : new Date(1000 * Long.parseLong(sde));
|
||||
|
||||
Date lastWeek = startDate;
|
||||
Date future = endDate;
|
||||
|
@@ -1,15 +1,15 @@
|
||||
--- fop-2.5/fop-core/src/main/java/org/apache/fop/cli/Main.java
|
||||
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/cli/Main.java
|
||||
@@ -210,11 +210,7 @@
|
||||
diff -urEwbB fop-2.10/fop-core/src/main/java/org/apache/fop/cli/Main.java fop-2.10/fop-core/src/main/java/org/apache/fop/cli/Main.java
|
||||
--- fop-2.10/fop-core/src/main/java/org/apache/fop/cli/Main.java 2024-10-11 13:58:44.478271155 +0200
|
||||
+++ fop-2.10/fop-core/src/main/java/org/apache/fop/cli/Main.java 2024-10-11 13:59:33.158606975 +0200
|
||||
@@ -207,11 +207,7 @@
|
||||
* @param args the command line parameters
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
- if (checkDependencies()) {
|
||||
- startFOP(args);
|
||||
startFOP(args);
|
||||
- } else {
|
||||
- startFOPWithDynamicClasspath(args);
|
||||
- }
|
||||
+ startFOP(args);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
|
@@ -1,3 +1,105 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 5 17:50:56 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Modified patch:
|
||||
* reproducible.patch
|
||||
+ more use of SOURCE_DATE_EPOCH instead of current time to make
|
||||
xmlgraphics-fop generate reproducible documents
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 12 16:27:41 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- version 2.10
|
||||
* fixes XXE vulnerability bsc#1231428, CVE-2024-28168
|
||||
* Changes of 2.10
|
||||
+ FOP-2764: footnote-body ignores rl-tb writing mode
|
||||
+ FOP-3135: SVG tspan content is displayed out of place
|
||||
+ FOP-3144: Add new schema to handle pdf/a and pdfa/ua
|
||||
+ FOP-3146: Correct fop version at runtime
|
||||
+ FOP-3148: NoSuchElementException when using font with no
|
||||
family name
|
||||
+ FOP-3150: Resolve classpath for binary distribution
|
||||
+ FOP-3158: Switch to spotbugs
|
||||
+ FOP-3159: Set an automatic module name
|
||||
+ FOP-3160: Rename packages to avoid conflicts with modules
|
||||
+ FOP-3161: Resize table only for multicolumn page
|
||||
+ FOP-3162: Missing jars in servlet
|
||||
+ FOP-3163: Optimise performance of PNG with alpha using raw
|
||||
loader
|
||||
+ FOP-3164: basic-link not navigating to corresponding footnote
|
||||
+ FOP-3166: Add option to sign PDF
|
||||
+ FOP-3168: Add secure processing for XSL input
|
||||
+ FOP-3174: Allow sections which need security permissions to
|
||||
be run when AllPermission denied in caller code
|
||||
+ FOP-3176: Remove unused PDFStructElem
|
||||
+ FOP-3177: Remove space generated by fo:wrapper
|
||||
+ FOP-3178: Reset content length for table changing ipd
|
||||
+ FOP-3182: Add alt text to PDF signature
|
||||
+ FOP-3184: Allow change of resource level for SVG in AFP
|
||||
+ FOP-3185: Exclude shape not in clipping path for AFP
|
||||
+ FOP-3186: Only support 1 column for redo of layout without
|
||||
page pos only
|
||||
+ FOP-3188: Switch to Jakarta servlet API
|
||||
+ FOP-3190: NPE when list item is split alongside an ipd change
|
||||
+ FOP-3191: Add mandatory MODCA triplet to AFP
|
||||
+ FOP-3192: Redo layout for multipage columns
|
||||
+ FOP-3194: Add image mask option for AFP
|
||||
+ FOP-3195: Skip written block ipds inside float
|
||||
+ FOP-3198: Allow curly braces for src url
|
||||
+ FOP-3204: Missing content for last page with change ipd
|
||||
+ FOP-3207: Add warning when different pdf languages are used
|
||||
+ FOP-3208: Only restart line manager when there is a linebreak
|
||||
for blocklayout
|
||||
* Changes of 2.9
|
||||
+ FOP-1722: Values in PDF Number Trees must be indirect
|
||||
references
|
||||
+ FOP-2903: Do not delete files on syntax errors using command
|
||||
line
|
||||
+ FOP-2920: Surrogate pair edge-case causes Exception
|
||||
+ FOP-2985: Reset character spacing
|
||||
+ FOP-3042: SVG text containing certain glyphs isn't rendered
|
||||
+ FOP-3088: Remove duplicate classes from maven classpath
|
||||
+ FOP-3090: Allow use of page position only on redo of layout
|
||||
+ FOP-3098: Failure to render multi-block itemBody alongside
|
||||
float
|
||||
+ FOP-3107: Update to PDFBox 2.0.27
|
||||
+ FOP-3110: NPE if link destination is missing with
|
||||
accessibility
|
||||
+ FOP-3111: Make property cache thread safe
|
||||
+ FOP-3114: Font size was rounded to 0 for AFP TTF
|
||||
+ FOP-3115: Cannot process a SVG using mvn jars
|
||||
+ FOP-3116: Remove serializer jar
|
||||
+ FOP-3117: Allow creating a PDF 2.0 document
|
||||
+ FOP-3118: Text missing after page break inside table inline
|
||||
+ FOP-3120: IllegalArgumentException for list in a table
|
||||
+ FOP-3121: Table width may be too wide when layout width
|
||||
changes
|
||||
+ FOP-3125: NPE when using broken link and PDF 1.5
|
||||
+ FOP-3127: Allow XMP at PDF page level
|
||||
+ FOP-3129: Symbol font was not being mapped to unicode
|
||||
+ FOP-3130: Correct font differences table for Chrome
|
||||
+ FOP-3132: Link against Java 8 API
|
||||
+ FOP-3139: Add support for
|
||||
font-selection-strategy=character-by-character
|
||||
+ FOP-3140: Merge form fields in external PDFs
|
||||
+ XGC-133: Fix test for Java 11
|
||||
- Modified patches:
|
||||
* java8-compatibility.patch
|
||||
+ approach problem differently and use release in ant javac task
|
||||
* xmlgraphics-fop-cli.patch
|
||||
* fop-2.5-QDox-2.0.patch -> fop-2.10-QDox-2.0.patch
|
||||
+ rediff
|
||||
- Added patches:
|
||||
* encoding.patch
|
||||
+ specify encoding utf-8 to fix build with some versions of JDK
|
||||
- Adapt the scripts to the fact that javapackages-tools do not
|
||||
require the JAVA_HOME to be set any more
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 3 10:53:25 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Adapt the scripts to the new javapackages-tools version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 13:22:12 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package xmlgraphics-fop
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2000-2008, JPackage Project
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
%define bname fop
|
||||
Name: xmlgraphics-fop
|
||||
Version: 2.8
|
||||
Version: 2.10
|
||||
Release: 0
|
||||
Summary: Formatter for Printing XSLT Processed XML Files
|
||||
License: Apache-2.0
|
||||
@@ -38,25 +38,29 @@ Source12: %{name}-fontlist.xml
|
||||
Patch1: xmlgraphics-fop-cli.patch
|
||||
Patch2: hyphenation-more-stack.patch
|
||||
Patch3: fix-javadoc-java8.patch
|
||||
Patch4: java8-compatibility.patch
|
||||
Patch4: encoding.patch
|
||||
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- boo#1110024
|
||||
Patch5: reproducible-build-manifest.patch
|
||||
Patch6: fop-2.5-QDox-2.0.patch
|
||||
Patch6: fop-2.10-QDox-2.0.patch
|
||||
Patch7: reproducible.patch
|
||||
Patch8: java8-compatibility.patch
|
||||
BuildRequires: ant >= 1.9.15
|
||||
BuildRequires: apache-pdfbox >= 2.0.23
|
||||
BuildRequires: bouncycastle
|
||||
BuildRequires: bouncycastle-pkix
|
||||
BuildRequires: bouncycastle-util
|
||||
BuildRequires: commons-io >= 2.4
|
||||
BuildRequires: commons-logging
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: glassfish-servlet-api
|
||||
BuildRequires: jakarta-servlet
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: javapackages-local >= 6
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: qdox >= 2.0
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xml-commons-apis
|
||||
BuildRequires: xmlgraphics-batik >= 1.14
|
||||
BuildRequires: xmlgraphics-commons >= 2.6
|
||||
BuildRequires: xmlgraphics-batik >= 1.18
|
||||
BuildRequires: xmlgraphics-commons >= 2.10
|
||||
#!BuildIgnore: saxon
|
||||
Requires: java >= 1.8
|
||||
Requires: xml-commons-apis
|
||||
@@ -83,6 +87,9 @@ find -name "*.jar" | xargs -t rm
|
||||
%patch -P 5 -p1
|
||||
%patch -P 6 -p1
|
||||
%patch -P 7 -p1
|
||||
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
|
||||
%patch -P 8 -p1
|
||||
%endif
|
||||
|
||||
# Replace keyword "VERSION" in XML files with the real one:
|
||||
for x in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
|
||||
@@ -113,19 +120,22 @@ done
|
||||
|
||||
%build
|
||||
build-jar-repository -s fop/lib \
|
||||
bcpkix \
|
||||
bcprov \
|
||||
bcutil \
|
||||
commons-io \
|
||||
commons-logging \
|
||||
fontbox \
|
||||
glassfish-servlet-api \
|
||||
jakarta-servlet/jakarta.servlet-api \
|
||||
batik-all \
|
||||
xml-commons-apis \
|
||||
xml-commons-apis-ext \
|
||||
xmlgraphics-commons \
|
||||
qdox
|
||||
|
||||
export CLASSPATH= LANG=en_US.UTF-8
|
||||
%{ant} -f fop/build.xml \
|
||||
-Djavac.source=1.8 -Djavac.target=1.8 \
|
||||
ant \
|
||||
-f fop/build.xml \
|
||||
-Ddev=true \
|
||||
package
|
||||
|
||||
# Build the manpage(s) and HTML
|
||||
|
Reference in New Issue
Block a user