blob: d7140cf06a409eafa13c9eea899ac04334d06161 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_INCREMENTAL_BUILD="1"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk arc/container/obb-mounter .gn"
PLATFORM_SUBDIR="arc/container/obb-mounter"
inherit cros-workon platform
DESCRIPTION="D-Bus service to mount OBB files"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/arc/container/obb-mounter"
LICENSE="BSD-Google"
KEYWORDS="~*"
RDEPEND="
sys-fs/fuse:=
sys-libs/libcap:=
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
"
CONTAINER_DIR="/opt/google/containers/arc-obb-mounter"
src_install() {
dobin "${OUT}"/arc-obb-mounter
dobin "${OUT}"/mount-obb
insinto /etc/dbus-1/system.d
doins org.chromium.ArcObbMounter.conf
insinto /etc/init
doins init/arc-obb-mounter.conf
insinto "${CONTAINER_DIR}"
doins "${OUT}"/rootfs.squashfs
# Keep the parent directory of mountpoints inaccessible from non-root
# users because mountpoints themselves are often world-readable but we
# do not want to expose them.
# container-root is where the root filesystem of the container in which
# arc-obb-mounter daemon runs is mounted.
diropts --mode=0700 --owner=root --group=root
keepdir "${CONTAINER_DIR}"/mountpoints/
keepdir "${CONTAINER_DIR}"/mountpoints/container-root
platform_fuzzer_install "${S}"/OWNERS "${OUT}"/mount-obb_fuzzer
}
platform_pkg_test() {
platform_test "run" "${OUT}/arc-obb-mounter_testrunner"
}