| # Copyright 2017 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=5 |
| |
| CROS_WORKON_COMMIT="207b9c95e801b90f6616962cb928bec371aed39f" |
| CROS_WORKON_TREE=("17f4a6efa079886fb3e23fd256264f932d59721d" "012a319fec4a0e8a1e0460127a68061025b5ce7b") |
| CROS_WORKON_INCREMENTAL_BUILD="1" |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_SUBTREE="common-mk virtual_file_provider" |
| |
| PLATFORM_SUBDIR="virtual_file_provider" |
| |
| inherit cros-workon platform user |
| |
| DESCRIPTION="D-Bus service to provide virtual file" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/virtual_file_provider" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| |
| RDEPEND=" |
| chromeos-base/libbrillo |
| sys-fs/fuse |
| sys-libs/libcap |
| " |
| |
| DEPEND="${RDEPEND} |
| chromeos-base/system_api" |
| |
| |
| MOUNTPOINTS="/opt/google/containers/virtual-file-provider/mountpoints" |
| |
| src_install() { |
| dobin "${OUT}"/virtual-file-provider |
| newbin virtual-file-provider-jailed.sh virtual-file-provider-jailed |
| |
| insinto /usr/share/virtual-file-provider |
| doins "${OUT}"/rootfs.squashfs |
| |
| insinto /etc/dbus-1/system.d |
| doins org.chromium.VirtualFileProvider.conf |
| |
| insinto /usr/share/dbus-1/system-services |
| doins org.chromium.VirtualFileProvider.service |
| |
| # 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 |
| # virtual-file-provider daemon runs is mounted. |
| diropts --mode=0700 --owner=root --group=root |
| keepdir "${MOUNTPOINTS}" |
| keepdir "${MOUNTPOINTS}"/container-root |
| } |
| |
| pkg_preinst() { |
| enewuser "virtual-file-provider" |
| enewgroup "virtual-file-provider" |
| } |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}/virtual-file-provider_testrunner" |
| } |