3 ### Write `schroot' configuration for build chroots
5 ### (c) 2018 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the distorted.org.uk chroot maintenance tools.
12 ### distorted-chroot is free software: you can redistribute it and/or
13 ### modify it under the terms of the GNU General Public License as
14 ### published by the Free Software Foundation; either version 2 of the
15 ### License, or (at your option) any later version.
17 ### distorted-chroot is distributed in the hope that it will be useful,
18 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ### General Public License for more details.
22 ### You should have received a copy of the GNU General Public License
23 ### along with distorted-chroot. If not, write to the Free Software
24 ### Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
27 . state/config.sh # @@@config@@@
29 ## Parse the command-line.
31 while getopts "" opt; do badp=t; done
32 shift $(( $OPTIND - 1 ))
33 case $# in 0) ;; *) badp=t ;; esac
34 case $badp in t) echo >&2 "usage: $0"; exit 2 ;; esac
36 for arg in $ALL_CHROOTS; do
37 case $arg in *-*-*) echo >&2 "$0: bad chroot name \`$arg'"; exit 2 ;; esac
39 if [ ! -d /dev/$VG/ ]; then echo >&2 "$0: no volume group \`$VG'"; exit 2; fi
41 ## Start producing output.
43 ### -*-conf-*- GENERATED by mkchrootconf
45 for arg in $ALL_CHROOTS; do
47 ## Parse the chroot name into its compoments, and retrieve the distribution
49 dist=${arg%-*} arch=${arg#*-}
50 eval "nick=\$nickmap_$dist"
52 ## Start the stanza for chroot D-A.
58 ## Prepare the alias list. For each nickname N for distribution D, there's
59 ## a chroot alias N-A. If A is the default architecture then there are
60 ## aliases D and N for each N.. If D is the default distribution then
61 ## there is an alias A.
63 for n in $nick; do alias=${alias+$alias,}$LVPREFIX$n-$arch; done
65 $MYARCH) for n in $dist $nick; do alias=${alias+$alias,}$LVPREFIX$n; done ;;
68 $PRIMARY_DIST) alias=${alias+$alias,}$LVPREFIX$arch ;;
78 ## Architecture-specific foibles. For `i386' and `amd64', explicitly set
79 ## the personality so that `config.guess' doesn't get confused by
80 ## surprising utsname(2) output.
94 ## The rest of the configuration.
97 description=Debian $dist/$arch autobuilder
98 device=/dev/$VG/$LVPREFIX$dist-$arch
99 lvm-snapshot-options=$SNAPOPT
100 lvm.suppress-fd-warnings=t
101 mount-options=-onosuid,data=writeback,barrier=0,commit=3600,noatime
104 root-groups=root,sbuild
106 source-root-groups=root
111 ###----- That's all, folks --------------------------------------------------