Closed (fixed)
Project:
Drush
Component:
Make
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Nov 2009 at 04:58 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dmitrig01 commentedYeah, drush make uses tons of forward slashes, so I don't know exactly what to do.
Comment #2
behindthepage commentedThanks. I will try replacing all the slashes with a variable and then define that variable as '\' and see if that fixes the problem then if others have the same problem they can just change the variable value.
Regards
Geoff
Comment #3
behindthepage commentedAfter some experimenting a bit I found the problem was Windows XP default temp path which is C:\Documents and Settings\Username\Local Settings\Temp. In Cygwin this is abbreviated to C:\Docum~1\Username\Local~1\Temp and this what was causing the problems. Once I changed the Temp file in System->Advanced->Environment Variables then the problems was solved.
The next problem was that when wget wrote the downloaded Drupal file to the femp folder it assigned it user=Geoff UID=none which caused Access Denied.
I solved all my problems by installing Virtualbox and Mint 7 Linux with access to my PC folders so now I can Drush make without problems.
Thanks for this great module and your help.
Regards
Geoff
Comment #4
dmitrig01 commentedok, i'd say that at this point windoze support isn't a priority
Comment #5
matt v. commentedI managed to get drush make working under Windows. I already had drush working, using various stand-alone Windows versions of the unix utilities such as wget and tar. To get drush make working, I had to also download mv, cp, and gawk from GNU utilities for Win32. I had to rename gawk.exe to awk.exe and make the minor change included in the patch file below.
Comment #6
hunmonk commentedwe should look at addressing this before drush_make gets deployed on drupal.org, since we'd be asking profile maintainers (some of which are on windoze, i'm guessing) to use it.
Comment #7
dmitrig01 commentedMatt, thanks so much for the patch. I committed it, but I'm leaving this issue as needs work because this needs documenting somewhere. would you be willing to take that up?
Comment #8
dmitrig01 commentedActually I think this is standard Drush, so unneeded.
Comment #10
matt v. commentedComment #7 says the patch was committed, but I just had to make the same change to get the latest version (6.x-2.0-beta6) to work under Windows. I'm not sure this got committed.
Comment #11
ribbles commentedAfter applying the above patch, I was still receiving problems with the temp folder on windows. It looks like the args passed into drush_shell_exec() are not being pre-formatted.
before:
arg[0] = [mv %s/%s %s]
[1] = [D:/temp/drush_make_tmp_1274394282]
[2] = [features]
[3] = [D:/temp/drush_make_tmp_1274394282/__build__/sites/all/modules]
results in:
mv "D:/temp/drush_make_tmp_1274394282"/"features" "D:/temp/drush_make_tmp_1274394282/__build__/sites/all/modules"
after widows.patch:
arg[0] = [mv -f %s %s]
[1] = [D:/temp/drush_make_tmp_1274397041/features]
[2] = [D:/temp/drush_make_tmp_1274397041/__build__/sites/all/modules]
results in: (notice the "/")
mv "D:/temp/drush_make_tmp_1274394282/features" "D:/temp/drush_make_tmp_1274394282/__build__/sites/all/modules"
Comment #12
ribbles commentedComment #13
jarodms commentedAwesome help! Thanks!
After installing this patch, I had some additional issues with windows, including:
- the version of tar that came with the GnuWin32 package I installed prevented tar -tf from executing.
- my TEMP environment setting prevented the mv command from executing correctly.
I hope this helps someone http://jarodms-drupal.blogspot.com/2010/06/drush-make-on-windows.html
Jarod
Comment #14
dmitrig01 commentedHey, sorry I overlooked this patch. Next time you upload a patch please set the status to active.
Would you mind re-rolling your patch from the latest version of CVS? The code base has changed quite a bit, and I really really want to get this in, but in its current form, it doesn't apply - thanks!
Comment #15
mew_fla commentedIs there a possibility of getting this patch updated for the new release of Drush_Make? I am using Windows 7 and have the drush part working perfectly, I just can't seem to get the drush_make part working.
-thanks
I am only trying to do a simple dl of core, so my make file is:
core = 6.x
projects[] = drupal
I am getting an error message at function: drush_drush_make_make
c:\temp\/drush_make_tmp_12779487004/drupal-6.17.tar.gz
Again, thanks for any help
Comment #16
dmitrig01 commentedThis *will* go in at some point
Comment #17
jarodms commentedhere's an updated patch
This works from what I can tell, but I get the following issues:
- "tar --strip" is not a valid option. The error message is: "Unable to find a strip option in your version of tar"
- "mkdir -p" is not a valid windows command. This creates a directory named "-p"
But my make files work. Looking into the issues though.
Comment #18
mew_fla commentedThanks for the update!
I got the patch installed and now I am getting:
An error occurred at function : drush_drush_make_make
I notice that the paths are now correct to where the files/dirs are located and the Temp files are removed. The location of the new "site" is also empty except for an empty -p directory.
Thanks again.
Comment #19
mew_fla commentedI reinstalled everything, for the third time, using your directions as a guide this time and everything worked.
Your set of utils looks newer than the others. I did get a couple errors during the install, but all looks normal. The site works as expected and all is good!!
Thanks again for all your help.
-Mike
Comment #20
dmitrig01 commentedWell we had a fill_path for -p, guess I will have to reintroduce. As for strip, we can use the mv technique I have discovered, but that's just more code. so I will do this at some point.
Comment #21
marcvangendSubscribing. My output when trying to do a basic drupal install, using a make file like in #15:
Comment #22
dmitrig01 commentedThis will be fixed in #641210: Can't find a strip option (now: Drush suggestion), though i still need to fix -p
Comment #23
dmitrig01 commentedthat part is fixed, now I need to desperately do this.
Comment #24
brightboldWindows users worldwide will thank you if you can get this fixed!
Comment #25
smk-ka commentedI was able to get drush make to work on Windows. These were to the steps:
http://gnuwin32.sourceforge.net/packages/coreutils.htm
http://gnuwin32.sourceforge.net/packages/gawk.htm
(Are these already documented somewhere?)
It should be noted that I didn't manage to get it to work at all with Cygwin.
- replaces all direct system calls to mkdir -p with a PHP implementation
- fixes the params to awk. Somebody with more knowledge in *nix shells needs to determine whether some sort of escaping is required due to double quotes.
Comment #26
dmitrig01 commentedThat mkdir replacement function is cool. Two things - code style - || and && instead of and and or. Second, can you document (in readme or otherwise) how you got it working? Thanks!
Comment #27
marcvangendSlightly beyond the scope of this this issue maybe, but drush_make is not the only drush component that needs to create directories once in a while. Isn't there a generic mkdir helper function in drush already? And if it isn't, shouldn't drush_make_mkdir() be added to drush core as drush_mkdir(), so others will not have to invent the same wheel?
Comment #28
dmitrig01 commentedmarcvangend: #902052: drush_mkdir
fixed. but this still needs to be documented
Comment #30
lyd commentedI appreciate these instructions. I have spent so many hours trying to get drush make to work on Windows XP.
Have made the additional gnu installations, however, applying the patch failed.
Is there a way of finding the files already patched the way you describe?
Thanks.
Comment #31
das-peter commentedHi there,
Just struggled also over the lack of windows compatibility.
I decided to give it a try and enhance it.
The attached patch works for me in the git-bash and cygwin on Win7.
drush extension drush_archiver, I wrote this one to enhance support of archive handling. Atm. this is not an official project but could become one if the feedback is positive.
patchcommand support. It's likely that it works in the git-bash since this one includes the nativepatchcommanddrush_make_tar()(The--taroption). Shouldn't be a big deal to implement this - but my focus lies currently on executing make files. To implement this I've to extend the drush archiver extension.I removed a leftover call to
drush_make_libraries(). This seems a related issue: #1091510: Error: Call to undefined function drush_make_libraries() inAnother interesting thing is, that I had to replace the protocol
http://withgit://in the git download function - since thehttp://was not working incygwin. It seems to work in any scenario so far - but is definitely a candidate for another bug.Comment #32
das-peter commented*grml* I know think first, then click save.
Here is the patch and the archiver extension :)
Edit 9th May:
You can grab the archiver extension now from here: git://github.com/das-peter/drush_archiver.git
The latest version includes support for archive creation and unit testing.
Comment #33
bmcguire commentedI'm having troubles applying the patch from #625948-32: Windows compatibility for Drush make. I just pulled down the latest 6.x-2.x from git "git clone --branch 6.x-2.x http://git.drupal.org/project/drush_make.git" and having issues with patching files drush_make.project.inc, drush_make.drush.inc, and drush_make.download.inc.
Here is the exact error I get
Failed to apply patch for file drush_make.drush.inc: Context mismatch. Expected line:
// Merge the known data onto the project info.
Found line:
$md5 = '';
Please let me know if I'm pulling from the wrong place. I would really like to test this patch.
Comment #34
das-peter commentedHi bmcguire,
sorry I forgot to mention that I used version "6.x-3.x".
Please let me know if the problem persists - or any other problems occur.
Comment #35
das-peter commentedUpdated the patch after feedback on this issue #1151476: unlink fails on windows if the file is read-only
The drush archiver is available here: https://github.com/das-peter/drush_archiver
Comment #37
Ellen Dee commentedsubscribe
Comment #38
dmitrig01 commentedI don't want to commit this yet, as it would create a dependency on drush 5.x. Once there's a 5.0 release, I'll commit this and release as well. For now, here's an updated version.
Comment #39
dmitrig01 commentedComment #40
ZuluWarrior commentedFYI,
Following the instructions here: http://drupal.org/node/1260084
I was able to get drush and drush_make working fine under Win7, just linking in case its any help to anyone! :)
Comment #41
ZuluWarrior commentedBy using drush itself to install drush_make this should work on all windows that support drush, no?
The solution (abbriviated from my above link) is to install a bunch of unix commands for windows (all linked on #1260084: how to prepare mediafront_demo installation ) and then drush the command : 'drush dl drush_make-6.x-2.3' and it went in no problems, was then able to make some sites.
The above instruction involves installing a make file for mediafront_demo (which is currently in flux) so ignore the last USE MEDIAFRONT.MAKE step, but the steps A through D sorted drush_make out for me on windows 7.
The istructions worked without any patching or manual nstalling of anything (like drush_make into the bin folder!!).
I would say that if someone can verify the solution works for XP users too, that this issue should be considered reviewed and be closed/fixed, but its not my place to say!
Comment #42
helmo commented[ Powered by #1115636: Issue Macros and Templates - Drush Make]
Drush make is being merged into drush core (discussed in issue:#1310130: Put drush make in drush core)
This means that the issue queue is also moving. The drush queue has a component 'Make' especially for drush_make.
More information will be posted on the drush_make and drush project pages.
Comment #43
greg.1.anderson commented#38 will probably need to be reworked after Drush make is adjusted to use Drush's download mechanism.
Comment #44
moshe weitzman commentedThe current blocker with the unit tests is that make_md5() uses find command which means something else on Windows. Lets fix this issue, borrowing code from recent patches as needed.
Comment #45
moshe weitzman commentedthat make_md5() issue is being discussed at #1428480: Use hash_file() when computing MD5 for a drush_make build - Windows compatility. We'll come back to this issue for later Windows work.
Comment #46
jhedstromAFAIK, this is resolved by other issues. Closing for now.