diff --git a/changelog b/changelog index df3e7ae..f3a1095 100644 --- a/changelog +++ b/changelog @@ -2,27 +2,30 @@ turnkey-tracks-18.1 (1) turnkey; urgency=low * v18.1 rebuild - includes latest Debian & TurnKey packages. - * Update Tracks: v2.7.1. + * Install latest Tracks release: v2.7.1 + - install via git using release tag (v18.0 used 'master'). - * fix DB corruption on reboot - closes #1983. + * Use oldest stable Ruby: v3.1.x (Tracks notes v3.0.x - but that is now + EOL). + + * Rebuild to fix DB corruption on reboot - closes #1983. * Adds 'mariadb_admin' DB user - exclusively for use in the Webmin MariaDB module. Part of #1945. * Configuration console (confconsole) - v2.1.6: - - Bugfix broken DNS-01 Let's Encrypt challenge - closes #1876 & #1895. - Fixed in v2.1.5 - already included in some appliances. - Let's Encrypt/Dehydrated - bugfix cron failure - closes #1962. - General dehydrated-wrapper code cleanup - now passes shellcheck. + [Jeremy Davis ] * Reduce log noise by creating ntpsec log dir - closes #1952. * Apache mod_evasive config improvements: - Bump DOSPageCount from (default) 2 -> 5 - closes #1951. - DOSLogDir - use default log dir & fix permissions - closes #1950. - - Add DOSWhitelist example - commented out. + - Add DOSWhitelist example in conf - commented out. - -- Jeremy Davis Wed, 25 Sep 2024 05:08:41 +0000 + -- Jeremy Davis Tue, 08 Oct 2024 21:07:30 +0000 turnkey-tracks-18.0 (1) turnkey; urgency=low diff --git a/conf.d/downloads b/conf.d/downloads deleted file mode 100755 index 787947f..0000000 --- a/conf.d/downloads +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -ex - -dl() { - [[ "$FAB_HTTP_PROXY" ]] && PROXY="--proxy $FAB_HTTP_PROXY" - cd $2; curl -L -f -O $PROXY $1; cd - -} - -REPO=TracksApp/tracks -VERSION=$(gh_releases ${REPO} | grep -iv "ALPHA\|BETA\|RC" | sort -V | tail -1) -URL="https://github.com/${REPO}/archive/${VERSION}.tar.gz" - -# previously releases we very slow, but things have improved now -#VERSION=master - -SRC="/usr/local/src" -dl https://github.com/TracksApp/tracks/archive/${VERSION}.zip $SRC -mv $SRC/${VERSION}.zip $SRC/tracks-${VERSION}.zip diff --git a/conf.d/main b/conf.d/main index 17b85b0..b7e820f 100755 --- a/conf.d/main +++ b/conf.d/main @@ -1,5 +1,4 @@ #!/bin/bash -ex - SRC=/usr/local/src WEBROOT=/var/www/tracks @@ -9,38 +8,26 @@ ADMIN_PASS=turnkey1 # start mysql service mysql start -# install tracks and configure it -unzip $SRC/tracks-*.zip -d $(dirname $WEBROOT) -rm $SRC/tracks-*.zip +[[ -z "$FAB_HTTP_PROXY" ]] || export http_proxy=$FAB_HTTP_PROXY +[[ -z "$FAB_HTTPS_PROXY" ]] || export https_proxy=$FAB_HTTPS_PROXY +# clone repo +REPO=TracksApp/tracks +VERSION=$(gh_releases $REPO | grep -iv 'ALPHA\|BETA\|RC' | sort -V | tail -1) mv $WEBROOT $WEBROOT.orig -mv $(dirname $WEBROOT)/tracks-* $WEBROOT -cp $WEBROOT.orig/config/database.yml $WEBROOT/config/database.yml -rm -rf $WEBROOT.orig +git clone --branch=$VERSION https://github.com/$REPO $WEBROOT +# config +cp $WEBROOT.orig/config/database.yml $WEBROOT/config/database.yml cp $WEBROOT/config/site.yml.tmpl $WEBROOT/config/site.yml +rm $WEBROOT/.ruby-version # required to install on latest Ruby stable (v3.1) -rm $WEBROOT/.ruby-version - +# install cd $WEBROOT - -[[ -z "$FAB_HTTP_PROXY" ]] || export http_proxy=$FAB_HTTP_PROXY -[[ -z "$FAB_HTTPS_PROXY" ]] || export https_proxy=$FAB_HTTPS_PROXY - -# rails fixes -echo >> Gemfile -echo '# TKL: Fixes for old Rails with new Ruby causing issues' >> Gemfile -echo gem "'psych', '< 4'" >> Gemfile -echo gem "'net-smtp', require: false" >> Gemfile -echo gem "'net-pop', require: false" >> Gemfile - -# fix broken dep - see https://github.com/TracksApp/tracks/blob/ruby31/Gemfile#L32 -sed -i "\|^gem 'therubyracer',|s|'therubyracer'|'mini_racer'|" Gemfile - export RAILS_ENV="production" bundle config set --local path 'vendor/bundle' bundle config set --local without 'postgresql sqlite' -bundle update +bundle install bundle exec rake db:migrate # configure permissions @@ -49,7 +36,11 @@ chown -R www-data:www-data $WEBROOT/{tmp,log,public/uploads} chmod 666 $WEBROOT/log/* # precompile assets -bundle exec rake assets:precompile RAILS_ENV=production +# Setting 'RAILS_GROUPS=assets' works around +# https://github.com/TracksApp/tracks/issues/3065 +# See https://github.com/TracksApp/tracks/issues/3065#issuecomment-2400803381 +# for reason/rationale. +RAILS_GROUPS=assets bundle exec rake assets:precompile # turnkey-credit (passenger substitute x2 bug) cat >>$WEBROOT/app/assets/stylesheets/tracks.css.scss<