Personal tools

Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source

From Rivendell Wiki

Jump to: navigation, search

For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the Legacy Rivendell 3.6.7 on Ubuntu18 04 instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as Rivendell 4.x is not officially supported on Ubuntu 18.04. The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. CONSIDER THIS YOUR WARNING!

Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the Appliance Installers provided by Paravel for Ubuntu 22.04, RHEL-7 / CentOS 7, or RHEL-8 / Rocky Linux 8. See Installing Rivendell.

NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.

Should I upgrade my current system or reinstall?

This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.

Reinstall with latest OS:

  • Provides the latest OS and future security updates
  • Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command
  • More future proof, less likely that some feature in the future might stop working

Compiling Rivendell 4.x on older Ubuntu 18.04 based system:

  • If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant
  • You have hardware which works on the older OS but doesn't work properly on a newer OS

Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.

Uninstalling Rivendell 3.x

As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous Legacy Rivendell 3.6.7 on Ubuntu18 04 instructions.

Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!

Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.

cd ~/rivendell-3.6.7/
sudo systemctl stop rivendell.service
sudo make uninstall
sudo ldconfig -v

Preparing the Environment and Installing Dependencies

Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.

sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \
autoconf automake libssl-dev libtag1-dev libfaad-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default autofs \
libqt5quickparticles5 libqt5webkit5-dev qtdeclarative5-dev python3-virtualenv

Check that QT5 is your default version. Open a shell

qtchooser -print-env

It should read

QT_SELECT="default"
QTTOOLDIR="/usr/lib/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"

If it does not reference a QT5 folder then reinstall qt5-default and check again

sudo apt install qt5-default

Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.

export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc

Building and Installing the Code

Grab the latest production release. Head over to https://github.com/ElvishArtisan/rivendell and on the right hand side of the page click on Production Release Latest. On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.

tar -zxvf ./Downloads/rivendell-4.3.0.tar.gz
cd ~/rivendell-4.3.0/

Now compile and Install the code

./autogen.sh
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available
make
sudo make install
sudo ldconfig

Set up the rest of the environment

sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/

Set up systemd

sudo systemctl daemon-reload
sudo systemctl enable rivendell.service

Update your database:

sudo rddbmgr --modify

Make sure your Apache configuration is set up

sudo a2enconf rd-bin
sudo a2enmod cgid
sudo systemctl restart apache2

You may want to double check the settings in your /etc/rd.conf file.

At this point you can probably just restart your Rivendell services and it will likely all work, but it isn't a bad idea to reboot your system.

Audio

ALSA will work in the same manner that ALSA has always worked.

For JackAudio, have a look at the Jack article. JackAudio will work in promiscuous mode as described in the [Jack Audio with Promiscuous Mode] section of the 3.x wiki. The environment variables will already be set in both the rivendell.service file and the rivendell-env.sh file, so no need to edit anything.

If you have decided to start up Jack using qjackctl *before* you start the Rivendell services then make sure that the Jack dbus interface is turned off.

If there are initial problems getting Jack to run, it could be temporary files stored in /dev/shm being owned by a user other then the user starting up jackd. I have mainly run into this situation in test scenarios where I have first started Jack and then started the Rivendell services, but there was one time when the temporary files prevented Jack from starting up in any manner. To fix this, first stop your Rivendell services

sudo systemctl stop rivendell.service

Then check to see if Jack is running, if it is then end all Jackd (or jackdbus) processes (kill it with the kill command if you have to)

ps -C jackd
ps -C jackdbus

Delete the temporary jack files in /dev/shm/

sudo rm /dev/shm/jack*

Then restart Jack and / or your Rivendell services. With promiscuous mode set up it really is easier to have Rivendell start Jackd, however some may still decide to start Jack first using qjackctl (or in some other manner) and then start Rivendell services.