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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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.Admin
-
search_fields
= ['source__codename', 'architecture__name']¶
-
readonly_fields
= ['personality']¶
-
fieldsets
= [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '\n<b>Supported extra options</b>\n<p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>\nchroots (with <kbd>qemu-user-static</kbd> installed).\n</p>\n', '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
()¶
-
media
¶
-
-
mbd_get_backend
()¶
-
mbd_get_path
()¶
-
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
(request)¶
-
mbd_remove
(request)¶
-
mbd_sync
(request)¶
-
mbd_check_sudo_workaround
(request)¶ 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
(request)¶ Run backend check. Subclasses may implement this to do extra backend-specific checks.
-
mbd_check
(request)¶
-
mbd_get_dependencies
()¶
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
architecture_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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 aReverseOneToOneDescriptor
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 aReverseOneToOneDescriptor
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 aReverseOneToOneDescriptor
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)¶
-
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 aReverseOneToOneDescriptor
instance.
-
objects
= <django.db.models.manager.Manager object>¶
-
source_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
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.Admin
-
fieldsets
= [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '\n<b>Supported extra options</b>\n<p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>\nchroots (with <kbd>qemu-user-static</kbd> installed).\n</p>\n', 'fields': ('extra_options',)}), ('Dir options', {'fields': ('union_type',)})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
media
¶
-
-
mbd_backend_flavor
()¶
-
mbd_get_chroot_dir
()¶
-
mbd_get_schroot_conf
()¶
-
mbd_get_post_sequence
()¶
-
exception
DoesNotExist
¶ Bases:
mini_buildd.models.chroot.DoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.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 aForwardOneToOneDescriptor
instance.
-
chroot_ptr_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.Admin
-
fieldsets
= [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '\n<b>Supported extra options</b>\n<p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>\nchroots (with <kbd>qemu-user-static</kbd> installed).\n</p>\n', 'fields': ('extra_options',)}), ('File options', {'fields': ('compression',)})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
media
¶
-
-
mbd_backend_flavor
()¶
-
mbd_get_tar_file
()¶
-
mbd_get_schroot_conf
()¶
-
mbd_get_post_sequence
()¶
-
exception
DoesNotExist
¶ Bases:
mini_buildd.models.chroot.DoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.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 aForwardOneToOneDescriptor
instance.
-
chroot_ptr_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.Admin
-
fieldsets
= [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '\n<b>Supported extra options</b>\n<p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>\nchroots (with <kbd>qemu-user-static</kbd> installed).\n</p>\n', 'fields': ('extra_options',)}), ('LVM options', {'fields': ('volume_group', 'filesystem', 'snapshot_size')})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
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
(request)¶ Run backend check. Subclasses may implement this to do extra backend-specific checks.
-
exception
DoesNotExist
¶ Bases:
mini_buildd.models.chroot.DoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.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 aForwardOneToOneDescriptor
instance.
-
chroot_ptr_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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 aReverseOneToOneDescriptor
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.Admin
-
fieldsets
= [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '\n<b>Supported extra options</b>\n<p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>\nchroots (with <kbd>qemu-user-static</kbd> installed).\n</p>\n', 'fields': ('extra_options',)}), ('LVM options', {'fields': ('volume_group', 'filesystem', 'snapshot_size')}), ('Loop options', {'fields': ('loop_size',)})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
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.DoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.chroot.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 aForwardOneToOneDescriptor
instance.
-
lvmchroot_ptr_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
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.Admin
-
fieldsets
= [('Chroot identity', {'fields': (('source', 'architecture'), 'personality', 'personality_override')}), ('Extra options', {'classes': ('collapse',), 'description': '\n<b>Supported extra options</b>\n<p><kbd>Debootstrap-Command: ALT_COMMAND</kbd>: Alternate command to run instead of standard debootstrap.</p>\n<p>\nFor example, <kbd>Debootstrap-Command: /usr/sbin/qemu-debootstrap</kbd> may be used to produce <em>armel</em>\nchroots (with <kbd>qemu-user-static</kbd> installed).\n</p>\n', 'fields': ('extra_options',)})]¶
-
classmethod
mbd_meta_add_base_sources
(msglog)¶
-
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.DoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
mini_buildd.models.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 aForwardOneToOneDescriptor
instance.
-
chroot_ptr_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class