summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcelogeek2021-04-10 12:34:30 +0200
committercelogeek2021-04-10 12:34:30 +0200
commit892b5946d3c61fa3570b8d0833223f0ce58ccc18 (patch)
tree601ff7ca15d862ff9f38bc9393f7ab3efb08c21b
parenta2d92168aafae8c6691e618113bfbc6dbbf734a1 (diff)
downloadaur-892b5946d3c61fa3570b8d0833223f0ce58ccc18.tar.gz
unified config of jitsi-meet on arch
-rw-r--r--.SRCINFO38
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD102
-rw-r--r--config31
-rw-r--r--install11
-rw-r--r--jitsi-videobridge.conf25
-rw-r--r--jitsi-videobridge.service28
-rw-r--r--service38
-rw-r--r--sip-communicator.properties27
-rw-r--r--tmpfiles.conf4
10 files changed, 184 insertions, 134 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b4332e7797b..85fb9f6837a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,35 @@
pkgbase = jitsi-videobridge-git
- pkgdesc = Videobridge for Jitsi Meet
- pkgver = r3249.0c2ac250e
+ pkgdesc = Jitsi Meet Videobridge git build
+ pkgver = 2.1+478+gc6da57bdb
pkgrel = 1
- url = https://github.com/jitsi/jitsi-videobridge
- arch = x86_64
+ url = https://jitsi.org/jitsi-meet/
+ install = install
+ arch = any
license = Apache
+ makedepends = java-environment
makedepends = unzip
makedepends = maven
- depends = jdk8-openjdk
- provides = jitsi-videobridge
- conflicts = jitsi-videobridge
- backup = etc/jitsi/videobridge/jitsi-videobridge.conf
- backup = etc/jitsi/videobridge/sip-communicator.properties
- source = jitsi-videobridge::git+https://github.com/jitsi/jitsi-videobridge.git
- source = jitsi-videobridge.conf
- source = jitsi-videobridge.service
+ depends = java-runtime
+ depends = bash
+ optdepends = prosody
+ options = !strip
+ backup = etc/jitsi-videobridge-git/config
+ backup = etc/jitsi-videobridge-git/log4j2.xml
+ backup = etc/jitsi-videobridge-git/logging.properties
+ backup = etc/jitsi-videobridge-git/sip-communicator.properties
+ backup = etc/jitsi-videobridge-git/jvb.conf
+ source = jitsi-videobridge-git::git+https://github.com/jitsi/jitsi-videobridge
+ source = config
source = sip-communicator.properties
+ source = service
source = sysusers.conf
source = tmpfiles.conf
sha256sums = SKIP
- sha256sums = d2746be91f361557343398b9544233f1482d60c6117db4ecaa7c7851cd347b50
- sha256sums = 0b3a992ae295d1c691313a10731330cc38ae9e03989fe2afc1e12fcfc7dc4539
- sha256sums = 2b7679218752c0435a1496306b447d72aafaf5b671b6eef63e58c83a67638ced
+ sha256sums = e60e7002db2d73da87b0399eb39973a91ea43d99ce6d8c20b75e5ed1090f5a5f
+ sha256sums = cc9fbf77497bce3c9673b2d144928f11cdd0c0823940c2b60c8369a2f086b9b7
+ sha256sums = f9fcbe1e297afb4bad27e2a9dc0fff60d16dd1d232086d793246ee5c2d9fed68
sha256sums = 998cbc64def56ab98080ff7150dd0913a5e10325cd2b038cf3db14baf8cb19fc
- sha256sums = 36548f4980dcdbb27e0738c3fd928005d49a7b5c2c65d7a583ebb445626074dd
+ sha256sums = 54318c8c90b4b519b05f80a3241f0bae3da8a4478f68e47ba268355ff6ddf383
pkgname = jitsi-videobridge-git
diff --git a/.gitignore b/.gitignore
index f02c6d8b3fd..a9a9a120d28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,4 @@
-*
-!.SRCINFO
-!PKGBUILD
-!.gitignore
-!jitsi-videobridge.service
-!jitsi-videobridge.conf
-!sip-communicator.properties
-!sysusers.conf
-!tmpfiles.conf
-!sysctl
+jitsi-videobridge-git/
+src/
+pkg/
+*.pkg.tar.*
diff --git a/PKGBUILD b/PKGBUILD
index d509a5c5447..83ef62aef2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,77 @@
+# Maintainer: Celogeek <arch-aur-f5d67e@celogeek.com>
+
pkgname=jitsi-videobridge-git
-pkgver=r3249.0c2ac250e
+pkgver=2.1+478+gc6da57bdb
pkgrel=1
-pkgdesc="Videobridge for Jitsi Meet"
-arch=("x86_64")
-url="https://github.com/jitsi/jitsi-videobridge"
-license=("Apache")
-depends=("jdk8-openjdk")
-makedepends=("unzip" "maven")
-provides=(jitsi-videobridge)
-conflicts=(jitsi-videobridge)
-backup=("etc/jitsi/videobridge/jitsi-videobridge.conf"
- "etc/jitsi/videobridge/sip-communicator.properties")
-source=("jitsi-videobridge::git+https://github.com/jitsi/jitsi-videobridge.git"
- jitsi-videobridge.conf
- jitsi-videobridge.service
- sip-communicator.properties
- sysusers.conf
- tmpfiles.conf)
-sha256sums=('SKIP'
- 'd2746be91f361557343398b9544233f1482d60c6117db4ecaa7c7851cd347b50'
- '0b3a992ae295d1c691313a10731330cc38ae9e03989fe2afc1e12fcfc7dc4539'
- '2b7679218752c0435a1496306b447d72aafaf5b671b6eef63e58c83a67638ced'
- '998cbc64def56ab98080ff7150dd0913a5e10325cd2b038cf3db14baf8cb19fc'
- '36548f4980dcdbb27e0738c3fd928005d49a7b5c2c65d7a583ebb445626074dd')
+pkgdesc="Jitsi Meet Videobridge git build"
+arch=('any')
+url="https://jitsi.org/jitsi-meet/"
+license=('Apache')
+depends=("java-runtime" "bash")
+optdepends=("prosody")
+makedepends=(
+ "java-environment"
+ "unzip" "maven"
+)
+options=('!strip')
+backup=(
+ "etc/${pkgname}/config"
+ "etc/${pkgname}/log4j2.xml"
+ "etc/${pkgname}/logging.properties"
+ "etc/${pkgname}/sip-communicator.properties"
+ "etc/${pkgname}/jvb.conf"
+)
+source=(
+ "$pkgname::git+https://github.com/jitsi/jitsi-videobridge"
+ "config"
+ "sip-communicator.properties"
+ "service"
+ "sysusers.conf"
+ "tmpfiles.conf"
+)
+install=install
+
pkgver() {
- cd "jitsi-videobridge"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "$pkgname"
+ printf "%s" "$(git describe --exclude stable/jitsi-meet_\* --long | sed 's/^v//;s/-/+/g')"
}
build() {
- cd "jitsi-videobridge"
- mvn package -DskipTests -Dassembly.skipAssembly=false
- unzip -o jvb/target/jitsi-videobridge-2.1-SNAPSHOT-archive.zip
+ cd "$pkgname"
+ mvn clean
+ mvn package -DskipTests -Dassembly.skipAssembly=true install
+ mvn dependency:copy-dependencies -DincludeScope=runtime
}
package() {
- install -d "${pkgdir}/usr/share"
- cp -R "${srcdir}/jitsi-videobridge/jitsi-videobridge-2.1-SNAPSHOT/" "${pkgdir}/usr/share/jitsi-videobridge"
- install -Dm644 jitsi-videobridge.service "$pkgdir/usr/lib/systemd/system/jitsi-videobridge.service"
- install -Dm644 jitsi-videobridge.conf "$pkgdir/etc/jitsi/videobridge/jitsi-videobridge.conf"
- install -Dm644 sip-communicator.properties "${pkgdir}/etc/jitsi/videobridge/sip-communicator.properties"
- install -Dm644 sysusers.conf "${pkgdir}/usr/lib/sysusers.d/jitsi-videobridge.conf"
- install -Dm644 tmpfiles.conf "${pkgdir}/usr/lib/tmpfiles.d/jitsi-videobridge.conf"
+ cd "$srcdir/$pkgname"
+
+ DESTDIR="${pkgdir}/usr/lib/${pkgname}"
+ CONFDIR="${pkgdir}/etc/${pkgname}"
+
+ install -Dm644 -C -t "${DESTDIR}/lib" \
+ jvb/target/dependency/* \
+ jvb/lib/videobridge.rc
+
+ install -Dm644 jvb/target/jitsi-videobridge-*.jar "${DESTDIR}/jitsi-videobridge.jar"
+ install -Dm755 -t "${DESTDIR}" "jvb/resources/jvb.sh"
+
+ install -dm700 "${CONFDIR}"
+ install -Dm600 -t "${CONFDIR}" "jvb/lib/logging.properties" "config/log4j2.xml" "config/callstats-java-sdk.properties"
+ install -Dm600 "jvb/src/main/resources/reference.conf" "${CONFDIR}/jvb.conf"
+ sed -i 's@logs@/var/log/'$pkgname'@' "${CONFDIR}/log4j2.xml"
+
+ install -Dm644 "config/20-jvb-udp-buffers.conf" "${pkgdir}/etc/sysctl.d/${pkgname}.conf"
+
+ cd "$srcdir"
+ install -Dm600 -t "${CONFDIR}" "config" "sip-communicator.properties"
+ install -Dm644 "service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
+ install -Dm644 "sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/$pkgname.conf"
+ install -Dm644 "tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/$pkgname.conf"
}
+sha256sums=('SKIP'
+ 'e60e7002db2d73da87b0399eb39973a91ea43d99ce6d8c20b75e5ed1090f5a5f'
+ 'cc9fbf77497bce3c9673b2d144928f11cdd0c0823940c2b60c8369a2f086b9b7'
+ 'f9fcbe1e297afb4bad27e2a9dc0fff60d16dd1d232086d793246ee5c2d9fed68'
+ '998cbc64def56ab98080ff7150dd0913a5e10325cd2b038cf3db14baf8cb19fc'
+ '54318c8c90b4b519b05f80a3241f0bae3da8a4478f68e47ba268355ff6ddf383')
diff --git a/config b/config
new file mode 100644
index 00000000000..77acd6d6d37
--- /dev/null
+++ b/config
@@ -0,0 +1,31 @@
+# Jitsi Videobridge settings
+
+# sets the XMPP domain (default: none)
+JVB_HOSTNAME=jitsi-meet.example.org
+
+# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)
+JVB_HOST=
+
+# sets the port of the XMPP server (default: 5275)
+JVB_PORT=5347
+
+# sets the shared secret used to authenticate to the XMPP server
+JVB_SECRET=__PASSWORD_FOR_USER_jvb@auth.jitsi-meet.example.org__
+
+# extra options to pass to the JVB daemon
+JVB_OPTS="--apis=,"
+
+
+# adds java system props that are passed to jvb (default are for home and logging config file)
+JAVA_SYS_PROPS="\
+ -Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc\
+ -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jitsi-videobridge-git\
+ -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi-videobridge-git\
+ -Djava.util.logging.config.file=/etc/jitsi-videobridge-git/logging.properties\
+ -Dconfig.file=/etc/jitsi-videobridge-git/jvb.conf\
+ -Djava.util.prefs.userRoot=/var/lib/jitsi-videobridge-git\
+"
+
+# JDK15
+# You can try this if you use JDK15
+# VIDEOBRIDGE_GC_TYPE=G1GC
diff --git a/install b/install
new file mode 100644
index 00000000000..dbbd5ca8f97
--- /dev/null
+++ b/install
@@ -0,0 +1,11 @@
+post_install() {
+ cat << __EOF__
+
+In order to align all jitsi package, we change the config and install path to match Arch paths.
+
+Update the config with your previous one carefully. Do not blindly copy !
+
+The configs are located here:
+ - /etc/jitsi-videobridge-git
+__EOF__
+}
diff --git a/jitsi-videobridge.conf b/jitsi-videobridge.conf
deleted file mode 100644
index 8461807bb2f..00000000000
--- a/jitsi-videobridge.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-# sets the XMPP domain (default: none)
-JVB_HOSTNAME=jitsi.example.com
-
-# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)
-JVB_HOST=localhost
-
-# sets the port of the XMPP server (default: 5275)
-JVB_PORT=5347
-
-# sets the shared secret used to authenticate to the XMPP server
-JVB_SECRET=
-
-# extra options to pass to the JVB daemon
-# --apis defaults to xmpp, which breaks the current jvb2 as of 2020-05-02
-JVB_OPTS="--apis=,"
-
-# adds java system props that are passed to jvb (default are for home and logging config file)
-JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi\
- -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge\
- -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi-videobridge\
- -Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties"
-
-# application config (not ready yet)
-# https://github.com/jitsi/jitsi-videobridge/issues/1229
-#JAVA_SYS_PROPS="-Dconfig.file=/etc/jitsi-videobridge/application.conf -Djava.util.logging.config.file=/etc/jitsi-videobridge/logging.properties"
diff --git a/jitsi-videobridge.service b/jitsi-videobridge.service
deleted file mode 100644
index ae82918c032..00000000000
--- a/jitsi-videobridge.service
+++ /dev/null
@@ -1,28 +0,0 @@
-[Unit]
-Description=Jitsi Videobridge
-Wants=network-online.target
-After=network-online.target
-
-[Service]
-Type=simple
-EnvironmentFile=/etc/jitsi/videobridge/jitsi-videobridge.conf
-User=jvb
-ExecStart=/usr/share/jitsi-videobridge/jvb.sh --host=${JVB_HOST} --domain=${JVB_HOSTNAME} --port=${JVB_PORT} --secret=${JVB_SECRET} ${JVB_OPTS}
-WorkingDirectory=~
-StateDirectory=jitsi-videobridge
-StateDirectoryMode=0750
-LogsDirectory=jitsi-videobridge
-LogsDirectoryMode=0750
-Restart=on-failure
-
-# Hardening
-#NoNewPrivileges=yes
-#PrivateTmp=yes
-#PrivateDevices=yes
-#ProtectHome=yes
-#ProtectKernelTunables=yes
-#ProtectControlGroups=yes
-#ProtectSystem=strict
-
-[Install]
-WantedBy=multi-user.target
diff --git a/service b/service
new file mode 100644
index 00000000000..a8684a3ee04
--- /dev/null
+++ b/service
@@ -0,0 +1,38 @@
+[Unit]
+Description=Jitsi-Meet Videobridge
+After=network-online.target
+
+[Service]
+EnvironmentFile=/etc/jitsi-videobridge-git/config
+User=jvb
+ExecStart=/usr/lib/jitsi-videobridge-git/jvb.sh ${JVB_OPTS}
+WorkingDirectory=/var/lib/jitsi-videobridge-git
+StateDirectory=jitsi-videobridge-git
+StateDirectoryMode=0750
+LogsDirectory=jitsi-videobridge-git
+LogsDirectoryMode=0750
+ConfigurationDirectory=jitsi-videobridge-git
+ConfigurationDirectoryMode=0700
+
+Restart=on-failure
+RestartSec=2
+
+SuccessExitStatus=143
+
+# more threads for this process
+TasksMax=65000
+# allow more open files for this process
+LimitNPROC=65000
+LimitNOFILE=65000
+
+# Hardening
+NoNewPrivileges=yes
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectHome=yes
+ProtectKernelTunables=yes
+ProtectControlGroups=yes
+ProtectSystem=strict
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sip-communicator.properties b/sip-communicator.properties
index cf9c5ead7c0..adbcb969ac1 100644
--- a/sip-communicator.properties
+++ b/sip-communicator.properties
@@ -1,19 +1,10 @@
org.ice4j.ice.harvest.DISABLE_AWS_HARVESTER=true
-#org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
-
-# Enable broadcasting stats/presence in a MUC
-#org.jitsi.videobridge.ENABLE_STATISTICS=true
-#org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
-
-# Uncomment and configure to enable XMPP client
-#org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=localhost
-#org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.jitsi.example.com
-#org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb
-#org.jitsi.videobridge.xmpp.user.shard.PASSWORD=JVB_SECRET
-#org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.jitsi.example.com
-#org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=SOME_RANDOM_UUID
-##org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true
-
-# If you're behind a nat, define local and public IPv4
-#org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=LOCAL_IPV4_GOES_HERE
-#org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=PUBLIC_IPV4_GOES_HERE
+org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
+org.jitsi.videobridge.ENABLE_STATISTICS=true
+org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
+org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=localhost
+org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.jitsi-meet.example.org
+org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb
+org.jitsi.videobridge.xmpp.user.shard.PASSWORD=__PASSWORD_FOR_USER_jvb@auth.jitsi-meet.example.org__
+org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.jitsi-meet.example.org
+org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=__RANDOM_UUID__
diff --git a/tmpfiles.conf b/tmpfiles.conf
index c2af73e295b..3addb38b0ce 100644
--- a/tmpfiles.conf
+++ b/tmpfiles.conf
@@ -1,2 +1,2 @@
-Z /etc/jitsi/videobridge 0640 jvb jitsi
-z /etc/jitsi/videobridge 0750 jvb jitsi
+Z /etc/jitsi-videobridge-git 0600 jvb jitsi
+z /etc/jitsi-videobridge-git 0700 jvb jitsi