Verinice/Kompilieren: Unterschied zwischen den Versionen

Aus Foxwiki
Zeile 141: Zeile 141:
* Windows 64 bit
* Windows 64 bit
* Mac OS X 64 bit
* Mac OS X 64 bit
==== Beispiel ====
$ '''cd /usr/srv/verince'''
$ '''./mvnw -Dtycho.disableP2Mirrors=true clean verify'''
[...]
Results:
Tests run: 75, Failures: 0, Errors: 0, Skipped: 0
[INFO] All tests passed!
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] sernet.verinice.tycho.root 1.25.0-SNAPSHOT ......... SUCCESS [  0.430 s]
[INFO] target-platform 1.25.0-SNAPSHOT .................... SUCCESS [  0.066 s]
[INFO] jbpm 4.4.1 ......................................... SUCCESS [  5.107 s]
[INFO] org.eclipse.e4.rcp.sernet 1.25.0-SNAPSHOT .......... SUCCESS [  5.269 s]
[INFO] sernet.birt.feature 1.25.0-SNAPSHOT ................ SUCCESS [ 20.659 s]
[INFO] sernet.datatools.feature 1.25.0-SNAPSHOT ........... SUCCESS [  6.668 s]
[INFO] sernet.eclipse.feature 1.25.0-SNAPSHOT ............. SUCCESS [  6.686 s]
[INFO] sernet.gs.db.fragment 1.25.0-SNAPSHOT .............. SUCCESS [  0.139 s]
[INFO] sernet.gs.ehcache.fragment 1.25.0-SNAPSHOT ......... SUCCESS [  0.067 s]
[INFO] sernet.gs.hibernate.fragment 1.25.0-SNAPSHOT ....... SUCCESS [  0.040 s]
[INFO] sernet.gs.log4j.fragment 1.25.0-SNAPSHOT ........... SUCCESS [  0.024 s]
[INFO] sernet.gs.pax_web.fragment 1.25.0-SNAPSHOT ......... SUCCESS [  3.350 s]
[INFO] sernet.gs.reveng 1.25.0-SNAPSHOT ................... SUCCESS [  3.584 s]
[INFO] sernet.hui.common 1.25.0-SNAPSHOT .................. SUCCESS [  5.568 s]
[INFO] sernet.gs.service 1.25.0-SNAPSHOT .................. SUCCESS [  3.682 s]
[INFO] sernet.hui.swtclient 1.25.0-SNAPSHOT ............... SUCCESS [  3.585 s]
[INFO] sernet.springclient 1.25.0-SNAPSHOT ................ SUCCESS [ 32.863 s]
[INFO] sernet.gs.ui.rcp.main 1.25.0-SNAPSHOT .............. SUCCESS [ 26.362 s]
[INFO] sernet.verinice.oda.driver 1.25.0-SNAPSHOT ......... SUCCESS [  1.658 s]
[INFO] sernet.verinice.samt.service 1.25.0-SNAPSHOT ....... SUCCESS [  0.344 s]
[INFO] sernet.verinice.report.service 1.25.0-SNAPSHOT ..... SUCCESS [  3.134 s]
[INFO] sernet.verinice.fei.service 1.25.0-SNAPSHOT ........ SUCCESS [  0.321 s]
[INFO] sernet.gs.server 1.25.0-SNAPSHOT ................... SUCCESS [05:38 min]
[INFO] sernet.gs.server.feature 1.25.0-SNAPSHOT ........... SUCCESS [  0.057 s]
[INFO] sernet.gs.springweb.fragment 1.25.0-SNAPSHOT ....... SUCCESS [  0.018 s]
[INFO] sernet.localdependencies 1.25.0-SNAPSHOT ........... SUCCESS [  0.011 s]
[INFO] sernet.verinice.fei.rcp 1.25.0-SNAPSHOT ............ SUCCESS [  2.119 s]
[INFO] sernet.verinice.samt.rcp 1.25.0-SNAPSHOT ........... SUCCESS [  1.843 s]
[INFO] sernet.verinice.desktop.integration 1.25.0-SNAPSHOT  SUCCESS [  0.395 s]
[INFO] waffle 1.7.4 ....................................... SUCCESS [  0.076 s]
[INFO] sernet.verinice.kerberos 1.25.0-SNAPSHOT ........... SUCCESS [  0.504 s]
[INFO] sernet.rcp.ui.feature 1.25.0-SNAPSHOT .............. SUCCESS [  0.083 s]
[INFO] sernet.thirdparty.feature 1.25.0-SNAPSHOT .......... SUCCESS [  6.673 s]
[INFO] sernet.verinice.lang.feature 1.25.0-SNAPSHOT ....... SUCCESS [ 20.592 s]
[INFO] sernet.verinice.extraresources.jre_linux_64 1.25.0-SNAPSHOT SUCCESS [  3.935 s]
[INFO] sernet.verinice.extraresources.jre_win_64 1.25.0-SNAPSHOT SUCCESS [  4.093 s]
[INFO] sernet.verinice.extraresources.jre_macos_64 1.25.0-SNAPSHOT SUCCESS [  4.202 s]
[INFO] sernet.verinice.extraresources.feature 1.25.0-SNAPSHOT SUCCESS [  0.051 s]
[INFO] sernet.verinice.app.feature 1.25.0-SNAPSHOT ........ SUCCESS [  0.087 s]
[INFO] sernet.verinice.releng.client.product 1.25.0-SNAPSHOT SUCCESS [01:26 min]
[INFO] sernet.verinice.releng.server.product 1.25.0-SNAPSHOT SUCCESS [ 24.593 s]
[INFO] sernet.gs.server.tests 1.25.0-SNAPSHOT ............. SUCCESS [ 19.369 s]
[INFO] sernet.gs.service.tests 1.25.0-SNAPSHOT ............ SUCCESS [  4.358 s]
[INFO] sernet.gs.ui.rcp.main.tests 1.25.0-SNAPSHOT ........ SUCCESS [ 13.346 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  14:11 min
[INFO] Finished at: 2022-11-25T12:51:01+01:00
[INFO] ------------------------------------------------------------------------


=== Verinice-Client-Update-Site ===
=== Verinice-Client-Update-Site ===

Version vom 29. Mai 2023, 10:58 Uhr

Vernice Client, Update-Site und Server kompilieren

Beschreibung

  • Windows
  • Mac
  • Linux

Umgebung

Betriebssystem

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bookworm/sid"

Java

$ java -version
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment (build 11.0.17+8-post-Debian-2)
OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Debian-2, mixed mode, sharing)
$ echo $JAVA_HOME
/usr/lib/jvm/default-java/
$ ls -l /usr/lib/jvm/
lrwxrwxrwx 1 root root   25 25. Nov 12:24 default-java -> java-1.11.0-openjdk-amd64
lrwxrwxrwx 1 root root   21 18. Okt 2019  java-1.11.0-openjdk-amd64 -> java-11-openjdk-amd64
lrwxrwxrwx 1 root root   21 20. Jan 2022  java-1.17.0-openjdk-amd64 -> java-17-openjdk-amd64
lrwxrwxrwx 1 root root   21 17. Feb 2022  java-1.18.0-openjdk-amd64 -> java-18-openjdk-amd64
lrwxrwxrwx 1 root root   21 19. Okt 07:16 java-1.19.0-openjdk-amd64 -> java-19-openjdk-amd64
drwxr-xr-x 9 root root 4,0K 14. Nov 07:35 java-11-openjdk-amd64
lrwxrwxrwx 1 root root   21 21. Okt 10:28 java-1.20.0-openjdk-amd64 -> java-20-openjdk-amd64
drwxr-xr-x 9 root root 4,0K 25. Nov 11:50 java-17-openjdk-amd64
lrwxrwxrwx 1 root root   20 24. Apr 2022  java-1.8.0-openjdk-amd64 -> java-8-openjdk-amd64
drwxr-xr-x 9 root root 4,0K 25. Nov 11:50 java-18-openjdk-amd64
drwxr-xr-x 9 root root 4,0K 25. Nov 11:50 java-19-openjdk-amd64
drwxr-xr-x 9 root root 4,0K 25. Nov 11:50 java-20-openjdk-amd64
drwxr-xr-x 5 root root 4,0K 27. Apr 2022  java-8-openjdk-amd64
drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-11
drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-17
drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-18
drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-19
drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-20

Quellen bereitstellen

$ cd /usr/src
$ git clone https://github.com/SerNet/verinice
Klone nach 'verinice'...
remote: Enumerating objects: 148244, done.
remote: Counting objects: 100% (6964/6964), done.
remote: Compressing objects: 100% (2221/2221), done.
remote: Total 148244 (delta 4588), reused 6150 (delta 4235), pack-reused 141280
Empfange Objekte: 100% (148244/148244), 1.23 GiB | 8.96 MiB/s, fertig.
Löse Unterschiede auf: 100% (95543/95543), fertig.
Aktualisiere Dateien: 100% (12390/12390), fertig.
Basisverzeichnis
$ ls /usr/srv/verinice
bouncycastle                               sernet.birt.feature                  sernet.thirdparty.feature
CODINGSTYLE.md                             sernet.client.service                sernet.verinice.app.feature
COPYRIGHT.md                               sernet.client.service.handlerrights  sernet.verinice.bp.importer
dependencies                               sernet.datatools.feature             sernet.verinice.desktop.integration
doc                                        sernet.eclipse.feature               sernet.verinice.extraresources.feature
gnumail                                    sernet.gs.db.fragment                sernet.verinice.extraresources.jre_linux_64
gui-test-runner                            sernet.gs.ehcache.fragment           sernet.verinice.extraresources.jre_macos_64
jbpm                                       sernet.gs.hibernate.fragment         sernet.verinice.extraresources.jre_win_64
Jenkinsfile                                sernet.gs.log4j.fragment             sernet.verinice.fei.rcp
Jenkinsfile.nightly                        sernet.gs.pax_web.fragment           sernet.verinice.fei.service
Jenkinsfile.rcptt-all-report-tests         sernet.gs.reveng                     sernet.verinice.kerberos
Jenkinsfile.rcptt-client-performance-test  sernet.gs.server                     sernet.verinice.lang.feature
Jenkinsfile.rcptt-client-test              sernet.gs.server.feature             sernet.verinice.oda.driver
Jenkinsfile.rcptt-product-report-test      sernet.gs.server.tests               sernet.verinice.releng.client.product
Jenkinsfile.rcptt-server-performance-test  sernet.gs.service                    sernet.verinice.releng.server.product
Jenkinsfile.server-rcptt-test              sernet.gs.service.tests              sernet.verinice.report.service
LICENSE                                    sernet.gs.springweb.fragment         sernet.verinice.samt.rcp
mvnw                                       sernet.gs.ui.rcp.main                sernet.verinice.samt.service
mvnw.cmd                                   sernet.gs.ui.rcp.main.tests          target-platform
notes                                      sernet.hui.common                    TCOracle.pdf
org.eclipse.e4.rcp.sernet                  sernet.hui.swtclient                 verinice-distribution
pom.xml                                    sernet.localdependencies             verinice-gui-tests
README.md                                  sernet.rcp.ui.feature                waffle
SECURITY.md                                sernet.springclient
Umgebung bereinigen
$ rm -r ~/.m2/

Java integrieren

Wenn ein JRE (https://jdk.java.net/) integriert werden soll
sernet.verinice.extraresources.feature/linux/jre
sernet.verinice.extraresources.feature/windows/jre
sernet.verinice.extraresources.feature/macos/jre
Integration ist für macOS-Builds erforderlich

Linux

$ mkdir -p sernet.verinice.extraresources.jre_linux_64/jre 
$ cp -Lr $JAVA_HOME* sernet.verinice.extraresources.jre_linux_64/jre/
$ ls sernet.verinice.extraresources.jre_linux_64/jre
bin  conf  docs  legal  lib  man  release

Windows

# mkdir -p sernet.verinice.extraresources.jre_win_64/jre
$ wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_windows-x64_bin.zip -P /tmp
$ unzip /tmp/openjdk-11.0.2_windows-x64_bin.zip -d /tmp/openjdk-11.0.2_windows-x64_bin
$ cp -Lr /tmp/openjdk-11.0.2_windows-x64_bin/jdk-11.0.2/* sernet.verinice.extraresources.jre_win_64/jre
$ ls sernet.verinice.extraresources.jre_win_64/jre
bin  conf  include  jmods  legal  lib  release

MacOS

# mkdir -p sernet.verinice.extraresources.jre_macos_64/jre
$ wget  https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz -P /tmp
$ mkdir /tmp/openjdk-11.0.2_osx-x64_bin; tar --directory=/tmp/openjdk-11.0.2_osx-x64_bin -xf /tmp/openjdk-11.0.2_osx-x64_bin.tar.gz
$ cp -Lr /tmp/openjdk-11.0.2_osx-x64_bin/jdk-11.0.2.jdk/Contents/Home/* sernet.verinice.extraresources.jre_macos_64/jre
$ ls sernet.verinice.extraresources.jre_macos_64/jre/
bin  conf  include  jmods  legal  lib  release

Hinweise zu Versionen

Verinice 1.23.1

In der Datei sernet.gs.server/pom.xml alle http: durch https: ersetzen

# sed -i 's/http:/https:/g' sernet.gs.server/pom.xml

Kompilieren

Um den Verinice-Client, die Client-Update-Site und den Server auf einmal zu erstellen, führen Sie den folgenden Befehl aus:

./mvnw -Dtycho.disableP2Mirrors=true clean verify

In den folgenden Abschnitten erfahren Sie, wo die Artefakte für die Erstellung des Verinice-Clients, der Client-Update-Site und des Servers zu finden sind.

Wenn Sie die Junit-Tests überspringen wollen, müssen Sie den Parameter `-DskipTests` hinzufügen.

./mvnw -Dtycho.disableP2Mirrors=true -DskipTests clean verify

Verinice-Client

Die erstellten Artefakte befinden sich in

sernet.verinice.releng.client.product/target/products/
Es werden Artefakte für die folgenden Plattformen erzeugt
  • Linux GTK 64 bit
  • Windows 64 bit
  • Mac OS X 64 bit

Verinice-Client-Update-Site

Die P2-Update-Site befindet sich in

sernet.verinice.update_site/target/repository

Verinice-Server

Die WAR-Datei (die z. B. auf Tomcat bereitgestellt werden kann) befindet sich unter

sernet.verinice.releng.server.product/target/

Die WAR-Datei ist plattformunabhängig

  • im Gegensatz zu den Verinice-Client- und Report-Designer-Builds

Update

Backup
# apt install pigz
$ cd /usr/src/
/usr/src/ $ tar -cf verinice_$(date +%Y-%m-%d-%H%M%S).tar.gz -I pigz verinice/
Umgebung bereinigen
$ rm -r ~/.m2/
Quellen aktualisieren
$ cd /usr/src/verinice
/usr/src/verinice $ git pull 
Kompilation
/usr/src/verinice $ ./mvnw -Dtycho.disableP2Mirrors=true clean verify
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] sernet.verinice.tycho.root 1.26.0-SNAPSHOT ......... SUCCESS [  0.440 s]
[INFO] target-platform 1.26.0-SNAPSHOT .................... SUCCESS [  0.078 s]
[INFO] jbpm 4.4.1 ......................................... SUCCESS [  5.611 s]
[INFO] org.eclipse.e4.rcp.sernet 1.26.0-SNAPSHOT .......... SUCCESS [  5.949 s]
[INFO] sernet.birt.feature 1.26.0-SNAPSHOT ................ SUCCESS [ 20.496 s]
[INFO] sernet.datatools.feature 1.26.0-SNAPSHOT ........... SUCCESS [  6.688 s]
[INFO] sernet.eclipse.feature 1.26.0-SNAPSHOT ............. SUCCESS [  5.607 s]
[INFO] sernet.gs.db.fragment 1.26.0-SNAPSHOT .............. SUCCESS [  0.132 s]
[INFO] sernet.gs.ehcache.fragment 1.26.0-SNAPSHOT ......... SUCCESS [  0.075 s]
[INFO] sernet.gs.hibernate.fragment 1.26.0-SNAPSHOT ....... SUCCESS [  0.053 s]
[INFO] sernet.gs.log4j.fragment 1.26.0-SNAPSHOT ........... SUCCESS [  0.021 s]
[INFO] sernet.gs.pax_web.fragment 1.26.0-SNAPSHOT ......... SUCCESS [  1.286 s]
[INFO] sernet.gs.reveng 1.26.0-SNAPSHOT ................... SUCCESS [  5.958 s]
[INFO] sernet.hui.common 1.26.0-SNAPSHOT .................. SUCCESS [  3.534 s]
[INFO] sernet.gs.service 1.26.0-SNAPSHOT .................. SUCCESS [  6.184 s]
[INFO] sernet.hui.swtclient 1.26.0-SNAPSHOT ............... SUCCESS [  3.519 s]
[INFO] sernet.springclient 1.26.0-SNAPSHOT ................ SUCCESS [ 29.967 s]
[INFO] sernet.gs.ui.rcp.main 1.26.0-SNAPSHOT .............. SUCCESS [ 32.955 s]
[INFO] sernet.verinice.oda.driver 1.26.0-SNAPSHOT ......... SUCCESS [  1.346 s]
[INFO] sernet.verinice.samt.service 1.26.0-SNAPSHOT ....... SUCCESS [  0.304 s]
[INFO] sernet.verinice.report.service 1.26.0-SNAPSHOT ..... SUCCESS [  3.574 s]
[INFO] sernet.verinice.fei.service 1.26.0-SNAPSHOT ........ SUCCESS [  0.246 s]
[INFO] sernet.gs.server 1.26.0-SNAPSHOT ................... SUCCESS [ 47.196 s]
[INFO] sernet.gs.server.feature 1.26.0-SNAPSHOT ........... SUCCESS [  0.075 s]
[INFO] sernet.gs.springweb.fragment 1.26.0-SNAPSHOT ....... SUCCESS [  0.018 s]
[INFO] sernet.localdependencies 1.26.0-SNAPSHOT ........... SUCCESS [  0.009 s]
[INFO] sernet.verinice.fei.rcp 1.26.0-SNAPSHOT ............ SUCCESS [  2.011 s]
[INFO] sernet.verinice.samt.rcp 1.26.0-SNAPSHOT ........... SUCCESS [  1.956 s]
[INFO] sernet.verinice.desktop.integration 1.26.0-SNAPSHOT  SUCCESS [  0.319 s]
[INFO] waffle 1.7.4 ....................................... SUCCESS [  0.065 s]
[INFO] sernet.verinice.kerberos 1.26.0-SNAPSHOT ........... SUCCESS [  0.424 s]
[INFO] sernet.rcp.ui.feature 1.26.0-SNAPSHOT .............. SUCCESS [  0.089 s]
[INFO] sernet.thirdparty.feature 1.26.0-SNAPSHOT .......... SUCCESS [  6.551 s]
[INFO] sernet.verinice.lang.feature 1.26.0-SNAPSHOT ....... SUCCESS [ 12.515 s]
[INFO] sernet.verinice.extraresources.jre_linux_64 1.26.0-SNAPSHOT SUCCESS [  4.896 s]
[INFO] sernet.verinice.extraresources.jre_win_64 1.26.0-SNAPSHOT SUCCESS [  3.795 s]
[INFO] sernet.verinice.extraresources.jre_macos_64 1.26.0-SNAPSHOT SUCCESS [  3.779 s]
[INFO] sernet.verinice.extraresources.feature 1.26.0-SNAPSHOT SUCCESS [  0.042 s]
[INFO] sernet.verinice.app.feature 1.26.0-SNAPSHOT ........ SUCCESS [  0.107 s]
[INFO] sernet.verinice.releng.client.product 1.26.0-SNAPSHOT SUCCESS [01:52 min]
[INFO] sernet.verinice.releng.server.product 1.26.0-SNAPSHOT SUCCESS [ 25.027 s]
[INFO] sernet.gs.server.tests 1.26.0-SNAPSHOT ............. SUCCESS [ 16.057 s]
[INFO] sernet.gs.service.tests 1.26.0-SNAPSHOT ............ SUCCESS [  3.761 s]
[INFO] sernet.gs.ui.rcp.main.tests 1.26.0-SNAPSHOT ........ SUCCESS [  9.020 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  09:38 min
[INFO] Finished at: 2023-05-29T09:56:59+02:00
[INFO] ------------------------------------------------------------------------

Versionierung

Aktualisieren der Version des Projekts

1. ausführen

./mvnw -Dtycho.mode=maven -DnewVersion=x.y.z.qualifier tycho-versions:set-version

Beachten Sie, dass qualifier wörtlich gemeint ist und von tycho/osgi als magische Zeichenkette behandelt wird, d.h.

./mvnw -DnewVersion=1.19.0.qualifier tycho-versions:set-version

schreibt 1.19.0-SNAPSHOT in die Update pom.xml Dateien und 1.19.0.qualifier in die aktualisierten feature.xml Dateien.

2. Aktualisieren Sie Version und Codename im About-Text in Branding > About Dialog von

sernet.verinice.releng.client.product/sernet.verinice.releng.client.product

3. synchronisieren Sie den About-Text wieder mit dem Plugin (Übersicht > Testen > Synchronisieren) in

sernet.verinice.releng.client.product/sernet.verinice.releng.client.product.

4. Aktualisieren Sie das Versionsmakro in den Handbüchern

5. Aktualisieren Sie die Version in den Splash-Screens von verinice

sernet.gs.ui.rcp.main/etc/splashscreen/splash.xcf

Siehe auch

Links

Projekt

  1. https://github.com/SerNet/verinice