Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] LanguageTool: discontinue packaging like Arch
@ 2023-02-22  0:33 Ophidiophobia
  2023-02-22  0:42 ` [PR PATCH] [Updated] " Ophidiophobia
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ophidiophobia @ 2023-02-22  0:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]

There is a new pull request by Ophidiophobia against master on the void-packages repository

https://github.com/Ophidiophobia/void-packages languagetool_texstudio_fix
https://github.com/void-linux/void-packages/pull/42390

LanguageTool: discontinue packaging like Arch
Template of LanguageTool followed Arch's [Java Package Guidelines](https://wiki.archlinux.org/title/Java_Package_Guidelines) and put files in several places. Arch's [bin wrapper](https://github.com/archlinux/svntogit-community/blob/master/languagetool/trunk/languagetool.sh) "fixed" all issues by defining (many) class paths. This approach fails if other tools try to start the jars directly without doing those "fixes" (see #42372).

Use four very simple binary script wrappers tracked in our git instead.

Install LanguageTool in one single directory.
This change makes LanguageTool behave like upstream and easier to configure and use in other applications like TeXstudio. Fixes #42372 "LanguageTool does not start with TeXstudio"

####Possible points of interests
- /usr/bin/languagetool starts the gui variant because that seems to be the version when upstream says to start the standalone version.
- languagetool-cli : -cmd or -command-line instead of -cli?
- languagetool-http(s): -server is ambigious and -server-http(s) too long
- commit message is too wordy but I am not sure which parts to throw away


<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly** (issue use case, "--help", checked and corrected commit message using languagetool-cli)

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-libc)

A patch file from https://github.com/void-linux/void-packages/pull/42390.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-languagetool_texstudio_fix-42390.patch --]
[-- Type: text/x-diff, Size: 4628 bytes --]

From c0f75de37481c204c3517f17061b9c38bafeaa32 Mon Sep 17 00:00:00 2001
From: Ophidiophobia <sandstrahl700@gmx.de>
Date: Wed, 22 Feb 2023 00:39:06 +0100
Subject: [PATCH] LanguageTool: discontinue packaging like Arch

Template of LanguageTool followed Arch's Java Package Guidelines and put files in several places.
Arch's bin wrapper "fixed" all issues by defining (many) class paths.
This approach fails if other tools try to start the jars directly without doing those "fixes".

Use four very simple binary script wrappers tracked in our git instead.

Install LanguageTool in one single directory.
This change makes LanguageTool behave like upstream and easier to configure and use in other applications like TeXstudio.
Fixes #42372 "LanguageTool does not start with TeXstudio"
---
 .../LanguageTool/files/languagetool-cli.sh    |  2 ++
 .../LanguageTool/files/languagetool-gui.sh    |  2 ++
 .../LanguageTool/files/languagetool-http.sh   |  2 ++
 .../LanguageTool/files/languagetool-https.sh  |  2 ++
 srcpkgs/LanguageTool/template                 | 24 ++++++++-----------
 5 files changed, 18 insertions(+), 14 deletions(-)
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-cli.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-gui.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-http.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-https.sh

diff --git a/srcpkgs/LanguageTool/files/languagetool-cli.sh b/srcpkgs/LanguageTool/files/languagetool-cli.sh
new file mode 100644
index 000000000000..9c9a0c74ba5d
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-cli.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool-commandline.jar" "$@"
diff --git a/srcpkgs/LanguageTool/files/languagetool-gui.sh b/srcpkgs/LanguageTool/files/languagetool-gui.sh
new file mode 100644
index 000000000000..62daa3bd2a9d
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-gui.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool.jar" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/files/languagetool-http.sh b/srcpkgs/LanguageTool/files/languagetool-http.sh
new file mode 100644
index 000000000000..94efb6b237e3
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-http.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -cp "/usr/share/java/languagetool/languagetool-server.jar" "org.languagetool.server.HTTPServer" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/files/languagetool-https.sh b/srcpkgs/LanguageTool/files/languagetool-https.sh
new file mode 100644
index 000000000000..916eda292312
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-https.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool-server.jar" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/template b/srcpkgs/LanguageTool/template
index 1b422210aa45..0627c34c0de9 100644
--- a/srcpkgs/LanguageTool/template
+++ b/srcpkgs/LanguageTool/template
@@ -1,24 +1,20 @@
 # Template file for 'LanguageTool'
 pkgname=LanguageTool
 version=5.8
-revision=1
+revision=2
 depends="virtual?java-environment"
-short_desc="Checks your writing in more than 20 languages"
+short_desc="Checks your writing in many languages"
 maintainer="Stacy Harper <contact@stacyhaper.net>"
 license="LGPL-2.1-or-later"
 homepage="https://www.languagetool.org/"
-distfiles="https://www.languagetool.org/download/LanguageTool-${version}.zip
- https://raw.githubusercontent.com/archlinux/svntogit-community/packages/languagetool/trunk/languagetool.sh"
-checksum="20913a50eb4568fdc727066eee8aab833f52b626710fc9e0213c3f1098bfdee3
- 009c0a65a978ad11ac097edd4be64688a2c80281b201495eff9ab667c5b0f0fe"
-skip_extraction="languagetool.sh"
+distfiles="https://www.languagetool.org/download/LanguageTool-${version}.zip"
+checksum="20913a50eb4568fdc727066eee8aab833f52b626710fc9e0213c3f1098bfdee3"
 
 do_install() {
-	vmkdir usr/bin
-	vmkdir usr/share/java/languagetool
-	vcopy "*.jar" /usr/share/java/languagetool
-	vcopy "libs/*.jar" /usr/share/java/languagetool
-	rm -rf *.jar libs
-	vcopy "$wrksrc" /usr/share/languagetool/
-	vbin ${XBPS_SRCDISTDIR}/${pkgname}-${version}/languagetool.sh languagetool
+	vmkdir usr/share/java/
+	vcopy "$wrksrc" /usr/share/java/languagetool
+	vbin ${FILESDIR}/languagetool-gui.sh languagetool
+	vbin ${FILESDIR}/languagetool-http.sh languagetool-http
+	vbin ${FILESDIR}/languagetool-https.sh languagetool-https
+	vbin ${FILESDIR}/languagetool-cli.sh languagetool-cli
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] LanguageTool: discontinue packaging like Arch
  2023-02-22  0:33 [PR PATCH] LanguageTool: discontinue packaging like Arch Ophidiophobia
@ 2023-02-22  0:42 ` Ophidiophobia
  2023-02-23 10:47 ` Eloitor
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ophidiophobia @ 2023-02-22  0:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1835 bytes --]

There is an updated pull request by Ophidiophobia against master on the void-packages repository

https://github.com/Ophidiophobia/void-packages languagetool_texstudio_fix
https://github.com/void-linux/void-packages/pull/42390

LanguageTool: discontinue packaging like Arch
Template of LanguageTool followed Arch's [Java Package Guidelines](https://wiki.archlinux.org/title/Java_Package_Guidelines) and put files in several places. Arch's [bin wrapper](https://github.com/archlinux/svntogit-community/blob/master/languagetool/trunk/languagetool.sh) "fixed" all issues by defining (many) class paths. This approach fails if other tools try to start the jars directly without doing those "fixes" (see #42372).

Use four very simple binary script wrappers tracked in our git instead.

Install LanguageTool in one single directory.
This change makes LanguageTool behave like upstream and easier to configure and use in other applications like TeXstudio. Fixes #42372 "LanguageTool does not start with TeXstudio"

####Possible points of interests
- /usr/bin/languagetool starts the gui variant because that seems to be the version when upstream says to start the standalone version.
- languagetool-cli : -cmd or -command-line instead of -cli?
- languagetool-http(s): -server is ambigious and -server-http(s) too long
- commit message is too wordy but I am not sure which parts to throw away


<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly** (issue use case, "--help", checked and corrected commit message using languagetool-cli)

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-libc)

A patch file from https://github.com/void-linux/void-packages/pull/42390.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-languagetool_texstudio_fix-42390.patch --]
[-- Type: text/x-diff, Size: 4628 bytes --]

From cf53cc7fc4a92ad5729dbfbd82413c0b664829d9 Mon Sep 17 00:00:00 2001
From: Ophidiophobia <sandstrahl700@gmx.de>
Date: Wed, 22 Feb 2023 00:39:06 +0100
Subject: [PATCH] LanguageTool: discontinue packaging like Arch

Template of LanguageTool followed Arch's Java Package Guidelines and put files
in several places.
Arch's bin wrapper "fixed" all issues by defining (many) class paths.
This approach fails if other tools try to start the jars directly without doing
those "fixes".

Use four very simple binary script wrappers tracked in our git instead.

Install LanguageTool in one single directory.
This change makes LanguageTool behave like upstream and easier to configure and
use in other applications like TeXstudio.
Fixes #42372 "LanguageTool does not start with TeXstudio"
---
 .../LanguageTool/files/languagetool-cli.sh    |  2 ++
 .../LanguageTool/files/languagetool-gui.sh    |  2 ++
 .../LanguageTool/files/languagetool-http.sh   |  2 ++
 .../LanguageTool/files/languagetool-https.sh  |  2 ++
 srcpkgs/LanguageTool/template                 | 24 ++++++++-----------
 5 files changed, 18 insertions(+), 14 deletions(-)
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-cli.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-gui.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-http.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-https.sh

diff --git a/srcpkgs/LanguageTool/files/languagetool-cli.sh b/srcpkgs/LanguageTool/files/languagetool-cli.sh
new file mode 100644
index 000000000000..9c9a0c74ba5d
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-cli.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool-commandline.jar" "$@"
diff --git a/srcpkgs/LanguageTool/files/languagetool-gui.sh b/srcpkgs/LanguageTool/files/languagetool-gui.sh
new file mode 100644
index 000000000000..62daa3bd2a9d
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-gui.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool.jar" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/files/languagetool-http.sh b/srcpkgs/LanguageTool/files/languagetool-http.sh
new file mode 100644
index 000000000000..94efb6b237e3
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-http.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -cp "/usr/share/java/languagetool/languagetool-server.jar" "org.languagetool.server.HTTPServer" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/files/languagetool-https.sh b/srcpkgs/LanguageTool/files/languagetool-https.sh
new file mode 100644
index 000000000000..916eda292312
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-https.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool-server.jar" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/template b/srcpkgs/LanguageTool/template
index 1b422210aa45..0627c34c0de9 100644
--- a/srcpkgs/LanguageTool/template
+++ b/srcpkgs/LanguageTool/template
@@ -1,24 +1,20 @@
 # Template file for 'LanguageTool'
 pkgname=LanguageTool
 version=5.8
-revision=1
+revision=2
 depends="virtual?java-environment"
-short_desc="Checks your writing in more than 20 languages"
+short_desc="Checks your writing in many languages"
 maintainer="Stacy Harper <contact@stacyhaper.net>"
 license="LGPL-2.1-or-later"
 homepage="https://www.languagetool.org/"
-distfiles="https://www.languagetool.org/download/LanguageTool-${version}.zip
- https://raw.githubusercontent.com/archlinux/svntogit-community/packages/languagetool/trunk/languagetool.sh"
-checksum="20913a50eb4568fdc727066eee8aab833f52b626710fc9e0213c3f1098bfdee3
- 009c0a65a978ad11ac097edd4be64688a2c80281b201495eff9ab667c5b0f0fe"
-skip_extraction="languagetool.sh"
+distfiles="https://www.languagetool.org/download/LanguageTool-${version}.zip"
+checksum="20913a50eb4568fdc727066eee8aab833f52b626710fc9e0213c3f1098bfdee3"
 
 do_install() {
-	vmkdir usr/bin
-	vmkdir usr/share/java/languagetool
-	vcopy "*.jar" /usr/share/java/languagetool
-	vcopy "libs/*.jar" /usr/share/java/languagetool
-	rm -rf *.jar libs
-	vcopy "$wrksrc" /usr/share/languagetool/
-	vbin ${XBPS_SRCDISTDIR}/${pkgname}-${version}/languagetool.sh languagetool
+	vmkdir usr/share/java/
+	vcopy "$wrksrc" /usr/share/java/languagetool
+	vbin ${FILESDIR}/languagetool-gui.sh languagetool
+	vbin ${FILESDIR}/languagetool-http.sh languagetool-http
+	vbin ${FILESDIR}/languagetool-https.sh languagetool-https
+	vbin ${FILESDIR}/languagetool-cli.sh languagetool-cli
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LanguageTool: discontinue packaging like Arch
  2023-02-22  0:33 [PR PATCH] LanguageTool: discontinue packaging like Arch Ophidiophobia
  2023-02-22  0:42 ` [PR PATCH] [Updated] " Ophidiophobia
@ 2023-02-23 10:47 ` Eloitor
  2023-02-23 15:02 ` Ophidiophobia
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Eloitor @ 2023-02-23 10:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

New comment by Eloitor on void-packages repository

https://github.com/void-linux/void-packages/pull/42390#issuecomment-1441544538

Comment:
Maybe we could build LanguageTool from source in this PR or is it preferable to wait for this PR to be merged?

https://github.com/void-linux/void-packages/issues/40910

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LanguageTool: discontinue packaging like Arch
  2023-02-22  0:33 [PR PATCH] LanguageTool: discontinue packaging like Arch Ophidiophobia
  2023-02-22  0:42 ` [PR PATCH] [Updated] " Ophidiophobia
  2023-02-23 10:47 ` Eloitor
@ 2023-02-23 15:02 ` Ophidiophobia
  2023-02-23 15:16 ` Ophidiophobia
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ophidiophobia @ 2023-02-23 15:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

New comment by Ophidiophobia on void-packages repository

https://github.com/void-linux/void-packages/pull/42390#issuecomment-1441939518

Comment:
Honestly I am in favor of switching to actually building from source and also upgrade to 6.0. I think the template should never had pulled in the dist files but here we are.
The main reason I did not go that route are:
- not sure how long compiling would take
- unsure which version LanguageTool actually ships on their website
- not sure if I would introduce any weird behaviour by unwittingly crate something slightly different
- we can have a long debate if LanguageTool (or any java application) should use dependencies from common sources (we have java-commons-io) and run into java's version of dll hell and maybe reintroduce class path hell or keep it sane and simple and have each app keep dependencies in their own directory

So yeah. Compiling from source is better in my opinion but I wanted to fix packaging quickly so users can easily use LanguageTools from other apps again.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LanguageTool: discontinue packaging like Arch
  2023-02-22  0:33 [PR PATCH] LanguageTool: discontinue packaging like Arch Ophidiophobia
                   ` (2 preceding siblings ...)
  2023-02-23 15:02 ` Ophidiophobia
@ 2023-02-23 15:16 ` Ophidiophobia
  2023-05-25  1:53 ` github-actions
  2023-06-08  2:04 ` [PR PATCH] [Closed]: " github-actions
  5 siblings, 0 replies; 7+ messages in thread
From: Ophidiophobia @ 2023-02-23 15:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

New comment by Ophidiophobia on void-packages repository

https://github.com/void-linux/void-packages/pull/42390#issuecomment-1441962179

Comment:
sigh I need to express myself better:
Merge this first (if there are no further objections). It makes it a lot easier for unaware users to use LanguageTools in other apps without workarounds.

How to build and package this from source can be debated later (in a second PR).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: LanguageTool: discontinue packaging like Arch
  2023-02-22  0:33 [PR PATCH] LanguageTool: discontinue packaging like Arch Ophidiophobia
                   ` (3 preceding siblings ...)
  2023-02-23 15:16 ` Ophidiophobia
@ 2023-05-25  1:53 ` github-actions
  2023-06-08  2:04 ` [PR PATCH] [Closed]: " github-actions
  5 siblings, 0 replies; 7+ messages in thread
From: github-actions @ 2023-05-25  1:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/42390#issuecomment-1562147799

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Closed]: LanguageTool: discontinue packaging like Arch
  2023-02-22  0:33 [PR PATCH] LanguageTool: discontinue packaging like Arch Ophidiophobia
                   ` (4 preceding siblings ...)
  2023-05-25  1:53 ` github-actions
@ 2023-06-08  2:04 ` github-actions
  5 siblings, 0 replies; 7+ messages in thread
From: github-actions @ 2023-06-08  2:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

There's a closed pull request on the void-packages repository

LanguageTool: discontinue packaging like Arch
https://github.com/void-linux/void-packages/pull/42390

Description:
Template of LanguageTool followed Arch's [Java Package Guidelines](https://wiki.archlinux.org/title/Java_Package_Guidelines) and put files in several places. Arch's [bin wrapper](https://github.com/archlinux/svntogit-community/blob/master/languagetool/trunk/languagetool.sh) "fixed" all issues by defining (many) class paths. This approach fails if other tools try to start the jars directly without doing those "fixes" (see #42372).

Use four very simple binary script wrappers tracked in our git instead.

Install LanguageTool in one single directory.
This change makes LanguageTool behave like upstream and easier to configure and use in other applications like TeXstudio. Fixes #42372 "LanguageTool does not start with TeXstudio"

####Possible points of interests
- /usr/bin/languagetool starts the gui variant because that seems to be the version when upstream says to start the standalone version.
- languagetool-cli : -cmd or -command-line instead of -cli?
- languagetool-http(s): -server is ambigious and -server-http(s) too long
- commit message is too wordy but I am not sure which parts to throw away


<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly** (issue use case, "--help", checked and corrected commit message using languagetool-cli)

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-libc)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-08  2:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22  0:33 [PR PATCH] LanguageTool: discontinue packaging like Arch Ophidiophobia
2023-02-22  0:42 ` [PR PATCH] [Updated] " Ophidiophobia
2023-02-23 10:47 ` Eloitor
2023-02-23 15:02 ` Ophidiophobia
2023-02-23 15:16 ` Ophidiophobia
2023-05-25  1:53 ` github-actions
2023-06-08  2:04 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).