#15 Added 2 missing runtime dependencies
Opened 4 years ago by felfert. Modified 3 years ago
felfert/jitsi-rpm fix-jibri  into  main

@@ -1,28 +0,0 @@ 

- diff -Naur a/lib/logging.properties b/lib/logging.properties

- --- a/lib/logging.properties	2019-08-21 19:10:53.000000000 +0200

- +++ b/lib/logging.properties	2021-02-07 19:47:51.898638399 +0100

- @@ -1,4 +1,5 @@

- -handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler

- +#handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler

- +handlers = java.util.logging.ConsoleHandler, com.agafua.syslog.SyslogHandler

-  

-  java.util.logging.FileHandler.level = FINE

-  java.util.logging.FileHandler.pattern   = /var/log/jitsi/jibri/log.%g.txt

- @@ -25,7 +26,16 @@

-  org.jitsi.jibri.selenium.util.BrowserFileHandler.limit = 10000000

-  

-  java.util.logging.ConsoleHandler.level = FINE

- -java.util.logging.ConsoleHandler.formatter = net.java.sip.communicator.util.ScLogFormatter

- +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

- +

- +com.agafua.syslog.SyslogHandler.transport = udp

- +com.agafua.syslog.SyslogHandler.facility = local0

- +com.agafua.syslog.SyslogHandler.port = 514

- +com.agafua.syslog.SyslogHandler.hostname = localhost

- +com.agafua.syslog.SyslogHandler.formatter = java.util.logging.SimpleFormatter

- +com.agafua.syslog.SyslogHandler.escapeNewlines = false

- +

- +java.util.logging.SimpleFormatter.format = %4$s %2$s %5$s %6$s%

-  

-  org.jitsi.level = FINE

-  

@@ -0,0 +1,33 @@ 

+ diff -Naur a/lib/logging.properties b/lib/logging.properties

+ --- a/lib/logging.properties	2020-10-07 19:49:38.000000000 +0200

+ +++ b/lib/logging.properties	2021-02-19 22:41:27.998882052 +0100

+ @@ -1,25 +1,25 @@

+  handlers = java.util.logging.FileHandler

+  

+  java.util.logging.FileHandler.level = FINE

+ -java.util.logging.FileHandler.pattern   = /var/log/jitsi/jibri/log.%g.txt

+ +java.util.logging.FileHandler.pattern   = /var/log/jibri/log.%g.txt

+  java.util.logging.FileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter

+  java.util.logging.FileHandler.count = 10

+  java.util.logging.FileHandler.limit = 10000000

+  

+  org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.level = FINE

+ -org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.pattern   = /var/log/jitsi/jibri/ffmpeg.%g.txt

+ +org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.pattern   = /var/log/jibri/ffmpeg.%g.txt

+  org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter

+  org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.count = 10

+  org.jitsi.jibri.capture.ffmpeg.util.FfmpegFileHandler.limit = 10000000

+  

+  org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.level = FINE

+ -org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.pattern   = /var/log/jitsi/jibri/pjsua.%g.txt

+ +org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.pattern   = /var/log/jibri/pjsua.%g.txt

+  org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter

+  org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.count = 10

+  org.jitsi.jibri.sipgateway.pjsua.util.PjsuaFileHandler.limit = 10000000

+  

+  org.jitsi.jibri.selenium.util.BrowserFileHandler.level = FINE

+ -org.jitsi.jibri.selenium.util.BrowserFileHandler.pattern   = /var/log/jitsi/jibri/browser.%g.txt

+ +org.jitsi.jibri.selenium.util.BrowserFileHandler.pattern   = /var/log/jibri/browser.%g.txt

+  org.jitsi.jibri.selenium.util.BrowserFileHandler.formatter = net.java.sip.communicator.util.ScLogFormatter

+  org.jitsi.jibri.selenium.util.BrowserFileHandler.count = 10

+  org.jitsi.jibri.selenium.util.BrowserFileHandler.limit = 10000000

@@ -0,0 +1,12 @@ 

+ diff -Naur a/src/main/kotlin/org/jitsi/jibri/selenium/JibriSelenium.kt b/src/main/kotlin/org/jitsi/jibri/selenium/JibriSelenium.kt

+ --- a/src/main/kotlin/org/jitsi/jibri/selenium/JibriSelenium.kt	2020-10-07 19:49:38.000000000 +0200

+ +++ b/src/main/kotlin/org/jitsi/jibri/selenium/JibriSelenium.kt	2021-02-19 11:46:10.830118895 +0100

+ @@ -135,7 +135,7 @@

+       * Set up default chrome driver options (using fake device, etc.)

+        */

+      init {

+ -        System.setProperty("webdriver.chrome.logfile", "/tmp/chromedriver.log")

+ +        System.setProperty("webdriver.chrome.logfile", System.getProperty("webdriver.chrome.logfile", "/tmp/chromedriver.log"))

+          val chromeOptions = ChromeOptions()

+          chromeOptions.addArguments(chromeOpts)

+          chromeOptions.setExperimentalOption("w3c", false)

@@ -0,0 +1,158 @@ 

+ diff -Naur a/pom.xml b/pom.xml

+ --- a/pom.xml	2020-10-07 19:49:38.000000000 +0200

+ +++ b/pom.xml	2021-02-22 16:56:41.464916849 +0100

+ @@ -25,6 +25,33 @@

+          <jicoco.version>1.1-54-g5387346</jicoco.version>

+      </properties>

+  

+ +    <profiles>

+ +        <profile>

+ +            <id>target-jdk8</id>

+ +            <activation>

+ +                <jdk>1.8</jdk>

+ +            </activation>

+ +            <properties>

+ +                <maven.compiler.source>1.8</maven.compiler.source>

+ +                <maven.compiler.target>1.8</maven.compiler.target>

+ +                <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>

+ +                <kcond>jdk8</kcond>

+ +            </properties>

+ +        </profile>

+ +        <profile>

+ +            <id>target-jdk9</id>

+ +            <activation>

+ +                <jdk>[9,)</jdk>

+ +            </activation>

+ +            <properties>

+ +                <maven.compiler.source>9</maven.compiler.source>

+ +                <maven.compiler.target>9</maven.compiler.target>

+ +                <kotlin.compiler.jvmTarget>9</kotlin.compiler.jvmTarget>

+ +                <kcond>jdk9</kcond>

+ +            </properties>

+ +        </profile>

+ +    </profiles>

+ +

+      <dependencies>

+          <dependency>

+              <groupId>${project.groupId}</groupId>

+ @@ -212,6 +239,7 @@

+                          <configuration>

+                              <sourceDirs>

+                                  <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>

+ +                                <sourceDir>${project.basedir}/src/main/kotlin-${kcond}</sourceDir>

+                                  <sourceDir>${project.basedir}/src/main/java</sourceDir>

+                              </sourceDirs>

+                              <args>

+ diff -Naur a/src/main/kotlin/org/jitsi/jibri/util/extensions/Process.kt b/src/main/kotlin/org/jitsi/jibri/util/extensions/Process.kt

+ --- a/src/main/kotlin/org/jitsi/jibri/util/extensions/Process.kt	2020-10-07 19:49:38.000000000 +0200

+ +++ b/src/main/kotlin/org/jitsi/jibri/util/extensions/Process.kt	1970-01-01 01:00:00.000000000 +0100

+ @@ -1,38 +0,0 @@

+ -/*

+ - * Copyright @ 2018 - present 8x8, Inc.

+ - *

+ - * Licensed under the Apache License, Version 2.0 (the "License");

+ - * you may not use this file except in compliance with the License.

+ - * You may obtain a copy of the License at

+ - *

+ - *     http://www.apache.org/licenses/LICENSE-2.0

+ - *

+ - * Unless required by applicable law or agreed to in writing, software

+ - * distributed under the License is distributed on an "AS IS" BASIS,

+ - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ - * See the License for the specific language governing permissions and

+ - * limitations under the License.

+ - */

+ -

+ -package org.jitsi.jibri.util.extensions

+ -

+ -import java.lang.reflect.Field

+ -

+ -/**

+ - * Mimic the "pid" member of Java 9's [Process].

+ - */

+ -val Process.pidValue: Long

+ -    get() {

+ -        var pid: Long = -1

+ -        try {

+ -            if (javaClass.name == "java.lang.UNIXProcess") {

+ -                val field: Field = javaClass.getDeclaredField("pid")

+ -                field.isAccessible = true

+ -                pid = field.getLong(this)

+ -                field.isAccessible = false

+ -            }

+ -        } catch (e: Exception) {

+ -            pid = -1

+ -        }

+ -        return pid

+ -    }

+ diff -Naur a/src/main/kotlin-jdk8/org/jitsi/jibri/util/extensions/Process.kt b/src/main/kotlin-jdk8/org/jitsi/jibri/util/extensions/Process.kt

+ --- a/src/main/kotlin-jdk8/org/jitsi/jibri/util/extensions/Process.kt	1970-01-01 01:00:00.000000000 +0100

+ +++ b/src/main/kotlin-jdk8/org/jitsi/jibri/util/extensions/Process.kt	2020-10-07 19:49:38.000000000 +0200

+ @@ -0,0 +1,38 @@

+ +/*

+ + * Copyright @ 2018 - present 8x8, Inc.

+ + *

+ + * Licensed under the Apache License, Version 2.0 (the "License");

+ + * you may not use this file except in compliance with the License.

+ + * You may obtain a copy of the License at

+ + *

+ + *     http://www.apache.org/licenses/LICENSE-2.0

+ + *

+ + * Unless required by applicable law or agreed to in writing, software

+ + * distributed under the License is distributed on an "AS IS" BASIS,

+ + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ + * See the License for the specific language governing permissions and

+ + * limitations under the License.

+ + */

+ +

+ +package org.jitsi.jibri.util.extensions

+ +

+ +import java.lang.reflect.Field

+ +

+ +/**

+ + * Mimic the "pid" member of Java 9's [Process].

+ + */

+ +val Process.pidValue: Long

+ +    get() {

+ +        var pid: Long = -1

+ +        try {

+ +            if (javaClass.name == "java.lang.UNIXProcess") {

+ +                val field: Field = javaClass.getDeclaredField("pid")

+ +                field.isAccessible = true

+ +                pid = field.getLong(this)

+ +                field.isAccessible = false

+ +            }

+ +        } catch (e: Exception) {

+ +            pid = -1

+ +        }

+ +        return pid

+ +    }

+ diff -Naur a/src/main/kotlin-jdk9/org/jitsi/jibri/util/extensions/Process.kt b/src/main/kotlin-jdk9/org/jitsi/jibri/util/extensions/Process.kt

+ --- a/src/main/kotlin-jdk9/org/jitsi/jibri/util/extensions/Process.kt	1970-01-01 01:00:00.000000000 +0100

+ +++ b/src/main/kotlin-jdk9/org/jitsi/jibri/util/extensions/Process.kt	2021-02-22 16:59:44.783666826 +0100

+ @@ -0,0 +1,25 @@

+ +/*

+ + * Copyright @ 2018 - present 8x8, Inc.

+ + *

+ + * Licensed under the Apache License, Version 2.0 (the "License");

+ + * you may not use this file except in compliance with the License.

+ + * You may obtain a copy of the License at

+ + *

+ + *     http://www.apache.org/licenses/LICENSE-2.0

+ + *

+ + * Unless required by applicable law or agreed to in writing, software

+ + * distributed under the License is distributed on an "AS IS" BASIS,

+ + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ + * See the License for the specific language governing permissions and

+ + * limitations under the License.

+ + */

+ +

+ +package org.jitsi.jibri.util.extensions

+ +

+ +/**

+ + * Mimic the "pid" member of Java 9's [Process].

+ + */

+ +val Process.pidValue: Long

+ +    get() {

+ +        return this.pid()

+ +    }

empty or binary file added
file modified
+1 -1
@@ -82,7 +82,7 @@ 

  Add users to prosody:

  ```

  $ prosodyctl register jibri auth.__jitsiFQDN__ __jibriUserSecret__

- $ prosodyctl register recorder auth.__jitsiFQDN__ __recorderUserSecret__

+ $ prosodyctl register recorder recorder.__jitsiFQDN__ __recorderUserSecret__

  ```

  

  ### Troubleshooting

@@ -1,3 +0,0 @@ 

- #! /bin/sh

- # This script is called after recording has finished.

- # TODO: Implement something useful.

@@ -0,0 +1,4 @@ 

+ #!/bin/bash

+ cp /etc/jibri/asoundrc /run/jibri/.asoundrc

+ mkdir -p /run/jibri/.icewm

+ cp /etc/jibri/icewm.preferences /run/jibri/.icewm/settings

file modified
+1 -2
@@ -8,8 +8,7 @@ 

  Group=jibri

  Environment=DISPLAY=:0

  EnvironmentFile=-/etc/sysconfig/jibri

- ExecStartPre=/usr/bin/cp /etc/jibri/asoundrc /run/jibri/.asoundrc

- ExecStartPre=/usr/bin/cp /etc/jibri/icewm.preferences /run/jibri/.icewm/settings

+ ExecStartPre=/usr/libexec/jibri-icewm-setup

  ExecStart=/usr/bin/icewm-session

  Restart=on-failure

  RestartPreventExitStatus=255

@@ -0,0 +1,1 @@ 

+ { "CommandLineFlagSecurityWarningsEnabled": false }

file added
+45
@@ -0,0 +1,45 @@ 

+ // This config file uses HOCON, the JSON Superset. See https://github.com/lightbend/config/blob/master/HOCON.md

+ // Help on migrating an old style config.json can be found in /usr/share/doc/jibri/config_migration_guide.md

+ // Defaults can be found in /usr/share/doc/jibri/reference.conf

+ //

+ 

+ jibri {

+ 

+     jitsi-fqdn = "__jitsiFQDN__"

+     jibri-secret = "__jibriUserSecret__"

+     recorder-secret = "__recorderUserSecret__"

+ 

+     recording {

+         recordings-directory = "/var/spool/jibri"

+         finalize-script = "/etc/jibri/finalize_recording.sh"

+     }

+     api {

+         xmpp {

+             environments = [

+                 {

+                     name = "prod environment"

+                     xmpp-server-hosts = [ ${jibri.jitsi-fqdn} ]

+                     xmpp-domain = ${jibri.jitsi-fqdn}

+                     control-muc {

+                         domain = internal.auth.${jibri.jitsi-fqdn}

+                         room-name = "JibriBrewery"

+                         nickname = "jibri"

+                     }

+                     control-login {

+                         domain = auth.${jibri.jitsi-fqdn}

+                         username = "jibri"

+                         password = ${jibri.jibri-secret}

+                     }

+                     call-login {

+                         domain = recorder.${jibri.jitsi-fqdn}

+                         username = "recorder"

+                         password = ${jibri.recorder-secret}

+                     }

+                     strip-from-room-domain = "conference."

+                     usage-timeout = "5 minutes"

+                     trust-all-xmpp-certs = true

+                 }

+             ]

+         }

+     }

+ }

file modified
+5 -3
@@ -1,15 +1,16 @@ 

  [Unit]

  Description=Jibri Process

  Requires=jibri-icewm.service jibri-xorg.service

- After=network.target

+ After=network.target jibri-icewm.service jibri-xorg.service

  

  [Service]

  User=jibri

  Group=jibri

+ Environment=DISPLAY=:0

  EnvironmentFile=-/etc/sysconfig/jibri

  ExecStart=/usr/libexec/jibri start

  ExecStop=/usr/libexec/jibri graceful

- ExecReload=/usr/libexec/jibri graceful

+ ExecReload=/usr/libexec/jibri reload

  KillMode=process

  Restart=always

  RestartPreventExitStatus=255
@@ -19,11 +20,12 @@ 

  # Hardening

  NoNewPrivileges=yes

  PrivateTmp=yes

- PrivateDevices=yes

  ProtectHome=yes

  ProtectKernelTunables=yes

  ProtectControlGroups=yes

  ProtectSystem=strict

+ # whitelist writing to rundir, logdir and spool

+ ReadWritePaths=/run/jibri /var/log/jibri /var/spool/jibri 

  

  [Install]

  WantedBy=multi-user.target

file modified
+9 -3
@@ -2,13 +2,19 @@ 

  

  case "$1" in

      start)

-         exec java -Djava.util.logging.config.file=/etc/jibri/logging.properties -jar /usr/share/jibri/jibri.jar --config /etc/jibri/config.json

+         exec java \

+             -Djava.util.logging.config.file=/etc/jibri/logging.properties \

+             -Dconfig.file=/etc/jibri/jibri.conf \

+             ${JIBRI_JAVA_OPTIONS} -jar /usr/share/jibri/jibri.jar --config /etc/jibri/config.json

+         ;;

+     reload)

+         exec curl -sX POST http://127.0.0.1:3333/jibri/api/internal/v1.0/notifyConfigChanged > /dev/null

          ;;

      graceful)

-         exec curl -X POST http://127.0.0.1:3333/jibri/api/internal/v1.0/gracefulShutdown

+         exec curl -sX POST http://127.0.0.1:3333/jibri/api/internal/v1.0/gracefulShutdown > /dev/null

          ;;

      stop)

-         exec curl -X POST http://127.0.0.1:3333/jibri/api/internal/v1.0/shutdown

+         exec curl -sX POST http://127.0.0.1:3333/jibri/api/internal/v1.0/shutdown > /dev/null

          ;;

      *)

          echo "Invalid action specified" >&2

file modified
+42 -13
@@ -1,24 +1,32 @@ 

  %global project jitsi

  %global user %{name}

+ %global commit 99288dc8e6f4b4c74886d31737b05e9e3bfad3c3

+ %global shortcommit 99288dc

+ %global finalize_link %{_sysconfdir}/%{name}/finalize_recording.sh

  

  Name:       jibri

- Version:    8.0

+ Version:    8.0.g%{shortcommit}

  Release:    0.4%{?dist}

  Summary:    Jitsi Broadcasting Infrastructure

  Url:        https://jitsi.org

  License:    ASL 2.0

- Source0:    https://github.com/%{project}/%{name}/archive/v%{version}.tar.gz

+ Source0:    https://github.com/%{project}/%{name}/archive/%{commit}.tar.gz

  Source1:    %{name}.service

  Source2:    %{name}-icewm.service

  Source3:    %{name}-xorg.service

  Source4:    %{name}.sysusers

  Source5:    %{name}.tmpfiles

  Source6:    README.fedora

- Source7:    jibri-modules.conf

- Source8:    jibri.sh

- Source9:    config.json

- Source10:   finalize_recording.sh

- Patch1:     0001-log-to-syslog.patch

+ Source7:    %{name}-modules.conf

+ Source8:    %{name}.sh

+ Source9:    %{name}.conf

+ Source10:   %{name}_finalize_noop.sh

+ Source11:   %{name}.sysconfig

+ Source12:   %{name}.chromepolicy

+ Source13:   %{name}-icewm-setup.sh

+ Patch1:     0001-logconfig.patch

+ Patch2:     0002-allow-overriding-webdriver-log.patch

+ Patch3:     0003-jdk11-compatibility.patch

  

  BuildArch:      noarch

  BuildRequires:  maven
@@ -28,6 +36,7 @@ 

  

  Requires:       xdotool

  Requires:       chromedriver

+ Requires:       chromium

  Requires:       ffmpeg

  Requires:       alsa-utils

  Requires:       icewm
@@ -53,8 +62,9 @@ 

  

  #-- PREP, BUILD & INSTALL -----------------------------------------------------#

  %prep

- %autosetup -p1

- %pom_add_dep rusv:agafua-syslog:0.4:runtime

+ %autosetup -p1 -n %{name}-%{commit}

+ %pom_add_dep javax.activation:activation:1.1.1:runtime

+ %pom_add_dep org.glassfish.jaxb:jaxb-runtime:2.3.2:runtime

  %pom_add_plugin :maven-jar-plugin:2.3 . \

      '<configuration><archive><manifest><addClasspath>true</addClasspath><useUniqueVersions>false</useUniqueVersions><classpathPrefix>lib</classpathPrefix><mainClass>${exec.mainClass}</mainClass></manifest></archive></configuration>'

  
@@ -72,10 +82,18 @@ 

  

  # config

  install -D -m 640 -t %{buildroot}%{_sysconfdir}/%{name}/ lib/logging.properties resources/debian-package/etc/%{project}/%{name}/*

- install -D -m 640 %{SOURCE9} %{buildroot}%{_sysconfdir}/%{name}/config.json

+ 

+ # OLD style config install -D -m 640 %{SOURCE9} %{buildroot}%{_sysconfdir}/%{name}/config.json

+ # NEW style config

+ rm -f %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf

+ install -D -m 640 %{SOURCE9} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf

+ 

+ install -D -m 640 %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/%{name}

  # helper script

- install -D -m 755 -t %{buildroot}%{_sysconfdir}/%{name}/ %{SOURCE10}

+ install -D -m 755 -t %{buildroot}%{_libexecdir}/ %{SOURCE10}

  

+ # logdir

+ install -d -m 0755 %{buildroot}/%{_var}/log/%{name}/

  # rundir

  install -d -m 0755 %{buildroot}%{_rundir}/%{name}/

  install -d -m 0755 %{buildroot}%{_var}/spool/%{name}/
@@ -87,17 +105,21 @@ 

  install -d -m 0755 %{buildroot}%{_rundir}/%{name}/.icewm

  touch %{buildroot}%{_rundir}/%{name}/.icewm/settings

  

+ # chrome policy

+ install -D -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/chromium/policies/managed/01_jibri.json

  # system config

  install -D -m 644 -t %{buildroot}%{_unitdir}/ %{SOURCE1} %{SOURCE2} %{SOURCE3}

  install -D -m 644 %{SOURCE4} %{buildroot}%{_sysusersdir}/%{name}.conf

  install -D -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf

  install -D -m 644 -t %{buildroot}%{_sysconfdir}/modules-load.d/ %{SOURCE7}

  install -D -m 755 %{SOURCE8} %{buildroot}%{_libexecdir}/%{name}

+ install -D -m 755 %{SOURCE13} %{buildroot}%{_libexecdir}/%{name}-icewm-setup

  

  # documentation

  install -D -m 644 -t %{buildroot}/%{_pkgdocdir}/ *.md

  install -D -m 644 -t %{buildroot}/%{_pkgdocdir}/ doc/*.md

  install -D -m 644 %{SOURCE6} %{buildroot}/%{_pkgdocdir}/README-fedora.md

+ install -D -m 644 -t %{buildroot}/%{_pkgdocdir}/ src/main/resources/reference.conf

  

  #-- SCRIPTLETS -----------------------------------------------------------------#

  %pre
@@ -105,6 +127,7 @@ 

  

  %post

  /usr/sbin/modprobe snd_aloop

+ test -h %{finalize_link} || ln -sn %{_libexecdir}/%{name}_finalize_noop.sh %{finalize_link}

  %systemd_post %{name}.service %{name}-icewm.service %{name}-xorg.service

  

  %preun
@@ -122,22 +145,28 @@ 

  # package files/dirs

  %{_datadir}/%{name}/

  %dir %attr(0750,root,%{user}) %{_sysconfdir}/%{name}/

- %config(noreplace) %attr(0640,root,%{user}) %{_sysconfdir}/%{name}/*.{preferences,properties,conf,json}

+ %config(noreplace) %attr(0640,root,%{user}) %{_sysconfdir}/sysconfig/%{name}

+ %config(noreplace) %attr(0640,root,%{user}) %{_sysconfdir}/%{name}/*.{preferences,properties,conf*,json}

  %config(noreplace) %attr(0640,root,%{user}) %{_sysconfdir}/%{name}/asoundrc

  %config(noreplace) %attr(0750,root,%{user}) %{_sysconfdir}/%{name}/*.sh

  %dir %attr(0755,%{user},%{user}) %{_rundir}/%{name}/

  %dir %attr(0755,%{user},%{user}) %{_rundir}/%{name}/.icewm

  %dir %attr(0755,%{user},%{user}) %{_var}/spool/%{name}/

+ %dir %attr(0755,%{user},%{user}) %{_var}/log/%{name}/

  %ghost %attr(0644,%{user},%{user}) %{_rundir}/%{name}/%{name}.pid

  %ghost %attr(0644,%{user},%{user}) %{_rundir}/%{name}/.asoundrc

  %ghost %attr(0644,%{user},%{user}) %{_rundir}/%{name}/.icewm/settings

+ %dir %{_sysconfdir}/chromium/

+ %dir %{_sysconfdir}/chromium/policies

+ %dir %{_sysconfdir}/chromium/policies/managed

+ %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/chromium/policies/managed/*.json

  

  # system config

  %{_unitdir}/*.service

  %{_tmpfilesdir}/%{name}.conf

  %{_sysusersdir}/%{name}.conf

  %{_sysconfdir}/modules-load.d/%{name}-*.conf

- %{_libexecdir}/%{name}

+ %{_libexecdir}/%{name}*

  

  #-- CHANGELOG -----------------------------------------------------------------#

  %changelog

@@ -0,0 +1,1 @@ 

+ JIBRI_JAVA_OPTIONS="-Dwebdriver.chrome.logfile=/var/log/jibri/chromedriver.log -Dwebdriver.chrome.verboseLogging=true"

file modified
+2
@@ -1,1 +1,3 @@ 

  u jibri - "Runs Jitsi Broadcasting Infrastructure" /run/jibri /sbin/nologin

+ m jibri audio

+ m jibri video

file modified
+2
@@ -1,5 +1,7 @@ 

  # create rundir

  d /run/jibri 0755 jibri jibri -

+ # create logdir

+ d /var/log/jibri 0755 jibri jibri -

  # ensure correct permissions for all files in config dir

  Z /etc/jibri 0640 root jibri

  z /etc/jibri 0750 root jibri

@@ -0,0 +1,11 @@ 

+ #! /bin/sh

+ # This script is called after recording has finished.

+ # It is called with a single argument: The directory of

+ # the recording. In that directory, two files can be expected:

+ #  - A mp4 video file named roomname_YYYY-MM-DD-hh-mm-ss.mp4

+ #  - A file metadata.json, containing additional info.

+ #

+ # TODO: Implement something useful.

+ (

+     echo "Recording is located at $1"

+ ) >> /var/log/jibri/finalize.log 2>&1

file removed

@@ -24,6 +24,7 @@ 

  BuildRequires:  npm

  BuildRequires:  git

  BuildRequires:  systemd-rpm-macros

+ BuildRequires:  make

  Requires:       jre-headless

  

  %description

This PR fixes two NoClassDefFoundError due to missing javax-related jars.

General state of jibri packaging

Right now, it starts without errors (with this PR), connects to XMPP and attempts to start recording. However when attempting to startup chromium via selenium, it fails. Googling for the execption finds several similar reports from debian-based installations.
ATM, I'm not shure if this is actually a bug in packaging or rather an upstream bug. Will setup a debian- based jibri test instance to get more confident about the actual reason for the failure....

Regardless, I will submit another PR which adds the necessary jibri-related parts in the configs for jits-meet, jicofo and prosody.

Cheers and have a nice weekend
-Fritz

14 new commits added

  • Append to log in finalize script
  • Migrate to new HOCON config
  • Improve finalize script
  • Fix wrapper script
  • Fix device access for jibri service
  • Fix creation of icewm settings
  • Add supplementary groups for jibri user
  • Add chrome managed policy
  • Allow writing in log directory
  • Fix logging configuration
  • Silence curl in wrapper script
  • Switch to git 99288dc
  • Declare ordered service dependency
  • Do not hardcode chromedriver logging path
4 years ago

Ok, finally, after many hours of debugging and fixing, we got a jibri package that actually works. :smile:

Most noteably, I switched from tagged "stable" v8 to untagged 99288dc, because the latest stable debian package is built from that commit. After that, things got much better. Sadly,
logging cannot redirected to syslog anymore, because they hardcoded FileHandler everywhere. I might create a PR for that in upstream at a later time.
Also noteable: They switched to a new config file format (HOCON) which is much better. The old config.json format is still supported, but since the new format supports substitutions similar to those in pom files, it is much more convenient.

Tested on a separate fresh fc32 with both recording and youtube streaming. Works even behind NAT.

The necessary config changes for jitsi-meet, jitsi-prosody and jicofo will follow in a separate PR.

1 new commit added

  • Fix icewm setup
4 years ago

1 new commit added

  • Don't fail icewm-setup if /run/jibri/.icewm already exists
4 years ago

Well. not quite there yet. 😞
On fc32 everything works well, but on fc33 there is a different ffmpeg version which apparently does not behave properly when killed with SIGINT. So when terminating a recording or YT-stream jibri detects a failure. Among other side-effects, this prevents creation of the metadata file in the recording directory and does not call the finalize-script. I might have a workaround involving an additional wrapper script for ffmpeg, but no definitive result yet.
Still, it would be nice if you could make a release of everything so that all the recent changes get published in the repo.

1 new commit added

  • jibri requires jre-8-headless
4 years ago

18 new commits added

  • jibri requires jre-1.8.0-headless
  • Don't fail icewm-setup if /run/jibri/.icewm already exists
  • Fix icewm setup
  • Append to log in finalize script
  • Migrate to new HOCON config
  • Improve finalize script
  • Fix wrapper script
  • Fix device access for jibri service
  • Fix creation of icewm settings
  • Add supplementary groups for jibri user
  • Add chrome managed policy
  • Allow writing in log directory
  • Fix logging configuration
  • Silence curl in wrapper script
  • Switch to git 99288dc
  • Declare ordered service dependency
  • Do not hardcode chromedriver logging path
  • Added 2 missing runtime dependencies
4 years ago

Ok, that problem with killing ffmpeg on fc33 was not ffmpeg but the java runtime version.
jibri specifically requires a java-8 jre, because they have some rather stupid code to get the PID of a subprocess. It does not work with anything newer.

That said, with the last commit, it now works on fc33 as well.

1 new commit added

  • jdk11-compatibility
4 years ago

1 new commit added

  • Update spec for F34
3 years ago

1 new commit added

  • rename dummy finalize script in jibri
3 years ago