# shellcheck shell=bash # Scenarios set what the runner and items read # shellcheck disable=SC2034 DESCRIPTION="What configure expects of Ubuntu's packages: davfs2, sshfs, GTK's print backend, mise" TIER=all scenario() { sudo apt-get update > /dev/null step "davfs2, set up as configure core does" echo "davfs2 davfs2/suid_file boolean true" | sudo debconf-set-selections sudo apt-get install -y davfs2 > /dev/null 2>&1 check "mount.davfs is setuid, so you can mount without sudo" test -u /usr/sbin/mount.davfs check "the davfs2 group exists" getent group davfs2 check "davfs2.conf names that group" grep -qE '^#?[[:space:]]*dav_group[[:space:]]+davfs2' /etc/davfs2/davfs2.conf step "davfs2 installed first, without setuid" sudo apt-get purge -y davfs2 > /dev/null 2>&1 echo "davfs2 davfs2/suid_file boolean false" | sudo debconf-set-selections sudo apt-get install -y davfs2 > /dev/null 2>&1 check_not "not setuid" test -u /usr/sbin/mount.davfs source "$CONNECTOR/configure.d/10-core.sh" check "davfs2_ready makes it setuid" davfs2_ready check "...it is" test -u /usr/sbin/mount.davfs step "sshfs and SMB" sudo apt-get install -y sshfs smbclient cifs-utils > /dev/null 2>&1 check "fusermount3 is where the SFTP unit expects it" test -x /usr/bin/fusermount3 check "smbclient lists shares with -g" bash -c "smbclient --help 2>&1 | grep -q -- '--grepable'" step "Printing" sudo apt-get install -y libgtk-3-0t64 > /dev/null 2>&1 check "GTK's CUPS backend is where setup-printers.sh looks" \ compgen -G '/usr/lib/*/gtk-3.0/*/printbackends/libprintbackend-cups.so' check "libnss-mdns is a package" apt-cache show libnss-mdns step "mise's apt repository" source "$CONNECTOR/configure.d/40-languages.sh" check "install_mise" install_mise check "mise runs" mise --version check "activate" activate check "a new bash has mise" bash -ic 'command -v mise' < /dev/null }