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.

111 lines
4.6 KiB

  1. ###########################
  2. ## FIXME for 5.1 ##
  3. ###########################
  4. * put this trigger-recreation thing into the init scripts -- what?!
  5. ###########################################################################
  6. # Here are some information that are only of interest for the current and #
  7. # following Debian maintainers of MySQL. #
  8. ###########################################################################
  9. The debian/ directory is under SVN control, see debian/control for URL.
  10. #
  11. # Preparing a new version
  12. #
  13. The new orig.tar.gz (without non-free documentation) is created in /tmp/ when
  14. running this command:
  15. debian/rules get-orig-source
  16. #
  17. # mysqlreport
  18. #
  19. The authors e-mail address is <public@codenode.com>.
  20. #
  21. # Remarks to dependencies
  22. #
  23. libwrap0-dev (>= 7.6-8.3)
  24. According to bug report 114582 where where build problems on
  25. IA-64/sid with at least two prior versions.
  26. psmisc
  27. /usr/bin/killall in the initscript
  28. zlib1g in libmysqlclient-dev:
  29. "mysql_config --libs" ads "-lz"
  30. Build-Dep:
  31. debhelper (>=4.1.16):
  32. See po-debconf(7).
  33. autoconf (>= 2.13-20), automake1.7
  34. Try to get rid of them.
  35. #
  36. # Remarks to the start scripts
  37. #
  38. ## initscripts rely on mysqladmin from a different package
  39. We have the problem that "/etc/init.d/mysql stop" relies on mysqladmin which
  40. is in another package (mysql-client) and a passwordless access that's maybe
  41. only available if the user configured his /root/.my.cnf. Can this be a problem?
  42. * normal mode: not because the user is required to have it. Else:
  43. * purge/remove: not, same as normal mode
  44. * upgrade: not, same as normal mode
  45. * first install: not, it depends on mysql-client which at least is unpacked
  46. so mysqladmin is there (to ping). It is not yet configured
  47. passwordles but if there's a server running then there's a
  48. /root/.my.cnf. Anyways, we simply kill anything that's mysqld.
  49. ## Passwordless access for the maintainer scripts
  50. Another issue is that the scripts needs passwordless access. To ensure this
  51. a debian-sys-maint user is configured which has process and shutdown privs.
  52. The file with the randomly (that's important!) generated password must be
  53. present as long as the databases remain installed because else a new install
  54. would have no access. This file should be used like:
  55. mysqladmin --defaults-file=/etc/mysql/debian.cnf restart
  56. to avoid providing the password in plaintext on a commandline where it would
  57. be visible to any user via the "ps" command.
  58. ## When to start the daemon?
  59. We aim to give the admin full control on when MySQL is running.
  60. Issues to be faced here:
  61. OLD:
  62. 1. Debconf asks whether MySQL should be started on boot so update-rc.d is
  63. only run if the answer has been yes. The admin is likely to forget
  64. this decision but update-rc.d checks for an existing line in
  65. /etc/runlevel.conf and leaves it intact.
  66. 2. On initial install, if the answer is yes, the daemon has to be started.
  67. 3. On upgrades it should only be started if it was already running, everything
  68. else is confusing. Especiall relying on an debconf decision made month ago
  69. is considered suboptimal. See bug #274264
  70. Implementation so far:
  71. prerm (called on upgrade before stopping the server):
  72. check for a running server and set flag if necessary
  73. preinst (called on initial install and before unpacking when upgrading):
  74. check for the debconf variable and set flag if necessary
  75. postinst (called on initial install and after each upgrade after unpacking):
  76. call update-rc.d if debconf says yes
  77. call invoce-rc.d if the flag has been set
  78. Problems remaining:
  79. dpkg-reconfigure and setting mysql start on boot to yes did not start mysql
  80. (ok "start on boot" literally does not mean "start now" so that might have been ok)
  81. NEW:
  82. 1. --- no debconf anymore for the sake of simplicity. We have runlevel.conf,
  83. the admin should use it
  84. 2. On initial install the server is started.
  85. 3. On upgrades the server is started exactly if it was running before so the
  86. runlevel configuration is irrelevant. It will be preserved by the mean of
  87. update-rc.d's builtin check.
  88. Implementation:
  89. prerm (called on upgrade before stopping the server):
  90. check for a running server and set flag if necessary
  91. preinst (called on initial install and before unpacking when upgrading):
  92. check for $1 beeing (initial) "install" and set flag
  93. postinst (called on initial install and after each upgrade after unpacking):
  94. call update-rc.d
  95. call invoce-rc.d if the flag has been set