OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.2 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/misc/jailing/package-functions
  9. # Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. jail_pkg_apache_postmake() {
  23. jail_ensure_users http
  24. ### Updates paths in $root/$jail/$datadir/build/config_vars.mk
  25. echo "Updateing paths in $root/$jail/$datadir/build/config_vars.mk"
  26. tmp=`mktemp`
  27. # A copy of original config_vars.mk is left for reference
  28. cp $root/$jail/$datadir/build/config_vars.mk \
  29. $root/$jail/$datadir/build/config_vars.mk.orig
  30. cp -f $root/$jail/$datadir/build/config_vars.mk $tmp
  31. # s|$base/$builddir/httpd-$ver|/$jail/usr|; is repeated many times
  32. # because it appear many times in same line ... probably there is
  33. # a not so silly way but I can't find it :(
  34. # Feel free of cleaning it
  35. sed " /^exp_.* = \/.*/ {s| = /*usr| = /$jail/usr|; \
  36. s| = /*etc| = /$jail/etc|; s| = /*var| = /$jail/var|; \
  37. p; d; }; \
  38. /^rel_.* = \/.*/ {s| = /*usr/| = |; s| = /*usr| = |; \
  39. s| = /*etc| = ../etc|; s| = /*var| = ../var|; p; d; }; \
  40. / = \/.*/ {s| = /*usr| = /$jail/usr|; \
  41. s| = /*etc| = /$jail/etc|; s| = /*var| = /$jail/var|; \
  42. p; d; }; \
  43. " < $tmp > $root/$jail/$datadir/build/config_vars.mk
  44. ### END Updates paths in $root/$jail/$datadir/build/config_vars.mk
  45. ### Updates paths in $root/$jail/$sbindir/apxs
  46. echo "Updateing paths in $root/$jail/$sbindir/apxs"
  47. cp -f $root/$jail/$sbindir/apxs $tmp
  48. sed "s|/usr/share/build|/$jail/$datadir/build|" < $tmp \
  49. > $root/$jail/$sbindir/apxs
  50. ### END Updates paths in $root/$jail/$sbindir/apxs
  51. ### Update apachectl
  52. echo "Updateing paths in $root/$jail/$sbindir/apachectl"
  53. cp -f $root/$jail/$sbindir/apachectl $tmp
  54. sed "s|HTTPD=.*|HTTPD='chroot /$jail /$sbindir/httpd'|" \
  55. < $tmp > $root/$jail/$sbindir/apachectl
  56. ### END Update apachectl
  57. rm $tmp
  58. unset tmp
  59. }
  60. jail_pkg_postfix_postmake() {
  61. ./postfix-install -non-interactive \
  62. daemon_directory=/usr/libexec command_directory=/usr/bin \
  63. sendmail_path=/usr/bin/sendmail \
  64. newaliases_path=/usr/bin/newaliases \
  65. mailq_path=/usr/bin/mailq manpage_directory=/man/ \
  66. sample_directory=/usr/share/$pkg
  67. jail_ensure_users postfix
  68. jail_ensure_groups postdrop
  69. }
  70. jail_pkg_mysql_postmake() {
  71. mv -f $libdir/mysql/* $libdir
  72. rmdir $libdir/mysql
  73. mkdir -p $docdir
  74. cp support-files/my-*.cnf $docdir
  75. chown $pkg.$pkg $localstatedir
  76. }