Fix paths after legacy rename

This commit is contained in:
jo 2021-10-06 17:32:14 +02:00
parent ca21225fb9
commit c4c89eae19
23 changed files with 47 additions and 47 deletions

2
.github/RELEASE.md vendored
View File

@ -107,7 +107,7 @@ The UI works best if you don't use it in an opinionated fashion and change just
If you want a secure environment you should work through the preparing the server docs (up until the dragons) and be prepared to fix some of the issues the installer gets wrong manually by hacking the config file after the fact.
If you want to skip the installer GUI completely you can configure LibreTime using airtime_mvc/build/airtime.example.conf as an template. Due to some python/PHP differences you must remove all comments from the example to use it 😞. You'll also have to create some folder structures manually and check if the music dir got properly created directly in the database. Referencing a second `install -fiap` install on a non productive system for reference can help with this type of bootstrap.
If you want to skip the installer GUI completely you can configure LibreTime using legacy/build/airtime.example.conf as an template. Due to some python/PHP differences you must remove all comments from the example to use it 😞. You'll also have to create some folder structures manually and check if the music dir got properly created directly in the database. Referencing a second `install -fiap` install on a non productive system for reference can help with this type of bootstrap.
### Media-Monitor config needs manual removing

View File

@ -28,7 +28,7 @@ echo -n "${suffix}" > ./VERSION
echo " Done"
echo -n "Running composer install..."
pushd airtime_mvc || (echo "could not cd in airtime_mvc!" && exit 1)
pushd legacy || (echo "could not cd in legacy!" && exit 1)
composer install --quiet --no-dev --ignore-platform-reqs
popd || exit
echo " Done"
@ -36,8 +36,8 @@ echo " Done"
# Adding back; may be useful later...
#echo "Minimizing LibreTime Javascript files..."
#cd $dir
#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \;
#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \;
#find $target/legacy/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \;
#find $target/legacy/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \;
#echo "Done"
cd ..
@ -52,7 +52,7 @@ tar -czf "libretime-${suffix}.tar.gz" \
--exclude .travis.yml \
--exclude travis \
--exclude dev_tools \
--exclude airtime_mvc/vendor/phing \
--exclude airtime_mvc/vendor/simplepie/simplepie/tests \
--exclude legacy/vendor/phing \
--exclude legacy/vendor/simplepie/simplepie/tests \
libretime
echo " Done"

View File

@ -89,7 +89,7 @@ jobs:
sudo mkdir -p "$LIBRETIME_LOG_DIR"
sudo chown runner:runner "$LIBRETIME_LOG_DIR"
make test
working-directory: airtime_mvc
working-directory: legacy
# Start lint the code without failing the entire workflow, should be merged
# into 'test' when the entire matrix succeeds.

View File

@ -1,7 +1,7 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^(airtime_mvc.*)$
exclude: ^(legacy.*)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1

View File

@ -115,9 +115,9 @@ API uses Django to interact with the same database.
If you are a developer seeking to add new columns to the database here are the steps.
1. Modify `airtime_mvc/build/schema.xml` with any changes.
1. Modify `legacy/build/schema.xml` with any changes.
2. Run `dev_tools/propel_generate.sh`
3. Update the upgrade.sql under `airtime_mvc/application/controllers/upgrade_sql/VERSION` for example
3. Update the upgrade.sql under `legacy/application/controllers/upgrade_sql/VERSION` for example
`ALTER TABLE imported_podcast ADD COLUMN album_override boolean default 'f' NOT NULL;`
4. Update the models under `api/libretimeapi/models/` to reflect the new
changes.

View File

@ -1,7 +1,7 @@
# LibreTime API
This API provides access to LibreTime's database via a Django application. This
API supersedes the [PHP API](../airtime_mvc/application/controllers/ApiController.php).
API supersedes the [PHP API](../legacy/application/controllers/ApiController.php).
## Deploying

View File

@ -7,7 +7,7 @@ SCRIPT=$(readlink -f "$0")
# Absolute directory this script is in
SCRIPTPATH=$(dirname "$SCRIPT")
cd "$SCRIPTPATH/../airtime_mvc/" || (echo "could not cd in $SCRIPTPATH/../airtime_mvc/" && exit 1)
cd "$SCRIPTPATH/../legacy/" || (echo "could not cd in $SCRIPTPATH/../legacy/" && exit 1)
path=$(pwd)
cd build
sed -i "s|\"project\.home =.*$\"|\"project.home = $path\"|g" build.properties

View File

@ -4,16 +4,16 @@ cd ..
#generate a new .po file
#this will generate a file called messages.po
find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8
find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po
find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8
find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po
#merge the new messages from messages.po into each existing .po file
#this will generate new .po files
find ./airtime_mvc/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \;
find ./airtime_mvc/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \;
find ./legacy/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \;
find ./legacy/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \;
#delete the old .po files
find ./airtime_mvc/locale/ -name "*.po~" -delete
find ./legacy/locale/ -name "*.po~" -delete
#delete the temporary po files we create in the root directory
rm ./*.po

View File

@ -12,7 +12,7 @@ First, you should check if a localization is already under way for your locale o
GNU **gettext** means using a .po file for each language or dialect, a specially formatted plain text file with groups of three or more lines, like this example from LibreTime's Korean localization:
#: airtime_mvc/application/configs/navigation.php:57
#: legacy/application/configs/navigation.php:57
msgid "Media Folders"
msgstr "미디어 폴더"
@ -32,17 +32,17 @@ After forking the LibreTime git repository, make sure you're in the **master** b
devel
* master
Create a new locale directory (e.g. _airtime_mvc/locale/de_CH/LC_MESSAGES/_ for German as spoken in Switzerland):
Create a new locale directory (e.g. _legacy/locale/de_CH/LC_MESSAGES/_ for German as spoken in Switzerland):
mkdir -p airtime_mvc/locale/de_CH/LC_MESSAGES/
mkdir -p legacy/locale/de_CH/LC_MESSAGES/
Copy the template _airtime.po_ file into the directory you just created:
cp airtime_mvc_locale/template/airtime.po airtime_mvc/locale/de_CH/LC_MESSAGES
cp legacy_locale/template/airtime.po legacy/locale/de_CH/LC_MESSAGES
and update the header information in the new copy of the _airtime.po_ file using the **nano** editor:
nano airtime_mvc/locale/de_CH/LC_MESSAGES/airtime.po
nano legacy/locale/de_CH/LC_MESSAGES/airtime.po
For the example of Swiss German, the header of the file should now look like this:

View File

@ -12,7 +12,7 @@ podcast tabs, and a live feed of your station with information on the the curren
## Modifying the LibreTime Radio Page
The background of the mini-site that appears when you visit the server's domain in your web browser can be changed by modifying the page's CSS file, located at _/usr/share/airtime/php/airtime_mvc/public/css/radio-page/radio-page.css_.
The background of the mini-site that appears when you visit the server's domain in your web browser can be changed by modifying the page's CSS file, located at _/usr/share/airtime/php/legacy/public/css/radio-page/radio-page.css_.
```
html {
@ -25,4 +25,4 @@ html {
}
```
Place the new background image in the `/usr/share/airtime/php/airtime_mvc/public/css/radio-page/img/` folder and change the `background:` entry's URL to point to the new image. The new image should be at least 1280 x 720 in pixel size to avoid being blurry.
Place the new background image in the `/usr/share/airtime/php/legacy/public/css/radio-page/img/` folder and change the `background:` entry's URL to point to the new image. The new image should be at least 1280 x 720 in pixel size to avoid being blurry.

View File

@ -88,10 +88,10 @@ On port 80, Apache's _alias_ module is used to set a _Redirect permanent_ for th
ServerAdmin admin@example.com
DocumentRoot /usr/share/airtime/php/airtime_mvc/public
DocumentRoot /usr/share/airtime/php/legacy/public
DirectoryIndex index.php
<Directory /usr/share/airtime/php/airtime_mvc/public>
<Directory /usr/share/airtime/php/legacy/public>
Options -Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
@ -104,12 +104,12 @@ On port 80, Apache's _alias_ module is used to set a _Redirect permanent_ for th
ServerAdmin admin@example.com
DocumentRoot /usr/share/airtime/php/airtime_mvc/public
DocumentRoot /usr/share/airtime/php/legacy/public
Redirect permanent /login https://airtime.example.com/login
SetEnv APPLICATION_ENV "production"
<Directory /usr/share/airtime/php/airtime_mvc/public>
<Directory /usr/share/airtime/php/legacy/public>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny

16
install
View File

@ -757,7 +757,7 @@ if [ "$ignore_dependencies" = "f" ]; then
packages_files=(
"${SCRIPT_DIR}/"
"${SCRIPT_DIR}/airtime_mvc"
"${SCRIPT_DIR}/legacy"
"${SCRIPT_DIR}/api"
"${SCRIPT_DIR}/python_apps/airtime_analyzer"
"${SCRIPT_DIR}/python_apps/pypo"
@ -799,7 +799,7 @@ if [[ ! ${commandFound} -eq 0 ]]; then
fi
make VERSION # Create a VERSION file
make -C airtime_mvc build # Install php dependencies with composer
make -C legacy build # Install php dependencies with composer
if [ -f /etc/airtime/airtime.conf ]; then
# TODO use VERSION or some other way to check for updates and handle
@ -863,19 +863,19 @@ fi
if [ "$in_place" = "t" ]; then
verbose "\n * Setting current Airtime directory as web root..."
web_root=${AIRTIMEROOT}/airtime_mvc/public
web_root=${AIRTIMEROOT}/legacy/public
elif [ -n "$web_root" ]; then
verbose "\n * Creating Apache web root directory..."
cp -R ${AIRTIMEROOT}/airtime_mvc ${web_root}
cp -R ${AIRTIMEROOT}/legacy ${web_root}
cp ${AIRTIMEROOT}/VERSION ${web_root}
web_root=${web_root}/airtime_mvc/public/
web_root=${web_root}/legacy/public/
else
verbose "\n * Creating default Apache web root directory /usr/share/airtime/php..."
web_root="/usr/share/airtime/php"
mkdir -p ${web_root}
cp -R ${AIRTIMEROOT}/airtime_mvc ${web_root}
cp -R ${AIRTIMEROOT}/legacy ${web_root}
cp ${AIRTIMEROOT}/VERSION ${web_root}
web_root=${web_root}/airtime_mvc/public/
web_root=${web_root}/legacy/public/
fi
verbose "...Done"
@ -1014,7 +1014,7 @@ if [ ! -d /var/log/airtime ]; then
loudCmd "mkdir -p /var/log/airtime"
verbose "\n * Copying logrotate files..."
loudCmd "cp ${AIRTIMEROOT}/airtime_mvc/build/airtime-php.logrotate /etc/logrotate.d/airtime-php"
loudCmd "cp ${AIRTIMEROOT}/legacy/build/airtime-php.logrotate /etc/logrotate.d/airtime-php"
loudCmd "cp ${AIRTIMEROOT}/python_apps/pypo/liquidsoap/airtime-liquidsoap.logrotate /etc/logrotate.d/airtime-liquidsoap"
fi

View File

@ -1,6 +1,6 @@
<?php
// This file generated by Propel 1.5.2 convert-conf target
// from XML runtime conf file /home/james/src/airtime/airtime_mvc/build/runtime-conf.xml
// from XML runtime conf file /home/james/src/airtime/legacy/build/runtime-conf.xml
/* The original name of this file is airtime-conf.php but since we need to make custom changes
* to it I've renamed it so that our changes aren't removed everytime we regenerate a database schema.

View File

@ -1,6 +1,6 @@
<?php
// This file generated by Propel 1.7.0 convert-conf target
// from XML runtime conf file /vagrant/airtime_mvc/build/runtime-conf.xml
// from XML runtime conf file /vagrant/legacy/build/runtime-conf.xml
$conf = array (
'datasources' =>
array (

View File

@ -17,7 +17,7 @@ class Config {
"rootDir" => self::$rootDir
);
//In the unit testing environment, LIBRETIME_CONF_DIR will our local airtime.conf in airtime_mvc/application/test/conf:
//In the unit testing environment, LIBRETIME_CONF_DIR will our local airtime.conf in legacy/application/test/conf:
$filename = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : LIBRETIME_CONF_DIR . "/airtime.conf";
$values = parse_ini_file($filename, true);

View File

@ -1,6 +1,6 @@
#Note: project.home is automatically generated by the propel-install script.
#Any manual changes to this value will be overwritten.
project.home = /vagrant/airtime_mvc
project.home = /vagrant/legacy
project.build = ${project.home}/build
#Database driver

View File

@ -10,7 +10,7 @@ function getContent() {
var isPreRelease = getIsPreRelease();
var msg = "";
// See file airtime_mvc/application/views/helpers/VersionNotify.php for more info
// See file legacy/application/views/helpers/VersionNotify.php for more info
if(isUpToDate()) {
msg = $.i18n._("You are running the latest version");
} else {

View File

@ -1,7 +1,7 @@
Before you overwrite jquery.contextMenu.js, note that we have changed a few lines
in this file.
denise@denise-DX4860:~/airtime/airtime_mvc/public/js/contextmenu$ diff -u jquery.contextMenu_orig.js jquery.contextMenu.js
denise@denise-DX4860:~/airtime/legacy/public/js/contextmenu$ diff -u jquery.contextMenu_orig.js jquery.contextMenu.js
--- jquery.contextMenu_orig.js 2012-04-20 10:15:59.943215571 -0400
+++ jquery.contextMenu.js 2012-04-20 10:00:18.911178927 -0400
@@ -306,6 +306,15 @@

View File

@ -4,7 +4,7 @@ in this file.
Running a diff between the original column filter plugin (dataTables.columnFilter_orig.js) and
our modified one (dataTables.columnFilter.js):
denise@denise-DX4860:~/airtime/airtime_mvc/public/js/datatables/plugin$ diff -u dataTables.columnFilter_orig.js dataTables.columnFilter.js
denise@denise-DX4860:~/airtime/legacy/public/js/datatables/plugin$ diff -u dataTables.columnFilter_orig.js dataTables.columnFilter.js
--- dataTables.columnFilter_orig.js 2012-10-17 11:41:05.000000000 -0400
+++ dataTables.columnFilter.js 2012-11-22 12:20:03.997107451 -0500
@@ -103,7 +103,8 @@

View File

@ -3,7 +3,7 @@ in this file.
Running a diff between the original fullcalendar.js and our modified one:
denise@denise-DX4860:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js
denise@denise-DX4860:~/airtime/legacy/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js
--- fullcalendar_orig.js 2013-10-08 16:03:35.442375219 -0400
+++ fullcalendar.js 2013-10-08 16:53:02.586338519 -0400
@@ -227,7 +227,7 @@

View File

@ -3,7 +3,7 @@ in this file.
Running a diff between the original serverbrowser.js and our modified one:
denise@denise-DX4860:~/airtime/airtime_mvc/public/js/serverbrowse$ diff -u serverbrowser_orig.js serverbrowser.js
denise@denise-DX4860:~/airtime/legacy/public/js/serverbrowse$ diff -u serverbrowser_orig.js serverbrowser.js
--- serverbrowser_orig.js 2012-11-28 11:42:43.250237696 -0500
+++ serverbrowser.js 2012-11-28 11:44:57.738242930 -0500
@@ -65,14 +65,14 @@

View File

@ -2,7 +2,7 @@ Before overwriting jquery.tipsy.js, please note we have changed a few lines to
support manual triggering with live tipsy tooltips
denise@denise-DX4860:~/airtime/airtime_mvc/public/js/tipsy$ diff -u jquery.tipsy_orig.js jquery.tipsy.js
denise@denise-DX4860:~/airtime/legacy/public/js/tipsy$ diff -u jquery.tipsy_orig.js jquery.tipsy.js
--- jquery.tipsy_orig.js 2012-12-13 12:03:48.780751104 -0500
+++ jquery.tipsy.js 2012-12-13 12:08:15.564761493 -0500
@@ -173,12 +173,10 @@

View File

@ -1,5 +1,5 @@
<?php
set_include_path(__DIR__.'/../../airtime_mvc/library' . PATH_SEPARATOR . get_include_path());
set_include_path(__DIR__.'/../../legacy/library' . PATH_SEPARATOR . get_include_path());
#require_once('Zend/Loader/Autoloader.php');
class AirtimeInstall