Bug 272559 - textproc/xincluder: Fix processing using JDOM
Summary: textproc/xincluder: Fix processing using JDOM
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-18 02:07 UTC by Marcin Cieślak
Modified: 2023-07-22 11:26 UTC (History)
1 user (show)

See Also:


Attachments
0001-textproc-xincluder-Fix-processing-using-JDOM.patch (3.34 KB, patch)
2023-07-18 02:08 UTC, Marcin Cieślak
no flags Details | Diff
Fix processing with JDOM (5.13 KB, patch)
2023-07-21 09:36 UTC, Marcin Cieślak
no flags Details | Diff
Fix processing with JDOM (3.70 KB, patch)
2023-07-21 12:15 UTC, Marcin Cieślak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2023-07-18 02:07:27 UTC
JDOM could not be used due to mismatch between
the included JDOM beta version and what we have installed.

While here, do not include DOCTYPE statements from
the included documents into the parent.
SAX and DOM processors drop included DOCTYPE statements
and JDOM variant should do that, too.

The code will be rebuilt using Ant from source instead
of dropping jar file referring to the obsolete
methods.
Comment 1 Marcin Cieślak 2023-07-18 02:08:26 UTC
Created attachment 243448 [details]
0001-textproc-xincluder-Fix-processing-using-JDOM.patch

Patch to fix JDOM issues, bumps PORTREVISION
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-07-20 09:28:12 UTC
Build fails for me. Does it work for you?

    [javac] /wrkdirs/usr/ports/textproc/xincluder/work/xincluder/bin/src/com/elharo/xml/xinclude/JDOMXIncluder.java:609: error: cannot find symbol
    [javac]         XMLOutputter outputter = new XMLOutputter();
    [javac]                                      ^
    [javac]   symbol:   class XMLOutputter
    [javac]   location: class JDOMXIncluder
    [javac] /wrkdirs/usr/ports/textproc/xincluder/work/xincluder/bin/src/com/elharo/xml/xinclude/JDOMXIncluder.java:612: error: cannot find symbol
    [javac]                 Document input = builder.build(args[i]);
    [javac]                 ^
    [javac]   symbol:   class Document
    [javac]   location: class JDOMXIncluder
    [javac] /wrkdirs/usr/ports/textproc/xincluder/work/xincluder/bin/src/com/elharo/xml/xinclude/JDOMXIncluder.java:619: error: cannot find symbol
    [javac]                 Document output = resolve(input, base);
    [javac]                 ^
    [javac]   symbol:   class Document
    [javac]   location: class JDOMXIncluder
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 99 errors

BUILD FAILED
/wrkdirs/usr/ports/textproc/xincluder/work/xincluder/build.xml:82: Compile failed; see the compiler error output for details.

Total time: 0 seconds
*** Error code 1
Comment 3 Marcin Cieślak 2023-07-21 09:36:07 UTC
Created attachment 243518 [details]
Fix processing with JDOM

Good catch! I forgot to add build dependencies as well.

Please see the updated patch.
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2023-07-21 10:40:00 UTC
(In reply to Marcin Cieślak from comment #3)
Great, just another detail, the REINPLACE_CMD over the build.xml file is a noop.
I will delete it before committing.
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2023-07-21 10:59:18 UTC
(In reply to Fernando Apesteguía from comment #4)
Scratch that, I think it is a false positive from the framework.
Comment 6 Marcin Cieślak 2023-07-21 11:52:16 UTC
Sorry, I have to fix it the other way... Somehow I like "makepatch" less and less...
Comment 7 Marcin Cieślak 2023-07-21 12:15:55 UTC
Created attachment 243525 [details]
Fix processing with JDOM

Another attempt -

- runtime and build dependencies listed separately now (as per portlint advice)
- build.xml patched with sed only
Comment 8 commit-hook freebsd_committer freebsd_triage 2023-07-22 11:26:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=860aa846f7d9b756fc020b7efa4ed086d9675c21

commit 860aa846f7d9b756fc020b7efa4ed086d9675c21
Author:     Marcin Cieślak <saper@saper.info>
AuthorDate: 2023-07-21 14:59:58 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-07-22 11:25:48 +0000

    textproc/xincluder: Fix processing using JDOM

    JDOM could not be used due to mismatch with the included JDOM.

    PR:             272559
    Reported by:    saper@saper.info

 textproc/xincluder/Makefile                        | 18 +++++++++++++---
 ...om_elharo_xml_xinclude_JDOMXIncluder.java (new) | 24 ++++++++++++++++++++++
 2 files changed, 39 insertions(+), 3 deletions(-)
Comment 9 Fernando Apesteguía freebsd_committer freebsd_triage 2023-07-22 11:26:21 UTC
Committed,

Thanks!