ossobv / bcg729-deb

(obsolete) Debian/Ubuntu package for the Bcg729 G.729 codec library
Other
14 stars 17 forks source link

Failed to build on Ubuntu: "no upstream tarball found" #3

Closed guss77 closed 6 years ago

guss77 commented 6 years ago

After following the directions in the README on Ubuntu 18.04, I get this error from dpkg-buildpackage:

$ dpkg-buildpackage -us -uc
dpkg-buildpackage: info: source package bcg729
dpkg-buildpackage: info: source version 1.0.4-0osso1+deb9
dpkg-buildpackage: info: source distribution stretch
dpkg-buildpackage: info: source changed by Walter Doekes <wjdoekes+bcg729@osso.nl>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build src
dpkg-source: info: using options from src/debian/source/options: --extend-diff-ignore=^test/testCampaign(All)?$|^test/bcg729-patterns\.zip$
dpkg-source: info: applying codebookqLSF-1.0.4+1.patch
dpkg-source: info: applying bestIntPitchDelay-1.0.4+2.patch
dpkg-source: info: applying patterns-md5-1.0.4+3.patch
dpkg-source: info: applying enable-subdir-objects.patch
dpkg-source: info: applying version.patch
dpkg-source: info: applying fix-tests.patch
 debian/rules clean
dh clean --parallel \
        --with autotools-dev --with autoreconf \
        --buildsystem=autoconf
dh: The autotools-dev sequence is deprecated and replaced by dh in debhelper (>= 9.20160115)
dh: This feature will be removed in compat 12.
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/app/src'
# Make sure README exists for Makefile.am DIST_COMMON files.
# See also autogen.sh.
touch ChangeLog README
dh_auto_clean
make[1]: Leaving directory '/app/src'
   dh_autotools-dev_restoreconfig -O--parallel -O--buildsystem=autoconf
dh_autotools-dev_restoreconfig: dh_autotools-dev_restoreconfig is deprecated; please see dh_autotools-dev_restoreconfig(1) for a replacement
dh_autotools-dev_restoreconfig: This feature will be removed in compat 12.
   dh_clean -O--parallel -O--buildsystem=autoconf
 dpkg-source -b src
dpkg-source: info: using options from src/debian/source/options: --extend-diff-ignore=^test/testCampaign(All)?$|^test/bcg729-patterns\.zip$
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../bcg729_1.0.4.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b src subprocess returned exit status 255
The command '/bin/sh -c dpkg-buildpackage -us -uc' returned a non-zero code: 255
Makefile:6: recipe for target 'package' failed
make[1]: *** [package] Error 255
make[1]: Leaving directory '/home/odeda/Documents/Projects/greenfield-public/rtpengine/bcg729'
Makefile:4: recipe for target 'bcg729' failed
make: *** [bcg729] Error 2

I workaround the problem by running cd .. && tar -zcf bcg729_1.0.4.orig.tar.gz bcg729-1.0.4

I'm pretty sure there's a way to build deb package directly from a source directory without artificially faking an "upstream tarball", but in 2 hours of Google/StackExchange searching I didn't find a solution and the Debian packaging tutorials are horrible if you want something other than "download upstream tarball, 1, 2, 3, it is built".

wdoekes commented 6 years ago

I understand your frustration, but I'm pretty sure it's documented in the 20-odd line README file that you need the orig.gz:

https://github.com/ossobv/bcg729-deb/blame/master/README.rst#L9

I'm sorry, but instead of googling for 2 hours, following the README would've been quicker. There is no need to "fake the source file". Just give it the name debian wants, like dpkg-source says (an "upstream tarball", i.e. the original).

No excuses this time. Go sit in the RTFM-corner :stuck_out_tongue_winking_eye:

guss77 commented 6 years ago

I see. I didn't understand why the README is downloading a tarball instead of cloning the repo or streaming it directly to the file system. Now I understand, thanks for the explanation.