This commit is contained in:
parent
37319afacf
commit
223a2b9b78
40
apache-chainsaw-xstream.patch
Normal file
40
apache-chainsaw-xstream.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- apache-chainsaw-2.1.0.orig/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java 2022-01-19 19:55:07.681030359 +0100
|
||||
+++ apache-chainsaw-2.1.0/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java 2022-01-19 20:09:50.246197879 +0100
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
public void loadSettings(LoadSettingsEvent event) {
|
||||
XStream stream = new XStream(new DomDriver());
|
||||
+ stream.allowTypes(new Class[] { ApplicationPreferenceModel.class } );
|
||||
File file = getApplicationPreferenceXMLFile(SettingsManager.getInstance().getSettingsDirectory());
|
||||
try {
|
||||
if (file.exists()) {
|
||||
--- apache-chainsaw-2.1.0.orig/src/main/java/org/apache/log4j/chainsaw/ChainsawTabbedPane.java 2022-01-19 19:55:07.681030359 +0100
|
||||
+++ apache-chainsaw-2.1.0/src/main/java/org/apache/log4j/chainsaw/ChainsawTabbedPane.java 2022-01-19 20:09:50.246197879 +0100
|
||||
@@ -167,6 +167,7 @@
|
||||
public void loadSettings(LoadSettingsEvent event) {
|
||||
File file = new File(SettingsManager.getInstance().getSettingsDirectory(), "tab-settings.xml");
|
||||
XStream stream = new XStream(new DomDriver());
|
||||
+ stream.allowTypes(new Class[] { SavableTabSetting.class } );
|
||||
try {
|
||||
if (file.exists()) {
|
||||
FileReader reader = new FileReader(file);
|
||||
--- apache-chainsaw-2.1.0.orig/src/main/java/org/apache/log4j/chainsaw/LogPanel.java 2022-01-19 19:55:07.681030359 +0100
|
||||
+++ apache-chainsaw-2.1.0/src/main/java/org/apache/log4j/chainsaw/LogPanel.java 2022-01-19 20:17:14.316974791 +0100
|
||||
@@ -2047,6 +2047,7 @@
|
||||
|
||||
if (xmlFile.exists()) {
|
||||
XStream stream = buildXStreamForLogPanelPreference();
|
||||
+ stream.allowTypes(new Class[] { LogPanelPreferenceModel.class, TableColumn.class, Point.class, Dimension.class, Vector.class, } );
|
||||
ObjectInputStream in = null;
|
||||
try {
|
||||
FileReader r = new FileReader(xmlFile);
|
||||
--- apache-chainsaw-2.1.0.orig/src/main/java/org/apache/log4j/chainsaw/prefs/MRUFileList.java 2022-01-19 19:55:07.685030381 +0100
|
||||
+++ apache-chainsaw-2.1.0/src/main/java/org/apache/log4j/chainsaw/prefs/MRUFileList.java 2022-01-19 20:09:50.250197906 +0100
|
||||
@@ -104,6 +104,7 @@
|
||||
|
||||
public static void loadLog4jMRUListFromReader(Reader reader) {
|
||||
XStream xstream = new XStream(new DomDriver());
|
||||
+ xstream.allowTypes(new Class[] { MRUFileList.class } );
|
||||
log4jList = (MRUFileList) xstream.fromXML(reader);
|
||||
fireChangeEvent();
|
||||
|
9
apache-chainsaw.desktop
Normal file
9
apache-chainsaw.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Chainsaw
|
||||
GenericName=Log4j Log Viewer
|
||||
Exec=chainsaw
|
||||
Icon=chainsaw.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Categories=Development;Monitor;X-JPackage;
|
3
apache-chainsaw.png
Normal file
3
apache-chainsaw.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c5e0a6768847fbde583d9d34a3ad378b79aa4ee11969e4dec5e500708186a878
|
||||
size 2954
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file
|
||||
# spec file for package apache-chainsaw
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
@ -26,6 +26,9 @@ License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://logging.apache.org/%{short_name}
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: %{name}.png
|
||||
Source2: %{name}.desktop
|
||||
Patch0: %{name}-xstream.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-tools
|
||||
@ -36,14 +39,14 @@ BuildRequires: mvn(com.thoughtworks.xstream:xstream)
|
||||
BuildRequires: mvn(commons-logging:commons-logging)
|
||||
BuildRequires: mvn(javax.jmdns:jmdns)
|
||||
BuildRequires: mvn(log4j:apache-log4j-extras)
|
||||
BuildRequires: mvn(log4j:log4j:1.2.16)
|
||||
BuildRequires: mvn(org.apache.ant:ant)
|
||||
BuildRequires: mvn(org.apache.commons:commons-vfs2)
|
||||
BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jms_1.1_spec)
|
||||
BuildRequires: mvn(org.apache.logging.log4j:log4j-1.2-api)
|
||||
BuildRequires: mvn(org.apache.logging:logging-parent:pom:)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
#!BuildIgnore: log4j
|
||||
BuildRequires: update-desktop-files
|
||||
Requires: apache-commons-logging
|
||||
Requires: apache-commons-vfs2
|
||||
Requires: apache-log4j-extras
|
||||
@ -71,6 +74,7 @@ Group: Documentation/HTML
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%pom_remove_plugin :maven-source-plugin
|
||||
%pom_remove_plugin :appassembler-maven-plugin
|
||||
@ -83,8 +87,6 @@ perl -pi -e 's#org\.apache\.commons\.vfs\.#org\.apache\.commons\.vfs2\.#g' \
|
||||
%pom_remove_dep org.apache.openejb:javaee-api
|
||||
%pom_remove_dep org.projectlombok:lombok
|
||||
|
||||
%pom_change_dep log4j:log4j org.apache.logging.log4j:log4j-1.2-api
|
||||
|
||||
%build
|
||||
%{mvn_build} -f -- -Dsource=8
|
||||
|
||||
@ -95,8 +97,18 @@ perl -pi -e 's#org\.apache\.commons\.vfs\.#org\.apache\.commons\.vfs2\.#g' \
|
||||
# apache-chainsaw has to be the first in order to avoid name classes in apache-log4j-extras
|
||||
%jpackage_script org.apache.log4j.chainsaw.LogUI "" "" apache-chainsaw:apache-log4j-extras:log4j12:jmdns:slf4j/api:xstream:xpp3:xpp3-minimal:commons-vfs2:commons-logging:jsch %{short_name} true
|
||||
|
||||
# freedesktop.org menu entries and icons
|
||||
mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps}
|
||||
cp -a %{SOURCE1} \
|
||||
%{buildroot}%{_datadir}/pixmaps/%{short_name}.png
|
||||
cp -a %{SOURCE2} \
|
||||
%{buildroot}%{_datadir}/applications/%{short_name}.desktop
|
||||
%suse_update_desktop_file %{short_name} Development Debugger
|
||||
|
||||
%files -f .mfiles
|
||||
%{_bindir}/%{short_name}
|
||||
%{_datadir}/applications/chainsaw.desktop
|
||||
%{_datadir}/pixmaps/chainsaw.png
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
|
Loading…
Reference in New Issue
Block a user