Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working snapcraft image #3121

Closed
9 tasks done
koppor opened this issue Aug 18, 2017 · 15 comments
Closed
9 tasks done

Working snapcraft image #3121

koppor opened this issue Aug 18, 2017 · 15 comments
Labels
dev: build-system platform: linux platform: snap When JabRef is run as a snap on linux

Comments

@koppor
Copy link
Member

koppor commented Aug 18, 2017

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

@ilippert
Copy link
Contributor

ilippert commented Oct 8, 2017

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

@koppor koppor added the freeze label Feb 7, 2018
@koppor
Copy link
Member Author

koppor commented Feb 7, 2018

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. 🥇

@JoKalliauer
Copy link
Contributor

@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)

@koppor
Copy link
Member Author

koppor commented Jul 24, 2018 via email

@JoKalliauer
Copy link
Contributor

JoKalliauer commented Jul 27, 2018

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)

@koppor
Copy link
Member Author

koppor commented Aug 7, 2018

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

@Siedlerchr Siedlerchr mentioned this issue Jan 26, 2019
6 tasks
@koppor koppor reopened this Jan 27, 2019
@tobiasdiez tobiasdiez removed freeze good first issue An issue intended for project-newcomers. Varies in difficulty. labels Jan 27, 2019
@koppor
Copy link
Member Author

koppor commented Feb 3, 2019

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

As far as I understand #4619 (comment), 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.

@LyzardKing
Copy link
Collaborator

LyzardKing commented Feb 4, 2019

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/

@Siedlerchr
Copy link
Member

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

@LyzardKing
Copy link
Collaborator

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...)

@Siedlerchr
Copy link
Member

@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?

@LyzardKing
Copy link
Collaborator

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

@koppor
Copy link
Member Author

koppor commented Oct 9, 2019

@LyzardKing Thank you for #5379

Are the following two frozen issues fixed by that PR?

@LyzardKing
Copy link
Collaborator

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

@koppor koppor added platform: snap When JabRef is run as a snap on linux and removed help wanted labels Oct 13, 2019
@koppor
Copy link
Member Author

koppor commented Mar 29, 2020

Follow up at #5417

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev: build-system platform: linux platform: snap When JabRef is run as a snap on linux
Projects
None yet
Development

No branches or pull requests

6 participants