Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7
-
Fix Version/s: 4.7.3
-
Component/s: None
-
Labels:
-
Documentation Required?:Developer Doc
-
Funding Source:Contributed Code
Description
We have been working on using distmaker in a flow to allow us to use the CiviCRM repos for dev work & then to compile into a directory which we can commit to git for deployment. Note that in this case it is specifically a drupal 7 requirement we have.
Reasons -
1) working off the CiviCRM repo structure makes it easier to port patches & upstream them
2) using a branch per point release we can create each branch by rebasing our commits over the new tag & clean up our patches on an ongoing basis - rather than creating a huge nightmare on potential upgrade
3) moving away from having the compiled civicrm checked into git isn't really an option at this stage - that makes more sense in a civicrm-specific workflow than in a workflow that is about the larger drupal site.
4) It is important for live sites not to use a process that could involve files being included that are not in the official CiviCRM tarball as they could pose a security risk.
I have a patch (for review) that implements this more or less as discussed with Tim
1) adds a new dist type d7_dir
2) it stops checking for distmaker.conf & instead checks that all required variables are defined. It switches to using good defaults for all except the TARGETDIR
3) allows packages dir & drupal dir to be set.
So the function we are using to generate a directory with a compiled civicrm version is:
DM_VERSION=4.6.9 DM_DRUPALDIR="$THIS_DIR/../drupal" DM_PACKAGESDIR="$THIS_DIR/../packages" DM_TARGETDIR="$DM_TARGETDIR" $THIS_DIR/../distmaker/distmaker.sh d7_dir
Notes on #3
At this stage it's possible to use civicrm on a structure like
civicrm
--civicrm-core
--civicrm-drupal
but packages still has to be in the civicrm-core dir - which means we can't quite get away from the complexity of submodules WITHIN the civicrm-core dir (I was pretty happy to use submodules within the civicrm dir to the 3). I spent about 30 mins seeing if submodules could be outside civicrm & it is do-able IHMO but I didn't push through.