2021-05-31 Fred Gleason <fredg@paravelsystems.com>

* Refactored the distribution detection logic in 'configure.ac'
	to work on the basis of 'distribution type'.
	* Added desktop entries for rdalsaconfig(8) and rddbconfig(8) that use
	sudo(8) for privilege escalation.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-05-31 12:55:23 -04:00
parent 0aeaa50753
commit dca3fd567b
5 changed files with 112 additions and 53 deletions

View File

@ -21734,3 +21734,8 @@
* Added an '--force-system-maintenance' switch to rdservice(8). * Added an '--force-system-maintenance' switch to rdservice(8).
2021-05-31 Fred Gleason <fredg@paravelsystems.com> 2021-05-31 Fred Gleason <fredg@paravelsystems.com>
* Added symlinks to enable CGI processing in 'debian/postinst'. * Added symlinks to enable CGI processing in 'debian/postinst'.
2021-05-31 Fred Gleason <fredg@paravelsystems.com>
* Refactored the distribution detection logic in 'configure.ac'
to work on the basis of 'distribution type'.
* Added desktop entries for rdalsaconfig(8) and rddbconfig(8) that use
sudo(8) for privilege escalation.

View File

@ -144,30 +144,63 @@ fi
# #
AR_GET_DISTRO() AR_GET_DISTRO()
AC_SUBST(DISTRO,$ar_gcc_distro) AC_SUBST(DISTRO,$ar_gcc_distro)
if test $ar_gcc_distro = suse ; then AC_MSG_NOTICE($ar_distro_id)
AC_SUBST(APACHE_PKG,"apache2") DISTRO_NAME="| Distribution Name ... Unknown |"
AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d") case "$ar_distro_id" in
# AC_SUBST(CONSOLEHELPER_RDALSACONFIG,"") debian|ubuntu)
AC_SUBST(USERMODE_PKG,"") AC_MSG_NOTICE([Distro is Debian-ish])
AC_SUBST(MYSQL_PKG,"mysql") DISTRO_FAMILY="| Distribution Family ... Debian |"
AC_SUBST(QT_MYSQL_PKG,"qt-mysql") DISTRO_IS_DEBIANISH=yes
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell") if test $ar_distro_id = "debian" ; then
else DISTRO_NAME="| Distribution Name ... Debian |"
AC_SUBST(APACHE_PKG,"httpd") else
AC_SUBST(APACHE_CONFIG_DIR,"/etc/httpd/conf.d") DISTRO_NAME="| Distribution Name ... Ubuntu |"
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell-$PACKAGE_VERSION") fi
if test $ar_distro_major -ge 7 ; then AC_SUBST(APACHE_PKG,"apache2")
AC_SUBST(USERMODE_PKG,"usermode usermode-gtk") AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d")
AC_SUBST(MYSQL_PKG,"mariadb") AC_SUBST(USERMODE_PKG,"")
AC_SUBST(QT_MYSQL_PKG,"qt5-qtbase-mysql") AC_SUBST(MYSQL_PKG,"mysql-server")
fi AC_SUBST(QT_MYSQL_PKG,"libqt5sql5-mysql")
fi AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell")
if test $ar_distro_id = "debian" ; then AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig-sudo.desktop")
DISTRO_IS_DEBIANISH=yes AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig-sudo.desktop")
fi ;;
if test $ar_distro_id = "ubuntu" ; then
DISTRO_IS_DEBIANISH=yes centos|rhel|fedora)
fi AC_MSG_NOTICE([Distro is RedHat-ish])
DISTRO_FAMILY="| Distribution Family ... RedHat |"
if test $ar_distro_id = "centos" ; then
DISTRO_NAME="| Distribution Name ... CentOS |"
fi
if test $ar_distro_id = "fedora" ; then
DISTRO_NAME="| Distribution Name ... Fedora |"
fi
if test $ar_distro_id = "rhel" ; then
DISTRO_NAME="| Distribution Name ... RHEL |"
fi
AC_SUBST(APACHE_PKG,"httpd")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/httpd/conf.d")
AC_SUBST(USERMODE_PKG,"usermode usermode-gtk")
AC_SUBST(MYSQL_PKG,"mariadb")
AC_SUBST(QT_MYSQL_PKG,"qt5-qtbase-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell-$PACKAGE_VERSION")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig-root.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig-root.desktop")
;;
*)
AC_MSG_NOTICE([Distro is unknown])
DISTRO_FAMILY="| Distribution Family ... Unknown |"
AC_SUBST(APACHE_PKG,"apache2")
AC_SUBST(APACHE_CONFIG_DIR,"/etc/apache2/conf.d")
AC_SUBST(USERMODE_PKG,"")
AC_SUBST(MYSQL_PKG,"mysql")
AC_SUBST(QT_MYSQL_PKG,"qt-mysql")
AC_SUBST(DOC_PATH,"/usr/share/doc/rivendell")
AC_SUBST(RDALSACONFIG_DESKTOP_FILE,"rivendell-rdalsaconfig.desktop")
AC_SUBST(RDDBCONFIG_DESKTOP_FILE,"rivendell-rddbconfig.desktop")
;;
esac
# #
# Check for Expat # Check for Expat
@ -613,58 +646,62 @@ ln -s ../../lib/rdprofile.h utils/rdselect_helper/rdprofile.h
# Configuration Results # Configuration Results
# #
AC_MSG_NOTICE() AC_MSG_NOTICE()
AC_MSG_NOTICE("|-----------------------------------------------------|") AC_MSG_NOTICE("|---------------------------------------------------------|")
AC_MSG_NOTICE("| *** RIVENDELL CONFIGURATION SUMMARY *** |") AC_MSG_NOTICE("| *** RIVENDELL CONFIGURATION SUMMARY *** |")
AC_MSG_NOTICE("|-----------------------------------------------------|") AC_MSG_NOTICE("|---------------------------------------------------------|")
AC_MSG_NOTICE("| Configured Audio Drivers: |") AC_MSG_NOTICE("| Platorm Information: |")
AC_MSG_NOTICE("$DISTRO_NAME")
AC_MSG_NOTICE("$DISTRO_FAMILY")
AC_MSG_NOTICE("| |")
AC_MSG_NOTICE("| Configured Audio Drivers: |")
if test -z $USING_ALSA ; then if test -z $USING_ALSA ; then
AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... No |") AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... No |")
else else
AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... Yes |") AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... Yes |")
fi fi
if test -z $USING_HPI ; then if test -z $USING_HPI ; then
AC_MSG_NOTICE("| AudioScience HPI ... No |") AC_MSG_NOTICE("| AudioScience HPI ... No |")
else else
AC_MSG_NOTICE("| AudioScience HPI ... Yes |") AC_MSG_NOTICE("| AudioScience HPI ... Yes |")
fi fi
if test -z $USING_JACK ; then if test -z $USING_JACK ; then
AC_MSG_NOTICE("| JACK Audio Connection Kit ... No |") AC_MSG_NOTICE("| JACK Audio Connection Kit ... No |")
else else
AC_MSG_NOTICE("| JACK Audio Connection Kit ... Yes |") AC_MSG_NOTICE("| JACK Audio Connection Kit ... Yes |")
fi fi
AC_MSG_NOTICE("| |") AC_MSG_NOTICE("| |")
AC_MSG_NOTICE("| Audio Codecs: |") AC_MSG_NOTICE("| Audio Codecs: |")
if test -z $FLAC_FOUND ; then if test -z $FLAC_FOUND ; then
AC_MSG_NOTICE("| FLAC Encoding/Decoding Support ... No |") AC_MSG_NOTICE("| FLAC Encoding/Decoding Support ... No |")
else else
AC_MSG_NOTICE("| FLAC Encoding/Decoding Support ... Yes |") AC_MSG_NOTICE("| FLAC Encoding/Decoding Support ... Yes |")
fi fi
if test -z $USING_MAD ; then if test -z $USING_MAD ; then
AC_MSG_NOTICE("| MPEG Decoding Support ... No |") AC_MSG_NOTICE("| MPEG Decoding Support ... No |")
else else
AC_MSG_NOTICE("| MPEG Decoding Support ... Yes |") AC_MSG_NOTICE("| MPEG Decoding Support ... Yes |")
fi fi
if test -z $USING_TWOLAME ; then if test -z $USING_TWOLAME ; then
AC_MSG_NOTICE("| MPEG Layer 2 Encoding Support ... No |") AC_MSG_NOTICE("| MPEG Layer 2 Encoding Support ... No |")
else else
AC_MSG_NOTICE("| MPEG Layer 2 Encoding Support ... Yes |") AC_MSG_NOTICE("| MPEG Layer 2 Encoding Support ... Yes |")
fi fi
if test -z $USING_LAME ; then if test -z $USING_LAME ; then
AC_MSG_NOTICE("| MPEG Layer 3 Encoding Support ... No |") AC_MSG_NOTICE("| MPEG Layer 3 Encoding Support ... No |")
else else
AC_MSG_NOTICE("| MPEG Layer 3 Encoding Support ... Yes |") AC_MSG_NOTICE("| MPEG Layer 3 Encoding Support ... Yes |")
fi fi
if test -z $VORBIS_FOUND ; then if test -z $VORBIS_FOUND ; then
AC_MSG_NOTICE("| OggVorbis Encoding/Decoding Support ... No |") AC_MSG_NOTICE("| OggVorbis Encoding/Decoding Support ... No |")
else else
AC_MSG_NOTICE("| OggVorbis Encoding/Decoding Support ... Yes |") AC_MSG_NOTICE("| OggVorbis Encoding/Decoding Support ... Yes |")
fi fi
if test -z $MP4V2_FOUND ; then if test -z $MP4V2_FOUND ; then
AC_MSG_NOTICE("| M4A Decoding Support ... No |") AC_MSG_NOTICE("| M4A Decoding Support ... No |")
else else
AC_MSG_NOTICE("| M4A Decoding Support ... Yes |") AC_MSG_NOTICE("| M4A Decoding Support ... Yes |")
fi fi
AC_MSG_NOTICE("|-----------------------------------------------------|") AC_MSG_NOTICE("|---------------------------------------------------------|")
AC_MSG_NOTICE() AC_MSG_NOTICE()
AC_MSG_NOTICE() AC_MSG_NOTICE()
AC_MSG_NOTICE(Now enter 'make' to build the software.) AC_MSG_NOTICE(Now enter 'make' to build the software.)

View File

@ -2,7 +2,7 @@
## ##
## xdg/automake.am for Rivendell ## xdg/automake.am for Rivendell
## ##
## (C) Copyright 2002-2005 Fred Gleason <fredg@paravelsystems.com> ## (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
## ##
## This program is free software; you can redistribute it and/or modify ## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License version 2 as ## it under the terms of the GNU General Public License version 2 as
@ -48,11 +48,10 @@ install-exec-am:
mkdir -p $(DESTDIR)/etc/security/console.apps mkdir -p $(DESTDIR)/etc/security/console.apps
cp rdalsaconfig-root-consolehelper $(DESTDIR)/etc/security/console.apps/rdalsaconfig-root cp rdalsaconfig-root-consolehelper $(DESTDIR)/etc/security/console.apps/rdalsaconfig-root
cp rddbconfig-root-consolehelper $(DESTDIR)/etc/security/console.apps/rddbconfig-root cp rddbconfig-root-consolehelper $(DESTDIR)/etc/security/console.apps/rddbconfig-root
cp rivendell-rdalsaconfig-root.desktop $(DESTDIR)@prefix@/share/applications/ cp @RDALSACONFIG_DESKTOP_FILE@ $(DESTDIR)@prefix@/share/applications/rivendell-rdalsaconfig.desktop
cp rivendell-rddbconfig-root.desktop $(DESTDIR)@prefix@/share/applications/ cp @RDDBCONFIG_DESKTOP_FILE@ $(DESTDIR)@prefix@/share/applications/rivendell-rddbconfig.desktop
rm -f $(DESTDIR)$(prefix)/bin/rdalsaconfig-root rm -f $(DESTDIR)$(prefix)/bin/rdalsaconfig-root
ln -s /usr/bin/consolehelper $(DESTDIR)$(prefix)/bin/rdalsaconfig-root ln -s /usr/bin/consolehelper $(DESTDIR)$(prefix)/bin/rdalsaconfig-root
cp rivendell-rddbconfig-root.desktop $(DESTDIR)@prefix@/share/applications/
rm -f $(DESTDIR)$(prefix)/bin/rddbconfig-root rm -f $(DESTDIR)$(prefix)/bin/rddbconfig-root
ln -s /usr/bin/consolehelper $(DESTDIR)$(prefix)/bin/rddbconfig-root ln -s /usr/bin/consolehelper $(DESTDIR)$(prefix)/bin/rddbconfig-root

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Terminal=true
Categories=Qt;KDE;Rivendell;
Name=RDAlsaConfig
GenericName=Rivendell ALSA Configuration
Exec=sudo rdalsaconfig --manage-daemons
Icon=rivendell
Type=Application

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Terminal=true
Categories=Qt;KDE;Rivendell;
Name=RDDBConfig
GenericName=Rivendell Database Management
Exec=sudo rddbconfig
Icon=rdadmin
Type=Application