LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-19-2018, 12:16 PM   #1
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Creating newer Jabref pkg from .deb


I'm a little out of my depth but am giving this a go anyway.

I need to install a newer version of Jabref rather than that in SBo, which is from 2013. My theory is that if I download a newer .deb file, I should be able to convert it to a .txz, use explodepkg/makepkg to sanitise it and install it in Slackware.

The first stage went fine, I converted the .deb file and used explodepkg. explodepkg has created a /usr folder and within that /lib /bin and /share, but I am unsure how to make a package with things sorted into folders like this. Should I put all the folder contents into one and use makepkg for that or am I completely barking up the wrong tree here?
 
Old 06-19-2018, 12:43 PM   #2
nivieru
Member
 
Registered: Feb 2008
Posts: 78

Rep: Reputation: 14
You can build the new one using the same slackbuild file from SBo, just download the newer source and change the version number

EDIT - you can! the 't' in cant wasn't supposed to be there

Last edited by nivieru; 06-19-2018 at 01:04 PM.
 
Old 06-19-2018, 12:44 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If you follow SBo's policies, since you're not compiling, you'd extract all the contents of the package to /tmp/SBo/package-jabref/, then you can make any changes needed and then run makepkg on that.

And you don't actually need to convert it to a txz first (which would require someone to have deb2txz installed, adding a dependency). Instead, you can use ar to extract the data tarball from the deb, then pipe it to other programs to extract the tarball. On my discord SlackBuild, which repackages a deb (containing an xz-compressed tarball... some contain gz-compressed tarballs, which changes the command slightly), I run the following command:

Code:
ar p $CWD/${PRGNAM}-${VERSION}.deb data.tar.xz | unxz | tar xv
It might also be worth contacting Mário Antunes, the maintainer of Jabref and see if he's willing to push out an update with a newer version. Although, it looks like this is the only SlackBuild he's submitted and has never made an update (since 2013)... so if you email the slackbuild-users email list, you could probably take over maintainership, if that's something you're interested in.
 
1 members found this post helpful.
Old 06-19-2018, 01:02 PM   #4
MDKDIO
Member
 
Registered: Mar 2004
Location: Sweden
Distribution: Slackware 15
Posts: 521

Rep: Reputation: 187Reputation: 187
Quote:
Originally Posted by Lysander666 View Post
I'm a little out of my depth but am giving this a go anyway.

I need to install a newer version of Jabref rather than that in SBo, which is from 2013. My theory is that if I download a newer .deb file, I should be able to convert it to a .txz,
Isn't that a .jar file? And not a .deb file

Looking at the .Slackbuild file, I think you're quite safe with using the same files as found on slackbuilds.org
Just edit the JabRef.SlackBuild and JabRef.info and change version accordingly (at the moment 4.3.1)

/J
 
Old 06-19-2018, 01:03 PM   #5
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Thanks, Bass. I'm pretty sure this is a gz-compressed tarball. Anyway, I ran the command above but it returned some errors

Code:
root@lyslackertest:/home/lysander/Downloads# ar p $CWD/$jabref-$3.8.1+ds-3_all.deb data.tar.xz | unxz | tar xv
ar: /-.8.1+ds-3_all.deb: No such file or directory
unxz: (stdin): File format not recognized
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
I could put the whole thing into one folder manually, but there are two files with the same name [one in /bin and one in /lib] and when I try and put them in the same folder it conflicts. I feel I'm one step closer to solving this though.

Quote:
Originally Posted by MDKDIO View Post
Isn't that a .jar file? And not a .deb file

Looking at the .Slackbuild file, I think you're quite safe with using the same files as found on slackbuilds.org
Just edit the JabRef.SlackBuild and JabRef.info and change version accordingly (at the moment 4.3.1)

/J
I should have mentioned I obtained a .deb from the Debian repos. Maybe not the thing to do.

Last edited by Lysander666; 06-19-2018 at 01:05 PM.
 
Old 06-19-2018, 01:14 PM   #6
MDKDIO
Member
 
Registered: Mar 2004
Location: Sweden
Distribution: Slackware 15
Posts: 521

Rep: Reputation: 187Reputation: 187
Quote:
Originally Posted by Lysander666 View Post

I should have mentioned I obtained a .deb from the Debian repos. Maybe not the thing to do.
Thought so
But I went this site instead.... via http://www.jabref.org/
https://www.fosshub.com/JabRef.html

/J
 
Old 06-19-2018, 01:33 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Lysander666 View Post
Thanks, Bass. I'm pretty sure this is a gz-compressed tarball. Anyway, I ran the command above but it returned some errors

Code:
root@lyslackertest:/home/lysander/Downloads# ar p $CWD/$jabref-$3.8.1+ds-3_all.deb data.tar.xz | unxz | tar xv
ar: /-.8.1+ds-3_all.deb: No such file or directory
unxz: (stdin): File format not recognized
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Your command isn't correct. It can't find the file. The rest of the errors are a result of not finding the deb package. The above would be the command you'd likely use if you were running a SlackBuild. If you are running it manually, you'd have something more like:

Code:
ar p ./jabref-$3.8.1+ds-3_all.deb data.tar.xz | unxz | tar xv
If it is gzipped (which any packages for Debian 8 and newer are supposed to be xz compressed), you would just remove the unxz portion:

Code:
ar p ./jabref-$3.8.1+ds-3_all.deb data.tar.xz | tar xv
Quote:
Originally Posted by Lysander666 View Post
I could put the whole thing into one folder manually, but there are two files with the same name [one in /bin and one in /lib] and when I try and put them in the same folder it conflicts. I feel I'm one step closer to solving this though.
It is not a good idea to take all files from an existing package and throw them in the same directory. The program probably wouldn't even work since it expects libraries to be in /lib/, executables to be in /bin/, etc (although, hopefully it is /usr/lib/ and /usr/bin/ or that's a poorly built package).

Quote:
Originally Posted by Lysander666 View Post
I should have mentioned I obtained a .deb from the Debian repos. Maybe not the thing to do.
Since the official jar is available at FossHub (that MDKDIO linked to), that would probably be an easier route to go with updating this. Just download the jar, edit the version in the existing SlackBuild, then run the SlackBuild and you should have a package that can be installed on Slackware.

If you wanted to take over maintenance of this package, you could change the info in the Jabref.info file to point to the FossHub download, generate the md5sum (if FossHub doesn't provide it), then update the maintainer info and submit it to SBo (after getting the current maintainer's or SBo admins' blessing, of course).
 
Old 06-19-2018, 01:36 PM   #8
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by MDKDIO View Post
Thought so
But I went this site instead.... via http://www.jabref.org/
https://www.fosshub.com/JabRef.html

/J
Well, I attempted replacing the .jar with the official one, updating the version numbers in the SlackBuild and info files, rebuilding and installing but it won't launch.

Code:
root@lyslackertest:/home/lysander/Downloads/jabrefpkg/JabRef# ls
JabRef-4.3.1.jar  JabRef.SlackBuild  JabRef.desktop  JabRef.info  JabRef.png  README  doinst.sh  slack-desc
root@lyslackertest:/home/lysander/Downloads/jabrefpkg/JabRef# ./JabRef.SlackBuild 

Slackware package maker, version 3.141593.

Searching for symbolic links:

No symbolic links were found, so we won't make an installation script.
You can make your own later in ./install/doinst.sh and rebuild the
package if you like.

This next step is optional - you can set the directories in your package
to some sane permissions. If any of the directories in your package have
special permissions, then DO NOT reset them here!

Would you like to reset all directory permissions to 755 (drwxr-xr-x) and
directory ownerships to root.root ([y]es, [n]o)? n

Creating Slackware package:  /tmp/JabRef-4.3.1-noarch-1_SBo.tgz

./
usr/
usr/bin/
usr/bin/JabRef
usr/doc/
usr/doc/JabRef-4.3.1/
usr/doc/JabRef-4.3.1/JabRef.SlackBuild
usr/share/
usr/share/applications/
usr/share/applications/JabRef.desktop
usr/share/pixmaps/
usr/share/pixmaps/JabRef.png
install/
install/doinst.sh
install/slack-desc
opt/
opt/JabRef/
opt/JabRef/JabRef-4.3.1.jar

Slackware package /tmp/JabRef-4.3.1-noarch-1_SBo.tgz created.

root@lyslackertest:/home/lysander/Downloads/jabrefpkg/JabRef# cd /tmp
root@lyslackertest:/tmp# ls
BeautifulSoup4-4.6.0-x86_64-1_SBo.tgz  JabRef-4.3.1-noarch-1_SBo.tgz  apache-ant-1.9.9-noarch-1_SBo.tgz  hsperfdata_lysander  pulse-PKdhtXMmr18n
JabRef-3.8.1-noarch-1_SBo.tgz	       SBo			      gpg-eV9UyR			 mozilla_lysander0    ssh-2ZA08jbSeUr2
root@lyslackertest:/tmp# upgradepkg JabRef-4.3.1-noarch-1_SBo.tgz 

+==============================================================================
| Upgrading JabRef-3.8.1-noarch-1_SBo package using ./JabRef-4.3.1-noarch-1_SBo.tgz
+==============================================================================

Pre-installing package JabRef-4.3.1-noarch-1_SBo...

Removing package /var/log/packages/JabRef-3.8.1-noarch-1_SBo-upgraded-2018-06-19,19:33:49...
  --> Deleting /opt/JabRef/JabRef-3.8.1.jar
  --> Deleting /usr/doc/JabRef-3.8.1/JabRef.SlackBuild
  --> Deleting empty directory /usr/doc/JabRef-3.8.1/

Verifying package JabRef-4.3.1-noarch-1_SBo.tgz.
Installing package JabRef-4.3.1-noarch-1_SBo.tgz:
PACKAGE DESCRIPTION:
# JabRef (Reference Manager)
#
# JabRef is an open source bibliography reference manager. The native
# file format used by JabRef is BibTeX, the standard LaTeX bibliography
# format.b JabRef runs on the Java VM (version 1.6 or newer), and
# should work equally well on Windows, Linux and Mac OS X.
#
Executing install script for JabRef-4.3.1-noarch-1_SBo.tgz.
Package JabRef-4.3.1-noarch-1_SBo.tgz installed.

Package JabRef-3.8.1-noarch-1_SBo upgraded with new package ./JabRef-4.3.1-noarch-1_SBo.tgz.

root@lyslackertest:/tmp#
I wonder if I should use the makepkg way.

EDIT: I wonder if this is a dependency issue also. It requires jdk and I use openjdk. But I don't think that should make a difference since I run openjkd on my netbook and Jabref launches fine [the SBo version].

Last edited by Lysander666; 06-19-2018 at 01:39 PM.
 
Old 06-19-2018, 03:20 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Lysander666 View Post
Well, I attempted replacing the .jar with the official one, updating the version numbers in the SlackBuild and info files, rebuilding and installing but it won't launch.
What's the error message when you try and launch it? You didn't post it.

Quote:
Originally Posted by Lysander666 View Post
I wonder if I should use the makepkg way.
That's an option, but it'd probably be easier to get this working once we have the error message when you try and launch it.

Quote:
Originally Posted by Lysander666 View Post
EDIT: I wonder if this is a dependency issue also. It requires jdk and I use openjdk. But I don't think that should make a difference since I run openjkd on my netbook and Jabref launches fine [the SBo version].
It's unlikely it requires the full-blown jdk over openjdk, but looking at their site, it looks like they need Java 8, which means you'd need the SBo package openjdk8, since openjdk is v7.

So, now that I know that, it seems like your first error is due to you using Java v7 from openjdk, so you'd just need openjdk8 from SBo and it will likely fix your problems.
 
1 members found this post helpful.
Old 06-19-2018, 03:57 PM   #10
MDKDIO
Member
 
Registered: Mar 2004
Location: Sweden
Distribution: Slackware 15
Posts: 521

Rep: Reputation: 187Reputation: 187
Quote:
Originally Posted by Lysander666 View Post

EDIT: I wonder if this is a dependency issue also. It requires jdk and I use openjdk. But I don't think that should make a difference since I run openjkd on my netbook and Jabref launches fine [the SBo version].
openjdk is listed as supported but it also needs openjfx if so...

"The other official support for JavaFX is OpenJDK with the external library OpenJFX. Unfortunately, the installation is not always straight forward. Therefore, we only recommend this if you know what you are doing."

And link included in the info above is https://wiki.openjdk.java.net/displa...ilding+OpenJFX

Link to source of info https://help.jabref.org/en/Installat...-jdks-and-jres
 
1 members found this post helpful.
Old 06-19-2018, 04:04 PM   #11
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
Quote:
Originally Posted by bassmadrigal View Post
It's unlikely it requires the full-blown jdk over openjdk, but looking at their site, it looks like they need Java 8, which means you'd need the SBo package openjdk8, since openjdk is v7.

So, now that I know that, it seems like your first error is due to you using Java v7 from openjdk, so you'd just need openjdk8 from SBo and it will likely fix your problems.
The thing is that, looking properly, I realise I now do have openjdk8 installed - one of Eric's builds.

The error message I get is:

Code:
Error: could not find or load main class org.jabref.JabRefMain
Now, this points to this:

Quote:
You might see the error message Error: Could not find or load main class net.sf.jabref.JabRefMain. This means, you do not have JavaFX support activated in your Java runtime environment. This typically happens if you use OpenJDK, where one needs to setup OpenJFX seperately.
It looks like MDKDIO had a point. I'll have to work out how to build the thing, but on an Atom? I hope it doesn't take an age.
 
Old 06-19-2018, 04:35 PM   #12
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Ubuntu, Debian, Slackware
Posts: 2,178

Original Poster
Blog Entries: 6

Rep: Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470Reputation: 2470
I compiled openjfx from SBo. Now I have apache-ant, openjdk [7], openjdk8 and openjfx. Now I get this:

Code:
lysander@lyslackertest:~$ JabRef
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jabref/JabRefMain : Unsupported major.minor version 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:430)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:323)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Also:
Code:
lysander@lyslackertest:~/Documents$ java -version
java version "1.7.0_181"
OpenJDK Runtime Environment (IcedTea 2.6.14) (Slackware)
OpenJDK 64-Bit Server VM (build 24.181-b01, mixed mode)
I get the feeling I need something more. Can't think what it is though.
 
Old 06-19-2018, 05:17 PM   #13
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
That error message seems to indicate it is using Java v7 instead of v8. And your java --version is showing v7 (the 1.7.0_181 is 7u181). You might need to run /etc/profile.d/openjdk8.sh to set up the proper environment variables. I'm not sure how well openjdk and openjdk8 can coexist.
 
Old 06-19-2018, 05:30 PM   #14
ChuangTzu
Senior Member
 
Registered: May 2015
Location: Where ever needed
Distribution: Slackware/Salix while testing others
Posts: 1,718

Rep: Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857
Quote:
Originally Posted by bassmadrigal View Post
That error message seems to indicate it is using Java v7 instead of v8. And your java --version is showing v7 (the 1.7.0_181 is 7u181). You might need to run /etc/profile.d/openjdk8.sh to set up the proper environment variables. I'm not sure how well openjdk and openjdk8 can coexist.
I might be mistaken, but I think you need to have one or the other for compiling.
 
Old 06-19-2018, 05:46 PM   #15
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by ChuangTzu View Post
I might be mistaken, but I think you need to have one or the other for compiling.
That's very possible, but he isn't compiling this, just running a pre-compiled jar. But, starting with v4, they require Java 8, but his java program on the computer is v7, so he might be able to override that by running /etc/profile.d/openjdk8.sh, which might change his path so that the java program will be v8.

But as I said, I don't know how well v7 and v8 coexist. I don't think I've ever needed to test it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install .deb pkg, thru console, thats in current directory? linus72 Debian 1 08-25-2009 08:58 PM
trying to install a java .bin trouble creating deb pkg randell6564 Ubuntu 4 06-30-2006 09:04 PM
kernel: make deb-pkg coax1984 Linux - Software 0 10-27-2004 08:08 AM
can't download pkg-config?...newer version needed... breezewax Linux - Software 1 09-06-2004 10:07 PM
deb vs tgz pkg kvikki Linux From Scratch 4 10-19-2003 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration