Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 831714

Summary: net-p2p/vuze: Switch to log4j-12-api:2
Product: Gentoo Linux Reporter: Volkmar W. Pogatzki <gentoo>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: normal CC: fordfrog, liaoyuan
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/24261
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 830911    
Bug Blocks: 829192    
Attachments: build.log when dev-java/log4j-12-api:2 is used
ebuild which switches to log4j-12-api:2

Description Volkmar W. Pogatzki 2022-01-21 10:08:11 UTC
Please switch to log4j-12-api:2
Comment 1 Yuan Liao (Leo3418) 2022-02-17 19:02:30 UTC
Created attachment 765313 [details]
build.log when dev-java/log4j-12-api:2 is used

Unfortunately, this package relies on some classes that are only available in dev-java/log4j:0 and absent in dev-java/log4j-12-api:2:

compile:
    [javac] Compiling 3605 source files to /var/tmp/portage/net-p2p/vuze-5.7.6.0-r2/work/vuze-5.7.6.0
    [javac] /var/tmp/portage/net-p2p/vuze-5.7.6.0-r2/work/vuze-5.7.6.0/org/gudy/azureus2/ui/common/Main.java:46: error: package org.apache.log4j.varia does not exist
    [javac] import org.apache.log4j.varia.DenyAllFilter;
    [javac]                              ^
    [javac] /var/tmp/portage/net-p2p/vuze-5.7.6.0-r2/work/vuze-5.7.6.0/org/gudy/azureus2/ui/console/ConsoleInput.java:38: error: package org.apache.log4j.varia does not exist
    [javac] import org.apache.log4j.varia.DenyAllFilter;
    [javac]                              ^
    [javac] /var/tmp/portage/net-p2p/vuze-5.7.6.0-r2/work/vuze-5.7.6.0/org/gudy/azureus2/ui/console/commands/Log.java:21: error: cannot find symbol
    [javac] import org.apache.log4j.FileAppender;
    [javac]                        ^
    [javac]   symbol:   class FileAppender
    [javac]   location: package org.apache.log4j
    [javac] /var/tmp/portage/net-p2p/vuze-5.7.6.0-r2/work/vuze-5.7.6.0/org/gudy/azureus2/ui/console/commands/Log.java:24: error: package org.apache.log4j.varia does not exist
    [javac] import org.apache.log4j.varia.DenyAllFilter;
    [javac]                              ^
    ...
Comment 2 Yuan Liao (Leo3418) 2022-02-17 19:06:37 UTC
Created attachment 765314 [details]
ebuild which switches to log4j-12-api:2
Comment 3 Volkmar W. Pogatzki 2022-02-18 07:31:58 UTC
(In reply to "Leo" Y. Liao from comment #1)
> Created attachment 765313 [details]
> build.log when dev-java/log4j-12-api:2 is used
> 
> Unfortunately, this package relies on some classes that are only available
> in dev-java/log4j:0 and absent in dev-java/log4j-12-api:2:
> [...]

Present version is of 2017-11-02 and there is no update available. 
This package should be last-rited.
Comment 4 Miroslav Šulc gentoo-dev 2022-02-18 08:34:13 UTC
well, vuze is an app that still works and is used by users. the only issue we have with it so far is that it is not compatible with newer log4j and it's older api interface log4j-12-api. there are still 15 distributions providing this package: https://repology.org/projects/?search=vuze

there is also 1 distro providing vuze 5.7.6.1_B01. i suggest we look at other distros whether they already patched vuze for the latest log4j or at least for log4j-12-api and if so, we use their patch. if not, i might have a look at the sources how to adjust it to work with log4j-12-api.
Comment 5 Miroslav Šulc gentoo-dev 2022-02-18 08:38:20 UTC
it might also be that the class has just been moved to a different package so a change in the import might fix it:

https://logging.apache.org/log4j/log4j-2.14.1/log4j-core/apidocs/org/apache/logging/log4j/core/filter/DenyAllFilter.html
Comment 6 Yuan Liao (Leo3418) 2022-02-18 21:30:22 UTC
^

PR containing a patch which implements the idea in comment 5 has been created.  If this could save the package in question from the last-rite, please consider updating the bug title accordingly.
Comment 7 Larry the Git Cow gentoo-dev 2022-02-20 10:14:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63d98adfd4189404fa86fbef73475410f12a6f41

commit 63d98adfd4189404fa86fbef73475410f12a6f41
Author:     Yuan Liao <liaoyuan@gmail.com>
AuthorDate: 2022-02-17 18:48:06 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2022-02-20 10:10:56 +0000

    net-p2p/vuze: Switch to log4j-12-api:2, and make ebuild improvements
    
    - Update to EAPI 8
    - Switch to HTTPS URL for HOMEPAGE
    - Put dependencies into BDEPEND and IDEPEND as appropriate
    - Increase memory allotted to the JVM running javac by 192 MB, which is
      needed after the migration to log4j-12-api:2
    
    Closes: https://bugs.gentoo.org/831714
    Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/24261/commits/1a2dd6e5e73c65bbe266c58fa4f573d4e1698522
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 net-p2p/vuze/files/vuze-5.7.6.0-log4j-12-api.patch | 130 ++++++++++++++++++
 net-p2p/vuze/vuze-5.7.6.0-r2.ebuild                | 147 +++++++++++++++++++++
 2 files changed, 277 insertions(+)