[buildd-tools-devel] Bug#545215: Bug#545215: Bug#545215: Bug#545215: Bug#545215: Bug#545215: [PATCH] Please support saving chroot to tarball in sbuild-createchroot
Roger Leigh
rleigh at codelibre.net
Thu Aug 19 20:59:24 UTC 2010
On Mon, Aug 16, 2010 at 03:23:54AM -0400, Andres Mejia wrote:
> On Saturday 24 July 2010 19:58:39 Andres Mejia wrote:
> > Here's an updated patch. This only contains the changes for saving an
> > sbuild chroot to tarball now.
> >
> > Changes for the update scripts are now in bug #590211.
> >
> > On Saturday 17 October 2009 01:28:18 Andres Mejia wrote:
> > > Here are all patches again which address your concerns.
> > >
> > > On Thursday 24 September 2009 18:04:05 Roger Leigh wrote:
> > > > On Sun, Sep 20, 2009 at 01:43:41PM -0400, Andres Mejia wrote:
> > > > > From: Andres Mejia <andres at andres-desktop.hsd1.va.comcast.net>
> > > > > Date: Sun, 20 Sep 2009 13:21:02 -0400
> > > > > Subject: [PATCH 3/5] Allow sbuild-update to support perform apt-get
> > > > > update, upgrade and distupgrade. This also allows sbuild-update to
> > > > > perform any two or all three commands at once, useful when using file
> > > > > type chroots.
> Just as I mentioned in my other email to bug #551311, I've setup a git
> repository at http://github.com/ceros/sbuild. The relavant branch for this bug
> would be 'sbuild-createchroot'.
This also looks good. The only change I'd really like is for the
code to cope with different types of archive file. Currently it
only creates .tar.gz, but I'd like it to also support .tar.bz2
and .zip. This can be copied from 05file (it's shell script, but
the exact equivalent could be done in perl).
# Check file type
check_filetype()
{
if echo "$CHROOT_FILE" | grep -q '\.tar$'; then
filetype="tar"
elif echo "$CHROOT_FILE" | egrep -q '(\.tar\.gz|\.tgz)$'; then
filetype="tgz"
elif echo "$CHROOT_FILE" | egrep -q '(\.tar\.bz2|\.tbz)$'; then
filetype="tbz"
elif echo "$CHROOT_FILE" | grep -q '\.zip$'; then
filetype="zip"
else
fatal "Unsupported filetype for $CHROOT_FILE"
fi
}
and actually packing the chroot:
if [ "$filetype" = "tar" ]; then
tar $TAR_VERBOSE -cf "$NEWFILE" .
elif [ "$filetype" = "tgz" ]; then
tar $TAR_VERBOSE -czf "$NEWFILE" .
elif [ "$filetype" = "tbz" ]; then
tar $TAR_VERBOSE -cjf "$NEWFILE" .
elif [ "$filetype" = "zip" ]; then
zip $ZIP_VERBOSE -r "$NEWFILE" .
else
fatal "Unsupported filetype for $CHROOT_FILE"
fi
I'd be very grateful if you could possibly add this to the existing
patch.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100819/948f465f/attachment-0001.pgp>
More information about the Buildd-tools-devel
mailing list