Stefan Schlee | 24 Sep 18:24 2009
Picon

Build Debian bin pkg from Ubunt scr pkg

Hallo!

I am trying to build a Debian Lenny package from the Ubuntu
package sources provided by Torsten Bronger.

I am a Debian packaging neophyte but after some struggling I
managed to get something named refdb_<..>.deb.  The only issue
that I encountered was that I had to use the "libltdl3-dev"
instead of the "libltdl7-dev" as proposed in the "Build-Depends:"
clause, because the "libltdl7-dev" is not available in the Debian
Lenny distribution.

Still the build process worked out fine (although I got a lot of warnings concerning pointers, data types etc.)

After I had manually satisfied the package requirements according to the "Depends:" clause, I issued a
"dpkg -i refdb_<..>.deb".  Alas the installation process terminated with an error:

...
invoke-rc.d: initscript refdb, action "start" failed.
dpkg: error processing refdb (--install):
 subprocess post-installation script returned error exit status 1
...

This made me include a "set -x" in the "/etc/init.d/refdb" file to get a trace.  The output of the trace was as follows:

+ start_server
+ '[' '!' -d /var/run/refdb ']'
+ '[' -z refdb ']'
+ start-stop-daemon --start --quiet --pidfile /var/run/refdb/refdbd.pid --chuid refdb --exec
/usr/sbin/refdbd -- -L /var/log/refdb/refdbd.log -P /var/run/refdb/refdbd.pid
(Continue reading)

Torsten Bronger | 24 Sep 21:08 2009
X-Face
Picon
Picon
Picon
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Hallöchen!

Stefan Schlee writes:

> [...]
>
> I looked for available packages with "libdbi" in their name and got the
> following listing:
>
> $> aptitude search libdbi                        
>
> p libdbi-doc - DB Independent Abstraction Layer for C -- documentation
> [...]
> p libdbix-xmlmessage-perl - perl module for exchanging XML messages between DBI
> data sources
>
>
> Which of these packages is missing from my installation?

Du you use the latest version on
<https://launchpad.net/~bronger/+ppa-packages>?  I switched to the
SVN version three weeks ago.  It contains

    Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6),
     openjade, docbook-dsssl, docbook-xml, jadetex, texlive-base-bin, fop,
     libbtparse0, libtext-iconv-perl, libmarc-record-perl, libxml-parser-perl,
     libcgi-pm-perl, coreutils, libreadline5, libxml2-utils, xml-core, libncurses5,
     libdbi0, libdbd-sqlite, libexpat1
    Recommends: mysql-server (>= 3.23) | postgresql (>= 7.1) | libsqlite0 (>= 2.8) |
     libsqlite3-0 (>= 3), libdbd-mysql | libdbd-pgsql | libdbd-sqlite3
(Continue reading)

Markus Hoenicka | 25 Sep 09:03 2009
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Quoting Torsten Bronger <bronger <at> physik.rwth-aachen.de>:

> libdbd-sqlite is always installed, however in your case, this was
> not enough.  Does anybody have an idea why is this?  Doesn't RefDB
> start in Sqlite mode?
>
> We could add *all* libdbd's to the dependencies.
>

I think it is a good idea to stick to sqlite in the first place, as  
this allows for the smallest possible installation. According to  
Stefan's refdbd log "sqlite" is available but this does not seem to be  
the driver which is requested in refdbdrc. Stefan, could you please  
post the contents of /etc/refdb/refdbdrc? Does Debian distinguish  
between sqlite and sqlite3? The latter would be a better default btw.

regards,
Markus

--

-- 
Markus Hoenicka
markus.hoenicka <at> cats.de
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
(Continue reading)

Stefan Schlee | 25 Sep 15:50 2009
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Hallo!

Thank you for your immediate reply!

Torsten Bronger writes:

> Du you use the latest version on
> <https://launchpad.net/~bronger/+ppa-packages>?  I switched to the
> SVN version three weeks ago.  It contains
> 
>     Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6),
>      openjade, docbook-dsssl, docbook-xml, jadetex, texlive-base-bin, fop,
>      libbtparse0, libtext-iconv-perl, libmarc-record-perl, libxml-parser-perl,
>      libcgi-pm-perl, coreutils, libreadline5, libxml2-utils, xml-core, libncurses5,
>      libdbi0, libdbd-sqlite, libexpat1
>     Recommends: mysql-server (>= 3.23) | postgresql (>= 7.1) | libsqlite0 (>= 2.8) |
>      libsqlite3-0 (>= 3), libdbd-mysql | libdbd-pgsql | libdbd-sqlite3

I downloaded it from <https://launchpad.net/~bronger/+archive/ppa/+packages>.  The package name
with full version/revision information is : "refdb_0.9.9.0~svn471-7ubuntu1".  So, although the
web-address is not exactly the same I assume that I have used the latest package build.  The contents of
the "Depends:" and "Recommends:" is as you state it.

By the way, although I complaint in my original post I did not thank Torsten for providing the source package
... it has been (see below) of great help!

Markus Hoenicka writes:

> Stefan, could you please post the contents of /etc/refdb/refdbdrc?
> Does Debian distinguish between sqlite and sqlite3?
(Continue reading)

Torsten Bronger | 25 Sep 16:38 2009
X-Face
Picon
Picon
Picon
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Hallöchen!

Stefan Schlee writes:

> [...]
>
>> Stefan, could you please post the contents of
>> /etc/refdb/refdbdrc?  Does Debian distinguish between sqlite and
>> sqlite3?
>
> This notion has set me on the right track:
>
>  - Debian DOES distinguish between sqlite and sqlite3. 
> Accordingly I installed the package "libdbd-sqlite3" which IS
> listed in Torsten's source package but only under "Recommends:"
> and not under "Depends:" (though the package "libdbd-sqlite" is
> listed there).

So I should swap libdbd-sqlite3 and libdbd-sqlite between
"Recommends" and "Depends"?

Tschö,
Torsten.

--

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bronger <at> jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com

------------------------------------------------------------------------------
(Continue reading)

Markus Hoenicka | 25 Sep 17:21 2009
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Quoting Torsten Bronger <bronger <at> physik.rwth-aachen.de>:

>
> So I should swap libdbd-sqlite3 and libdbd-sqlite between
> "Recommends" and "Depends"?
>

Yes, this is what I'd recommend. SQLite 2.x is stable but fairly old,  
and I guess most SQLite users have moved to 3.x.

regards,
Markus

--

-- 
Markus Hoenicka
markus.hoenicka <at> cats.de
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
Markus Hoenicka | 25 Sep 17:25 2009
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Quoting Stefan Schlee <stefan_schlee <at> yahoo.com>:

>
>  - Debian DOES distinguish between sqlite and sqlite3.  Accordingly  
> I installed the package "libdbd-sqlite3" which IS listed in  
> Torsten's source package but only under "Recommends:" and not under  
> "Depends:" (though the package "libdbd-sqlite" is listed there).
>

As mentioned previously, I'd recommend to make the package depend on  
libdbd-sqlite3. SQLite 2.x is supported only for backwards  
compatibility, but I doubt that many people use 2.x these days.

>  - In addition to that I had to incorporate a symbolic link into the  
> /etc/refdb that pointed to the appropriate configuration file for  
> this case: "ln -s refdbdrc.sqlite3.example refdbdrc".
>

I don't know how Torsten handles these issues, but to end up with a  
working RefDB installation some post-install setup is mandatory. I  
guess that most if not all of this setup stuff could be handled by the  
package installation procedure. 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. I'd greatly  
appreciate if you could provide some feedback how far this script is  
going to take you. In any case, it is supposed to create the config  
file which you found missing as well as the main database, see below.  
The config script is copied from the appropriate .example file to  
avoid overwriting local customizations during "make install".
(Continue reading)

Torsten Bronger | 26 Sep 14:20 2009
X-Face
Picon
Picon
Picon
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Hallöchen!

Markus Hoenicka writes:

> Quoting Stefan Schlee <stefan_schlee <at> yahoo.com>:
>
> [...]
>
>>  - In addition to that I had to incorporate a symbolic link into
>> the /etc/refdb that pointed to the appropriate configuration file
>> for this case: "ln -s refdbdrc.sqlite3.example refdbdrc".
>
> I don't know how Torsten handles these issues, but to end up with
> a working RefDB installation some post-install setup is
> mandatory. I guess that most if not all of this setup stuff could
> be handled by the package installation procedure. Please have a
> look at the refdb-init script [...]

There are already post-installation scripts, however, they don't
cover this.  So far, I only have been able to provide an
unconfigured RefDB.  See the README file in the debian/ directory
<http://bazaar.launchpad.net/~bronger/%2Bjunk/package-refdb-svn/annotate/head%3A/debian/README.Debian>.
I quote:

    After having installed RefDB, there is no configuration file.
    So RefDB works in SQLite mode.  I haven't tested yet whether
    this actually works.  For example, I don't know which file RefDB
    tries to write in this status.  Maybe it's a file in /usr/local,
    which will probably fail.

(Continue reading)

Stefan Schlee | 28 Sep 12:25 2009
Picon

Build Debian bin pkg from Ubunt scr pkg

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.)
(Continue reading)

Markus Hoenicka | 29 Sep 00:50 2009
Picon

Re: Build Debian bin pkg from Ubunt scr pkg

Torsten Bronger writes:
 > 
 > There are already post-installation scripts, however, they don't
 > cover this.  So far, I only have been able to provide an
 > unconfigured RefDB.  See the README file in the debian/ directory
 > <http://bazaar.launchpad.net/~bronger/%2Bjunk/package-refdb-svn/annotate/head%3A/debian/README.Debian>.

Thanks for reminding me. I think I have perused this one before.

 > 
 > If it is possible, I suggest to rely on refdb-init instead of
 > providing a pre-installed configuration file.  A working refdb-init
 > would be very helpful.  Maybe it works already, but I don't know.
 > 
 > Theoretically, the features of refdb-init can be realised
 > interactively in the post-installation script although I dislike
 > programs prompting me after I installed them (so far, only *very*
 > few programs make use of this possibility on Ubuntu).
 > 

This is a good point as it breaks unattended installations/upgrades.

 > My idea was to have refdbd at least running, even if in a precarious
 > mode of operation.  The problem is that Debian's packaging tool
 > wants to start refdbd after the installation and if this fails, the
 > whole installation is marked to have failed.  It's okay if refdbd
 > doesn't do anything but emitting error messages if connected, but it
 > must run.
 > 

(Continue reading)


Gmane