summaryrefslogtreecommitdiff
path: root/modeconf/sb2rc.devel
blob: cd6f2cb7f980970a98a7d28b648331b701ad3f44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#
# Configuration variables for sb2 - specific to the "devel" mapping mode.
#
# First argument is "initializing" when this script is included from sb2-init,
# or "starting" when included from the "sb2" script, or name of the command
# wrapper which needs mode-specific parameters ("dpkg", "apt-get", etc),
# and empty otherwise.
sb2rc_mode="$1"


case "$sb2rc_mode" in

	initializing)

		SB2INIT_DEB_BUILD_GNU_TYPE=$ARCH-linux-gnueabi
		SB2INIT_DEB_HOST_GNU_TYPE=$ARCH-linux-gnueabi
		SB2INIT_CROSS_GCC_PREFIX_LIST=$ARCH-linux-:$ARCH-linux-gnueabi-
		SB2INIT_DEB_BUILD_GNU_SYSTEM="linux-gnueabi"
		SB2INIT_DEB_HOST_GNU_SYSTEM="linux-gnueabi"

		SB2INIT_DEB_HOST_ARCH_CPU=$ARCH
		SB2INIT_DEB_BUILD_ARCH_CPU=$ARCH
		SB2INIT_DEB_BUILD_ARCH_ABI="gnueabi"
		;;

	starting)
		# The dpkg-checkbuilddeps wrapper needs to be able to
		# switch to the "tools" mode; call add_map_mode to
		# make "tools" available for this session.
		add_map_mode tools

		# If $CREATE_ARGVMODS_USR_BIN_RULES is not empty, some 
		# mapping rules will be automatically generated for
		# programs that belong to the toolchain.
		# Value of this variable will be used as the default 
		# mapping rule.
		CREATE_ARGVMODS_USR_BIN_RULES="-- return"
		;;

	wrapper_list)
		SBOX_WRAPPERS=ALL
		;;

	sb2-check-pkg-mappings)
		# This is used by the "sb2-check-pkg-mappings" utility:
		# N.B. *bin directories needs to be ignored, because there 
		# are many lib*-dev -packages that want to add some 
		# configuration tools to /usr/bin, etc
		# N.B2: /usr/share/zoneinfo/localtime is typically a symlink 
		# to /etc/localtime and needs to be ignored
		#
		# Following files come with package libglib2.0-dev
		# and we want to ignore those and use the ones
		# found from rootstrap:
		#    /usr/share/aclocal/glib-2.0.m4
		#    /usr/share/aclocal/glib-gettext.m4
		#
		# Note: now there are special mapping rules for perl & python,
		# /usr/lib/perl* and /usr/lib/python* can be ignored here,
		# because the mapping rules select correct versions for
		# the binaries automatically.
		#
		SB2_CHECK_PKG_MAPPINGS_IGNORE_LIST=" \
			@require-both: \
			/usr/bin /usr/sbin /sbin \
			@ignore: \
			/usr/lib/perl \
			/usr/lib/python \
			/etc \
			/usr/share/man /usr/share/doc /usr/share/gtk-doc \
			/usr/share/doc-base \
			/usr/share/locale \
			/usr/share/lintian \
			/usr/share/menu/gdb \
			/usr/share/i18n \
			/usr/share/info \
			/usr/share/sgml \
			/usr/share/perl5 \
			/usr/share/gconf \
			/usr/share/base-passwd \
			/usr/share/lintian/overrides/dpkg-dev \
			/usr/share/zoneinfo/localtime \
			/usr/share/aclocal/glib-2.0.m4 \
			/usr/share/aclocal/glib-gettext.m4 \
			/usr/lib/dpkg "
		;;

	dpkg)
		# This is for the "dpkg" wrapper:
		SBOX_DPKG_WRAPPER_DENY_INSTALL=yes
		;;

	apt-get)
		# and a similar setting for "apt-get" wrapper:
		SBOX_APT_GET_WRAPPER_DENY_INSTALL=yes
		;;

	*)
		# Default.
		;;

esac