mini_buildd.models.chroot module

class mini_buildd.models.chroot.Chroot(id, extra_options, pickled_data, status, last_checked, auto_reactivate, source, architecture, personality, personality_override)

Bases: mini_buildd.models.base.StatusModel

PERSONALITIES = {'i386': 'linux32'}
source

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

architecture

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

personality

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

personality_override

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: mini_buildd.models.base.StatusModel.Admin

search_fields = ['source__codename', 'architecture__name']
readonly_fields = ['personality']
fieldsets = [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '<b>Supported extra options</b><p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p><p>For example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>chroots (with <kbd>qemu-user-static</kbd> installed).</p>', 'fields': ('extra_options',)})]
get_readonly_fields(_request, obj=None)

Forbid change source/arch on existing chroot (we would loose the path to the associated data).

classmethod mbd_host_architecture()
mbd_model

alias of mini_buildd.models.chroot.Chroot

property media
mbd_key()
property mbd_path
mbd_get_backend()

Get actual class of (saved) instance (even if operating on base class Chroot only).

mbd_get_name()
mbd_get_tmp_dir()
mbd_get_schroot_conf_file()
mbd_get_keyring_file()

Get keyring file path. Holds all keys from the source to verify the release via debootstrap’s –keyring option.

mbd_get_system_schroot_conf_file()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence.

mbd_get_sequence()
mbd_prepare()
mbd_remove()
mbd_sync()
mbd_check_sudo_workaround()

Run odd sudo workaround.

mini-buildd <= 1.0.4 created chroots with a “sudo workaround” for bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607228.

Suche chroots must be recreated, and no longer used.

mbd_backend_check()

Run backend check. Subclasses may implement this to do extra backend-specific checks.

mbd_check()
mbd_get_dependencies()
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

architecture_id
btrfssnapshotchroot

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

dirchroot

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

filechroot

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

get_next_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=True, **kwargs)
get_previous_by_last_checked(*, field=<django.db.models.fields.DateTimeField: last_checked>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.IntegerField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

lvmchroot

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

objects = <django.db.models.manager.Manager object>
source_id
class mini_buildd.models.chroot.DirChroot(*args, **kwargs)

Bases: mini_buildd.models.chroot.Chroot

Directory chroot backend.

UNION_AUFS = 0
UNION_OVERLAYFS = 1
UNION_UNIONFS = 2
UNION_OVERLAY = 3
UNION_CHOICES = ((0, 'aufs'), (1, 'overlayfs'), (2, 'unionfs'), (3, 'overlay'))
union_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: mini_buildd.models.chroot.Chroot.Admin

fieldsets = [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '<b>Supported extra options</b><p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p><p>For example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>chroots (with <kbd>qemu-user-static</kbd> installed).</p>', 'fields': ('extra_options',)}), ('Dir options', {'fields': ('union_type',)})]
mbd_model

alias of mini_buildd.models.chroot.DirChroot

property media
mbd_backend_flavor()
mbd_get_chroot_dir()
mbd_get_schroot_conf()
mbd_get_post_sequence()
exception DoesNotExist

Bases: mini_buildd.models.chroot.Chroot.DoesNotExist

exception MultipleObjectsReturned

Bases: mini_buildd.models.chroot.Chroot.MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id
get_union_type_display(*, field=<django.db.models.fields.IntegerField: union_type>)
class mini_buildd.models.chroot.FileChroot(*args, **kwargs)

Bases: mini_buildd.models.chroot.Chroot

File chroot backend.

COMPRESSION_NONE = 0
COMPRESSION_GZIP = 1
COMPRESSION_BZIP2 = 2
COMPRESSION_XZ = 3
COMPRESSION_CHOICES = ((0, 'no compression'), (1, 'gzip'), (2, 'bzip2'), (3, 'xz'))
compression

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

TAR_ARGS = {0: [], 1: ['--gzip'], 2: ['--bzip2'], 3: ['--xz']}
TAR_SUFFIX = {0: 'tar', 1: 'tar.gz', 2: 'tar.bz2', 3: 'tar.xz'}
class Admin(model, admin_site)

Bases: mini_buildd.models.chroot.Chroot.Admin

fieldsets = [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '<b>Supported extra options</b><p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p><p>For example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>chroots (with <kbd>qemu-user-static</kbd> installed).</p>', 'fields': ('extra_options',)}), ('File options', {'fields': ('compression',)})]
mbd_model

alias of mini_buildd.models.chroot.FileChroot

property media
mbd_backend_flavor()
mbd_get_tar_file()
mbd_get_schroot_conf()
mbd_get_post_sequence()
exception DoesNotExist

Bases: mini_buildd.models.chroot.Chroot.DoesNotExist

exception MultipleObjectsReturned

Bases: mini_buildd.models.chroot.Chroot.MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id
get_compression_display(*, field=<django.db.models.fields.IntegerField: compression>)
class mini_buildd.models.chroot.LVMChroot(*args, **kwargs)

Bases: mini_buildd.models.chroot.Chroot

LVM chroot backend.

volume_group

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

filesystem

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

snapshot_size

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: mini_buildd.models.chroot.Chroot.Admin

fieldsets = [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '<b>Supported extra options</b><p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p><p>For example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>chroots (with <kbd>qemu-user-static</kbd> installed).</p>', 'fields': ('extra_options',)}), ('LVM options', {'fields': ('volume_group', 'filesystem', 'snapshot_size')})]
mbd_model

alias of mini_buildd.models.chroot.LVMChroot

property media
mbd_backend_flavor()
mbd_get_volume_group()
mbd_get_lvm_device()
mbd_get_schroot_conf()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence.

mbd_get_post_sequence()
mbd_backend_check()

Run backend check. Subclasses may implement this to do extra backend-specific checks.

exception DoesNotExist

Bases: mini_buildd.models.chroot.Chroot.DoesNotExist

exception MultipleObjectsReturned

Bases: mini_buildd.models.chroot.Chroot.MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id
looplvmchroot

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

class mini_buildd.models.chroot.LoopLVMChroot(*args, **kwargs)

Bases: mini_buildd.models.chroot.LVMChroot

Loop LVM chroot backend.

loop_size

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class Admin(model, admin_site)

Bases: mini_buildd.models.chroot.LVMChroot.Admin

fieldsets = [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '<b>Supported extra options</b><p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p><p>For example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>chroots (with <kbd>qemu-user-static</kbd> installed).</p>', 'fields': ('extra_options',)}), ('LVM options', {'fields': ('volume_group', 'filesystem', 'snapshot_size')}), ('Loop options', {'fields': ('loop_size',)})]
mbd_model

alias of mini_buildd.models.chroot.LoopLVMChroot

property media
mbd_backend_flavor()
mbd_get_volume_group()
mbd_get_backing_file()
mbd_get_loop_device()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence.

exception DoesNotExist

Bases: mini_buildd.models.chroot.LVMChroot.DoesNotExist

exception MultipleObjectsReturned

Bases: mini_buildd.models.chroot.LVMChroot.MultipleObjectsReturned

lvmchroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

lvmchroot_ptr_id
class mini_buildd.models.chroot.BtrfsSnapshotChroot(*args, **kwargs)

Bases: mini_buildd.models.chroot.Chroot

Btrfs Snapshot chroot backend.

class Admin(model, admin_site)

Bases: mini_buildd.models.chroot.Chroot.Admin

fieldsets = [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '<b>Supported extra options</b><p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p><p>For example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>chroots (with <kbd>qemu-user-static</kbd> installed).</p>', 'fields': ('extra_options',)})]
mbd_model

alias of mini_buildd.models.chroot.BtrfsSnapshotChroot

property media
classmethod mbd_backend_flavor()
mbd_get_chroot_dir()
mbd_get_snapshot_dir()
mbd_get_schroot_conf()
mbd_get_pre_sequence()

Get preliminary sequence. Subclasses may implement this to do define an extra preliminary sequence.

mbd_get_post_sequence()
exception DoesNotExist

Bases: mini_buildd.models.chroot.Chroot.DoesNotExist

exception MultipleObjectsReturned

Bases: mini_buildd.models.chroot.Chroot.MultipleObjectsReturned

chroot_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

chroot_ptr_id