Building a Debian package using the OBS: how to use tarballs for upstream source and packaging files

Hi,

I would like to build Debian packages in my vim-debian OBS package using a vim_8.0.0194-1.debian.tar.xz file (which contains the rules file, control file, etc.), debian.dsc file and a vim_8.0.0194.orig.tar.gz file (which contains the upstream source for the Vim release being packaged). The problem is that whenever I try to build a Debian package using these source files I get the error:


  124s] SIOCSIFADDR: File exists
  124s] Running build time source services...
  124s] Found files matching debian.*, running debian transformer...
  124s] release: (9.1), release (DEB) (9.1)
  124s] Too many files looking like a usable source tarball (would not know which to pick): vim_8.0.0194-1.debian.tar.xz v8.0.0194.tar.gz
  124s] ** Started: debtransform --release 9.1 //usr/src/packages/SOURCES //usr/src/packages/SOURCES/debian.dsc //usr/src/packages/SOURCES.DEB
  124s] No DEBTRANSFORM-TAR line in the .dsc file.
  124s] Attempting automatic discovery of a suitable source archive.
  124s] debian transforming failed.

I have tried renaming vim_8.0.0194-1.debian.tar.xz as debian.tar.xz, vim.debian.tar.xz, debian.vim.tar.xz, etc. but no matter which name I use for this tarball I get this error. If you would like to see my other attempts to build this Vim package using the OBS merely look through the revision history of this package. I have also tried not using a debian.tar.xz file and just including the rules, control and other packaging files in the OBS repository but that too failed to get the build to work.

Thanks for your time,
Brenton

Trying this dsc file instead:


Format: 3.0 (quilt)
Source: vim
Binary: vim-common, vim-gui-common, vim-runtime, vim-doc, vim-tiny, vim, vim-gtk, vim-gtk3, vim-nox, vim-athena, vim-gnome, xxd, vim-gtk-py2, vim-gtk3-py2, vim-nox-py2, vim-athena-py2
Architecture: any all
Version: 2:8.0.0194-1
Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
Uploaders:  James McCoy <jamessan@debian.org>,
Homepage: http://www.vim.org/
Standards-Version: 3.9.7
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-vim/vim.git
Vcs-Git: https://anonscm.debian.org/cgit/pkg-vim/vim.git/
Build-Depends: autoconf, debhelper (>= 9), libacl1-dev, libgpmg1-dev [linux-any], libgtk-3-dev, libgtk2.0-dev, liblua5.2-dev, libperl-dev !kfreebsd-any], libselinux1-dev [linux-any], libtinfo-dev | libncurses5-dev, libxaw7-dev, libxpm-dev, libxt-dev, lua5.2, python-dev, python3-dev, ruby, ruby-dev, tcl-dev
Build-Depends-Indep: docbook-utils, docbook-xml, ghostscript, pdf2svg
Build-Conflicts: autoconf2.13, ruby1.8 (<< 1.8.7.358-8), ruby1.8-dev (<< 1.8.7.358-8)
Package-List:
 vim deb editors optional arch=any
 vim-athena deb editors extra arch=any
 vim-athena-py2 deb editors extra arch=any
 vim-common deb editors important arch=all
 vim-doc deb doc optional arch=all
 vim-gnome deb oldlibs extra arch=all
 vim-gtk deb editors extra arch=any
 vim-gtk-py2 deb editors extra arch=any
 vim-gtk3 deb editors extra arch=any
 vim-gtk3-py2 deb editors extra arch=any
 vim-gui-common deb editors optional arch=all
 vim-nox deb editors extra arch=any
 vim-nox-py2 deb editors extra arch=any
 vim-runtime deb editors optional arch=all
 vim-tiny deb editors important arch=any
 xxd deb editors extra arch=any
Files:
 fea26e82ce574a78dbb345bcc84c5822 20 vim_8.0.0194.orig.tar.gz
 1fbafad31fad67228553c5b4be297b37 155452 vim_8.0.0194-1.debian.tar.xz
DEBTRANSFORM-TAR:
 vim_8.0.0194.orig.tar.gz
 vim_8.0.0194-1.debian.tar.xz

with a _service file that downloads the upstream source code tarball and names it vim_8.0.0194.orig.tar.gz also fails giving the error:


   38s] Running build time source services...
   38s] Found files matching debian.*, running debian transformer...
   38s] ** Started: debtransform /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/debian.dsc /var/tmp/build-root/Debian_8.0-x86_64/
usr/src/packages/SOURCES.DEB
   38s] No DEBTRANSFORM-FILES-TAR line in the .dsc file.
   38s] Attempting automatic discovery of a debian archive.


   38s] Stripped epoch from Version field, which is now "8.0.0194-1".
   38s] converting /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/vim_8.0.0194.orig.tar.gz
   38s] vim_8.0.0194-1.debian.tar.xz to vim_8.0.0194.orig.tar.gz
   38s] vim_8.0.0194-1.debian.tar.gz
   38s] xz: /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/vim_8.0.0194.orig.tar.gz
   38s] vim_8.0.0194-1.debian.tar.xz: No such file or directory
   38s] Moving /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/vim_8.0.0194.orig.tar.gz
   38s] vim_8.0.0194-1.debian.tar.gz to /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194.orig.tar.gz
   38s] files 6f70ba51ac4bd160d78f7f8c7e6e6738 20 vim_8.0.0194.orig.tar.gz
   38s] Scanning /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194.orig.tar.gz...
   38s] Generating /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194-1.diff
   38s] Processing file "/var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/debian.dsc"...
   38s] Writing /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194-1.dsc
   38s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES.DEB/vim_8.0.0194-1.dsc)
   38s] dpkg-source: info: extracting vim in /usr/src/packages/BUILD
   38s] dpkg-source: info: unpacking vim_8.0.0194.orig.tar.gz
   39s] tar: This does not look like a tar archive
   39s] tar: Exiting with failure status due to previous errors
   39s] dpkg-source: error: tar --no-same-owner --no-same-permissions -xf - gave error exit status 2
   39s] -----------------------------------------------------------------
   39s] ----- building debian.dsc (user abuild)
   39s] -----------------------------------------------------------------
   39s] -----------------------------------------------------------------
   39s] -su: line 0: cd: /usr/src/packages/BUILD: No such file or directory
   39s]
   39s] fusion809-pc failed "build debian.dsc" at Mon Jan 16 04:35:15 UTC 2017.
   39s]

likewise omitting the debian.tar.xz lines in this dsc file gives the error:


   39s] ** Started: debtransform /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/debian.dsc /var/tmp/build-root/Debian_8.0-x86_64/
usr/src/packages/SOURCES.DEB
   39s] No DEBTRANSFORM-FILES-TAR line in the .dsc file.
   39s] Attempting automatic discovery of a debian archive.
   39s] Stripped epoch from Version field, which is now "8.0.0194-1".
   39s] Hardlinking /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/vim_8.0.0194.orig.tar.gz to /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194.orig.tar.gz
   39s] files fea26e82ce574a78dbb345bcc84c5822 12958475 vim_8.0.0194.orig.tar.gz
   39s] Scanning /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194.orig.tar.gz...
   39s] Generating /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194-1.diff
   39s] Processing file "/var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES/debian.dsc"...
   39s] Writing /var/tmp/build-root/Debian_8.0-x86_64/usr/src/packages/SOURCES.DEB/vim_8.0.0194-1.dsc
   39s] dpkg-source: warning: extracting unsigned source package (/usr/src/packages/SOURCES.DEB/vim_8.0.0194-1.dsc)
   39s] dpkg-source: info: extracting vim in /usr/src/packages/BUILD
   39s] dpkg-source: info: unpacking vim_8.0.0194.orig.tar.gz
   40s] dpkg-source: info: applying vim_8.0.0194-1.diff.gz
   40s] dpkg-source: warning: /usr/src/packages/BUILD/debian/rules does not exist
   40s] -----------------------------------------------------------------
   40s] ----- building debian.dsc (user abuild)
   40s] -----------------------------------------------------------------
   40s] -----------------------------------------------------------------
   40s] tail: cannot open 'debian/changelog' for reading: No such file or directory
   40s] dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1
   40s]
   40s] fusion809-pc failed "build debian.dsc" at Mon Jan 16 04:37:48 UTC 2017.
   40s]

how am I meant to build this thing?

I’ve had success regenerating the source files with this command after placing the debian folder inside the source (requires devscripts)

debuild -S -uc -us