summarylogtreecommitdiffstats
path: root/cros-container-guest-tools.install
blob: ae81511055c085c0c9ef93b9b296c045f459ba9c (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
post_install() {

	# update dconf after GTK+ theme installed
	if hash dconf 2>/dev/null; then
    	dconf update
	fi

	# mask systemd-journald-audit.socket, which failes inside unprivileged container
	systemctl mask systemd-journald-audit.socket

	# workaround for https://bugs.archlinux.org/task/58701, remove after fix
	ln -sf /opt/google/cros-containers/cros-adapta /usr/share/themes/CrosAdapta
	ln -sf /opt/google/cros-containers/bin/sommelier /usr/bin/sommelier

	# set default browser to the garcon_host_browser handler
	if hash xdg-settings; then
		xdg-settings set default-web-browser garcon_host_browser.desktop
	fi

	# TODO(crbug.com/835959): Remove this once we fix mesa.
	mkdir -p /usr/lib64/dri
	ln -sf /opt/google/cros-containers/lib/swrast_dri.so /usr/lib64/dri/swrast_dri.so

cat << EOF

	(!) This package is permanently work in progress until Crostini 
	considered to be stable by Google!

	Developed and tested on Samsung Chromebook Plus, should work on 
	other Chromebooks with Crostini enabled.

EOF

}

post_remove() {

	# update dconf after GTK+ theme installed
	if hash dconf 2>/dev/null; then
    	dconf update 2>/dev/null
	fi

	# unmask systemd-journald-audit.socket
	systemctl unmask systemd-journald-audit.socket

	# workaround for https://bugs.archlinux.org/task/58701, remove after fix
	rm /usr/share/themes/CrosAdapta
	rm /usr/bin/sommelier

	# TODO(crbug.com/835959): Remove this once we fix mesa.
	rm /usr/lib64/dri/swrast_dri.so
	rmdir /usr/lib64/dri 2>/dev/null
	rmdir /usr/lib64 2>/dev/null

}