[PATCH 3 of 3 cubicweb update-skel-pkg] [pkg] Add new autopkgtest for skeleton packaging

Denis Laxalde denis.laxalde at logilab.fr
Tue Jul 9 15:49:42 CEST 2019


Jérémy Bobbio a écrit :
> >> +
> >> +# Build!
> >> +dpkg-buildpackage
> >> +
> >> +# Output .buildinfo for posterity
> >> +cat ../*.buildinfo
> >> +
> >> +# Output package content, again for posterity
> >> +debc
> >> +
> >> +# Install the package
> >> +sudo debi --with-depends
> >> +
> >> +lintian -i ../*.dsc ../*.changes
> > 
> > I think lintian without any option enough since we are in unpacked
> > package dir?
> 
> I wanted to be explicit because we really want to check both the source
> package and the binary packages. In the case of a binary only upload,
> dpkg-buildpackage will not add the .dsc to the .changes files.
> In the case of this script, we know that it's not the case, but what if
> there's a change at some point?
> 
> Can I return the question and ask why you'd prefer an implicit behavior?

I was just worried about the "../*.<ext>" because ".." usually contains
a lot of things when working with Debian tools :) But I guess this is
not a concern when working in a virtualization context?

I also slightly prefer the implicit way because it seems more consistent
with other commands above (debi, debc, dpkg-buildpackage) which all
operate based on current directory.

Not a big deal though, let's keep it like that :)

> >> +# Test if Python module is usable
> >> +python3 -c 'import cubicweb_mytest; print(dir(cubicweb_mytest))'
> >> +
> >> +# Run autopkgtest (uh… inception, anyone?)
> >> +sudo autopkgtest ../*.changes -- null
> > 
> > Same here, not specifying *.changes should work, doesn't it?
> 
> To the best of my understanding, it would mean something different.
> Quoting autopkgtest(1):
> 
[...]
> 
> Without any argument, autopkgtest will start by rebuilding the source
> package. In our case, there's no need for an extra build because we
> already did it.

Ok, thanks for explaining!

> On 04/07/2019 11:07, Denis Laxalde wrote:
> > This step does not work for me:
> > 
> > 
> >     + exec su nobody -s /bin/sh -c /tmp/autopkgtest.jmYTP8/tree/debian/tests/skeleton-packaging
> >     /bin/sh: 0: Can't open /tmp/autopkgtest.jmYTP8/tree/debian/tests/skeleton-packaging
> > 
> > I had to chmod a+r that file once in the interactive shell to continue
> > (then, everything works fine).
> > 
> > The command I'm running is:
> > 
> >   autopkgtest --shell-fail --apt-upgrade ../*3.27*.deb \
> >     --test-name=skeleton-packaging \
> >     -- schroot cubicweb-unstable-amd64-sbuild
> 
> I had not tried to run the test using schroot. I'll do that before
> sending an updated patch.

I'm now trying to get started with lxc, maybe it'll work better.
I'll also look at v2, thanks!



More information about the cubicweb-devel mailing list