[Refdb-users] Build Debian bin pkg from Ubunt scr pkg
Status: Beta
Brought to you by:
mhoenicka
|
From: Stefan S. <ste...@ya...> - 2009-09-28 10:25:29
|
Hallo! Markus Hoenicka writes: > Please have a look at the refdb-init script (also documented here: > http://refdb.sourceforge.net/manual/ch04s08.html) which is a generic > script that may or may not work out of the box on Debian. Sigh ... big shame and a big RFM on me. Installing software via the Debian packaging system obviously made me lazy. So I had a deeper look at the manual and - what a surprise - I seem to have succeeded: After two minor modifications (see below) I seem to have a running refDB server/sqlite3-database: The "/var/lib/refd/db" directory contains the following file: DB_VERSION, refdb, refs (where "refs" is the name of the reference DB that I have selected). I have not yet entered a single reference into my refs reference DB, but I wanted to give you timely feedback. To make a long story short: - I installed the binary package and accepted the error message of the post-installation script that resulted from being unable to start the refdbd server. - After the binary installation I started the "refdb-init" script as root. To execute this script successfully I had to make two minor modifications (Torsten already notes difficulties concerning this script in the README.Debian file of the package.) -- I had the change the value of MYREFDBCTL to "/etc/init.d/refdb" -- I had to execute: "/usr/sbin/refdbd" as root and change the ownership of the "/var/lib/refdb/db" hierarchy afterwards. In concrete, instead of the original: su refdb -c "$MYREFDBD -a -e 0 -l 6 -L /var/log/refdb/refdbd.log -P /var/run/refdb/refdbd.pid -u $dbadmin_name -w $dbadmin_password" || endScript "Failed to install or upgrade main database" "failed" the modified version of the refdb-init script which works in my Debian context contains: $MYREFDBD -a -e 0 -l 6 -L /var/log/refdb/refdbd.log -P /var/run/refdb/refdbd.pid -u $dbadmin_name -w $dbadmin_password || endScript "Failed to install or upgrade main database" "failed" chown -R refdb:refdb /var/lib/refdb/db Note: I first tried: chown refdb:refdb /var/lib/refdb/db su refdb -c "$MYREFDBD -a -e 0 -l 6 -L /var/log/refdb/refdbd.log -P /var/run/refdb/refdbd.pid -u $dbadmin_name -w $dbadmin_password" || endScript "Failed to install or upgrade main database" "failed" but that did not work (denied access to the log/pid files ?) After fiddling with the refdb-init script I have to questions concerning this script: - I do not understand why in the call to refdbd contains the -e flag set to 0 AND the -L flag set. Shouldn't the -e flag be set to 2 in this case or the -L flag be left out? But maybe this means falling back to stderr if the file is not accessible, which is not exactly what the manual says. - In the refdb-init.in file most of the path-names (for example the path-name to the database-directory) are made configurable in the build-process, but this is not the case for the example-configuration files. In the way the software is currently setup there should not arise any inconsistencies. Nevertheless a cleaner solution seems to me to make the example-configuration files configurable in the build-process and to let the refdb-init script read these values from the selected configuration file. If you like I can post a quick and dirty recipe that collects all the steps for building a Debian Lenny package from the refdb_0.9.9.0~svn471-7ubuntu1 Ubuntu source package, installing and purging the Debian binary package. This should probably only be done after I have successfully used the reference database for some time (added references, retrieved them, build bibliographies etc.) Note though that the recipe is currently a make-shift solution: - The approach described in this recipe is VERY dirty indeed. For example: I do not even remove the "ubuntu" string in the package name (this does not mean any hostility against Ubuntu :). - I do not know which of the original shortcomings have already been addressed in a possible new version of Torsten's Ubuntu source package. As I am building and installing in a Debian context, I do not know if these (or which of these) shortcomings should be handled in an Ubuntu package. Kind regards Stefan |