Debian Developers - Common set of debconf templates (was: Re: RFC: best practice creating database)

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > October 2004 > Common set of debconf templates (was: Re: RFC: best practice creating database)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Common set of debconf templates (was: Re: RFC: best practice creating database)
Christian Perrier

2004-10-08, 2:48 am

> if you think that it would be too complicated/flaky, i'd add a debconf
> note (of _low_ priority!) and put something in README.Debian.



While we are at it_:

Could *please* maintainers of packages interacting with RDBMS
establish a set of *common* debconf templates for prompting users_?

While translating the debconf templates for packages, we have found
dozens of similar questions such as:

-Database host (wrong English....this should probably be "Database
*server*" or something similar)

-Database user
-Password for this user
-Database administrator username
-Database administrator password
-Database name
-Should the database be purge on package purge?
and so on....

Depending on the maintainer's English skills, these templates are more
or less well written....or often not clear about involved concepts
(the "database user" is often the database *owner*).

All such templates should probably go into a common set of debconf
templates, provided by a very small package, which all these packages
should depend upon, instead of constantly reinvent the wheel....and
make up, translators, do damn boring work.

Such "common debcon templates set in a separate package" could be an
interesting thing to work on for the next release of Debian.




--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Christian Perrier

2004-10-08, 2:48 am

(crossposted to -devel and -i18n...feel free to followup on the
appropriate place...it probably belongs to both currently)

Quoting Andreas Tille (tillea@rki.de):
> On Fri, 8 Oct 2004, Christian Perrier wrote:
>
> IMHO this is a brilliant idea but I doubt that it would be realized if
> noone of the translators team would start building this package. You
> people seem to have the best knowledge of it and thus I would start
> providing such a package and start filing wishlist bug reports against
> the relevant packages.
>
> [Feel free to quote me anywhere, but I wanted to avoid ACK-messages ...]


Indeed, this is a long time since I think about such "common debconf
templates" package.

So, your remark about translators is probably a very good one.:-)

The only problem is that I'm damn unable to find a 25th hour in the
day for working on this.

Would any of the i18n people start working on such a package_?

Let me resume the situation shortly:

Several packages use some kind of very usual debconf templates for
prompting about common things. For instance, most packages creating a
database in a RDBMS ask for:

-Database server hostname
-Database server port
-Database name
-Database owner username (sometimes called "Database user")

and so on...

I imagined that a very small package named "debconf-rdbms" could
include common templates for this. Then packages needing such
templates can just Depend on it (or Pre-Depend, I'm not sure) and use
db_register and similar stuff for using the common template for
prompting...

This would save us translators a lot of boring task translating always
the same things. This would also save some space in /var/lib/dpkg/info
as templates would not be replicated with their translations.

Several other parts could also benefit from this...which would need
creating a few debconf-whatever packages...

The current way of handling common templates by the use of shared/* is
not optimal ATM, as all packages using shared/* templates must define
them. They must have the same text...but nothing enforces this...and
there is no mechanism for reusing the translations which are
replicated many times.

So, all this is just a matter of creating a first preliminary very
small package targeted at database stuff. Just start with one question
and, in the same time, work with a package which could make use of it.

This could be used as a live demo and then be generalized among other
packages using and creating a database during their configuration.



--
To UNSUBSCRIBE, email to debian-i18n-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
sean finney

2004-10-08, 7:50 am

hi christian,

On Fri, Oct 08, 2004 at 06:59:50AM +0200, Christian Perrier wrote:
> All such templates should probably go into a common set of debconf
> templates, provided by a very small package, which all these packages
> should depend upon, instead of constantly reinvent the wheel....and
> make up, translators, do damn boring work.


something i've been messing around with a bit in my free time is
a dh_installdb add-on to debhelper. it's not in a presentable state
yet, but could be made so with sufficient prodding.

basically, debian/$package.databases contains a list of database servers
that the package supports, and all the package maintainer has to
do is put a dh_installdb in his/her debian/rules. one of the things
i haven't been able to completely address yet is this debconf templating
issue. to this point my tool has required the questions to already
exist in the templates file, but in an ideal world this would not
be a requisite.

i like the idea of having the templates provided by a third-party
package, though gracefully handling different
usernames/passwords/hosts/etc on a per package basis would be a little
tricky.

the idea i had been running with up to this point was to have these
templates pre-defined and pre-translated as part of debhelper, and patch
debhelper to do $package.templates the same way it does $package.*inst
(wrt #DEBHELPER#), though i'm not convinced that this is the right way.


sean


--

Brian Sutherland

2004-10-10, 5:54 pm

On Fri, Oct 08, 2004 at 06:59:50AM +0200, Christian Perrier wrote:
> All such templates should probably go into a common set of debconf
> templates, provided by a very small package, which all these packages
> should depend upon, instead of constantly reinvent the wheel....and
> make up, translators, do damn boring work.


Is is guaranteed that these templates be available in the .config script?

Because, reading from the debconf-devel manpage:

Note that the config script is run before the package is unpacked. It
should only use commands that are in essential packages. The only dependency
of your package that is guaranteed to be met when its config script is run
is a dependency (possibly versioned) on debconf itself.

--
Brian Sutherland


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Colin Watson

2004-10-10, 5:54 pm

On Sat, Oct 09, 2004 at 01:45:50PM +0200, Brian Sutherland wrote:
> On Fri, Oct 08, 2004 at 06:59:50AM +0200, Christian Perrier wrote:
>
> Is is guaranteed that these templates be available in the .config script?


The templates would probably have to be copied at build-time,
debhelper-style.

--
Colin Watson [cjwatson@debian.org]


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Agustin Martin

2004-10-10, 5:54 pm

On Fri, Oct 08, 2004 at 09:03:22AM +0200, Christian Perrier wrote:

> Indeed, this is a long time since I think about such "common debconf
> templates" package.



> The current way of handling common templates by the use of shared/* is
> not optimal ATM, as all packages using shared/* templates must define
> them. They must have the same text...but nothing enforces this...and
> there is no mechanism for reusing the translations which are
> replicated many times.
>


For real shared/* stuff intended to be used in a debconf select type
question you can use an approach similar to the one that is used in
dictionaries-common. The select type main question belongs to
dictionaries-common (and is not shared), and each ispell dict/wordlist has
an empty (really a single whitespace) common shared question. This allows to
know the owners for that shared question, and feed the global question with
a set of possible values in a limited way (they cannot be l10n'ed).
Things are more complicated for us, since each package can provide more than
one entry to the global question owners field, but this way we avoided the
sync problems between all the ispell dicts/wordlists packages templates.

For debconf notes things should also be possible, with some minor tricks via
db_subst or its PERL equivalent.

The problem is for the majority of debconf questions, that do not fit in any
of the above categories. Using db_subst might help, templates like

Template: debian/foo-test
Type: boolean
Description: ${shortdesc}
${longdesc}

could be used along with db_subst, but the problem is that AFAIK debconf
currently does not support extracting a debconf template description to a
string. If at the pre-config stage the strings are available, they could
even be get from a normal gettext structure from a .mo file, but I am
unsure that is possible, gettext-base is not essential although is in
the base section.

Cheers,

--
Agustin


--
To UNSUBSCRIBE, email to debian-i18n-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com