5

I'm author of a small open-source database library and want to supply .deb packages through my ppa. I have a couple of problems. I followed the documentation and several tutorials and created a debian/ directory, but when I run 'dpkg-buildpackage -rfakeroot' i get the following error:

dh_install: hamsterdb-dev missing files (usr/lib/pkgconfig/*), aborting
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

do I have to supply a /usr/lib/pkgconfig/hamsterdb-dev.pc?

During the build process, the unittests are started and many files are created or modified. When i run dpkg-buildpackage again then i get many errors, here are excerpts:

dpkg-source: error:   old version is plain file
dpkg-source: error: cannot represent change to hamsterdb/install-sh:
dpkg-source: error:   new version is symlink to /usr/share/automake-1.11/install-sh
dpkg-source: error:   old version is plain file

or these:

dpkg-source: error: cannot represent change to tools/tests/db1.db: binary file contents changed
dpkg-source: error: add tools/tests/db1.db in debian/source/include-binaries if you want to store the modified binary in the debian tarball
dpkg-source: warning: executable mode 0775 of 'tools/tests/export_import.sh' will not be represented in diff
dpkg-source: warning: executable mode 0775 of 'tools/tests/ham_dump/generate.sh' will not be represented in diff
dpkg-source: warning: executable mode 0775 of 'tools/tests/ham_dump/compare.sh' will not be represented in diff
dpkg-source: warning: executable mode 0775 of 'tools/tests/ham_info/generate.sh' will not be represented in diff
dpkg-source: warning: file hamsterdb/documentation/latex/namespacehamsterdb.tex has no final newline (either original or modified version)
dpkg-source: warning: file hamsterdb/documentation/latex/index.tex has no final newline (either original or modified version)
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b hamsterdb gave error exit status 2

Is there a way to "force" the generation of a deb file? Or simply to ignore those "unrepresentable changes to source" errors?

I managed to fix the errors that I listed above, but now I run into another one (might also be caused by my lack of knowledge regarding automake). debuild runs "libtool" on the library sources, but does not create any output files (at least I do not find any). And building the sample then fails with an error:

make[3]: Entering directory `/home/chris/prj/hamsterdb/samples'
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -I../include -I../include   -g -O2 -Wall -DHAM_LITTLE_ENDIAN -fno-tree-vectorize -D_FILE_OFFSET_BITS=64 -c db1.c
make[3]: *** No rule to make target `../src/libhamsterdb.la', needed by `db1'.  

This is how i invoke the build command:

db1_SOURCES     = db1.c
db1_LDADD       = $(top_builddir)/src/libhamsterdb.la

The libhamsterdb.la is indeed missing.

3
  • 1
    The first output error can be solved, see this explanation. In that section you will find the solution.
    – Lucio
    Jan 2, 2013 at 22:06
  • 1
    Any reason for calling dpkg-buildpackage directly? I would recommend using debuild instead. This won't solve your problem, though, as it calls the same hook here. See also this answer of me and the instructions on Launchpad.
    – gertvdijk
    Jan 2, 2013 at 22:10
  • Also, this stackoverflow answer could be useful for you. Sorry, but I don't give you much more information because I don't know too much about building packages.
    – Lucio
    Jan 2, 2013 at 22:15

1 Answer 1

6

do i have to supply a /usr/lib/pkgconfig/hamsterdb-dev.pc?

If you listed it in debian/hamsterdb-dev.install, then yes. It's not going to appear out of thin air.

During the build process, the unittests are started and many files are created or modified.

The created files are easy to deal with, you just delete them in the clean rule, by listing them in debian/clean.

As to modifying files, you have a few options. If they can be re-created from scratch, delete them in clean. dpkg-source ignores deleted files. Otherwise, you have to figure out how to not modify them, or undo the modifications.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .