Subject: Problem with dpkg-source -b outside current working dir

From: Malte Forkel <[email-masked]>
Date: Sat, 17 Sep 2016 10:33:29 +0200

Hi,

according to the man page, dpkg-source -b takes an argument that is "the
 name  of the directory containing the debianized source tree". But that
does not work for me if the directory is not the current working directory.

When is execute dpkg-source in the package's source directory, i.e.
   SRCDIR$ dpkg-source -b .
everything works fine. But if I execute dpkg-source from a different
directory with the absolute path as its argument
   /tmp$ dpkg-source -b $SRCDIR
it complains that can't find the original tarball at
../pkg_vers.orig.tar.*. Shouldn't it look into $SRCDIR/..?

Im using dpkg-source from dpkg-dev 1.18.4ubuntu1.1 in Ubuntu 16.04.

Thanks, Malte

---

From: kamaraju kusumanchi <[email-masked]>
Date: Tue, 20 Sep 2016 01:33:48 -0400

> ../pkg_vers.orig.tar.*. Shouldn't it look into $SRCDIR/..?

Is the $SRCDIR variable set to anything? What is the output of

echo $SRCDIR

> Im using dpkg-source from dpkg-dev 1.18.4ubuntu1.1 in Ubuntu 16.04.

As explained in the FAQ
(https://www.debian.org/doc/manuals/debian-faq/ch-choosing.en.html#s3.2),
Ubuntu is based on Debian but not Debian. If you are running Ubutnu,
it is better to ask on Ubuntu list than here.

thanks
raju
-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

---

From: Malte Forkel <[email-masked]>
Date: Tue, 20 Sep 2016 13:39:50 +0200

> Is the $SRCDIR variable set to anything? What is the output of
Sorry for the confusion. I just used SRCDIR as a placeholder for the
real directory name in my example. And I should have written SRCDIR
(instead of $SRCDIR) in the second part to make that clear.

> it is better to ask on Ubuntu list than here.
True. But I don't think there should be a difference in the
implementation of dpkg-source

---

From: kamaraju kusumanchi <[email-masked]>
Date: Wed, 21 Sep 2016 00:04:26 -0400

> (instead of $SRCDIR) in the second part to make that clear.

It seems to be working fine for me

// Create two empty directories and download source into one of them
rajulocal@hogwarts ~/x % mkdir x1 x2
rajulocal@hogwarts ~/x % cd x1
rajulocal@hogwarts ~/x/x1 % apt-get source python-popcon
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'python-popcon' packaging is maintained in the 'Git' version
control system at:
git://github.com/venthur/python-popcon.git
Need to get 5,429 B of source archives.
Get:1 http://httpredir.debian.org/debian/ jessie/main python-popcon
1.1 (dsc) [1,489 B]
Get:2 http://httpredir.debian.org/debian/ jessie/main python-popcon
1.1 (tar) [3,940 B]
Fetched 5,429 B in 0s (15.2 kB/s)
dpkg-source: info: extracting python-popcon in python-popcon-1.1
dpkg-source: info: unpacking python-popcon_1.1.tar.gz
rajulocal@hogwarts ~/x/x1 % ls
python-popcon-1.1/  python-popcon_1.1.dsc  python-popcon_1.1.tar.gz

// Now to go the other directory and run dpkg-source based on the
previously unpacked source.
rajulocal@hogwarts ~/x/x1 % cd ../x2
rajulocal@hogwarts ~/x/x2 % dpkg-source -b
dpkg-source: --build needs a directory

Use --help for program usage information.
rajulocal@hogwarts ~/x/x2 % dpkg-source -b ../x1/python-popcon-1.1
dpkg-source: info: using source format `3.0 (native)'
dpkg-source: info: building python-popcon in python-popcon_1.1.tar.xz
dpkg-source: info: building python-popcon in python-popcon_1.1.dsc
rajulocal@hogwarts ~/x/x2 % ls
python-popcon_1.1.dsc  python-popcon_1.1.tar.xz

>From the man page of dpkg-source, I see that this option was added in
dpkg 1.17.14. Could you please tell which version you are using? In my
case it is

% dpkg --version
Debian `dpkg' package management program version 1.17.27 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.

thanks
raju

---

From: Malte Forkel <[email-masked]>
Date: Wed, 21 Sep 2016 11:21:20 +0200

> python-popcon_1.1.dsc  python-popcon_1.1.tar.xz
Your example works for me too. But you are using a native package, so
there is no original archive in the parent directory that dpkg-source
would have to access. May be you could try another package, e.g. fuse,
which is not a native package?

malte@ubuntu64_vb:~/x2$ dpkg-source -b ../x1/fuse-2.9.4/
pkg-source: info: using options from
../x1/fuse-2.9.4/debian/source/options: --compression=xz
dpkg-source: error: can't build with source format '3.0 (quilt)': no
upstream tarball found at ../fuse_2.9.4.orig.tar.{bz2,gz,lzma,xz}

> later for copying conditions. There is NO warranty.
My version of dpkg is 1.18.4ubuntu1

Thanks, Malte

---

From: Lisi Reisz <[email-masked]>
Date: Tue, 20 Sep 2016 16:10:27 +0100

On Tuesday 20 September 2016 12:39:50 Malte Forkel wrote:
> > On Sat, Sep 17, 2016 at 4:33 AM, Malte Forkel <[email-masked]>
>
> wrote:
> >> Hi,
> >>
> >> does not work for me if the directory is not the current working
>
> directory.
>

There only has to be a minor tweak and it would/could make a difference.  If 
you do not acknowledge this possibility, why tell us which version you are 
using??

Lisi