X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=inline;f=plewww.spec;h=b98ba01dd7dc88cc0d14786fce8f11ca9ee1c066;hb=HEAD;hp=aa311e253ed3dc3fde6a57cd1f6261a3b7bdb0e9;hpb=087def4e200130285f9cfe7b47106afd8fe5801b;p=plewww.git diff --git a/plewww.spec b/plewww.spec index aa311e2..973bdc3 100644 --- a/plewww.spec +++ b/plewww.spec @@ -1,7 +1,7 @@ # what the myplc rpm requires %define name plewww -%define version 5.2 -%define taglevel 9 +%define version 5.3 +%define taglevel 1 # no need to mention pldistro as this module differs in both distros %define release %{taglevel}%{?date:.%{date}} @@ -16,6 +16,8 @@ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: python +# for patching drupal session code +BuildRequires: ed Vendor: OneLab Packager: OneLab @@ -43,7 +45,7 @@ Summary: Utilities used by the plewww pages Group: Applications/Systems %description -The plewww package is made of the web pages that run on top of the +The plewww package is made of the web pages that run on top of the PLCAPI component to provide the Web Interface to MyPLC users. %description plekit @@ -78,16 +80,20 @@ install -D -m 644 httpd/*.conf $RPM_BUILD_ROOT/etc/httpd/conf.d/ drupal_settings_dir=/var/www/html/sites/default if [ ! -d $drupal_settings_dir ] ; then echo "Could not find directory $drupal_settings_dir" - echo "This suggests that you do not have a planetlab-custom drupal installed" + echo "This suggests you do not have a planetlab-custom drupal installed" exit 1 fi pushd $drupal_settings_dir # tune $db_url if [ ! -f settings.php.drupal ] ; then cp settings.php settings.php.drupal - sed -e 's|^[ \t]*\$db_url.*|require_once("plc_config.php");$db_url="pgsql://" . PLC_DB_USER . ":" . PLC_DB_PASSWORD . "@" . PLC_DB_HOST . ":" . PLC_DB_PORT . "/drupal";|' \ - settings.php.drupal > settings.php fi +# always do this; it's idempotent +# hopefully it will help in various upgrade scenarios where +# drupal was re-installed, and settings.php was left in the original drupal state +# which results in the infamous "cannot connect to mysql database" +sed -e 's|^[ \t]*\$db_url.*|require_once("plc_config.php");$db_url="pgsql://" . PLC_DB_USER . ":" . PLC_DB_PASSWORD . "@" . PLC_DB_HOST . ":" . PLC_DB_PORT . "/drupal";|' \ + settings.php.drupal > settings.php popd # append our own database creation hacks to the drupal database schema pushd /var/www/html/database @@ -105,6 +111,10 @@ for module in user node; do cp -f /var/www/html/drupal-hacks/${module}.module /var/www/html/modules/${module}.module done popd +# hack drupal's session handler for php8 +pushd /var/www/html/includes +bash /var/www/html/drupal-hacks/patch-session-inc.sh +popd # create myslice.log and change its ownership mkdir -p /var/log/myslice touch /var/log/myslice/myslice.log @@ -125,6 +135,14 @@ rm -rf $RPM_BUILD_ROOT /var/www/html/plekit %changelog +* Fri Nov 22 2025 Thierry Parmentelat - plewww-5.3- +- always patch drupal settings, not just once + hopefully makes various upgrade scenarios more robust +- various cosmetic fixes + +* Sat Apr 30 2022 Thierry Parmentelat - plewww-5.3-0 +- for php8 on fedora35 + * Wed May 16 2018 Thierry - plewww-5.2-9 - not too clean patches for r2lab: - * search for a file named /etc/planetlab/php/person-registration.txt