[buildd-tools-devel] Bug#551311: Bug#551311: Updated patches for debuild like functionality in sbuild.

Andres Mejia mcitadel at gmail.com
Fri Feb 26 18:32:53 UTC 2010


On Thursday 25 February 2010 04:16:40 Andres Mejia wrote:
> On Wednesday 24 February 2010 19:07:16 Andres Mejia wrote:
> > On Tue, Feb 23, 2010 at 11:39 PM, Andres Mejia <mcitadel at gmail.com> wrote:
> > > On Sunday 13 December 2009 07:18:49 Roger Leigh wrote:
> > >> On Sat, Dec 12, 2009 at 09:04:29PM -0500, Andres Mejia wrote:
> > >> > On Saturday 12 December 2009 20:22:11 Roger Leigh wrote:
> > >> > > On Sat, Dec 12, 2009 at 06:18:43PM -0500, Andres Mejia wrote:
> > >> > > > On Saturday 12 December 2009 05:52:12 Roger Leigh wrote:
> > >> > > > > On Sat, Dec 12, 2009 at 12:42:10AM -0500, Andres Mejia wrote:
> > >> > > > > > On Friday 11 December 2009 07:17:04 Roger Leigh wrote:
> > >> > > > > > > On Thu, Dec 10, 2009 at 09:38:08PM -0500, Andres Mejia 
wrote:
> > >> > > > > > > > First I would like to say, thank you for reviewing my
> > >> > > > > > > > patches. :)
> > >> > > > > > > >
> > >> > > > > > > > Next I would like to say, please don't attach any
> > >> > > > > > > > patches inline anymore. I spent way too much time
> > >> > > > > > > > ripping out the patch from my email client and then had
> > >> > > > > > > > to properly format the patch just to get it to apply.
> > >> > > > > > >
> > >> > > > > > > Thanks for the updated patch.  I've attached what I
> > >> > > > > > > currently have, but I've not yet merged all of your
> > >> > > > > > > changes into it yet.
> > >> > > > > > >
> > >> > > > > > > This applies after my first patch (it replaces the second
> > >> > > > > > > patch).
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > > > Regards,
> > >> > > > > > > Roger
> > >> > > > > >
> > >> > > > > > It didn't apply cleanly for me. I noticed the first hunk
> > >> > > > > > from the two patches adds "use Sbuild::ChrootRoot;", so I
> > >> > > > > > figure there's already some problem with the patch. I'll
> > >> > > > > > just wait until it's applied to the git tree rather than
> > >> > > > > > attempt to fix the patch again. I'll report problems then.
> > >> > > > >
> > >> > > > > I've put all the current changes at
> > >> > > > >   git://git.debian.org/users/rleigh/sbuild.git
> > >> > > > > branch "debuild-am"
> > >> > > > >
> > >> > > > > It's working for me so far.
> > >> > > > >
> > >> > > > > > One thing I found wrong was the pipe_command() call for
> > >> > > > > > dpkg-parsechangelog. The hash needs to have 'DIR =>
> > >> > > > > > getcwd()', else it will fail.
> > >> > > > >
> > >> > > > > I think this was caused by something else, since getcwd() is
> > >> > > > > the default.  It's working for me without this.
> > >> > > >
> > >> > > > I don't know why, but for some reason, it wants to default to
> > >> > > > using "/" as DIR in my system. I've even tried this on a pure
> > >> > > > checkout of the debuild-am branch. I am running this through
> > >> > > > Debian sid, if that helps. I've attached the patch that fixes
> > >> > > > this for me.
> > >> > >
> > >> > > Are you using the libs in lib/ when testing (PERL5LIB=lib
> > >> > > ./bin/sbuild ...)? Otherwise you might be using a copy of the
> > >> > > system modules.
> > >> >
> > >> > I'm using perl directly with appropriate options. As in,
> > >> >
> > >> > $ perl -Isbuild/lib sbuild/bin/sbuild sbuild
> > >> >
> > >> > > DIR does default to "/" in Chroot.pm, new() line 65.  However, in
> > >> > > Build.pm, this is overridden in run() line 253:
> > >> > >
> > >> > >     my $chroot_defaults = $session->get('Defaults');
> > >> > >     $chroot_defaults->{'DIR'} =
> > >> > >         $session->strip_chroot_path($session->get('Build
> > >> > > Location'));
> > >> >
> > >> > Yes, this is the problem. You sure you pushed all your changes? I
> > >> > don't see this line in the debuild-am branch and I just verified
> > >> > this is the case via
> > >> > http://git.debian.org/?p=users/rleigh/sbuild.git as well.
> > >>
> > >> I pushed all of those changes.
> > >>
> > >> It's definitely there, line 345 of
> > >> http://git.debian.org/?p=users/rleigh/sbuild.git;a=blob;f=lib/Sbuild/B
> > >>ui ld.
> > >> pm;h=888d291901c6c9ca1baa0383ba7f8483ee87f30e;hb=0f9e497679774569473e4
> > >>51 e85 4f93d19cddeed7
> > >>
> > >> This isn't a recent change.  It's been there since the 11th of April
> > >> this year.
> > >>
> > >>
> > >> Regards,
> > >> Roger
> > >
> > > Ok, I have an updated patch against the latest sbuild release to
> > > implement the debuild feature. I simply merged the sbuild master branch
> > > from the main git repo to debuild-am from
> > > http://git.debian.org/?p=users/rleigh/sbuild.git.
> > >
> > > The first patch simply shows a diff of the files that needed conflict
> > > resolution after merging in the latest sbuild changes to the debuild-am
> > > branch from http://git.debian.org/?p=users/rleigh/sbuild.git.
> > >
> > > The second patch is something I needed in order to be able to use
> > > sbuild. It's that issue of before where for some reason I need DIR set
> > > in order to run dpkg-parsechangelog. This issue is occuring even with a
> > > fresh install of Debian sid. Also, I'm running sbuild with no
> > > ~/.sbuildrc, just command line switches. Here is the command I'm
> > > running one directory up from the sbuild source directory.
> > >
> > > $ perl -Isbuild/lib sbuild/bin/sbuild -s -A -c sid-amd64-sbuild -d
> > > unstable sbuild
> > >
> > > Third patch simply shows a diff of the debuild-am branch against master
> > > after the merge and after the second patch is applied.
> > >
> > > Here's my system information in case you need it for the second patch.
> > > -- System Information:
> > > Debian Release: squeeze/sid
> > >  APT prefers unstable
> > >  APT policy: (500, 'unstable'), (1, 'experimental')
> > > Architecture: amd64 (x86_64)
> > >
> > > Kernel: Linux 2.6.32-2-amd64 (SMP w/8 CPU cores)
> > > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> > > Shell: /bin/sh linked to /bin/dash
> > >
> > > Versions of packages sbuild depends on:
> > > ii  adduser                       3.112      add and remove users and
> > > groups ii  libsbuild-perl                0.60.0-1   Tool for building
> > > Debian binary pa ii  perl                          5.10.1-11  Larry
> > > Wall's Practical Extraction ii  perl-modules                  5.10.1-11
> > >  Core Perl modules
> > >
> > > Versions of packages sbuild recommends:
> > > ii  debootstrap                   1.0.22     Bootstrap a basic Debian
> > > system ii  fakeroot                      1.14.4-1   Gives a fake root
> > > environment
> > >
> > > Versions of packages sbuild suggests:
> > > pn  deborphan                     <none>     (no description available)
> > > ii  wget                          1.12-1.1   retrieves files from the
> > > web
> > >
> > > -- no debconf information
> >
> > Here's another patch to can be applied after the merge of master to
> > debuild-am and after applying the second patch from the last email.
> >
> > I've reattached the diff of the conflict resolutions and the second
> > patch from the last email. The third patch attached is the changes to
> > fixup the merging of master to debuild-am. The master_debian-am.diff
> > is a diff of debian-am against the master branch.
> 
> Here's some more patches. The first three are the same as the patches sent
>  in the last email. Again, the debuild-am-conflicts.diff is the diff to
>  resolve conficts after merging master to the debuild-am branch. Patch
>  0001-* was a temporary fix that I used at the time to get sbuild to be
>  able to run commands on the host system. Patch 0002-* was a patch which is
>  a fixup of changes that shouldn't have been made after merging master to
>  debuild-am.
> 
> Patch 0003 fixes that issue of long ago where commands wouldn't default to
>  run on the host system for when they needed to (like dpkg-parsechangelog
>  and so on). Whenever CHROOT wasn't set at all through the pipe_command()
>  or run_command() subroutines, get_command_internal() from
>  Sbuild::ChrootPlain would set CHROOT to 1, even though the default may
>  have been set to 0 via Sbuild::ChrootRoot->set('Defaults')->{'CHROOT'}.
> 
> Patch 0004-* simply sets the default dir to run commands on the host system
>  to getcwd(). This resolves another issue I mentioned some time ago.
> 
> Patch 0005-* implements sbuild to use an array of arrayrefs of strings to
>  run external commands, rather than an array of strings.
> 
> Lastly, the last patch is a diff between master and debuild-am.
> 

Here's yet another patch that fixes a problem where sbuild wouldn't build a 
package from a source directory if it hadn't already created a source package.

I'm attaching all the patches from the last emails again, with this new patch 
as well.

-- 
Regards,
Andres
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debuild-am-conflicts.diff
Type: text/x-patch
Size: 4171 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Set-DIR-to-getcwd-in-command-run-of-dpkg-parsechange.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fixup-changes-from-automatic-merge-that-should-have-.patch
Type: text/x-patch
Size: 23206 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fix-problem-where-commands-to-run-on-host-system-wou.patch
Type: text/x-patch
Size: 2645 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Set-default-dir-to-run-host-commands-to-getcwd.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Use-an-array-of-arrayrefs-for-processing-the-externa.patch
Type: text/x-patch
Size: 7782 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Fix-issue-where-building-from-source-directory-would.patch
Type: text/x-patch
Size: 912 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: master_debuild-am.diff
Type: text/x-patch
Size: 33790 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100226/54a06f57/attachment-0015.bin>


More information about the Buildd-tools-devel mailing list