Jabref: Working snapcraft image

Created on 18 Aug 2017  Â·  15Comments  Â·  Source: JabRef/jabref

This tracks the current state of the snapcraft image. This main text is updated to reflect the current state.

Howto install and update

Beta version:

sudo snap install jabref --beta

Latest snapshot:

  • sudo snap install jabref --edge --devmode
  • sudo snap refresh jabref --edge --devmode

Current state

Snap Status

  • Registered at https://build.snapcraft.io/user/koppor
  • Travis is used for building as currently only CircleCI 2.0 is supported for building and we use CircleCI 1.0 for building. A switch to CircleCI 2.0 is tested at branch circleci20, but does currently not work and it does not seem to be easy to get it running
  • build on Travis takes approx. 10 min
  • build will take place at snapcraft-ci branch only to avoid much too much development versions at Ubuntu.
  • Dashboard https://dashboard.snapcraft.io/dev/snaps/7999/

Open points

Howto build locally

  1. docker run -it -v /d/git-repositories/jabref/jabref:/tmp/snap koppor/snapcraft-java-de bash
  2. cd /tmp/jabref
  3. snapcraft
  4. Read along at https://snapcraft.io/docs/build-snaps/publish

References

build-system linux snap

All 15 comments

If I may ask, will this snapshot be updated to the 4.0 version?

We currently have no money to pay someone for that (donations page). No one of the JabRef team gets paid for JabRef. Thus, working on this really depends on the availability of our personal free time. It seems that I do not have time for that this year.

We really welcome feedback on our volunteer work. In case you can spend some more time we would really like to encourage you to check https://help.jabref.org/en/FAQcontributing - especially the part asking for improvement of our help pages. This would help JabRef getting better as a whole. 🥇

@koppor : I tried
sudo snap install jabref --beta

and got:

error: The publisher of snap "jabref" has indicated that they do not consider
       this revision to be of production quality and that it is only meant for
       development or testing at this point. As a consequence, this snap will
       not refresh automatically and may perform arbitrary system changes
       outside of the security sandbox which snaps are generally confined to,
       which may put your system at risk.

       If you understand and want to proceed, repeat the command including
       --devmode; if instead you want to install the snap forcing it into
       strict confinement, repeat the command including --jailmode.

Since I want to "put my system at risk" I used: sudo snap install jabref --beta --jailmode
and get the response: jabref (beta) 4.0-dev from 'koppor' installed

Now if I start: jabref I still get jabref 3.8.2, but I would like to use JabRef 4.0 (or higher), because JabRef3 breaks my files just by starting the program. (Removes Groups)

Please uninstall the normal JabRef package using sudo apt-get remove
jabref. Reason: The snap does not replace the existing jabref installation

Johannes Kalliauer notifications@github.com schrieb am Di., 24. Juli
2018, 12:44:

@koppor https://github.com/koppor : I tried
sudo snap install jabref --beta

and got:

error: The publisher of snap "jabref" has indicated that they do not consider
this revision to be of production quality and that it is only meant for
development or testing at this point. As a consequence, this snap will
not refresh automatically and may perform arbitrary system changes
outside of the security sandbox which snaps are generally confined to,
which may put your system at risk.

   If you understand and want to proceed, repeat the command including
   --devmode; if instead you want to install the snap forcing it into
   strict confinement, repeat the command including --jailmode.

Since I want to "put my system at risk" I used: sudo snap install jabref
--beta --jailmode
and get the response: jabref (beta) 4.0-dev from 'koppor' installed

Now if I start: jabref I still get jabref 3.8.2, but I would like to use
JabRef 4.0 (or higher), because JabRef3 breaks my files just by starting
the program. (Removes Groups)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JabRef/jabref/issues/3121#issuecomment-407362965, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABTafnpoCLuawr9gEfiIQ9E8ftDRW5Ziks5uJvqjgaJpZM4O7NCh
.

Now jabref does not start at all, with the command jabref

libGL error: MESA-LOADER: failed to retrieve device information
libGL error: Version 4 or later of flush extension not found
libGL error: failed to load driver: i915
libGL error: MESA-LOADER: failed to retrieve device information
...

Do I need to install anything?
maybe OpenGL: http://ubuntuhandbook.org/index.php/2018/05/install-mesa-18-0-4-ubuntu-18-04-lts/


Uninstalled packages with sudo apt autoremove after removing jabref
libandroid-json-java libantlr4-runtime-java libglazedlists-java libhttpasyncclient-java libhttpmime-java libjava-string-similarity-java libjempbox-java libjgoodies-common-java libjgoodies-forms-java libjgoodies-looks-java libjhlabs-filters-java liblightcouch-java liblog4j2-java libmicroba-java libmongodb-java libspin-java libswingx-java libunirest-java-java


Error messages in Terminal

libGL error: MESA-LOADER: failed to retrieve device information
libGL error: Version 4 or later of flush extension not found
libGL error: failed to load driver: i915
libGL error: MESA-LOADER: failed to retrieve device information
Prism-ES2 Error : GL_VERSION (major.minor) = 1.3
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:5768): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
java.io.IOException: Cannot run program "/usr/bin/xprop": error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:620)
    at java.lang.Runtime.exec(Runtime.java:450)
    at java.lang.Runtime.exec(Runtime.java:347)
    at org.GNOME.Accessibility.AtkWrapper.<clinit>(AtkWrapper.java:34)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:805)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
    at java.awt.EventQueue.invokeLater(EventQueue.java:1266)
    at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1290)
    at org.jabref.JabRefMain.start(JabRefMain.java:53)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$5(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 24 more
Jul 27, 2018 11:29:16 AM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /home/jkalliau/.java/.userPrefs/org/jabref/prefs.xml
11:29:16.477 [AWT-EventQueue-0] INFO  org.jabref.migrations.PreferencesMigrations - Migrating old custom entry types.
Jul 27, 2018 11:29:16 AM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /home/jkalliau/.java/.userPrefs/org/jabref/customizedBibtexTypes/prefs.xml
11:29:18.036 [AWT-EventQueue-0] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[AWT-EventQueue-0,6,main]
java.lang.SecurityException: Could not lock User prefs. Lock file access denied.
    at java.util.prefs.FileSystemPreferences.checkLockFile0ErrorCode(FileSystemPreferences.java:937) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:925) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824) ~[?:1.8.0_131]
    at org.jabref.preferences.JabRefPreferences.storeCustomEntryTypes(JabRefPreferences.java:1220) ~[JabRef-4.0-dev.jar:?]
    at org.jabref.gui.customentrytypes.CustomEntryTypesManager.saveCustomEntryTypes(CustomEntryTypesManager.java:32) ~[JabRef-4.0-dev.jar:?]
    at org.jabref.gui.customentrytypes.CustomEntryTypesManager.saveCustomEntryTypes(CustomEntryTypesManager.java:22) ~[JabRef-4.0-dev.jar:?]
    at org.jabref.migrations.CustomEntryTypePreferenceMigration.upgradeStoredCustomEntryTypes(CustomEntryTypePreferenceMigration.java:39) ~[JabRef-4.0-dev.jar:?]
    at org.jabref.migrations.PreferencesMigrations.upgradeStoredCustomEntryTypes(PreferencesMigrations.java:147) ~[JabRef-4.0-dev.jar:?]
    at org.jabref.JabRefMain.start(JabRefMain.java:78) ~[JabRef-4.0-dev.jar:?]
    at org.jabref.JabRefMain.lambda$start$0(JabRefMain.java:53) ~[JabRef-4.0-dev.jar:?]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) ~[?:1.8.0_131]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) ~[?:1.8.0_131]
    at java.awt.EventQueue.access$500(EventQueue.java:97) ~[?:1.8.0_131]
    at java.awt.EventQueue$3.run(EventQueue.java:709) ~[?:1.8.0_131]
    at java.awt.EventQueue$3.run(EventQueue.java:703) ~[?:1.8.0_131]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) ~[?:1.8.0_131]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) ~[?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_131]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_131]
11:29:47.956 [Timer-0] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[Timer-0,6,main]
java.lang.SecurityException: Could not lock User prefs. Lock file access denied.
    at java.util.prefs.FileSystemPreferences.checkLockFile0ErrorCode(FileSystemPreferences.java:937) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:925) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences.access$1200(FileSystemPreferences.java:50) ~[?:1.8.0_131]
    at java.util.prefs.FileSystemPreferences$3.run(FileSystemPreferences.java:432) ~[?:1.8.0_131]
    at java.util.TimerThread.mainLoop(Timer.java:555) ~[?:1.8.0_131]
    at java.util.TimerThread.run(Timer.java:505) ~[?:1.8.0_131]

^C

2018-07-27 13:28:05,008 Thread-5 WARN Unable to register Log4j shutdown hook because JVM is shutting down. Using SimpleLogger
ERROR FallbackExceptionHandler Uncaught exception Occurred in Thread[Thread-5,6,main]
 java.lang.SecurityException: Could not lock User prefs. Lock file access denied.
    at java.util.prefs.FileSystemPreferences.checkLockFile0ErrorCode(FileSystemPreferences.java:937)
    at java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:925)
    at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729)
    at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)
    at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464)
    at java.util.prefs.FileSystemPreferences.access$1200(FileSystemPreferences.java:50)
    at java.util.prefs.FileSystemPreferences$4$1.run(FileSystemPreferences.java:442)

Other Option: try to use http://subuser.org

@LyzardKing @Siedlerchr Do you think, we remove the development mode in the snap and release it as beta?

As far as I understand https://github.com/JabRef/jabref/pull/4619#issuecomment-458260320, we need to go to classic mode accepting that it requires manual approval by Canonical.

Options as by https://docs.snapcraft.io/snap-confinement/6233:

Strict

Used by the majority of snaps. Strictly confined snaps run in complete isolation, and consequently, can not access your files, network, processes or any other system resource without requesting specific access via an interface (see below).

Classic

Allows access to your system’s resources in much the same way traditional packages do. To safeguard against abuse, publishing a classic snap requires manual approval, and installation requires the --classic command line argument.

Devmode

A special mode for snap creators and developers. A devmode snap runs as a strictly confined snap with full access to system resources, and produces debug output to identify unspecified interfaces. Installation requires the --devmode command line argument.

Classic mode would be needed for the integration with libreoffice and the other editors.
With a strict (or devmode) confinement there's no way to add that integration as far as I know.
So devmode is not needed any more, strict mode works without editor integration.
The choice is between a confined snap or a classic snap.
To request approval for a classic snap (once it works) you need to ask on the forum, explaining why it's needed

EDIT: in classic mode I get an error if I try and connect with libreoffice: https://paste.ubuntu.com/p/j7CzKvJvCG/

@LyzardKing Have you installed libre office also as snap or as normal package? And did you install the libreoffice-java stuff?

It won't work with either one...
Being a confined snap it cannot access neither the deb nor the snap.
It has access only to its home and root (plus the non hidden parts of the user home...)

@LyzardKing I just saw that the new jdk202 release now has a backport of GTK3 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8207322
Do we need to change the deps now?

The package in xenial (the base for jabref) is not updated.
When it changes I can test it and let you know!
I'll put an alert on the package page (https://packages.ubuntu.com/xenial/openjdk-8-jre)
ATM it's on 8u191

@LyzardKing Thank you for https://github.com/JabRef/jabref/pull/5379

Are the following two frozen issues fixed by that PR?

They should both be fixed. At least I can say they work on ubuntu mate..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matheger picture matheger  Â·  36Comments

wujastyk picture wujastyk  Â·  37Comments

LyzardKing picture LyzardKing  Â·  62Comments

glennib picture glennib  Â·  34Comments

Siedlerchr picture Siedlerchr  Â·  37Comments