From 75c369a3fed5e94b0391b11611c46af7a4a039ca Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Fri, 17 Jul 2026 22:12:34 -0400 Subject: [PATCH] fix(recording): give RAP services a valid HOME so Bundler stops warning (#16374) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `bigbluebutton` system user is created with home `/home/bigbluebutton` (build/deb-helper.sh `addUser` -> `useradd -d` without `--create-home`), but that directory is never created on disk. The record-and-playback services run as this user and load `bundler/setup`, so Bundler finds HOME missing and logs "`/home/bigbluebutton` is not a directory", falling back to a temp dir. It is cosmetic (recordings keep working) but shows up red in the journal / `bbb-record --watch`. Point HOME at a real, package-owned directory (`/var/lib/bigbluebutton`) in the three RAP systemd units, and create + chown that directory in the bbb-record-core postinst so it exists and is writable by the user. This follows the maintainer's suggested direction from the issue (redirect HOME rather than materialize a `/home` dir for a daemon account), but ships inside the package so it also survives upgrades — unlike the manual systemd override, which gets wiped on the next install. Co-Authored-By: Claude Opus 4.8 (1M context) --- build/packages-template/bbb-record-core/after-install.sh | 8 ++++++++ .../core/systemd/bbb-rap-caption-inbox.service | 3 +++ .../core/systemd/bbb-rap-resque-worker.service | 3 +++ record-and-playback/core/systemd/bbb-rap-starter.service | 3 +++ 4 files changed, 17 insertions(+) diff --git a/build/packages-template/bbb-record-core/after-install.sh b/build/packages-template/bbb-record-core/after-install.sh index 34fb9bbd5984..777533a8dec9 100755 --- a/build/packages-template/bbb-record-core/after-install.sh +++ b/build/packages-template/bbb-record-core/after-install.sh @@ -28,6 +28,14 @@ case "$1" in # Run recording link fixup/upgrade script # Don't abort on failure; users can manually run it later, too if id $BBB_USER > /dev/null 2>&1 ; then + # The bigbluebutton user's passwd home (/home/bigbluebutton) is never + # created, so services running as this user get HOME pointing at a + # missing directory and Bundler warns "`/home/bigbluebutton` is not a + # directory". The RAP units set HOME to this directory instead; make sure + # it exists and is writable by the user. (#16374) + mkdir -p /var/lib/bigbluebutton + chown $BBB_USER:$BBB_USER /var/lib/bigbluebutton + mkdir -p /var/bigbluebutton/recording/status chown $BBB_USER:$BBB_USER /var/bigbluebutton/recording/status diff --git a/record-and-playback/core/systemd/bbb-rap-caption-inbox.service b/record-and-playback/core/systemd/bbb-rap-caption-inbox.service index d4c30819e49e..2806b1de2251 100644 --- a/record-and-playback/core/systemd/bbb-rap-caption-inbox.service +++ b/record-and-playback/core/systemd/bbb-rap-caption-inbox.service @@ -6,6 +6,9 @@ PartOf=bigbluebutton.target Type=simple ExecStart=/usr/local/bigbluebutton/core/scripts/rap-caption-inbox.rb WorkingDirectory=/usr/local/bigbluebutton/core +# The bigbluebutton user's passwd home (/home/bigbluebutton) does not exist; +# point HOME at a real, user-owned directory so Bundler does not warn. (#16374) +Environment=HOME=/var/lib/bigbluebutton User=bigbluebutton Slice=bbb_record_core.slice Restart=on-failure diff --git a/record-and-playback/core/systemd/bbb-rap-resque-worker.service b/record-and-playback/core/systemd/bbb-rap-resque-worker.service index 919242608429..f622935da60a 100644 --- a/record-and-playback/core/systemd/bbb-rap-resque-worker.service +++ b/record-and-playback/core/systemd/bbb-rap-resque-worker.service @@ -8,6 +8,9 @@ PartOf=bigbluebutton.target Type=simple ExecStart=/usr/bin/bundle exec rake -f Rakefile resque:workers WorkingDirectory=/usr/local/bigbluebutton/core/scripts +# The bigbluebutton user's passwd home (/home/bigbluebutton) does not exist; +# point HOME at a real, user-owned directory so Bundler does not warn. (#16374) +Environment=HOME=/var/lib/bigbluebutton Environment=QUEUE=rap:archive,rap:publish,rap:process,rap:sanity,rap:captions,rap:events Environment=COUNT=1 # Environment=VVERBOSE=1 diff --git a/record-and-playback/core/systemd/bbb-rap-starter.service b/record-and-playback/core/systemd/bbb-rap-starter.service index 889cf98ffebd..f0c4ace10a1f 100644 --- a/record-and-playback/core/systemd/bbb-rap-starter.service +++ b/record-and-playback/core/systemd/bbb-rap-starter.service @@ -8,6 +8,9 @@ PartOf=bigbluebutton.target Type=simple ExecStart=/usr/local/bigbluebutton/core/scripts/rap-starter.rb WorkingDirectory=/usr/local/bigbluebutton/core/scripts +# The bigbluebutton user's passwd home (/home/bigbluebutton) does not exist; +# point HOME at a real, user-owned directory so Bundler does not warn. (#16374) +Environment=HOME=/var/lib/bigbluebutton User=bigbluebutton Slice=bbb_record_core.slice Restart=on-failure