[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Roxen 3 and MySQL packaging help

I've been trying to package Roxen 3.3 the last couple of months
now, and I'm closing in on a release...

The problem have been that The Roxen Webserver (tm) 2.2 and newer (only
2.1 is packaged in Debian) pre-depend on MySQL. I never liked this for
a number of reasons. There's even been a flame-fest on the roxen list
about this.

The Roxen Webserver distribution from upstream includes the (full!) MySQL
distribution, and quite naturaly (and against the social contract/package
guidelines) I can't include that in the Debian package.

And personaly, I'd like to have the possibility to use an existing MySQL
package somewhere else on my network (got a specially built machine for
SQL/Database usage).

So far so good. I've patched The Roxen Webserver to utilize an external
MySQL, but a question arose on the roxen list - 'When I install The Roxen
Webserver using the Debian GNU/Linux tools (apt-get etc), do I have to
setup a MySQL server?'. A very valid question, and personaly I'd prefere
not to (if I didn't need it for something else).

So my solution is (currently) as follows:
        1. Only 'Suggests' the mysql-server package, giving a note that it
           is absolutly vital that there IS a MySQL server (somewhere).
           - I don't want to FORCE (ie, '(pre-)Depends' on mysql-server)
             because of the possibility to use an external (ie, not on
             this host) MySQL server.
           - If The Roxen Webserver is started, and it can't contact a
             MySQL server, it will die with a notice about this in the

        2. Ask user when installing The Roxen Webserver if the MySQL server
           is to be used for internal use only.

           Problem 1: I should somehow take notice if there is a MySQL
                      server being installed, and/or installed but not

        3a. If MySQL server is used for other purposes
            -> If there is a mysqld on localhost, install a separate
               MySQL database in /var/cache/roxen3 (where the previous
               file cache etc was located in <2.1). Start a new MySQL
               server thread to use this directory as datadir. This to
               separate the two databases instances (just incase).


            -> Add a command line option when starting The Roxen Webserver
               saying that it's an external database (where/how etc is
               asked through debconf).

        3b. If MySQL server is used for internal roxen purposes only
            -> Make sure we don't configure (ie, no debconf questions)
               the MySQL server package. This is done by doing the
               following in the 'config' script:

                ----- s n i p -----
                # Internal 'alias' - when we set a variable, we also
                # have to set it 'seen'.
                db_set_debug () {
                    db_set $1 "$2"
                    db_fset $1 seen true
                [... questions and check conserning roxen setup etc ...]
                db_set_debug mysql-server/postrm_remove_database true
                db_set_debug mysql-server/skip_networking false
                db_set_debug mysql-server/start_on_boot false
                db_set_debug mysql-server/want_chroot false
                ----- s n i p -----

               These are resonable defaults for use with The Roxen Webserver.

               Problem 2: When I now try to 'apt-get install mysql-server roxen3'
                          to simulate an installation (no (pre-)Depends remember),
                          apt/debconf is configuring MySQL first, hence my
                          mysql-server/* set's isn't executed yet.

               Part one of this problem is that I have to install the mysql-server
               package manually (I'm not going to use my specially built *SQL server
               for package testing! :).

               Part two of this problem is that it's configuring/setting up the
               MySQL server before The Roxen Webserver.

Does anyone have constructive :) input on this?
spy Treasury cracking domestic disruption FSF class struggle
supercomputer [Hello to all my fans in domestic surveillance] 767
Ft. Bragg BATF Iran North Korea Delta Force Semtex
[See http://www.aclu.org/echelonwatch/index.html for more about this]

Reply to: