13 Commits

Author SHA256 Message Date
a010164c51 Accepting request 1253153 from Java:packages
3.29.0

OBS-URL: https://build.opensuse.org/request/show/1253153
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=5
2025-03-15 15:16:18 +00:00
598ddef0c5 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=18 2025-03-14 18:03:29 +00:00
8e65720eab OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=17 2025-03-14 04:50:38 +00:00
daf9046945 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=16 2025-03-14 04:44:56 +00:00
ad8d91392b OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=15 2025-03-14 04:28:34 +00:00
4ff574d25f OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=14 2025-03-14 04:13:23 +00:00
8b5b37effc OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=13 2025-03-13 20:45:04 +00:00
30a9388505 Accepting request 1207101 from Java:packages
Build the bundle module too

OBS-URL: https://build.opensuse.org/request/show/1207101
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=4
2024-10-11 15:03:21 +00:00
dae0db44aa OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=11 2024-10-11 08:42:31 +00:00
0487580416 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=10 2024-10-11 07:42:01 +00:00
94fd51407c Accepting request 1202882 from Java:packages
Simplify dependencies

OBS-URL: https://build.opensuse.org/request/show/1202882
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jline3?expand=0&rev=3
2024-09-24 15:34:23 +00:00
8f39a2a62d OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=8 2024-09-24 09:45:35 +00:00
a54cf022cf OBS-URL: https://build.opensuse.org/package/show/Java:packages/jline3?expand=0&rev=7 2024-09-24 07:13:00 +00:00
6 changed files with 478 additions and 42 deletions

View File

@@ -0,0 +1,42 @@
From 1cf3f73c9ce89d9c49985ddb8dfef33ae9fd44c8 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Wed, 26 Feb 2025 16:26:49 +0100
Subject: [PATCH] Remove optional dependency on universalchardet
---
builtins/src/main/java/org/jline/builtins/Nano.java | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/builtins/src/main/java/org/jline/builtins/Nano.java b/builtins/src/main/java/org/jline/builtins/Nano.java
index 765cea7c..47501ee1 100644
--- a/builtins/src/main/java/org/jline/builtins/Nano.java
+++ b/builtins/src/main/java/org/jline/builtins/Nano.java
@@ -47,7 +47,6 @@ import org.jline.terminal.Terminal.Signal;
import org.jline.terminal.Terminal.SignalHandler;
import org.jline.utils.*;
import org.jline.utils.InfoCmp.Capability;
-import org.mozilla.universalchardet.UniversalDetector;
import static org.jline.builtins.SyntaxHighlighter.*;
import static org.jline.keymap.KeyMap.KEYMAP_LENGTH;
@@ -249,17 +248,6 @@ public class Nano implements Editor {
}
byte[] bytes = bos.toByteArray();
- try {
- UniversalDetector detector = new UniversalDetector(null);
- detector.handleData(bytes, 0, bytes.length);
- detector.dataEnd();
- if (detector.getDetectedCharset() != null) {
- charset = Charset.forName(detector.getDetectedCharset());
- }
- } catch (Throwable t) {
- // Ignore
- }
-
// TODO: detect format, do not eat last newline
try (BufferedReader reader =
new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bytes), charset))) {
--
2.48.1

View File

@@ -0,0 +1,11 @@
--- a/native/src/main/java/org/jline/nativ/JLineNativeLoader.java
+++ b/native/src/main/java/org/jline/nativ/JLineNativeLoader.java
@@ -328,6 +328,7 @@ public class JLineNativeLoader {
// As a last resort try from java.library.path
String javaLibraryPath = System.getProperty("java.library.path", "");
+ javaLibraryPath = "@SYSTEMLIBRARYPATH@" + File.pathSeparator + javaLibraryPath;
for (String ldPath : javaLibraryPath.split(File.pathSeparator)) {
if (ldPath.isEmpty()) {
continue;

BIN
jline-3.29.0.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:610ff2fca902f006d230d05be4eb6d62f345bb64371a279d521373c7b61a6279
size 1850621

View File

@@ -1,3 +1,206 @@
-------------------------------------------------------------------
Fri Mar 14 14:06:15 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Update to upstream version 3.29.0
* Breaking changes
+ Undeprecate ConsolePrompt methods et al
* New features and improvements
+ Add text-only prompt element for console-ui
+ Dynamic console-ui prompt improvements, see #1051
* Bug Fixes
+ AnsiConsole should always obey the terminal
+ Add overloaded no-arg compile method
+ Move catch to proper place
- Update to upstream version 3.28.0
* New features and improvements
+ Dynamic console-ui prompts
+ Add a AbstractTerminal#toString() method
+ Let CommandRegistry create Candidate for completion
+ Be more specific about which command is missing when throwing
an exception
+ Add style for command description in completer
+ Enhance DefaultHighlighter to support command styling
+ Provide a simple RegistryImpl that can provide options from
LineReader
* Bug Fixes
+ InputValue prompt with mask doesn't work correctly
+ JLine exec provider should reject terminal creation on a
redirected output stream
+ Fix ConsolePrompt.prompt() throwing IOError instead of
UserInterruptedException
+ Fix possible NPE in TailTipWidgets
- Update to upstream version 3.27.1
* Bug fixes (relative)
+ Hexadecimal triple support in Jansi
+ Fix ExecPty parsing on some Alpine linux
+ Clean ShellFactoryImpl logging, add a test
+ Fix GraalVM warning
* Tasks
+ Configure central-publishing-maven-plugin manually
- Update to upstream version 3.27.0
* Changes
+ Fix tag name format for release
+ Console UI ListChoice's (relative)pageSize is never used
+ Added possibility of cancelling prompts
+ [consoleui] Make it easier to extend ConsolePrompt
+ fix typo: inMode -> outMode in ffm
- Update to upstream version 3.26.3
* Bug fixes
+ The Diag tool should display the full stack trace
+ Correcting invocation of ScrollConsoleScreenBufferW - using
pointers instead of values.
+ Fix windows-arm64 DLL name
+ IndexOutOfBoundsException in console-ui when header exceeds
size of the terminal
- Update to upstream version 3.26.2
* Bug fixes
+ Add some doc for boolean provider methods in TerminalBuider
+ INVALID_HANDLE_VALUE is a long
+ Restore the use of Integer.MAX_VALUE for display colums when
size is zero
+ Cursor badly positioned after creating Status bar
+ Build with Cmd on Windows
- Update to upstream version 3.26.1
* Changes
+ Fix interrupt signal killing application
+ Fix OutOfMemoryError when using TailTipWidget
- Update to upstream version 3.26.0
* Changes
+ Update GitHub Actions
+ In maven-wrapper.properties, sync maven version with pom.xml
+ Update maven to 3.9.6
+ Fixing the FfmTerminal to run on JDK 22 and on Linux.
+ Provide jdk8 jar by excluding the FFM support
+ Exclude directories when locating tty, test etc
+ Return early from LineReaderImpl.doList if no possibilities
or rows
+ Fix native image compilation
+ Use default sort order when custom sort order is identical
+ Disable Quick Edit Mode with mouse support
+ Don't change keybindings to emacs for dumb terminals
+ Merge ConsoleUI project into JLine
+ Don't attempt line break at last line
+ Fix remote terminal on linux/bsd
+ Warn when using a deprecated provider
+ Improve status bar drawing mechanism
+ Upgrade maven wrapper
+ Switch the nativeSignals boolean to true by default
+ Simplify graal demo
- Update to upstream version 3.25.1
* Changes
+ Fix source jars required for bundles
+ Native libraries are not embedded in JLine bundle
+ Fix NPE on windows with missing jna/jansi
+ Fix native image metadata
- Update to upstream version 3.25.0
* Changes
+ Merge Jansi library into JLine
+ Fix missing native libraries in JLine bundle
+ Avoid JDK warning when checking the exec provider
+ Improve the message when a provider cannot be used by doing
an early check and restore compatibility with Jansi 1.17
+ Provide a new Terminal InputFlag INORMEOL to normalize end of
lines
+ Add the ability to clear internal buffers
+ Use logger instead of writing to stderr
+ Fix FFM provider loading of openpty on linux
+ Add some doc about Signal.QUIT which cannot be caught by the
JVM
- Update to upstream version 3.24.1
* Changes
+ Fix broken javadoc generation
+ Restore JDK 8 runtime compatibility
+ Restore partial failure handling with stty
+ Fix git line endings
- Update to upstream version 3.24.0
* New features and enhancements
+ Add forced-out and forcer-err to force the system console to
use the output / error stream
+ Add a field / setter for the forced provider
+ Support providing default values for line reader variables
using system properties
+ Support automatic parsing of an inputrc file in jline reader
+ Add a property to customize the tab width
+ Force creation of a dumb terminal if TERM starts with dumb
+ New JNI provider
+ Switch to junit 5
+ Require JDK 11 and support JDK 21 at build time
+ Enable spotless on JDK 21
+ Support building on JDK 21
* Bug fixes
+ Make sure the thread is not in an interrupted state when
cleanup up
+ Fix cr/lf support in dumb terminals
+ AIX issue with non english locales
+ Add a property to force a given provider
+ org.jline.util.PumpReader signed byte problem
+ Fix possible OOM caused by huge repetitions of inserts
+ Improve toString() terminal rendering
+ Use simplified keymap for dumb terminal
+ Improve robustness of initial cleanup
+ Add missing space in SunOS-sparcv9_CCFLAGS
+ Fix history trim for non-timestamped files
+ Fix build on linux arm64 and add riscv64
+ Fix eol
+ Clean a bit TerminalBuilder
+ Add TerminalExt interface
+ FFM support
+ Break dependency between org.jline.terminal.impl and
org.jline.terminal.impl.exec package
+ Close Files streams using try-with-resources
+ Fix illegal reflective access in exec provider
+ Make sure libraries are binaries
+ Simplify CI
+ Builtin Less has an IndexOutOfBoundsException when seeking to
the end of the file
+ LineReader Bug
+ Add a warning when using the ExecTerminalProvider on recent
JDKs
+ Fix detection of utilities
+ Fix shell output going to stderr rather than stdout
+ Fix TerminalProvider sorting
+ Use Objects.hashCode instead of Objects.hash to avoid vararg
array creation
+ spotless: set the line endings to
- Update to upstream version 3.23.0
* Changes
+ Optimize Styles.isStylePattern() to avoid StackOverflowError
+ Use a native library to create FileDescriptors if reflection
does not allow access
+ Allow custom sort of providers, and prefer jansi by default
+ Fix restoration of Terminal at close
+ Decode alternate charset in/out sequences when building
AttributedString
+ Fix AltGr+Shift characters
+ Add missing ConEmu capabilities
+ Ioctl improvements
+ Refine color support in various environments
+ Fix signal processing on windows
+ Add autoformat using spotless
- Do not build by default the jline3-remote-ssh to avoid hard
dependency on apache-sshd. The build is still possible by
specifying --with ssh
- Do not build by default the jline3-terminal-ffm, since it
requires java >= 22. The build is still possible by specifying
--with ffm
- Added patch:
* 0001-Remove-optional-dependency-on-universalchardet.patch
+ Do not depend on the optional juniversalchardet
- Added template patch:
* Load-native-library-system-wide-place.patch.in
+ Load the native library from system-wide place
-------------------------------------------------------------------
Fri Oct 11 07:41:55 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Enable building of the module jline too
-------------------------------------------------------------------
Tue Sep 24 09:44:50 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Do not build/distribute the source jars
- Do not build the jline uber-jar that we don't use
-------------------------------------------------------------------
Thu Oct 26 05:36:04 UTC 2023 - Fridrich Strba <fstrba@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package jline3
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,29 +23,36 @@ readline/editline capabilities for modern shells (such as bash and tcsh) will\
find most of the command editing features of JLine to be familiar.\
\
JLine 3.x is an evolution of JLine 2.x.
%bcond_with ssh
%bcond_with ffm
Name: jline3
Version: 3.22.0
Version: 3.29.0
Release: 0
Summary: Java library for handling console input
License: BSD-3-Clause
Group: Development/Libraries/Java
URL: https://github.com/jline/jline3
Source0: %{url}/archive/refs/tags/jline-parent-%{version}.tar.gz
Source0: %{url}/archive/refs/tags/jline-%{version}.tar.gz
Source1: Load-native-library-system-wide-place.patch.in
Patch0: 0001-Remove-optional-dependency-on-universalchardet.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 11
BuildRequires: maven-local
BuildRequires: mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(com.googlecode.juniversalchardet:juniversalchardet)
BuildRequires: mvn(net.java.dev.jna:jna)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.fusesource.jansi:jansi)
%if %{with ssh}
BuildRequires: mvn(org.apache.sshd:sshd-core)
BuildRequires: mvn(org.apache.sshd:sshd-scp)
BuildRequires: mvn(org.apache.sshd:sshd-sftp)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.fusesource.jansi:jansi)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildArch: noarch
%endif
%if %{with ffm}
BuildRequires: java-devel >= 22
BuildConflicts: java <= 21
BuildConflicts: java-devel <= 21
BuildConflicts: java-headless <= 21
%endif
%description
JLine is a Java library for handling console input. It is similar in
@@ -58,12 +65,14 @@ JLine 3.x is an evolution of JLine 2.x.
%package parent
Summary: JLine Parent
BuildArch: noarch
%description parent
%{desc}
%package builtins
Summary: JLine Builtins
BuildArch: noarch
%description builtins
%{desc}
@@ -73,6 +82,7 @@ multiplexer, etc…
%package console
Summary: JLine Console
BuildArch: noarch
%description console
%{desc}
@@ -80,8 +90,47 @@ Summary: JLine Console
This package contains the command registry, object printer and widget
implementations.
%package console-ui
Summary: JLine Console UI
BuildArch: noarch
%description console-ui
%{desc}
This package contains the command registry, object printer and widget
implementations.
%package curses
Summary: JLine Curses
BuildArch: noarch
%description curses
%{desc}
%package jansi
Summary: Jansi Bundle
%description jansi
%{desc}
%package jansi-core
Summary: Jansi Core
BuildArch: noarch
%description jansi-core
%{desc}
%package native
Summary: JLine Native Library
%description native
%{desc}
This package contains the native library.
%package reader
Summary: JLine Reader
BuildArch: noarch
%description reader
%{desc}
@@ -90,6 +139,7 @@ This package contains the line reader (including completion, history, etc…).
%package remote-telnet
Summary: JLine Remote Telnet
BuildArch: noarch
%description remote-telnet
%{desc}
@@ -97,19 +147,32 @@ Summary: JLine Remote Telnet
This package contains the helpers for using jline over telnet (including
a telnet server implementation).
%if %{with ssh}
%package remote-ssh
Summary: JLine Remote SSH
Recommends: mvn(org.apache.sshd:scp-core)
Recommends: mvn(org.apache.sshd:sftp-core)
Recommends: mvn(org.apache.sshd:sshd-core)
BuildArch: noarch
%description remote-ssh
%{desc}
This package contains the helpers for using jline with Mina SSHD.
%endif
%if %{with ffm}
%package terminal-ffm
Summary: JLine FFM Terminal
BuildArch: noarch
%description terminal-ffm
%{desc}
%endif
%package style
Summary: JLine Style
BuildArch: noarch
%description style
%{desc}
@@ -118,14 +181,25 @@ This package contains the styling api.
%package terminal-jna
Summary: JLine JNA Terminal
BuildArch: noarch
%description terminal-jna
%{desc}
This package contains terminal implementations leveraging the JNA library.
%package terminal-jni
Summary: JLine JNI Terminal
BuildArch: noarch
%description terminal-jni
%{desc}
This package contains terminal implementations leveraging the JNI library.
%package terminal
Summary: JLine Terminal
BuildArch: noarch
%description terminal
%{desc}
@@ -134,6 +208,7 @@ This package contains the Terminal api and implementations.
%package terminal-jansi
Summary: JLine JANSI Terminal
BuildArch: noarch
%description terminal-jansi
%{desc}
@@ -142,75 +217,180 @@ This package contains terminal implementations leveraging the Jansi library.
%package javadoc
Summary: API documentation for %{name}
BuildArch: noarch
%description javadoc
API documentation for %{name}.
%prep
%autosetup -n %{name}-jline-parent-%{version}
%pom_disable_module demo
%autosetup -n %{name}-jline-%{version} -p1
sed "s;@SYSTEMLIBRARYPATH@;%{_libdir}/%{name}/;g" < %{SOURCE1} | patch -p1
cp -p console-ui/LICENSE.txt LICENSE-APACHE.txt
# Remove prebuilt native objects
rm -r native/src/main/resources/org/jline/nativ/*/
# -Werror is considered harmful for downstream packaging
sed -i /-Werror/d $(find -name pom.xml)
# Optional dependency on juniversalchardet was removed via a patch
%pom_remove_dep -r :juniversalchardet . jline
%if %{without ffm}
%pom_disable_module terminal-ffm
%pom_remove_dep :jline-terminal-ffm jline
%pom_xpath_remove "pom:executions/pom:execution[pom:id='jdk22']" jline
%endif
# Disable unwanted modules
%pom_disable_module groovy
%pom_disable_module demo
%pom_disable_module graal
%if %{without ssh}
%pom_disable_module remote-ssh
%endif
%pom_remove_plugin org.graalvm.nativeimage:native-image-maven-plugin
%pom_remove_plugin :maven-release-plugin
# Unnecessary plugins for an rpm build
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_plugin :spotless-maven-plugin
%pom_remove_plugin :maven-release-plugin
%pom_remove_plugin :maven-deploy-plugin
%pom_remove_plugin :central-publishing-maven-plugin
%pom_remove_plugin :native-image-maven-plugin
%pom_remove_plugin :maven-source-plugin
%pom_xpath_remove -r "pom:arg[text()='-Werror']" . jline
# There is no need to re-generate jni-config.json for GraalVM
# as is already present under native/src/main/resources/
%pom_remove_plugin :exec-maven-plugin native
%pom_remove_dep :picocli-codegen native
%pom_xpath_remove -r 'pom:profile[pom:id="javadoc"]'
# Superfluos dependency
%pom_remove_dep org.apache.sshd: remote-telnet
%if %{without ssh}
%pom_remove_dep org.apache.sshd: jline
%endif
%{mvn_package} ":jline-{*}" @1
%pom_remove_plugin :maven-dependency-plugin console-ui jansi jline
%pom_remove_plugin :build-helper-maven-plugin jansi jline
# This replaces the action of the two removed plugins
mkdir -p jline/src/main/java
mkdir -p jline/src/main/resources
for module in \
jansi-core \
builtins \
console \
native \
reader \
%if %{with ssh}
remote-ssh \
%endif
remote-telnet \
style \
terminal \
%if %{with ffm}
terminal-ffm \
%endif
terminal-jansi \
terminal-jna \
terminal-jni; do
if [ -d ${module}/src/main/java ]; then
cp -r ${module}/src/main/java/* jline/src/main/java/
fi
if [ -d ${module}/src/main/resources ]; then
cp -r ${module}/src/main/resources/* jline/src/main/resources/
fi
done
mkdir -p jansi/src/main/java
mkdir -p jansi/src/main/resources
for module in \
jansi-core \
native \
terminal \
terminal-jni; do
if [ -d ${module}/src/main/java ]; then
cp -r ${module}/src/main/java/* jansi/src/main/java/
fi
if [ -d ${module}/src/main/resources ]; then
cp -r ${module}/src/main/resources/* jansi/src/main/resources/
fi
done
%build
%{mvn_build} -f
# Build a native object
gcc -Wall %{?build_cflags} %{?optflags} -fPIC -fvisibility=hidden -shared \
-I native/src/main/native -I %{_jvmdir}/java/include \
-I %{_jvmdir}/java/include/linux %{?build_ldflags} \
-o libjlinenative.so native/src/main/native/{jlinenative,clibrary}.c
%{mvn_build} -f -s -- -Dnojavadoc=true
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
install -d -m 755 %{buildroot}%{_libdir}/%{name}/
install -p -m 755 libjlinenative.so %{buildroot}%{_libdir}/%{name}/
%files -f .mfiles
%files -f .mfiles-jline
%doc README.md
%license LICENSE.txt
%files builtins -f .mfiles-builtins
%doc README.md
%files jansi -f .mfiles-jansi
%license LICENSE.txt
%files console -f .mfiles-console
%doc README.md
%files jansi-core -f .mfiles-jansi-core
%license LICENSE.txt
%files reader -f .mfiles-reader
%doc README.md
%files builtins -f .mfiles-jline-builtins
%license LICENSE.txt
%files remote-telnet -f .mfiles-remote-telnet
%doc README.md
%files console -f .mfiles-jline-console
%license LICENSE.txt
%files style -f .mfiles-style
%doc README.md
%files console-ui -f .mfiles-jline-console-ui
%license LICENSE.txt
%files terminal -f .mfiles-terminal
%doc README.md
%files curses -f .mfiles-jline-curses
%license LICENSE.txt
%files terminal-jna -f .mfiles-terminal-jna
%doc README.md
%files native -f .mfiles-jline-native
%{_libdir}/%{name}
%license LICENSE.txt
%files terminal-jansi -f .mfiles-terminal-jansi
%doc README.md
%files reader -f .mfiles-jline-reader
%license LICENSE.txt
%files remote-ssh -f .mfiles-remote-ssh
%doc README.md
%if %{with ssh}
%files remote-ssh -f .mfiles-jline-remote-ssh
%license LICENSE.txt
%endif
%if %{with ffm}
%files terminal-ffm -f .mfiles-jline-terminal-ffm
%license LICENSE.txt
%endif
%files remote-telnet -f .mfiles-jline-remote-telnet
%license LICENSE.txt
%files parent -f .mfiles-parent
%doc README.md
%files style -f .mfiles-jline-style
%license LICENSE.txt
%files terminal -f .mfiles-jline-terminal
%license LICENSE.txt
%files terminal-jansi -f .mfiles-jline-terminal-jansi
%license LICENSE.txt
%files terminal-jna -f .mfiles-jline-terminal-jna
%license LICENSE.txt
%files terminal-jni -f .mfiles-jline-terminal-jni
%license LICENSE.txt
%files parent -f .mfiles-jline-parent
%license LICENSE.txt
%files javadoc -f .mfiles-javadoc