This file is indexed.

/usr/share/doc/dbconfig-common/dbconfig-common-design.html is in dbconfig-common 1.8.47+nmu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
dbconfig-common: technical reference
</title>
</head>
<body>

<h1>
dbconfig-common 
</h1>
<h2>
technical reference
</h2>
<p>copyright &copy; 2004 sean finney &lt;seanius@debian.org&gt;</p>
<p>this document is licensed under the <a href="http://www.opensource.org/licens
es/afl-2.1.php">Academic Free License, Version 2.1</a>

<h3> abstract </h3>

<p>
this document is a technical reference for developers who are curious
regarding how dbconfig-common works.  before reading this document, it's
highly recommended that you read the <a href="dbapp-policy">best practices for database applications</a> draft, as the implementation design is based on
rationale detailed in that document.  if you are a developer looking to
use dbconfig-common in your packages, you should read <a
href="dbconfig-common-using.html">using dbconfig-common in debian
packages</a> first, as it will probably contain the information in which
you're interested in a more condensed and accessible form.

<h3>global maintainer script includes</h3>
<hr>
<ul>
<li> /usr/share/dbconfig-common/dpkg
<li> /usr/share/dbconfig-common/dpkg/$script
<li> /usr/share/dbconfig-common/dpkg/$script.$dbtype
</ul>
<hr>

<p>
for every maintainer script (.config, .postinst, et c) there are hunks
of shell code which can be included by package maintainers.  this way
whatever the "best practices" are deemed to be, the latest version of
this package and their scripts will implement it transparently for the
packages which use them.  for each maintainer script, there is a generic
script and a database-specific script.  that is,
you will find scripts named:

<ul>
<li> /usr/share/dbconfig-common/dpkg/postinst
<li> /usr/share/dbconfig-common/dpkg/postinst.mysql
</ul>

these scripts are sourced (not executed), so the lines in the package
maintainer scripts should look like this

<pre>
<code>
#!/bin/sh
# postinst maintainer script for foo-mysql

# source debconf stuff
. /usr/share/debconf/confmodule
# source dbconfig-common stuff
. /usr/share/dbconfig-common/dpkg/postinst.mysql 
dbc_go foo-mysql $@

# ... rest of code ...
</code>
</pre>

<p>
Note the arguments passed when sourcing the script.  

<h3> per-package database installation code </h3>
<hr>
<li> /usr/share/dbconfig-common/data/$package/install/$dbtype
<li> /usr/share/dbconfig-common/data/$package/install-dbadmin/$dbtype
<li> /usr/share/dbconfig-common/scripts/$package/install/$dbtype
</ul>
<hr>

<p>
the skeletons for the underlying databases are found under
this directory, in per-package subdirectories, underneath
which are files specific to each of the individual supported
database types.  these scripts do not need to include the code
necessary for creating database users or the databases themselves
(this is taken care of elsewhere), only the data used to create
the necessary tables and/or otherwise populate the database is
needed here.

<h3> per-package database upgrade code </h3>
<hr>
<li> /usr/share/dbconfig-common/data/$package/upgrade/$dbtype
<li> /usr/share/dbconfig-common/scripts/$package/upgrade/$dbtype
<li> /usr/share/dbconfig-common/data/$package/upgrade/$dbtype/$vers
<li> /usr/share/dbconfig-common/scripts/$package/upgrade/$dbtype/$vers
</ul>
<hr>

<p>
upgrades are probably the most complicated part of this common
infrastructure.  often in the life of a database application the
underlying database needs to be altered in some way.  in this
implementation, for every file that matches the form

<pre>
<code>
/usr/share/dbconfig-common/data/$package/upgrade/$dbtype/$vers
</code>
</pre>

<p>
if $vers is more recent than the most recently configured version of
the package (as passed to $2 in the postinst), then they are applied,
in sorted order.


<h3> global and per-package configuration </h3>
<hr>
<ul>
<li> /etc/dbconfig-common/config
<li> /etc/dbconfig-common/$package.conf
</ul>
<hr>

<p>
config contains the default global settings to be used during configuration.
</p>

<p>
$package.conf contains the per-package settings for database applications.
these settings are fed into debconf, so whether if debconf is set to
non-interactive mode these will be the authoritative values, otherwise
they will serve as pre-seeded defaults.
</p>

<p>
all of these files are in a shell-script include format, such that they
can be easily read and written by the common configuration scripts.
they're generated and maintained via ucf, so this setup should be fairly
friendly to the admin who wants to manually edit the files.
</p>

</body>
</html>