Skip to content

Commit 3eb585f

Browse files
authored
Merge pull request JabRef#11664 from JabRef/add-debian-vm
Add Debian VM (and improve other Vagrant files)
2 parents 833cf30 + 94d4da1 commit 3eb585f

File tree

8 files changed

+126
-36
lines changed

8 files changed

+126
-36
lines changed

scripts/vms/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ Then, everything is removed.
4949

5050
## Available VMs
5151

52-
| VM | JabRef | Browser | LibreOffice |
53-
|-------------------------------------------------|---------|---------|-------------|
54-
| [`fedora`](fedora/) | source | -- | -- |
55-
| [`Linux Mint (Cinnamon)`](linux-mint-cinnamon/) | source | Firefox | yes |
56-
| [`ubuntu`](ubuntu/) | snap | Firefox | yes |
57-
| [`windows`](windows/) | source | Edge | -- |
52+
| VM | JabRef | Browser | LibreOffice | IntelliJ |
53+
|-------------------------------------------------|---------|---------|-------------| --------- |
54+
| [`Debian 12`](debian-12/) | source | Firefox | -- | yes |
55+
| [`fedora`](fedora/) | source | -- | -- | -- |
56+
| [`Linux Mint (Cinnamon)`](linux-mint-cinnamon/) | source | Firefox | yes | -- |
57+
| [`ubuntu`](ubuntu/) | snap | Firefox | yes | -- |
58+
| [`windows`](windows/) | source | Edge | -- | -- |
5859

5960
## Troubleshooting
6061

scripts/vms/debian-12/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Debian 12
2+
3+
Uses <https://github.com/alvistack/vagrant-debian>.
4+
5+
Reproducer for <https://github.com/JabRef/jabref/issues/10731#issuecomment-2302373288>.
6+
7+
Installs [Just Perfection GNOME Shell Extension](https://gitlab.gnome.org/jrahmatzadeh/just-perfection).
8+
9+
After `vagrant up`:
10+
11+
1. Terminate the VM.
12+
2. Open settings of the VM.
13+
3. Reconfigure the Virtual Box display to "VMSVGA", "Enable 3D Acceleration", use 32 MB of Video RAM.
14+
4. Power on.
15+
5. Log in.
16+
17+
Then, start JabRef by following steps:
18+
19+
1. Open termminal
20+
2. `cd jabref`
21+
3. `./gradlew run`

scripts/vms/debian-12/Vagrantfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
NAME = "jabref-debian-12"
5+
6+
Vagrant.configure("2") do |config|
7+
8+
config.vm.box = "alvistack/debian-12"
9+
10+
config.vm.define NAME
11+
config.vm.hostname = NAME
12+
13+
config.vm.provider "virtualbox" do |v|
14+
v.name = NAME
15+
v.gui = true
16+
v.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2"]
17+
end
18+
19+
config.vm.provision "shell", inline: <<-SHELL
20+
sudo apt-get update
21+
sudo apt-get -y upgrade
22+
23+
# enable building of the virtual box guest addons
24+
# hint from https://forums.virtualbox.org/viewtopic.php?p=508680&sid=fe86fb0f6c03c7443f1fba9a5c29a861#p508680
25+
# sudo apt install -y build-essential dkms
26+
27+
sudo apt-get install -y git
28+
29+
# sudo apt-get install -y task-cinnamon-desktop
30+
31+
# install IntelliJ Community Edition - source: https://snapcraft.io/install/intellij-idea-community/debian
32+
sudo rm /etc/apt/preferences.d/nosnap.pref # source: https://stackoverflow.com/a/77235743/873282
33+
sudo apt-get install -y snapd
34+
sudo snap install snapd
35+
sudo snap install intellij-idea-community --classic
36+
SHELL
37+
38+
config.vm.provision "shell", privileged: false, inline: <<-SHELL
39+
# Install "Just Perfection GNOME Shell Extension"
40+
cd /tmp
41+
wget https://extensions.gnome.org/extension-data/just-perfection-desktopjust-perfection.v26.shell-extension.zip -O shell-extension.zip
42+
gnome-extensions install --force shell-extension.zip
43+
44+
# Install JDK, clone JabRef's source code, and do an initial build
45+
curl -s "https://get.sdkman.io" | bash
46+
source "$HOME/.sdkman/bin/sdkman-init.sh"
47+
sdk install java 21.0.4-tem < /dev/null
48+
49+
cd ~
50+
git clone --recurse-submodules https://github.com/JabRef/jabref.git
51+
cd jabref
52+
sdk use java 21.0.4-tem
53+
./gradlew jar
54+
SHELL
55+
56+
config.vm.provision "shell", inline: "sudo reboot"
57+
58+
config.ssh.forward_x11 = true
59+
end

scripts/vms/fedora/Vagrantfile

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33

4+
NAME = "jabref-fedora-39"
5+
46
Vagrant.configure("2") do |config|
57

68
config.vm.box = "fedora/39-cloud-base"
79

8-
config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true
9-
config.vm.network :forwarded_port, guest: 9000, host: 9000, auto_correct: true
10-
config.vm.network :forwarded_port, guest: 5000, host: 5000, auto_correct: true
10+
config.vm.define NAME
11+
config.vm.hostname = NAME
1112

1213
config.vm.provider "virtualbox" do |v|
13-
v.name = "jabref-fedora"
14+
v.name = NAME
1415
v.gui = true
1516
v.customize ["modifyvm", :id, "--memory", "4096", "--cpus", "2"]
1617
end
1718

18-
config.vm.provision "shell", inline: "sudo dnf update -y"
19-
config.vm.provision "shell", inline: "sudo dnf install -y @kde-desktop-environment"
19+
config.vm.provision "shell", inline: <<-SHELL
20+
sudo dnf update -y
21+
sudo dnf install -y @kde-desktop-environment
2022
21-
# Following X11 packages are NOT required even the clipboard functionality seems to ask for (cf. https://github.com/JabRef/jabref/issues/11464)
22-
# config.vm.provision "shell", inline: "sudo dnf install -y kwin-x11 plasma-workspace-x11"
23+
# Following X11 packages are NOT required even the clipboard functionality seems to ask for (cf. https://github.com/JabRef/jabref/issues/11464)
24+
# sudo dnf install -y kwin-x11 plasma-workspace-x11
2325
24-
# We need exactly the java version required by JabRef. Auto download does not work on Fedora.
25-
config.vm.provision "shell", inline: "sudo dnf install -y git java-21-openjdk-devel.x86_64"
26+
# We need exactly the java version required by JabRef. Auto download does not work on Fedora.
27+
sudo dnf install -y git java-21-openjdk-devel.x86_64
2628
27-
config.vm.provision "shell", inline: "sudo systemctl set-default graphical.target"
29+
sudo systemctl set-default graphical.target
30+
SHELL
2831

29-
config.vm.provision "shell", inline: "git clone --recurse-submodules https://github.com/JabRef/jabref.git", privileged: false
30-
config.vm.provision "shell", inline: "cd jabref && ./gradlew jar || true", privileged: false
32+
config.vm.provision "shell", privileged:false, inline: <<-SHELL
33+
git clone --recurse-submodules https://github.com/JabRef/jabref.git
34+
cd jabref && ./gradlew jar || true
35+
SHELL
3136

32-
# config.vm.provision "shell", inline: "sudo systemctl enable sddm"
3337
config.vm.provision "shell", inline: "sudo reboot"
3438

3539
config.ssh.forward_x11 = true

scripts/vms/linux-mint-cinnamon/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Linux Mint Cinnamon VM
22

3-
[Linux Mint](https://linuxmint.com/) with JabRef snap and libreoffice-connection pre-installed.
3+
[Linux Mint](https://linuxmint.com/) with JabRef sources.
44

5-
Uses <https://app.vagrantup.com/archman/boxes/linuxmint/versions/22>.
5+
Uses <https://portal.cloud.hashicorp.com/vagrant/discover/aaronvonawesome/linux-mint-21-cinnamon>.
66

77
Start JabRef by following steps:
88

9-
- 1. Open termminal
10-
- 2. `cd jabref`
11-
- 3. `./gradlew run`
9+
1. Open termminal
10+
2. `cd jabref`
11+
3. `./gradlew run`
1212

1313
## Alternatives
1414

scripts/vms/linux-mint-cinnamon/Vagrantfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33

4+
NAME = "jabref-linux-mint-cinnamon"
5+
46
Vagrant.configure("2") do |config|
57

68
# https://portal.cloud.hashicorp.com/vagrant/discover/aaronvonawesome/linux-mint-21-cinnamon
79
config.vm.box = "aaronvonawesome/linux-mint-21-cinnamon"
810
# config.vm.box = "archman/linuxmint" # v22
911

10-
config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true
12+
config.vm.define NAME
13+
config.vm.hostname = NAME
1114

1215
config.vm.provider "virtualbox" do |v|
13-
v.name = "jabref-linux-mint-cinnamon"
16+
v.name = NAME
1417
v.gui = true
1518
v.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2"]
1619
end
@@ -40,5 +43,7 @@ Vagrant.configure("2") do |config|
4043
./gradlew jar
4144
SHELL
4245

46+
config.vm.provision "shell", inline: "sudo reboot"
47+
4348
config.ssh.forward_x11 = true
4449
end

scripts/vms/ubuntu/Vagrantfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
33

4+
NAME = "jabref-ubuntu-24.04"
5+
46
Vagrant.configure("2") do |config|
57

68
# config.vm.box = "ubuntu/trusty64"
@@ -12,18 +14,17 @@ Vagrant.configure("2") do |config|
1214
# Here, the ubuntu-desktop works without usses
1315
config.vm.box = "caspermeijn/ubuntu-desktop-24.04"
1416

15-
config.vm.network :forwarded_port, guest: 80, host: 8080, auto_correct: true
16-
config.vm.network :forwarded_port, guest: 9000, host: 9000, auto_correct: true
17-
config.vm.network :forwarded_port, guest: 5000, host: 5000, auto_correct: true
18-
1917
# Share an additional folder to the guest VM. The first argument is
2018
# the path on the host to the actual folder. The second argument is
2119
# the path on the guest to mount the folder. And the optional third
2220
# argument is a set of non-required options.
2321
# config.vm.synced_folder "C:/TEMP/JabRef", "/tmp/jabref"
2422

23+
config.vm.define NAME
24+
config.vm.hostname = NAME
25+
2526
config.vm.provider "virtualbox" do |v|
26-
v.name = "jabref-ubuntu"
27+
v.name = NAME
2728
v.gui = true
2829
v.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2"]
2930
end

scripts/vms/windows/Vagrantfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# -*- mode: ruby -*-
22
# vi: set ft=ruby :
3+
34
NAME = "jabref-windows-sandbox"
45

56
Vagrant.configure("2") do |config|
67
config.vm.box = "gusztavvargadr/windows-10"
78
config.vm.box_url = "https://app.vagrantup.com/gusztavvargadr/boxes/windows-10"
9+
10+
config.vm.define NAME
811
config.vm.hostname = NAME
912

1013
config.vm.provider "virtualbox" do |vb|
@@ -40,8 +43,4 @@ Vagrant.configure("2") do |config|
4043
# cd jabref
4144
# .\\gradlew jar
4245
SHELL
43-
44-
# Used to set the Vagrant machine name
45-
config.vm.define NAME do |t|
46-
end
4746
end

0 commit comments

Comments
 (0)