3

I'm trying to package an already compiled set of binaries including doc, header files, usage examples, etc...

The installation instruction of the original binaries recommends to just copy all files to a directory below /usr

So I've made the following debian/install:

bin/* /usr/tigcc/bin
doc/* /usr/tigcc/doc
examples/* /usr/tigcc/examples
include/* /usr/tigcc/include
lib/* /usr/tigcc/lib
projects/* /usr/tigcc/projects

Now I'm using debuild -uc -us -sa to generate the .deb file. I'm confronted with this error:

 dpkg-genchanges -sa >../tigcc_0.95-0ubuntu2_amd64.changes
dpkg-genchanges: Fehler: Dateienliste-Datei kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
#translation: error: couldn't read file list file: File or directory not found

Why am I getting this error? What am I doing wrong?

Edit: debian/rules

#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

%:
        dh $@

(default from some packaging guide)

Edit: ls -lhR debian

debian:
total 36K
-rw-rw-r-- 1 sebastian sebastian  147 Feb 22 15:45 changelog
-rw-rw-r-- 1 sebastian sebastian    2 Feb 21 23:46 compat
-rw-rw-r-- 1 sebastian sebastian  454 Feb 23 12:43 control
-rw-rw-r-- 1 sebastian sebastian 1.2K Feb 23 12:19 copyright
-rw-rw-r-- 1 sebastian sebastian  148 Feb 26 21:39 install
-rw-rw-r-- 1 sebastian sebastian  102 Feb 23 12:13 postinst
-rw-rw-r-- 1 sebastian sebastian   79 Feb 23 12:13 preinst
-rwxr-xr-x 1 sebastian sebastian   85 Feb 26 21:39 rules
drwxrwxr-x 2 sebastian sebastian 4.0K Feb 21 23:11 source

debian/source:
total 4.0K
-rw-rw-r-- 1 sebastian sebastian 12 Feb 21 23:11 format

EDIT: I tried to create a file debian/files, just because I somehow thought it might help. The error vanished, but debuild just said "nothing to build" a few times and finished without generating a package at all.


Edit: Following the request of one of the people trying to help me, I'm now supplying links to the files used.

The original binaries can be found here, the stuff below debian here.

NOTE: These link point directly to tar archives.

s3lph
  • 14,314
  • 11
  • 59
  • 82

2 Answers2

1

Remove the preceding / character in the /usr/tigcc/… statements in the install file.

Also, you should either make that be opt/tigcc/… or remove the tigcc bit and install them properly integrated into the FHS standard paths, depending on what the binaries are compiled to expect exactly.

Also, add --fail-missing as an argument to dh, like:

%:
    dh $@ --fail-missing

This will cause the build to fail when installed files are not included in the package.

dobey
  • 40,982
0

OK, I will suggest a hackish workaround. Make a backup, then get rid of install, postinstall, preinstall. Then in rules add the following at the end of the file:

override_dh_auto_install:
dh_auto_install
    mkdir debian/packagename
    mv bin/* debian/packagename/usr/tigcc/bin
    mv doc/* debian/packagename/usr/tigcc/doc
    mv examples/* debian/packagename/usr/tigcc/examples
    mv include/* debian/packagename/usr/tigcc/include
    mv lib/* debian/packagename/usr/tigcc/lib
    mv projects/* debian/packagename/usr/tigcc/projects

Then make a copy of the entire dir containing the debian folder and the rest of the pre-compiled binaries, and on that try to build binaries by using debuild -b -us -uc. I suspect that this should work, but make sure that all the paths are correct and that all file move operations proceed as expected.


UPDATE:

I played with the linked binaries and debian dir. I had to adjust the file names, the folder structure and the control and rules directives.

To reproduce the .deb, you need to unpack the binary archive, unpack the debian dir within the extracted tigcc dir, then run debuild -b -us -uc from within the debian folder. Put both archives in a temporary folder, then:

bzip2 -d -c "tigcc-0.95_orig.tar.bz2" | tar -xf - 
cd tigcc/
tar -zxf  "../tigcc-debian.tar.gz"
cd debian/
debuild -b -us -uc
ls -l ../../*deb

Unless you have some missing dependencies, I don't see why this wouldn't work.

landroni
  • 5,941
  • 7
  • 36
  • 58
  • It shows the same error... – s3lph Mar 05 '14 at 15:14
  • OK, then you need to provide a link to the pre-compiled binaries, and to the tar.gz of the debian dir. Otherwise it's a lot of guesswork, and perhaps something is simply to placed in the correct dir. – landroni Mar 05 '14 at 15:36
  • @the_Seppi I've now posted the .deb and the archives with the necessary folder/file structure to make it work. Inspect at leisure and feel free to ask questions. – landroni Mar 06 '14 at 13:56
  • Followed all your instructions, still dpkg-genchanges: error: cannot read files list file: No such file or directory – s3lph Mar 06 '14 at 20:18
  • See updated post. – landroni Mar 06 '14 at 21:22
  • I read the manpage of the error-producing command, and it says it needs the debian/files. Should this file be created by debuild or do I have to do so manually? – s3lph Mar 07 '14 at 06:47
  • I'm no expert, but as far as I can see there is no need for debian/files in the original debian dir. I maintain various packages, and there is no such file in them. This file does appear though when you try to build the binaries using debuild -b -us -uc. In any case, the .deb package creation works just fine here under 12.04, as indicated in the answer. – landroni Mar 07 '14 at 07:35