+++ /dev/null
-# Settings for "dsa" profile.
-
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-FSTAB="/etc/schroot/dsa/fstab"
-[ -e "$FSTAB" ] || FSTAB="/etc/schroot/default/fstab"
-
-COPYFILES="/etc/schroot/dsa/copyfiles"
-[ -e "$COPYFILES" ] || COPYFILES="/etc/schroot/default/copyfiles"
-
-NSSDATABASES="/etc/schroot/dsa/nssdatabases"
-[ -e "$NSSDATABASES" ] || NSSDATABASES="/etc/schroot/default/nssdatabases"
-
-
-# added by weasel:
-if [ "$CHROOT_SESSION_PURGE" = "true" ]; then
- case $CHROOT_DESCRIPTION in
- "["*-*_*-dchroot"]"*)
- chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}"
- suitevariant_arch_tuple="${chroot_type%%-dchroot-*}"
- suitevariant=${suitevariant_arch_tuple%_*}
- SUITE_BASE=${suitevariant%-*}
- SUITE_VARIANT=${suitevariant##*-}
- ;;
- "["*_*-dchroot"]"*)
- chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}"
- SUITE_BASE="${chroot_type%%_*}"
- ;;
- *)
- if [ "$STAGE" = "setup-start" ]; then
- echo >&2 "Unable to parse chroot description for what kind of chroot you want."
- exit 1
- fi
- ;;
- esac
-fi
-
-CHROOT_FILE_UNPACK_DIR=/srv/chroot/schroot-unpack
-
-if [ -e /etc/schroot/dsa/default-mirror ]; then
- MIRROR=$(cat /etc/schroot/dsa/default-mirror )
-fi
-MIRROR=${MIRROR:-cdn.debian.net}
-
-if [ "$(basename "$0")" = "00check" ] &&
- [ "$CHROOT_TYPE" = "file" ] &&
- [ "$STAGE" = "setup-start" ]; then
- echo "Untarring chroot environment. This might take a minute or two."
-fi
+++ /dev/null
-# fstab: static file system information for chroots.
-# Note that the mount point will be prefixed by the chroot path
-# (CHROOT_PATH)
-#
-# <file system> <mount point> <type> <options> <dump> <pass>
-/proc /proc none rw,bind 0 0
-/sys /sys none rw,bind 0 0
-/dev /dev none rw,bind 0 0
-/dev/pts /dev/pts none rw,bind 0 0
-/home /home none rw,bind 0 0
-/tmp /tmp none rw,bind 0 0
-tmpfs-shm /dev/shm tmpfs defaults,size=64m 0 0
-
-# It may be desirable to have access to /run, especially if you wish
-# to run additional services in the chroot. However, note that this
-# may potentially cause undesirable behaviour on upgrades, such as
-# killing services on the host.
-#/run /run none rw,bind 0 0
-#/run/lock /run/lock none rw,bind 0 0
-#/dev/shm /dev/shm none rw,bind 0 0
-#/run/shm /run/shm none rw,bind 0 0
+++ /dev/null
-# fstab: static file system information for chroots.
-# Note that the mount point will be prefixed by the chroot path
-# (CHROOT_PATH)
-#
-# <file system> <mount point> <type> <options> <dump> <pass>
-proc /proc linprocfs defaults 0 0
-dev /dev devfs rw,bind 0 0
-dev /dev/fd fdescfs rw,bind 0 0
-/home /home nullfs rw 0 0
-/tmp /tmp nullfs rw 0 0
-
-# It may be desirable to have access to /run, especially if you wish
-# to run additional services in the chroot. However, note that this
-# may potentially cause undesirable behaviour on upgrades, such as
-# killing services on the host.
-#/run /run nullfs rw 0 0
-#/run/lock /run/lock nullfs rw 0 0
+++ /dev/null
-#!/bin/bash
-
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-# by weasel
-
-set -e
-
-[ "$CHROOT_PROFILE" = "dsa" ] || exit 0
-
-. "$SETUP_DATA_DIR/common-data"
-. "$SETUP_DATA_DIR/common-functions"
-
-if [ -f "${CHROOT_SCRIPT_CONFIG:-}" ]; then
- . "$CHROOT_SCRIPT_CONFIG"
-fi
-
-
-if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
- TGT="${CHROOT_PATH}/etc/apt/apt.conf.d/local-schroot"
- rm -f "$TGT"
- cat > "$TGT" << EOF
-APT::Install-Recommends 0;
-Acquire::http::Pipeline-Depth "0";
-Acquire::Languages "none";
-Acquire::PDiffs "false";
-EOF
-#Acquire {
-# http { Proxy "http://10.213.12.1:3128/"; };
-# ftp { Proxy "http://10.213.12.1:3128/"; };
-#}
-fi
+++ /dev/null
-#!/bin/bash
-
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-
-# by weasel
-
-set -e
-
-[ "$CHROOT_PROFILE" = "dsa" ] || exit 0
-
-. "$SETUP_DATA_DIR/common-data"
-. "$SETUP_DATA_DIR/common-functions"
-
-if [ -f "${CHROOT_SCRIPT_CONFIG:-}" ]; then
- . "$CHROOT_SCRIPT_CONFIG"
-elif [ -f "$CHROOT_PROFILE_DIR/config" ]; then
- . "$CHROOT_PROFILE_DIR/config"
-else
- fatal "Cannot find config script"
-fi
-
-
-if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
- SRCL="${CHROOT_PATH}/etc/apt/sources.list.d/auto.list"
- rm -f "$SRCL"
- mirror=${MIRROR:-http://cdn.debian.net/debian}
-
- case "${SUITE_BASE:-}" in
- experimental)
- echo "deb $mirror sid main" >> "$SRCL"
- echo "deb-src $mirror sid main" >> "$SRCL"
- ;;
- sid|jessie)
- ;;
- *)
- echo "deb http://security.debian.org/ ${SUITE_BASE}/updates main" >> "$SRCL"
- echo "deb-src http://security.debian.org/ ${SUITE_BASE}/updates main" >> "$SRCL"
- ;;
- esac
- echo "deb $mirror ${SUITE_BASE} main" >> "$SRCL"
- echo "deb-src $mirror ${SUITE_BASE} main" >> "$SRCL"
-
- case "${SUITE_VARIANT:-}" in
- backports)
- case "${SUITE_BASE:-}" in
- squeeze)
- echo "deb http://backports.debian.org/debian-backports/ ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
- echo "deb-src http://backports.debian.org/debian-backports/ ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
- ;;
- *)
- echo "deb $mirror ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
- echo "deb-src $mirror ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
- ;;
- esac
- ;;
- esac
- echo "o To install build dependencies run"
- echo " dd-schroot-cmd -c ${SESSION_ID} apt-get update"
- echo " followed by build-dep/install as appropriate in the host system."
- echo "o If you started this session with schroot -b, please do not forget to run"
- echo " schroot --end-session -c ${SESSION_ID}"
- echo " when you no longer need this environment."
-fi
class porterbox {
include schroot
- # FIXME: Refactor this to a common class when something else needs it
- package { 'moreutils':
- ensure => installed
- }
- file { '/etc/schroot/dsa':
- ensure => directory,
- require => Package['schroot'],
- }
- file { '/etc/schroot/dsa/config':
- source => 'puppet:///modules/porterbox/schroot-dsa/config',
- }
- if ! ($::debarchitecture in ['kfreebsd-amd64', 'kfreebsd-i386']) {
- file { '/etc/schroot/dsa/fstab':
- source => 'puppet:///modules/porterbox/schroot-dsa/fstab',
- }
- } else {
- file { '/etc/schroot/dsa/fstab':
- source => 'puppet:///modules/porterbox/schroot-dsa/fstab-freebsd',
- }
- }
- file { '/etc/schroot/dsa/default-mirror':
- content => template('porterbox/default-mirror.erb'),
- }
- file { '/etc/schroot/setup.d/99porterbox-extra-apt-options':
- mode => '0555',
- source => 'puppet:///modules/porterbox/schroot-setup.d/99porterbox-extra-apt-options',
- require => Package['schroot'],
- }
- file { '/etc/schroot/setup.d/99porterbox-extra-sources':
- mode => '0555',
- source => 'puppet:///modules/porterbox/schroot-setup.d/99porterbox-extra-sources',
- require => Package['schroot'],
- }
file { '/usr/local/bin/dd-schroot-cmd':
mode => '0555',
source => 'puppet:///modules/porterbox/dd-schroot-cmd',
+++ /dev/null
-<%=
-ninfo = scope.lookupvar('site::nodeinfo')
-if ninfo['hoster'].has_key?('mirror-debian') then
- ninfo['hoster']['mirror-debian']
-else
- 'http://cdn.debian.net/debian'
-end
-%>
--- /dev/null
+# Settings for "dsa" profile.
+
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+FSTAB="/etc/schroot/dsa/fstab"
+[ -e "$FSTAB" ] || FSTAB="/etc/schroot/default/fstab"
+
+COPYFILES="/etc/schroot/dsa/copyfiles"
+[ -e "$COPYFILES" ] || COPYFILES="/etc/schroot/default/copyfiles"
+
+NSSDATABASES="/etc/schroot/dsa/nssdatabases"
+[ -e "$NSSDATABASES" ] || NSSDATABASES="/etc/schroot/default/nssdatabases"
+
+
+# added by weasel:
+if [ "$CHROOT_SESSION_PURGE" = "true" ]; then
+ case $CHROOT_DESCRIPTION in
+ "["*-*_*-dchroot"]"*)
+ chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}"
+ suitevariant_arch_tuple="${chroot_type%%-dchroot-*}"
+ suitevariant=${suitevariant_arch_tuple%_*}
+ SUITE_BASE=${suitevariant%-*}
+ SUITE_VARIANT=${suitevariant##*-}
+ ;;
+ "["*_*-dchroot"]"*)
+ chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}"
+ SUITE_BASE="${chroot_type%%_*}"
+ ;;
+ *)
+ if [ "$STAGE" = "setup-start" ]; then
+ echo >&2 "Unable to parse chroot description for what kind of chroot you want."
+ exit 1
+ fi
+ ;;
+ esac
+fi
+
+CHROOT_FILE_UNPACK_DIR=/srv/chroot/schroot-unpack
+
+if [ -e /etc/schroot/dsa/default-mirror ]; then
+ MIRROR=$(cat /etc/schroot/dsa/default-mirror )
+fi
+MIRROR=${MIRROR:-cdn.debian.net}
+
+if [ "$(basename "$0")" = "00check" ] &&
+ [ "$CHROOT_TYPE" = "file" ] &&
+ [ "$STAGE" = "setup-start" ]; then
+ echo "Untarring chroot environment. This might take a minute or two."
+fi
--- /dev/null
+#!/bin/bash
+
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+# by weasel
+
+set -e
+
+[ "$CHROOT_PROFILE" = "dsa" ] || exit 0
+
+. "$SETUP_DATA_DIR/common-data"
+. "$SETUP_DATA_DIR/common-functions"
+
+if [ -f "${CHROOT_SCRIPT_CONFIG:-}" ]; then
+ . "$CHROOT_SCRIPT_CONFIG"
+fi
+
+
+if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
+ TGT="${CHROOT_PATH}/etc/apt/apt.conf.d/local-schroot"
+ rm -f "$TGT"
+ cat > "$TGT" << EOF
+APT::Install-Recommends 0;
+Acquire::http::Pipeline-Depth "0";
+Acquire::Languages "none";
+Acquire::PDiffs "false";
+EOF
+#Acquire {
+# http { Proxy "http://10.213.12.1:3128/"; };
+# ftp { Proxy "http://10.213.12.1:3128/"; };
+#}
+fi
--- /dev/null
+#!/bin/bash
+
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+# by weasel
+
+set -e
+
+[ "$CHROOT_PROFILE" = "dsa" ] || exit 0
+
+. "$SETUP_DATA_DIR/common-data"
+. "$SETUP_DATA_DIR/common-functions"
+
+if [ -f "${CHROOT_SCRIPT_CONFIG:-}" ]; then
+ . "$CHROOT_SCRIPT_CONFIG"
+elif [ -f "$CHROOT_PROFILE_DIR/config" ]; then
+ . "$CHROOT_PROFILE_DIR/config"
+else
+ fatal "Cannot find config script"
+fi
+
+
+if [ "$1" = "setup-start" ] || [ "$1" = "setup-recover" ]; then
+ SRCL="${CHROOT_PATH}/etc/apt/sources.list.d/auto.list"
+ rm -f "$SRCL"
+ mirror=${MIRROR:-http://cdn.debian.net/debian}
+
+ case "${SUITE_BASE:-}" in
+ experimental)
+ echo "deb $mirror sid main" >> "$SRCL"
+ echo "deb-src $mirror sid main" >> "$SRCL"
+ ;;
+ sid|jessie)
+ ;;
+ *)
+ echo "deb http://security.debian.org/ ${SUITE_BASE}/updates main" >> "$SRCL"
+ echo "deb-src http://security.debian.org/ ${SUITE_BASE}/updates main" >> "$SRCL"
+ ;;
+ esac
+ echo "deb $mirror ${SUITE_BASE} main" >> "$SRCL"
+ echo "deb-src $mirror ${SUITE_BASE} main" >> "$SRCL"
+
+ case "${SUITE_VARIANT:-}" in
+ backports)
+ case "${SUITE_BASE:-}" in
+ squeeze)
+ echo "deb http://backports.debian.org/debian-backports/ ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
+ echo "deb-src http://backports.debian.org/debian-backports/ ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
+ ;;
+ *)
+ echo "deb $mirror ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
+ echo "deb-src $mirror ${SUITE_BASE}-${SUITE_VARIANT} main" >> "$SRCL"
+ ;;
+ esac
+ ;;
+ esac
+ echo "o To install build dependencies run"
+ echo " dd-schroot-cmd -c ${SESSION_ID} apt-get update"
+ echo " followed by build-dep/install as appropriate in the host system."
+ echo "o If you started this session with schroot -b, please do not forget to run"
+ echo " schroot --end-session -c ${SESSION_ID}"
+ echo " when you no longer need this environment."
+fi
package { 'debootstrap':
ensure => installed,
}
-
- file { '/etc/schroot/mount-defaults':
- content => template('schroot/etc/schroot/mount-defaults.erb'),
- require => Package['schroot'],
+ package { 'moreutils':
+ ensure => installed
}
+
file { '/etc/default/schroot':
source => 'puppet:///modules/schroot/default-schroot',
require => Package['schroot']
}
+ file { '/etc/schroot/mount-defaults':
+ content => template('schroot/mount-defaults.erb'),
+ require => Package['schroot'],
+ }
file { '/etc/schroot/default/nssdatabases':
source => 'puppet:///modules/schroot/nssdatabases',
require => Package['schroot']
}
+
+ file { '/etc/schroot/setup.d/99porterbox-extra-apt-options':
+ mode => '0555',
+ source => 'puppet:///modules/schroot/schroot-setup.d/99porterbox-extra-apt-options',
+ require => Package['schroot'],
+ }
+ file { '/etc/schroot/setup.d/99porterbox-extra-sources':
+ mode => '0555',
+ source => 'puppet:///modules/schroot/schroot-setup.d/99porterbox-extra-sources',
+ require => Package['schroot'],
+ }
+
+ file { '/etc/schroot/dsa':
+ ensure => directory,
+ require => Package['schroot'],
+ }
+ file { '/etc/schroot/dsa/default-mirror':
+ content => template('schroot/default-mirror.erb'),
+ }
+ file { '/etc/schroot/dsa/config':
+ source => 'puppet:///modules/schroot/schroot-dsa/config',
+ }
+ file { '/etc/schroot/dsa/fstab':
+ content => template('schroot/schroot-dsa/fstab.erb'),
+ require => Package['schroot'],
+ }
}
--- /dev/null
+<%=
+ninfo = scope.lookupvar('site::nodeinfo')
+if ninfo['hoster'].has_key?('mirror-debian') then
+ ninfo['hoster']['mirror-debian']
+else
+ 'http://cdn.debian.net/debian'
+end
+%>
+++ /dev/null
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-# mount.defaults: static file system information for chroots.
-# Note that the mount point will be prefixed by the chroot path
-# (CHROOT_PATH)
-#
-# <file system> <mount point> <type> <options> <dump> <pass>
-<% if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture') and scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0].start_with?('kfreebsd') -%>
-# kFreeBSD version
-proc /proc linprocfs defaults 0 0
-dev /dev devfs rw,bind 0 0
-dev /dev/fd fdescfs rw,bind 0 0
-sys /sys linsysfs defaults 0 0
-<% else -%>
-# Linux version
-proc /proc proc defaults 0 0
-/dev/pts /dev/pts none rw,bind 0 0
-tmpfs /dev/shm tmpfs defaults 0 0
-<% end %>
-
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+# mount.defaults: static file system information for chroots.
+# Note that the mount point will be prefixed by the chroot path
+# (CHROOT_PATH)
+#
+# <file system> <mount point> <type> <options> <dump> <pass>
+<% if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture') and scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0].start_with?('kfreebsd') -%>
+# kFreeBSD version
+proc /proc linprocfs defaults 0 0
+dev /dev devfs rw,bind 0 0
+dev /dev/fd fdescfs rw,bind 0 0
+sys /sys linsysfs defaults 0 0
+<% else -%>
+# Linux version
+proc /proc proc defaults 0 0
+/dev/pts /dev/pts none rw,bind 0 0
+tmpfs /dev/shm tmpfs defaults 0 0
+<% end %>
+
--- /dev/null
+# fstab: static file system information for chroots.
+# Note that the mount point will be prefixed by the chroot path
+# (CHROOT_PATH)
+#
+# <file system> <mount point> <type> <options> <dump> <pass>
+
+<% if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture') and scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0].start_with?('kfreebsd') -%>
+# kFreeBSD version
+proc /proc linprocfs defaults 0 0
+dev /dev devfs rw,bind 0 0
+dev /dev/fd fdescfs rw,bind 0 0
+/home /home nullfs rw 0 0
+/tmp /tmp nullfs rw 0 0
+
+<% else -%>
+# Linux version
+/proc /proc none rw,bind 0 0
+/sys /sys none rw,bind 0 0
+/dev /dev none rw,bind 0 0
+/dev/pts /dev/pts none rw,bind 0 0
+/home /home none rw,bind 0 0
+/tmp /tmp none rw,bind 0 0
+tmpfs-shm /dev/shm tmpfs defaults,size=64m 0 0
+
+<% end %>