Verinice/Kompilieren: Unterschied zwischen den Versionen

Aus Foxwiki
 
(76 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
'''Vernice''' Client, Update-Site und Server '''kompilieren'''
'''Vernice kompilieren''' - Client, Update-Site und Server für Linux, Mac und Windows
== Beschreibung ==
== Installation ==
== Syntax ==
=== Optionen ===
=== Parameter ===
=== Umgebungsvariablen ===
=== Exit-Status ===
== Anwendungen ==
=== Fehlerbehebung ===
== Konfiguration ==
=== Dateien ===
== Siehe auch ==
=== Unterseiten ===
{{Special:PrefixIndex/{{BASEPAGENAME}}}}
=== Sicherheit ===
=== Dokumentation ===
==== RFC ====
==== Man-Pages ====
==== Info-Pages ====
=== Links ===
==== Einzelnachweise ====
<references />
==== Projekt ====
# https://github.com/SerNet/verinice
 
==== Weblinks ====
# https://forum.verinice.com/t/1-23-0-kompilieren/1512/7
 
== Testfragen ==
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 1''
<div class="mw-collapsible-content">'''Antwort1'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 2''
<div class="mw-collapsible-content">'''Antwort2'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 3''
<div class="mw-collapsible-content">'''Antwort3'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 4''
<div class="mw-collapsible-content">'''Antwort4'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 5''
<div class="mw-collapsible-content">'''Antwort5'''</div>
</div>
 


= TMP =
=== Umgebung ===
== Beschreibung ==
* Windows
* Mac
* Linux
== Umgebung ==
'''Betriebssystem'''
'''Betriebssystem'''
  $ '''cat /etc/os-release'''
  $ '''cat /etc/os-release'''
  PRETTY_NAME="Debian GNU/Linux bookworm/sid"
  PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"


'''Java'''
'''Java'''
  $ '''java -version'''
  $ '''java -version'''
  openjdk version "11.0.17" 2022-10-18
  openjdk version "17.0.6" 2023-01-17
  OpenJDK Runtime Environment (build 11.0.17+8-post-Debian-2)
  OpenJDK Runtime Environment (build 17.0.6+10-Debian-1)
  OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Debian-2, mixed mode, sharing)
  OpenJDK 64-Bit Server VM (build 17.0.6+10-Debian-1, mixed mode, sharing)


  $ '''echo $JAVA_HOME'''
  $ '''echo $JAVA_HOME'''
  /usr/lib/jvm/default-java/
  /usr/lib/jvm/default-java/


  $ '''ls -l /usr/lib/jvm/'''
  $ '''ls /usr/lib/jvm/'''
  lrwxrwxrwx 1 root root  25 25. Nov 12:24 default-java -> java-1.11.0-openjdk-amd64
  default-java -> java-1.17.0-openjdk-amd64
lrwxrwxrwx 1 root root  21 18. Okt 2019 java-1.11.0-openjdk-amd64 -> java-11-openjdk-amd64
  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
  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
  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
  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
  java-11-openjdk-amd64
  lrwxrwxrwx 1 root root  21 21. Okt 10:28 java-1.20.0-openjdk-amd64 -> java-20-openjdk-amd64
  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
  java-17-openjdk-amd64
lrwxrwxrwx 1 root root  20 24. Apr 2022 java-1.8.0-openjdk-amd64 -> java-8-openjdk-amd64
  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
  java-18-openjdk-amd64
  drwxr-xr-x 9 root root 4,0K 25. Nov 11:50 java-19-openjdk-amd64
  java-19-openjdk-amd64
  drwxr-xr-x 9 root root 4,0K 25. Nov 11:50 java-20-openjdk-amd64
  java-20-openjdk-amd64
drwxr-xr-x 5 root root 4,0K 27. Apr 2022 java-8-openjdk-amd64
  java-8-openjdk-amd64
  drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-11
  openjdk-11
  drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-17
  openjdk-17
  drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-18
  openjdk-18
  drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-19
  openjdk-19
  drwxr-xr-x 2 root root 4,0K 25. Nov 11:50 openjdk-20
  openjdk-20


== Quellen bereitstellen ==
=== Quellen bereitstellen ===
  $ '''cd /usr/srv'''
  $ '''cd /usr/src'''
  $ '''git clone https://github.com/SerNet/verinice'''
  $ '''<nowiki>git clone https://github.com/SerNet/verinice</nowiki>'''
  Klone nach 'verinice'...
  Klone nach 'verinice'...
  remote: Enumerating objects: 148244, done.
  remote: Enumerating objects: 148244, done.
Zeile 104: Zeile 49:
; Basisverzeichnis
; Basisverzeichnis
  $ '''ls /usr/srv/verinice'''
  $ '''ls /usr/srv/verinice'''
  bouncycastle                               sernet.birt.feature                 sernet.thirdparty.feature
  bouncycastle sernet.birt.feature sernet.thirdparty.feature
  CODINGSTYLE.md                             sernet.client.service               sernet.verinice.app.feature
  CODINGSTYLE.md sernet.client.service sernet.verinice.app.feature
  COPYRIGHT.md                               sernet.client.service.handlerrights sernet.verinice.bp.importer
  COPYRIGHT.md sernet.client.service.handlerrights sernet.verinice.bp.importer
  dependencies                               sernet.datatools.feature             sernet.verinice.desktop.integration
  dependencies sernet.datatools.feature sernet.verinice.desktop.integration
  doc                                       sernet.eclipse.feature               sernet.verinice.extraresources.feature
  doc sernet.eclipse.feature sernet.verinice.extraresources.feature
  gnumail                                   sernet.gs.db.fragment               sernet.verinice.extraresources.jre_linux_64
  gnumail sernet.gs.db.fragment sernet.verinice.extraresources.jre_linux_64
  gui-test-runner                           sernet.gs.ehcache.fragment           sernet.verinice.extraresources.jre_macos_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
  jbpm sernet.gs.hibernate.fragment sernet.verinice.extraresources.jre_win_64
  Jenkinsfile                               sernet.gs.log4j.fragment             sernet.verinice.fei.rcp
  Jenkinsfile sernet.gs.log4j.fragment sernet.verinice.fei.rcp
  Jenkinsfile.nightly                       sernet.gs.pax_web.fragment           sernet.verinice.fei.service
  Jenkinsfile.nightly sernet.gs.pax_web.fragment sernet.verinice.fei.service
  Jenkinsfile.rcptt-all-report-tests         sernet.gs.reveng                     sernet.verinice.kerberos
  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-performance-test sernet.gs.server sernet.verinice.lang.feature
  Jenkinsfile.rcptt-client-test             sernet.gs.server.feature             sernet.verinice.oda.driver
  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-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.rcptt-server-performance-test sernet.gs.service sernet.verinice.releng.server.product
  Jenkinsfile.server-rcptt-test             sernet.gs.service.tests             sernet.verinice.report.service
  Jenkinsfile.server-rcptt-test sernet.gs.service.tests sernet.verinice.report.service
  LICENSE                                   sernet.gs.springweb.fragment         sernet.verinice.samt.rcp
  LICENSE sernet.gs.springweb.fragment sernet.verinice.samt.rcp
  mvnw                                       sernet.gs.ui.rcp.main               sernet.verinice.samt.service
  mvnw sernet.gs.ui.rcp.main sernet.verinice.samt.service
  mvnw.cmd                                   sernet.gs.ui.rcp.main.tests         target-platform
  mvnw.cmd sernet.gs.ui.rcp.main.tests target-platform
  notes                                     sernet.hui.common                   TCOracle.pdf
  notes sernet.hui.common TCOracle.pdf
  org.eclipse.e4.rcp.sernet                 sernet.hui.swtclient                 verinice-distribution
  org.eclipse.e4.rcp.sernet sernet.hui.swtclient verinice-distribution
  pom.xml                                   sernet.localdependencies             verinice-gui-tests
  pom.xml sernet.localdependencies verinice-gui-tests
  README.md                                 sernet.rcp.ui.feature               waffle
  README.md sernet.rcp.ui.feature waffle
  SECURITY.md                               sernet.springclient
  SECURITY.md sernet.springclient


; Umgebung bereinigen
==== Java integrieren ====
  $ '''rm -r ~/.m2/'''
; [[JRE]] integrieren
  sernet.verinice.extraresources.feature/linux/jre
sernet.verinice.extraresources.feature/windows/jre
sernet.verinice.extraresources.feature/macos/jre


=== Java integrieren ===
; Erforderlich für macOS-Builds
https://jdk.java.net/
* Es ist [https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html best practice], eine JRE in einen Application.app Ordner zu packen.
* Um eine gültige verinice.app zu erhalten, muss daher eine geeignete macOS JRE in sernet.thirdparty.feature/macos vorhanden sein.


==== Linux ====
===== Linux =====
  $ '''mkdir -p sernet.verinice.extraresources.jre_linux_64/jre '''
  $ '''mkdir -p sernet.verinice.extraresources.jre_linux_64/jre '''
  $ '''cp -Lr $JAVA_HOME* 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'''
  $ '''ls sernet.verinice.extraresources.jre_linux_64/jre'''
  bin conf docs legal lib man release
  bin conf docs legal lib man release


==== Windows ====
===== Windows =====
  # '''mkdir -p sernet.verinice.extraresources.jre_win_64/jre'''
  # '''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'''
  $ '''<nowiki>wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_windows-x64_bin.zip -P /tmp</nowiki>'''


  $ '''unzip /tmp/openjdk-11.0.2_windows-x64_bin.zip -d /tmp/openjdk-11.0.2_windows-x64_bin'''
  $ '''unzip /tmp/openjdk-11.0.2_windows-x64_bin.zip -d /tmp/openjdk-11.0.2_windows-x64_bin'''
Zeile 151: Zeile 100:


  $ '''ls sernet.verinice.extraresources.jre_win_64/jre'''
  $ '''ls sernet.verinice.extraresources.jre_win_64/jre'''
  bin conf include jmods legal lib release
  bin conf include jmods legal lib release


==== MacOS ====
===== MacOS =====
  # '''mkdir -p sernet.verinice.extraresources.jre_macos_64/jre'''
  # '''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'''
  $ '''wget <nowiki> https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz</nowiki> -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'''
  $ '''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'''
Zeile 162: Zeile 111:


  $ '''ls sernet.verinice.extraresources.jre_macos_64/jre/'''
  $ '''ls sernet.verinice.extraresources.jre_macos_64/jre/'''
  bin conf include jmods legal lib release
  bin conf include jmods legal lib release


=== Hinweise zu Versionen ===
==== Hinweise zu Versionen ====
==== Verinice 1.23.1 ====
===== Verinice 1.23.1 =====
In der Datei ''sernet.gs.server/pom.xml'' alle '''http:''' durch '''https:''' ersetzen
In der Datei ''sernet.gs.server/pom.xml'' alle '''http:''' durch '''https:''' ersetzen
  # sed -i 's/http:/https:/g' sernet.gs.server/pom.xml
  # sed -i 's/http:/https:/g' sernet.gs.server/pom.xml


== Kompilieren ==
=== Kompilieren ===
  $ '''cd /usr/srv/verince'''
; Umgebung bereinigen
  $ '''./mvnw -Dtycho.disableP2Mirrors=true clean verify'''
$ '''rm -r ~/.m2/'''
 
[...]
; Verinice-Client, Client-Update-Site und Server kompilieren
  $ '''cd /usr/src/verinice'''
Results:
  /usr/src/verinice $ '''./mvnw -Dtycho.disableP2Mirrors=true -DskipTests clean verify'''
 
Tests run: 75, Failures: 0, Errors: 0, Skipped: 0
[INFO] All tests passed!
  [INFO] ------------------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO] Reactor Summary:
  [INFO]
  [INFO]
  [INFO] sernet.verinice.tycho.root 1.25.0-SNAPSHOT ......... SUCCESS [ 0.430 s]
  [INFO] sernet.verinice.tycho.root 1.26.0-SNAPSHOT ......... SUCCESS [ 0.440 s]
  [INFO] target-platform 1.25.0-SNAPSHOT .................... SUCCESS [ 0.066 s]
  [INFO] target-platform 1.26.0-SNAPSHOT .................... SUCCESS [ 0.078 s]
  [INFO] jbpm 4.4.1 ......................................... SUCCESS [ 5.107 s]
  [INFO] jbpm 4.4.1 ......................................... SUCCESS [ 5.611 s]
  [INFO] org.eclipse.e4.rcp.sernet 1.25.0-SNAPSHOT .......... SUCCESS [ 5.269 s]
  [INFO] org.eclipse.e4.rcp.sernet 1.26.0-SNAPSHOT .......... SUCCESS [ 5.949 s]
  [INFO] sernet.birt.feature 1.25.0-SNAPSHOT ................ SUCCESS [ 20.659 s]
  [INFO] sernet.birt.feature 1.26.0-SNAPSHOT ................ SUCCESS [ 20.496 s]
  [INFO] sernet.datatools.feature 1.25.0-SNAPSHOT ........... SUCCESS [ 6.668 s]
  [INFO] sernet.datatools.feature 1.26.0-SNAPSHOT ........... SUCCESS [ 6.688 s]
  [INFO] sernet.eclipse.feature 1.25.0-SNAPSHOT ............. SUCCESS [ 6.686 s]
  [INFO] sernet.eclipse.feature 1.26.0-SNAPSHOT ............. SUCCESS [ 5.607 s]
  [INFO] sernet.gs.db.fragment 1.25.0-SNAPSHOT .............. SUCCESS [ 0.139 s]
  [INFO] sernet.gs.db.fragment 1.26.0-SNAPSHOT .............. SUCCESS [ 0.132 s]
  [INFO] sernet.gs.ehcache.fragment 1.25.0-SNAPSHOT ......... SUCCESS [ 0.067 s]
  [INFO] sernet.gs.ehcache.fragment 1.26.0-SNAPSHOT ......... SUCCESS [ 0.075 s]
  [INFO] sernet.gs.hibernate.fragment 1.25.0-SNAPSHOT ....... SUCCESS [ 0.040 s]
  [INFO] sernet.gs.hibernate.fragment 1.26.0-SNAPSHOT ....... SUCCESS [ 0.053 s]
  [INFO] sernet.gs.log4j.fragment 1.25.0-SNAPSHOT ........... SUCCESS [ 0.024 s]
  [INFO] sernet.gs.log4j.fragment 1.26.0-SNAPSHOT ........... SUCCESS [ 0.021 s]
  [INFO] sernet.gs.pax_web.fragment 1.25.0-SNAPSHOT ......... SUCCESS [ 3.350 s]
  [INFO] sernet.gs.pax_web.fragment 1.26.0-SNAPSHOT ......... SUCCESS [ 1.286 s]
  [INFO] sernet.gs.reveng 1.25.0-SNAPSHOT ................... SUCCESS [ 3.584 s]
  [INFO] sernet.gs.reveng 1.26.0-SNAPSHOT ................... SUCCESS [ 5.958 s]
  [INFO] sernet.hui.common 1.25.0-SNAPSHOT .................. SUCCESS [ 5.568 s]
  [INFO] sernet.hui.common 1.26.0-SNAPSHOT .................. SUCCESS [ 3.534 s]
  [INFO] sernet.gs.service 1.25.0-SNAPSHOT .................. SUCCESS [ 3.682 s]
  [INFO] sernet.gs.service 1.26.0-SNAPSHOT .................. SUCCESS [ 6.184 s]
  [INFO] sernet.hui.swtclient 1.25.0-SNAPSHOT ............... SUCCESS [ 3.585 s]
  [INFO] sernet.hui.swtclient 1.26.0-SNAPSHOT ............... SUCCESS [ 3.519 s]
  [INFO] sernet.springclient 1.25.0-SNAPSHOT ................ SUCCESS [ 32.863 s]
  [INFO] sernet.springclient 1.26.0-SNAPSHOT ................ SUCCESS [ 29.967 s]
  [INFO] sernet.gs.ui.rcp.main 1.25.0-SNAPSHOT .............. SUCCESS [ 26.362 s]
  [INFO] sernet.gs.ui.rcp.main 1.26.0-SNAPSHOT .............. SUCCESS [ 32.955 s]
  [INFO] sernet.verinice.oda.driver 1.25.0-SNAPSHOT ......... SUCCESS [ 1.658 s]
  [INFO] sernet.verinice.oda.driver 1.26.0-SNAPSHOT ......... SUCCESS [ 1.346 s]
  [INFO] sernet.verinice.samt.service 1.25.0-SNAPSHOT ....... SUCCESS [ 0.344 s]
  [INFO] sernet.verinice.samt.service 1.26.0-SNAPSHOT ....... SUCCESS [ 0.304 s]
  [INFO] sernet.verinice.report.service 1.25.0-SNAPSHOT ..... SUCCESS [ 3.134 s]
  [INFO] sernet.verinice.report.service 1.26.0-SNAPSHOT ..... SUCCESS [ 3.574 s]
  [INFO] sernet.verinice.fei.service 1.25.0-SNAPSHOT ........ SUCCESS [ 0.321 s]
  [INFO] sernet.verinice.fei.service 1.26.0-SNAPSHOT ........ SUCCESS [ 0.246 s]
  [INFO] sernet.gs.server 1.25.0-SNAPSHOT ................... SUCCESS [05:38 min]
  [INFO] sernet.gs.server 1.26.0-SNAPSHOT ................... SUCCESS [ 47.196 s]
  [INFO] sernet.gs.server.feature 1.25.0-SNAPSHOT ........... SUCCESS [ 0.057 s]
  [INFO] sernet.gs.server.feature 1.26.0-SNAPSHOT ........... SUCCESS [ 0.075 s]
  [INFO] sernet.gs.springweb.fragment 1.25.0-SNAPSHOT ....... SUCCESS [ 0.018 s]
  [INFO] sernet.gs.springweb.fragment 1.26.0-SNAPSHOT ....... SUCCESS [ 0.018 s]
  [INFO] sernet.localdependencies 1.25.0-SNAPSHOT ........... SUCCESS [ 0.011 s]
  [INFO] sernet.localdependencies 1.26.0-SNAPSHOT ........... SUCCESS [ 0.009 s]
  [INFO] sernet.verinice.fei.rcp 1.25.0-SNAPSHOT ............ SUCCESS [ 2.119 s]
  [INFO] sernet.verinice.fei.rcp 1.26.0-SNAPSHOT ............ SUCCESS [ 2.011 s]
  [INFO] sernet.verinice.samt.rcp 1.25.0-SNAPSHOT ........... SUCCESS [ 1.843 s]
  [INFO] sernet.verinice.samt.rcp 1.26.0-SNAPSHOT ........... SUCCESS [ 1.956 s]
  [INFO] sernet.verinice.desktop.integration 1.25.0-SNAPSHOT SUCCESS [ 0.395 s]
  [INFO] sernet.verinice.desktop.integration 1.26.0-SNAPSHOT SUCCESS [ 0.319 s]
  [INFO] waffle 1.7.4 ....................................... SUCCESS [ 0.076 s]
  [INFO] waffle 1.7.4 ....................................... SUCCESS [ 0.065 s]
  [INFO] sernet.verinice.kerberos 1.25.0-SNAPSHOT ........... SUCCESS [ 0.504 s]
  [INFO] sernet.verinice.kerberos 1.26.0-SNAPSHOT ........... SUCCESS [ 0.424 s]
  [INFO] sernet.rcp.ui.feature 1.25.0-SNAPSHOT .............. SUCCESS [ 0.083 s]
  [INFO] sernet.rcp.ui.feature 1.26.0-SNAPSHOT .............. SUCCESS [ 0.089 s]
  [INFO] sernet.thirdparty.feature 1.25.0-SNAPSHOT .......... SUCCESS [ 6.673 s]
  [INFO] sernet.thirdparty.feature 1.26.0-SNAPSHOT .......... SUCCESS [ 6.551 s]
  [INFO] sernet.verinice.lang.feature 1.25.0-SNAPSHOT ....... SUCCESS [ 20.592 s]
  [INFO] sernet.verinice.lang.feature 1.26.0-SNAPSHOT ....... SUCCESS [ 12.515 s]
  [INFO] sernet.verinice.extraresources.jre_linux_64 1.25.0-SNAPSHOT SUCCESS [ 3.935 s]
  [INFO] sernet.verinice.extraresources.jre_linux_64 1.26.0-SNAPSHOT SUCCESS [ 4.896 s]
  [INFO] sernet.verinice.extraresources.jre_win_64 1.25.0-SNAPSHOT SUCCESS [ 4.093 s]
  [INFO] sernet.verinice.extraresources.jre_win_64 1.26.0-SNAPSHOT SUCCESS [ 3.795 s]
  [INFO] sernet.verinice.extraresources.jre_macos_64 1.25.0-SNAPSHOT SUCCESS [ 4.202 s]
  [INFO] sernet.verinice.extraresources.jre_macos_64 1.26.0-SNAPSHOT SUCCESS [ 3.779 s]
  [INFO] sernet.verinice.extraresources.feature 1.25.0-SNAPSHOT SUCCESS [ 0.051 s]
  [INFO] sernet.verinice.extraresources.feature 1.26.0-SNAPSHOT SUCCESS [ 0.042 s]
  [INFO] sernet.verinice.app.feature 1.25.0-SNAPSHOT ........ SUCCESS [ 0.087 s]
  [INFO] sernet.verinice.app.feature 1.26.0-SNAPSHOT ........ SUCCESS [ 0.107 s]
  [INFO] sernet.verinice.releng.client.product 1.25.0-SNAPSHOT SUCCESS [01:26 min]
  [INFO] sernet.verinice.releng.client.product 1.26.0-SNAPSHOT SUCCESS [01:52 min]
  [INFO] sernet.verinice.releng.server.product 1.25.0-SNAPSHOT SUCCESS [ 24.593 s]
  [INFO] sernet.verinice.releng.server.product 1.26.0-SNAPSHOT SUCCESS [ 25.027 s]
  [INFO] sernet.gs.server.tests 1.25.0-SNAPSHOT ............. SUCCESS [ 19.369 s]
  [INFO] sernet.gs.server.tests 1.26.0-SNAPSHOT ............. SUCCESS [ 16.057 s]
  [INFO] sernet.gs.service.tests 1.25.0-SNAPSHOT ............ SUCCESS [ 4.358 s]
  [INFO] sernet.gs.service.tests 1.26.0-SNAPSHOT ............ SUCCESS [ 3.761 s]
  [INFO] sernet.gs.ui.rcp.main.tests 1.25.0-SNAPSHOT ........ SUCCESS [ 13.346 s]
  [INFO] sernet.gs.ui.rcp.main.tests 1.26.0-SNAPSHOT ........ SUCCESS [ 9.020 s]
  [INFO] ------------------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 14:11 min
  [INFO] Total time: 09:38 min
  [INFO] Finished at: 2022-11-25T12:51:01+01:00
  [INFO] Finished at: 2023-05-29T09:56:59+02:00
  [INFO] ------------------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------


== Update ==
==== Client ====
Kompilate Programme 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
 
====Update-Site ====
Die P2-Update-Site befindet sich in
sernet.verinice.update_site/target/repository
 
==== 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
; Backup
  # apt install pigz
  # apt install pigz
  $ cd /usr/src/
  $ cd /usr/src/
  $ tar -cf verinice_$(date +%Y-%m-%d-%H%M%S).tar.gz -I pigz verinice/
  /usr/src/ $ '''tar -cf verinice_$(date +%Y-%m-%d-%H%M%S).tar.gz -I pigz verinice/'''


; Umgebung bereinigen
; Umgebung bereinigen
  $ cd verinice
  $ '''rm -r ~/.m2/'''
$ rm -r ~/.m2/


; Quellen aktualisieren
; Quellen aktualisieren
$ '''cd /usr/src/verinice'''
/usr/src/verinice $ '''git pull'''
; Kompilation
siehe [[#Kompilieren]]
==== Versionierung ====
Aktualisieren der Version des Projekts
===== 1. Version setzen =====
./mvnw -Dtycho.mode=maven -DnewVersion=x.y.z.qualifier tycho-versions:set-version
; Hinweis
:* ''qualifier'' ist wörtlich gemeint
:* wird von tycho/osgi als ''magische Zeichenkette'' behandelt


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


; Kompilation
schreibt ''1.19.0-SNAPSHOT'' in die Update pom.xml Dateien und ''1.19.0.qualifier'' in die aktualisierten feature.xml Dateien.
  ./mvnw -Dtycho.disableP2Mirrors=true clean verify
 
; Die endgültige Produktversion erhält einen Zeitstempel, z.B.*1.19.0.201908011226''
* Siehe [Plugin-Dokumentation](https://www.eclipse.org/tycho/sitedocs/tycho-packaging-plugin/plugin-info.html) für Details.
 
===== 2. Version und Codename =====
; Aktualisieren Sie Version und Codename
im About-Text in ''Branding > About Dialog'' von
  ''sernet.verinice.releng.client.product/sernet.verinice.releng.client.product''
 
===== 3. About-Text =====
; Synchronisieren Sie den About-Text
wieder mit dem Plugin (''Übersicht > Testen > Synchronisieren'') in
''sernet.verinice.releng.client.product/sernet.verinice.releng.client.product''.
 
===== 4. Versionsmakro in Handbüchern =====
; Aktualisieren Sie das Versionsmakro in den Handbüchern
 
===== 5. Splash-Screen =====
; Aktualisieren Sie die Version in den Splash-Screens von verinice
sernet.gs.ui.rcp.main/etc/splashscreen/splash.xcf


== Sicherheit ==
== Anhang ==
== Dokumentation ==
=== Siehe auch ===
* [[Verinice/Installation]]
* [[Verinice/Architektur]]
----
{{Special:PrefixIndex/{{BASEPAGENAME}}}}
==== Dokumentation ====
==== Links ====
===== Projekt =====
# https://github.com/SerNet/verinice
===== Weblinks =====


[[Kategorie:Verinice]]
[[Kategorie:Verinice/Verwaltung]]
</noinclude>

Aktuelle Version vom 2. September 2023, 09:44 Uhr

Vernice kompilieren - Client, Update-Site und Server für Linux, Mac und Windows

Umgebung

Betriebssystem

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"

Java

$ java -version
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+10-Debian-1)
OpenJDK 64-Bit Server VM (build 17.0.6+10-Debian-1, mixed mode, sharing)
$ echo $JAVA_HOME
/usr/lib/jvm/default-java/
$ ls /usr/lib/jvm/
default-java -> java-1.17.0-openjdk-amd64
java-1.11.0-openjdk-amd64 -> java-11-openjdk-amd64
java-1.17.0-openjdk-amd64 -> java-17-openjdk-amd64
java-1.18.0-openjdk-amd64 -> java-18-openjdk-amd64
java-1.19.0-openjdk-amd64 -> java-19-openjdk-amd64
java-11-openjdk-amd64
java-1.20.0-openjdk-amd64 -> java-20-openjdk-amd64
java-17-openjdk-amd64
java-1.8.0-openjdk-amd64 -> java-8-openjdk-amd64
java-18-openjdk-amd64
java-19-openjdk-amd64
java-20-openjdk-amd64
java-8-openjdk-amd64
openjdk-11
openjdk-17
openjdk-18
openjdk-19
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

Java integrieren

JRE integrieren
sernet.verinice.extraresources.feature/linux/jre
sernet.verinice.extraresources.feature/windows/jre
sernet.verinice.extraresources.feature/macos/jre
Erforderlich für macOS-Builds
  • Es ist best practice, eine JRE in einen Application.app Ordner zu packen.
  • Um eine gültige verinice.app zu erhalten, muss daher eine geeignete macOS JRE in sernet.thirdparty.feature/macos vorhanden sein.
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

Umgebung bereinigen
$ rm -r ~/.m2/
Verinice-Client, Client-Update-Site und Server kompilieren
$ cd /usr/src/verinice
/usr/src/verinice $ ./mvnw -Dtycho.disableP2Mirrors=true -DskipTests 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] ------------------------------------------------------------------------

Client

Kompilate Programme 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

Update-Site

Die P2-Update-Site befindet sich in

sernet.verinice.update_site/target/repository

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

siehe #Kompilieren

Versionierung

Aktualisieren der Version des Projekts

1. Version setzen
./mvnw -Dtycho.mode=maven -DnewVersion=x.y.z.qualifier tycho-versions:set-version
Hinweis
  • qualifier ist wörtlich gemeint
  • wird von tycho/osgi als magische Zeichenkette behandelt
./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.

Die endgültige Produktversion erhält einen Zeitstempel, z.B.*1.19.0.201908011226
2. Version und Codename
Aktualisieren Sie Version und Codename

im About-Text in Branding > About Dialog von

sernet.verinice.releng.client.product/sernet.verinice.releng.client.product
3. About-Text
Synchronisieren Sie den About-Text

wieder mit dem Plugin (Übersicht > Testen > Synchronisieren) in

sernet.verinice.releng.client.product/sernet.verinice.releng.client.product.
4. Versionsmakro in Handbüchern
Aktualisieren Sie das Versionsmakro in den Handbüchern
5. Splash-Screen
Aktualisieren Sie die Version in den Splash-Screens von verinice
sernet.gs.ui.rcp.main/etc/splashscreen/splash.xcf

Anhang

Siehe auch


Dokumentation

Links

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