From 33008a73df3dc52afb1619a2243993c12f0029f8 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Mon, 4 Sep 2006 16:59:27 +0000 Subject: [PATCH] miscellaneous installation-related fixes; part of #1775 --- livesupport/INSTALL | 13 +++---- livesupport/bin/postInstallStation.sh | 36 ++++++++++++++----- .../bin/setupDevelopmentEnvironmentAndLog.sh | 6 ++-- livesupport/bin/updateStudioConfig.sh | 8 ++--- livesupport/bin/user_setup.sh | 4 +-- livesupport/doc/install.html | 22 +++++++++--- .../etc/apache/90_php_livesupport.conf | 2 +- livesupport/etc/configure.ac | 12 +++---- .../files/postinstall-config-file.patch | 2 +- .../PlaylistExecutor/AudioPlayerFactory.h | 2 +- .../playlistExecutor/src/GstreamerPlayer.h | 2 +- .../src/modules/storageClient/etc/Makefile.in | 6 ++-- .../products/gLiveSupport/etc/configure.ac | 8 ++--- .../gLiveSupport/etc/gLiveSupport.xml | 4 +-- .../src/products/scheduler/etc/configure.ac | 4 +-- .../scheduler/etc/scheduler-local.xml | 2 +- .../src/products/scheduler/etc/scheduler.xml | 2 +- 17 files changed, 85 insertions(+), 50 deletions(-) diff --git a/livesupport/INSTALL b/livesupport/INSTALL index 4f71019f5..55be370b3 100644 --- a/livesupport/INSTALL +++ b/livesupport/INSTALL @@ -32,18 +32,19 @@ For detailed installation instructions, see the doc/install.html document. For the impatient, do the following (make sure to run at least the bin/install.sh script as root): -wget http://livesupport.campware.org/look/campware/download/livesupport-.tar.bz2 -wget http://livesupport.campware.org/look/campware/download/livesupport-libraries-.tar.bz2 +wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-.tar.bz2 +wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-libraries-.tar.bz2 tar xfj livesupport-.tar.bz2 tar xfj livesupport-libraries-.tar.bz2 cd livesupport- -./configure -make setup && make compile -./bin/install.sh -d /usr/local/livesupport -g apache -r /var/www +./configure --prefix=/usr/local/livesupport --with-apache-group=apache --with-www-docroot=/var/www +make +make install +./bin/postInstallStation.sh -d /usr/local/livesupport -g apache -r /var/www /usr/local/livesupport/bin/scheduler.sh start -Then try the URL http://localhost/livesupport/htmlUI/var/html/ , +Then try the URL http://localhost/livesupport/htmlUI/var/html/ and log in using username: root, password: q. diff --git a/livesupport/bin/postInstallStation.sh b/livesupport/bin/postInstallStation.sh index d6d8bf107..aff480d5a 100755 --- a/livesupport/bin/postInstallStation.sh +++ b/livesupport/bin/postInstallStation.sh @@ -65,7 +65,9 @@ printUsage() echo " -w, --dbpassword The database user password."; echo " [default: livesupport]"; echo " -p, --postgresql-dir The postgresql data directory, containing" - echo " pg_hba.conf [default: /etc/postgresql]" + echo " pg_hba.conf [default: /etc/postgresql]" + echo " -i, --postgresql-init-script The name of the postgresql init + echo " script in /etc/init.d [default: postgresql]" echo " -h, --help Print this message and exit."; echo ""; } @@ -76,7 +78,7 @@ printUsage() #------------------------------------------------------------------------------- CMD=${0##*/} -opts=$(getopt -o d:D:g:hp:r:s:u:w: -l apache-group:,database:,dbserver:,dbuser:,dbpassword:,directory:,help,postgresql-dir:,www-root: -n $CMD -- "$@") || exit 1 +opts=$(getopt -o d:D:g:hi:p:r:s:u:w: -l apache-group:,database:,dbserver:,dbuser:,dbpassword:,directory:,help,postgresql-dir:,postgresql-init-script:,www-root: -n $CMD -- "$@") || exit 1 eval set -- "$opts" while true; do case "$1" in @@ -92,6 +94,9 @@ while true; do -h|--help) printUsage; exit 0;; + -i|--postgresql-init-script) + postgresql_init_script=$2; + shift; shift;; -p|--postgresql-dir) postgresql_dir=$2; shift; shift;; @@ -147,6 +152,10 @@ if [ "x$postgresql_dir" == "x" ]; then postgresql_dir=/etc/postgresql; fi +if [ "x$postgresql_init_script" == "x" ]; then + postgresql_init_script=postgresql; +fi + if [ "x$www_root" == "x" ]; then www_root=/var/www; fi @@ -252,8 +261,8 @@ chown root:$postgres_user $pg_config_dir/$pg_config_file # don't use restart for the init script, as it might return prematurely # and in the later call to psql we wouldn't be able to connect -/etc/init.d/postgresql stop -/etc/init.d/postgresql start +/etc/init.d/${postgresql_init_script} stop +/etc/init.d/${postgresql_init_script} start #------------------------------------------------------------------------------- @@ -299,13 +308,22 @@ fi #------------------------------------------------------------------------------- echo "Creating ODBC data source and driver..."; -odbcinst_template=$install_etc/odbcinst_template +if [ -f /usr/lib/libodbcpsql.so ]; then + odbcinst_template=$install_etc/odbcinst_template +elif [ -f /usr/lib/odbc/psqlodbc.so ]; then + odbcinst_template=$install_etc/odbcinst_debian_template +else + echo "###############################" + echo "Postgresql driver for unixODBC not found;" + echo "please register the PostgreSQL ODBC driver manually." + echo "###############################" +fi odbc_template=$install_etc/odbc_template odbc_template_tmp=/tmp/odbc_template.$$ # check for an existing PostgreSQL ODBC driver, and only install if necessary odbcinst_res=`odbcinst -q -d | grep "\[PostgreSQL\]"` -if [ "x$odbcinst_res" == "x" ]; then +if [ "x$odbcinst_template" != "x" && "x$odbcinst_res" == "x" ]; then echo "Registering ODBC PostgreSQL driver..."; odbcinst -i -d -v -f $odbcinst_template || exit 1; fi @@ -361,13 +379,15 @@ echo "Configuring apache ..." CONFFILE=90_php_livesupport.conf AP_DDIR_FOUND=no for APACHE_DDIR in \ - /etc/apache/conf.d /etc/apache2/conf/modules.d /etc/httpd/conf.d + /etc/apache/conf.d /etc/apache2/conf.d /etc/apache2/conf/modules.d \ + /etc/httpd/conf.d do echo -n "$APACHE_DDIR " if [ -d $APACHE_DDIR ]; then echo "Y" AP_DDIR_FOUND=yes cp $basedir/etc/apache/$CONFFILE $APACHE_DDIR + break else echo "N" fi @@ -424,7 +444,7 @@ cd - # create scheduler-related database tables cd $installdir -$bindir/scheduler.sh install || exit 1; +./bin/scheduler.sh install || exit 1; cd - diff --git a/livesupport/bin/setupDevelopmentEnvironmentAndLog.sh b/livesupport/bin/setupDevelopmentEnvironmentAndLog.sh index fc56c5c2c..4b3965325 100755 --- a/livesupport/bin/setupDevelopmentEnvironmentAndLog.sh +++ b/livesupport/bin/setupDevelopmentEnvironmentAndLog.sh @@ -130,9 +130,9 @@ ls -l $tmpdir/make_modprod_distclean_setup.log >> $tmpdir/make_modprod_distclean # --with-database-user=LiveSupport =test # --with-database-password=LiveSupport =test # -# --with-station-audio-out=default =plughw:0 -# --with-studio-audio-out=default =plughw:0 -# --with-studio-audio-cue=default =plughw:0 +# --with-station-audio-out=default =default +# --with-studio-audio-out=default =default +# --with-studio-audio-cue=default =default rm -rf $tmpdir/configure echo "Now Configure ... "; diff --git a/livesupport/bin/updateStudioConfig.sh b/livesupport/bin/updateStudioConfig.sh index 925f3d29d..df6cf0579 100755 --- a/livesupport/bin/updateStudioConfig.sh +++ b/livesupport/bin/updateStudioConfig.sh @@ -60,9 +60,9 @@ printUsage() echo " -P, --scheduler-port The port of the scheduler daemon to install" echo " [default: 3344]"; echo " -o, --output-device The audio device of live-mode broadcast"; - echo " [default: plughw:0,0]"; + echo " [default: default]"; echo " -c, --cue-device The audio device of preview listening"; - echo " [default: plughw:0,0]"; + echo " [default: default]"; echo " -h, --help Print this message and exit."; echo ""; } @@ -127,11 +127,11 @@ if [ "x$scheduler_port" == "x" ]; then fi if [ "x$output_alsa_device" == "x" ]; then - output_alsa_device="plughw:0,0"; + output_alsa_device="default"; fi if [ "x$cue_alsa_device" == "x" ]; then - cue_alsa_device="plughw:0,0"; + cue_alsa_device="default"; fi echo "Making post-install steps for GLiveSupport."; diff --git a/livesupport/bin/user_setup.sh b/livesupport/bin/user_setup.sh index cf8e5a8db..61cad27a8 100755 --- a/livesupport/bin/user_setup.sh +++ b/livesupport/bin/user_setup.sh @@ -111,8 +111,8 @@ dbpassword=test homedir=$HOME configdir=$homedir/.livesupport htmldir=$homedir/public_html -output_device=plughw:0,0 -cue_device=plughw:0,0 +output_device=default +cue_device=default echo "Configuring LiveSupport development environment for user $user."; diff --git a/livesupport/doc/install.html b/livesupport/doc/install.html index 22ec12f6b..75f277bfe 100644 --- a/livesupport/doc/install.html +++ b/livesupport/doc/install.html @@ -33,11 +33,25 @@ steps:

For the impatient

Those who think they know everything, the quick steps to install -LiveSupport are the following. (To run make, you need write permissions in the prefix directory; to run make install, you need to be root.) -
-
wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-<version>.tar.bz2
wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-libraries-<version>.tar.bz2
tar xfj livesupport-<version>.tar.bz2
tar xfj livesupport-libraries-<version>.tar.bz2
cd livesupport-<version>
./configure
--prefix=/usr/local/livesupport --with-apache-group=apache --with-www-docroot=/var/www
make
make install
/usr/local/livesupport/bin/scheduler.sh start
+LiveSupport are the following. (To run make, you need write +permissions in the prefix directory; to run +make install and postInstallStation.sh, +you need to be root.) -Then try the URL http://localhost/livesupport/ , +

+wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-<version>.tar.bz2
+wget http://switch.dl.sourceforge.net/sourceforge/livesupport/livesupport-libraries-<version>.tar.bz2
+tar xfj livesupport-<version>.tar.bz2
+tar xfj livesupport-libraries-<version>.tar.bz2
+cd livesupport-<version>
+./configure --prefix=/usr/local/livesupport --with-apache-group=apache --with-www-docroot=/var/www
+make
+make install
+./bin/postInstallStation.sh -d /usr/local/livesupport -g apache -r /var/www
+/usr/local/livesupport/bin/scheduler.sh start
+
+ +Then try the URL http://localhost/livesupport/ and log in using username: root, password: q.

Everyone else, please read the lines below carefully.
diff --git a/livesupport/etc/apache/90_php_livesupport.conf b/livesupport/etc/apache/90_php_livesupport.conf index b8e44f9d0..eeb358852 100644 --- a/livesupport/etc/apache/90_php_livesupport.conf +++ b/livesupport/etc/apache/90_php_livesupport.conf @@ -1,2 +1,2 @@ - php_value upload_max_filesize 32M +php_value post_max_size 36M diff --git a/livesupport/etc/configure.ac b/livesupport/etc/configure.ac index 52a7058fe..aa0d000cf 100644 --- a/livesupport/etc/configure.ac +++ b/livesupport/etc/configure.ac @@ -228,8 +228,8 @@ AC_SUBST(STATION_AUDIO_OUT) AC_ARG_WITH([station-audio-out], AC_HELP_STRING([--with-station-audio-out], [use the specified audio output device for the station, - either ALSA or OSS (plughw:0)]), - [STATION_AUDIO_OUT=${withval}], [STATION_AUDIO_OUT=plughw:0]) + either ALSA or OSS (default)]), + [STATION_AUDIO_OUT=${withval}], [STATION_AUDIO_OUT=default]) AC_MSG_RESULT([using audio output device for the station: ${STAITON_AUDIO_OUT}]) @@ -242,8 +242,8 @@ AC_SUBST(STUDIO_AUDIO_OUT) AC_ARG_WITH([studio-audio-out], AC_HELP_STRING([--with-studio-audio-out], [use the specified audio output device for the studio, - either ALSA or OSS (plughw:0)]), - [STUDIO_AUDIO_OUT=${withval}], [STUDIO_AUDIO_OUT=plughw:0]) + either ALSA or OSS (default)]), + [STUDIO_AUDIO_OUT=${withval}], [STUDIO_AUDIO_OUT=default]) AC_MSG_RESULT([using audio output device for studio: ${STUDIO_AUDIO_OUT}]) @@ -256,8 +256,8 @@ AC_SUBST(STUDIO_AUDIO_CUE) AC_ARG_WITH([studio-audio-cue], AC_HELP_STRING([--with-studio-audio-cue], [use the specified audio cue device for the studio, - either ALSA or OSS (plughw:0)]), - [STUDIO_AUDIO_CUE=${withval}], [STUDIO_AUDIO_CUE=plughw:0]) + either ALSA or OSS (default)]), + [STUDIO_AUDIO_CUE=${withval}], [STUDIO_AUDIO_CUE=default]) AC_MSG_RESULT([using audio cue device for studio: ${STUDIO_AUDIO_CUE}]) diff --git a/livesupport/etc/portage/media-radio/livesupport/files/postinstall-config-file.patch b/livesupport/etc/portage/media-radio/livesupport/files/postinstall-config-file.patch index c6ba54803..8948e3a96 100644 --- a/livesupport/etc/portage/media-radio/livesupport/files/postinstall-config-file.patch +++ b/livesupport/etc/portage/media-radio/livesupport/files/postinstall-config-file.patch @@ -24,7 +24,7 @@ +php_url_prefix=livesupport +alib_xml_rpc_prefix=xmlrpc/xrLocStor.php -+audio_out=plughw:0 ++audio_out=default +scheduler_port=3344 + diff --git a/livesupport/src/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerFactory.h b/livesupport/src/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerFactory.h index 73680cf6d..7be01afd9 100644 --- a/livesupport/src/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerFactory.h +++ b/livesupport/src/modules/playlistExecutor/include/LiveSupport/PlaylistExecutor/AudioPlayerFactory.h @@ -73,7 +73,7 @@ using namespace LiveSupport::Core; * *

  *  <audioPlayer>
-        
+        
  *  </audioPlayer>
  *  
* diff --git a/livesupport/src/modules/playlistExecutor/src/GstreamerPlayer.h b/livesupport/src/modules/playlistExecutor/src/GstreamerPlayer.h index 309fbe33a..6dfb21bfa 100644 --- a/livesupport/src/modules/playlistExecutor/src/GstreamerPlayer.h +++ b/livesupport/src/modules/playlistExecutor/src/GstreamerPlayer.h @@ -72,7 +72,7 @@ using namespace LiveSupport::Core; * This class can be configured with the following XML element. * *

- *  
+ *  
  *  
* * where the optional audioDevice argument specifies the audio device diff --git a/livesupport/src/modules/storageClient/etc/Makefile.in b/livesupport/src/modules/storageClient/etc/Makefile.in index 137353707..9f905173f 100644 --- a/livesupport/src/modules/storageClient/etc/Makefile.in +++ b/livesupport/src/modules/storageClient/etc/Makefile.in @@ -173,9 +173,9 @@ check: all ${TEST_RUNNER} storage_server_init ${TEST_RUNNER} -o ${TEST_RESULTS} -s ${TEST_XSLT} install: all - ${MKDIR} ${USR_INCLUDE_DIR}/LiveSupport/Storage - ${CP} ${INCLUDE_DIR}/LiveSupport/Storage/*.h \ - ${USR_INCLUDE_DIR}/LiveSupport/Storage + ${MKDIR} ${USR_INCLUDE_DIR}/LiveSupport/StorageClient + ${CP} ${INCLUDE_DIR}/LiveSupport/StorageClient/*.h \ + ${USR_INCLUDE_DIR}/LiveSupport/StorageClient ${CP} ${STORAGE_CLIENT_LIB_FILE} ${USR_LIB_DIR} diff --git a/livesupport/src/products/gLiveSupport/etc/configure.ac b/livesupport/src/products/gLiveSupport/etc/configure.ac index 0ef8536c7..fcb395304 100644 --- a/livesupport/src/products/gLiveSupport/etc/configure.ac +++ b/livesupport/src/products/gLiveSupport/etc/configure.ac @@ -213,8 +213,8 @@ AC_SUBST(AUDIO_OUT) AC_ARG_WITH([audio-out], AC_HELP_STRING([--with-audio-out], [use the specified audio output device, either ALSA or OSS - (plughw:0)]), - [AUDIO_OUT=${withval}], [AUDIO_OUT=plughw:0]) + (default)]), + [AUDIO_OUT=${withval}], [AUDIO_OUT=default]) AC_MSG_RESULT([using audio output device: ${AUDIO_OUT}]) @@ -227,8 +227,8 @@ AC_SUBST(AUDIO_CUE) AC_ARG_WITH([audio-cue], AC_HELP_STRING([--with-audio-cue], [use the specified audio cue device, either ALSA or OSS - (plughw:0)]), - [AUDIO_CUE=${withval}], [AUDIO_CUE=plughw:0]) + (default)]), + [AUDIO_CUE=${withval}], [AUDIO_CUE=default]) AC_MSG_RESULT([using audio cue device: ${AUDIO_CUE}]) diff --git a/livesupport/src/products/gLiveSupport/etc/gLiveSupport.xml b/livesupport/src/products/gLiveSupport/etc/gLiveSupport.xml index b1d5c4236..aa2df8d8c 100644 --- a/livesupport/src/products/gLiveSupport/etc/gLiveSupport.xml +++ b/livesupport/src/products/gLiveSupport/etc/gLiveSupport.xml @@ -157,13 +157,13 @@ - + - + diff --git a/livesupport/src/products/scheduler/etc/configure.ac b/livesupport/src/products/scheduler/etc/configure.ac index 4f5dd85ba..9cf4fb200 100644 --- a/livesupport/src/products/scheduler/etc/configure.ac +++ b/livesupport/src/products/scheduler/etc/configure.ac @@ -259,8 +259,8 @@ AC_SUBST(AUDIO_OUT) AC_ARG_WITH([audio-out], AC_HELP_STRING([--with-audio-out], [use the specified audio output device, either ALSA or OSS - (plughw:0)]), - [AUDIO_OUT=${withval}], [AUDIO_OUT=plughw:0]) + (default)]), + [AUDIO_OUT=${withval}], [AUDIO_OUT=default]) AC_MSG_RESULT([using audio output device: ${AUDIO_OUT}]) diff --git a/livesupport/src/products/scheduler/etc/scheduler-local.xml b/livesupport/src/products/scheduler/etc/scheduler-local.xml index ce6c27e5a..cb5051b3b 100644 --- a/livesupport/src/products/scheduler/etc/scheduler-local.xml +++ b/livesupport/src/products/scheduler/etc/scheduler-local.xml @@ -134,7 +134,7 @@ - + - +