Bug#863582: Allow configurable build directory

2017-06-19 Thread Ian Jackson
Sean Whitton writes ("Bug#863582: Allow configurable build directory"):
> On Sun, Jun 18, 2017 at 07:47:14PM -0700, Russ Allbery wrote:
> > Even with that flag, dgit writes some (but not all) of its output files in
> > the parent directory (pieces of the source package and the downloaded dsc
> > file of the previous release), and then aborts because it can't find the
> > right files.  It appears to be doing pieces of the build outside of
> > gbp-buildpackage, since I know gbp-buildpackage will always write all of
> > its files in my configured export-dir.
> 
> I suspect that's exactly what's happening.  I think we now have two
> bugs.
> 
> 1. --build-products-dir makes dgit /read/ build products from a new dir,
>but it should probably also write the source package it generates to
>that dir

Yes.

Also, this codepath is far from well-tested.  I'm afraid that due to
my prevailing mental model (which doesn't contain something like gbp's
`export-dir') I have probably perpetrated many bugs where it's not
honoured.

> 2. even if Ian wants to have dgit continue to put generated source
>packages in .. no matter what, it needs to be able to read them from
>.., even when --builds-products-dir points somewhere else.

This kind of hybrid approach would be asking for trouble.

Ian.



Bug#863582: Allow configurable build directory

2017-06-18 Thread Sean Whitton
On Sun, Jun 18, 2017 at 07:47:14PM -0700, Russ Allbery wrote:
> > % dgit --build-products-dir ~/foo gbp-build
> 
> This appears to not work.  In fact, there appears to be no way to get dgit
> to work with gbp-buildpackage if you set an export-dir in your ~/.gbp.conf
> (at least in some brief experiments).
> 
> Even with that flag, dgit writes some (but not all) of its output files in
> the parent directory (pieces of the source package and the downloaded dsc
> file of the previous release), and then aborts because it can't find the
> right files.  It appears to be doing pieces of the build outside of
> gbp-buildpackage, since I know gbp-buildpackage will always write all of
> its files in my configured export-dir.

I suspect that's exactly what's happening.  I think we now have two
bugs.

1. --build-products-dir makes dgit /read/ build products from a new dir,
   but it should probably also write the source package it generates to
   that dir

2. even if Ian wants to have dgit continue to put generated source
   packages in .. no matter what, it needs to be able to read them from
   .., even when --builds-products-dir points somewhere else.

-- 
Sean Whitton


signature.asc
Description: PGP signature


Bug#863582: Allow configurable build directory

2017-06-18 Thread Russ Allbery
Sean Whitton  writes:

> I believe that Ian's intention is that the build tool should be
> configured to put build products somewhere else, and then dgit should be
> told where they are using --build-products-dir.  I.e. you have
> ~/.gbp.conf telling gbp where to put build products, and then

> % dgit --build-products-dir ~/foo gbp-build

This appears to not work.  In fact, there appears to be no way to get dgit
to work with gbp-buildpackage if you set an export-dir in your ~/.gbp.conf
(at least in some brief experiments).

Even with that flag, dgit writes some (but not all) of its output files in
the parent directory (pieces of the source package and the downloaded dsc
file of the previous release), and then aborts because it can't find the
right files.  It appears to be doing pieces of the build outside of
gbp-buildpackage, since I know gbp-buildpackage will always write all of
its files in my configured export-dir.

I could be missing something, but I tried a few different iterations
before just giving up and using dgit build, and I couldn't figure out any
way to get all of the build product in the right location and get dgit
push to find it.

I unfortunately didn't save a full transcript of my session, but I tried:

$ dgit -wgf --build-product-dir ../build-area gbp-build
$ dgit -wgf --build-product-dir ../build-area push

and then again with expicitly setting --export-dir on the gbp-build
command line in case dgit was overriding it somehow.  My ~/.gbp.conf has:

[buildpackage]
export-dir = ../build-area/
tarball-dir = ../tarballs/

-- 
Russ Allbery (r...@debian.org)   



Bug#863582: Allow configurable build directory

2017-05-28 Thread Russ Allbery
Control: forcemerge 857316 -1 

Sean Whitton  writes:

> I believe that Ian's intention is that the build tool should be
> configured to put build products somewhere else, and then dgit should be
> told where they are using --build-products-dir.  I.e. you have
> ~/.gbp.conf telling gbp where to put build products, and then

> % dgit --build-products-dir ~/foo gbp-build

Oh!  That was the flag I was missing.  Thank you.  Could you mention
--build-products-dir in dgit-maint-gbp, since this is a very common
setting?

> Of course, it really should be possible to set a permanent
> --build-products-dir in ~/.gitconfig.  That's #857316.

> Does this fulfill your feature request?  If so, this bug should be
> merged with #857316.

Yup!  That seems fine.  Thank you!

-- 
Russ Allbery (r...@debian.org)   



Bug#863582: Allow configurable build directory

2017-05-28 Thread Sean Whitton
On Sun, May 28, 2017 at 01:38:30PM -0700, Russ Allbery wrote:
> I use git-buildpackage for all of my package building, and one reason why
> is that I deeply dislike the default Debian behavior of cluttering the
> parent directory with random package build files.  git-buildpackage has
> always supported configuring a build directory (../build-area appears to
> be common) to use for build output, where it doesn't clutter directory
> listings and can easily be purged after successful uploads.
> 
> It looks like dgit doesn't support this.

I believe that Ian's intention is that the build tool should be
configured to put build products somewhere else, and then dgit should be
told where they are using --build-products-dir.  I.e. you have
~/.gbp.conf telling gbp where to put build products, and then

% dgit --build-products-dir ~/foo gbp-build

Of course, it really should be possible to set a permanent
--build-products-dir in ~/.gitconfig.  That's #857316.

Does this fulfill your feature request?  If so, this bug should be
merged with #857316.

-- 
Sean Whitton


signature.asc
Description: PGP signature


Bug#863582: Allow configurable build directory

2017-05-28 Thread Russ Allbery
Package: dgit
Version: 3.10
Severity: wishlist

I use git-buildpackage for all of my package building, and one reason why
is that I deeply dislike the default Debian behavior of cluttering the
parent directory with random package build files.  git-buildpackage has
always supported configuring a build directory (../build-area appears to
be common) to use for build output, where it doesn't clutter directory
listings and can easily be purged after successful uploads.

It looks like dgit doesn't support this.  At least, I don't see any
configuration option that lets me set it, and dgit was unable to find
builds in my configured build directory for upload.  And there's no
mention of this (quite common) configuration in the dgit-maint-gbp man
page.

Could this please be added?  Or if I'm missing the documentation for it,
maybe a few pointers to the correct documentation could be added to that
man page?

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dgit depends on:
ii  apt   1.4.4
ii  ca-certificates   20161130+nmu1
ii  coreutils 8.26-3
ii  curl  7.52.1-5
ii  devscripts2.17.5
ii  dpkg-dev  1.18.24
ii  dput-ng [dput]1.12
ii  git [git-core]1:2.11.0-4
ii  git-buildpackage  0.8.12.2
ii  libdpkg-perl  1.18.24
ii  libjson-perl  2.90-1
ii  liblist-moreutils-perl0.416-1+b1
ii  libperl5.24 [libdigest-sha-perl]  5.24.1-2
ii  libtext-glob-perl 0.10-1
ii  libtext-iconv-perl1.7-5+b4
ii  libwww-perl   6.15-1
ii  perl  5.24.1-2

Versions of packages dgit recommends:
ii  openssh-client [ssh-client]  1:7.4p1-10

Versions of packages dgit suggests:
pn  sbuild  

-- no debconf information