Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

schroot-script-config(5) [debian man page]

SCHROOT-SCRIPT-CONFIG(5)					   Debian sbuild					  SCHROOT-SCRIPT-CONFIG(5)

NAME
schroot-script-config - schroot chroot setup script configuration DESCRIPTION
schroot uses scripts to set up and then clean up the chroot environment. These scripts may be customised using the script-config key in /etc/schroot/schroot.conf. This key specifies a file which the setup scripts will source when they are run. The file is a Bourne shell script, and in consequence may contain any valid shell code, in addition to simple variable assignments. This will, for example, allow be- haviour to be customised according to the specific chroot type or name. This file is deprecated, but is still used if present; it will be obsoleted and removed in a future release. All the settings in this file are now settable using configuration keys in schroot.conf, as detailed below. Existing configuration should be modified to use these keys in place of this file. ENVIRONMENT
The environment is the same as for all setup scripts, described in schroot-setup(5). VARIABLES
The following variables may be set to configure setup script behaviour. Note that new variables may be added in future releases. Third- party extensions to schroot which add their own setup scripts may add additional variables which are not documented here; consult the extension documentation for further details. SETUP_COPYFILES A file containing a list of files to copy into the chroot (one file per line). The file will have the same absolute location inside the chroot. Note that this is settable using the setup.copyfiles key. SETUP_FSTAB The filesystem table file to be used to mount filesystems within the chroot. The format of this file is the same as for /etc/fstab, documented in fstab(5). The only difference is that the mountpoint path fs_dir is relative to the chroot, rather than the root. Note that this is settable using the setup.fstab key. Also note that mountpoints are canonicalised on the host, which will ensure that absolute symlinks point inside the chroot, but complex paths containing multiple symlinks may be resolved incorrectly; it is advised to not use nested symlinks as mountpoints. SETUP_NSSDATABASES A file listing the system databases to copy into the chroot. The default databases are 'passwd', 'shadow', 'group', 'services', 'protocols', 'networks', and 'hosts'. 'gshadow' is not yet copied by default, due to not being supported by all but the most recent version of the GNU C library. The databases are copied using getent(1) so all database sources listed in /etc/nsswitch.conf will be used for each database. Note that this is settable using the setup.nssdatabases key. AUTHORS
Roger Leigh. COPYRIGHT
Copyright (C) 2005-2012 Roger Leigh <rleigh@debian.org> schroot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SEE ALSO
sbuild(1), schroot(1), sh(1), schroot.conf(5), schroot-setup(5). Version 1.6.4 27 Oct 2012 SCHROOT-SCRIPT-CONFIG(5)

Check Out this Related Man Page

SCHROOT-SETUP(5)						   Debian sbuild						  SCHROOT-SETUP(5)

NAME
schroot-setup - schroot chroot setup scripts DESCRIPTION
schroot uses scripts to set up and then clean up the chroot environment. The directory /etc/schroot/setup.d contains scripts run when a chroot is created and destroyed. Several environment variables are set while the scripts are being run, which allows their behaviour to be customised, depending upon, for example, the type of chroot in use. The scripts are run in name order, like those run by init(8), by using the same style of execution as run-parts(8). The setup scripts are all invoked with two options: 1 The action to perform. When a session is first started, the chroot is set up by running the scripts in /etc/schroot/setup.d with the 'setup-start' option. When the session is ended, the scripts in /etc/schroot/setup.d are run in reverse order with the 'setup-stop' option. 2 The chroot status. This is either 'ok' if there are no problems, or 'fail' if something went wrong. For example, particular actions may be skipped on failure. Note that the scripts should be idempotent. They must be idempotent during the 'setup-stop' phase, because they may be run more than once, for example on failure. ENVIRONMENT
General variables AUTH_USER The username of the user the command in the chroot will run as. CHROOT_NAME The chroot name. Note that this is the name of the orignal chroot before session creation; you probably want SESSION_ID. HOST HOST_OS HOST_VENDOR HOST_CPU The host system architecture schroot is running upon. This may be used to introduce architecture-specific behaviour into the setup scripts where required. HOST is the GNU triplet for the architecture, while HOST_OS, HOST_VENDOR and HOST_CPU are the component parts of the triplet. LIBEXEC_DIR The directory under which helper programs are located. MOUNT_DIR The directory under which non-filesystem chroots are mounted (e.g. block devices and LVM snapshots). PID The process ID of the schroot process. PLATFORM The operating system platform schroot is running upon. This may be used to introduce platform-specific behaviour into the setup scripts where required. Note that the HOST variables are probably what are required. In the context of schroot, the platform is the supported configuration and behaviour for a given architecture, and may be identical between different architectures. SESSION_ID The session identifier. VERBOSE Set to 'quiet' if only error messages should be printed, 'normal' if other messages may be printed as well, and 'verbose' if all messages may be printed. Previously called AUTH_VERBOSITY. CHROOT_SESSION_CREATE Set to 'true' if a session will be created, otherwise 'false'. CHROOT_SESSION_CLONE Set to 'true' if a session will be cloned, otherwise 'false'. CHROOT_SESSION_PURGE Set to 'true' if a session will be purged, otherwise 'false'. CHROOT_TYPE The type of the chroot. This is useful for restricting a setup task to particular types of chroot (e.g. only block devices or LVM snapshots). CHROOT_NAME The name of the chroot. This is useful for restricting a setup task to a particular chroot, or set of chroots. CHROOT_ALIAS The name of the alias used to select the chroot. This is useful for specialising a setup task based upon one of its alternative alias names, or the default chroot name. For example, it could be used to specify additional sources in /etc/apt/sources.list, such as a stable-security alias for a stable chroot, or an experimental alias for an unstable chroot. CHROOT_DESCRIPTION The description of the chroot. CHROOT_MOUNT_LOCATION The location to mount the chroot. It is used for mount point creation and mounting. CHROOT_LOCATION The location of the chroot inside the mount point. This is to allow multiple chroots on a single filesystem. Set for all mountable chroot types. CHROOT_PATH The absolute path to the chroot. This is typically CHROOT_MOUNT_LOCATION and CHROOT_LOCATION concatenated together. This is the path which should be used to access the chroots. Plain and directory chroot variables These chroot types use only general variables. File variables CHROOT_FILE The file containing the chroot files. CHROOT_FILE_REPACK Set to 'true' to repack the chroot into an archive file on ending a session, otherwise 'false'. Mountable chroot variables These variables are only set for directly mountable chroot types. CHROOT_MOUNT_DEVICE The device to mount containing the chroot. mounting. CHROOT_MOUNT_OPTIONS Options to pass to mount(8). CHROOT_LOCATION The location of the chroot inside the mount point. This allows the existence of multiple chroots on a single filesystem. Filesystem union variables CHROOT_UNION_TYPE Union filesystem type. CHROOT_UNION_MOUNT_OPTIONS Union filesystem mount options. CHROOT_UNION_OVERLAY_DIRECTORY Union filesystem overlay directory (writable). CHROOT_UNION_UNDERLAY_DIRECTORY Union filesystem underlay directory (read-only). Block device variables CHROOT_DEVICE The device containing the chroot root filesystem. This is usually, but not necessarily, the device which will be mounted. For example, an LVM snapshot this will be the original logical volume. LVM snapshot variables CHROOT_LVM_SNAPSHOT_NAME Snapshot name to pass to lvcreate(8). CHROOT_LVM_SNAPSHOT_DEVICE The name of the LVM snapshot device. CHROOT_LVM_SNAPSHOT_OPTIONS Options to pass to lvcreate(8). Custom variables Custom keys set in schroot.conf will be uppercased and set in the environment as described in schroot.conf(5). FILES
Setup script configuration The directory /etc/schroot/default contains the default settings used by setup scripts. config Main configuration file read by setup scripts. The format of this file is described in schroot-script-config(5). This is the default value for the script-config key. Note that this was formerly named /etc/schroot/script-defaults. The following files are referenced by default: copyfiles A list of files to copy into the chroot from the host system. Note that this was formerly named /etc/schroot/copyfiles-defaults. fstab A file in the format decribed in fstab(5), used to mount filesystems inside the chroot. The mount location is relative to the root of the chroot. Note that this was formerly named /etc/schroot/mount-defaults. nssdatabases System databases (as described in /etc/nsswitch.conf on GNU/Linux systems) to copy into the chroot from the host. Note that this was formerly named /etc/schroot/nssdatabases-defaults. Setup scripts The directory /etc/schroot/setup.d contains the chroot setup scripts. 00check Print debugging diagnostics and perform basic sanity checking. 05file Unpack, clean up, and repack file-based chroots. 05fsunion Create and remove union filesystems. 05lvm Create and remove LVM snapshots. 10mount Mount and unmount filesystems. 15binfmt Sets up the QEMU user emulator using binfmt-support. This permits a chroot for a different CPU architecture to be used transpar- ently, providing an alternative to cross-compiling or whole-machine emulation. 15killprocs Kill processes still running inside the chroot when ending a session, which would prevent unmounting of filesystems and cleanup of any other resources. 20copyfiles Copy files from the host system into the chroot. Configure networking by copying hosts and resolv.conf, for example. 20nssdatabases Configure system databases by copying passwd, shadow, group etc. into the chroot. 50chrootname Set the chroot name (/etc/debian_chroot) in the chroot. This may be used by the shell prompt to display the current chroot. AUTHORS
Roger Leigh. COPYRIGHT
Copyright (C) 2005-2012 Roger Leigh <rleigh@debian.org> schroot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SEE ALSO
schroot(1), fstab(5), schroot.conf(5), schroot-script-config(5), run-parts(8). Version 1.6.4 27 Oct 2012 SCHROOT-SETUP(5)
Man Page

Featured Tech Videos