X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plewww.spec;h=39e421e96b440ab99111c62c10fb8bb672d1578b;hb=HEAD;hp=b98ba01dd7dc88cc0d14786fce8f11ca9ee1c066;hpb=53fb202a0ed1ef1df5c9c292de2fc410b782e5bb;p=plewww.git diff --git a/plewww.spec b/plewww.spec index b98ba01..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,9 +111,14 @@ 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 -touch /var/log/myslice.log -chown apache:apache /var/log/myslice.log +mkdir -p /var/log/myslice +touch /var/log/myslice/myslice.log +chown apache:apache /var/log/myslice/myslice.log %clean rm -rf $RPM_BUILD_ROOT @@ -124,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