modsurvey.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Index: installer.pl
  2. --- mod_survey/installer.pl.orig 2006-01-23 13:05:47 +0100
  3. +++ mod_survey/installer.pl 2006-03-05 15:35:07 +0100
  4. @@ -184,12 +184,13 @@
  5. $windows = 0;
  6. $distrib = "unix/generic";
  7. $source = "./";
  8. -$destination = "/usr/local/mod_survey/";
  9. +$destination = "@l_prefix@/lib/modsurvey/";
  10. +$destination_prefix = $ENV{'RPM_BUILD_ROOT'};
  11. $creator = 1;
  12. $conf{"_SURVEY_ALLOWAUTO"} = 1;
  13. -$webuser = "apache";
  14. -$webgroup = "apache";
  15. +$webuser = "@l_nusr@";
  16. +$webgroup = "@l_ngrp@";
  17. sub isWindows()
  18. {
  19. @@ -513,7 +514,7 @@
  20. print " windows\n";
  21. print "\nWhich platform are we installing for? [" . $distrib . "] ";
  22. -$distrib = &getAnswer($distrib);
  23. +# $distrib = &getAnswer($distrib);
  24. print "Platform is: $distrib\n\n\n";
  25. $nowpart++;
  26. @@ -540,8 +541,8 @@
  27. $destination = &getAnswer($destination);
  28. print "Installing in $destination.\n\n\n";
  29. -$conf{"_SURVEY_ROOT"} = $destination . "webroot/";
  30. -$conf{"_SURVEY_SYSBASE"} = $destination . "data/";
  31. +$conf{"_SURVEY_ROOT"} = "@l_prefix@/share/modsurvey/webroot/";
  32. +$conf{"_SURVEY_SYSBASE"} = "@l_prefix@/var/modsurvey/data/";
  33. $conf{"_SURVEY_LANG_DIRECTORY"} = $destination . "Lang/";
  34. $nowpart++;
  35. @@ -566,7 +567,7 @@
  36. }
  37. else
  38. {
  39. - ($webuser, $webgroup) = &getUidGid();
  40. + # ($webuser, $webgroup) = &getUidGid();
  41. print "In order to correctly set file security for the files in the\n";
  42. print "Mod_Survey installation directory, we need to know determine under\n";
  43. @@ -681,7 +682,7 @@
  44. print "option.\n\n";
  45. print "Do you want to set PerlSendHeader to \"On\"? [no] ";
  46. -$yesno = lc(&getAnswer("no"));
  47. +$yesno = lc(&getAnswer("yes"));
  48. if (($yesno ne "no") && ($yesno ne "n"))
  49. {
  50. print "PerlSendHeader On\n";
  51. @@ -926,16 +927,14 @@
  52. system "mkdir " . &osFix($destination);
  53. -&makeDir($destination);
  54. -&copyCoreFiles($source, $destination);
  55. +&makeDir($destination_prefix.$destination);
  56. +&copyCoreFiles($source, $destination_prefix.$destination);
  57. if (!$windows)
  58. {
  59. print "Chmodding/chowning files and directories... ";
  60. - system "chown 0:0 -R $destination";
  61. - system "chmod 755 -R $destination";
  62. - system "chown $webuser" . ":" . "$webgroup $destination" . "data";
  63. - system "chmod 700 $destination" . "data";
  64. + system "chmod -R 755 ${destination_prefix}${destination}";
  65. + system "chmod 700 ${destination_prefix}${destination}" . "data";
  66. print "ok\n";
  67. }