1

I'm trying to build a Debian package. When I tried to build it again, it failed.

I have:

  1. /home/debpackage/debianpackage_1.0.orig.tar.gz
  2. the tar above contains a folder named debianpackage-1.0/ (all sorts of packages in it)
  3. I extracted the tar and now I have /home/alon/debpackage/debianpackage_1.0.orig.tar.gz /home/alon/debpackage/debianpackage-1.0/ (all the files that were extracted)

  4. in /home/alon/debpackage/debianpackage-1.0/, I created a folder called "debian"

  5. in /home/alon/debpackage/debianpackage-1.0/ I have: ./debian/changelog/copyright (empty) ./debian/changelog/rules ./debian/changelog/changelog ./debian/changelog/compact (contains "8") ./debian/changelog/control ./debian/changelog/source/format (contains 3.0 (quilt) )

rules contains:

#!/usr/bin/make -f %: dh $@ override_dh_auto_install: $(MAKE) DESTDIR=$$(pwd)/debian/debianpackage prefix=/usr install 

when I try to run ./debian/debuild -us -uc, I get:

dpkg-buildpackage -rfakeroot -D -us -uc dpkg-buildpackage: warning: using a gain-root-command while being root dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions dpkg-buildpackage: source package debianpackage dpkg-buildpackage: source version 1.0-1 dpkg-buildpackage: source changed by root <[email protected]> dpkg-source --before-build debianpackage-1.0 dpkg-buildpackage: host architecture amd64 fakeroot debian/rules clean dh clean dh: Compatibility levels before 5 are deprecated. dh_testdir dh_auto_clean dh_auto_clean: Compatibility levels before 5 are deprecated. dh_clean dh_clean: Compatibility levels before 5 are deprecated. dpkg-source -b debianpackage-1.0 dpkg-source: info: using source format `3.0 (quilt)' dpkg-source: info: building debianpackage using existing ./debianpackage_1.0.orig.tar.gz dpkg-source: info: building debianpackage in debianpackage_1.0-1.debian.tar.gz dpkg-source: info: building debianpackage in debianpackage_1.0-1.dsc debian/rules build dh build dh: Compatibility levels before 5 are deprecated. dh_testdir dh_auto_configure dh_auto_configure: Compatibility levels before 5 are deprecated. dh_auto_build dh_auto_build: Compatibility levels before 5 are deprecated. dh_auto_test dh_auto_test: Compatibility levels before 5 are deprecated. fakeroot debian/rules binary dh binary dh: Compatibility levels before 5 are deprecated. dh_testroot dh_prep dh_prep: Compatibility levels before 5 are deprecated. dh_installdirs dh_installdirs: Compatibility levels before 5 are deprecated. debian/rules override_dh_auto_install make[1]: Entering directory `/home/alon/debpackage/debianpackage-1.0' /usr/bin/make DESTDIR=$(pwd)/debian/debianpackage prefix=/usr install make[2]: Entering directory `/home/alon/debpackage/debianpackage-1.0' make[2]: *** No rule to make target `install'. Stop. make[2]: Leaving directory `/home/alon/debpackage/debianpackage-1.0' make[1]: *** [override_dh_auto_install] Error 2 make[1]: Leaving directory `/home/alon/debpackage/debianpackage-1.0' make: *** [binary] Error 2 dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 debuild: fatal error at line 1335: dpkg-buildpackage -rfakeroot -D -us -uc failed 

Any ideas?

0

3 Answers 3

1

it seems like the makefile of your upstream sources ("debianpackage-1.0") has not install target, but in the override_dh_auto_install target of debian/rules you explicitely call make install

possible solutions:

  • add an install target to debianpackage-1./Makefile

    if you are not upstream, you should do this via a path in debian/patches

  • use the override_dh_auto_install target to manually install the files to their proper place

btw, why do you override dh_auto_install in the first place? it seems that you are not adding anything, that isn't called automatically.

Sign up to request clarification or add additional context in comments.

Comments

1

Why is your debian/changelog a directory? You're not supposed to have debian/changelog/rules and debian/changelog/changelog etc. It's just supposed to be debian/changelog (regular file), debian/rules, debian/control ... something bad has happened to your directory structure.

You should cd debian; mv changelog oopsdir; mv -i oopsdir/* .;rmdir oopsdir

Or just kill the whole thing and start over, since you can't know that the disaster which caused changelog to become a directory didn't affect anything else.

Comments

0

I usually exprience this error if I run cmake in the source before debuild. debuild/dpkg-buildpackage is very particular in that it needs to be run on a clean source. I'd suggest you try to generate the debian folder and its contents by using dh_make --createorig on a clean source instead of creating it manually. There after debuild should work without any problems unless the creater of the sources archive included compiled code or auto-generated files in it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.