6 grml-live-db - log package build information of grml-live to database
10 dpkg-to-db [ options ] || db-to-fai /path/to/grml-live.db <build-id> |
15 The grml-live-db Debian package provides a simple way to put build information
16 of grml-live into a database. By default you have to do nothing but install
17 grml-live-db and during each invocation of grml-live you'll get an additional
18 entry in the sqlite3 database /var/log/grml-live.db. If you want to customize
19 the database logging check out the following sections in this manpage.
24 /usr/share/grml-live-db/scripts/dpkg-to-db adds grml-live build information
25 (output of 'dpkg --list') and (optionally) a logfile into a sqlite3 database.
26 This script is used by default if grml-live-db is installed (no configuration
29 /usr/share/grml-live-db/scripts/db-to-fai converts output of grml-live's sqlite
30 database for use within FAI. This script is useful if you want to reproduce a
31 certain build with specific package versions. Please note that you need the
32 according Debian mirrors providing all the specific package versions of course.
37 dpkg-to-db supports the following options:
45 Use specified database file.
49 Logfile thath should be added to the database entry.
53 Name of the grml-live flavour that was being built.
55 db-to-fai does not support any options but needs to be invoked
56 with path to the grml-live database and the build id.
58 Configuration and using custom database wrapper scripts
59 -------------------------------------------------------
61 The following configuration variables are available and can be adjusted:
63 DPKG_DATABASE=/var/log/grml-live.db
65 Path to the database file that should be used for storing the build information.
66 This database is ysed within dpkg-to-db by default.
68 DPKG_DBSCRIPT=/usr/share/grml-live-db/scripts/dpkg-to-db
70 The database wrapper script that's used for storing the build information.
71 If you do not want to log to the sqlite3 database but instead use your own
72 abstraction layer just point this variable to your favourite script.
74 DPKG_DBOPTIONS="-d $DPKG_DATABASE --logfile $LOGFILE --flavour $GRML_NAME < $DPKG_LIST"
76 If the database script ($DPKG_DBSCRIPT) requires any command line options
77 specifiy it through this variable.
82 How dpkg-to-db is being used inside grml-live:
84 /usr/share/grml-live-db/scripts/dpkg-to-db -d /var/log/grml-live.db --logfile /var/log/grml-live.log --flavour $GRML_NAME < /var/log/fai/$HOSTNAME/last/dpkg.list
86 Manually insert data to database:
88 # /usr/share/grml-live-db/scripts/dpkg-to-db -d ./grml-live.db --logfile /tmp/logfile --flavour grml-full < ./dpkg.list
90 # dpkg -l | ./dpkg-to-db --db ./grml-live.db --logfile /tmp/logfile --flavour grml-full
92 Retrieve build information of a specific build for use within FAI:
94 # /usr/share/grml-live-db/scripts/db-to-fai /var/log/grml-live.db 6 > /etc/grml/fai/config/package_config/REPRODUCE
96 Describe schema of database:
98 # echo '.schema' | sqlite3 /var/log/grml-live.db
102 # echo 'SELECT package,version,status,build.flavour,build.identifier FROM packages, build WHERE build.identifier = "grml-full-20091213012517" AND packages.build = build.id ; ' | sqlite3 /var/log/grml-live.db
104 # echo 'SELECT package,version,status,build.flavour,build.identifier FROM packages, build WHERE build.id = 7 AND packages.build = build.id ; ' | sqlite3 /var/log/grml-live.db