Personal tools

Difference between revisions of "Debian10"

From Rivendell Wiki

Jump to: navigation, search
("Field 'STATION' doesn't have a default value QMYSQL" error)
(pypad system user and group)
 
(3 intermediate revisions by the same user not shown)
Line 39: Line 39:
 
Just copy/paste in your ../my_patch file and then run :
 
Just copy/paste in your ../my_patch file and then run :
 
  patch -p1 <../my_patch
 
  patch -p1 <../my_patch
Another solution is to turn off mysql strict mode, as explined [http://wiki.rivendellaudio.org/index.php/Ubuntu18_04#Getting_MySQL_to_work_and_creating_the_Rivendell_user_and_database here]. I've not tested that method.
+
'''Another solution''' is to turn off mysql strict mode, as explined [http://wiki.rivendellaudio.org/index.php/Ubuntu18_04#Getting_MySQL_to_work_and_creating_the_Rivendell_user_and_database here]. Writing these 2 lines in a file called '''/etc/mysql/conf.d/disable_strict_mode.cnf''' will be enough to work with the non-patched code :
 +
[mysqld]
 +
sql_mode=NO_ZERO_DATE
 +
Restarting mysqld/mariadb service will be also be required :
 +
sudo systemctl restart mariadb.service
  
 
== compile rivendell ==
 
== compile rivendell ==
Line 69: Line 73:
 
  > create database Rivendell;
 
  > create database Rivendell;
 
  > grant Select, Insert, Update, Delete, Create, Drop, References, Index, Alter, Create Temporary Tables, Lock Tables on Rivendell.* to rduser@'%' identified by 'letmein';
 
  > grant Select, Insert, Update, Delete, Create, Drop, References, Index, Alter, Create Temporary Tables, Lock Tables on Rivendell.* to rduser@'%' identified by 'letmein';
  > \q
+
  > quit;
  
 
== prepare os ==
 
== prepare os ==
Line 101: Line 105:
  
 
== known problems ==
 
== known problems ==
M4A format will not be imported, as libmp4v2-dev is no more available.
+
 
 +
====PyPad scripts====
 +
Just following all these instructions will not be sufficient for pypad scripts to run.
 +
As the import pypad command fails, you can modify the scripts in /usr/local/lib64/rivendell/pypad/ by adding one line, as this :
 +
import sys
 +
sys.path.append("/usr/local/lib/python3.7/site-packages")
 +
import pypad
 +
 
 +
The pypad user/group may have to be created (if appearing in /etc/rd.conf) :
 +
sudo adduser --uid 151 --system --group
 +
sudo adduser pypad alice_group / sudo adduser alice pypad
 +
 
 +
====M4A format not supported====
 +
M4A format won't be imported, as libmp4v2-dev is no more available in Debian 10.
  
 
===="Field 'STATION' doesn't have a default value QMYSQL" error====
 
===="Field 'STATION' doesn't have a default value QMYSQL" error====

Latest revision as of 16:53, 7 April 2022

Synthetic howto install rd3 on Debian10 (Buster) :

get rivendell sources

wget https://github.com/ElvishArtisan/rivendell/releases/download/v3.2.0/rivendell-3.2.0.tar.gz
tar xf rivendell-3.2.0.tar.gz
cd rivendell-3.2.0

or from git sources, with master branch for example :

sudo apt install git
git clone -b master https://github.com/ElvishArtisan/rivendell.git
cd rivendell
sudo apt install libtool m4 automake pkg-config
./autogen.sh
Bug in utils/rddbmgr/updateschema.cpp

Since 3.1.0, you have to apply this patch :

diff --git a/utils/rddbmgr/updateschema.cpp b/utils/rddbmgr/updateschema.cpp
index 9089bec0..cdd045de 100644
--- a/utils/rddbmgr/updateschema.cpp
+++ b/utils/rddbmgr/updateschema.cpp
@@ -9793,12 +9793,12 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
     }

     sql=QString("create table if not exists NEXUS_STATIONS (")+
-      "STATION varchar(255) not null,"+
-      "CATEGORY varchar(10) not null,"+
+      "STATION varchar(255) not null default '',"+
+      "CATEGORY varchar(10) not null default '',"+
       "AUTO_MERGE enum('N','Y') default 'N',"+
-      "RD_SERVICE varchar(10) not null,"+
-      "RD_GROUP_NAME varchar(10) not null,"+
-      "RD_SCHED_CODE varchar(11) not null)"+
+      "RD_SERVICE varchar(10) not null default '',"+
+      "RD_GROUP_NAME varchar(10) not null default '',"+
+      "RD_SCHED_CODE varchar(11) not null default '')"+
       " charset utf8mb4 collate utf8mb4_general_ci"+
       db_table_create_postfix;
     if(!RDSqlQuery::apply(sql,err_msg)) {

Just copy/paste in your ../my_patch file and then run :

patch -p1 <../my_patch

Another solution is to turn off mysql strict mode, as explined here. Writing these 2 lines in a file called /etc/mysql/conf.d/disable_strict_mode.cnf will be enough to work with the non-patched code :

[mysqld]
sql_mode=NO_ZERO_DATE

Restarting mysqld/mariadb service will be also be required :

sudo systemctl restart mariadb.service

compile rivendell

sudo apt install make gcc g++
sudo apt install libssh-dev libsamplerate0-dev libsndfile1-dev libcdparanoia-dev libid3-3.8.3-dev libcurl4-openssl-dev libpam0g-dev libsoundtouch-dev libasound2-dev libflac++-dev libmad0-dev libtwolame-dev libmp3lame-dev libfaad-dev libqt4-dev libexpat1-dev libtag1-dev
sudo apt install libjack-jackd2-dev
sudo apt install libdiscid-dev libmusicbrainz5-dev libcoverart-dev (since 3.3.0 version)
sudo apt install python3-mysqldb (to get pypad (icecast) running)
export PATH=/sbin:$PATH (since runuser is required)
./configure --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available
sudo apt install docbook-xsl fop xsltproc
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl
make

or if you don't want to compile the docs :

./configure --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook
make

during this time...

prepare web server

sudo apt install apache2
sudo a2enmod cgid
systemctl restart apache2

prepare mysql server

sudo apt install mysql-server (or mariadb-server)
sudo mysql
> create database Rivendell;
> grant Select, Insert, Update, Delete, Create, Drop, References, Index, Alter, Create Temporary Tables, Lock Tables on Rivendell.* to rduser@'%' identified by 'letmein';
> quit;

prepare os

sudo adduser --uid 150 --system --group --home=/var/snd rivendell
sudo adduser alice rivendell
sudo chmod g+w /var/snd

ok, let's continue when the "make" made its job..

install rivendell

sudo make install
sudo ldconfig

install (and edit !) the configuration file

sudo cp conf/rd.conf-sample /etc/rd.conf

apache conf and restart :

sudo a2enconf rd-bin
systemctl reload apache2

database initalization :

sudo rddbmgr --create --generate-audio

or if updating :

sudo rddbmgr --modify

sound config (or edit /etc/asound.conf)

sudo rdalsaconfig

rivendell conf (if needed)

rdadmin

starting rivendell service :

systemctl start rivendell
rdairplay \o/

to run rivendell service at boot :

systemctl enable rivendell

known problems

PyPad scripts

Just following all these instructions will not be sufficient for pypad scripts to run. As the import pypad command fails, you can modify the scripts in /usr/local/lib64/rivendell/pypad/ by adding one line, as this :

import sys
sys.path.append("/usr/local/lib/python3.7/site-packages")
import pypad

The pypad user/group may have to be created (if appearing in /etc/rd.conf) :

sudo adduser --uid 151 --system --group
sudo adduser pypad alice_group / sudo adduser alice pypad

M4A format not supported

M4A format won't be imported, as libmp4v2-dev is no more available in Debian 10.

"Field 'STATION' doesn't have a default value QMYSQL" error

$ sudo rddbmgr --create --generate-audio
DB connection re-established
invalid SQL or failed DB connection[Field 'STATION' doesn't have a default value QMYSQL: Unable to execute query]: insert into NEXUS_STATIONS set RD_SERVICE="Production"
rddbmgr: sql error: Field 'STATION' doesn't have a default value QMYSQL: Unable to execute query query: insert into NEXUS_STATIONS set RD_SERVICE="Production"

Please (re)read "Bug in utils/rddbmgr/updateschema.cpp" described in a precedent section