| # Copyright 2018 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=6 |
| |
| CROS_WORKON_COMMIT="49b03fa298c4675d16890c4bcd6e8a1ccfab10fc" |
| CROS_WORKON_TREE=("6f3abf0e1487e52593fe1b4fc780df5844fa9cc1" "55599be4df8c04dd02a7dee3d34dc62276a0e11d" "5cae7ba869baf03d79b39bd469b065d62834cfb3" "bb1e0b651b26e8442a744c61ed7633d032dac607" "dc1506ef7c8cfd2c5ffd1809dac05596ec18773c") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| # TODO(crbug.com/809389): Avoid directly including headers from other packages. |
| CROS_WORKON_SUBTREE="common-mk oobe_config libtpmcrypto metrics .gn" |
| |
| PLATFORM_SUBDIR="oobe_config" |
| |
| inherit cros-workon platform user |
| |
| DESCRIPTION="Provides utilities to save and restore OOBE config." |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/oobe_config/" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE="tpm tpm2" |
| REQUIRED_USE="tpm2? ( !tpm )" |
| |
| RDEPEND=" |
| chromeos-base/libbrillo |
| chromeos-base/libtpmcrypto |
| chromeos-base/metrics |
| dev-libs/openssl |
| sys-apps/dbus |
| " |
| |
| DEPEND=" |
| ${RDEPEND} |
| chromeos-base/power_manager-client |
| chromeos-base/system_api |
| " |
| |
| pkg_preinst() { |
| enewuser "oobe_config_save" |
| enewuser "oobe_config_restore" |
| enewgroup "oobe_config_save" |
| enewgroup "oobe_config_restore" |
| } |
| |
| src_install() { |
| dosbin "${OUT}"/rollback_prepare_save |
| dosbin "${OUT}"/oobe_config_save |
| dosbin "${OUT}"/oobe_config_restore |
| dosbin "${OUT}"/rollback_finish_restore |
| |
| dosbin "${OUT}"/finish_oobe_auto_config |
| dosbin "${OUT}"/store_usb_oobe_config |
| |
| insinto /etc/init |
| doins etc/init/oobe_config_restore.conf |
| |
| insinto /etc/dbus-1/system.d |
| doins etc/dbus-1/org.chromium.OobeConfigRestore.conf |
| |
| insinto /usr/share/policy |
| newins seccomp_filters/oobe_config_restore-seccomp-"${ARCH}".policy \ |
| oobe_config_restore-seccomp.policy |
| } |
| |
| platform_pkg_test() { |
| local tests=( |
| oobe_config_test |
| ) |
| local test_bin |
| for test_bin in "${tests[@]}"; do |
| platform_test "run" "${OUT}/${test_bin}" |
| done |
| } |