Bug 88388 - Drupal port overwrites config on upgrade
Summary: Drupal port overwrites config on upgrade
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-02 07:40 UTC by ari
Modified: 2005-12-29 17:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ari 2005-11-02 07:40:15 UTC
When upgrading the www/drupal port from 4.6.2 to 4.6.3 (for example using
portupgrade), the Makefile runs commands such as this:

${CP} -R ${WRKSRC}/themes ${PREFIX}/${DRUPDIR}

The effect is to delete all existing configuration files and changes made
to the Drupal installation.

Fix: 

A different approach is needed for the installation phase. The
databases/phpmyadmin port does this:

install-app:
        cd ${WRKSRC} ; \
        for src in $$( ${FIND} . ! -name .cvsignore ) ; do \
            dst=${PREFIX}/${MYADMDIR}$${src#.} ; \
            if ${TEST} -d $$src ; then \
                ${MKDIR} $$dst ; \
            else \
                ${INSTALL_DATA} $$src $$dst ; \
            fi \
        done

The net effect is that existing configuration files and directories are not
deleted.
How-To-Repeat:               Upgrade Drupal.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2005-11-02 07:42:37 UTC
Maintainer of www/drupal,

Please note that PR ports/88388 just has been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/88388

-- 
Edwin Groothuis
edwin@FreeBSD.org
Comment 2 Marcus Alves Grando freebsd_committer freebsd_triage 2005-11-02 12:54:07 UTC
State Changed
From-To: open->feedback

Ask for maintainer fix.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2005-11-27 04:17:22 UTC
State Changed
From-To: feedback->open

Maintainer was reset due to inactivity.
Comment 4 Pav Lucistnik freebsd_committer freebsd_triage 2005-11-29 00:16:51 UTC
State Changed
From-To: open->feedback

You do store your configuration under themes/ dir? Why? 
If you modify one of the supplied theme, why about renaming it to a new name? 
Then port will not touch it on updates.
Comment 5 ari 2005-12-05 21:52:41 UTC
Fair enough, themes are not the problem. However, this file is:

/usr/local/www/data/drupal/sites/default/settings.php

We shouldn't be overwriting the default settings file each time  
Drupal is updated. Or at the least, the port should contain clear  
instructions that this file should be immediately copied and moved.  
Couldn't we just save the settings file to

/usr/local/www/data/drupal/sites/default/settings.php-dist

if one already exists...
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2005-12-05 21:56:17 UTC
> Fair enough, themes are not the problem. However, this file is:
> 
> /usr/local/www/data/drupal/sites/default/settings.php
> 
> We shouldn't be overwriting the default settings file each time  
> Drupal is updated. Or at the least, the port should contain clear  
> instructions that this file should be immediately copied and moved.  
> Couldn't we just save the settings file to
> 
> /usr/local/www/data/drupal/sites/default/settings.php-dist
> 
> if one already exists...

Can you provide a committable patch to do that?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Just because you're an angel doesn't mean you have to be a fool.
Comment 7 Pav Lucistnik freebsd_committer freebsd_triage 2005-12-29 17:51:15 UTC
State Changed
From-To: feedback->closed

I implemented special handling of settings.php