FS#63080 - [protege] PLEASE ENTER SUMMARY

Attached to Project: Community Packages
Opened by Julio (JulioJu) - Wednesday, 03 July 2019, 09:01 GMT
Last edited by Morten Linderud (Foxboron) - Sunday, 13 September 2020, 13:49 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Hi !

You don't use the repository to build Protege. You must use https://github.com/protegeproject/protege-distribution because it includes 3rd party plugins.

You could change it as following (I've tested):



# Maintainer: Morten Linderud <morten@linderud.pw>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: Stefan Husmann <stefan-husmannt-online.de>
# Contributor: JulioJu <https://github.com/JulioJu>

pkgname=protege
pkgver=5.5.0
pkgrel=2
pkgdesc='Free, open source ontology editor and knowledge-base framework'
arch=('any')
url='https://protege.stanford.edu/'
license=('MPL')
depends=('java-runtime>=8' 'graphviz')
makedepends=('maven' 'jdk8-openjdk')
source=("$pkgname-$pkgver.tar.gz::https://github.com/protegeproject/protege-distribution/archive/v$pkgver.tar.gz"
"${pkgname}.sh"
"${pkgname}.desktop"
"${pkgname}.png")
sha256sums=('e8590f1df5b2e31ebf7c8eb211497d6bfac5cc679ab04ec34bcc28c27da7dded'
'1c531c402b58130ebcd7e5c0719b4afb49ce928e8e1af07d59c6ee61f26666cc'
'e0e054d864fafdee0c7a7a034b4a92fe2fe30fcce77f2aabd71afb57dbbbb0ab'
'3ee61d8cfcbcfc91c86c9dddc24e40f9fc0e6943bf879548340610c95d64d194')

build(){
cd "protege-distribution-$pkgver"
mvn clean package -Dmaven.test.skip=true
}

package() {
cd "protege-distribution-$pkgver/target/Protege-$pkgver-platform-independent/Protege-$pkgver"
install -d "${pkgdir}/usr/share/java/${pkgname}"
cp -r * "${pkgdir}/usr/share/java/${pkgname}"
install -d "${pkgdir}/usr/bin"
install -D "${srcdir}/protege.sh" "${pkgdir}/usr/bin/protege"
install -Dm644 "${srcdir}/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "${srcdir}/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}


package() {
cd "protege-distribution-$pkgver/target/Protege-$pkgver-platform-independent/Protege-$pkgver"
install -d "${pkgdir}/usr/share/java/${pkgname}"
cp -r * "${pkgdir}/usr/share/java/${pkgname}"
install -d "${pkgdir}/usr/bin"
install -D "${srcdir}/protege.sh" "${pkgdir}/usr/bin/protege"
install -Dm644 "${srcdir}/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "${srcdir}/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}
This task depends upon

Closed by  Morten Linderud (Foxboron)
Sunday, 13 September 2020, 13:49 GMT
Reason for closing:  Won't fix
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 09:03 GMT
I attach the PKGBUILD in this comment. I could make the diff if you want.
   PKGBUILD (1.6 KiB)
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 09:05 GMT
How change the title of this task ?
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 09:13 GMT
Note:
$ diff -rq target/Protege-5.5.0-linux target/Protege-5.5.0-platform-independent
Only in target/Protege-5.5.0-linux/Protege-5.5.0: jre
Only in target/Protege-5.5.0-platform-independent/Protege-5.5.0: run.bat
Only in target/Protege-5.5.0-platform-independent/Protege-5.5.0: run.command
Files target/Protege-5.5.0-linux/Protege-5.5.0/run.sh and target/Protege-5.5.0-platform-independent/Protege-5.5.0/run.sh differ

As Protege is compatible actually only with JRE 8, (see https://github.com/protegeproject/protege/issues/822 ) I propose to use target/Protege-5.5.0-linux instead of target/Protege-5.5.0-platform-independent

With this solution we could keep JDK / JRE 12 or more as the main java deployed in the OS with the tool `archlinux-java`.

What do you think about this ?

I could also post the diff file with the current version of the PKGBUILD if you want.
   PKGBUILD (1.5 KiB)
Comment by Morten Linderud (Foxboron) - Wednesday, 03 July 2019, 09:23 GMT
The PKGBUILD attached is a no go. This repository does not contain source code, but precompiled jar files. These are not going to be packaged in the repositories.

What are the 3rd party plugins missing?
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 09:41 GMT
Sorry I have edited my last comment after you have make your last comment. Please read again the last comment. I have add some notes about JRE runtime compatibility, and a new PKGBUILD that fixe this problem.

What do you mean by « The PKGBUILD attached is a no go.»

You are wrong, this repository contains source code. You could see it when you read my PKGBUILD .

There are lot of missing plugins. I am not going to cite it here. You could see it at https://github.com/protegeproject/protege-distribution/blob/master/pom.xml . It could cause some problems like https://github.com/protegeproject/protege/issues/903 .

Comment by Morten Linderud (Foxboron) - Wednesday, 03 July 2019, 09:48 GMT
There is no java source code to protege in the repository you are referencing in the PKGBUILD. It downloads precompiled jar files from somewhere, which is something we should not be doing. If you need 3rd party plugins provide the repositories for the java code and we can try look at a package for them.
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 09:52 GMT
Sorry, you are wrong, under `https://github.com/protegeproject/protege-distribution/archive/v$pkgver.tar.gz` there are source code, no jar files. You could check if you want ;-). For instance at https://github.com/protegeproject/protege-distribution/archive/v5.5.0.tar.gz !
Comment by Morten Linderud (Foxboron) - Wednesday, 03 July 2019, 09:55 GMT
This isn't the java source code for Protege. This is a maven project pulling things from remote servers.

λ Downloads » find protege-distribution-5.5.0
protege-distribution-5.5.0
protege-distribution-5.5.0/.gitignore
protege-distribution-5.5.0/LICENSE
protege-distribution-5.5.0/README.md
protege-distribution-5.5.0/pom.xml
protege-distribution-5.5.0/src
protege-distribution-5.5.0/src/main
protege-distribution-5.5.0/src/main/resources
protege-distribution-5.5.0/src/main/resources/linux-assembly.xml
protege-distribution-5.5.0/src/main/resources/os-x-assembly.xml
protege-distribution-5.5.0/src/main/resources/platform-independent-assembly.xml
protege-distribution-5.5.0/src/main/resources/win-assembly.xml
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 09:55 GMT
You could see difference between the current version of the PKGBUILD and my second proposition https://bugs.archlinux.org/task/63080?getfile=17579 that fix also compatibility issues with the version of Java installed in the system.

$ diff oldPKGUILD PKGBUILD
5a6
> # Contributor: JulioJu <https://github.com/JulioJu>
9c10
< pkgrel=1
---
> pkgrel=3
14c15
< depends=('java-runtime>=8' 'graphviz')
---
> depends=('graphviz')
16c17
< source=("$pkgname-$pkgver.tar.gz::https://github.com/protegeproject/protege/archive/v$pkgver.tar.gz"
---
> source=("$pkgname-$pkgver.tar.gz::https://github.com/protegeproject/protege-distribution/archive/v$pkgver.tar.gz"
20c21
< sha256sums=('e33157b1aeda494bad52c2ab2e5d78889a2848bbdd963d44e4acf11aadd729e9'
---
> sha256sums=('e8590f1df5b2e31ebf7c8eb211497d6bfac5cc679ab04ec34bcc28c27da7dded'
26c27
< cd "protege-$pkgver"
---
> cd "protege-distribution-$pkgver"
31c32
< cd "protege-$pkgver/protege-desktop/target/protege-$pkgver-platform-independent/Protege-$pkgver"
---
> cd "protege-distribution-$pkgver/target/Protege-$pkgver-linux/Protege-$pkgver"
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 10:08 GMT
Ok sorry, I understand now.

The only solution is to patch https://github.com/protegeproject/protege/blob/master/pom.xml with https://github.com/protegeproject/protege-distribution/blob/master/pom.xml ?

What do you think about that ?
Comment by Morten Linderud (Foxboron) - Wednesday, 03 July 2019, 10:27 GMT
That is not the only solution. We really don't want to be downloading artifacts from build servers. Please provide the sources for the 3rd party plugins, or a list.
Comment by Julio (JulioJu) - Wednesday, 03 July 2019, 11:14 GMT
Actually the list is:

cellfie-2.1.0.jar
code-generation-2.0.0.jar
existentialquery-2.0.0.jar
explanation-workbench-3.0.0.jar
ontograf-2.0.3.jar
org.coode.dlquery-4.0.1.jar
org.semanticweb.hermit-1.4.3.456.jar
owldoc-3.0.3.jar
owlviz-5.0.3.jar
rdf-library-3.0.0.jar
sparql-query-plugin-3.0.0.jar
swrltab-plugin-2.0.6.jar

But the problem is this list probably change in each release of Protégé !

We could also build https://github.com/protegeproject/protege and retrieve the plugin folder, the run.sh and the JRE from https://github.com/protegeproject/protege-distribution/releases/download/v5.5.0/Protege-5.5.0-linux.tar.gz

What do you think about that ?
Comment by Julio (JulioJu) - Monday, 15 July 2019, 09:09 GMT
What do you think about my solution ?

Loading...