How to split my tango source package (long)
I am trying to set up a proper packaging for the TANGO
distributed control system http://tango-controls.org.
you can find my first attempt on the mentors.debian.net
It builds these binary packages:
liblog4tango4 - logging for TANGO - shared library
liblog4tango4-dbg - logging for TANGO - debug library
liblog4tango4-dev - logging for TANGO - development library
liblog4tango4-doc - logging for TANGO - documentation
libtango7 - TANGO distributed control system - shared library
libtango7-dbg - TANGO distributed control system - debug library
libtango7-dev - TANGO distributed control system - development library
libtango7-doc - TANGO distributed control system - documentation
tango-accesscontrol - TANGO distributed control system - accesscontrol server
tango-common - TANGO distributed control system - common files
tango-db - TANGO distributed control system - database server
tango-starter - TANGO distributed control system - control server
tango-test - TANGO distributed control system - test device
It build all the necessary software from the upstream tarball.
Now I have some difficulties with the installation and upgrade.
Suppose that you want to install the TANGO control system on your network composed
of 3 different computers
"A" : tango-db + tango-starter + tango-test "other tango device packages not yet provides"
"B" : tango-starter + tango-test + "other devices"
"C" : tango-starter + tango-test + "other devices"
All the TANGO control system is based on tango-db which provide the
database server. Its purpose is to store in a permanent way via MySQL all other tango
devices properties (its name, the host where the device is running).
For TANGO only one database is needed. Then you can run other TANGO
devices on your network. But to start a device it must be registered
in the database.
So on each computer an '/etc/tangorc' file must indicate where is
running the database. I create this file and add a tango system user
with the tango-common package using debconf
the unique question is :
Please specify the name of the host where the TANGO database server is running.
you answer is : mycomputer:10000
the dependences between the packages are like this
tango-db : tango-common
tango-accesscontrol : tango-common
tango-starter : tango-common
tango-test : tango-starter
I do not put the libraries dependencies.
1) interaction between tango-db and tango-common
During the installation of tango-db, I am using the dbconfig-common
package to create and populate the TANGO tables with one database device
The tango-db "provides" also a part of what tango-common is doing
if I install tango-db on the "A" computer, I know that I can put in tangorc
TANGO_HOST=A:? so I just need to ask for the port.
But on computer without the database, I must provide the host and the port.
So how must I split this debconf stuff in-between tango-db and tango-common?
must I duplicate something ?
2) starter problem
This device must be started like the database using the init scripts.
So I need to feed the MySql database during the installation with the
right parameters before starting the service. (a TANGO device can not
start if it was not previously register in the MySQL database)
This registration is necessary because I start this starter device during
the boot. all other devices will be started by this one. so no need to
register them during the installation. tango-gui tools will be availables
for this part later.
Normally the database device must be used to register a device.
Sadly there is no command line tool like tangoadmin provided by the upstream
that let me register a device directly into the database.
Nevertheless a tango binding is available but not in this source package
that is why I am a little bit reticent to use the python binding for writing
configuration script of thoses binary packages. Maybe I am wrong, but this
binding is not strictly synchronize with the tango releases (synchronization should
be the solution).
The side effect is if I want to install a starter I need to have a running
database is the Pre-Depends design for this purpose ?
But I can also do the job using the dbconfig-common way. Is there a way to
teach dbconfig-common to populate the database with something variable during
the installation. Indeed usually the name of the starter device contain the
hostname to easilly differenciate them.
To me the best things would be to have a command line tools provided by the upstream
for this purpose.
what's append if the hostname change ?
what is your oppinion about this ?
3) third alternative
usually this is the job of the user to populate the database with the right parameters using
the gui interfaces. The problem is that I do not provide this gui for now ( need jacorb not yet
in debian http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349540 ).
So I add into Readme.Debian explanation about what they have to do before starting the starter
I would prefer a smoother installation than this almost installed software.
thank you for your help.