blob: 0086651a557614cfe222b057bf2eedde06ffed92 [file] [log] [blame]
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CROS_WORKON_COMMIT="f34cf3a06f7b17b7829185630d886a5d9d3f0e75"
CROS_WORKON_TREE=("791c6808b4f4f5f1c484108d66ff958d65f8f1e3" "78bbddcb5c152ba63cb9408b189179ad60cfd2bc" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk image-burner .gn"
PLATFORM_NATIVE_TEST="yes"
PLATFORM_SUBDIR="image-burner"
inherit cros-workon platform user
DESCRIPTION="Image-burning service for Chromium OS"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/image-burner/"
SRC_URI=""
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE="user_session_isolation"
RDEPEND="
sys-apps/rootdev
"
DEPEND="${RDEPEND}
chromeos-base/system_api
"
pkg_preinst() {
# Create user and group for image-burner.
enewuser "image-burner"
enewgroup "image-burner"
}
src_install() {
dosbin "${OUT}"/image_burner
insinto /etc/dbus-1/system.d
doins ImageBurner.conf
insinto /usr/share/dbus-1/system-services
doins org.chromium.ImageBurner.service
insinto /etc/init
doins init/image-burner.conf
# TODO(crbug/766130): Remove the following sed block when non-root mount
# namespace is by default enabled.
# Remove the env var value related to mount namespace if USE flag
# user_session_isolation is not present.
if ! use user_session_isolation; then
sed -i -e "/env MNT_NS_ARGS=/s:=.*:=:" \
"${D}"/etc/init/image-burner.conf || die
fi
}
platform_pkg_test() {
platform_test "run" "${OUT}/unittest_runner"
}