What does “dpkg-buildpackage -rfakeroot -d -us -uc -S failed” mean

dpkgpackaging

I was trying to build a simple Debian package,
I did these steps with user root:


First, I downloaded the upstream tarball, then:

 $ mv hithere-1.0.tar.gz hithere_1.0.orig.tar.gz

Then:

 $ tar xf hithere_1.0.orig.tar.gz

After that:

 $ cd hithere-1.0
 $ dch --create -v 1.0-1 --package hithere 
 $ cd debian/
 $ rm *.ex *.EX

Then I edited "control file" and "copyright file":

 $ nano control
 $ nano copyright


 $ cd ..
 $ debuild -S

After the last command, This error was generated:

root@mehrnaz-MS-A934:/home/fabdollahei/hithere-1.0# debuild -S dpkg-buildpackage -rfakeroot -d -us -uc -S
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package hithere
dpkg-buildpackage: source version 1.0-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by root <f.abdollahei@itrc.ac.ir>
dpkg-source --before-build hithere-1.0
dpkg-source: error: syntax error in hithere-1.0/debian/control at line 15: block lacks the 'Package' field
dpkg-buildpackage: error: dpkg-source --before-build hithere-1.0 gave error exit status 255
dpkg-source: error: syntax error in hithere-1.0/debian/control at line 15: block lacks the 'Package' field
dpkg-buildpackage: error: dpkg-source --before-build hithere-1.0 gave error exit status 255
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -d -us -uc -S failed

How do I get rid of that fatal error?

Best Answer

The message is just saying that dpkg-buildpackage command failed. If you read the messages you will notice where's the problem right away:

dpkg-source: error: syntax error in hithere-1.0/debian/control at line 15:
block lacks the 'Package' field
dpkg-buildpackage: error: dpkg-source --before-build hithere-1.0 gave error exit status 255

If you fix that (and maybe other problems it has, that could show up later) it should work.

Related Question