summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2022-01-03 19:33:30 +0100
committerhorchi <vdr@jwendel.de>2022-01-03 19:33:30 +0100
commit6f7b14aca9909652de88fb22ed5a696c9f643e06 (patch)
tree82ee4e9374a0427624901a4147c1cdc3168c027f
parent81b060dd9538ff123e607630bb2afa199bdb8ef7 (diff)
downloadvdr-epg-daemon-6f7b14aca9909652de88fb22ed5a696c9f643e06.tar.gz
vdr-epg-daemon-6f7b14aca9909652de88fb22ed5a696c9f643e06.tar.bz2
2022-01-03: version 1.2.0 (horchi)\n - change: Removed dependency to mysql-compat package\n\n1.2.0
-rw-r--r--HISTORY.h8
-rw-r--r--Make.config10
-rw-r--r--Makefile15
-rw-r--r--README42
-rw-r--r--epglv/Makefile5
-rw-r--r--epglv/src/epglv.h2
-rw-r--r--lib/Makefile4
-rw-r--r--lib/db.h2
8 files changed, 48 insertions, 40 deletions
diff --git a/HISTORY.h b/HISTORY.h
index 904f6b7..8efa61c 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -4,8 +4,8 @@
* -----------------------------------
*/
-#define _VERSION "1.1.165"
-#define VERSION_DATE "01.11.2020"
+#define _VERSION "1.2.0"
+#define VERSION_DATE "03.01.2022"
#define DB_API 7
#ifdef GIT_REV
@@ -17,7 +17,9 @@
/*
* ------------------------------------
*
- *
+
+2022-01-03: version 1.2.0 (horchi)
+ - change: Removed dependency to mysql-compat package
2020-11-01: version 1.1.165 (horchi)
- change: Check HTTP Codes 600 nad 500
diff --git a/Make.config b/Make.config
index b2e1794..2034832 100644
--- a/Make.config
+++ b/Make.config
@@ -29,7 +29,13 @@ INIT_AFTER = mysql.service
PYTHON ?= python
# ------------------
-# don't touch below
+# internals
+
+SQLCFG = mariadb-config
+
+ifdef MYSQL
+ SQLCFG = mysql_config
+endif
ifdef USE_CLANG
CC = clang++
@@ -37,6 +43,8 @@ else
CC = g++
endif
+CFLAGS += $(shell $(SQLCFG) --include)
+
doCompile = $(CC) -c $(CFLAGS) $(DEFINES)
doLink = $(CC) $(LFLAGS)
doLib = ar -rs
diff --git a/Makefile b/Makefile
index be6a5df..942515b 100644
--- a/Makefile
+++ b/Makefile
@@ -11,13 +11,12 @@ HTTPTARGET = epghttpd
HISTFILE = "HISTORY.h"
BASELIBS += -lrt -lz -larchive -ldl -lcrypto -luuid
-BASELIBS += $(shell mysql_config --libs_r)
+BASELIBS += $(shell $(SQLCFG) --libs_r)
BASELIBS += $(shell pkg-config --cflags --libs jansson)
HLIB = -L./lib -lhorchi
DLIBS = $(HLIB) $(BASELIBS) -lcurl $(shell pkg-config libxml-2.0 --libs) $(shell pkg-config libxslt --libs) -lexslt
HTTPLIBS = $(HLIB) -lmicrohttpd $(BASELIBS) -lcurl $(shell pkg-config libxml-2.0 --libs) $(shell pkg-config libxslt --libs) -lexslt -ljpeg $(shell pkg-config imlib2 --libs)
-CFLAGS += $(shell mysql_config --include)
VERSION = $(shell grep 'define _VERSION ' $(HISTFILE) | awk '{ print $$3 }' | sed -e 's/[";]//g')
ARCHIVE = $(TARGET)-$(VERSION)
@@ -33,15 +32,15 @@ HLIBDEP = ./lib/libhorchi.a
export DESTDIR
ifdef GIT_REV
- DEFINES += -DGIT_REV='"$(GIT_REV)"'
+ DEFINES += -DGIT_REV='"$(GIT_REV)"'
endif
ifdef SYSD_NOTIFY
- ifdef SYSDLIB_210
- BASELIBS += $(shell pkg-config --libs libsystemd)
- else
- BASELIBS += $(shell pkg-config --libs libsystemd-daemon)
- endif
+ ifdef SYSDLIB_210
+ BASELIBS += $(shell pkg-config --libs libsystemd)
+ else
+ BASELIBS += $(shell pkg-config --libs libsystemd-daemon)
+ endif
endif
# object files
diff --git a/README b/README
index 14fd3bf..7f5a396 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------------
- epgd
-
-- This daemon is used to download EPG data from the internet and manage it in a mysql database.
+- This daemon is used to download EPG data from the internet and manage it in a maria database.
-
- Written by: C++/SQL - Jörg Wendel (vdr at jwendel dot de)
- SQL/Procedures - Christian Kaiser
@@ -23,21 +23,21 @@ Description
EPG Merge
Get the source from git
Requirements
-MySQL Setup
+MariaDb Setup
epgd Installation
epgd Configuration
Starting epgd and init-Scripts
Upgrade from older versions
-MySQL Hints
+MariaDb Hints
Considerations
Description:
------------
-epgd is part of the double team epgd+epg2vdr to effectively retrieve, store and import epg data to vdr. It is designed to handle large amount of data and pictures in a distributed environment with one epg-server and many possible vdr-clients - therefore it relies on mysql.
+epgd is part of the double team epgd+epg2vdr to effectively retrieve, store and import epg data to vdr. It is designed to handle large amount of data and pictures in a distributed environment with one epg-server and many possible vdr-clients - therefore it relies on mariadb.
-Though it is possible to use epgd alone with mysql it only makes sense to use it as backend to the vdr-plugin epg2vdr. That being said you need to install, setup and configure mysql, epgd and epg2vdr in order to get a working environment.
+Though it is possible to use epgd alone with mariadb it only makes sense to use it as backend to the vdr-plugin epg2vdr. That being said you need to install, setup and configure mariadb, epgd and epg2vdr in order to get a working environment.
EPG Merge:
@@ -81,7 +81,7 @@ Requirements:
- libcurl 7.10+
- libxslt 1.1.24+
- libxml2
- - libmysql >= 5.07
+ - libmariadb >= 10.x
- libz
- libssl-dev
- uuid uuid-dev
@@ -94,14 +94,14 @@ Requirements:
- libsystemd-daemon-dev (if you like to use the systemd status interface)
-> debian previous to 'sid' maybe libsystemd-dev?
- Example for Ubuntu (14.10):
+ Example for Ubuntu (21.10):
- libarchive12, libarchive-dev
- libz, libz-dev
- libssl-dev
- libcurl4-nss-dev (oder libcurl3-nss-dev)
- libxslt1.1 libxslt1-dev libxml2 libxml2-dev
- - libmysqlclient-dev libmysqlclient18
+ - libmariadb-dev mariadb-common
- libjpeg62-dev libjpeg62
- uuid uuid-dev
- libjansson4 libjansson-dev
@@ -115,11 +115,11 @@ Requirements:
My-SQL Setup:
-------------
-You need a running mysql database.
-Consult the manual of your linux-flavour how to install and configure mysql.
+You need a running mariadb database.
+Consult the manual of your linux-flavour how to install and configure mariadb.
Remember to put your db-files in a large enough filesystem: with many channels,
many prefetched days and many pictures you will easily need 3 or more Gb of disk space.
-When mysql is up and running you need to prepare the database and
+When mariadb is up and running you need to prepare the database and
access-rights for use with epgd:
- login as root:
@@ -137,8 +137,8 @@ access-rights for use with epgd:
- adjust the bind address in my.cnf:
adjust the line
bind-address = 127.0.0.1
-in youre my.cnf (mostly found here: /etc/mysql/my.cnf) to the address where
-the mysql serve should listen on - Or comment out if it should listen on all interfaces.
+in youre my.cnf (mostly found here: /etc/mysql/...) to the address where
+the mariadb server should listen on - Or comment out if it should listen on all interfaces.
- switch of binary logging:
comment line starting with 'log_bin' in youre my.cnf
@@ -165,7 +165,7 @@ Make sure the server charecter-set is set to latin1, file format is set to BARRA
character-set-server = latin1
innodb_large_prefix = ON
innodb_file_format = BARRACUDA
-Remove all other collations from your mysqld config.
+Remove all other collations from your mariadb config.
We use UTF8 only on client side!
@@ -227,17 +227,17 @@ epgd is configured in /etc/epgd/epgd.conf. But you can overwrite the following o
-p <plugin-dir> load plugins from <plugin-dir>
-l <log-level> set log level
-For production use you should start epgd after net- and mysql services via your init-system. Some start-scripts have been put to ./contrib hopefully serving your needs (or at least giving you an idea of how to proceed).
+For production use you should start epgd after net- and mariadb services via your init-system. Some start-scripts have been put to ./contrib hopefully serving your needs (or at least giving you an idea of how to proceed).
epgd Configuration:
-------------------
DbHost =
- ip/name of mysql server host (default localhost)
+ ip/name of mariadb server host (default localhost)
DbPort =
- port of the mysql server (default 3306)
+ port of the mariadb server (default 3306)
DbName =
name of the database (default epg2vdr)
@@ -344,8 +344,8 @@ HINTS / PITFALLS:
--vfat bzw. --dirnames
-MYSQL HINTS:
------------
+MariaBb HINTS:
+---------------
- If you cannot figure out why you get Access denied, remove all entries from the user table
that have Host values with wildcards contained (entries that match '%' or '_' characters).
A very common error is to insert a new entry with Host='%' and User='some_user',
@@ -359,9 +359,7 @@ MYSQL HINTS:
- *ATTENTION* if you have binary-logging (log_bin) enabled!
- disable it OR add log-bin-trust-function-creators to your configuration:
- > echo "log-bin-trust-function-creators = 1" >> /etc/mysql/my.cnf
- > restart the database
+ disable it OR add log-bin-trust-function-creators to your configuration and restart the database
Considerations:
diff --git a/epglv/Makefile b/epglv/Makefile
index 917fb23..82fa934 100644
--- a/epglv/Makefile
+++ b/epglv/Makefile
@@ -19,13 +19,14 @@ CPP_FLAGS := $(CPP_FLAGS_$(ARCH)) -Wall \
-L/usr/lib/mysql \
-L/usr/local/lib/mysql \
-I/usr/include/mysql \
- $(shell mysql_config --libs) \
+ $(shell $(SQLCFG) --libs) \
+ $(shell $(SQLCFG) --include) \
-DMYSQL_DYNAMIC_PLUGIN \
-DDEBUG_MYSQL=0
CC := gcc
-MYSQL_PLGDIR := $(shell mysql_config --plugindir)
+MYSQL_PLGDIR := $(shell $(SQLCFG) --plugindir)
TARGET = mysqlepglv.so
OBJS = src/epglvbase.o src/epglv.o
diff --git a/epglv/src/epglv.h b/epglv/src/epglv.h
index 66dd4cf..8819fd3 100644
--- a/epglv/src/epglv.h
+++ b/epglv/src/epglv.h
@@ -43,5 +43,5 @@ Copyright (C) 2013 Jörg Wendel
my_bool base_epglv_init(UDF_INIT* init, UDF_ARGS* args, char* message);
void base_epglv_deinit(UDF_INIT* init);
-long long base_epglv(UDF_INIT* init, UDF_ARGS* args, char* is_null,
+long long base_epglv(UDF_INIT* init, UDF_ARGS* args, char* is_null,
char* error, long long* l1, long long* l2);
diff --git a/lib/Makefile b/lib/Makefile
index c17589b..037b21b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -27,7 +27,7 @@ ifdef USECURL
endif
BASELIBS += -lrt -lz -luuid
-BASELIBS += $(shell mysql_config --libs_r)
+BASELIBS += $(shell $(SQLCFG) --libs_r)
ifdef USECURL
BASELIBS += -lcurl
@@ -59,7 +59,7 @@ ifdef DEBUG
CFLAGS += -ggdb -O0
endif
-CFLAGS += $(shell mysql_config --include)
+CFLAGS += $(shell $(SQLCFG) --include)
DEFINES += $(USES)
all: lib $(TEST) $(DEMO)
diff --git a/lib/db.h b/lib/db.h
index e57d48b..f80acdc 100644
--- a/lib/db.h
+++ b/lib/db.h
@@ -16,7 +16,7 @@
#include <stdarg.h>
#include <errno.h>
-#include <mysql/mysql.h>
+#include <mysql.h>
#include <list>