Personal tools

Difference between revisions of "Building Rivendell from source"

From Rivendell Wiki

Jump to: navigation, search
Line 46: Line 46:
 
Now we're ready to build the code! In the right-hand Terminal window, run the command:
 
Now we're ready to build the code! In the right-hand Terminal window, run the command:
  
  ./autogen.sh
+
  ./configure_build.sh
 
+
Next, find the block of text in the 'INSTALL' file that begins with 'Configure script invocation:'. Copy the remainder of that line and paste that into the other Terminal window. It should look something like this:
+
 
+
./configure --prefix=/usr --libdir=/usr/lib --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-enabled --enable-rdxport-debug MUSICBRAINZ_LIBS="-ldiscid -lmusicbrainz5cc -lcoverartcc"
+
  
 
The script will now analyze your system and print a summary of what it found. It should look something like this:
 
The script will now analyze your system and print a summary of what it found. It should look something like this:
  
 +
configure: "|---------------------------------------------------------|"
 +
configure: "|        *** RIVENDELL CONFIGURATION SUMMARY ***        |"
 
  configure: "|---------------------------------------------------------|"
 
  configure: "|---------------------------------------------------------|"
 
  configure: "| Platform Information:                                  |"
 
  configure: "| Platform Information:                                  |"

Revision as of 20:08, 23 June 2023

Overview

In most cases, the preferred way to run Rivendell is to use the pre-built packages provided by Paravel Systems. However, it can sometimes be desireable to build Rivendell directly from the source code provided by the upstream developers; such as when one wishes to test a new feature or bugfix that has been committed on GitHub but not yet released in the pre-built packages. This page provides instructions on how to go about this.

Caveats

Builds directly from source should always be considered "experimental". They should never be attempted on systems that are in production "on the air" use! Thus, it is highly recommended that a seperate, dedicated computer be used for such builds.

The following instructions assume the distro environment to be Ubuntu 22.04 "Jammy Jellyfish". The fundamental princples apply to other distros as well though; with any differences mostly being confined to using yum or dnf instead of Ubuntu's apt package management tool.

Preparing the Installation Environment

The first step in preparing a system to do a source build of Rivendell is to install the basic Rivendell environment by running one of the Rivendell appliance installers.

Once installation is complete, the next step is to remove the pre-built Rivendell packages. Start by opening a Terminal window and then entering:

sudo apt purge rivendell rivendell-opsguide

Next, download the Rivendell source code from GitHub (an operation known as 'cloning'):

git clone https://github.com/ElvishArtisan/rivendell

and then move into the newly-created 'rivendell/' directory:

cd rivendell

next, open a second 'Terminal' window and likewise move into the 'rivendell/' directory.

Arrange the two windows side-by-side. In the left-hand one, view the 'INSTALL' file using the 'less' file viewer:

less INSTALL

then scroll down to find the 'DISTRO-SPECIFIC NOTES' section, find the subsection for your Linux distro, then the block of text within that subsection that starts with 'Environmental variables:'. In the right-hand terminal window, add the 'DOCBOOK_STYLESHEETS' variable to your environment by copy-pasting the text found in the 'Environmental variables:' subsection. For example:

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

Next, find the block of text that begins with 'Required build packages:'. Copy all of the remaining text in the block, then enter 'sudo apt install ' into the right-hand window, followed by the text copied above.

The result should look something like this:

sudo apt install 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 qttools5-dev-tools debhelper openssh-server autoconf-archive gnupg pbuilder ubuntu-dev-tools apt-file hpklinux-dev libmagick++-dev

The system will present a list of packages to be installed, followed by confirmation prompt. Enter 'Y'. The system will begin downloading and installing packages. Allow it to finish.

Building the Code

Now we're ready to build the code! In the right-hand Terminal window, run the command:

./configure_build.sh

The script will now analyze your system and print a summary of what it found. It should look something like this:

configure: "|---------------------------------------------------------|"
configure: "|         *** RIVENDELL CONFIGURATION SUMMARY ***         |"
configure: "|---------------------------------------------------------|"
configure: "| Platform Information:                                   |"
configure: "|                         Distribution Name ... Linux Mint|"
configure: "|                       Distribution Family ... Debian    |"
configure: "|                          Update I18N Data ... No        |"
configure: "|                                                         |"
configure: "| Configured Audio Drivers:                               |"
configure: "|  Advanced Linux Sound Architecture (ALSA) ... Yes       |"
configure: "|                          AudioScience HPI ... Yes       |"
configure: "|                 JACK Audio Connection Kit ... Yes       |"
configure: "|                                                         |"
configure: "| Audio Codecs:                                           |"
configure: "|            FLAC Encoding/Decoding Support ... Yes       |"
configure: "|                     MPEG Decoding Support ... Yes       |"
configure: "|             MPEG Layer 2 Encoding Support ... Yes       |"
configure: "|             MPEG Layer 3 Encoding Support ... Yes       |"
configure: "|       OggVorbis Encoding/Decoding Support ... Yes       |"
configure: "|                      M4A Decoding Support ... No        |"
configure: "|---------------------------------------------------------|"
configure: 
configure: 
configure: Now enter 'make' to build the software.

Now, simply enter the single word 'make' and hit <enter> to start the build. Depending upon your hardware, this step could take awhile to complete.

Installing the Code

To install and run the newly built code, run the following:

sudo make install

and then check for and apply any needed database updates by doing:

sudo rddbmgr --modify

And finally, start the Rivendell service by doing:

sudo systemctl restart apache2
sudo systemctl restart rivendell

And that's it.