Bug 497098 - gallery2-2.3-5.fc11 breaks due to php-Smarty changes
gallery2-2.3-5.fc11 breaks due to php-Smarty changes
Status: CLOSED DUPLICATE of bug 484240
Product: Fedora
Classification: Fedora
Component: gallery2 (Show other bugs)
rawhide
All Linux
low Severity high
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
:
: 498019 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-22 07:13 EDT by Daniel McNamara
Modified: 2009-05-22 02:24 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-27 10:32:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel McNamara 2009-04-22 07:13:37 EDT
Description of problem:

Original versions of gallery2 in worked as expected. Upgrade to latest version (gallery2-2.3-5.fc11) caused gallery2 to cease operation (you can't run the upgrade either). To fully test a fresh install was done. Configuration screens will work but upon completion gallery2 fails in the same manner


Version-Release number of selected component (if applicable):

gallery2-2.3-5.fc11

How reproducible:

Every time

Steps to Reproduce:
1. Install gallery2 in Fedora 11 beta
2. Run through setup (this should work) - During install a warning will be shown that gallery2 is failing an intergretity check with the jar and php-Smarty files being missing.
3. At the end of setup gallery2 will show only blank output
  
Actual results:

Gallery2 failing due to errors

Expected results:

Shiny gallery stuff!

Additional info:

Appears related to the changes implemented for BZ 484240 - from the HTTP error logs:

[Wed Apr 22 20:47:22 2009] [error] [client 192.168.122.1] PHP Warning:  require_once(/usr/share/gallery2/modules/core/classes/../../../lib/smarty/Smarty.class.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class on line 2827, referer: http://galdev.testme.lan/install/index.php?step=11
[Wed Apr 22 20:47:22 2009] [error] [client 192.168.122.1] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/share/gallery2/modules/core/classes/../../../lib/smarty/Smarty.class.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/gallery2/modules/core/classes/GalleryCoreApi.class on line 2827, referer: http://galdev.testme.lan/install/index.php?step=11


Random additional note: BZ 464566 referenced in the changelog appears incorrect. Possibly meant to be BZ 484566 ?
Comment 1 Gwyn Ciesla 2009-04-23 08:40:16 EDT
How does -7 work for you?
Comment 2 Gwyn Ciesla 2009-04-27 10:32:31 EDT

*** This bug has been marked as a duplicate of bug 484240 ***
Comment 3 David L. Crow 2009-04-28 12:10:38 EDT
I'm not exactly sure how I got into this state, but this morning after the gallery2-2.3-7.fc10.noarch upgrade was installed via yum updates, I did not have a "smarty" link or directory in /usr/share/gallery2/modules.

Force re-installing the rpm did not fix it because the logic to create the symlink looks like

  if [ -d /usr/share/gallery2/lib/smarty ]; then
    rm -rf /usr/share/gallery2/lib/smarty
    ln -s ../../php/Smarty /usr/share/gallery2/lib/smarty
  fi

Since the directory did not exist, no symlink was created.

Seeing the logic, I was able to create the symlink and am off and running, but thought I should report this for posterity and others trying to resolve this problem.
Comment 4 Gwyn Ciesla 2009-04-28 12:16:26 EDT
*** Bug 498019 has been marked as a duplicate of this bug. ***
Comment 5 Gwyn Ciesla 2009-04-28 12:18:21 EDT
I see the flaw, I should move the link creation out of the loop.
Comment 6 David L. Crow 2009-04-28 12:23:00 EDT
Be careful.  If the symlink already exists and the ln command currently in the script is run again, a symlink will get created in the link destination (i.e. /usr/share/php/Smarty).
Comment 7 Gwyn Ciesla 2009-04-28 12:45:35 EDT
New version I'm building is the following:

%pretrans
#symlink to system smarty
if [ -d /usr/share/gallery2/lib/smarty ]; then
  rm -rf /usr/share/gallery2/lib/smarty
fi
if [ ! -e /usr/share/gallery2/lib/smarty ]; then   
  ln -s ../../php/Smarty /usr/share/gallery2/lib/smarty
fi


This should prevent that eventuality.

Note You need to log in before you can comment on or make changes to this bug.