From 1154f67f4108dc8119246852799b7c02defb5f16 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 17 2022 10:07:48 +0000 Subject: import poppler-21.01.0-12.el9 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..06ab010 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/poppler-21.01.0.tar.xz +SOURCES/poppler-test-2021-06-14.tar.xz diff --git a/.poppler.metadata b/.poppler.metadata new file mode 100644 index 0000000..5b0a25b --- /dev/null +++ b/.poppler.metadata @@ -0,0 +1,2 @@ +692697b218efd08ebaeb4ff96861a4d2ad20bdc2 SOURCES/poppler-21.01.0.tar.xz +bd4b27622506278016668f7c5037f9e47a41abfb SOURCES/poppler-test-2021-06-14.tar.xz diff --git a/SOURCES/poppler-0.30.0-rotated-words-selection.patch b/SOURCES/poppler-0.30.0-rotated-words-selection.patch new file mode 100644 index 0000000..98230f9 --- /dev/null +++ b/SOURCES/poppler-0.30.0-rotated-words-selection.patch @@ -0,0 +1,279 @@ +From 0ab1f29d4ce315b0fca260c0e0f3007024d00342 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: Tue, 28 Jan 2014 15:13:24 +0100 +Subject: [PATCH] TextOutputDev: Respect orientation when selecting words + +Take rotation into account when visiting selection. +This doesn't fix all problems (there are still problems +on line and block levels). + +https://bugs.freedesktop.org/show_bug.cgi?id=16619 +--- + poppler/TextOutputDev.cc | 193 ++++++++++++++++++++++++++++++++++++----------- + 1 file changed, 150 insertions(+), 43 deletions(-) + +diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc +index 7c2ca78..e93908c 100644 +--- a/poppler/TextOutputDev.cc ++++ b/poppler/TextOutputDev.cc +@@ -178,6 +178,12 @@ + // to read the underlying image. Issue #157 + #define glyphlessSelectionOpacity 0.4 + ++// Returns whether x is between a and b or equal to a or b. ++// a and b don't need to be sorted. ++#define XBetweenAB(x,a,b) (!(((x) > (a) && (x) > (b)) || \ ++ ((x) < (a) && (x) < (b))) ? \ ++ true : false) ++ + namespace { + + inline bool isAscii7(Unicode uchar) +@@ -4411,11 +4417,37 @@ void TextSelectionSizer::visitLine (TextLine *line, + PDFRectangle *rect; + double x1, y1, x2, y2, margin; + +- margin = (line->yMax - line->yMin) / 8; +- x1 = line->edge[edge_begin]; +- y1 = line->yMin - margin; +- x2 = line->edge[edge_end]; +- y2 = line->yMax + margin; ++ switch (line->rot) { ++ default: ++ case 0: ++ margin = (line->yMax - line->yMin) / 8; ++ x1 = line->edge[edge_begin]; ++ x2 = line->edge[edge_end]; ++ y1 = line->yMin - margin; ++ y2 = line->yMax + margin; ++ break; ++ case 1: ++ margin = (line->xMax - line->xMin) / 8; ++ x1 = line->xMin - margin; ++ x2 = line->xMax + margin; ++ y1 = line->edge[edge_begin]; ++ y2 = line->edge[edge_end]; ++ break; ++ case 2: ++ margin = (line->yMax - line->yMin) / 8; ++ x1 = line->edge[edge_end]; ++ x2 = line->edge[edge_begin]; ++ y1 = line->yMin - margin; ++ y2 = line->yMax + margin; ++ break; ++ case 3: ++ margin = (line->xMax - line->xMin) / 8; ++ x1 = line->xMin - margin; ++ x2 = line->xMax + margin; ++ y1 = line->edge[edge_end]; ++ y2 = line->edge[edge_begin]; ++ break; ++ } + + rect = new PDFRectangle(floor(x1 * scale), floor(y1 * scale), ceil(x2 * scale), ceil(y2 * scale)); + list->push_back(rect); +@@ -4499,19 +4531,56 @@ void TextSelectionPainter::visitLine (TextLine *line, + { + double x1, y1, x2, y2, margin; + +- margin = (line->yMax - line->yMin) / 8; +- x1 = floor(line->edge[edge_begin]); +- y1 = floor(line->yMin - margin); +- x2 = ceil(line->edge[edge_end]); +- y2 = ceil(line->yMax + margin); ++ switch (line->rot) { ++ default: ++ case 0: ++ margin = (line->yMax - line->yMin) / 8; ++ x1 = line->edge[edge_begin]; ++ x2 = line->edge[edge_end]; ++ y1 = line->yMin - margin; ++ y2 = line->yMax + margin; ++ break; ++ case 1: ++ margin = (line->xMax - line->xMin) / 8; ++ x1 = line->xMin - margin; ++ x2 = line->xMax + margin; ++ y1 = line->edge[edge_begin]; ++ y2 = line->edge[edge_end]; ++ break; ++ case 2: ++ margin = (line->yMax - line->yMin) / 8; ++ x1 = line->edge[edge_end]; ++ x2 = line->edge[edge_begin]; ++ y1 = line->yMin - margin; ++ y2 = line->yMax + margin; ++ break; ++ case 3: ++ margin = (line->xMax - line->xMin) / 8; ++ x1 = line->xMin - margin; ++ x2 = line->xMax + margin; ++ y1 = line->edge[edge_end]; ++ y2 = line->edge[edge_begin]; ++ break; ++ } ++ ++ ctm.transform(x1, y1, &x1, &y1); ++ ctm.transform(x2, y2, &x2, &y2); + +- ctm.transform(line->edge[edge_begin], line->yMin - margin, &x1, &y1); +- ctm.transform(line->edge[edge_end], line->yMax + margin, &x2, &y2); ++ if (x1 < x2) { ++ x1 = floor(x1); ++ x2 = ceil(x2); ++ } else { ++ x1 = ceil(x1); ++ x2 = floor(x2); ++ } + +- x1 = floor(x1); +- y1 = floor(y1); +- x2 = ceil(x2); +- y2 = ceil(y2); ++ if (y1 < y2) { ++ y1 = floor(y1); ++ y2 = ceil(y2); ++ } else { ++ y1 = ceil(y1); ++ y2 = floor(y2); ++ } + + ictm.transform(x1, y1, &x1, &y1); + ictm.transform(x2, y2, &x2, &y2); +@@ -4589,17 +4658,26 @@ void TextWord::visitSelection(TextSelectionVisitor *visitor, + void TextWord::visitSelection(TextSelectionVisitor *visitor, const PDFRectangle *selection, SelectionStyle style) + { + int i, begin, end; +- double mid; ++ double mid, s1, s2; ++ ++ if (rot == 0 || rot == 2) { ++ s1 = selection->x1; ++ s2 = selection->x2; ++ } else { ++ s1 = selection->y1; ++ s2 = selection->y2; ++ } + + begin = len; + end = 0; + for (i = 0; i < len; i++) { + mid = (edge[i] + edge[i + 1]) / 2; +- if (selection->x1 < mid || selection->x2 < mid) +- if (i < begin) +- begin = i; +- if (mid < selection->x1 || mid < selection->x2) +- end = i + 1; ++ if (XBetweenAB (mid, s1, s2)) { ++ if (i < begin) ++ begin = i; ++ ++ end = i + 1; ++ } + } + + /* Skip empty selection. */ +@@ -4615,26 +4694,41 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor, + TextWord *p, *begin, *end, *current; + int i, edge_begin, edge_end; + PDFRectangle child_selection; ++ double s1, s2, p_min, p_max; ++ ++ if (rot == 0 || rot == 2) { ++ s1 = selection->x1; ++ s2 = selection->x2; ++ } else { ++ s1 = selection->y1; ++ s2 = selection->y2; ++ } + + begin = nullptr; + end = nullptr; + current = nullptr; + for (p = words; p != nullptr; p = p->next) { ++ if (rot == 0 || rot == 2) { ++ p_min = p->xMin; ++ p_max = p->xMax; ++ } else { ++ p_min = p->yMin; ++ p_max = p->yMax; ++ } ++ + if (blk->page->primaryLR) { +- if ((selection->x1 < p->xMax) || (selection->x2 < p->xMax)) +- if (begin == nullptr) +- begin = p; ++ if (((s1 < p_max) || (s2 < p_max)) && begin == nullptr) ++ begin = p; + +- if (((selection->x1 > p->xMin) || (selection->x2 > p->xMin)) && (begin != nullptr)) { ++ if (((s1 > p_min) || (s2 > p_min)) && begin != nullptr) { + end = p->next; + current = p; + } + } else { +- if ((selection->x1 > p->xMin) || (selection->x2 > p->xMin)) +- if (begin == nullptr) +- begin = p; ++ if (((s1 > p_min) || (s2 > p_min)) && begin == nullptr) ++ begin = p; + +- if (((selection->x1 < p->xMax) || (selection->x2 < p->xMax)) && (begin != nullptr)) { ++ if (((s1 < p_max) || (s2 < p_max)) && begin != nullptr) { + end = p->next; + current = p; + } +@@ -4650,23 +4740,41 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor, + + child_selection = *selection; + if (style == selectionStyleWord) { +- child_selection.x1 = begin ? begin->xMin : xMin; +- if (end && end->xMax != -1) { +- child_selection.x2 = current->xMax; ++ if (rot == 0 || rot == 2) { ++ child_selection.x1 = begin ? begin->xMin : xMin; ++ if (end && end->xMax != -1) { ++ child_selection.x2 = current->xMax; ++ } else { ++ child_selection.x2 = xMax; ++ } + } else { +- child_selection.x2 = xMax; ++ child_selection.y1 = begin ? begin->yMin : yMin; ++ if (end && end->yMax != -1) { ++ child_selection.y2 = current->yMax; ++ } else { ++ child_selection.y2 = yMax; ++ } + } + } + ++ if (rot == 0 || rot == 2) { ++ s1 = child_selection.x1; ++ s2 = child_selection.x2; ++ } else { ++ s1 = child_selection.y1; ++ s2 = child_selection.y2; ++ } ++ + edge_begin = len; + edge_end = 0; + for (i = 0; i < len; i++) { + double mid = (edge[i] + edge[i + 1]) / 2; +- if (child_selection.x1 < mid || child_selection.x2 < mid) +- if (i < edge_begin) +- edge_begin = i; +- if (mid < child_selection.x2 || mid < child_selection.x1) +- edge_end = i + 1; ++ if (XBetweenAB (mid, s1, s2)) { ++ if (i < edge_begin) ++ edge_begin = i; ++ ++ edge_end = i + 1; ++ } + } + + /* Skip empty selection. */ +-- +1.8.4.2 + diff --git a/SOURCES/poppler-0.90.0-position-independent-code.patch b/SOURCES/poppler-0.90.0-position-independent-code.patch new file mode 100644 index 0000000..3d385fd --- /dev/null +++ b/SOURCES/poppler-0.90.0-position-independent-code.patch @@ -0,0 +1,12 @@ +--- poppler-0.90.0/CMakeLists.txt ++++ poppler-0.90.0/CMakeLists.txt +@@ -17,6 +17,9 @@ else() + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + find_package(Threads) + endif() ++ ++set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++ + include(TestBigEndian) + test_big_endian(WORDS_BIGENDIAN) + include(CheckFileOffsetBits) diff --git a/SOURCES/poppler-21.01.0-covscan.patch b/SOURCES/poppler-21.01.0-covscan.patch new file mode 100644 index 0000000..0e77616 --- /dev/null +++ b/SOURCES/poppler-21.01.0-covscan.patch @@ -0,0 +1,439 @@ +--- poppler/glib/poppler-document.cc ++++ poppler/glib/poppler-document.cc +@@ -869,12 +869,12 @@ GTree *poppler_document_create_dests_tre + // Iterate from name-dict + const int nDests = catalog->numDests(); + for (i = 0; i < nDests; ++i) { +- // The names of name-dict cannot contain \0, +- // so we can use strlen(). +- auto name = catalog->getDestsName(i); +- key = poppler_named_dest_from_bytestring(reinterpret_cast(name), strlen(name)); + std::unique_ptr link_dest = catalog->getDestsDest(i); + if (link_dest) { ++ // The names of name-dict cannot contain \0, ++ // so we can use strlen(). ++ auto name = catalog->getDestsName(i); ++ key = poppler_named_dest_from_bytestring(reinterpret_cast(name), strlen(name)); + dest = _poppler_dest_new_goto(document, link_dest.get()); + g_tree_insert(tree, key, dest); + } +@@ -883,10 +883,10 @@ GTree *poppler_document_create_dests_tre + // Iterate form name-tree + const int nDestsNameTree = catalog->numDestNameTree(); + for (i = 0; i < nDestsNameTree; ++i) { +- auto name = catalog->getDestNameTreeName(i); +- key = poppler_named_dest_from_bytestring(reinterpret_cast(name->c_str()), name->getLength()); + std::unique_ptr link_dest = catalog->getDestNameTreeDest(i); + if (link_dest) { ++ auto name = catalog->getDestNameTreeName(i); ++ key = poppler_named_dest_from_bytestring(reinterpret_cast(name->c_str()), name->getLength()); + dest = _poppler_dest_new_goto(document, link_dest.get()); + g_tree_insert(tree, key, dest); + } +@@ -3405,6 +3405,7 @@ PopplerFormField *poppler_document_get_f + unsigned fieldNum; + FormPageWidgets *widgets; + FormWidget *field; ++ PopplerFormField *formField; + + FormWidget::decodeID(id, &pageNum, &fieldNum); + +@@ -3417,8 +3418,14 @@ PopplerFormField *poppler_document_get_f + return nullptr; + + field = widgets->getWidget(fieldNum); +- if (field) +- return _poppler_form_field_new(document, field); ++ if (field) { ++ formField = _poppler_form_field_new(document, field); ++ delete widgets; ++ ++ return formField; ++ } ++ ++ delete widgets; + + return nullptr; + } +--- poppler-21.01.0/glib/poppler-page.cc ++++ poppler-21.01.0/glib/poppler-page.cc +@@ -1530,15 +1530,18 @@ void poppler_page_add_annot(PopplerPage + * first remove cropbox of the prior page before adding cropbox of the new page later */ + quads = new_quads_from_offset_cropbox(crop_box, annot_markup->getQuadrilaterals(), FALSE); + annot_markup->setQuadrilaterals(quads); ++ delete quads; + } + if (page_is_rotated) { + /* Quadrilateral's coords need to be saved un-rotated (same as rect coords) */ + quads = _page_new_quads_unrotated(page->page, annot_markup->getQuadrilaterals()); + annot_markup->setQuadrilaterals(quads); ++ delete quads; + } + /* Add to annot's quadrilaterals the offset for the cropbox of the new page */ + quads = new_quads_from_offset_cropbox(page_crop_box, annot_markup->getQuadrilaterals(), TRUE); + annot_markup->setQuadrilaterals(quads); ++ delete quads; + } + + page->page->addAnnot(annot->annot); +--- poppler-21.01.0/glib/poppler-structure-element.cc ++++ poppler-21.01.0/glib/poppler-structure-element.cc +@@ -1090,6 +1090,8 @@ static inline void convert_doubles_array + for (guint i = 0; i < *n_values; i++) { + doubles[i] = object->arrayGet(i).getNum(); + } ++ ++ values = &doubles; + } + + static inline void convert_color(Object *object, PopplerColor *color) +--- poppler-21.01.0/poppler/Form.cc ++++ poppler-21.01.0/poppler/Form.cc +@@ -549,6 +549,7 @@ bool FormWidgetSignature::signDocument(c + GooString *fname = new GooString(saveFilename); + if (doc->saveAs(fname, writeForceIncremental) != errNone) { + fprintf(stderr, "signDocument: error saving to file \"%s\"\n", saveFilename); ++ delete fname; + return false; + } + +@@ -563,6 +564,8 @@ bool FormWidgetSignature::signDocument(c + FILE *file = openFile(saveFilename, "r+b"); + if (!updateOffsets(file, objStart, objEnd, &sigStart, &sigEnd, &fileSize)) { + fprintf(stderr, "signDocument: unable update byte range\n"); ++ delete fname; ++ fclose(file); + return false; + } + +@@ -574,15 +577,21 @@ bool FormWidgetSignature::signDocument(c + // and sign it + const std::unique_ptr signature = sigHandler.signDetached(password); +- if (!signature) ++ if (!signature) { ++ delete fname; ++ fclose(file); + return false; ++ } + + // write signature to saved file + if (!updateSignature(file, sigStart, sigEnd, signature.get())) { + fprintf(stderr, "signDocument: unable update signature\n"); ++ delete fname; ++ fclose(file); + return false; + } + signatureField->setSignature(*signature); + ++ delete fname; + fclose(file); + + return true; +@@ -662,22 +670,30 @@ bool FormWidgetSignature::updateOffsets( + } + } + +- if (*sigStart == -1 || *sigEnd == -1) ++ if (*sigStart == -1 || *sigEnd == -1) { ++ free(buf); + return false; ++ } + + // Search for ByteRange array and update offsets + for (int i = 0; i < bufSize - 10; i++) { + if (buf[i] == '/' && strncmp(&buf[i], "/ByteRange", 10) == 0) { + // update range + char *p = setNextOffset(&buf[i], *sigStart); +- if (!p) ++ if (!p) { ++ free(buf); + return false; ++ } + p = setNextOffset(p, *sigEnd); +- if (!p) ++ if (!p) { ++ free(buf); + return false; ++ } + p = setNextOffset(p, *fileSize - *sigEnd); +- if (!p) ++ if (!p) { ++ free(buf); + return false; ++ } + break; + } + } +--- poppler-21.01.0/poppler/JBIG2Stream.cc ++++ poppler-21.01.0/poppler/JBIG2Stream.cc +@@ -2834,6 +2834,8 @@ JBIG2Bitmap *JBIG2Stream::readGenericBit + + if (unlikely(!codingLine || !refLine)) { + error(errSyntaxError, curStr->getPos(), "Bad width in JBIG2 generic bitmap"); ++ gfree(refLine); ++ gfree(codingLine); + delete bitmap; + return nullptr; + } +--- poppler-21.01.0/poppler/Lexer.cc ++++ poppler-21.01.0/poppler/Lexer.cc +@@ -461,6 +461,7 @@ Object Lexer::getObj(int objNum) + } else if (n == tokBufSize) { + error(errSyntaxError, getPos(), "Warning: name token is longer than what the specification says it can be"); + *p = c; ++ delete s; + s = new GooString(tokBuf, n); + } else { + s->append((char)c); +@@ -468,6 +468,7 @@ Object Lexer::getObj(int objNum) + } + if (n < tokBufSize) { + *p = '\0'; ++ delete s; + return Object(objName, tokBuf); + } else { + Object obj(objName, s->c_str()); +--- poppler/poppler/CairoOutputDev.cc ++++ poppler/poppler/CairoOutputDev.cc +@@ -2921,8 +2921,10 @@ void CairoOutputDev::setMimeData(GfxStat + + // colorspace in stream dict may be different from colorspace in jpx + // data +- if (strKind == strJPX && colorSpace) ++ if (strKind == strJPX && colorSpace) { ++ delete colorSpace; + return; ++ } + + // only embed mime data for gray, rgb, and cmyk colorspaces. + if (colorSpace) { +--- poppler/poppler/TextOutputDev.cc ++++ poppler/poppler/TextOutputDev.cc +@@ -20,7 +20,7 @@ + // Copyright (C) 2006 Jeff Muizelaar + // Copyright (C) 2007, 2008, 2012, 2017 Adrian Johnson + // Copyright (C) 2008 Koji Otani +-// Copyright (C) 2008, 2010-2012, 2014-2020 Albert Astals Cid ++// Copyright (C) 2008, 2010-2012, 2014-2021 Albert Astals Cid + // Copyright (C) 2008 Pino Toscano + // Copyright (C) 2008, 2010 Hib Eris + // Copyright (C) 2009 Ross Moore +@@ -1619,7 +1619,6 @@ TextBlock::~TextBlock() + + void TextBlock::addWord(TextWord *word) + { +- pool->addWord(word); + if (xMin > xMax) { + xMin = word->xMin; + xMax = word->xMax; +@@ -1639,6 +1638,7 @@ void TextBlock::addWord(TextWord *word) + yMax = word->yMax; + } + } ++ pool->addWord(word); + } + + void TextBlock::coalesce(const UnicodeMap *uMap, double fixedPitch) +@@ -3064,11 +3064,13 @@ void TextPage::coalesce(bool physLayout, + word0 = pool->getPool(startBaseIdx); + pool->setPool(startBaseIdx, word0->next); + word0->next = nullptr; +- blk = new TextBlock(this, rot); +- blk->addWord(word0); + + fontSize = word0->fontSize; + minBase = maxBase = word0->base; ++ ++ blk = new TextBlock(this, rot); ++ blk->addWord(word0); ++ + colSpace1 = minColSpacing1 * fontSize; + colSpace2 = minColSpacing2 * fontSize; + lineSpace = maxLineSpacingDelta * fontSize; +@@ -3095,9 +3097,9 @@ void TextPage::coalesce(bool physLayout, + } + word1 = word1->next; + word2->next = nullptr; ++ newMinBase = word2->base; + blk->addWord(word2); + found = true; +- newMinBase = word2->base; + } else { + word0 = word1; + word1 = word1->next; +@@ -3123,9 +3125,9 @@ void TextPage::coalesce(bool physLayout, + } + word1 = word1->next; + word2->next = nullptr; ++ newMaxBase = word2->base; + blk->addWord(word2); + found = true; +- newMaxBase = word2->base; + } else { + word0 = word1; + word1 = word1->next; +@@ -3198,12 +3200,12 @@ void TextPage::coalesce(bool physLayout, + } + word1 = word1->next; + word2->next = nullptr; +- blk->addWord(word2); + if (word2->base < minBase) { + minBase = word2->base; + } else if (word2->base > maxBase) { + maxBase = word2->base; + } ++ blk->addWord(word2); + found = true; + break; + } else { +@@ -3246,12 +3248,12 @@ void TextPage::coalesce(bool physLayout, + } + word1 = word1->next; + word2->next = nullptr; +- blk->addWord(word2); + if (word2->base < minBase) { + minBase = word2->base; + } else if (word2->base > maxBase) { + maxBase = word2->base; + } ++ blk->addWord(word2); + found = true; + break; + } else { +@@ -4456,13 +4456,18 @@ class TextSelectionSizer : public TextSe + { + public: + TextSelectionSizer(TextPage *page, double scale); +- ~TextSelectionSizer() override { } ++ ~TextSelectionSizer() override { delete list; } + + void visitBlock(TextBlock *block, TextLine *begin, TextLine *end, const PDFRectangle *selection) override {}; + void visitLine(TextLine *line, TextWord *begin, TextWord *end, int edge_begin, int edge_end, const PDFRectangle *selection) override; + void visitWord(TextWord *word, int begin, int end, const PDFRectangle *selection) override {}; + +- std::vector *getRegion() { return list; } ++ std::vector *takeRegion() ++ { ++ auto aux = list; ++ list = nullptr; ++ return aux; ++ } + + private: + std::vector *list; +@@ -5063,7 +5068,7 @@ std::vector *TextPage::g + + visitSelection(&sizer, selection, style); + +- return sizer.getRegion(); ++ return sizer.takeRegion(); + } + + GooString *TextPage::getSelectionText(const PDFRectangle *selection, SelectionStyle style) +--- poppler/poppler/XRef.cc ++++ poppler/poppler/XRef.cc +@@ -402,6 +402,7 @@ int XRef::reserve(int newSize) + + void *p = greallocn_checkoverflow(entries, realNewSize, sizeof(XRefEntry)); + if (p == nullptr) { ++ entries = nullptr; + return 0; + } + +@@ -835,7 +836,6 @@ bool XRef::constructXRef(bool *wasRecons + int offset = 0; + + resize(0); // free entries properly +- gfree(entries); + capacity = 0; + size = 0; + entries = nullptr; +--- poppler/test/pdf-inspector.cc ++++ poppler/test/pdf-inspector.cc +@@ -43,6 +43,7 @@ class PdfInspector + { + public: + PdfInspector(); ++ ~PdfInspector(); + + void set_file_name(const char *file_name); + void load(const char *file_name); +@@ -108,6 +109,11 @@ PdfInspector::PdfInspector() + load(nullptr); + } + ++PdfInspector::~PdfInspector(void) ++{ ++ delete output; ++} ++ + void PdfInspector::set_file_name(const char *file_name) + { + GtkWidget *widget; +--- poppler/utils/HtmlOutputDev.cc ++++ poppler/utils/HtmlOutputDev.cc +@@ -1337,6 +1337,7 @@ void HtmlOutputDev::drawPngImage(GfxStat + // TODO can we calculate the resolution of the image? + if (!writer->init(f1, width, height, 72, 72)) { + error(errInternal, -1, "Can't init PNG for image '{0:t}'", fName); ++ delete fName; + delete writer; + fclose(f1); + return; +@@ -1378,6 +1378,7 @@ void HtmlOutputDev::drawPngImage(GfxStat + + if (!writer->writeRow(row_pointer)) { + error(errIO, -1, "Failed to write into PNG '{0:t}'", fName); ++ delete fName; + delete writer; + delete imgStr; + fclose(f1); +@@ -1413,6 +1414,7 @@ void HtmlOutputDev::drawPngImage(GfxStat + + if (!writer->writeRow(&png_row)) { + error(errIO, -1, "Failed to write into PNG '{0:t}'", fName); ++ delete fName; + delete writer; + fclose(f1); + gfree(png_row); +--- poppler/utils/pdftotext.cc ++++ poppler/utils/pdftotext.cc +@@ -329,6 +329,7 @@ int main(int argc, char *argv[]) + fputs("
\n", f);
+             if (f != stdout) {
+                 fclose(f);
++                f = nullptr;
+             }
+         }
+     }
+@@ -348,8 +349,9 @@ int main(int argc, char *argv[])
+                 printWordBBox(f, doc, textOut, firstPage, lastPage);
+             }
+         }
+-        if (f != stdout) {
++        if (f != stdout && f != nullptr) {
+             fclose(f);
++            f = nullptr;
+         }
+     } else {
+         textOut = new TextOutputDev(textFileName->c_str(), physLayout, fixedPitch, rawOrder, htmlMeta, discardDiag);
+@@ -390,7 +392,7 @@ int main(int argc, char *argv[])
+             fputs("
\n", f); + fputs("\n", f); + fputs("\n", f); +- if (f != stdout) { ++ if (f != stdout && f != nullptr) { + fclose(f); + } + } +@@ -533,7 +533,9 @@ void printWordBBox(FILE *f, PDFDoc *doc, + for (int i = 0; i < word_length; ++i) { + word = wordlist->get(i); + word->getBBox(&xMinA, &yMinA, &xMaxA, &yMaxA); +- const std::string myString = myXmlTokenReplace(word->getText()->c_str()); ++ GooString *wordText = word->getText(); ++ const std::string myString = myXmlTokenReplace(wordText->c_str()); ++ delete wordText; + fprintf(f, " %s\n", xMinA, yMinA, xMaxA, yMaxA, myString.c_str()); + } + fprintf(f, " \n"); diff --git a/SOURCES/poppler-21.01.0-glib-introspection.patch b/SOURCES/poppler-21.01.0-glib-introspection.patch new file mode 100644 index 0000000..9bbb221 --- /dev/null +++ b/SOURCES/poppler-21.01.0-glib-introspection.patch @@ -0,0 +1,11 @@ +--- poppler-21.01.0/glib/CMakeLists.txt ++++ poppler-21.01.0/glib/CMakeLists.txt +@@ -121,7 +121,7 @@ if (HAVE_INTROSPECTION AND BUILD_SHARED_ + + # General gir: Reset object-list for introspection & load tool args + set(INTROSPECTION_GIRS) +- set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}" "--warn-all") ++ set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}" "--warn-all" "--sources-top-dirs=${CMAKE_SOURCE_DIR}" "--sources-top-dirs=${CMAKE_BINARY_DIR}") + set(INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}") + + # Poppler: Assign package to gir & export keys diff --git a/SOURCES/poppler-21.01.0-nss.patch b/SOURCES/poppler-21.01.0-nss.patch new file mode 100644 index 0000000..bf96362 --- /dev/null +++ b/SOURCES/poppler-21.01.0-nss.patch @@ -0,0 +1,1055 @@ +diff --git a/config.h.cmake b/config.h.cmake +index 7989cbfb..6f5e147e 100644 +--- a/config.h.cmake ++++ b/config.h.cmake +@@ -24,9 +24,6 @@ + /* Use zlib instead of builtin zlib decoder to uncompress flate streams. */ + #cmakedefine ENABLE_ZLIB_UNCOMPRESS 1 + +-/* Build against libnss3 for digital signature validation */ +-#cmakedefine ENABLE_NSS3 1 +- + /* Use cairo for rendering. */ + #cmakedefine HAVE_CAIRO 1 + +diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc +index 16476f4f..9f4adda3 100644 +--- a/poppler/Decrypt.cc ++++ b/poppler/Decrypt.cc +@@ -39,17 +39,33 @@ + #include "goo/grandom.h" + #include "Decrypt.h" + #include "Error.h" +- ++#ifdef ENABLE_NSS3 ++#include ++#include ++#include ++#endif ++ ++#ifdef ENABLE_NSS3 ++static PK11Context *rc4InitContext(const unsigned char *key, int keyLen); ++static unsigned char rc4DecryptByte(PK11Context *context, unsigned char c); ++#else + static void rc4InitKey(const unsigned char *key, int keyLen, unsigned char *state); + static unsigned char rc4DecryptByte(unsigned char *state, unsigned char *x, unsigned char *y, unsigned char c); ++#endif + + static bool aesReadBlock(Stream *str, unsigned char *in, bool addPadding); + ++#ifdef ENABLE_NSS3 ++static PK11Context *aesInitContext(unsigned char *in, unsigned char *objKey, int objKeyLength, bool decrypt); ++#else + static void aesKeyExpansion(DecryptAESState *s, const unsigned char *objKey, int objKeyLen, bool decrypt); ++#endif + static void aesEncryptBlock(DecryptAESState *s, const unsigned char *in); + static void aesDecryptBlock(DecryptAESState *s, const unsigned char *in, bool last); + ++#ifndef ENABLE_NSS3 + static void aes256KeyExpansion(DecryptAES256State *s, const unsigned char *objKey, int objKeyLen, bool decrypt); ++#endif + static void aes256EncryptBlock(DecryptAES256State *s, const unsigned char *in); + static void aes256DecryptBlock(DecryptAES256State *s, const unsigned char *in, bool last); + +@@ -70,6 +86,31 @@ static const unsigned char passwordPad[32] = { + // Decrypt + //------------------------------------------------------------------------ + ++#ifdef ENABLE_NSS3 ++static void shutdownNSS() ++{ ++ if (NSS_Shutdown() != SECSuccess) { ++ error(errInternal, -1, "NSS shutdown failed: {0:s}", ++ PR_ErrorToString(PR_GetError(), PR_LANGUAGE_I_DEFAULT)); ++ } ++} ++ ++static bool initNSS() { ++ if (NSS_IsInitialized()) { ++ return true; ++ } else { ++ if (NSS_NoDB_Init(".") != SECSuccess) { ++ error(errInternal, -1, "NSS initialization failed: {0:s}", ++ PR_ErrorToString(PR_GetError(), PR_LANGUAGE_I_DEFAULT)); ++ return false; ++ } else { ++ atexit(shutdownNSS); ++ return true; ++ } ++ } ++} ++#endif ++ + bool Decrypt::makeFileKey(int encVersion, int encRevision, int keyLength, const GooString *ownerKey, const GooString *userKey, const GooString *ownerEnc, const GooString *userEnc, int permissions, const GooString *fileID, + const GooString *ownerPassword, const GooString *userPassword, unsigned char *fileKey, bool encryptMetadata, bool *ownerPasswordOk) + { +@@ -80,13 +121,21 @@ bool Decrypt::makeFileKey(int encVersio + DecryptAES256State state; + unsigned char test[127 + 56], test2[32]; + GooString *userPassword2; +- unsigned char fState[256]; + unsigned char tmpKey[16]; +- unsigned char fx, fy; + int len, i, j; ++#ifdef ENABLE_NSS3 ++ PK11Context *rc4Context; ++#else ++ unsigned char fState[256]; ++ unsigned char fx, fy; ++#endif + + *ownerPasswordOk = false; + ++#ifdef ENABLE_NSS3 ++ initNSS(); ++#endif ++ + if (encRevision == 5 || encRevision == 6) { + + // check the owner password +@@ -115,14 +164,26 @@ bool Decrypt::makeFileKey(int encVersio + // test contains the initial SHA-256 hash input K. + revision6Hash(ownerPassword, test, userKey->c_str()); + } ++#ifndef ENABLE_NSS3 + aes256KeyExpansion(&state, test, 32, true); ++#endif + for (i = 0; i < 16; ++i) { + state.cbc[i] = 0; + } ++#ifdef ENABLE_NSS3 ++ state.context = aesInitContext(state.cbc, test, 32, true); ++ if (state.context) { ++#endif + aes256DecryptBlock(&state, (unsigned char *)ownerEnc->c_str(), false); + memcpy(fileKey, state.buf, 16); + aes256DecryptBlock(&state, (unsigned char *)ownerEnc->c_str() + 16, false); + memcpy(fileKey + 16, state.buf, 16); ++#ifdef ENABLE_NSS3 ++ PK11_DestroyContext(state.context, PR_TRUE); ++ } else { ++ return false; ++ } ++#endif + + *ownerPasswordOk = true; + return true; +@@ -156,14 +217,26 @@ bool Decrypt::makeFileKey(int encVersio + // user key is not used in computing intermediate user key. + revision6Hash(userPassword, test, nullptr); + } ++#ifndef ENABLE_NSS3 + aes256KeyExpansion(&state, test, 32, true); ++#endif + for (i = 0; i < 16; ++i) { + state.cbc[i] = 0; + } ++#ifdef ENABLE_NSS3 ++ state.context = aesInitContext(state.cbc, test, 32, true); ++ if (state.context) { ++#endif + aes256DecryptBlock(&state, (unsigned char *)userEnc->c_str(), false); + memcpy(fileKey, state.buf, 16); + aes256DecryptBlock(&state, (unsigned char *)userEnc->c_str() + 16, false); + memcpy(fileKey + 16, state.buf, 16); ++#ifdef ENABLE_NSS3 ++ PK11_DestroyContext(state.context, PR_TRUE); ++ } else { ++ return false; ++ } ++#endif + + return true; + } +@@ -189,22 +262,41 @@ bool Decrypt::makeFileKey(int encVersio + } + } + if (encRevision == 2) { ++#ifdef ENABLE_NSS3 ++ rc4Context = rc4InitContext(test, keyLength); ++ if (rc4Context) { ++ for (i = 0; i < 32; ++i) ++ test2[i] = rc4DecryptByte(rc4Context, ownerKey->getChar(i)); ++ PK11_DestroyContext(rc4Context, PR_TRUE); ++ } ++#else + rc4InitKey(test, keyLength, fState); + fx = fy = 0; + for (i = 0; i < 32; ++i) { + test2[i] = rc4DecryptByte(fState, &fx, &fy, ownerKey->getChar(i)); + } ++#endif + } else { + memcpy(test2, ownerKey->c_str(), 32); + for (i = 19; i >= 0; --i) { + for (j = 0; j < keyLength; ++j) { + tmpKey[j] = test[j] ^ i; + } ++#ifdef ENABLE_NSS3 ++ rc4Context = rc4InitContext(tmpKey, keyLength); ++ if (rc4Context) { ++ for (j = 0; j < 32; ++j) { ++ test2[j] = rc4DecryptByte(rc4Context, test2[j]); ++ } ++ PK11_DestroyContext(rc4Context, PR_TRUE); ++ } ++#else + rc4InitKey(tmpKey, keyLength, fState); + fx = fy = 0; + for (j = 0; j < 32; ++j) { + test2[j] = rc4DecryptByte(fState, &fx, &fy, test2[j]); + } ++#endif + } + } + userPassword2 = new GooString((char *)test2, 32); +@@ -232,11 +324,15 @@ bool Decrypt::makeFileKey2(int encVersi + { + unsigned char *buf; + unsigned char test[32]; +- unsigned char fState[256]; + unsigned char tmpKey[16]; +- unsigned char fx, fy; + int len, i, j; +- bool ok; ++ bool ok = true; ++#ifdef ENABLE_NSS3 ++ PK11Context *rc4Context; ++#else ++ unsigned char fState[256]; ++ unsigned char fx, fy; ++#endif + + // generate file key + buf = (unsigned char *)gmalloc(72 + fileID->getLength()); +@@ -273,28 +369,52 @@ bool Decrypt::makeFileKey2(int encVersi + + // test user password + if (encRevision == 2) { ++#ifdef ENABLE_NSS3 ++ rc4Context = rc4InitContext(fileKey, keyLength); ++ if (rc4Context) { ++ for (i = 0; i < 32; ++i) ++ test[i] = rc4DecryptByte(rc4Context, userKey->getChar(i)); ++ PK11_DestroyContext(rc4Context, PR_TRUE); ++ } else { ++ ok = false; ++ } ++#else + rc4InitKey(fileKey, keyLength, fState); + fx = fy = 0; + for (i = 0; i < 32; ++i) { + test[i] = rc4DecryptByte(fState, &fx, &fy, userKey->getChar(i)); + } +- ok = memcmp(test, passwordPad, 32) == 0; ++#endif ++ if (ok) ++ ok = memcmp(test, passwordPad, 32) == 0; + } else if (encRevision == 3) { + memcpy(test, userKey->c_str(), 32); + for (i = 19; i >= 0; --i) { + for (j = 0; j < keyLength; ++j) { + tmpKey[j] = fileKey[j] ^ i; + } ++#ifdef ENABLE_NSS3 ++ rc4Context = rc4InitContext(tmpKey, keyLength); ++ if (rc4Context) { ++ for (j = 0; j < 32; ++j) ++ test[j] = rc4DecryptByte(rc4Context, test[j]); ++ PK11_DestroyContext(rc4Context, PR_TRUE); ++ } else { ++ ok = false; ++ } ++#else + rc4InitKey(tmpKey, keyLength, fState); + fx = fy = 0; + for (j = 0; j < 32; ++j) { + test[j] = rc4DecryptByte(fState, &fx, &fy, test[j]); + } ++#endif + } + memcpy(buf, passwordPad, 32); + memcpy(buf + 32, fileID->c_str(), fileID->getLength()); + md5(buf, 32 + fileID->getLength(), buf); +- ok = memcmp(test, buf, 16) == 0; ++ if (ok) ++ ok = memcmp(test, buf, 16) == 0; + } else { + ok = false; + } +@@ -334,6 +454,9 @@ BaseCryptStream::BaseCryptStream(Stream + if ((objKeyLength = keyLength + 5) > 16) { + objKeyLength = 16; + } ++#ifdef ENABLE_NSS3 ++ state.rc4.context = nullptr; ++#endif + break; + case cryptAES: + objKey[keyLength] = refA.num & 0xff; +@@ -349,9 +472,15 @@ BaseCryptStream::BaseCryptStream(Stream + if ((objKeyLength = keyLength + 5) > 16) { + objKeyLength = 16; + } ++#ifdef ENABLE_NSS3 ++ state.aes.context = nullptr; ++#endif + break; + case cryptAES256: + objKeyLength = keyLength; ++#ifdef ENABLE_NSS3 ++ state.aes256.context = nullptr; ++#endif + break; + case cryptNone: + break; +@@ -359,10 +488,33 @@ BaseCryptStream::BaseCryptStream(Stream + charactersRead = 0; + nextCharBuff = EOF; + autoDelete = true; ++ ++#ifdef ENABLE_NSS3 ++ initNSS(); ++#endif + } + + BaseCryptStream::~BaseCryptStream() + { ++#ifdef ENABLE_NSS3 ++ switch (algo) { ++ case cryptRC4: ++ if (state.rc4.context) ++ PK11_DestroyContext(state.rc4.context, PR_TRUE); ++ break; ++ case cryptAES: ++ if (state.aes.context) ++ PK11_DestroyContext(state.aes.context, PR_TRUE); ++ break; ++ case cryptAES256: ++ if (state.aes256.context) ++ PK11_DestroyContext(state.aes256.context, PR_TRUE); ++ break; ++ default: ++ break; ++ } ++#endif ++ + if (autoDelete) { + delete str; + } +@@ -424,18 +576,40 @@ void EncryptStream::reset() { + + switch (algo) { + case cryptRC4: ++#ifdef ENABLE_NSS3 ++ if (state.rc4.context) ++ PK11_DestroyContext(state.rc4.context, PR_TRUE); ++ state.rc4.context = rc4InitContext(objKey, objKeyLength); ++#else + state.rc4.x = state.rc4.y = 0; + rc4InitKey(objKey, objKeyLength, state.rc4.state); ++#endif + break; + case cryptAES: ++#ifdef ENABLE_NSS3 ++ memcpy(state.aes.buf, state.aes.cbc, 16); // Copy CBC IV to buf ++ if (state.aes.context) ++ PK11_DestroyContext(state.aes.context, PR_TRUE); ++ state.aes.context = aesInitContext(state.aes.cbc, objKey, objKeyLength, ++ false); ++#else + aesKeyExpansion(&state.aes, objKey, objKeyLength, false); + memcpy(state.aes.buf, state.aes.cbc, 16); // Copy CBC IV to buf ++#endif + state.aes.bufIdx = 0; + state.aes.paddingReached = false; + break; + case cryptAES256: ++#ifdef ENABLE_NSS3 ++ memcpy(state.aes256.buf, state.aes256.cbc, 16); // Copy CBC IV to buf ++ if (state.aes256.context) ++ PK11_DestroyContext(state.aes256.context, PR_TRUE); ++ state.aes256.context = aesInitContext(state.aes256.cbc, objKey, objKeyLength, ++ false); ++#else + aes256KeyExpansion(&state.aes256, objKey, objKeyLength, false); + memcpy(state.aes256.buf, state.aes256.cbc, 16); // Copy CBC IV to buf ++#endif + state.aes256.bufIdx = 0; + state.aes256.paddingReached = false; + break; +@@ -456,7 +630,11 @@ int EncryptStream::lookChar() { + case cryptRC4: + if ((c = str->getChar()) != EOF) { + // RC4 is XOR-based: the decryption algorithm works for encryption too ++#ifdef ENABLE_NSS3 ++ c = rc4DecryptByte(state.rc4.context, (unsigned char)c); ++#else + c = rc4DecryptByte(state.rc4.state, &state.rc4.x, &state.rc4.y, (unsigned char)c); ++#endif + } + break; + case cryptAES: +@@ -506,21 +684,47 @@ void DecryptStream::reset() { + + switch (algo) { + case cryptRC4: ++#ifdef ENABLE_NSS3 ++ if (state.rc4.context) ++ PK11_DestroyContext(state.rc4.context, PR_TRUE); ++ state.rc4.context = rc4InitContext(objKey, objKeyLength); ++#else + state.rc4.x = state.rc4.y = 0; + rc4InitKey(objKey, objKeyLength, state.rc4.state); ++#endif + break; + case cryptAES: ++#ifdef ENABLE_NSS3 ++ if (state.aes.context) ++ PK11_DestroyContext(state.aes.context, PR_TRUE); ++ for (i = 0; i < 16; ++i) { ++ state.aes.cbc[i] = str->getChar(); ++ } ++ state.aes.context = aesInitContext(state.aes.cbc, objKey, objKeyLength, ++ true); ++#else + aesKeyExpansion(&state.aes, objKey, objKeyLength, true); + for (i = 0; i < 16; ++i) { + state.aes.cbc[i] = str->getChar(); + } ++#endif + state.aes.bufIdx = 16; + break; + case cryptAES256: ++#ifdef ENABLE_NSS3 ++ if (state.aes256.context) ++ PK11_DestroyContext(state.aes256.context, PR_TRUE); ++ for (i = 0; i < 16; ++i) { ++ state.aes256.cbc[i] = str->getChar(); ++ } ++ state.aes256.context = aesInitContext(state.aes256.cbc, objKey, objKeyLength, ++ true); ++#else + aes256KeyExpansion(&state.aes256, objKey, objKeyLength, true); + for (i = 0; i < 16; ++i) { + state.aes256.cbc[i] = str->getChar(); + } ++#endif + state.aes256.bufIdx = 16; + break; + case cryptNone: +@@ -539,10 +743,21 @@ int DecryptStream::lookChar() { + switch (algo) { + case cryptRC4: + if ((c = str->getChar()) != EOF) { ++#ifdef ENABLE_NSS3 ++ if (unlikely(state.rc4.context == nullptr)) ++ c = EOF; ++ else ++ c = rc4DecryptByte(state.rc4.context, (unsigned char)c); ++#else + c = rc4DecryptByte(state.rc4.state, &state.rc4.x, &state.rc4.y, (unsigned char)c); ++#endif + } + break; + case cryptAES: ++#ifdef ENABLE_NSS3 ++ if (unlikely(state.aes.context == nullptr)) ++ break; ++#endif + if (state.aes.bufIdx == 16) { + if (aesReadBlock(str, in, false)) { + aesDecryptBlock(&state.aes, in, str->lookChar() == EOF); +@@ -555,6 +770,10 @@ int DecryptStream::lookChar() { + } + break; + case cryptAES256: ++#ifdef ENABLE_NSS3 ++ if (unlikely(state.aes256.context == nullptr)) ++ break; ++#endif + if (state.aes256.bufIdx == 16) { + if (aesReadBlock(str, in, false)) { + aes256DecryptBlock(&state.aes256, in, str->lookChar() == EOF); +@@ -576,7 +795,176 @@ int DecryptStream::lookChar() { + // RC4-compatible decryption + //------------------------------------------------------------------------ + ++#ifdef ENABLE_NSS3 ++/* ++ * This function turns given key into token key (compared to a session key ++ * which is prohibited in FIPS mode). ++ */ ++static PK11SymKey *tokenizeKey(const unsigned char *key, int keyLen, ++ CK_ATTRIBUTE_TYPE operation) { ++ CK_MECHANISM_TYPE cipherMech = CKM_AES_CBC_PAD; ++ PK11SlotInfo *slot; ++ PK11SymKey *wrappingKey = nullptr; ++ PK11SymKey *symKey = nullptr; ++ PK11SymKey *token = nullptr; ++ SECStatus retval; ++ SECItem *secParam = nullptr; ++ SECItem ivItem, wrappedKey; ++ unsigned char output[48]; // Buffer to hold 256 bit key + padding ++ unsigned char iv[16]; // Initialization vector for AES ++ unsigned int outputLength; ++ int i; ++ ++ slot = PK11_GetBestSlot(CKM_AES_KEY_GEN, nullptr); ++ if (slot == nullptr) { ++ error(errInternal, -1, "Unable to find security device (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ // Generate random key for wrapping of given key by AES-256 ++ wrappingKey = PK11_KeyGen(slot, CKM_AES_KEY_GEN, nullptr, 32, nullptr); ++ if (wrappingKey == nullptr) { ++ error(errInternal, -1, "Failed to generate wrapping key (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ for (i = 0; i < 16; i++) ++ iv[i] = i; ++ ++ ivItem.type = siBuffer; ++ ivItem.data = iv; ++ ivItem.len = 16; ++ ++ secParam = PK11_ParamFromIV(cipherMech, &ivItem); ++ if (secParam == nullptr) { ++ error(errInternal, -1, "Failed to set up PKCS11 param (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ // Encrypt given key ++ retval = PK11_Encrypt(wrappingKey, ++ cipherMech, ++ secParam, ++ output, ++ &outputLength, ++ sizeof(output), ++ key, ++ keyLen); ++ if (retval != SECSuccess) { ++ error(errInternal, -1, "Failed to encrypt key (err {0:d})", ++ PR_GetError()); ++ } ++ ++ wrappedKey.type = siBuffer; ++ wrappedKey.data = output; ++ wrappedKey.len = outputLength; ++ ++ // Unwrap the wrapped key to token so it can be used in FIPS mode ++ token = PK11_UnwrapSymKey(wrappingKey, ++ cipherMech, ++ &ivItem, ++ &wrappedKey, ++ operation, ++ CKA_UNWRAP, ++ keyLen); ++ ++ if (token == nullptr) { ++ error(errInternal, -1, "Failed to unwrap symmetric key (err {0:d})", ++ PR_GetError()); ++ } ++ ++err: ++ if (secParam != nullptr) ++ SECITEM_FreeItem(secParam, PR_TRUE); ++ ++ if (wrappingKey != nullptr) ++ PK11_FreeSymKey(wrappingKey); ++ ++ if (symKey != nullptr) ++ PK11_FreeSymKey(symKey); ++ ++ if (slot != nullptr) ++ PK11_FreeSlot(slot); ++ ++ return token; ++} ++ ++static PK11Context *rc4InitContext(const unsigned char *key, int keyLen) { ++ CK_MECHANISM_TYPE cipherMech = CKM_RC4; ++ PK11SlotInfo *slot = nullptr; ++ PK11SymKey *symKey = nullptr; ++ SECItem *secParam = nullptr; ++ PK11Context *context = nullptr; ++ ++ slot = PK11_GetBestSlot(cipherMech, nullptr); ++ if (slot == nullptr) { ++ error(errInternal, -1, "Unable to find security device (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ symKey = tokenizeKey(key, keyLen, cipherMech); ++ if (symKey == nullptr) { ++ error(errInternal, -1, "Failed to create token from key (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ secParam = PK11_ParamFromIV(cipherMech, nullptr); ++ if (secParam == nullptr) { ++ error(errInternal, -1, "Failed to set up PKCS11 param (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ context = PK11_CreateContextBySymKey(cipherMech, ++ CKA_DECRYPT, ++ symKey, ++ secParam); ++ if (context == nullptr) { ++ error(errInternal, -1, "Failed to create context (err {0:d})", ++ PR_GetError()); ++ } ++ ++err: ++ if (secParam != nullptr) ++ SECITEM_FreeItem(secParam, PR_TRUE); ++ ++ if (symKey != nullptr) ++ PK11_FreeSymKey(symKey); ++ ++ if (slot != nullptr) ++ PK11_FreeSlot(slot); ++ ++ return context; ++} ++ ++static unsigned char rc4DecryptByte(PK11Context *context, unsigned char c) { ++ unsigned char outputChar = 0; ++ SECStatus retval; ++ int outputLength; ++ ++ retval = PK11_CipherOp(context, ++ &outputChar, ++ &outputLength, ++ 1, ++ &c, ++ 1); ++ ++ if (retval != SECSuccess) { ++ error(errInternal, -1, "Failed to decrypt byte (err {0:d})", ++ PR_GetError()); ++ } ++ ++ return outputChar; ++} ++ ++#else ++ + static void rc4InitKey(const unsigned char *key, int keyLen, unsigned char *state) + { + unsigned char index1, index2; + unsigned char t; +@@ -609,6 +997,8 @@ static unsigned char rc4DecryptByte(unsigned char *sta + return c ^ state[(tx + ty) % 256]; + } + ++#endif ++ + //------------------------------------------------------------------------ + // AES decryption + //------------------------------------------------------------------------ +@@ -639,6 +1029,178 @@ static bool aesReadBlock(Stream *str, G + } + } + ++#ifdef ENABLE_NSS3 ++ ++static PK11Context *aesInitContext(unsigned char *in, unsigned char *objKey, ++ int objKeyLength, bool decrypt) { ++ CK_MECHANISM_TYPE cipherMech = CKM_AES_CBC; ++ CK_ATTRIBUTE_TYPE operationType = decrypt ? CKA_DECRYPT : CKA_ENCRYPT; ++ PK11SlotInfo *slot; ++ PK11SymKey *symKey = nullptr; ++ SECItem *secParam = nullptr; ++ PK11Context *context = nullptr; ++ SECItem ivItem; ++ ++ slot = PK11_GetBestSlot(cipherMech, nullptr); ++ if (slot == nullptr) { ++ error(errInternal, -1, "Unable to find security device (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ symKey = tokenizeKey(objKey, objKeyLength, cipherMech); ++ if (symKey == nullptr) { ++ error(errInternal, -1, "Failed to create token from key (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ ivItem.type = siBuffer; ++ ivItem.data = in; ++ ivItem.len = 16; ++ ++ secParam = PK11_ParamFromIV(cipherMech, &ivItem); ++ if (secParam == nullptr) { ++ error(errInternal, -1, "Failed to set up PKCS11 param (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ context = PK11_CreateContextBySymKey(cipherMech, ++ operationType, ++ symKey, ++ secParam); ++ ++err: ++ if (secParam != nullptr) ++ SECITEM_FreeItem(secParam, PR_TRUE); ++ ++ if (symKey != nullptr) ++ PK11_FreeSymKey(symKey); ++ ++ if (slot != nullptr) ++ PK11_FreeSlot(slot); ++ ++ return context; ++} ++ ++static void aesEncryptBlock(DecryptAESState *s, const unsigned char *in) { ++ SECStatus rv; ++ int outputLength; ++ ++ rv = PK11_CipherOp(s->context, ++ s->buf, ++ &outputLength, ++ 16, ++ in, ++ 16); ++ ++ if (rv != SECSuccess) { ++ error(errInternal, -1, "Failed to encrypt input block (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ s->bufIdx = 0; ++ ++err: ++ return; ++} ++ ++static void aesDecryptBlock(DecryptAESState *s, const unsigned char *in, bool last) { ++ SECStatus rv1; ++ int outputLen; ++ int n, i; ++ ++ rv1 = PK11_CipherOp(s->context, ++ s->buf, ++ &outputLen, ++ 16, ++ in, ++ 16); ++ ++ if (rv1 != SECSuccess) { ++ error(errInternal, -1, "Failed to decrypt input block (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ s->bufIdx = 0; ++ if (last) { ++ n = s->buf[15]; ++ if (n < 1 || n > 16) { // this should never happen ++ n = 16; ++ } ++ for (i = 15; i >= n; --i) { ++ s->buf[i] = s->buf[i-n]; ++ } ++ s->bufIdx = n; ++ } ++ ++err: ++ return; ++} ++ ++static void aes256EncryptBlock(DecryptAES256State *s, const unsigned char *in) { ++ SECStatus rv; ++ int outputLength; ++ ++ rv = PK11_CipherOp(s->context, ++ s->buf, ++ &outputLength, ++ 16, ++ in, ++ 16); ++ ++ if (rv != SECSuccess) { ++ error(errInternal, -1, "Failed to encrypt input block (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ s->bufIdx = 0; ++ ++err: ++ return; ++} ++ ++static void aes256DecryptBlock(DecryptAES256State *s, const unsigned char *in, ++ bool last) { ++ SECStatus rv1; ++ int outputLen; ++ int n, i; ++ ++ rv1 = PK11_CipherOp(s->context, ++ s->buf, ++ &outputLen, ++ 16, ++ in, ++ 16); ++ ++ if (rv1 != SECSuccess) { ++ error(errInternal, -1, "Failed to decrypt input block (err {0:d})", ++ PR_GetError()); ++ goto err; ++ } ++ ++ s->bufIdx = 0; ++ if (last) { ++ n = s->buf[15]; ++ if (n < 1 || n > 16) { // this should never happen ++ n = 16; ++ } ++ for (i = 15; i >= n; --i) { ++ s->buf[i] = s->buf[i-n]; ++ } ++ s->bufIdx = n; ++ } ++ ++err: ++ return; ++} ++ ++#else ++ + static const unsigned char sbox[256] = { 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, + 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, + 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, +@@ -1121,10 +1683,33 @@ static void aes256DecryptBlock(DecryptAE + } + } + ++#endif ++ + //------------------------------------------------------------------------ + // MD5 message digest + //------------------------------------------------------------------------ + ++#ifdef ENABLE_NSS3 ++static void hashFunc(const unsigned char *msg, int msgLen, unsigned char *hash, ++ HASH_HashType type) { ++ HASHContext *context; ++ unsigned int hashLen = 0; ++ ++ if (!initNSS()) ++ return; ++ ++ context = HASH_Create(type); ++ if (context == nullptr) ++ return; ++ ++ HASH_Begin(context); ++ HASH_Update(context, msg, msgLen); ++ HASH_End(context, hash, &hashLen, HASH_ResultLen(type)); ++ HASH_Destroy(context); ++} ++ ++#else ++ + // this works around a bug in older Sun compilers + static inline unsigned long rotateLeft(unsigned long x, int r) + { +@@ -1151,8 +1736,13 @@ static inline unsigned long md5Round4(unsigned long a, + state->digest[15] = (unsigned char)(state->d >> 24); + } + ++#endif ++ + void md5(const unsigned char *msg, int msgLen, unsigned char *digest) + { ++#ifdef ENABLE_NSS3 ++ hashFunc(msg, msgLen, digest, HASH_AlgMD5); ++#else + if (msgLen < 0) { + return; + } +@@ -1296,12 +1886,14 @@ void md5(unsigned char *msg, int msgLen, unsigned char + for (int i = 0; i < 16; ++i) { + digest[i] = state.digest[i]; + } ++#endif + } + + //------------------------------------------------------------------------ + // SHA-256 hash + //------------------------------------------------------------------------ + ++#ifndef ENABLE_NSS3 + static const unsigned int sha256K[64] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, +@@ -1400,9 +1992,13 @@ static void sha256HashBlock(unsigned char *blk, + H[6] += g; + H[7] += h; + } ++#endif + + static void sha256(unsigned char *msg, int msgLen, unsigned char *hash) + { ++#ifdef ENABLE_NSS3 ++ hashFunc(msg, msgLen, hash, HASH_AlgSHA256); ++#else + unsigned char blk[64]; + unsigned int H[8]; + int blkLen, i; +@@ -1453,7 +2049,10 @@ static void sha256(unsigned char *msg, int msgL + hash[i * 4 + 2] = (unsigned char)(H[i] >> 8); + hash[i * 4 + 3] = (unsigned char)H[i]; + } ++#endif + } ++ ++#ifndef ENABLE_NSS3 + //------------------------------------------------------------------------ + // SHA-512 hash (see FIPS 180-4) + //------------------------------------------------------------------------ +@@ -1557,9 +2156,13 @@ static void sha512HashBlock(unsigned char *blk, + H[6] += g; + H[7] += h; + } ++#endif + + static void sha512(unsigned char *msg, int msgLen, unsigned char *hash) + { ++#ifdef ENABLE_NSS3 ++ hashFunc(msg, msgLen, hash, HASH_AlgSHA512); ++#else + unsigned char blk[128]; + uint64_t H[8]; + int blkLen = 0, i; +@@ -1622,6 +2225,7 @@ static void sha512(unsigned char *msg, int msgL + hash[i * 8 + 6] = (unsigned char)(H[i] >> 8); + hash[i * 8 + 7] = (unsigned char)H[i]; + } ++#endif + } + + //------------------------------------------------------------------------ +@@ -1631,6 +2235,9 @@ static void sha512(unsigned char *msg, int msgL + // 2.A 384 bit message digest is obtained by truncating the final hash value. + static void sha384(unsigned char *msg, int msgLen, unsigned char *hash) + { ++#ifdef ENABLE_NSS3 ++ hashFunc(msg, msgLen, hash, HASH_AlgSHA384); ++#else + unsigned char blk[128]; + uint64_t H[8]; + int blkLen, i; +@@ -1696,6 +2303,7 @@ static void sha384(unsigned char *msg, int msgL + hash[i * 8 + 6] = (unsigned char)(H[i] >> 8); + hash[i * 8 + 7] = (unsigned char)H[i]; + } ++#endif + } + + //------------------------------------------------------------------------ +@@ -1735,7 +2344,11 @@ static void revision6Hash(GooString *inp + memcpy(state.buf, state.cbc, 16); // Copy CBC IV to buf + state.bufIdx = 0; + state.paddingReached = false; ++#ifdef ENABLE_NSS3 ++ state.context = aesInitContext(state.cbc, aesKey, 16, false); ++#else + aesKeyExpansion(&state, aesKey, 16, false); ++#endif + + for (int i = 0; i < (4 * sequenceLength); i++) { + aesEncryptBlock(&state, K1 + (16 * i)); +@@ -1776,6 +2389,9 @@ static void revision6Hash(GooString *inp + sha512(E, totalLength, K); + } + rounds++; ++#ifdef ENABLE_NSS3 ++ PK11_DestroyContext(state.context, PR_TRUE); ++#endif + } + // the first 32 bytes of the final K are the output of the function. + } +diff --git a/poppler/Decrypt.h b/poppler/Decrypt.h +index d4667c8c..16fa9830 100644 +--- a/poppler/Decrypt.h ++++ b/poppler/Decrypt.h +@@ -31,6 +32,9 @@ + #include "goo/GooString.h" + #include "Object.h" + #include "Stream.h" ++#ifdef ENABLE_NSS3 ++#include ++#endif + + //------------------------------------------------------------------------ + // Decrypt +@@ -73,14 +77,22 @@ private: + * case of encryption. */ + struct DecryptRC4State + { ++#ifdef ENABLE_NSS3 ++ PK11Context *context; ++#else + unsigned char state[256]; + unsigned char x, y; ++#endif + }; + + struct DecryptAESState + { ++#ifdef ENABLE_NSS3 ++ PK11Context *context; ++#else + unsigned int w[44]; + unsigned char state[16]; ++#endif + unsigned char cbc[16]; + unsigned char buf[16]; + bool paddingReached; // encryption only +@@ -87,8 +99,12 @@ struct DecryptAESState { + + struct DecryptAES256State + { ++#ifdef ENABLE_NSS3 ++ PK11Context *context; ++#else + unsigned int w[60]; + unsigned char state[16]; ++#endif + unsigned char cbc[16]; + unsigned char buf[16]; + bool paddingReached; // encryption only +diff --git a/poppler/poppler-config.h.cmake b/poppler/poppler-config.h.cmake +index f0a5a1a0..dcaade6f 100644 +--- a/poppler/poppler-config.h.cmake ++++ b/poppler/poppler-config.h.cmake +@@ -115,6 +115,12 @@ + #cmakedefine HAVE_SPLASH 1 + #endif + ++/* Build against libnss3 for digital signature validation and ++ implementation of encryption/decryption. */ ++#ifndef ENABLE_NSS3 ++#cmakedefine ENABLE_NSS3 1 ++#endif ++ + //------------------------------------------------------------------------ + // version + //------------------------------------------------------------------------ diff --git a/SOURCES/poppler-21.01.0-show-annotation-text.patch b/SOURCES/poppler-21.01.0-show-annotation-text.patch new file mode 100644 index 0000000..6c0c28a --- /dev/null +++ b/SOURCES/poppler-21.01.0-show-annotation-text.patch @@ -0,0 +1,28 @@ +From 5dbe101b7c3561aedf33872e218b8d1b6984f623 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Sat, 8 May 2021 00:54:13 +0200 +Subject: [PATCH] Restore setting the Encoding in createAnnotDrawFont + +It was removed in 9db685f379c1c9195b5f0c9a693e7a581e6b214f and as far as +i remember the reason was that signatures created with that hung Adobe +Reader, but I can't reproduce it anymore and on top of that is causing +regressions when rendering PDF files (Issue #1070) so restore it. +--- + poppler/Annot.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/poppler/Annot.cc b/poppler/Annot.cc +index 5287b4dc..40b1085a 100644 +--- a/poppler/Annot.cc ++++ b/poppler/Annot.cc +@@ -2852,6 +2852,7 @@ static GfxFont *createAnnotDrawFont(XRef *xref, Dict *fontParentDict, const char + Dict *fontDict = new Dict(xref); + fontDict->add("BaseFont", Object(objName, fontname)); + fontDict->add("Subtype", Object(objName, "Type1")); ++ fontDict->add("Encoding", Object(objName, "WinAnsiEncoding")); + + Object fontsDictObj = fontParentDict->lookup("Font"); + if (!fontsDictObj.isDict()) { +-- +2.31.1 + diff --git a/SOURCES/poppler-gcc11.patch b/SOURCES/poppler-gcc11.patch new file mode 100644 index 0000000..1a78020 --- /dev/null +++ b/SOURCES/poppler-gcc11.patch @@ -0,0 +1,27 @@ +diff --git a/glib/poppler-enums.c.template b/glib/poppler-enums.c.template +index 26a51b4..27be2b9 100644 +--- a/glib/poppler-enums.c.template ++++ b/glib/poppler-enums.c.template +@@ -15,7 +15,7 @@ + GType + @enum_name@_get_type (void) + { +- static volatile gsize g_define_type_id__volatile = 0; ++ static gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) { + static const G@Type@Value values[] = { + +diff --git a/glib/poppler-private.h b/glib/poppler-private.h +index 7726ec7..436bca5 100644 +--- a/glib/poppler-private.h ++++ b/glib/poppler-private.h +@@ -167,7 +167,7 @@ gboolean _poppler_convert_pdf_date_to_gtime (const GooString *date, + #define POPPLER_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) \ + GType type_name##_get_type(void) \ + { \ +- static volatile gsize g_define_type_id__volatile = 0; \ ++ static gsize g_define_type_id__volatile = 0; \ + if (g_once_init_enter(&g_define_type_id__volatile)) { \ + GType g_define_type_id = g_boxed_type_register_static(g_intern_static_string(#TypeName), (GBoxedCopyFunc)copy_func, (GBoxedFreeFunc)free_func); \ + g_once_init_leave(&g_define_type_id__volatile, g_define_type_id); \ diff --git a/SPECS/poppler.spec b/SPECS/poppler.spec new file mode 100644 index 0000000..56b52d7 --- /dev/null +++ b/SPECS/poppler.spec @@ -0,0 +1,1148 @@ +%global test_date 2021-06-14 + +Summary: PDF rendering library +Name: poppler +Version: 21.01.0 +Release: 12%{?dist} +License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT +URL: http://poppler.freedesktop.org/ +Source0: http://poppler.freedesktop.org/poppler-%{version}.tar.xz +# git archive --prefix test/ +Source1: %{name}-test-%{test_date}.tar.xz + +# https://bugzilla.redhat.com/show_bug.cgi?id=1185007 +Patch0: poppler-0.30.0-rotated-words-selection.patch + +Patch1: poppler-0.90.0-position-independent-code.patch + +# Bogus volatiles detected by gcc-11 +Patch2: %{name}-gcc11.patch + +Patch3: poppler-21.01.0-glib-introspection.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1944726 +Patch4: poppler-21.01.0-nss.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1968289 +Patch5: poppler-21.01.0-show-annotation-text.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1967967 +Patch6: poppler-21.01.0-covscan.patch + +BuildRequires: make +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: gettext-devel +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(cairo-ft) +BuildRequires: pkgconfig(cairo-pdf) +BuildRequires: pkgconfig(cairo-ps) +BuildRequires: pkgconfig(cairo-svg) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(gdk-pixbuf-2.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gtk-doc) +BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libopenjp2) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libtiff-4) +BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(poppler-data) +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Test) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5Xml) + +Requires: poppler-data + +Obsoletes: poppler-glib-demos < 0.60.1-1 + +%description +%{name} is a PDF rendering library. + +%package devel +Summary: Libraries and headers for poppler +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +You should install the poppler-devel package if you would like to +compile applications based on poppler. + +%package glib +Summary: Glib wrapper for poppler +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description glib +%{summary}. + +%package glib-devel +Summary: Development files for glib wrapper +Requires: %{name}-glib%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Suggests: %{name}-doc = %{version}-%{release} + +%description glib-devel +%{summary}. + +%package glib-doc +Summary: Documentation for glib wrapper +BuildArch: noarch + +%description glib-doc +%{summary}. + +%package qt5 +Summary: Qt5 wrapper for poppler +Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-qt < 0.90.0-9 +%description qt5 +%{summary}. + +%package qt5-devel +Summary: Development files for Qt5 wrapper +Requires: %{name}-qt5%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: qt5-qtbase-devel +Obsoletes: %{name}-qt-devel < 0.90.0-9 +%description qt5-devel +%{summary}. + +%package cpp +Summary: Pure C++ wrapper for poppler +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description cpp +%{summary}. + +%package cpp-devel +Summary: Development files for C++ wrapper +Requires: %{name}-cpp%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description cpp-devel +%{summary}. + +%package utils +Summary: Command line utilities for converting PDF files +Requires: %{name}%{?_isa} = %{version}-%{release} +%description utils +Command line tools for manipulating PDF files and converting them to +other formats. + +%prep +%autosetup -p1 -b 1 + +chmod -x poppler/CairoFontEngine.cc + +%build +%cmake \ + -DENABLE_CMS=lcms2 \ + -DENABLE_DCTDECODER=libjpeg \ + -DENABLE_GTK_DOC=ON \ + -DENABLE_LIBOPENJPEG=openjpeg2 \ + -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \ + -DENABLE_ZLIB=OFF \ + .. +%cmake_build + +%install +%cmake_install + +%check +%make_build test + +# verify pkg-config sanity/version +export PKG_CONFIG_PATH=%{buildroot}%{_datadir}/pkgconfig:%{buildroot}%{_libdir}/pkgconfig +test "$(pkg-config --modversion poppler)" = "%{version}" +test "$(pkg-config --modversion poppler-cpp)" = "%{version}" +test "$(pkg-config --modversion poppler-glib)" = "%{version}" +test "$(pkg-config --modversion poppler-qt5)" = "%{version}" + +%ldconfig_scriptlets + +%ldconfig_scriptlets glib + +%ldconfig_scriptlets qt5 + +%ldconfig_scriptlets cpp + +%files +%doc README.md +%license COPYING +%{_libdir}/libpoppler.so.106* + +%files devel +%{_libdir}/pkgconfig/poppler.pc +%{_libdir}/libpoppler.so +%dir %{_includedir}/poppler/ +# xpdf headers +%{_includedir}/poppler/*.h +%{_includedir}/poppler/fofi/ +%{_includedir}/poppler/goo/ +%{_includedir}/poppler/splash/ + +%files glib +%{_libdir}/libpoppler-glib.so.8* +%{_libdir}/girepository-1.0/Poppler-0.18.typelib + +%files glib-devel +%{_libdir}/pkgconfig/poppler-glib.pc +%{_libdir}/libpoppler-glib.so +%{_datadir}/gir-1.0/Poppler-0.18.gir +%{_includedir}/poppler/glib/ + +%files glib-doc +%license COPYING +%{_datadir}/gtk-doc/ + +%files qt5 +%{_libdir}/libpoppler-qt5.so.1* + +%files qt5-devel +%{_libdir}/libpoppler-qt5.so +%{_libdir}/pkgconfig/poppler-qt5.pc +%{_includedir}/poppler/qt5/ + +%files cpp +%{_libdir}/libpoppler-cpp.so.0* + +%files cpp-devel +%{_libdir}/pkgconfig/poppler-cpp.pc +%{_libdir}/libpoppler-cpp.so +%{_includedir}/poppler/cpp + +%files utils +%{_bindir}/pdf* +%{_mandir}/man1/* + +%changelog +* Tue Aug 10 2021 Mohan Boddu - 21.01.0-12 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Thu Jun 17 2021 Marek Kasik - 21.01.0-11 +- Backport fixes for issues found by Coverity Scan +- and fix some of the new issues +- Resolves: #1967967 + +* Mon Jun 14 2021 Marek Kasik - 21.01.0-10 +- Fix showing of upper-case non-ASCII characters in annotations +- Resolves: #1968289 + +* Mon Jun 14 2021 Marek Kasik - 21.01.0-9 +- Remove searchAcrossLines.pdf due to license +- Resolves: #1967921 + +* Mon May 10 2021 Marek Kasik - 21.01.0-8 +- Implement crypto functions using NSS +- Resolves: #1944726 + +* Fri Apr 16 2021 Mohan Boddu - 21.01.0-7 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Mar 30 2021 Jonathan Wakely - 21.01.0-6 +- Rebuilt for removed libstdc++ symbol (#1937698) + +* Tue Feb 9 2021 Marek Kasik - 21.01.0-5 +- Obsolete Qt4 frontend +- Resolves: #1926010 + +* Wed Jan 27 2021 Fedora Release Engineering - 21.01.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 15 2021 Marek Kasik - 21.01.0-3 +- Improve the previous fix +- Resolves: #1915776 + +* Wed Jan 13 2021 Marek Kasik - 21.01.0-2 +- Fix multilib property of poppler-glib +- by using the same build directory for all architectures +- Resolves: #1915776 + +* Mon Jan 11 2021 Marek Kasik - 21.01.0-1 +- Update to 21.01.0 +- Remove the Qt4 frontend +- Resolves: #1673727 + +* Mon Dec 07 2020 Marek Kasik - 0.90.0-8 +- Build Qt4 frontend on Fedora only + +* Sat Oct 31 2020 Jeff Law - 0.90.0-7 +- Fix bogus volatiles caught by gcc-11 + +* Tue Aug 04 2020 Marek Kasik - 0.90.0-6 +- Align poppler with +- https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds +- Resolves: #1865248 + +* Sat Aug 01 2020 Fedora Release Engineering - 0.90.0-5 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.90.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Marek Kasik - 0.90.0-3 +- Fix some other issues. +- Resolves: #1673727 + +* Fri Jul 10 2020 Marek Kasik - 0.90.0-2 +- Compile poppler with position independent code turned on. +- Otherwise it doesn't build on Fedora 33. +- Resolves: #1673727 + +* Wed Jul 08 2020 Marek Kasik - 0.90.0-1 +- Update to 0.90.0 +- Resolves: #1673727 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.84.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 17 2020 Marek Kasik - 0.84.0-1 +- Update to 0.84.0 +- Resolves: #1673727 + +* Fri Dec 20 2019 Marek Kasik - 0.73.0-15 +- Check scaled dimensions for 0 +- Resolves: #1785416 + +* Wed Jul 24 2019 Marek Kasik - 0.73.0-14 +- Ignore dict Length if it is broken +- Resolves: #1732342 + +* Thu May 30 2019 Marek Kasik - 0.73.0-13 +- Don't read outside of image buffer in PSOutputDev +- Resolves: #1696640 + +* Thu May 30 2019 Marek Kasik - 0.73.0-12 +- SplashXPathScanner::clipAALine: Fix crash on broken file +- Resolves: #1696640 + +* Thu May 30 2019 Marek Kasik - 0.73.0-11 +- Restrict filling of overlapping boxes in Splash +- Resolves: #1696640 + +* Wed May 29 2019 Marek Kasik - 0.73.0-10 +- Fail gracefully if not all components of JPEG2000Stream +- have the same size +- Resolves: #1713585 + +* Wed Apr 17 2019 Marek Kasik - 0.73.0-9 +- Fix infinite loop in broken files +- Resolves: #1699863 + +* Mon Apr 1 2019 Marek Kasik - 0.73.0-8 +- Constrain number of cycles in rescale filter +- Compute correct coverage values for box filter +- Resolves: #1686803 + +* Mon Apr 1 2019 Marek Kasik - 0.73.0-7 +- Fix stack overflow on broken file +- Resolves: #1691725 + +* Mon Mar 11 2019 Marek Kasik - 0.73.0-6 +- Fix possible crash on broken files in ImageStream::getLine() +- Resolves: #1683633 + +* Fri Mar 8 2019 Marek Kasik - 0.73.0-5 +- Synchronize previous patch with upstream +- Related: #1665274 + +* Wed Feb 20 2019 Marek Kasik - 0.73.0-4 +- Check Catalog from XRef for being a Dict +- Resolves: #1665274 + +* Wed Feb 20 2019 Marek Kasik - 0.73.0-3 +- Defend against requests for negative XRef indices +- Resolves: #1672420 + +* Sat Feb 02 2019 Fedora Release Engineering - 0.73.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 25 2019 Marek Kasik - 0.73.0-1 +- Update to 0.73.0 + +* Tue Jan 22 2019 Marek Kasik - 0.67.0-10 +- Avoid global display profile state becoming an uncontrolled +- memory leak +- Resolves: #1646549 + +* Mon Jan 21 2019 Marek Kasik - 0.67.0-9 +- Do not try to parse into unallocated XRef entry +- Resolves: #1665268 + +* Mon Jan 21 2019 Marek Kasik - 0.67.0-8 +- Move the fileSpec.dictLookup call inside fileSpec.isDict if +- Resolves: #1665264 + +* Mon Jan 21 2019 Marek Kasik - 0.67.0-7 +- Do not try to construct invalid rich media annotation assets +- Resolves: #1665260 + +* Thu Nov 15 2018 Marek Kasik - 0.67.0-6 +- Check for valid file name of embedded file +- Resolves: #1649451 + +* Thu Nov 15 2018 Marek Kasik - 0.67.0-5 +- Check for valid embedded file before trying to save it +- Resolves: #1649441 + +* Thu Nov 15 2018 Marek Kasik - 0.67.0-4 +- Check for stream before calling stream methods +- when saving an embedded file +- Resolves: #1649436 + +* Mon Nov 12 2018 Marek Kasik - 0.67.0-3 +- Avoid cycles in PDF parsing +- Resolves: #1626620 + +* Wed Oct 17 2018 Marek Kasik - 0.67.0-2 +- Fix crash on missing embedded file +- Resolves: #1569334 + +* Tue Aug 14 2018 Marek Kasik - 0.67.0-1 +- Update to 0.67.0 +- Resolves: #1568641 + +* Tue Aug 7 2018 Marek Kasik - 0.63.0-8 +- Fix tiling patterns when pattern cell is too far +- Resolves: #1557355 + +* Tue Jul 31 2018 Florian Weimer - 0.63.0-7 +- Rebuild with fixed binutils + +* Fri Jul 27 2018 Igor Gnatenko - 0.63.0-6 +- Rebuild for new binutils + +* Thu Jul 26 2018 Marek Kasik - 0.63.0-5 +- Fix crash when Object has negative number (CVE-2018-13988) +- Resolves: #1607461 + +* Mon Jul 23 2018 Marek Kasik - 0.63.0-4 +- Use /usr/bin/python3 explicitly +- https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3#Transition_Steps +- Resolves: #1605490 + +* Fri Jul 13 2018 Fedora Release Engineering - 0.63.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon May 28 2018 Marek Kasik - 0.63.0-2 +- Fix infinite recursion (CVE-2017-18267) +- Resolves: #1578780 + +* Fri Mar 23 2018 Marek Kasik - 0.63.0-1 +- Update to 0.63.0 +- Resolves: #1558001 + +* Wed Mar 07 2018 Rex Dieter - 0.62.0-2 +- BR: gcc-c++, use %%ldconfig_scriptlets %%make_build %%make_install + +* Wed Feb 14 2018 David Tardon - 0.62.0-1 +- new upstream release + +* Fri Feb 09 2018 Fedora Release Engineering - 0.61.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Nov 14 2017 David Tardon - 0.61.1-1 +- new upstream release + +* Mon Nov 06 2017 David Tardon - 0.61.0-1 +- new upstream release + +* Tue Oct 24 2017 Rex Dieter - 0.60.1-2 +- -qt5: drop hard-coded versioned dependency + +* Wed Oct 04 2017 David Tardon - 0.60.0-1 +- new upstream release + +* Mon Sep 25 2017 Caolán McNamara - 0.59.0-2 +- Resolves: rhbz#1494583 CVE-2017-14520 + +* Mon Sep 04 2017 David Tardon - 0.59.0-1 +- new upstream release + +* Thu Aug 03 2017 David Tardon - 0.57.0-1 +- new upstream release + +* Thu Aug 03 2017 Fedora Release Engineering - 0.56.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.56.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 12 2017 Caolán McNamara - 0.56.0-2 +- Resolves: rhbz#1459067 CVE-2017-7515 CVE-2017-9775 CVE-2017-9776 CVE-2017-9865 + +* Fri Jun 23 2017 David Tardon - 0.56.0-1 +- new upstream release + +* Tue May 30 2017 Caolán McNamara - 0.55.0-2 +- Resolves: rhbz#1456828 CVE-2017-7511 Null pointer deference + +* Tue May 23 2017 David Tardon - 0.55.0-1 +- new upstream release + +* Mon Mar 20 2017 David Tardon - 0.53.0-1 +- new upstream release + +* Fri Feb 17 2017 David Tardon - 0.52.0-1 +- new upstream release + +* Sat Feb 11 2017 Fedora Release Engineering - 0.51.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Jan 16 2017 Caolán McNamara - 0.51.0-1 +- new upstream release + +* Fri Dec 16 2016 David Tardon - 0.50.0-1 +- new upstream release + +* Tue Nov 22 2016 David Tardon - 0.49.0-1 +- new upstream release + +* Fri Oct 21 2016 Marek Kasik - 0.48.0-1 +- Update to 0.48.0 +- Resolves: #1359555 + +* Mon Sep 26 2016 Marek Kasik - 0.45.0-2 +- Don't crash when calling cmsGetColorSpace() +- Resolves: #1363669 + +* Mon Jul 18 2016 Marek Kasik - 0.45.0-1 +- Update to 0.45.0 +- Resolves: #1338421 + +* Mon Jul 11 2016 Marek Kasik - 0.43.0-2 +- Restore the current position of char also in output device +- Related: #1352717 + +* Tue May 3 2016 Marek Kasik - 0.43.0-1 +- Update to 0.43.0 +- Resolves: #1318462 + +* Fri Feb 26 2016 Marek Kasik - 0.41.0-1 +- Update to 0.41.0 +- Resolves: #1309145 + +* Thu Feb 04 2016 Fedora Release Engineering - 0.40.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 22 2016 Marek Kasik - 0.40.0-1 +- Update to 0.40.0 +- Resolves: #1251781 + +* Wed Jul 22 2015 Marek Kasik - 0.34.0-1 +- Update to 0.34.0 +- Resolves: #1241305 + +* Thu Jun 18 2015 Fedora Release Engineering - 0.33.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Jun 5 2015 Marek Kasik - 0.33.0-1 +- Update to 0.33.0 +- Resolves: #1190427 + +* Sat May 02 2015 Kalev Lember - 0.30.0-5 +- Rebuilt for GCC 5 C++11 ABI change + +* Thu Mar 26 2015 Marek Kasik - 0.30.0-4 +- Respect orientation when selecting words +- Resolves: #1185007 + +* Sat Feb 21 2015 Till Maas - 0.30.0-3 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Fri Jan 23 2015 Marek Kasik - 0.30.0-2 +- Use libopenjpeg2 instead of libopenjpeg + +* Fri Jan 23 2015 Marek Kasik - 0.30.0-1 +- Update to 0.30.0 +- Resolves: #1171056 + +* Tue Jan 20 2015 Marek Kasik - 0.28.1-3 +- Revert previous commit (It needs poppler-0.30.0) + +* Tue Jan 20 2015 Marek Kasik - 0.28.1-2 +- Use libopenjpeg2 instead of libopenjpeg + +* Fri Nov 14 2014 Marek Kasik - 0.28.1-1 +- Update to 0.28.1 +- Resolves: #1147443 + +* Wed Aug 27 2014 Marek Kasik - 0.26.4-1 +- Update to 0.26.4 + +* Sun Aug 17 2014 Fedora Release Engineering - 0.26.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Jul 30 2014 Marek Kasik - 0.26.3-1 +- Update to 0.26.3 + +* Tue Jul 22 2014 Kalev Lember - 0.26.2-2 +- Rebuilt for gobject-introspection 1.41.4 + +* Fri Jun 27 2014 Marek Kasik - 0.26.2-1 +- Update to 0.26.2 + +* Sat Jun 07 2014 Fedora Release Engineering - 0.26.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue May 13 2014 Marek Kasik - 0.26.0-1 +- Update to 0.26.0 + +* Fri Jan 3 2014 Marek Kasik - 0.24.3-3 +- Use correct format string +- Resolves: #1048202 + +* Mon Nov 11 2013 Rex Dieter 0.24.3-2 +- rebuild (qt5 qreal/arm) + +* Tue Oct 29 2013 Marek Kasik - 0.24.3-1 +- Update to 0.24.3 +- Resolves: #1023712 + +* Fri Oct 18 2013 Rex Dieter - 0.24.2-4 +- fix mocversiongrep configure checks (so Qt 5.2 works) +- %%configure --disable-silent-rules + +* Fri Oct 18 2013 Rex Dieter 0.24.2-3 +- undo ExcludeArch: ppc ppc64 (qt5-qtbase-5.1.1-6+ fixed) + +* Thu Oct 17 2013 Rex Dieter 0.24.2-2 +- -qt5: ExcludeArch: ppc ppc64 (f20, hopefully temporary) + +* Mon Sep 30 2013 Marek Kasik - 0.24.2-1 +- Update to 0.24.2 + +* Mon Sep 30 2013 Marek Kasik - 0.24.1-2 +- Don't convert pdftohtml.1 to UTF-8, it is already UTF-8 + +* Tue Aug 27 2013 Marek Kasik - 0.24.1-1 +- Update to 0.24.1 + +* Tue Aug 20 2013 Marek Kasik - 0.24.0-2 +- Fix Qt5 requirements + +* Mon Aug 19 2013 Marek Kasik - 0.24.0-1 +- Update to 0.24.0 + +* Sun Aug 04 2013 Fedora Release Engineering - 0.22.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Jun 24 2013 Marek Kasik 0.22.5-1 +- Update to 0.22.5 + +* Thu Jun 20 2013 Marek Kasik 0.22.1-5 +- Switch from LCMS to LCMS2 +- Resolves: #975465 + +* Wed Jun 5 2013 Marek Kasik 0.22.1-4 +- Fix changelog dates + +* Fri Apr 12 2013 Marek Kasik 0.22.1-3 +- Enable generating of TIFF files by pdftoppm + +* Thu Apr 11 2013 Marek Kasik 0.22.1-2 +- Fix man pages of pdftops and pdfseparate + +* Wed Feb 27 2013 Marek Kasik 0.22.1-1 +- Update to 0.22.1 + +* Thu Feb 14 2013 Fedora Release Engineering - 0.22.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jan 20 2013 Rex Dieter 0.22.0-2 +- -demos: omit extraneous (and broken) dep + +* Fri Jan 18 2013 Marek Kasik 0.22.0-1 +- Update to 0.22.0 + +* Tue Nov 13 2012 Marek Kasik 0.20.2-9 +- Move poppler-glib-demo to new sub-package demos +- Resolves: #872338 + +* Mon Nov 12 2012 Marek Kasik 0.20.2-8 +- Add references to corresponding bugs for poppler-0.20.3-5.patch + +* Tue Nov 6 2012 Marek Kasik 0.20.2-7 +- Add missing hunk to patch poppler-0.20.3-5.patch + +* Tue Nov 6 2012 Marek Kasik 0.20.2-6 +- Backport most of the changes from poppler-0.20.3 - poppler-0.20.5 +- (those which doesn't change API or ABI and are important) +- See poppler-0.20.3-5.patch for detailed list of included commits + +* Wed Oct 31 2012 Marek Kasik 0.20.2-5 +- Remove unused patch + +* Wed Oct 31 2012 Marek Kasik 0.20.2-4 +- Update License field + +* Mon Aug 6 2012 Marek Kasik 0.20.2-3 +- Fix conversion to ps when having multiple strips + +* Mon Aug 6 2012 Marek Kasik 0.20.2-2 +- Make sure xScale and yScale are always initialized +- Resolves: #840515 + +* Mon Aug 6 2012 Marek Kasik 0.20.2-1 +- Update to 0.20.2 + +* Mon Aug 6 2012 Marek Kasik 0.20.1-3 +- Try empty string instead of NULL as password if needed +- Resolves: #845578 + +* Sat Jul 21 2012 Fedora Release Engineering - 0.20.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 2 2012 Marek Kasik 0.20.1-1 +- Update to 0.20.1 + +* Mon Jun 25 2012 Nils Philippsen +- license is "GPLv2 or GPLv3" from poppler-0.20.0 on (based off xpdf-3.03) + +* Wed May 16 2012 Marek Kasik 0.20.0-1 +- Update to 0.20.0 + +* Fri May 4 2012 Marek Kasik 0.18.4-3 +- Backport of a patch which sets mask matrix before drawing an image with a mask +- Resolves: #817378 + +* Tue Feb 28 2012 Fedora Release Engineering - 0.18.4-2 +- Rebuilt for c++ ABI breakage + +* Sat Feb 18 2012 Rex Dieter 0.18.4-1 +- 0.18.4 + +* Thu Feb 09 2012 Rex Dieter 0.18.3-3 +- rebuild (openjpeg) + +* Tue Jan 17 2012 Rex Dieter 0.18.3-2 +- -devel: don't own all headers + +* Mon Jan 16 2012 Rex Dieter 0.18.3-1 +- 0.18.3 + +* Sat Jan 14 2012 Fedora Release Engineering - 0.18.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 06 2011 Marek Kasik - 0.18.2-1 +- Update to 0.18.2 +- Remove upstreamed patches + +* Mon Dec 05 2011 Adam Jackson 0.18.1-3 +- Rebuild for new libpng + +* Fri Oct 28 2011 Rex Dieter 0.18.1-2 +- poppler-glib.pc pkgconfig file broken (#749898) +- %%check: verify pkgconfig sanity + +* Fri Oct 28 2011 Rex Dieter 0.18.1-1 +- Update to 0.18.1 +- pkgconfig-style deps +- tighten deps with %%_isa + +* Fri Sep 30 2011 Marek Kasik - 0.18.0-2 +- rebuild + +* Fri Sep 30 2011 Marek Kasik - 0.18.0-1 +- Update to 0.18.0 + +* Mon Sep 26 2011 Marek Kasik - 0.17.3-2 +- Don't include pdfextract and pdfmerge in resulting packages for now +- since they conflict with packages pdfmerge and mupdf (#740906) + +* Mon Sep 19 2011 Marek Kasik - 0.17.3-1 +- Update to 0.17.3 + +* Wed Aug 17 2011 Marek Kasik - 0.17.0-2 +- Fix a problem with freeing of memory in PreScanOutputDev (#730941) + +* Fri Jul 15 2011 Marek Kasik - 0.17.0-1 +- Update to 0.17.0 + +* Thu Jun 30 2011 Rex Dieter 0.16.7-1 +- 0.16.7 + +* Wed Jun 22 2011 Marek Kasik - 0.16.6-2 +- Drop dependency on gtk-doc (#604412) + +* Thu Jun 2 2011 Marek Kasik - 0.16.6-1 +- Update to 0.16.6 + +* Thu May 5 2011 Marek Kasik - 0.16.5-1 +- Update to 0.16.5 + +* Thu Mar 31 2011 Marek Kasik - 0.16.4-1 +- Update to 0.16.4 + +* Sun Mar 13 2011 Marek Kasik - 0.16.3-2 +- Update to 0.16.3 + +* Sun Mar 13 2011 Marek Kasik - 0.16.3-1 +- Update to 0.16.3 + +* Wed Feb 09 2011 Fedora Release Engineering - 0.16.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Feb 2 2011 Marek Kasik - 0.16.2-1 +- Update to 0.16.2 + +* Tue Jan 18 2011 Rex Dieter - 0.16.0-3 +- drop qt3 bindings +- rename -qt4 -> -qt + +* Wed Jan 12 2011 Rex Dieter - 0.16.0-2 +- rebuild (openjpeg) + +* Mon Dec 27 2010 Rex Dieter - 0.16.0-1 +- 0.16.0 + +* Fri Dec 10 2010 Marek Kasik - 0.15.3-1 +- Update to 0.15.3 + +* Mon Nov 1 2010 Marek Kasik - 0.15.1-1 +- Update to 0.15.1 +- Remove CVE-2010-3702, 3703 and 3704 patches (they are already in 0.15.1) + +* Thu Oct 7 2010 Marek Kasik - 0.15.0-5 +- Add poppler-0.15.0-CVE-2010-3702.patch + (Properly initialize parser) +- Add poppler-0.15.0-CVE-2010-3703.patch + (Properly initialize stack) +- Add poppler-0.15.0-CVE-2010-3704.patch + (Fix crash in broken pdf (code < 0)) +- Resolves: #639861 + +* Wed Sep 29 2010 jkeating - 0.15.0-4 +- Rebuilt for gcc bug 634757 + +* Mon Sep 27 2010 Marek Kasik - 0.15.0-3 +- Remove explicit requirement of gobject-introspection + +* Fri Sep 24 2010 Marek Kasik - 0.15.0-2 +- Move requirement of gobject-introspection to glib sub-package + +* Fri Sep 24 2010 Marek Kasik - 0.15.0-1 +- Update to 0.15.0 +- Enable introspection + +* Sat Sep 11 2010 Rex Dieter - 0.14.3-1 +- Update to 0.14.3 + +* Thu Aug 19 2010 Marek Kasik - 0.14.2-1 +- Update to 0.14.2 +- Remove poppler-0.12.1-objstream.patch + +* Fri Jul 16 2010 Marek Kasik - 0.14.1-1 +- Update to 0.14.1 +- Don't apply poppler-0.12.1-objstream.patch, it is not needed anymore + +* Fri Jun 18 2010 Matthias Clasen - 0.14.0-1 +- Update to 0.14.0 + +* Wed May 26 2010 Marek Kasik - 0.13.4-1 +- poppler-0.13.4 + +* Mon May 3 2010 Marek Kasik - 0.13.3-2 +- Update "sources" file +- Add BuildRequires "gettext-devel" + +* Fri Apr 30 2010 Marek Kasik - 0.13.3-1 +- poppler-0.13.3 + +* Thu Mar 4 2010 Marek Kasik - 0.12.4-2 +- Fix showing of radio buttons (#480868) + +* Thu Feb 18 2010 Rex Dieter - 0.12.4-1 +- popper-0.12.4 + +* Tue Feb 16 2010 Marek Kasik - 0.12.3-9 +- Fix downscaling of rotated pages (#563353) + +* Thu Jan 28 2010 Marek Kasik - 0.12.3-8 +- Get current FcConfig before using it (#533992) + +* Sun Jan 24 2010 Rex Dieter - 0.12.3-7 +- use alternative/upstream downscale patch (#556549, fdo#5589) + +* Wed Jan 20 2010 Marek Kasik - 0.12.3-6 +- Add dependency on poppler-data (#553991) + +* Tue Jan 19 2010 Rex Dieter - 0.12.3-5 +- cairo backend, scale images correctly (#556549, fdo#5589) + +* Fri Jan 15 2010 Rex Dieter - 0.12.3-4 +- Sanitize versioned Obsoletes/Provides + +* Fri Jan 15 2010 Marek Kasik - 0.12.3-3 +- Correct permissions of goo/GooTimer.h +- Convert pdftohtml.1 to utf8 +- Make the pdftohtml's Provides/Obsoletes versioned + +* Thu Jan 07 2010 Rex Dieter - 0.12.3-1 +- poppler-0.12.3 + +* Mon Nov 23 2009 Rex Dieter - 0.12.2-1 +- poppler-0.12.2 + +* Sun Oct 25 2009 Rex Dieter - 0.12.1-3 +- CVE-2009-3607 poppler: create_surface_from_thumbnail_data + integer overflow (#526924) + +* Mon Oct 19 2009 Rex Dieter - 0.12.1-1 +- poppler-0.12.1 +- deprecate xpdf/pdftohtml Conflicts/Obsoletes + +* Wed Sep 09 2009 Rex Dieter - 0.12.0-1 +- Update to 0.12.0 + +* Tue Aug 18 2009 Rex Dieter - 0.11.3-1 +- Update to 0.11.3 + +* Mon Aug 3 2009 Matthias Clasen - 0.11.2-1 +- Update to 0.11.2 + +* Sun Jul 26 2009 Fedora Release Engineering - 0.11.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jun 23 2009 Rex Dieter - 0.11.1-2 +- omit poppler-data (#507675) + +* Tue Jun 23 2009 Rex Dieter - 0.11.1-1 +- poppler-0.11.1 + +* Mon Jun 22 2009 Rex Dieter - 0.11.0-6 +- reduce lib deps in qt/qt4 pkg-config support + +* Sat Jun 20 2009 Rex Dieter - 0.11.0-5 +- --enable-libjpeg +- (explicitly) --disable-zlib + +* Fri Jun 19 2009 Rex Dieter - 0.11.0-3 +- --enable-libopenjpeg, --disable-zlib + +* Sun May 24 2009 Rex Dieter - 0.11.0-2 +- update changelog +- track sonames + +* Tue May 19 2009 Bastien Nocera - 0.11.0-1 +- Update to 0.11.0 + +* Thu Mar 12 2009 Matthias Clasen - 0.10.5-1 +- Update to 0.10.5 + +* Thu Feb 26 2009 Fedora Release Engineering - 0.10.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Feb 17 2009 Matthias Clasen - 0.10.4-1 +- Update to 0.10.4 + +* Tue Jan 20 2009 Rex Dieter - 0.10.3-2 +- add needed scriptlets +- nuke rpaths + +* Tue Jan 13 2009 Matthias Clasen - 0.10.3-1 +- Update to 0.10.3 + +* Wed Dec 17 2008 Matthias Clasen - 0.10.2-1 +- Update to 0.10.2 + +* Tue Nov 11 2008 Matthias Clasen - 0.10.1-1 +- Update to 0.10.1 and -data 0.2.1 + +* Tue Sep 16 2008 Rex Dieter - 0.8.7-2 +- cleanup qt3 hack +- %%description cosmetics + +* Sun Sep 7 2008 Matthias Clasen - 0.8.7-1 +- Update to 0.8.7 + +* Fri Aug 22 2008 Matthias Clasen - 0.8.6-1 +- Update to 0.8.6 + +* Tue Aug 05 2008 Colin Walters - 0.8.5-1 +- Update to 0.8.5 + +* Wed Jun 4 2008 Matthias Clasen - 0.8.3-1 +- Update to 0.8.3 + +* Mon Apr 28 2008 Matthias Clasen - 0.8.1-1 +- Update to 0.8.1 + +* Sun Apr 06 2008 Adam Jackson 0.8.0-3 +- poppler-0.8.0-ocg-crash.patch: Fix a crash when no optional content + groups are defined. +- Mangle configure to account for the new directory for qt3 libs. +- Fix grammar in %%description. + +* Tue Apr 01 2008 Rex Dieter - 0.8.0-2 +- -qt-devel: Requires: qt3-devel + +* Sun Mar 30 2008 Matthias Clasen - 0.8.0-1 +- Update to 0.8.0 + +* Sun Mar 23 2008 Matthias Clasen - 0.7.3-1 +- Update to 0.7.3 + +* Wed Mar 12 2008 Matthias Clasen - 0.7.2-1 +- Update to 0.7.2 + +* Thu Feb 28 2008 Matthias Clasen - 0.7.1-1 +- Update to 0.7.1 + +* Thu Feb 21 2008 Matthias Clasen - 0.7.0-1 +- Update to 0.7.0 + +* Tue Feb 19 2008 Fedora Release Engineering - 0.6.4-4 +- Autorebuild for GCC 4.3 + +* Mon Feb 18 2008 Jindrich Novy - 0.6.4-3 +- apply ObjStream patch (#433090) + +* Tue Jan 29 2008 Matthias Clasen - 0.6.4-2 +- Add some required inter-subpackge deps + +* Tue Jan 29 2008 Matthias Clasen - 0.6.4-1 +- Update to 0.6.4 +- Split off poppler-glib + +* Sun Dec 2 2007 Matthias Clasen - 0.6.2-3 +- Fix the qt3 checks some more + +* Wed Nov 28 2007 Matthias Clasen - 0.6.2-2 +- package xpdf headers in poppler-devel (Jindrich Novy) +- Fix qt3 detection (Denis Leroy) + +* Thu Nov 22 2007 Matthias Clasen - 0.6.2-1 +- Update to 0.6.2 + +* Thu Oct 11 2007 Rex Dieter - 0.6-2 +- include qt4 wrapper + +* Tue Sep 4 2007 Kristian Høgsberg - 0.6-1 +- Update to 0.6 + +* Wed Aug 15 2007 Matthias Clasen - 0.5.91-2 +- Remove debug spew + +* Tue Aug 14 2007 Matthias Clasen - 0.5.91-1 +- Update to 0.5.91 + +* Wed Aug 8 2007 Matthias Clasen - 0.5.9-2 +- Update the license field + +* Mon Jun 18 2007 Matthias Clasen - 0.5.9-1 +- Update to 0.5.9 + +* Thu Mar 1 2007 Bill Nottingham - 0.5.4-7 +- fix it so the qt pkgconfig/.so aren't in the main poppler-devel + +* Fri Dec 15 2006 Matthias Clasen - 0.5.4-5 +- Include epoch in the Provides/Obsoletes for xpdf-utils + +* Wed Dec 13 2006 Matthias Clasen - 0.5.4-4 +- Add Provides/Obsoletes for xpdf-utils (#219033) + +* Fri Dec 08 2006 Rex Dieter - 0.5.4-3 +- drop hard-wired: Req: gtk2 +- --disable-static +- enable qt wrapper +- -devel: Requires: pkgconfig + +* Sun Oct 01 2006 Jesse Keating - 0.5.4-2 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Thu Sep 21 2006 Kristian Høgsberg - 0.5.4-1.fc6 +- Rebase to 0.5.4, drop poppler-0.5.3-libs.patch, fixes #205813, + #205549, #200613, #172137, #172138, #161293 and more. + +* Wed Sep 13 2006 Kristian Høgsberg - 0.5.3-3.fc6 +- Move .so to -devel (#203637). + +* Mon Aug 14 2006 Matthias Clasen - 0.5.3-2.fc6 +- link against fontconfig (see bug 202256) + +* Wed Jul 12 2006 Jesse Keating - 0.5.3-1.1 +- rebuild + +* Wed May 31 2006 Kristian Høgsberg 0.5.3-1 +- Update to 0.5.3. + +* Mon May 22 2006 Kristian Høgsberg 0.5.2-1 +- Update to 0.5.2. + +* Wed Mar 1 2006 Kristian Høgsberg 0.5.1-2 +- Rebuild the get rid of old soname dependency. + +* Tue Feb 28 2006 Kristian Høgsberg 0.5.1-1 +- Update to version 0.5.1. + +* Fri Feb 10 2006 Jesse Keating - 0.5.0-4.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.5.0-4.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Wed Jan 18 2006 Ray Strode - 0.5.0-4 +- change xpdf conflict version to be <= instead of < + +* Wed Jan 18 2006 Ray Strode - 0.5.0-3 +- update conflicts: xpdf line to be versioned + +* Wed Jan 11 2006 Kristian Høgsberg - 0.5.0-2.0 +- Update to 0.5.0 and add poppler-utils subpackage. +- Flesh out poppler-utils subpackage. + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Sun Sep 4 2005 Kristian Høgsberg - 0.4.2-1 +- Update to 0.4.2 and disable splash backend so we don't build it. + +* Fri Aug 26 2005 Marco Pesenti Gritti - 0.4.1-2 +- Rebuild + +* Fri Aug 26 2005 Marco Pesenti Gritti - 0.4.1-1 +- Update to 0.4.1 + +* Wed Aug 17 2005 Kristian Høgsberg - 0.4.0-2 +- Bump release and rebuild. + +* Wed Aug 17 2005 Marco Pesenti gritti - 0.4.0-1 +- Update to 0.4.0 + +* Mon Aug 15 2005 Kristian Høgsberg - 0.3.3-2 +- Rebuild to pick up new cairo soname. + +* Mon Jun 20 2005 Kristian Høgsberg - 0.3.3-1 +- Update to 0.3.3 and change to build cairo backend. + +* Sun May 22 2005 Marco Pesenti gritti - 0.3.2-1 +- Update to 0.3.2 + +* Sat May 7 2005 Marco Pesenti Gritti - 0.3.1 +- Update to 0.3.1 + +* Sat Apr 23 2005 Marco Pesenti Gritti - 0.3.0 +- Update to 0.3.0 + +* Wed Apr 13 2005 Florian La Roche +- remove empty post/postun scripts + +* Wed Apr 6 2005 Marco Pesenti Gritti - 0.2.0-1 +- Update to 0.2.0 + +* Sat Mar 12 2005 Marco Pesenti Gritti - 0.1.2-1 +- Update to 0.1.2 +- Use tar.gz because there are not bz of poppler + +* Wed Mar 2 2005 Marco Pesenti Gritti - 0.1.1-1 +- Initial build